Explorar el Código

华泰接口修改

wks hace 2 años
padre
commit
5c292fa6a7

+ 7 - 9
src/main/java/com/ydtech/constants/enums/InsurKind.java

@@ -26,13 +26,15 @@ public enum InsurKind {
     SY_FJ_YBW1("SY_FJ_YBW1", "附加医保外用药责任险(第三者责任保险)"),
     SY_FJ_YBW2("SY_FJ_YBW2", "附加医保外用药责任险(车上人员责任保险(乘客))"),
     SY_FJ_YBW3("SY_FJ_YBW3", "附加医保外用药责任险(车上人员责任保险(司机))"),
-
-    ;
+    TY1("TY1", "道路救援服务特约条款"),
+    TY2("TY2", "车辆安全检测特约条款"),
+    TY3("TY3", "代为驾驶服务特约条款"),
+    TY4("TY4", "代为送检服务特约条款");
 
     public static InsurKind matchKey(String key) {
         InsurKind result = null;
         for (InsurKind e : values()) {
-            if (e.getCode() == key) {
+            if (e.getCode().equals(key)) {
                 result = e;
                 break;
             }
@@ -40,12 +42,8 @@ public enum InsurKind {
         return result;
     }
 
+    private final String code;
 
-    @Getter
-    private String code;
-
-    @Getter
-    private String desc;
-
+    private final String desc;
 
 }

+ 14 - 21
src/main/java/com/ydtech/modules/admin/controller/WechatController.java

@@ -2,53 +2,46 @@ package com.ydtech.modules.admin.controller;
 
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.exception.SystemException;
-import com.ydtech.modules.admin.service.WechatService;
-import com.ydtech.modules.admin.model.vo.WechatBindPhoneVo;
 import com.ydtech.modules.admin.model.vo.WechatBindVo;
 import com.ydtech.modules.admin.model.vo.WechatLoginVo;
+import com.ydtech.modules.admin.service.WechatService;
+import com.ydtech.modules.base.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import me.chanjar.weixin.common.error.WxErrorException;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.validation.Valid;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 @Api(tags = "微信业务")
 @Slf4j
 @RestController
 @RequestMapping("/wechat")
-public class WechatController {
+@RequiredArgsConstructor
+public class WechatController extends BaseController {
 
     private final WechatService wechatService;
 
-    public WechatController(WechatService wechatService) {
-        this.wechatService = wechatService;
-    }
-
     @PostMapping("/login")
     @ApiOperation(value = "登录")
-    public HttpResult<Object> login(@RequestBody WechatLoginVo wechatLoginVo, HttpServletRequest request) {
+    public HttpResult<Object> login(@RequestBody WechatLoginVo wechatLoginVo) {
         try {
-            return wechatService.login(wechatLoginVo, request);
+            return wechatService.login(wechatLoginVo);
         } catch (WxErrorException e) {
             log.info(e.getMessage());
             throw new SystemException("微信授权失败");
         }
     }
 
-    @PostMapping("/bindPhone")
-    @ApiOperation(value = "绑定手机号,姓名")
-    public HttpResult<Object> bindPhone(@Valid @RequestBody WechatBindPhoneVo wechatBindPhoneVo, HttpServletRequest request) {
-        return wechatService.bindPhone(wechatBindPhoneVo, request);
-    }
-
     @PostMapping("/bind")
-    @ApiOperation(value = "通过后台录入的人,绑定微信")
+    @ApiOperation(value = "工号绑定微信")
     HttpResult<Object> bind(@RequestBody WechatBindVo wechatBindVo) throws WxErrorException {
         try {
-            return wechatService.bind(wechatBindVo);
+            String userId = getUserId();
+            return wechatService.bind(wechatBindVo, userId);
         } catch (WxErrorException e) {
             log.info(e.getMessage());
             throw new SystemException("微信授权失败");

+ 0 - 2
src/main/java/com/ydtech/modules/admin/model/vo/WechatBindVo.java

@@ -12,6 +12,4 @@ public class WechatBindVo implements Serializable {
 
     private String code;
 
-    private String jobNumber;
-
 }

+ 8 - 9
src/main/java/com/ydtech/modules/admin/service/WechatService.java

@@ -1,21 +1,20 @@
 package com.ydtech.modules.admin.service;
 
 import com.ydtech.core.page.HttpResult;
-import com.ydtech.modules.admin.model.SysUser;
-import com.ydtech.modules.admin.model.vo.WechatBindPhoneVo;
 import com.ydtech.modules.admin.model.vo.WechatBindVo;
 import com.ydtech.modules.admin.model.vo.WechatLoginVo;
 import me.chanjar.weixin.common.error.WxErrorException;
 
-import javax.servlet.http.HttpServletRequest;
-
 public interface WechatService {
 
-    HttpResult<Object> login(WechatLoginVo code, HttpServletRequest request) throws WxErrorException;
-
-    HttpResult<Object> bindPhone(WechatBindPhoneVo wechatBindVo, HttpServletRequest request);
+    /**
+     * 微信登录
+     */
+    HttpResult<Object> login(WechatLoginVo code) throws WxErrorException;
 
-    HttpResult<Object> bind(WechatBindVo wechatBindVo) throws WxErrorException;
+    /**
+     * 绑定微信
+     */
+    HttpResult<Object> bind(WechatBindVo wechatBindVo, String userId) throws WxErrorException;
 
-    HttpResult<Object> bindUser(String jobNumber, SysUser sysUser);
 }

+ 16 - 103
src/main/java/com/ydtech/modules/admin/service/impl/WechatServiceImpl.java

@@ -1,19 +1,14 @@
 package com.ydtech.modules.admin.service.impl;
 
 import cn.dev33.satoken.stp.StpUtil;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.exception.SystemException;
 import com.ydtech.modules.admin.dao.SysUserRoleMapper;
 import com.ydtech.modules.admin.model.SysUser;
-import com.ydtech.modules.admin.model.SysUserRole;
-import com.ydtech.modules.admin.model.vo.WechatBindPhoneVo;
 import com.ydtech.modules.admin.model.vo.WechatBindVo;
 import com.ydtech.modules.admin.model.vo.WechatLoginVo;
 import com.ydtech.modules.admin.service.SysUserService;
 import com.ydtech.modules.admin.service.WechatService;
-import com.ydtech.utils.idgen.IdGenerate;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import me.chanjar.weixin.common.bean.oauth2.WxOAuth2AccessToken;
@@ -22,12 +17,7 @@ import me.chanjar.weixin.mp.api.WxMpService;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.Date;
-
-import static com.ydtech.constants.RedisConstant.PHONE_VERIFICATION_CODE_KEY;
+import org.springframework.util.ObjectUtils;
 
 @Slf4j
 @Service
@@ -37,99 +27,29 @@ public class WechatServiceImpl implements WechatService {
     @Value("${pyramid.dept.id}")
     private String pyramid;
 
-
     private final SysUserService sysUserService;
 
     private final WxMpService wxMpService;
 
-    private final SysUserRoleMapper sysUserRoleMapper;
-
-    private final StringRedisTemplate stringRedisTemplate;
-
     @Override
-    public HttpResult login(WechatLoginVo wechatLoginVo, HttpServletRequest request) throws WxErrorException {
-        String number;
+    public HttpResult<Object> login(WechatLoginVo wechatLoginVo) throws WxErrorException {
         WxOAuth2AccessToken accessToken = wxMpService.getOAuth2Service().getAccessToken(wechatLoginVo.getCode());
         String openId = accessToken.getOpenId();
-        SysUser sysUser = sysUserService.lambdaQuery().eq(SysUser::getOpenid, openId).one();
+        SysUser sysUser = sysUserService.lambdaQuery()
+                .eq(SysUser::getOpenid, openId)
+                .one();
 
         // 没有绑定微信
         if (sysUser == null) {
-            SysUser sysUser1 = new SysUser();
-
-            String maxId = sysUserService.findMaxId(pyramid);
-            if (maxId == null) {
-                throw new SystemException("没有上级人员信息");
-            }
-
-            String nextPK = IdGenerate.nextCode(maxId, 3);
-            SysUserRole sysUserRole = new SysUserRole();
-            sysUserRole.setUserId(nextPK);
-            sysUserRole.setRoleId(2L);
-            sysUserRole.setLastUpdateTime(new Date());
-            sysUserRoleMapper.insert(sysUserRole);
-            sysUser1.setStatus(2); //1:正常   0:离司 2:新注册 审核后为1
-            sysUser1.setName("游客");
-            sysUser1.setCreateTime(new Date());
-            sysUser1.setDeptId(pyramid);
-            sysUser1.setId(nextPK);
-            sysUser1.setOpenid(openId);
-            sysUserService.save(sysUser1);
-            number = nextPK;
-        } else {
-            number = sysUser.getId();
-        }
-
-        String token = StpUtil.createLoginSession(number);
-        return HttpResult.ok(token);
-    }
-
-
-    @Override
-    @Transactional
-    public HttpResult<Object> bindPhone(WechatBindPhoneVo wechatBindVo, HttpServletRequest request) {
-        String phoneMsg = wechatBindVo.getPhoneMsg();
-        String phone = wechatBindVo.getPhone();
-        // 1. 从redis获取验证码信息
-        String msg = stringRedisTemplate.opsForValue().get(PHONE_VERIFICATION_CODE_KEY + phone);
-        if (msg == null || msg.isEmpty()) {
-            throw new SystemException("短信验证码发送失败");
-        }
-
-        if (!phoneMsg.equals(msg)) {
-            throw new SystemException("短信验证码不正确");
-        }
-
-        // 2.验证手机号是否绑定
-        SysUser user = sysUserService.lambdaQuery().eq(SysUser::getMobile, phone).one();
-
-        if (user != null) {
-            if (user.getOpenid() != null) {
-                throw new SystemException("手机号已被绑定微信");
-            } else {
-                // 2.1 合并已经存在的工号
-                SysUser sysUser = sysUserService.lambdaQuery().eq(SysUser::getId, wechatBindVo.getJobNumber()).one();
-                user.setOpenid(sysUser.getOpenid());
-                boolean i = sysUserService.updateById(user);
-                boolean i1 = sysUserService.removeById(wechatBindVo.getJobNumber());
-                if (i && i1) {
-//                    JwtAuthenticatioToken token = SecurityUtils.login(request, user.getId(), "", authenticationManager);
-                    return HttpResult.error(10100, "绑定成功");
-                }
-                throw new SystemException("绑定手机已存在工号失败");
-            }
+            throw new SystemException("您还未绑定工号。");
         }
 
-        // 3. 绑定手机号
-        SysUser sysUser = new SysUser();
-        sysUser.setName(wechatBindVo.getName());
-        sysUser.setMobile(wechatBindVo.getPhone());
-
-        return bindUser(wechatBindVo.getJobNumber(), sysUser);
+        String token = StpUtil.createLoginSession(sysUser.getId());
+        return HttpResult.ok("", token);
     }
 
     @Override
-    public HttpResult<Object> bind(WechatBindVo wechatBindVo) throws WxErrorException {
+    public HttpResult<Object> bind(WechatBindVo wechatBindVo, String userId) throws WxErrorException {
         WxOAuth2AccessToken accessToken = wxMpService.getOAuth2Service().getAccessToken(wechatBindVo.getCode());
         String openId = accessToken.getOpenId();
 
@@ -137,27 +57,20 @@ public class WechatServiceImpl implements WechatService {
         if (sysUser != null) {
             throw new SystemException("同一微信不能重复绑定");
         }
-        sysUser = new SysUser();
-        sysUser.setOpenid(openId);
-        return bindUser(wechatBindVo.getJobNumber(), sysUser);
-    }
 
-    /**
-     * 通过工号绑定用户据
-     *
-     * @param jobNumber
-     * @return
-     */
-    @Override
-    public HttpResult<Object> bindUser(String jobNumber, SysUser sysUser) {
+        SysUser user = sysUserService.lambdaQuery().eq(SysUser::getId, userId).one();
+        if (ObjectUtils.isEmpty(user)) {
+            throw new SystemException("你输入的工号不存在");
+        }
 
-        LambdaQueryChainWrapper<SysUser> wrapper = sysUserService.lambdaQuery().eq(SysUser::getId, jobNumber);
+        user.setOpenid(openId);
+        boolean update = sysUserService.updateById(user);
 
-        boolean update = sysUserService.update(wrapper);
         if (update) {
             return HttpResult.ok("绑定成功");
         }
         throw new SystemException("绑定失败");
     }
 
+
 }

+ 21 - 4
src/main/java/com/ydtech/modules/ins/model/vo/KindInfoVo.java

@@ -1,5 +1,7 @@
 package com.ydtech.modules.ins.model.vo;
 
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.util.Map;
@@ -11,12 +13,27 @@ import java.util.Map;
  * @since 2020/11/26 17:53
  */
 @Data
+@ApiModel("商业险")
 public class KindInfoVo {
-    private double amount; //保额
-    private double unitAmount; //保额
-    private String kindCode; //险种编码
+
+    @ApiModelProperty("保额")
+    private double amount;
+
+    @ApiModelProperty("保额")
+    private double unitAmount;
+
+    @ApiModelProperty("险种编码")
+    private String kindCode;
+
+    @ApiModelProperty("险种名称")
     private String kindName;
-    private String deductibleRate; //附加绝对免赔率
+
+    @ApiModelProperty("附加绝对免赔率")
+    private String deductibleRate;
+
+    @ApiModelProperty("服务次数")
+    private int serviceTimes;
+
     //扩展属性
     //seat: 乘客数(机动车车上人员责任保险-乘客)
     //repairFactorRate: 指定修理厂费率(指定专修厂险,国产车:车损险基准纯风险保费的10%~30%之间,选择国产默认10%;进口车:车损险基准纯风险保费的15%~60%之间,选择进口默认20%。)

+ 34 - 5
src/main/java/com/ydtech/modules/order/components/huatai/HuaTaiRequestApiComponents.java

@@ -86,6 +86,8 @@ public class HuaTaiRequestApiComponents {
         encryptReq.setSourceCode(properties.getSourceCode());
         encryptReq.setBusiContent(busiContent);
         encryptReq.setAccessToken(accessToken);
+
+
         String jsonString = JSON.toJSONString(encryptReq, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty);
         InsuranceLog.infoLog(InsuranceEnum.HTIC.getPinyin(), "\n\t---------> 加密后的参数:{}", jsonString);
         HttpEntity<String> httpEntity = new HttpEntity<>(jsonString, httpHeaders);
@@ -116,6 +118,28 @@ public class HuaTaiRequestApiComponents {
         return t;
     }
 
+    public static void main(String[] args) throws Exception {
+        String selfPrivateKe = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAME61d/VP+ejXcs67Lm2L7935IAMeezyEC" +
+                "/f4uOEMWxBFseTe0eGdQ1fsjxvbnnvoBWaCtp59LuOenIHb31" +
+                "/nw8rxaRZk35QHqlzISmS2u2o6cpxpBJNuRDNqx4JbiwJF2h5rRqXNJdS5cLYU3SkcATcmRPTt7l2hfcgdqzYYkCTAgMBAAECgYAwAAWRDNBLInHyQjj8CR3jWk0Q4giHq7oJqnwaOIRud9zIxwIgym3ZXKRSDvxKnhQOSa3Yh+MblFEmcmJnsoQ4OedLq7FVOw1eur/nw6jMcROT6ZiP512ZGgKZI1OdkQDpjCqM9Vg1brrFuGdV2RwI9ak2bjKbi7vs6slvd4r3AQJBAOqU+5xkyuaupg9cO/7TIxMgnTQH8W7IC1uDcx3f28QdkP+udJYfU/n1dYyGuhkW66KVANSqz4dsrEiAmfhvydECQQDS304+LEvPi4j8YmNlOXrs1o8H0tPB69svC9ER2YbrTjZf49XvY9fuor11XAprXZhBp8yvJu07FuRWilrQ8FkjAkEAop1qmqzIdweE+ErxECJfQygtsd77v9cPAH5sM752Q0pXtNbD3TmUZkeBGExg/3mDGW5/Z+2M9Y0hFRWJJs6fsQJAO11mV5Z82Tb9H6BLPyoJczeMGLW/q65MjFgVSaMlmoTwRdqMVdKT7bifAbUhscwtmv40X3LkAmiVa8+TdZLUZQJACu2NgPZkw6gjKCZf5xOfvKaC3PqKlhPghq+ypyutzTih9y81+EBJ25emLWNcd5BtIZ/AXmr3UUiGg0zX4s5njA==";
+
+        String accessToken = "am0rLHooDWVBQOC5BD4V43ouw4kltVpFnbvGVtoF+DFt4/LCT1AE0NeA8niwLnFUVr+7CRouz7o/huXofp7xoFriisrGf9V9/XHvsh2DOvjoiPOL3uF0EFM63QTBC6PW9nE9NaT08Kq1/JL3xGAJa1dcCyewXw7aIil8NYliH44=";
+        String busiContent = "oZwo+V7Of23DzV4s1nDQp4fPqXM2eVNvdUOBVA/OKNMauTPLpFsElaYl/Gh8JKIft0JZ+0SoT0qfsNHFkqpjLya26JrRnfTdkInlkAnTF+sJc3tS2thXS6yAY8LdYv6+zwR0CoIkGti56ny2+27hH3IpFtNQGVrlMb/ekK7pR3jJH/V5UBX+utlkuSeHeZ5WENaURzrhiyfgp+G5bzq95tTWupQD5xw55jraXhqPJYA=";
+        String resAccessToken = "";
+        try {
+            resAccessToken = RSAUtils.rsaDecrypt(accessToken, selfPrivateKe, "UTF-8");
+        } catch (Exception e) {
+            throw new SystemException("RSA解密获取accessToken失败!");
+        }
+        //2.用key解密出出参报文
+        String aseDecryptStr = AESUtilsWithDataBase.decryptECBPK5Base64(busiContent, resAccessToken);
+        //3.使用Base64解密最终返回报文
+        String text = Base64Utils.getBase64Decode(aseDecryptStr);
+
+        System.out.println(text);
+    }
+
+
     /**
      * @param <Q>     Request 请求体
      * @param <S>     Response 响应体
@@ -124,7 +148,8 @@ public class HuaTaiRequestApiComponents {
      * @param verify  结果是否需要验证
      * @return 响应内容
      */
-    private <Q extends HuaTaiBaseRequest, S extends HuaTaiBaseResponse> S request(Q request, Class<S> tClass, boolean verify, String domain, String urlInterface) {
+    private <Q extends HuaTaiBaseRequest, S extends HuaTaiBaseResponse> S request(Q request, Class<S> tClass, boolean verify,
+                                                                                  String domain, String urlInterface) {
         String url = domain;
         S response = post(request, url, tClass);
         if (verify) {
@@ -138,7 +163,8 @@ public class HuaTaiRequestApiComponents {
      * @param <S> Response 响应体
      *            常规
      */
-    private <Q extends HuaTaiBaseRequest, S extends HuaTaiBaseResponse> S routineRequest(Q request, Class<S> tClass, boolean verify, String urlInterface) {
+    private <Q extends HuaTaiBaseRequest, S extends HuaTaiBaseResponse> S routineRequest(Q request, Class<S> tClass, boolean verify,
+                                                                                         String urlInterface) {
         return request(request, tClass, verify, properties.getBaseUrl(), urlInterface);
     }
 
@@ -164,7 +190,8 @@ public class HuaTaiRequestApiComponents {
     /**
      * 车型查询 传入必要车辆信息,返回车型列表给用户选择
      */
-    public List<HuaTaiModelsQueryResponse.CarModelDto> modelQuery(HuaTaiModelsQueryRequest request, Class<HuaTaiModelsQueryResponse> tClass) {
+    public List<HuaTaiModelsQueryResponse.CarModelDto> modelQuery(HuaTaiModelsQueryRequest request,
+                                                                  Class<HuaTaiModelsQueryResponse> tClass) {
         return routineRequest(request, tClass, true, "").getCarModel();
     }
 
@@ -211,7 +238,8 @@ public class HuaTaiRequestApiComponents {
     /**
      * 核保状态查询 传入单号查询该单核保状态
      */
-    public HuaTaiSubmitStatusQueryResponse submitStatus(HuaTaiSubmitStatusQueryRequest request, Class<HuaTaiSubmitStatusQueryResponse> tClass) {
+    public HuaTaiSubmitStatusQueryResponse submitStatus(HuaTaiSubmitStatusQueryRequest request,
+                                                        Class<HuaTaiSubmitStatusQueryResponse> tClass) {
         return routineRequest(request, tClass, true, HuaTaiTransCode.SUBMIT);
     }
 
@@ -219,7 +247,8 @@ public class HuaTaiRequestApiComponents {
     /**
      * 电子保单下载 传入单号相关信息下载电子保单
      */
-    public HuaTaiInsurancePolicyPrintResponse insurancePolicyPrint(HuaTaiInsurancePolicyPrintRequest request, Class<HuaTaiInsurancePolicyPrintResponse> tClass) {
+    public HuaTaiInsurancePolicyPrintResponse insurancePolicyPrint(HuaTaiInsurancePolicyPrintRequest request,
+                                                                   Class<HuaTaiInsurancePolicyPrintResponse> tClass) {
         return routineRequest(request, tClass, true, "");
     }
 

+ 2 - 0
src/main/java/com/ydtech/modules/order/controller/ZhongMeiOrderApiController.java

@@ -105,9 +105,11 @@ public class ZhongMeiOrderApiController {
     public HttpResult<List<GeneralNonCarProductResVo>> getDrivingInsurance(@RequestBody GeneralNonCarProductReqVo reqVo) {
         return this.zhongMeiOrderApiService.getDrivingInsurance(reqVo);
     }
+
     @PostMapping("/rideAccidentQuery")
     @ApiOperation(value = "核保状态查询")
     public HttpResult<Object> rideAccidentQuery(@RequestBody @Valid AccidentalDrivingQueryVo accidentalDrivingVo) {
         return this.zhongMeiOrderApiService.rideAccidentQuery(accidentalDrivingVo);
     }
+
 }

+ 190 - 165
src/main/java/com/ydtech/modules/order/entity/api/huatai/request/HuaTaiQuotedPriceRequest.java

@@ -2,9 +2,6 @@ package com.ydtech.modules.order.entity.api.huatai.request;
 
 import cn.hutool.core.util.ArrayUtil;
 import com.alibaba.fastjson.annotation.JSONField;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
 import com.ydtech.constants.enums.InsuranceRisk;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
@@ -47,11 +44,14 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
     private static final long serialVersionUID = -3877935401822194816L;
 
     //Y	投保单信息
-    @JSONField(name="businessData")
+    @JSONField(name = "businessData")
     private BusinessDataDto businessData;
 
-    public HuaTaiQuotedPriceRequest(BaseQuoteInfoVo baseQuoteInfoVo, HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto, HuaTaiActualValueResponse actualValueResponse, AccidentalDrivingVo accidentalDrivingVo, HuaTaiConfigureParameters huaTaiConfigureParameters) {
-        this.businessData = new BusinessDataDto(baseQuoteInfoVo, fullCarDataDto,actualValueResponse, accidentalDrivingVo, huaTaiConfigureParameters);
+    public HuaTaiQuotedPriceRequest(BaseQuoteInfoVo baseQuoteInfoVo, HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto,
+                                    HuaTaiActualValueResponse actualValueResponse, AccidentalDrivingVo accidentalDrivingVo,
+                                    HuaTaiConfigureParameters huaTaiConfigureParameters) {
+        this.businessData = new BusinessDataDto(baseQuoteInfoVo, fullCarDataDto, actualValueResponse, accidentalDrivingVo,
+                huaTaiConfigureParameters);
         this.loginCom = huaTaiConfigureParameters.getComCode();
     }
 
@@ -60,8 +60,9 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
         super.setHead(head);
         super.getHead().setTransCode(HuaTaiTransCode.QUOTE_PRICE);
     }
+
     //Y	机构代码
-    @JSONField(name="loginCom")
+    @JSONField(name = "loginCom")
     private String loginCom;
 
     @AllArgsConstructor
@@ -71,22 +72,24 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
 
         private static final long serialVersionUID = -1000678860334502885L;
         //Y	投保主信息
-        @JSONField(name="businessMain")
+        @JSONField(name = "businessMain")
         private BusinessMainDto businessMain;
         //Y	业务信息(列表)
-        @JSONField(name="contract")
+        @JSONField(name = "contract")
         private List<ContractDto> contract;
         //Y	客户信息(列表)
-        @JSONField(name="customer")
+        @JSONField(name = "customer")
         private List<CustomerDto> customer;
         //Y	投保车辆信息
-        @JSONField(name="insuredObject")
+        @JSONField(name = "insuredObject")
         private InsuredObjectDto insuredObject;
         //Y	销售信息
-        @JSONField(name="saleInfo")
+        @JSONField(name = "saleInfo")
         private SaleInfoDto saleInfo;
 
-        public BusinessDataDto(BaseQuoteInfoVo baseQuoteInfoVo, HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto, HuaTaiActualValueResponse actualValueResponse,AccidentalDrivingVo accidentalDrivingVo, HuaTaiConfigureParameters huaTaiConfigureParameters) {
+        public BusinessDataDto(BaseQuoteInfoVo baseQuoteInfoVo, HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto,
+                               HuaTaiActualValueResponse actualValueResponse, AccidentalDrivingVo accidentalDrivingVo,
+                               HuaTaiConfigureParameters huaTaiConfigureParameters) {
             CarInfoVo carInfo = baseQuoteInfoVo.getCarInfo();
             List<RiskInfoVo> riskList = baseQuoteInfoVo.getRiskList();
             List<KindInfoVo> kindList = baseQuoteInfoVo.getKindList();
@@ -100,29 +103,32 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
             // 车辆信息
             this.insuredObject = new InsuredObjectDto(carInfo, fullCarDataDto);
             // 保险信息
-            this.contract = new  ContractDto().getContract(riskList, kindList, i - 1,vesselTax,actualValueResponse,huaTaiConfigureParameters,fullCarDataDto);
+            this.contract = new ContractDto().getContract(riskList, kindList, i - 1, vesselTax, actualValueResponse,
+                    huaTaiConfigureParameters, fullCarDataDto);
             // 客户信息
             this.customer = new CustomerDto().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo);
             //销售信息
             this.saleInfo = new SaleInfoDto(huaTaiConfigureParameters);
 
         }
+
         @NoArgsConstructor
         @Data
-        public static class BusinessMainDto implements Serializable{
+        public static class BusinessMainDto implements Serializable {
             private static final long serialVersionUID = 2471155101522896774L;
             //Y	操作机构代码
-            @JSONField(name="makeCom")
+            @JSONField(name = "makeCom")
             private String makeCom;
             //Y	操作员代码
-            @JSONField(name="operatorCode")
+            @JSONField(name = "operatorCode")
             private String operatorCode;
             //Y	投保日期(格式:YYYY-MM-DD HH24:MI:SS)
-            @JSONField(name="operateDate")
+            @JSONField(name = "operateDate")
             private String operateDate;
             //CY	出单计算机IP地址(北京出单机构必传)
-            @JSONField(name="computerIp")
+            @JSONField(name = "computerIp")
             private String computerIp;
+
             public BusinessMainDto(HuaTaiConfigureParameters huaTaiConfigureParameters) {
                 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                 this.makeCom = huaTaiConfigureParameters.getComCode();
@@ -131,148 +137,150 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
             }
 
         }
+
         @NoArgsConstructor
         @Data
-        public static class InsuredObjectDto implements Serializable{
+        public static class InsuredObjectDto implements Serializable {
             //Y	保险采集和管理车信息
-            @JSONField(name="policyCar")
+            @JSONField(name = "policyCar")
             private PolicyCarDto policyCar;
             //Y	简化版精友信息
-            @JSONField(name="simpleStadarCar")
+            @JSONField(name = "simpleStadarCar")
             private SimpleStadarCarDto simpleStadarCar;
 
             public InsuredObjectDto(CarInfoVo carInfo, HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
-                this.policyCar = new PolicyCarDto(carInfo,fullCarDataDto);
-                this.simpleStadarCar = new SimpleStadarCarDto(carInfo,fullCarDataDto);
+                this.policyCar = new PolicyCarDto(carInfo, fullCarDataDto);
+                this.simpleStadarCar = new SimpleStadarCarDto(carInfo, fullCarDataDto);
             }
+
             @NoArgsConstructor
             @Data
-            public static class PolicyCarDto implements Serializable{
+            public static class PolicyCarDto implements Serializable {
                 //CY	座位数
-                @JSONField(name="approvedPassengersCapacity")
+                @JSONField(name = "approvedPassengersCapacity")
                 private int approvedPassengersCapacity;
                 //Y	排量(单位:升)
-                @JSONField(name="displacement")
+                @JSONField(name = "displacement")
                 private double displacement;
                 //Y	车牌号
-                @JSONField(name="plateNo")
+                @JSONField(name = "plateNo")
                 private String plateNo;
                 //Y	初次登记日期(格式:YYYY-MM-DD HH24:MI:SS)
-                @JSONField(name="registerDate")
+                @JSONField(name = "registerDate")
                 private String registerDate;
                 //Y	行驶证发证日期(格式:YYYY-MM-DD HH24:MI:SS)
-                @JSONField(name="issueDate")
+                @JSONField(name = "issueDate")
                 private String issueDate;
                 //Y	新车购置价
-                @JSONField(name="purchasePrice")
+                @JSONField(name = "purchasePrice")
                 private String purchasePrice;
                 //Y	港澳车标志(false-非港澳车;true-是港澳车)
-                @JSONField(name="hKFlag")
+                @JSONField(name = "hKFlag")
                 private boolean hKFlag;
                 //Y	发动机号
-                @JSONField(name="engine")
+                @JSONField(name = "engine")
                 private String engine;
                 //Y	外地车标志(false-本地车;true-外地车)
-                @JSONField(name="ecdemicVehicleFlag")
+                @JSONField(name = "ecdemicVehicleFlag")
                 private boolean ecdemicVehicleFlag;
                 //Y	商业险过户车标志(0-非过户车;1-过户重新投保)
-                @JSONField(name="chgOwnerFlag")
+                @JSONField(name = "chgOwnerFlag")
                 private String chgOwnerFlag;
                 //Y	交强险过户车标志(1-过户重新投保,非过户车传空即可)
-                @JSONField(name="specialCarFlag")
+                @JSONField(name = "specialCarFlag")
                 private String specialCarFlag;
                 //CY	过户日期(过户车必传)(格式:YYYY-MM-DD HH24:MI:SS)
-                @JSONField(name="transferDate")
+                @JSONField(name = "transferDate")
                 private String transferDate;
                 //Y	车架号
-                @JSONField(name="vIN")
+                @JSONField(name = "vIN")
                 private String vin;
                 //Y	是否贷款购车标志(0-非贷款车;1-是贷款车)
-                @JSONField(name="loanStatus")
+                @JSONField(name = "loanStatus")
                 private String loanStatus;
                 //Y	厂牌型号
-                @JSONField(name="modelName")
+                @JSONField(name = "modelName")
                 private String modelName;
                 //CY	整备质量
-                @JSONField(name="UnladenMass")
+                @JSONField(name = "UnladenMass")
                 private String unladenMass;
                 //Y	能源种类
-                @JSONField(name="FullType")
+                @JSONField(name = "FullType")
                 private String FullType;
                 //CY	车辆来历凭证种类(新车,北京上海机构出单必录)
-                @JSONField(name="CertificateType")
+                @JSONField(name = "CertificateType")
                 private String CertificateType;
                 //CY	车辆来历凭证编号(新车,北京机构出单必录)
-                @JSONField(name="CertificateNo")
+                @JSONField(name = "CertificateNo")
                 private String CertificateNo;
                 //CY	车辆来历凭证所载日期(新车,北京机构出单必录)(格式:YYYY-MM-DD HH24:MI:SS)
-                @JSONField(name="CertificateDate")
+                @JSONField(name = "CertificateDate")
                 private String CertificateDate;
                 //CY	参见车辆种类代码
-                @JSONField(name="MotorTypeCode")
+                @JSONField(name = "MotorTypeCode")
                 private String motorTypeCode;
                 //CY	参见使用性质代码
-                @JSONField(name="MotorUsageTypeCode")
+                @JSONField(name = "MotorUsageTypeCode")
                 private String motorUsageTypeCode;
                 //CY	参见号牌种类代码
-                @JSONField(name="PlateType")
+                @JSONField(name = "PlateType")
                 private String plateType;
                 //CY	功率(纯电摩托车必录)
-                @JSONField(name="Power")
+                @JSONField(name = "Power")
                 private String Power;
                 //CY	最高设计车速(摩托车必录)
-                @JSONField(name="MaximumSpeed")
+                @JSONField(name = "MaximumSpeed")
                 private String MaximumSpeed;
                 //CY	参见所属性质代码
-                @JSONField(name="Property")
+                @JSONField(name = "Property")
                 private String property;
                 //CY	新车销售公司名称(广东机构新车出单必录)
-                @JSONField(name="NewCarSalesCompanyName")
+                @JSONField(name = "NewCarSalesCompanyName")
                 private String NewCarSalesCompanyName;
                 //CY	销售公司所在省(广东机构出单新车必录)
-                @JSONField(name="NewCarSalesProvince")
+                @JSONField(name = "NewCarSalesProvince")
                 private String NewCarSalesProvince;
                 //CY	销售公司所在市(广东机构出单新车必录)
-                @JSONField(name="NewCarSalesCity")
+                @JSONField(name = "NewCarSalesCity")
                 private String NewCarSalesCity;
                 //CY	销售公司所在区(广东机构出单新车必录)
-                @JSONField(name="NewCarSalesDistrict")
+                @JSONField(name = "NewCarSalesDistrict")
                 private String NewCarSalesDistrict;
                 //CY	是否4S店销售(广东机构出单新车必录)
-                @JSONField(name="IsFourSShop")
+                @JSONField(name = "IsFourSShop")
                 private String IsFourSShop;
                 //CY	购车发票日期(上海机构出单必录)(格式:YYYY-MM-DD HH24:MI:SS)
-                @JSONField(name="InvoiceDate")
+                @JSONField(name = "InvoiceDate")
                 private Date InvoiceDate;
                 //CY	参见车身颜色代码
-                @JSONField(name="ColorCode")
+                @JSONField(name = "ColorCode")
                 private String colorCode;
                 //CY	验车状态代码(1-未验车;2-免验车;4-已验车)
-                @JSONField(name="CarCheckStatus")
+                @JSONField(name = "CarCheckStatus")
                 private String carCheckStatus;
                 //CY	验车人(已验车必录)
-                @JSONField(name="CarChecker")
+                @JSONField(name = "CarChecker")
                 private String carChecker;
                 //CY	验车时间(已验车必录)(格式:YYYY-MM-DD HH24:MI:SS)
-                @JSONField(name="CarCheckTime")
+                @JSONField(name = "CarCheckTime")
                 private String carCheckTime;
                 //CY	验车记录(已验车必录)
-                @JSONField(name="CarCheckRecord")
+                @JSONField(name = "CarCheckRecord")
                 private String carCheckRecord;
                 //CY	车况(0-好;1-中;2-差)
-                @JSONField(name="VehicleCondition")
+                @JSONField(name = "VehicleCondition")
                 private String vehicleCondition;
                 //Y	参见交管车辆类型代码
-                @JSONField(name="VehicleType")
+                @JSONField(name = "VehicleType")
                 private String vehicleType;
                 //CY	行驶证车型
-                @JSONField(name="RegistModelCode")
+                @JSONField(name = "RegistModelCode")
                 private String registModelCode;
                 //CY	参见号牌底色代码
-                @JSONField(name="PlateColorCode")
+                @JSONField(name = "PlateColorCode")
                 private String plateColorCode;
 
-                public PolicyCarDto(CarInfoVo carInfoVo,HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
+                public PolicyCarDto(CarInfoVo carInfoVo, HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
                     this.approvedPassengersCapacity = fullCarDataDto.getApprovedPassengersCapacity();
                     this.displacement = fullCarDataDto.getDisplacement();
                     this.plateNo = carInfoVo.getLicenseNo();
@@ -303,31 +311,32 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
                     this.carCheckStatus = "2";
                     this.vehicleCondition = "0";
                     this.vehicleType = "K33";
-                    this.registModelCode =  fullCarDataDto.getModelName();
+                    this.registModelCode = fullCarDataDto.getModelName();
                     this.plateColorCode = "01";
                 }
             }
+
             @NoArgsConstructor
             @Data
-            public static class SimpleStadarCarDto implements Serializable{
+            public static class SimpleStadarCarDto implements Serializable {
                 //Y	行业车型编码
-                @JSONField(name="modelCode")
+                @JSONField(name = "modelCode")
                 private String modelCode;
                 //Y	座位数
-                @JSONField(name="approvedPassengersCapacity")
+                @JSONField(name = "approvedPassengersCapacity")
                 private int approvedPassengersCapacity;
                 //Y	精友车型编码
-                @JSONField(name="localModelCode")
+                @JSONField(name = "localModelCode")
                 private String localModelCode;
                 //Y	参见能源种类代码
-                @JSONField(name="energyTypes")
+                @JSONField(name = "energyTypes")
                 private String energyTypes;
 
-                public SimpleStadarCarDto(CarInfoVo carInfoVo,HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
+                public SimpleStadarCarDto(CarInfoVo carInfoVo, HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
 
                     this.modelCode = fullCarDataDto.getModelCode();
                     this.approvedPassengersCapacity = fullCarDataDto.getApprovedPassengersCapacity();
-                    if(carInfoVo.getSeatCount()!=null){
+                    if (carInfoVo.getSeatCount() != null) {
                         this.approvedPassengersCapacity = Integer.parseInt(carInfoVo.getSeatCount());
                     }
                     this.localModelCode = fullCarDataDto.getLocalModelCode();
@@ -336,21 +345,23 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
             }
 
         }
+
         @NoArgsConstructor
         @Data
-        public static class SaleInfoDto implements Serializable{
+        public static class SaleInfoDto implements Serializable {
             //Y	代理人代码
-            @JSONField(name="agentCode")
+            @JSONField(name = "agentCode")
             private String agentCode;
             //Y	代理协议编码
-            @JSONField(name="agreementNo")
+            @JSONField(name = "agreementNo")
             private String agreementNo;
             //Y	机构代码
-            @JSONField(name="comCode")
+            @JSONField(name = "comCode")
             private String comCode;
             //Y	活动ID(通过活动查询接口获得)
-            @JSONField(name="promoteSalePlanID")
+            @JSONField(name = "promoteSalePlanID")
             private String promoteSalePlanID;
+
             public SaleInfoDto(HuaTaiConfigureParameters huaTaiConfigureParameters) {
                 this.agentCode = huaTaiConfigureParameters.getAgentCode();
                 this.agreementNo = huaTaiConfigureParameters.getAgreementNo();
@@ -363,68 +374,74 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
     @AllArgsConstructor
     @NoArgsConstructor
     @Data
-    public static class ContractDto implements Serializable{
+    public static class ContractDto implements Serializable {
         private static final long serialVersionUID = -8141574495483504299L;
         //Y	业务主信息
-        @JSONField(name="contractMain")
+        @JSONField(name = "contractMain")
         private ContractMainDto contractMain;
         //Y	投保险别列表
-        @JSONField(name="coverage")
+        @JSONField(name = "coverage")
         private List<CoverageDto> coverage;
         //Y	平台交互信息
-        @JSONField(name="platFormMessage")
+        @JSONField(name = "platFormMessage")
         private PlatFormMessageDto platFormMessage;
         //CY	车船税信息(交强险节点下传值)
-        @JSONField(name="tax")
+        @JSONField(name = "tax")
         private TaxDto tax;
         //CY	充电桩信息(列表)
-        @JSONField(name="ChargingPost")
+        @JSONField(name = "ChargingPost")
         private List<ChargingPostDto> chargingPost;
 
-        public List<ContractDto> getContract(List<RiskInfoVo> riskInfoVos, List<KindInfoVo> kindInfoVos, Integer quantity,VehicleAndVesselTax vesselTax,
-                                             HuaTaiActualValueResponse actualValueResponse, HuaTaiConfigureParameters huaTaiConfigureParameters,
-                 HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
+        public List<ContractDto> getContract(List<RiskInfoVo> riskInfoVos, List<KindInfoVo> kindInfoVos, Integer quantity,
+                                             VehicleAndVesselTax vesselTax,
+                                             HuaTaiActualValueResponse actualValueResponse,
+                                             HuaTaiConfigureParameters huaTaiConfigureParameters,
+                                             HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
             List<ContractDto> contractDTOS = new ArrayList<>();
             for (RiskInfoVo riskInfoVo : riskInfoVos) {
                 ContractDto contractDto = new ContractDto();
-                this.contractMain = new ContractMainDto(riskInfoVo,huaTaiConfigureParameters,fullCarDataDto);
+                this.contractMain = new ContractMainDto(riskInfoVo, huaTaiConfigureParameters, fullCarDataDto);
                 contractDto.setContractMain(contractMain);
                 if (InsuranceRisk.TRAFFIC.getCode().equals(riskInfoVo.getRiskCode())) {
                     contractDto.coverage = Collections.singletonList(new ContractDto.CoverageDto().fetchTraffic(contractMain));
                     contractDto.tax = new ContractDto.TaxDto(vesselTax);
                 }
                 if (InsuranceRisk.BUSINESS.getCode().equals(riskInfoVo.getRiskCode())) {
-                    contractDto.coverage = new ContractDto.CoverageDto().getBusiness(kindInfoVos, quantity,contractMain,actualValueResponse);
+                    contractDto.coverage = new ContractDto.CoverageDto().getBusiness(kindInfoVos, quantity, contractMain,
+                            actualValueResponse);
                 }
                 contractDTOS.add(contractDto);
             }
             return contractDTOS;
         }
+
         @NoArgsConstructor
         @Data
-        public static class ContractMainDto implements Serializable{
+        public static class ContractMainDto implements Serializable {
             //CY	报价单号(初次报价为空,同一单再次报价需传入之前接口返回的值)
-            @JSONField(name="contractNo")
+            @JSONField(name = "contractNo")
             private String contractNo;
             //Y	经办人代码
-            @JSONField(name="handlerCode")
+            @JSONField(name = "handlerCode")
             private String handlerCode;
             //Y	参见险种代码
-            @JSONField(name="riskCode")
+            @JSONField(name = "riskCode")
             private String riskCode;
             //Y	起保日期(格式:YYYY-MM-DD HH24:MI:SS)
-            @JSONField(name="validDate")
+            @JSONField(name = "validDate")
             private String validDate;
             //Y	终保日期(格式:YYYY-MM-DD HH24:MI:SS)
-            @JSONField(name="expiryDate")
+            @JSONField(name = "expiryDate")
             private String expiryDate;
             //Y	生成日期(格式:YYYY-MM-DD HH24:MI:SS)
-            @JSONField(name="productionDate")
+            @JSONField(name = "productionDate")
             private String productionDate;
-            public ContractMainDto(RiskInfoVo riskInfoVo, HuaTaiConfigureParameters huaTaiConfigureParameters,HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
+
+            public ContractMainDto(RiskInfoVo riskInfoVo, HuaTaiConfigureParameters huaTaiConfigureParameters,
+                                   HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
                 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                 this.riskCode = InsuranceTypeCorrespondence.getHuaTaiRisk().get(riskInfoVo.getRiskCode());
-                if(InsuranceRisk.BUSINESS.getCode().equals(riskInfoVo.getRiskCode()) && "1,2,3,".contains(fullCarDataDto.getEnergyTypes()+",")){//纯电动 燃料电池 插电式混合动力 归属为新能源产品
+                if (InsuranceRisk.BUSINESS.getCode().equals(riskInfoVo.getRiskCode()) && "1,2,3,".contains(fullCarDataDto.getEnergyTypes() + ",")) {//纯电动 燃料电池 插电式混合动力 归属为新能源产品
                     this.riskCode = InsuranceTypeCorrespondence.getHuaTaiNewEnergyRisk();
                 }
                 this.handlerCode = huaTaiConfigureParameters.getOperatorCode();
@@ -447,38 +464,39 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
                 this.productionDate = df.format(new Date());
             }
         }
+
         @NoArgsConstructor
         @Data
-        public static class CoverageDto implements Serializable{
+        public static class CoverageDto implements Serializable {
             //Y	保额(传值要求参见险别代码)
-            @JSONField(name="amount")
+            @JSONField(name = "amount")
             private double amount;
             //Y	起保日期(格式:YYYY-MM-DD HH24:MI:SS)
-            @JSONField(name="validDate")
+            @JSONField(name = "validDate")
             private String validDate;
             //Y	终保日期(格式:YYYY-MM-DD HH24:MI:SS)
-            @JSONField(name="expiryDate")
+            @JSONField(name = "expiryDate")
             private String expiryDate;
             //Y	参见险别代码
-            @JSONField(name="kindCode")
+            @JSONField(name = "kindCode")
             private String kindCode;
             //Y	险别名称(传值要求参见险别代码)
-            @JSONField(name="kindName")
+            @JSONField(name = "kindName")
             private String kindName;
             //CY	单位保额(传值要求参见险别代码)
-            @JSONField(name="unitAmount")
+            @JSONField(name = "unitAmount")
             private String unitAmount;
             //CY	数量(乘客险录入值为座位数-1,其他险别无需录入)
-            @JSONField(name="quantity")
+            @JSONField(name = "quantity")
             private String quantity;
             //CY	服务次数(传值要求参见险别代码)
-            @JSONField(name="serviceTimes")
+            @JSONField(name = "serviceTimes")
             private String serviceTimes;
             //CY	免赔率(车损险可传,传值要求参见险别代码)
-            @JSONField(name="deductibleRate")
+            @JSONField(name = "deductibleRate")
             private String deductibleRate;
             //CY	可选免赔额(附加绝对免赔率特约条款必传,传值要求参见险别代码)
-            @JSONField(name="deductible")
+            @JSONField(name = "deductible")
             private String deductible;
 
             /**
@@ -488,7 +506,8 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
              * @param quantity    乘客数
              * @return
              */
-            public List<CoverageDto> getBusiness(List<KindInfoVo> kindInfoVos, int quantity,ContractMainDto contractMain, HuaTaiActualValueResponse actualValueResponse) {
+            public List<CoverageDto> getBusiness(List<KindInfoVo> kindInfoVos, int quantity, ContractMainDto contractMain,
+                                                 HuaTaiActualValueResponse actualValueResponse) {
                 List<CoverageDto> list = new ArrayList<>();
                 for (KindInfoVo kindInfoVo : kindInfoVos) {
                     CoverageDto coverageDto = new CoverageDto();
@@ -501,7 +520,7 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
                     coverageDto.amount = (int) kindInfoVo.getAmount();
                     coverageDto.validDate = contractMain.getValidDate();
                     coverageDto.expiryDate = contractMain.getExpiryDate();
-                    coverageDto.unitAmount =  String.valueOf(kindInfoVo.getUnitAmount());
+                    coverageDto.unitAmount = String.valueOf(kindInfoVo.getUnitAmount());
                     // 车损
                     if ("A".equals(code)) {
                         //车损险保额
@@ -509,13 +528,13 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
                     }
                     //含三者时,自动赠送救援俩次
                     if ("B".equals(code)) {
-                        CoverageDto coverageDtoTemp =getSRCoverage(contractMain);
+                        CoverageDto coverageDtoTemp = getSRCoverage(contractMain);
                         list.add(coverageDtoTemp);
                     }
                     // 司机
                     if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getDriver(), code) >= 0) {
                         coverageDto.quantity = "1";
-                        coverageDto.unitAmount = String.valueOf( kindInfoVo.getAmount());
+                        coverageDto.unitAmount = String.valueOf(kindInfoVo.getAmount());
                     }
                     // 乘客
                     if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getPassenger(), code) >= 0) {
@@ -531,16 +550,18 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
                 }
                 return list;
             }
+
             //SR	附加机动车道路救援服务特约条款
-            public CoverageDto getSRCoverage(ContractMainDto contractMain){
+            public CoverageDto getSRCoverage(ContractMainDto contractMain) {
                 CoverageDto coverageDto = new CoverageDto();
                 coverageDto.kindCode = "SR";
                 coverageDto.kindName = "附加机动车道路救援服务特约条款";
                 coverageDto.validDate = contractMain.getValidDate();
                 coverageDto.expiryDate = contractMain.getExpiryDate();
                 coverageDto.serviceTimes = "2";
-                return  coverageDto;
+                return coverageDto;
             }
+
             /**
              * 交强险
              *
@@ -560,148 +581,151 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
         @Data
         public static class PlatFormMessageDto implements Serializable {
             //CY	平台查询码
-            @JSONField(name="querySequenceNo")
+            @JSONField(name = "querySequenceNo")
             private String querySequenceNo;
             //CY	平台查询码(获取上年保单信息)
-            @JSONField(name="querySequenceNoForBiRe")
+            @JSONField(name = "querySequenceNoForBiRe")
             private String querySequenceNoForBiRe;
             //CY	平台校验图片转码后得到的验证码
-            @JSONField(name="checkCode")
+            @JSONField(name = "checkCode")
             private String checkCode;
             //CY	平台校验图片转码后得到的验证码(获取上年保单信息)
-            @JSONField(name="checkCodeForBiRe")
+            @JSONField(name = "checkCodeForBiRe")
             private String checkCodeForBiRe;
         }
+
         @NoArgsConstructor
         @Data
-        public static class TaxDto implements Serializable{
+        public static class TaxDto implements Serializable {
             //Y	参见纳税类型代码
-            @JSONField(name="TaxConditionCode")
+            @JSONField(name = "TaxConditionCode")
             private String taxConditionCode;
             //CY	缴税起期(完税必传)
-            @JSONField(name="TaxStartDate")
+            @JSONField(name = "TaxStartDate")
             private String TaxStartDate;
             //CY	缴税止期(完税必传)
-            @JSONField(name="TaxEndDate")
+            @JSONField(name = "TaxEndDate")
             private String TaxEndDate;
             //CY	开具税务机关代码(减税、免税、完税必传)
-            @JSONField(name="TaxDepartmentCode")
+            @JSONField(name = "TaxDepartmentCode")
             private String TaxDepartmentCode;
             //CY	开具税务机关名称(减税、免税、完税必传)
-            @JSONField(name="TaxDepartment")
+            @JSONField(name = "TaxDepartment")
             private String TaxDepartment;
             //CY	减税/免税/完税凭证号(减税、免税、完税必传)
-            @JSONField(name="DocumentNumber")
+            @JSONField(name = "DocumentNumber")
             private String DocumentNumber;
             //Y	纳税人是否同车主(1-是;0-否)
-            @JSONField(name="isSameWithOwner")
+            @JSONField(name = "isSameWithOwner")
             private String isSameWithOwner;
             //CY	纳税人证件类型代码,参见证件类型代码(纳税人不同车主时必填)
-            @JSONField(name="taxpayerIdentifyType")
+            @JSONField(name = "taxpayerIdentifyType")
             private String taxpayerIdentifyType;
             //CY	纳税人证件号码(纳税人不同车主时必填)
-            @JSONField(name="TaxPayerIdentificationCode")
+            @JSONField(name = "TaxPayerIdentificationCode")
             private String TaxPayerIdentificationCode;
             //CY	纳税人名称(纳税人不同车主时必填)
-            @JSONField(name="TaxPayerName")
+            @JSONField(name = "TaxPayerName")
             private String TaxPayerName;
             //CY	参见纳税地区代码(完税必传)
-            @JSONField(name="taxLocationCode")
+            @JSONField(name = "taxLocationCode")
             private String taxLocationCode;
             //CY	完税凭证填发日期(完税必传)(格式:YYYY-MM-DD HH24:MI:SS)
-            @JSONField(name="taxDocumentDate")
+            @JSONField(name = "taxDocumentDate")
             private String taxDocumentDate;
             //CY	参见减免原因代码
-            @JSONField(name="DeductionDueCode")
+            @JSONField(name = "DeductionDueCode")
             private String DeductionDueCode;
             //CY	减免方案代码(1-按金额减免;2-按比例减免)
-            @JSONField(name="DeductionDueType")
+            @JSONField(name = "DeductionDueType")
             private String DeductionDueType;
             //CY	减免金额(减免方案为1时必传)
-            @JSONField(name="Deduction")
+            @JSONField(name = "Deduction")
             private double Deduction;
             //CY	减免比例(取值区间为0-100之间,减免方案为2时必传)
-            @JSONField(name="DeductionDueProportion")
+            @JSONField(name = "DeductionDueProportion")
             private double DeductionDueProportion;
 
-            public TaxDto(VehicleAndVesselTax vesselTax){
+            public TaxDto(VehicleAndVesselTax vesselTax) {
 
                 this.taxConditionCode = "1N";
-                this.isSameWithOwner ="1";
+                this.isSameWithOwner = "1";
             }
         }
+
         @NoArgsConstructor
         @Data
-        public static class ChargingPostDto implements Serializable{
+        public static class ChargingPostDto implements Serializable {
             //Y	充电桩序号
-            @JSONField(name="itemNo")
+            @JSONField(name = "itemNo")
             private String itemNo;
             //Y	充电桩型号
-            @JSONField(name="chargingPostType")
+            @JSONField(name = "chargingPostType")
             private String chargingPostType;
             //Y	充电桩编码
-            @JSONField(name="chargingPostCode")
+            @JSONField(name = "chargingPostCode")
             private String chargingPostCode;
             //Y	充电桩地址
-            @JSONField(name="chargingPostAddress")
+            @JSONField(name = "chargingPostAddress")
             private String chargingPostAddress;
             //Y	充电桩安装地点类型
-            @JSONField(name="chargingPostAddressType")
+            @JSONField(name = "chargingPostAddressType")
             private String chargingPostAddressType;
             //Y	充电桩种类
-            @JSONField(name="chargingPostKind")
+            @JSONField(name = "chargingPostKind")
             private String chargingPostKind;
             //Y	充电桩购买日期(格式:YYYY-MM-DD)
-            @JSONField(name="chargingPostDate")
+            @JSONField(name = "chargingPostDate")
             private String chargingPostDate;
             //CY	UAP对应保额(投保UAP险必传,传值要求参见险别代码)
-            @JSONField(name="amountUAP")
+            @JSONField(name = "amountUAP")
             private String amountUAP;
             //CY	UBP对应保额(投保UBP险必传,传值要求参见险别代码)
-            @JSONField(name="amountUBP")
+            @JSONField(name = "amountUBP")
             private String amountUBP;
         }
     }
+
     @AllArgsConstructor
     @NoArgsConstructor
     @Data
-    public static class CustomerDto implements Serializable{
+    public static class CustomerDto implements Serializable {
         private static final long serialVersionUID = -931739185225437306L;
         //CY	证件号码(个人客户必传)
-        @JSONField(name="identifyNumber")
+        @JSONField(name = "identifyNumber")
         private String identifyNumber;
         //Y	参见客户证件类型代码
-        @JSONField(name="identifyType")
+        @JSONField(name = "identifyType")
         private String identifyType;
         //Y	客户名称
-        @JSONField(name="name")
+        @JSONField(name = "name")
         private String name;
         //Y	客户角色身份(1-投保人;2-被保险人;3-车主)
-        @JSONField(name="role")
+        @JSONField(name = "role")
         private String role;
         //Y	手机号码
-        @JSONField(name="mobile")
+        @JSONField(name = "mobile")
         private String mobile;
         //Y	证件有效起期(格式:YYYY-MM-DD HH24:MI:SS)
-        @JSONField(name="identifyValidDate")
+        @JSONField(name = "identifyValidDate")
         private String identifyValidDate;
         //Y	证件有效止期(格式:YYYY-MM-DD HH24:MI:SS)
-        @JSONField(name="identifyValidEndDate")
+        @JSONField(name = "identifyValidEndDate")
         private String identifyValidEndDate;
         //Y	客户职业(传值要求通过职业查询接口获得)
-        @JSONField(name="occupationCode")
+        @JSONField(name = "occupationCode")
         private String occupationCode;
         //Y	客户类型(1-个人,2-机构)
-        @JSONField(name="type")
+        @JSONField(name = "type")
         private String type;
         //CY	办理人姓名(机构客户必录)
-        @JSONField(name="transactorName")
+        @JSONField(name = "transactorName")
         private String transactorName;
         //CY	组织机构代码(机构客户必录)
-        @JSONField(name="organizeCode")
+        @JSONField(name = "organizeCode")
         private String organizeCode;
         //Y	车辆与被保险人所属关系(1-所有;2-使用;3-管理)
-        @JSONField(name="carInsuredRelation")
+        @JSONField(name = "carInsuredRelation")
         private String carInsuredRelation;
 
         public CustomerDto(CustomerInfoVo customerInfoVo, String role) {
@@ -715,13 +739,14 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
             this.occupationCode = HuaTaiBaseCode.getOccupation().get(randomNum);//后续需要根据接口维护返参到表里
             this.identifyValidDate = customerInfoVo.getIdentifyValidDate() + " " + TimeConstants.START_TIME;
             this.identifyValidEndDate = customerInfoVo.getIdentifyValidEndDate() + " " + TimeConstants.END_TIME;
-            if("2".equals(role)){
+            if ("2".equals(role)) {
                 this.carInsuredRelation = "1";
             }
         }
 
         public List<CustomerDto> getCustomers(CustomerInfoVo ownerInfo, CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo) {
-            return Arrays.asList(new CustomerDto(ownerInfo, "3"), new CustomerDto(policyHolderInfo, "1"), new CustomerDto(insuredPersonInfo, "2"));
+            return Arrays.asList(new CustomerDto(ownerInfo, "3"), new CustomerDto(policyHolderInfo, "1"),
+                    new CustomerDto(insuredPersonInfo, "2"));
         }
     }
 

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/huatai/request/HuaTaiUploadImageRequest.java

@@ -39,7 +39,7 @@ public class HuaTaiUploadImageRequest extends HuaTaiBaseRequest {
     public HuaTaiUploadImageRequest(InsAreaCompany insAreaCompany, HuaTaiConfigureParameters huaTaiConfigureParameters){
         this.loginComCode = huaTaiConfigureParameters.getComCode();
         if(StringUtils.isNotEmpty(insAreaCompany.getJqapplyno()) && StringUtils.isNotEmpty(insAreaCompany.getSyapplyno())){
-            this.bizNo = insAreaCompany.getJqapplyno();
+            this.bizNo = insAreaCompany.getSyapplyno();
         }else if(StringUtils.isNotEmpty(insAreaCompany.getJqapplyno())){
             this.bizNo = insAreaCompany.getJqapplyno();
         }else if(StringUtils.isNotEmpty(insAreaCompany.getSyapplyno())){

+ 12 - 9
src/main/java/com/ydtech/modules/order/service/impl/HuaTaiOrderApiServiceImpl.java

@@ -156,7 +156,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
         // 2. 调用转投保接口
         HuaTaiSubmitResponse response = submitForUnderwriting(yaQuoteInfoVo, insAreaCompany, huaTaiConfigureParameters, engageList);
 
-        if("-1".equals(response.getHead().getReturnCode())){
+        if ("-1".equals(response.getHead().getReturnCode())) {
             throw new SystemException(response.getHead().getReturnMessage());
         }
 
@@ -210,11 +210,13 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
             if ("0,6,7".contains(jqStatus) || "0,6,7".contains(syStatus)) {
                 totalStatus = "0";
             }
-        } else if ((haveJQFlag && !haveSYFlag) || (!haveJQFlag && haveSYFlag)) {//单保交强或单保商业
+        } else {//单保交强或单保商业
+
             String status = jqStatus;
             if (StringUtils.isNotEmpty(syStatus)) {
                 status = syStatus;
             }
+
             if ("4,7".contains(status)) {
                 totalStatus = "4";
             } else if ("1,3".contains(status)) {
@@ -243,7 +245,8 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
             } else {//当状态为核保不通过时,调整保单状态为报价中
                 insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
                 insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
-                return HttpResult.error("核保不通过:" + huaTaiSubmitCommon.getNotion());//需要处理放入核保原因
+                String notion = jqNotion.toString() + syNotion + huaTaiSubmitCommon.getNotion();
+                return HttpResult.error("核保不通过:" + notion);//需要处理放入核保原因
             }
         } else {
             String notion = jqNotion.toString() + syNotion.toString();
@@ -348,6 +351,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
                 }
             }
         }
+
         if (jqExistFlag || syExistFlag) {
             insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
             insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
@@ -621,13 +625,12 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
                     }
                 }
             }
+
             if (StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno().equals(appliResult.getContractNo())) {
                 haveSYFlag = true;
-                if (insAreaCompany.getJqapplyno().equals(appliResult.getContractNo())) {
-                    syStatus = appliResult.getUnderWriteFlag();
-                    for (HuaTaiSubmitStatusQueryResponse.Notion notion : appliResult.getNotion()) {
-                        syNotion.append(notion.getUWNotion() + ",");
-                    }
+                syStatus = appliResult.getUnderWriteFlag();
+                for (HuaTaiSubmitStatusQueryResponse.Notion notion : appliResult.getNotion()) {
+                    syNotion.append(notion.getUWNotion() + ",");
                 }
             }
         }
@@ -653,7 +656,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
             } else {
                 totalUnderWriteInd = "6";
             }
-        } else if ((haveJQFlag && !haveSYFlag) || (!haveJQFlag && haveSYFlag)) {//单保交强或单保商业
+        } else {//单保交强或单保商业
             String status = jqStatus;
             if (StringUtils.isNotEmpty(syStatus)) {
                 status = syStatus;