客户端小程序查看申请贷款详情、PC端催收时展示的详情

master
river 4 years ago
parent 83b75433c2
commit e350e8132c
  1. 12
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java
  2. 7
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  3. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionMapper.java
  4. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java
  5. 13
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlCollectionMapper.xml
  6. 2
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml

@ -426,20 +426,24 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL); ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL);
} }
switch (applyDetail.getAuditStatus()) { switch (applyDetail.getAuditStatus()) {
case 1: case 1: // 已受理
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); applyDetailResponse.setStatus(applyDetail.getAuditStatus());
break; break;
case 2: case 2: // 审核中
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); applyDetailResponse.setStatus(applyDetail.getAuditStatus());
break; break;
case 3: // 拒绝 case 3: // 拒绝
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); applyDetailResponse.setStatus(applyDetail.getAuditStatus());
applyDetailResponse.setRemark(applyDetail.getRemark()); applyDetailResponse.setRemark(applyDetail.getRemark());
break; break;
case 4: // 驳回 case 4: // 驳回
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); applyDetailResponse.setStatus(applyDetail.getAuditStatus());
applyDetailResponse.setRemark(applyDetail.getRemark()); applyDetailResponse.setRemark(applyDetail.getRemark());
break; break;
case 5: // 已撤销
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
case 6: // 草稿,正常不会出现这个状态,避免报错设置为已受理
applyDetailResponse.setStatus(1);
default: default:
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL); ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL);
} }

@ -639,6 +639,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
List<CrmsCustomerRelated> relatedList = new ArrayList<>(); List<CrmsCustomerRelated> relatedList = new ArrayList<>();
List<Integer> intList = companyCustomerReq.getRelatedId(); List<Integer> intList = companyCustomerReq.getRelatedId();
if (null != intList && intList.size() != 0) {
for (int i = 0; i < intList.size(); i++) { for (int i = 0; i < intList.size(); i++) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated(); CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
Integer integer = intList.get(i); Integer integer = intList.get(i);
@ -648,8 +649,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
} }
crmsCustomerRelatedService.insertCustomerRelated(relatedList); crmsCustomerRelatedService.insertCustomerRelated(relatedList);
} }
}
if (customer == true && company > 0) { if (customer && company > 0) {
return true; return true;
} }
return false; return false;
@ -696,6 +698,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
List<CrmsCustomerRelated> relatedList = new ArrayList<>(); List<CrmsCustomerRelated> relatedList = new ArrayList<>();
List<Integer> intList = companyCustomerReq.getRelatedId(); List<Integer> intList = companyCustomerReq.getRelatedId();
if (null != intList && intList.size() != 0) {
for (int i = 0; i < intList.size(); i++) { for (int i = 0; i < intList.size(); i++) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated(); CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
Integer integer = intList.get(i); Integer integer = intList.get(i);
@ -703,10 +706,10 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
relatedList.add(crmsCustomerRelated); relatedList.add(crmsCustomerRelated);
} }
}
if (relatedList.size() > 0) { if (relatedList.size() > 0) {
crmsCustomerRelatedService.insertCustomerRelated(relatedList); crmsCustomerRelatedService.insertCustomerRelated(relatedList);
} }
return true; return true;
} }
} }

@ -34,6 +34,8 @@ public interface AlCollectionMapper extends BaseMapper<AlCollection> {
OverdueDetailResponse getOverdueDetailByInsuranceId(Integer insuranceId); OverdueDetailResponse getOverdueDetailByInsuranceId(Integer insuranceId);
Integer getCollectionCountByInsuranceId(Integer insuranceId);
MoreOverdueDetailResponse moreOverdueDetail(Integer id); MoreOverdueDetailResponse moreOverdueDetail(Integer id);
Integer getInsuranceIdById(Integer id); Integer getInsuranceIdById(Integer id);

@ -143,6 +143,11 @@ public class AlCollectionServiceImpl extends ServiceImpl<AlCollectionMapper, AlC
} }
OverdueDetailResponse overdueDetailResponse = this.getBaseMapper().getOverdueDetailByInsuranceId(insuranceId); OverdueDetailResponse overdueDetailResponse = this.getBaseMapper().getOverdueDetailByInsuranceId(insuranceId);
if (null != overdueDetailResponse) { if (null != overdueDetailResponse) {
// 催收次数
Integer numberOfCollection = this.getBaseMapper().getCollectionCountByInsuranceId(insuranceId);
if (null != numberOfCollection) {
overdueDetailResponse.setNumberOfCollection(numberOfCollection);
}
// 逾期金额、逾期利息、其他费用、逾期次数 // 逾期金额、逾期利息、其他费用、逾期次数
Map<String, Object> map = this.getOverdueConditionByInsuranceId(insuranceId); Map<String, Object> map = this.getOverdueConditionByInsuranceId(insuranceId);
if (null != map) { if (null != map) {
@ -346,6 +351,8 @@ public class AlCollectionServiceImpl extends ServiceImpl<AlCollectionMapper, AlC
BigDecimal overdueInterest = new BigDecimal(0.00); BigDecimal overdueInterest = new BigDecimal(0.00);
// 其他费用 // 其他费用
BigDecimal otherExpenses = new BigDecimal(0.00); BigDecimal otherExpenses = new BigDecimal(0.00);
// 返回数据集合
Map<String, Object> map = new HashMap<>();
List<AlRepaymentEntry> alRepaymentList = alRepaymentEntryMapper.listAlRepaymentByInsuranceId(insuranceId); List<AlRepaymentEntry> alRepaymentList = alRepaymentEntryMapper.listAlRepaymentByInsuranceId(insuranceId);
if (alRepaymentList != null && alRepaymentList.size() != 0) { if (alRepaymentList != null && alRepaymentList.size() != 0) {
for (AlRepaymentEntry alRepayment : alRepaymentList) { for (AlRepaymentEntry alRepayment : alRepaymentList) {
@ -353,9 +360,10 @@ public class AlCollectionServiceImpl extends ServiceImpl<AlCollectionMapper, AlC
overdueInterest = overdueInterest.add(alRepayment.getInterest() == null ? new BigDecimal(0.00) : alRepayment.getInterest()); overdueInterest = overdueInterest.add(alRepayment.getInterest() == null ? new BigDecimal(0.00) : alRepayment.getInterest());
otherExpenses = otherExpenses.add(alRepayment.getOtherExpenses() == null ? new BigDecimal(0.00) : alRepayment.getOtherExpenses()); otherExpenses = otherExpenses.add(alRepayment.getOtherExpenses() == null ? new BigDecimal(0.00) : alRepayment.getOtherExpenses());
} }
}
Map<String, Object> map = new HashMap<>();
map.put("overduePeriods", alRepaymentList.size()); map.put("overduePeriods", alRepaymentList.size());
} else {
map.put("overduePeriods", 0);
}
map.put("overdueAmount", overdueAmount); map.put("overdueAmount", overdueAmount);
map.put("overdueInterest", overdueInterest); map.put("overdueInterest", overdueInterest);
map.put("otherExpenses", otherExpenses); map.put("otherExpenses", otherExpenses);

@ -40,12 +40,23 @@
#{ac.collectionUser},#{ac.overduePeriods}) #{ac.collectionUser},#{ac.overduePeriods})
</insert> </insert>
<select id="getOverdueDetailByInsuranceId" parameterType="integer" resultType="com.daqing.financial.guarantee.model.response.OverdueDetailResponse"> <!--<select id="getOverdueDetailByInsuranceId" parameterType="integer" resultType="com.daqing.financial.guarantee.model.response.OverdueDetailResponse">
SELECT i.customer_name AS name,i.business_type AS type,i.business_code AS code,COUNT(c.id) AS number_of_collection SELECT i.customer_name AS name,i.business_type AS type,i.business_code AS code,COUNT(c.id) AS number_of_collection
FROM al_insurance_list AS i FROM al_insurance_list AS i
INNER JOIN al_collection AS c INNER JOIN al_collection AS c
ON i.id = c.insurance_id ON i.id = c.insurance_id
WHERE i.id = #{insuranceId} WHERE i.id = #{insuranceId}
</select>-->
<!-- 催收时贷款记录 -->
<select id="getOverdueDetailByInsuranceId" parameterType="integer" resultType="com.daqing.financial.guarantee.model.response.OverdueDetailResponse">
SELECT customer_name AS name,business_type AS type,business_code AS code
FROM al_insurance_list WHERE i.id = #{insuranceId}
</select>
<!-- 根据保后id查询催收的次数 -->
<select id="getCollectionCountByInsuranceId" parameterType="integer" resultType="integer">
SELECT COUNT(id) FROM al_collection WHERE insurance_id = #{insuranceId}
</select> </select>
<!-- 催收列表 --> <!-- 催收列表 -->

@ -195,7 +195,7 @@
<select id="getAttacheAndABByBusinessId" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.po.AttacheAndABUserIdPO"> <select id="getAttacheAndABByBusinessId" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.po.AttacheAndABUserIdPO">
SELECT (SELECT id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 59) AS a_user_id, SELECT (SELECT id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 59) AS a_user_id,
(SELECT id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 60) AS b_user_id, (SELECT id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 60) AS b_user_id,
a.id,m.id a.emp_id AS asset_user_id,m.emp_id AS message_user_id
FROM dg_assets_investigation AS a FROM dg_assets_investigation AS a
LEFT JOIN dg_message_investigation AS m LEFT JOIN dg_message_investigation AS m
ON a.business_id = m.business_id ON a.business_id = m.business_id

Loading…
Cancel
Save