客户端小程序查看申请贷款详情、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. 35
      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);
}
switch (applyDetail.getAuditStatus()) {
case 1:
case 1: // 已受理
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
break;
case 2:
case 2: // 审核中
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
break;
case 3: // 拒绝
case 3: // 拒绝
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
applyDetailResponse.setRemark(applyDetail.getRemark());
break;
case 4: // 驳回
case 4: // 驳回
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
applyDetailResponse.setRemark(applyDetail.getRemark());
break;
case 5: // 已撤销
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
case 6: // 草稿,正常不会出现这个状态,避免报错设置为已受理
applyDetailResponse.setStatus(1);
default:
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL);
}

@ -639,17 +639,19 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
List<CrmsCustomerRelated> relatedList = new ArrayList<>();
List<Integer> intList = companyCustomerReq.getRelatedId();
for (int i = 0; i < intList.size(); i++) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
Integer integer = intList.get(i);
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getId().intValue());//企业id
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
relatedList.add(crmsCustomerRelated);
if (null != intList && intList.size() != 0) {
for (int i = 0; i < intList.size(); i++) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
Integer integer = intList.get(i);
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getId().intValue());//企业id
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
relatedList.add(crmsCustomerRelated);
}
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
}
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
}
if (customer == true && company > 0) {
if (customer && company > 0) {
return true;
}
return false;
@ -696,17 +698,18 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
List<CrmsCustomerRelated> relatedList = new ArrayList<>();
List<Integer> intList = companyCustomerReq.getRelatedId();
for (int i = 0; i < intList.size(); i++) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
Integer integer = intList.get(i);
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getCustomerId().intValue());//企业id companyCustomerEntity.getId().intValue()
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
relatedList.add(crmsCustomerRelated);
if (null != intList && intList.size() != 0) {
for (int i = 0; i < intList.size(); i++) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
Integer integer = intList.get(i);
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getCustomerId().intValue());//企业id companyCustomerEntity.getId().intValue()
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
relatedList.add(crmsCustomerRelated);
}
}
if (relatedList.size() > 0) {
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
}
return true;
return true;
}
}

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

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

@ -40,12 +40,23 @@
#{ac.collectionUser},#{ac.overduePeriods})
</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
FROM al_insurance_list AS i
INNER JOIN al_collection AS c
ON i.id = c.insurance_id
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>
<!-- 催收列表 -->

@ -195,7 +195,7 @@
<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 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
LEFT JOIN dg_message_investigation AS m
ON a.business_id = m.business_id

Loading…
Cancel
Save