diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java index 1963e266..b16700d4 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java @@ -426,20 +426,24 @@ public class CustomerAppletServiceImpl extends ServiceImpl relatedList = new ArrayList<>(); List 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 relatedList = new ArrayList<>(); List 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; } } \ No newline at end of file diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionMapper.java index 14436944..6fad01c4 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionMapper.java @@ -34,6 +34,8 @@ public interface AlCollectionMapper extends BaseMapper { OverdueDetailResponse getOverdueDetailByInsuranceId(Integer insuranceId); + Integer getCollectionCountByInsuranceId(Integer insuranceId); + MoreOverdueDetailResponse moreOverdueDetail(Integer id); Integer getInsuranceIdById(Integer id); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java index c645edab..060061e1 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java @@ -143,6 +143,11 @@ public class AlCollectionServiceImpl extends ServiceImpl map = this.getOverdueConditionByInsuranceId(insuranceId); if (null != map) { @@ -346,6 +351,8 @@ public class AlCollectionServiceImpl extends ServiceImpl map = new HashMap<>(); List alRepaymentList = alRepaymentEntryMapper.listAlRepaymentByInsuranceId(insuranceId); if (alRepaymentList != null && alRepaymentList.size() != 0) { for (AlRepaymentEntry alRepayment : alRepaymentList) { @@ -353,9 +360,10 @@ public class AlCollectionServiceImpl extends ServiceImpl map = new HashMap<>(); - map.put("overduePeriods", alRepaymentList.size()); map.put("overdueAmount", overdueAmount); map.put("overdueInterest", overdueInterest); map.put("otherExpenses", otherExpenses); diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlCollectionMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlCollectionMapper.xml index a9a58a4a..29925712 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlCollectionMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlCollectionMapper.xml @@ -40,12 +40,23 @@ #{ac.collectionUser},#{ac.overduePeriods}) - + SELECT customer_name AS name,business_type AS type,business_code AS code + FROM al_insurance_list WHERE i.id = #{insuranceId} + + + + diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml index 055d77e7..1a40f3a3 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml @@ -195,7 +195,7 @@