From e350e8132cdd5a63fd04e3f477b9237544d92455 Mon Sep 17 00:00:00 2001 From: river <1376754470@qq.com> Date: Wed, 31 Mar 2021 15:53:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E6=9F=A5=E7=9C=8B=E7=94=B3=E8=AF=B7=E8=B4=B7=E6=AC=BE?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E3=80=81PC=E7=AB=AF=E5=82=AC=E6=94=B6?= =?UTF-8?q?=E6=97=B6=E5=B1=95=E7=A4=BA=E7=9A=84=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CustomerAppletServiceImpl.java | 12 ++++--- .../service/impl/CustomerServiceImpl.java | 35 ++++++++++--------- .../guarantee/mapper/AlCollectionMapper.java | 2 ++ .../service/impl/AlCollectionServiceImpl.java | 12 +++++-- .../mapper/guarantee/AlCollectionMapper.xml | 13 ++++++- .../DgComplianceInvestigationMapper.xml | 2 +- 6 files changed, 52 insertions(+), 24 deletions(-) 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 @@