Răsfoiți Sursa

Merge branch 'test' into test-wks

wks 1 an în urmă
părinte
comite
f141cb7680
39 a modificat fișierele cu 542 adăugiri și 175 ștergeri
  1. 14 0
      src/main/java/com/ydtech/modules/admin/controller/SysUserController.java
  2. 2 0
      src/main/java/com/ydtech/modules/admin/service/SysUserService.java
  3. 87 0
      src/main/java/com/ydtech/modules/admin/service/impl/SysUserServiceImpl.java
  4. 69 30
      src/main/java/com/ydtech/modules/fee/dto/vo/RuleAttrMappingVo.java
  5. 49 12
      src/main/java/com/ydtech/modules/fnc/entity/InsPlyIncome.java
  6. 2 4
      src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java
  7. 2 2
      src/main/java/com/ydtech/modules/ins/model/vo/CustomerInfoVo.java
  8. 1 1
      src/main/java/com/ydtech/modules/ins/model/vo/QuoteRespVo.java
  9. 28 8
      src/main/java/com/ydtech/modules/ins/model/yc/audit/Audit.java
  10. 5 2
      src/main/java/com/ydtech/modules/ins/model/yc/ruote/Applicant.java
  11. 9 2
      src/main/java/com/ydtech/modules/ins/model/yc/ruote/Insured.java
  12. 15 3
      src/main/java/com/ydtech/modules/ins/model/yc/ruote/Tax.java
  13. 5 0
      src/main/java/com/ydtech/modules/ins/model/yc/ruote/Vhlowner.java
  14. 9 2
      src/main/java/com/ydtech/modules/inv/model/excel/AddTypeCXGDExcel.java
  15. 8 2
      src/main/java/com/ydtech/modules/inv/model/excel/AddTypeCXSXFExcel.java
  16. 6 1
      src/main/java/com/ydtech/modules/inv/model/excel/AddTypeFCGDExcel.java
  17. 5 1
      src/main/java/com/ydtech/modules/inv/model/excel/AddTypeFCSXFExcel.java
  18. 73 37
      src/main/java/com/ydtech/modules/inv/utils/CheckInsPlyComeUtils.java
  19. 1 1
      src/main/java/com/ydtech/modules/order/components/chengtai/ChengTaiRequestApiComponents.java
  20. 1 1
      src/main/java/com/ydtech/modules/order/controller/YangGuangOrderApiController.java
  21. 1 1
      src/main/java/com/ydtech/modules/order/entity/InsAreaCompany.java
  22. 3 3
      src/main/java/com/ydtech/modules/order/entity/api/chengtai/constants/ImageTypeEnum.java
  23. 10 4
      src/main/java/com/ydtech/modules/order/entity/api/chengtai/request/InsurePremiumRequest.java
  24. 2 2
      src/main/java/com/ydtech/modules/order/entity/api/chengtai/request/SubmitVerifyRequest.java
  25. 17 9
      src/main/java/com/ydtech/modules/order/entity/api/chengtai/request/UploadFileRequest.java
  26. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/KindListEnum.java
  27. 4 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangSubmitRequest.java
  28. 17 17
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangBaseResponse.java
  29. 4 6
      src/main/java/com/ydtech/modules/order/entity/vo/InsOrdersEditingVo.java
  30. 3 0
      src/main/java/com/ydtech/modules/order/entity/vo/OrderVo.java
  31. 3 0
      src/main/java/com/ydtech/modules/order/entity/vo/VehicleAndVesselTax.java
  32. 1 1
      src/main/java/com/ydtech/modules/order/entity/vo/ya/YaExtendInfoDto.java
  33. 3 1
      src/main/java/com/ydtech/modules/order/service/YangGuangOrderApiService.java
  34. 6 1
      src/main/java/com/ydtech/modules/order/service/impl/ChengTaiOrderApiServiceImpl.java
  35. 1 1
      src/main/java/com/ydtech/modules/order/service/impl/InsuranceCompanyPolymerizationServiceImpl.java
  36. 50 5
      src/main/java/com/ydtech/modules/order/service/impl/YangGuangOrderApiServiceImpl.java
  37. 20 14
      src/main/java/com/ydtech/modules/order/service/impl/YongchengOrderApiServiceImpl.java
  38. 3 0
      src/main/resources/mapper/modules/admin/SysUserMapper.xml
  39. 2 0
      src/main/resources/mapper/modules/order/InsOrdersMapper.xml

+ 14 - 0
src/main/java/com/ydtech/modules/admin/controller/SysUserController.java

@@ -1057,6 +1057,20 @@ public class SysUserController extends BaseController {
         return HttpResult.ok(list);
     }
 
+
+    /**
+     *
+     *
+     * @return 获取用户下级是否有  电销  代理人 渠道   如果有则返回  没有则 不返回
+     */
+    @ApiOperation(value = "获取当前用户的下级")
+    @GetMapping(value = "/findNextTreeContain")
+    public HttpResult<List<SysUser>> findNextTreeContain(String managementSource) {
+        List<SysUser> list = sysUserService.findNextTreeContain(managementSource);
+        return HttpResult.ok(list);
+    }
+
+
     /**
      * 获取当前用户的所有代理人
      *

+ 2 - 0
src/main/java/com/ydtech/modules/admin/service/SysUserService.java

@@ -343,6 +343,8 @@ public interface SysUserService extends BaseIService<SysUser> {
      */
     SysUser getByRoleIdAndDeptId(String roleId, String deptId);
 
+    List<SysUser> findNextTreeContain(String managementSource);
+
 }
 
 

+ 87 - 0
src/main/java/com/ydtech/modules/admin/service/impl/SysUserServiceImpl.java

@@ -2795,4 +2795,91 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     public SysUser getByRoleIdAndDeptId(String roleId, String deptId) {
         return baseMapper.getByRoleIdAndDeptId(roleId, deptId);
     }
+
+    /**
+     *
+     * @param managementSource
+     * @return  该人员下 的子集如果是电销 或者 代理人 或者 渠道则 显示
+     */
+    @Override
+    public List<SysUser> findNextTreeContain(String managementSource) {
+
+        String userId = BaseController.getUserId();
+        SysUser sysUser = sysUserMapper.getByUserId(userId);
+
+        //获取领导字段不为空的人的ID
+        QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
+        queryWrapper.isNotNull("leader_id");
+
+        HashMap<String, Object> params = new HashMap<>();
+        params.put("managementSource",managementSource);
+        List<SysUser> users = sysUserMapper.selectByParams(params);
+
+        for (SysUser user : users) {
+            this.appendName(user);
+        }
+        if (users == null || users.isEmpty()) {
+            return new ArrayList<>();
+        }
+        List<SysUser> topUsers = new ArrayList<>(); //存放1级用户,即没有直接上级的用户
+        // 根据组织结构展示级别,筛选顶层节点并构建组织结构树
+        if("admin".equals(sysUser.getName())){
+            topUsers.add(sysUserMapper.selectById("99D1501"));
+        }else {
+            this.appendName(sysUser);
+            topUsers.add(sysUser);
+        }
+        // 递归构建用户树结构
+        buildUserTreeContain(topUsers, users,managementSource);
+        return topUsers;
+
+    }
+
+    /**
+     * 拼接机构来源
+     * @param users
+     */
+    private void appendName(SysUser user) {
+        StringBuilder stringBuilder = new StringBuilder();
+        String deptId = user.getDeptId();
+        if (StringUtils.isNotEmpty(deptId)) {
+            int length = deptId.length();
+            if (length > 0) {
+                if (length <= 5) {
+                    String dept = deptId.replaceAll("[^\\d]*(\\d+).*", "$1");
+                    SysDept cityName = sysDeptMapper.selectById(dept);
+                    String name = cityName.getName();
+                    stringBuilder.append("(").append(name).append(")");
+                } else if (length > 5) {
+                    String dept = deptId.replaceAll("[^\\d]*(\\d+).*", "$1");
+                    if (dept.length() < 5) {
+                        SysDept dept1 = sysDeptMapper.selectById(dept);
+                        SysDept cityName = sysDeptMapper.selectById(deptId);
+                        stringBuilder.append("(").append(dept1.getName()).append(cityName.getName()).append(")");
+                    } else {
+                        String deptIdTwo = dept.substring(0, 4);
+
+                        SysDept dept1 = sysDeptMapper.selectById(deptIdTwo);
+                        SysDept dept2 = sysDeptMapper.selectById(dept);
+                        stringBuilder.append("(").append(dept1.getName()).append(dept2.getName()).append(")");
+                    }
+                }
+                user.setName(user.getName()+stringBuilder.toString());
+            }
+        }
+    }
+    private void buildUserTreeContain(List<SysUser> topUsers, List<SysUser> users, String managementSource) {
+        for (SysUser user : topUsers) {
+            List<SysUser> children = new ArrayList<>();
+            for (SysUser childUser : users) {
+                if (user.getId().equals(childUser.getLeaderId())) {
+                    children.add(childUser);
+                    // 递归查找下一级
+                    buildUserTreeContain(children, users,managementSource);
+                }
+            }
+            user.setChildren(children);
+        }
+    }
+
 }

+ 69 - 30
src/main/java/com/ydtech/modules/fee/dto/vo/RuleAttrMappingVo.java

@@ -11,6 +11,7 @@ import com.ydtech.modules.order.entity.api.bohai.constants.VehicleUsage;
 import com.ydtech.modules.order.entity.api.dajia.constants.TypeVehicleMapping;
 import com.ydtech.modules.protocol.entity.po.PtlNewCarJudgeRules;
 import com.ydtech.modules.protocols.entity.po.PtlAgreementUndwrtRulesAttr;
+import com.ydtech.utils.StringUtils;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -113,45 +114,83 @@ public class RuleAttrMappingVo {
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyRenewalOfInsurance", insAreaCompany.getSyRenewal()));
 
         CustomerInfoVo ownerInfo = insOrders.getOwnerinfo().toJavaObject(CustomerInfoVo.class);
-        //车主 证件号码(前6位)
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersIDNumber", ownerInfo.getIdentifyNumber()));
-        //车主 年龄
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersAge", ownerInfo.getAge()));
-        //车主 性别
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersSex", ownerInfo.getGender().equals("男") ? "1" : "2"));
+        if(StringUtils.isBlank(ownerInfo.getProperty()) || !"0".equals(ownerInfo.getProperty())) {
+            //车主 证件号码(前6位)
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersIDNumber", ownerInfo.getIdentifyNumber()));
+            //车主 年龄
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersAge", ownerInfo.getAge()));
+            //车主 性别
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersSex", ownerInfo.getGender().equals("男") ? "1" : "2"));
+        }
         //车主 姓名
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnerName", ownerInfo.getName()));
 
         CustomerInfoVo policyHolderInfo = insOrders.getApplyinfo().toJavaObject(CustomerInfoVo.class);
-        //投保人 证件号码(前6位)
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantIDNumber", policyHolderInfo.getIdentifyNumber()));
-        //投保人 年龄
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantAge", policyHolderInfo.getAge()));
-        //投保人 性别
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantSex", policyHolderInfo.getGender().equals("男") ? "1" : "2"));
+        if(StringUtils.isBlank(policyHolderInfo.getProperty()) || !"0".equals(policyHolderInfo.getProperty())) {
+            //投保人 证件号码(前6位)
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantIDNumber", policyHolderInfo.getIdentifyNumber()));
+            //投保人 年龄
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantAge", policyHolderInfo.getAge()));
+            //投保人 性别
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantSex", policyHolderInfo.getGender().equals("男") ? "1" : "2"));
+        }
 
         CustomerInfoVo insuredPersonInfo = insOrders.getInsureinfo().toJavaObject(CustomerInfoVo.class);
-        //被保人 证件号码(前6位)
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredIDNumber", insuredPersonInfo.getIdentifyNumber()));
-        //被保人 年龄
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredAge", insuredPersonInfo.getAge()));
-        //被保人 性别
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredSex", insuredPersonInfo.getGender().equals("男") ? "1" : "2"));
-
+        if(StringUtils.isBlank(insuredPersonInfo.getProperty()) || !"0".equals(insuredPersonInfo.getProperty())) {
+            //被保人 证件号码(前6位)
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredIDNumber", insuredPersonInfo.getIdentifyNumber()));
+            //被保人 年龄
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredAge", insuredPersonInfo.getAge()));
+            //被保人 性别
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredSex", insuredPersonInfo.getGender().equals("男") ? "1" : "2"));
+        }
         String OPIConsistent = "0";
-        //车主 投被保人是否一致
-        if ((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
-                (ownerInfo.getIdentifyNumber().equals(insuredPersonInfo.getIdentifyNumber()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber()))) {
-            OPIConsistent = "1";
+        if(StringUtils.isNotBlank(ownerInfo.getProperty())){
+            boolean boo = ownerInfo.getProperty().equals(insuredPersonInfo.getProperty()) && insuredPersonInfo.getProperty().equals(policyHolderInfo.getProperty());
+            if(boo){
+                if("0".equals(ownerInfo.getProperty())){
+                    if((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
+                            (ownerInfo.getOrganizationCode().equals(insuredPersonInfo.getOrganizationCode()) && insuredPersonInfo.getOrganizationCode().equals(policyHolderInfo.getOrganizationCode()))){
+                        OPIConsistent = "1";
+                    }
+                }else{
+                    if((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
+                            (ownerInfo.getIdentifyNumber().equals(insuredPersonInfo.getIdentifyNumber()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber()))){
+                        OPIConsistent = "1";
+                    }
+                }
+            }
+        }else {
+            if ((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
+                    (ownerInfo.getIdentifyNumber().equals(insuredPersonInfo.getIdentifyNumber()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber()))) {
+                OPIConsistent = "1";
+            }
         }
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("OPIConsistent", OPIConsistent));
-
+        ruleAttrMappingVoList.add(new RuleAttrMappingVo("OPIConsistent",OPIConsistent));
         String PIConsistent = "0";
-        //投被保人是否一致
-        if (insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber())) {
-            PIConsistent = "1";
-        }
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("PIConsistent", PIConsistent));
+
+        if(StringUtils.isNotBlank(insuredPersonInfo.getProperty())){
+            boolean boo = insuredPersonInfo.getProperty().equals(policyHolderInfo.getProperty());
+            if(boo){
+                if("0".equals(insuredPersonInfo.getProperty())){
+                    //投被保人是否一致
+                    if(insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getOrganizationCode().equals(policyHolderInfo.getOrganizationCode())){
+                        PIConsistent = "1";
+                    }
+                }else{
+                    //投被保人是否一致
+                    if(insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber())){
+                        PIConsistent = "1";
+                    }
+                }
+            }
+        }else{
+            //投被保人是否一致
+            if(insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber())){
+                PIConsistent = "1";
+            }
+       }
+        ruleAttrMappingVoList.add(new RuleAttrMappingVo("PIConsistent",PIConsistent));
 
         //2024-06-20 起保日期 月份判断
         if (insAreaCompany.getJqStartDate() != null && !insAreaCompany.getJqStartDate().equals("")) {

+ 49 - 12
src/main/java/com/ydtech/modules/fnc/entity/InsPlyIncome.java

@@ -9,6 +9,7 @@ import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.format.DateTimeFormatter;
 
+import com.ydtech.utils.StringUtils;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
@@ -545,12 +546,30 @@ public class InsPlyIncome implements Serializable {
         this.insuredName = insuredName;
         this.policyno  = policyno;
         this.syPolicyno = syPolicyno;
-        this.jqPremium = new BigDecimal(jqPremium);
-        this.syPremium = new BigDecimal(syPremium);
-        this.taxamount = new BigDecimal(taxamount);
-        this.jqSuperviseCostsProportion = new BigDecimal(jqSuperviseCostsProportion);
-        this.sySuperviseCostsProportion = new BigDecimal(sySuperviseCostsProportion);
-        this.commissionFeevalue =  new BigDecimal(commissionFeevalue);;
+        if(StringUtils.isNotEmpty(jqPremium)){
+            this.jqPremium = new BigDecimal(jqPremium);
+        }
+        if(StringUtils.isNotEmpty(syPremium)){
+            this.syPremium = new BigDecimal(syPremium);
+        }
+
+        if(StringUtils.isNotEmpty(taxamount)){
+            this.taxamount = new BigDecimal(taxamount);
+        }
+
+        if(StringUtils.isNotEmpty(jqSuperviseCostsProportion)){
+            this.jqSuperviseCostsProportion = new BigDecimal(jqSuperviseCostsProportion);
+        }
+
+        if(StringUtils.isNotEmpty(sySuperviseCostsProportion)){
+            this.sySuperviseCostsProportion = new BigDecimal(sySuperviseCostsProportion);
+        }
+
+
+        if(StringUtils.isNotEmpty(commissionFeevalue)){
+            this.commissionFeevalue =  new BigDecimal(commissionFeevalue);
+        }
+
         this.addType  = addType;
         this.createTime = LocalDateTime.now();
         this.handlingFeesStatus = "0";
@@ -579,12 +598,30 @@ public class InsPlyIncome implements Serializable {
         this.insuredName = insuredName;
         this.policyno  = policyno;
         this.syPolicyno = syPolicyno;
-        this.jqPremium = new BigDecimal(jqPremium);
-        this.syPremium = new BigDecimal(syPremium);
-        this.taxamount = new BigDecimal(taxamount);
-        this.jqOtherCostsProportion = new BigDecimal(jqOtherCostsProportion);
-        this.syOtherCostsProportion = new BigDecimal(syOtherCostsProportion);
-        this.otherFeevalue =  new BigDecimal(otherFeevalue);;
+        if(StringUtils.isNotEmpty(jqPremium)){
+            this.jqPremium = new BigDecimal(jqPremium);
+        }
+
+        if(StringUtils.isNotEmpty(syPremium)){
+            this.syPremium = new BigDecimal(syPremium);
+        }
+
+        if(StringUtils.isNotEmpty(taxamount)){
+            this.taxamount = new BigDecimal(taxamount);
+        }
+
+        if(StringUtils.isNotEmpty(jqOtherCostsProportion)){
+            this.jqOtherCostsProportion = new BigDecimal(jqOtherCostsProportion);
+        }
+
+        if(StringUtils.isNotEmpty(syOtherCostsProportion)){
+            this.syOtherCostsProportion = new BigDecimal(syOtherCostsProportion);
+        }
+
+        if(StringUtils.isNotEmpty(otherFeevalue)){
+            this.otherFeevalue =  new BigDecimal(otherFeevalue);
+        }
+
         this.addType  = addType;
         this.createTime = LocalDateTime.now();
         this.handlingFeesStatus = "0";

+ 2 - 4
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -80,10 +80,7 @@ import java.math.RoundingMode;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.YearMonth;
+import java.time.*;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.function.BinaryOperator;
@@ -3952,6 +3949,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
                 }
             }
         }else if("2".equals(type)){
+
             int index=1;
             //车险跟单
             if(cxgdList!=null && cxgdList.size()>0){

+ 2 - 2
src/main/java/com/ydtech/modules/ins/model/vo/CustomerInfoVo.java

@@ -23,8 +23,8 @@ import javax.validation.constraints.NotNull;
 @NoArgsConstructor
 @AllArgsConstructor
 @ApiModel(value = "人员信息")
-@CodeNotNull()
-@CheckIdentifyNumberClass()
+@CodeNotNull
+@CheckIdentifyNumberClass
 public class CustomerInfoVo {
 
     @NotNull(message = "车主、投保人、被保人姓名不能为空")

+ 1 - 1
src/main/java/com/ydtech/modules/ins/model/vo/QuoteRespVo.java

@@ -129,7 +129,7 @@ public class QuoteRespVo {
     private double syLossRation;
 
     @ApiModelProperty("阳光 交商含增值服务合并经营成本率")
-    private double mergeCostRate;
+    private String mergeCostRate;
 
     @ApiModelProperty("核心返回车型")
     private CoreModelsVo coreModels;

+ 28 - 8
src/main/java/com/ydtech/modules/ins/model/yc/audit/Audit.java

@@ -10,6 +10,7 @@ import com.ydtech.modules.ins.model.yc.YcConfigureParameters;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsOrders;
 import com.ydtech.utils.IDCardUtils;
+import com.ydtech.utils.StringUtils;
 import lombok.Data;
 
 import javax.validation.Valid;
@@ -260,12 +261,21 @@ public class Audit {
         customer.setOwnerAddress(ownerInfo.getAddr());
         customer.setAppcIncome("0");
         customer.setInsuredcIncome("0");
-        customer.setBenefitCustType("1");
-        customer.setBenefitCertiType("120001");
-        customer.setBenefitCertiCode(insureInfo.getIdentifyNumber());
-        customer.setBenefitAge(IDCardUtils.GetBirthday(insureInfo.getIdentifyNumber()));
-        customer.setBenefitSex(IDCardUtils.GetYcSex(insureInfo.getIdentifyNumber()));
-        customer.setBenefitName(insureInfo.getName());
+        String property1 = insureInfo.getProperty();
+        if (StringUtils.isNotEmpty(property1) && "0".equals(property1)) {
+            customer.setBenefitCustType("0");
+            customer.setBenefitCertiType("110004");
+            customer.setBenefitCertiCode(insureInfo.getOrganizationCode());
+            customer.setBenefitName(insureInfo.getName());
+        }else {
+
+            customer.setBenefitCustType("1");
+            customer.setBenefitCertiType("120001");
+            customer.setBenefitCertiCode(insureInfo.getIdentifyNumber());
+            customer.setBenefitAge(IDCardUtils.GetBirthday(insureInfo.getIdentifyNumber()));
+            customer.setBenefitSex(IDCardUtils.GetYcSex(insureInfo.getIdentifyNumber()));
+            customer.setBenefitName(insureInfo.getName());
+        }
         customer.setBnfctcertfclsvalidate(YcBuildData.ID_CARD_INDATE);
 //        customer.setCProvince(Province.buildProvince(insureInfo.getAddr()));
 //        customer.setCCity(City.buildCity(insureInfo.getAddr()));
@@ -274,10 +284,20 @@ public class Audit {
 
         //<taxATion>
         TaxATion taxATion = new TaxATion();
-        taxATion.setCTaxType("338001");
+        //0:法人 1个人
+        String property = applyInfo.getProperty();
+        if (StringUtils.isNotEmpty(property) && "0".equals(property)) {
+            taxATion.setCTaxType("338003");
+            taxATion.setTaxpayerComid(applyInfo.getOrganizationCode());
+        }else {
+            taxATion.setCTaxType("338001");
+            taxATion.setTaxpayerComid(applyInfo.getIdentifyNumber());
+        }
+        //ceshi
+//        taxATion.setCTaxType("338001");
 //        taxATion.setClntMark("1");
         taxATion.setClntMark("3");
-        taxATion.setTaxpayerComid(applyInfo.getIdentifyNumber());
+//        taxATion.setTaxpayerComid(applyInfo.getIdentifyNumber());
         taxATion.setTaxName(applyInfo.getName());
         taxATion.setClntAddress(applyInfo.getAddr());
         taxATion.setMobile(applyInfo.getMobile());

+ 5 - 2
src/main/java/com/ydtech/modules/ins/model/yc/ruote/Applicant.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.ins.model.yc.ruote;
 
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.ydtech.exception.SystemException;
 import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
 import com.ydtech.modules.ins.model.yc.YcConfigureParameters;
 import com.ydtech.utils.IDCardUtils;
@@ -245,13 +246,15 @@ public class Applicant {
             //投保人证件号
             applicant.setCCertfCde(policyHolderInfo.getOrganizationCode());
             applicant.setCClntAddr(policyHolderInfo.getAddr());
-
+            if (StringUtils.isEmpty(ownerInfo.getProvince()) || StringUtils.isEmpty(ownerInfo.getCity()) || StringUtils.isEmpty(ownerInfo.getCounty())) {
+                throw new SystemException("企业车省市区必填");
+            }
             applicant.setCProvince(policyHolderInfo.getProvince());
             applicant.setCCity(policyHolderInfo.getCity());
             applicant.setCCounty(policyHolderInfo.getCounty());
             //行业
             applicant.setCTrdCde("201799");
-            applicant.setCOccupation(policyHolderInfo.getScope());
+//            applicant.setCOccupation(policyHolderInfo.getScope());
             applicant.setNResvNum3(policyHolderInfo.getRegisteredCapital());
             applicant.setNResvNum3Cur("01");
             applicant.setCWorkDpt("900");

+ 9 - 2
src/main/java/com/ydtech/modules/ins/model/yc/ruote/Insured.java

@@ -1,8 +1,10 @@
 package com.ydtech.modules.ins.model.yc.ruote;
 
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.ydtech.exception.SystemException;
 import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
 import com.ydtech.utils.IDCardUtils;
+import com.ydtech.utils.StringUtils;
 import lombok.Data;
 
 
@@ -267,19 +269,24 @@ public class Insured {
         if ("0".equals(property)) {
             insured.setCCertfCls("110004");
             insured.setCCertfCde(insuredPersonInfo.getOrganizationCode());
+            if (StringUtils.isEmpty(ownerInfo.getProvince()) || StringUtils.isEmpty(ownerInfo.getCity()) || StringUtils.isEmpty(ownerInfo.getCounty())) {
+                throw new SystemException("企业车省市区必填");
+            }
             insured.setCProvince(insuredPersonInfo.getProvince());
             insured.setCCity(insuredPersonInfo.getCity());
             insured.setCCounty(insuredPersonInfo.getCounty());
             //经营范围
-            insured.setCWorkCtt(insuredPersonInfo.getScope());
+//            insured.setCWorkCtt(insuredPersonInfo.getScope());
             insured.setNResvNum3(insuredPersonInfo.getRegisteredCapital());
             insured.setNResvNum3Cur("01");
+            insured.setCCntrNme(insuredPersonInfo.getLegalPerson());
             insured.setCClntMrk("0");
         } else {
             insured.setCCertfCls("120001");
             insured.setCCertfCde(insuredPersonInfo.getIdentifyNumber());
             insured.setTBirthday(IDCardUtils.GetBirthday(insuredPersonInfo.getIdentifyNumber()));
             insured.setCSex(IDCardUtils.GetYcSex(insuredPersonInfo.getIdentifyNumber()));
+            insured.setCCntrNme(insuredPersonInfo.getName());
             insured.setCClntMrk("1");
         }
 
@@ -292,7 +299,7 @@ public class Insured {
         insured.setCAreaCde("103132");
 
         insured.setTCertfClsValiDate(insuredPersonInfo.getIdentifyValidEndDate());
-        insured.setCCntrNme(insuredPersonInfo.getName());
+//        insured.setCCntrNme(insuredPersonInfo.getName());
         insured.setCRelCdes(ownerInfo.getName().equals(insuredPersonInfo.getName()) ? "601005" : "601008");
 
 

+ 15 - 3
src/main/java/com/ydtech/modules/ins/model/yc/ruote/Tax.java

@@ -139,16 +139,28 @@ public class Tax {
         tax.setTaxPayerName(policyHolderInfo.getName());
         //补交上年
         tax.setPayLastYear("0");
-        tax.setIdType("120001");
+        //0:法人 1:个人(中国籍) 2: 个人(非中国籍)
+        String property = policyHolderInfo.getProperty();
+        if (property.equals("0")) {
+            tax.setIdType("110004");
+            tax.setTaxpayerType("338003");
+            tax.setTaxpayerNO(policyHolderInfo.getOrganizationCode());
+        }else {
+            tax.setIdType("120001");
+            tax.setTaxpayerType("338001");
+            //纳税人识别号 =  投保人身份证号
+            tax.setTaxpayerNO(policyHolderInfo.getIdentifyNumber());
+        }
+//        tax.setIdType("120001");
         tax.setCalculatedType("349003001");
         tax.setVehecleTypeDetail("3490010013");
         tax.setTaxpayerAddress(policyHolderInfo.getAddr());
         tax.setVehicleQuality(extracted(carInfo.getCompleteKerbMass()));
         //纳税人识别号 =  投保人身份证号
-        tax.setTaxpayerNO(policyHolderInfo.getIdentifyNumber());
+//        tax.setTaxpayerNO(policyHolderInfo.getIdentifyNumber());
 
         tax.setVehicleType("349001001");
-        tax.setTaxpayerType("338001");
+//        tax.setTaxpayerType("338001");
         tax.setConruty("156");
         tax.setTel(policyHolderInfo.getMobile());
         tax.setExhaust(carInfo.getEnginedesc());

+ 5 - 0
src/main/java/com/ydtech/modules/ins/model/yc/ruote/Vhlowner.java

@@ -1,8 +1,10 @@
 package com.ydtech.modules.ins.model.yc.ruote;
 
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.ydtech.exception.SystemException;
 import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
 import com.ydtech.utils.IDCardUtils;
+import com.ydtech.utils.StringUtils;
 import lombok.Data;
 
 
@@ -112,6 +114,9 @@ public class Vhlowner {
         if ("0".equals(property)) {
             vhlowner.setDrvOwnerCeritType("110004");
             vhlowner.setDrvOwnerCertiCode(ownerInfo.getOrganizationCode());
+            if (StringUtils.isEmpty(ownerInfo.getProvince()) || StringUtils.isEmpty(ownerInfo.getCity()) || StringUtils.isEmpty(ownerInfo.getCounty())) {
+                throw new SystemException("企业车省市区必填");
+            }
             vhlowner.setCProvince(ownerInfo.getProvince());
             vhlowner.setCCity(ownerInfo.getCity());
             vhlowner.setCCounty(ownerInfo.getCounty());

+ 9 - 2
src/main/java/com/ydtech/modules/inv/model/excel/AddTypeCXGDExcel.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.inv.model.excel;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModelProperty;
@@ -8,6 +9,7 @@ import lombok.Data;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.Date;
 
 /**
  *  @version
@@ -18,8 +20,9 @@ import java.math.BigDecimal;
 @Data
 public class AddTypeCXGDExcel implements Serializable {
 
-    @Excel(name = "签单日期",isImportField = "true")
-    private String signDate;
+
+    @Excel(name = "签单日期",isImportField = "true", databaseFormat = "yyyy/MM/dd")
+    private Date signDateNew;
 
     @Excel(name = "车牌号",isImportField = "true")
     private String licenseno;
@@ -68,4 +71,8 @@ public class AddTypeCXGDExcel implements Serializable {
     @Excel(name = "类型",isImportField = "true")
     private String addType;
 
+
+    @ExcelIgnore
+    private String signDate;
+
 }

+ 8 - 2
src/main/java/com/ydtech/modules/inv/model/excel/AddTypeCXSXFExcel.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.inv.model.excel;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModelProperty;
@@ -10,6 +11,7 @@ import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
  *  @version
@@ -21,8 +23,8 @@ import java.time.LocalDateTime;
 public class AddTypeCXSXFExcel implements Serializable {
 
 
-    @Excel(name = "签单日期",isImportField = "true")
-    private String signDate;
+    @Excel(name = "签单日期",isImportField = "true", databaseFormat = "yyyy/MM/dd")
+    private Date signDateNew;
 
     @Excel(name = "车牌号",isImportField = "true")
     private String licenseno;
@@ -71,4 +73,8 @@ public class AddTypeCXSXFExcel implements Serializable {
     @Excel(name = "类型",isImportField = "true")
     private String addType;
 
+
+    @ExcelIgnore
+    private String signDate;
+
 }

+ 6 - 1
src/main/java/com/ydtech/modules/inv/model/excel/AddTypeFCGDExcel.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.inv.model.excel;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModelProperty;
@@ -8,6 +9,7 @@ import lombok.Data;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.Date;
 
 /**
  *  @version
@@ -19,7 +21,7 @@ import java.math.BigDecimal;
 public class AddTypeFCGDExcel implements Serializable {
 
     @Excel(name = "签单日期",isImportField = "true")
-    private String signDate;
+    private Date signDateNew;
 
     @Excel(name = "车牌号",isImportField = "true")
     private String licenseno;
@@ -53,4 +55,7 @@ public class AddTypeFCGDExcel implements Serializable {
 
     @Excel(name = "类型",isImportField = "true")
     private String addType;
+
+    @ExcelIgnore
+    private String signDate;
 }

+ 5 - 1
src/main/java/com/ydtech/modules/inv/model/excel/AddTypeFCSXFExcel.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.inv.model.excel;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModelProperty;
@@ -8,6 +9,7 @@ import lombok.Data;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.Date;
 
 /**
  *  @version
@@ -19,7 +21,7 @@ import java.math.BigDecimal;
 public class AddTypeFCSXFExcel implements Serializable {
 
     @Excel(name = "签单日期",isImportField = "true")
-    private String signDate;
+    private Date signDateNew;
 
     @Excel(name = "车牌号",isImportField = "true")
     private String licenseno;
@@ -57,4 +59,6 @@ public class AddTypeFCSXFExcel implements Serializable {
     @Excel(name = "类型",isImportField = "true")
     private String addType;
 
+    @ExcelIgnore
+    private String signDate;
 }

+ 73 - 37
src/main/java/com/ydtech/modules/inv/utils/CheckInsPlyComeUtils.java

@@ -18,10 +18,9 @@ import java.math.BigDecimal;
 import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
+import java.time.*;
 import java.time.format.DateTimeFormatter;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -184,16 +183,16 @@ public class CheckInsPlyComeUtils {
 
         Map<String,Object>  map =new HashMap<String,Object>();
         String errorMsg ="";
-        if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
-            errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
+//        if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
+//            errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
+//        }
+        if(dto.getSignDateNew()==null){
+            errorMsg+="签单日期 不能为空或格式错误,格式为yyyy-MM-dd";
         }
         //签单日期转换为 yyyy-MM-dd HH:mm:ss
-        if(StringUtils.isNotEmpty(dto.getSignDate())){
-            String singTime = pareTimeLocalDate(dto.getSignDate());
-            dto.setSignDate(singTime);
+        if(dto.getSignDateNew()!=null){
+            dto.setSignDate( pareDateToLocalTime(dto.getSignDateNew()));
         }
-
-
         if(checkIsNull(dto.getLicenseno(), "车牌号")!=null){
             errorMsg+=checkIsNull(dto.getSignDate(), "车牌号")+"; ";
         }
@@ -245,18 +244,18 @@ public class CheckInsPlyComeUtils {
         if(isNumeric(dto.getJqPremium(), "交强险保费")!=null){
             errorMsg+=isNumeric(dto.getJqPremium(), "交强险保费")+"; ";
         }
-        if(isNumeric(dto.getSyPremium(), "商业险保费")!=null){
-            errorMsg+=isNumeric(dto.getSyPremium(), "商业险保费")+"; ";
-        }
+//        if(isNumeric(dto.getSyPremium(), "商业险保费")!=null){
+//            errorMsg+=isNumeric(dto.getSyPremium(), "商业险保费")+"; ";
+//        }
         if(isNumeric(dto.getTaxamount(), "车船税")!=null){
             errorMsg+=isNumeric(dto.getTaxamount(), "车船税")+"; ";
         }
         if(isNumeric(dto.getJqSuperviseCostsProportion(), "交强手续费比例")!=null){
             errorMsg+=isNumeric(dto.getJqSuperviseCostsProportion(), "交强手续费比例")+"; ";
         }
-        if(isNumeric(dto.getSySuperviseCostsProportion(), "商业手续费比例")!=null){
-            errorMsg+=isNumeric(dto.getSySuperviseCostsProportion(), "商业手续费比例")+"; ";
-        }
+//        if(isNumeric(dto.getSySuperviseCostsProportion(), "商业手续费比例")!=null){
+//            errorMsg+=isNumeric(dto.getSySuperviseCostsProportion(), "商业手续费比例")+"; ";
+//        }
         if(isNumeric(dto.getCommissionFeevalue(), "手续费金额")!=null){
             errorMsg+=isNumeric(dto.getCommissionFeevalue(), "手续费金额")+"; ";
         }
@@ -284,6 +283,17 @@ public class CheckInsPlyComeUtils {
         return map;
     }
 
+    private static String pareDateToLocalTime(Date getSignDateNew) {
+
+        Instant instant = getSignDateNew.toInstant();
+        ZoneId zoneId = ZoneId.systemDefault();
+        LocalDate localDate = instant.atZone(zoneId).toLocalDate();
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        String formattedDate = localDate.format(formatter);
+        String singTime = pareTimeLocalDate(formattedDate);
+         return  singTime;
+    }
+
     private static String pareTimeLocalDate(String signDate) {
         // 定义输入格式(仅日期)
         DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
@@ -315,13 +325,21 @@ public class CheckInsPlyComeUtils {
 
         Map<String,Object>  map =new HashMap<String,Object>();
         String errorMsg ="";
-        if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
-            errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
+//        if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
+//            errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
+//        }
+//        //签单日期转换为 yyyy-MM-dd HH:mm:ss
+//        if(StringUtils.isNotEmpty(dto.getSignDate())){
+//            String singTime = pareTimeLocalDate(dto.getSignDate());
+//            dto.setSignDate(singTime);
+//        }
+
+        if(dto.getSignDateNew()==null){
+            errorMsg+="签单日期 不能为空或格式错误,格式为yyyy-MM-dd";
         }
         //签单日期转换为 yyyy-MM-dd HH:mm:ss
-        if(StringUtils.isNotEmpty(dto.getSignDate())){
-            String singTime = pareTimeLocalDate(dto.getSignDate());
-            dto.setSignDate(singTime);
+        if(dto.getSignDateNew()!=null){
+            dto.setSignDate( pareDateToLocalTime(dto.getSignDateNew()));
         }
 
         if(checkIsNull(dto.getLicenseno(), "车牌号")!=null){
@@ -376,18 +394,18 @@ public class CheckInsPlyComeUtils {
         if(isNumeric(dto.getJqPremium(), "交强险保费")!=null){
             errorMsg+=isNumeric(dto.getJqPremium(), "交强险保费")+"; ";
         }
-        if(isNumeric(dto.getSyPremium(), "商业险保费")!=null){
-            errorMsg+=isNumeric(dto.getSyPremium(), "商业险保费")+"; ";
-        }
+//        if(isNumeric(dto.getSyPremium(), "商业险保费")!=null){
+//            errorMsg+=isNumeric(dto.getSyPremium(), "商业险保费")+"; ";
+//        }
         if(isNumeric(dto.getTaxamount(), "车船税")!=null){
             errorMsg+=isNumeric(dto.getTaxamount(), "车船税")+"; ";
         }
         if(isNumeric(dto.getJqOtherCostsProportion(), "交强跟单比例")!=null){
             errorMsg+=isNumeric(dto.getJqOtherCostsProportion(), "交强跟单比例")+"; ";
         }
-        if(isNumeric(dto.getSyOtherCostsProportion(), "商业跟单比例")!=null){
-            errorMsg+=isNumeric(dto.getSyOtherCostsProportion(), "商业跟单比例")+"; ";
-        }
+//        if(isNumeric(dto.getSyOtherCostsProportion(), "商业跟单比例")!=null){
+//            errorMsg+=isNumeric(dto.getSyOtherCostsProportion(), "商业跟单比例")+"; ";
+//        }
         if(isNumeric(dto.getOtherFeevalue(), "跟单费金额")!=null){
             errorMsg+=isNumeric(dto.getOtherFeevalue(), "跟单费金额")+"; ";
         }
@@ -422,15 +440,24 @@ public class CheckInsPlyComeUtils {
      */
     public static Map<String, Object> checkDataDto3(AddTypeFCSXFExcel dto) {
 
+
         Map<String,Object>  map =new HashMap<String,Object>();
         String errorMsg ="";
-        if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
-            errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
+//        if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
+//            errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
+//        }
+//        //签单日期转换为 yyyy-MM-dd HH:mm:ss
+//        if(StringUtils.isNotEmpty(dto.getSignDate())){
+//            String singTime = pareTimeLocalDate(dto.getSignDate());
+//            dto.setSignDate(singTime);
+//        }
+
+        if(dto.getSignDateNew()==null){
+            errorMsg+="签单日期 不能为空或格式错误,格式为yyyy-MM-dd";
         }
         //签单日期转换为 yyyy-MM-dd HH:mm:ss
-        if(StringUtils.isNotEmpty(dto.getSignDate())){
-            String singTime = pareTimeLocalDate(dto.getSignDate());
-            dto.setSignDate(singTime);
+        if(dto.getSignDateNew()!=null){
+            dto.setSignDate( pareDateToLocalTime(dto.getSignDateNew()));
         }
 
         if(checkIsNull(dto.getLicenseno(), "车牌号")!=null){
@@ -517,14 +544,23 @@ public class CheckInsPlyComeUtils {
     public static Map<String, Object> checkDataDto4(AddTypeFCGDExcel dto) {
         Map<String,Object>  map =new HashMap<String,Object>();
         String errorMsg ="";
-        if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
-            errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
+//        if(checkSignDate(dto.getSignDate(), "签单时间")!=null){
+//            errorMsg+=checkSignDate(dto.getSignDate(), "签单时间")+"; ";
+//        }
+//
+//        //签单日期转换为 yyyy-MM-dd HH:mm:ss
+//        if(StringUtils.isNotEmpty(dto.getSignDate())){
+//            String singTime = pareTimeLocalDate(dto.getSignDate());
+//            dto.setSignDate(singTime);
+//        }
+        if(dto.getSignDateNew()==null){
+            errorMsg+="签单日期 不能为空或格式错误,格式为yyyy-MM-dd";
         }
         //签单日期转换为 yyyy-MM-dd HH:mm:ss
-        if(StringUtils.isNotEmpty(dto.getSignDate())){
-            String singTime = pareTimeLocalDate(dto.getSignDate());
-            dto.setSignDate(singTime);
+        if(dto.getSignDateNew()!=null){
+            dto.setSignDate( pareDateToLocalTime(dto.getSignDateNew()));
         }
+
         if(checkIsNull(dto.getLicenseno(), "车牌号")!=null){
             errorMsg+=checkIsNull(dto.getSignDate(), "车牌号")+"; ";
         }

+ 1 - 1
src/main/java/com/ydtech/modules/order/components/chengtai/ChengTaiRequestApiComponents.java

@@ -211,7 +211,7 @@ public class ChengTaiRequestApiComponents {
      */
     private void verificationResponseCode(String responseCode, boolean flag, String responseMsg) {
         if (!flag){
-            throw new SystemException("验签失败");
+            throw new SystemException(responseMsg);
         }
         if (!ResponseCode.R_000.getCode().equals(responseCode) && !responseMsg.contains("重复投保") && !responseMsg.contains("录入的校验码有误")) {
             throw new SystemException(responseMsg);

+ 1 - 1
src/main/java/com/ydtech/modules/order/controller/YangGuangOrderApiController.java

@@ -87,7 +87,7 @@ public class YangGuangOrderApiController {
 
     @PostMapping("/autoWriteOff")
     @ApiOperation("投保单撤销")
-    public boolean autoWriteOff(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
+    public HttpResult<Object> autoWriteOff(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
         return this.yangGuangOrderApiService.autoWriteOff(companyId);
     }
 

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/InsAreaCompany.java

@@ -582,7 +582,7 @@ public class InsAreaCompany implements Serializable {
      * 交商含增值服务合并经营成本率 阳光使用
      */
     @TableField(value = "merge_cost_rate")
-    private Double mergeCostRate;
+    private String mergeCostRate;
 
     //入口总金额
     @TableField(exist = false)

+ 3 - 3
src/main/java/com/ydtech/modules/order/entity/api/chengtai/constants/ImageTypeEnum.java

@@ -19,21 +19,21 @@ public enum ImageTypeEnum {
     }),
 
     IT_2("2", "车主身份证正面",new String[]{
-            InsuranceImageEnum.C02.getCode(),
+            InsuranceImageEnum.C02.getCode(), InsuranceImageEnum.Y02.getCode()
     }),
     IT_3("3", "车主身份证反面",new String[]{
             InsuranceImageEnum.D02.getCode(),
     }),
 
     IT_4("4", "投保人身份证正面",new String[]{
-            InsuranceImageEnum.C03.getCode(),
+            InsuranceImageEnum.C03.getCode(), InsuranceImageEnum.Y03.getCode()
     }),
     IT_5("5", "投保人身份证反面",new String[]{
             InsuranceImageEnum.D03.getCode(),
     }),
 
     IT_6("6", "被保人身份证正面",new String[]{
-            InsuranceImageEnum.C04.getCode(),
+            InsuranceImageEnum.C04.getCode(), InsuranceImageEnum.Y04.getCode()
     }),
     IT_7("7", "被保人身份证反面",new String[]{
             InsuranceImageEnum.D04.getCode(),

+ 10 - 4
src/main/java/com/ydtech/modules/order/entity/api/chengtai/request/InsurePremiumRequest.java

@@ -659,8 +659,8 @@ public class InsurePremiumRequest extends ChengTaiBaseRequest{
                 this.longTerm = "0";
             }else{
                 this.type = "2"; // 机构
-                this.identifyTypeCode = "3";
-                this.identifyTypeName = "营业执照";
+                this.identifyTypeCode = "4";
+                this.identifyTypeName = "统一社会信用代码";
                 this.identifyNumber = ownerInfo.getOrganizationCode();
             }
             this.isTerror = "0";
@@ -826,6 +826,7 @@ public class InsurePremiumRequest extends ChengTaiBaseRequest{
 
             public TaxDTO(BaseQuoteInfoVo quoteInfoVo){
 
+                CustomerInfoVo ownerInfo = quoteInfoVo.getOwnerInfo();
                 VehicleAndVesselTax vehicleAndVesselTax = quoteInfoVo.getVehicleAndVesselTax();
                 TaxConditionCodeEnum taxConditionCodeEnum = Enum.valueOf(TaxConditionCodeEnum.class, "T_" + vehicleAndVesselTax.getTaxRelifFlag());
                 this.taxConditionCode = taxConditionCodeEnum.getCode();
@@ -837,8 +838,13 @@ public class InsurePremiumRequest extends ChengTaiBaseRequest{
                     }
                 }
                 this.calculateMode = "1";
-                this.taxPayerIdentityNo = vehicleAndVesselTax.getIdentifyNumber();
-                this.taxPayerIdentificationCode = vehicleAndVesselTax.getIdentifyNumber();
+                if(StringUtils.isBlank(ownerInfo.getProperty()) || !"0".equals(ownerInfo.getProperty())){
+                    this.taxPayerIdentityNo = vehicleAndVesselTax.getIdentifyNumber();
+                    this.taxPayerIdentificationCode = vehicleAndVesselTax.getIdentifyNumber();
+                }else{
+                    this.taxPayerIdentityNo = vehicleAndVesselTax.getOrganizationCode();
+                    this.taxPayerIdentificationCode = vehicleAndVesselTax.getOrganizationCode();
+                }
                 this.taxPayerName = vehicleAndVesselTax.getTaxpayerName();
                 Calendar calendar = Calendar.getInstance();
                 int year = calendar.get(Calendar.YEAR);

+ 2 - 2
src/main/java/com/ydtech/modules/order/entity/api/chengtai/request/SubmitVerifyRequest.java

@@ -100,7 +100,7 @@ public class SubmitVerifyRequest extends ChengTaiBaseRequest{
             CustomerInfoVo applyInfo = JSON.toJavaObject(insOrders.getApplyinfo(),CustomerInfoVo.class);
             if("0".equals(applyInfo.getProperty())){
                 this.type = "2";
-                this.identifyTypeCode = "1";
+                this.identifyTypeCode = "4";
                 this.identifyNumber = applyInfo.getOrganizationCode();
                 this.organizationCode = applyInfo.getOrganizationCode();
                 this.tel = applyInfo.getMobile();
@@ -177,7 +177,7 @@ public class SubmitVerifyRequest extends ChengTaiBaseRequest{
             CustomerInfoVo insureInfo = JSON.toJavaObject(insOrders.getInsureinfo(),CustomerInfoVo.class);
             if("0".equals(insureInfo.getProperty())){
                 this.type = "2";
-                this.identifyTypeCode = "1";
+                this.identifyTypeCode = "4";
                 this.identifyNumber = insureInfo.getOrganizationCode();
                 this.organizationCode = insureInfo.getOrganizationCode();
                 this.tel = insureInfo.getMobile();

+ 17 - 9
src/main/java/com/ydtech/modules/order/entity/api/chengtai/request/UploadFileRequest.java

@@ -46,20 +46,28 @@ public class UploadFileRequest extends ChengTaiBaseRequest{
             if(contains){
                 this.imageType = imageTypeEnum.getCode();
                 this.fileList = Arrays.asList(new FileListDTO(insTaskImagesBase64, imageTypeEnum));
-                if(InsuranceImageEnum.C01.getCode().equals(this.imageType)
-                        || InsuranceImageEnum.D01.getCode().equals(this.imageType)
-                        || InsuranceImageEnum.C02.getCode().equals(this.imageType)
-                        || InsuranceImageEnum.D02.getCode().equals(this.imageType)
-                ){
+                if(InsuranceImageEnum.C01.getCode().equals(this.imageType)){
                     this.imageObjType = "1";
-                }else if(InsuranceImageEnum.C03.getCode().equals(this.imageType)
-                        || InsuranceImageEnum.D03.getCode().equals(this.imageType)
+                }else if(InsuranceImageEnum.D01.getCode().equals(this.imageType)){
+                    this.imageObjType = "11";
+                }else if(InsuranceImageEnum.C02.getCode().equals(this.imageType)
+                    || InsuranceImageEnum.Y02.getCode().equals(this.imageType)
                 ){
                     this.imageObjType = "2";
+                } else if(InsuranceImageEnum.D02.getCode().equals(this.imageType)){
+                    this.imageObjType = "3";
+                } else if(InsuranceImageEnum.C03.getCode().equals(this.imageType)
+                        || InsuranceImageEnum.Y03.getCode().equals(this.imageType)
+                ){
+                    this.imageObjType = "4";
+                } else if(InsuranceImageEnum.D03.getCode().equals(this.imageType)){
+                    this.imageObjType = "5";
                 } else if(InsuranceImageEnum.C04.getCode().equals(this.imageType)
-                        || InsuranceImageEnum.D04.getCode().equals(this.imageType)
+                        || InsuranceImageEnum.Y04.getCode().equals(this.imageType)
                 ){
-                    this.imageObjType = "3";
+                    this.imageObjType = "6";
+                } else if(InsuranceImageEnum.D04.getCode().equals(this.imageType)){
+                    this.imageObjType = "7";
                 }
                 break;
             }

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/KindListEnum.java

@@ -11,7 +11,7 @@ public enum KindListEnum {
     KIND_LIST_20B("20B", "商业第三者责任险","主险。固定值:5万/10万/15万/20万/30万/50万/100万/150万/200万/300万/500万"),
     KIND_LIST_20C1("20C1", "司机座位责任险","主险。总保额=单位保额数"),
     KIND_LIST_20C2("20C2", "乘客座位责任险","主险。总保额=单位保额数*座位数"),
-    KIND_LIST_20F6("20FD", "车损险事故免赔率特约条款 (2020条款)","附加险,绝对免赔率在5%、10%、15%、20%,(主险:20A);传值:0.05,0.1,0.15,0.2"),
+    KIND_LIST_20FD("20FD", "车损险事故免赔率特约条款 (2020条款)","附加险,绝对免赔率在5%、10%、15%、20%,(主险:20A);传值:0.05,0.1,0.15,0.2"),
     KIND_LIST_20FE("20FE", "三者险事故免赔率特约条款 (2020条款)","附加险,绝对免赔率在5%、10%、15%、20%(主险:20B);传值:0.05,0.1,0.15,0.2"),
     KIND_LIST_20FF("20FF", "司机车上人员事故免赔率特约条款 (2020条款)","附加险,绝对免赔率在5%、10%、15%、20%(主险:20C1);传值:0.05,0.1,0.15,0.2"),
     KIND_LIST_20FG("20FG", "乘客车上人员事故免赔率特约条款 (2020条款)","附加险,绝对免赔率在5%、10%、15%、20%(主险:20C1);传值:0.05,0.1,0.15,0.2"),

+ 4 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangSubmitRequest.java

@@ -243,12 +243,15 @@ public class YangGuangSubmitRequest extends YangGuangBaseRequest{
          public CustomerList(InsOrders insOrders,boolean flag) {
             String addrapply= insOrders.getApplyinfo().getString("addr");
             String addrinsurer = insOrders.getInsureinfo().getString("addr");
+            String codeapply = insOrders.getApplyinfo().getString("organizationCode");
+            String codeinsurer = insOrders.getInsureinfo().getString("organizationCode");
              if (flag) {
                     this.customerFlag = "1";
                     this.Taxpayertype = "2";
                     this.Vatinvoiceflag = "0";
                     this.Revenueaddress = addrapply;
                     this.InsuredFlag = "2";
+                    this.Taxpayernumber = codeapply;
              }
              if (!flag) {
                     this.customerFlag = "0";
@@ -256,6 +259,7 @@ public class YangGuangSubmitRequest extends YangGuangBaseRequest{
                     this.Vatinvoiceflag = "0";
                     this.Revenueaddress = addrinsurer;
                     this.InsuredFlag = "1";
+                    this.Taxpayernumber = codeinsurer;
              }
         }
         public static List<YangGuangSubmitRequest.CustomerList> toCustomerList(InsOrders insOrders) {

+ 17 - 17
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangBaseResponse.java

@@ -20,21 +20,21 @@ public class YangGuangBaseResponse {
     @JsonProperty("ResponseDate")
     private String ResponseDate;
 
-    public String message(String ErrorMessage) {
-        try {
-            ObjectMapper objectMapper = new ObjectMapper();
-            JsonNode rootNode = objectMapper.readTree(ErrorMessage);
-            JsonNode hintNode = rootNode.get("hint");
-            if (hintNode != null) {
-                JsonNode systemMsgNode = hintNode.get("systemMsg");
-                if (systemMsgNode.isArray() && systemMsgNode.size() > 0) {
-                    JsonNode firstSystemMsg = systemMsgNode.get(0);
-                    return firstSystemMsg.get("info").asText();
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
+//    public String message(String ErrorMessage) {
+//        try {
+//            ObjectMapper objectMapper = new ObjectMapper();
+//            JsonNode rootNode = objectMapper.readTree(ErrorMessage);
+//            JsonNode hintNode = rootNode.get("hint");
+//            if (hintNode != null) {
+//                JsonNode systemMsgNode = hintNode.get("systemMsg");
+//                if (systemMsgNode.isArray() && systemMsgNode.size() > 0) {
+//                    JsonNode firstSystemMsg = systemMsgNode.get(0);
+//                    return firstSystemMsg.get("info").asText();
+//                }
+//            }
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//        return null;
+//    }
 }

+ 4 - 6
src/main/java/com/ydtech/modules/order/entity/vo/InsOrdersEditingVo.java

@@ -217,9 +217,6 @@ public class InsOrdersEditingVo extends InsOrders implements Serializable {
         @ApiModelProperty("商业赔付率")
         private double syLossRation;
 
-        @ApiModelProperty("交商合并经营成本率")
-        private double mergeCostRate;
-
 
         /**
          * 紫金能源车(鼎然-车辆风险评分  add by hxl 2024-04-09
@@ -227,6 +224,9 @@ public class InsOrdersEditingVo extends InsOrders implements Serializable {
         @TableField(value = "紫金能源车(鼎然-车辆风险评分)")
         private String ubiPredictedInfoScore;
 
+        @ApiModelProperty("交商合并经营成本率")
+        private String mergeCostRate;
+
         @ApiModelProperty("交强出口费用")
         private BigDecimal jqExportFee;
 
@@ -317,15 +317,13 @@ public class InsOrdersEditingVo extends InsOrders implements Serializable {
             this.jqLossRation = insAreaCompany.getJqLossRation();
             this.syLossRation = insAreaCompany.getSyLossRation();
             this.ubiPredictedInfoScore = insAreaCompany.getUbiPredictedInfoScore();
+            this.mergeCostRate = insAreaCompany.getMergeCostRate();
             this.feeMatchErrMsg = insAreaCompany.getFeeMatchErrMsg();
             this.quoteErrMsg = insAreaCompany.getQuoteErrMsg();
             this.orderStatusInfo = InsOrderStatusEnum.matchKey(insAreaCompany.getOrderstatus()).getDesc();
             if(!Objects.isNull(insAreaCompany.getApiType())) {
                 this.apiType = insAreaCompany.getApiType().toString();
             }
-            if (insAreaCompany.getMergeCostRate() != null) {
-                this.mergeCostRate = insAreaCompany.getMergeCostRate();
-            }
         }
     }
 

+ 3 - 0
src/main/java/com/ydtech/modules/order/entity/vo/OrderVo.java

@@ -393,6 +393,9 @@ public class OrderVo implements Serializable {
     @TableField(value = "ubi_predicted_info_score")
     private String ubiPredictedInfoScore;
 
+    @TableField(value = "merge_cost_rate")
+    private String mergeCostRate;
+
 
     /**
      * 推荐人工号

+ 3 - 0
src/main/java/com/ydtech/modules/order/entity/vo/VehicleAndVesselTax.java

@@ -48,4 +48,7 @@ public class VehicleAndVesselTax implements Serializable {
     @ApiModelProperty("车船税标志 1-正常交税; 2-免税; 3-减税; 4-完税")
     private String taxRelifFlag;
 
+    @ApiModelProperty("组织机构代码")
+    private String organizationCode;
+
 }

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/vo/ya/YaExtendInfoDto.java

@@ -84,7 +84,7 @@ public class YaExtendInfoDto implements Serializable {
     private String syClaims;
 
     @ApiModelProperty("交商合并经营成本率")
-    private Double mergeCostRate;
+    private String mergeCostRate;
 
     /**
      * 临时增加

+ 3 - 1
src/main/java/com/ydtech/modules/order/service/YangGuangOrderApiService.java

@@ -60,7 +60,9 @@ public interface YangGuangOrderApiService {
     /**
      *  投保单撤销
      */
-    boolean autoWriteOff(String companyId) throws Exception;
+    HttpResult<Object> autoWriteOff(String companyId) throws Exception;
+
+    boolean autoWriteOffOrder(String companyId) throws Exception;
 
     /**
      * 获取保单信息

+ 6 - 1
src/main/java/com/ydtech/modules/order/service/impl/ChengTaiOrderApiServiceImpl.java

@@ -697,7 +697,12 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
                 insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
                 return HttpResult.ok("核保成功");
             }else{
-                throw new SystemException(underwritingResponse.getData().get(0).getReasondescription());
+                if(CollUtil.isNotEmpty(underwritingResponse.getData())){
+                    throw new SystemException(underwritingResponse.getData().get(0).getReasondescription());
+                }else{
+                    throw new SystemException("核保异常!");
+                }
+
             }
         }catch (SystemException systemException){
             // 查询核保结果

+ 1 - 1
src/main/java/com/ydtech/modules/order/service/impl/InsuranceCompanyPolymerizationServiceImpl.java

@@ -70,7 +70,7 @@ public class InsuranceCompanyPolymerizationServiceImpl implements InsuranceCompa
             return zhongMeiOrderApiService.cancelOrder(insAreaCompany);
         }
         else if (InsuranceEnum.YGBX.getCode().equals(code)) {
-            return yangGuangOrderApiService.autoWriteOff(companyId);
+            return yangGuangOrderApiService.autoWriteOffOrder(companyId);
         }
         return false;
     }

+ 50 - 5
src/main/java/com/ydtech/modules/order/service/impl/YangGuangOrderApiServiceImpl.java

@@ -127,6 +127,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
         // 如果险种为单商或交商 需要报两次价 将第一次报出的车实际价值取到
         //报价
         InsOrders insOrders = insOrdersService.getById(quoteInfoVo.getOrderNo());
+        quoteInfoVo.setProductId(insOrders.getProductid());
 
         YangGuangAccuracyCalculateRequest yangGuangAccuracyCalculateRequest = new YangGuangAccuracyCalculateRequest(quoteInfoVo, purchasePrice, carModelList1, riskList.get(0),startDate,ygConfigureParameters,quoteVo);
         yangGuangAccuracyCalculateRequest.setInfotransNo(yangGuangQueryVehicleModelResponse.getInfotransNo());
@@ -301,7 +302,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
         YangGuangSubmitRequest yangGuangSubmitRequest = new YangGuangSubmitRequest(insOrders, insAreaCompany, productid, ygConfigureParameters);
         YangGuangSubmitResponse yangGuangSubmitResponse = yangGuangRequestApiComponents.submit(yangGuangSubmitRequest);
         if (!yangGuangSubmitResponse.getErrorCode().equals("0")) {
-            return HttpResult.error(yangGuangSubmitResponse.message(yangGuangSubmitResponse.getErrorMessage()));
+            return HttpResult.error(yangGuangSubmitResponse.getErrorMessage());
         }
         if (yangGuangSubmitResponse.getCiProposalNo() != null) {
             insAreaCompany.setJqapplyno(yangGuangSubmitResponse.getCiProposalNo());
@@ -656,7 +657,50 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
 
 
     @Override
-    public boolean autoWriteOff(String companyId) throws Exception {
+    public HttpResult<Object> autoWriteOff(String companyId) throws Exception {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+        YangGuangConfigureParameters ygConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+                insAreaCompany.getAgreementId());
+        String productid = insAreaCompany.getProductid();
+        //单交
+        if (productid.equals("0330")) {
+            YangGuangAutoWriteOffRequest yangGuangAutoWriteOffRequest = new YangGuangAutoWriteOffRequest(ygConfigureParameters, insAreaCompany.getJqapplyno());
+            YangGuangAutoWriteOffResponse yangGuangAutoWriteOffResponse = yangGuangRequestApiComponents.autoWriteOff(yangGuangAutoWriteOffRequest);
+            if (yangGuangAutoWriteOffResponse.getErrorCode().equals("0")) {
+                insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
+                insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+                return HttpResult.ok("撤单成功");
+            }
+        }
+        // 单商
+        if (productid.equals("034001")) {
+            YangGuangAutoWriteOffRequest yangGuangAutoWriteOffRequest = new YangGuangAutoWriteOffRequest(ygConfigureParameters, insAreaCompany.getSyapplyno());
+            YangGuangAutoWriteOffResponse yangGuangAutoWriteOffResponse = yangGuangRequestApiComponents.autoWriteOff(yangGuangAutoWriteOffRequest);
+            if (yangGuangAutoWriteOffResponse.getErrorCode().equals("0")) {
+                insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
+                insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+                return HttpResult.ok("撤单成功");
+            }
+        }
+            //交商同保
+        if (insAreaCompany.getJqpolicyno() != null && insAreaCompany.getSypolicyno() != null && !insAreaCompany.getJqpolicyno().equals("") && !insAreaCompany.getSypolicyno().equals("")) {
+            YangGuangAutoWriteOffRequest yangGuangAutoWriteOffRequestJq = new YangGuangAutoWriteOffRequest(ygConfigureParameters, insAreaCompany.getJqapplyno());
+            YangGuangAutoWriteOffResponse yangGuangAutoWriteOffResponseJq = yangGuangRequestApiComponents.autoWriteOff(yangGuangAutoWriteOffRequestJq);
+            YangGuangAutoWriteOffRequest yangGuangAutoWriteOffRequestSy = new YangGuangAutoWriteOffRequest(ygConfigureParameters, insAreaCompany.getSyapplyno());
+            YangGuangAutoWriteOffResponse yangGuangAutoWriteOffResponseSy = yangGuangRequestApiComponents.autoWriteOff(yangGuangAutoWriteOffRequestSy);
+            if (yangGuangAutoWriteOffResponseJq.getErrorCode().equals("0") && yangGuangAutoWriteOffResponseSy.getErrorCode().equals("0")) {
+                insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
+                insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+                return HttpResult.ok("撤单成功");
+            } else {
+                return HttpResult.error("撤单失败,原因:"+ yangGuangAutoWriteOffResponseSy.getErrorMessage() + yangGuangAutoWriteOffResponseJq.getErrorMessage());
+            }
+        }
+        return HttpResult.ok("撤单成功");
+    }
+
+    @Override
+    public boolean autoWriteOffOrder(String companyId) throws Exception {
         InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
         YangGuangConfigureParameters ygConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
                 insAreaCompany.getAgreementId());
@@ -681,7 +725,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
                 return true;
             }
         }
-            //交商同保
+        //交商同保
         if (insAreaCompany.getJqpolicyno() != null && insAreaCompany.getSypolicyno() != null && !insAreaCompany.getJqpolicyno().equals("") && !insAreaCompany.getSypolicyno().equals("")) {
             YangGuangAutoWriteOffRequest yangGuangAutoWriteOffRequestJq = new YangGuangAutoWriteOffRequest(ygConfigureParameters, insAreaCompany.getJqapplyno());
             YangGuangAutoWriteOffResponse yangGuangAutoWriteOffResponseJq = yangGuangRequestApiComponents.autoWriteOff(yangGuangAutoWriteOffRequestJq);
@@ -731,7 +775,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
             quoteRespVo.setSyScore(discount.getMarkingnobcBI() != null ? discount.getMarkingnobcBI() : "");
             quoteRespVo.setJqLossRation(Double.parseDouble(discount.getFinalmarkingnoCi() != null ? discount.getFinalmarkingnoCi() : "0.00"));
             quoteRespVo.setSyLossRation(Double.parseDouble(discount.getFinalmarkingnoBi() != null ? discount.getFinalmarkingnoBi() : "0.00"));
-            quoteRespVo.setMergeCostRate(Double.parseDouble(yangGuangAccuracyCalculateResponse.getVascostmarginbc() != null ?yangGuangAccuracyCalculateResponse.getVascostmarginbc() : "0.00"));
+            quoteRespVo.setMergeCostRate(yangGuangAccuracyCalculateResponse.getVascostmarginbc() != null ?yangGuangAccuracyCalculateResponse.getVascostmarginbc() : "0.00");
         }
 
         List<QuoteKindRespVo> kindList1 = new ArrayList<>();
@@ -786,6 +830,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
         quoteRespVo.setCiSumPermium(CalculateUtils.add(jqPremium, sumPayTax));//交强险和车船税合计
         quoteRespVo.setSumPermium(CalculateUtils.add(jqPremium, syPremium, sumPayTax, jyPremium));//保费合计
         quoteRespVo.setTotalAdjustRate(0);
+        quoteRespVo.setMergeCostRate(yangGuangAccuracyCalculateResponse.getVascostmarginbc());
         quoteRespVo.setOrderno(yaQuoteInfoVo.getOrderNo()); //订单号
         return quoteRespVo;
     }
@@ -802,7 +847,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
         insAreaCompany.setReptxt(JSON.parseObject(JSON.toJSONString(yangGuangAccuracyCalculateResponse)));
         insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
         insAreaCompany.setInsOrderNo(yangGuangAccuracyCalculateResponse.getInfotransNo());
-        insAreaCompany.setMergeCostRate(Double.parseDouble(yangGuangAccuracyCalculateResponse.getVascostmarginbc()));
+        insAreaCompany.setMergeCostRate(quoteRespVo.getMergeCostRate());
         InsOrders insOrders = insOrdersService.getById(orderId);
         //车船税
         if (!insOrders.getProductid().equals("034001") && !insOrders.getProductid().equals("034002")) {

+ 20 - 14
src/main/java/com/ydtech/modules/order/service/impl/YongchengOrderApiServiceImpl.java

@@ -293,14 +293,13 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
             }
             //被保人
             CustomerInfoVo insured = yaQuoteInfoVo.getInsuredPersonInfo();
-            if (StringUtils.isNullOrEmpty(insured.getIdentifyNumber())) {
-                throw new SystemException("被保人只能为个人信息");
-            }
-            PersonAreaVo insuredPersonAreaVo = sysAreaService.queryByAddressYc(insured.getAddr(), insured.getIdentifyNumber());
-            if (!Objects.isNull(insuredPersonAreaVo)) {
-                m.getRequestLabel().getCondition().getInsured().setCProvince(insuredPersonAreaVo.getProvinceCode());
-                m.getRequestLabel().getCondition().getInsured().setCCity(insuredPersonAreaVo.getCityCode());
-                m.getRequestLabel().getCondition().getInsured().setCCounty(insuredPersonAreaVo.getCountyCode());
+            if (!"0".equals(insured.getProperty())) {
+                PersonAreaVo insuredPersonAreaVo = sysAreaService.queryByAddressYc(insured.getAddr(), insured.getIdentifyNumber());
+                if (!Objects.isNull(insuredPersonAreaVo)) {
+                    m.getRequestLabel().getCondition().getInsured().setCProvince(insuredPersonAreaVo.getProvinceCode());
+                    m.getRequestLabel().getCondition().getInsured().setCCity(insuredPersonAreaVo.getCityCode());
+                    m.getRequestLabel().getCondition().getInsured().setCCounty(insuredPersonAreaVo.getCountyCode());
+                }
             }
 
         }
@@ -771,14 +770,21 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
         CustomerInfoVo applyInfo = order.getApplyinfo().toJavaObject(CustomerInfoVo.class);
         //组装参数
         Audit m = Audit.buildAuditParam(ownerInfo, insureInfo, applyInfo, ycConfigureParameters, iac);
+        String property = insureInfo.getProperty();
+        if (StringUtils.isNotEmpty(property) && "0".equals(property)) {
+            m.getRequestLabel().getCondition().getCustomer().setCProvince(insureInfo.getProvince());
+            m.getRequestLabel().getCondition().getCustomer().setCCity(insureInfo.getCity());
+            m.getRequestLabel().getCondition().getCustomer().setCCounty(insureInfo.getCounty());
+        }else {
 
-        //投保人地区信息
-        PersonAreaVo personAreaVo = sysAreaService.queryByAddressYc(insureInfo.getAddr(), insureInfo.getIdentifyNumber());
+            //投保人地区信息
+            PersonAreaVo personAreaVo = sysAreaService.queryByAddressYc(insureInfo.getAddr(), insureInfo.getIdentifyNumber());
 
-        //构造被保人地区
-        m.getRequestLabel().getCondition().getCustomer().setCProvince(personAreaVo.getProvinceCode());
-        m.getRequestLabel().getCondition().getCustomer().setCCity(personAreaVo.getCityCode());
-        m.getRequestLabel().getCondition().getCustomer().setCCounty(personAreaVo.getCountyCode());
+            //构造被保人地区
+            m.getRequestLabel().getCondition().getCustomer().setCProvince(personAreaVo.getProvinceCode());
+            m.getRequestLabel().getCondition().getCustomer().setCCity(personAreaVo.getCityCode());
+            m.getRequestLabel().getCondition().getCustomer().setCCounty(personAreaVo.getCountyCode());
+        }
 
         try {
             AuditResponse rd = yongchengRequestApiComponents.newXnyUnderwritingService(m);

+ 3 - 0
src/main/resources/mapper/modules/admin/SysUserMapper.xml

@@ -1983,6 +1983,9 @@
         LEFT JOIN sys_dept sd1 ON sd1.id = su4.dept_id
         WHERE
         su4.id IN ( su1.id, su2.id, su3.id )
+          <if test="managementSource  !=null  and  managementSource !=''">
+              and  sd1.management_source=#{managementSource}
+          </if>
         ) AS subquery
         ORDER BY 1
        ) > 0 )

+ 2 - 0
src/main/resources/mapper/modules/order/InsOrdersMapper.xml

@@ -129,6 +129,7 @@
         <result property="crossInsurance" column="cross_insurance" javaType="com.alibaba.fastjson.JSONArray"
                 typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" jdbcType="VARCHAR"/>
         <result property="ubiPredictedInfoScore" column="ubi_predicted_info_score" jdbcType="VARCHAR"/>
+        <result property="mergeCostRate" column="merge_cost_rate" jdbcType="VARCHAR"/>
         <result property="signingTime" column="signingTime" jdbcType="TIMESTAMP"/>
         <result property="payDate" column="payDate" jdbcType="TIMESTAMP"/>
         <result property="partnerCompaniesName" column="partnerCompaniesName" jdbcType="VARCHAR"/>
@@ -246,6 +247,7 @@
                iac.tax_arrears,
                iac.cross_insurance,
                iac.ubi_predicted_info_score,
+               iac.merge_cost_rate,
                iac.signing_time as signingTime,
                iac.pay_date  as payDate,
                iac.agreement_id,