ソースを参照

1.掌柜财务非车结算编辑调整

wuhp 1 年間 前
コミット
e4bd3b6c13

+ 18 - 1
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -1340,7 +1340,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         //        根据协议   如果是含增值税结算   用保费 *   如果是  不含税保费
         InsPlyIncome insPlyIncome = baseMapper.getById(insPlyIncomeVo.getId());
 
-
+        String agreementId = insPlyIncomeVo.getAgreementId();
 
         BigDecimal bigDecimal = this.getBigDecimal(insPlyIncome.getNoPremium(), insPlyIncomeVo.getNoSuperviseCostsProportion());
         insPlyIncome.setCommissionFeevalue(bigDecimal);
@@ -1351,6 +1351,23 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         insPlyIncome.setNoSuperviseCostsProportion(insPlyIncomeVo.getNoSuperviseCostsProportion());
         insPlyIncome.setAgreementId(insPlyIncomeVo.getAgreementId());
         insPlyIncome.setAddType(insPlyIncomeVo.getAddType());
+        if(StringUtils.isNotEmpty(agreementId)){
+            PtlAgreement byId1 = ptlAgreementService.getById(agreementId);
+            if(ObjectUtils.isNotEmpty(byId1)){
+                String partnerCompaniesId = byId1.getPartnerCompaniesId();
+                String insuranceCompanyId = byId1.getInsuranceCompanyId();
+                String insuranceCompany = byId1.getInsuranceCompany();
+                if(StringUtils.isNotEmpty(partnerCompaniesId)){
+                    insPlyIncome.setPartnerCompaniesId(partnerCompaniesId);
+                    EsmInsCompany esmInsCompany = EsmInsCompanyService.getById(partnerCompaniesId);
+                    String name = esmInsCompany.getNamesimple();   //合作名称
+                    insPlyIncome.setPartnerCompaniesName(name);
+                }
+                insPlyIncome.setCompanyId(insuranceCompanyId);
+                insPlyIncome.setCompanyName(insuranceCompany);
+            }
+
+        }
         baseMapper.updateById(insPlyIncome);
 
         InsPlyIncomeLog insPlyIncomeLog = new InsPlyIncomeLog();