wks 2 жил өмнө
parent
commit
0422079472

+ 85 - 108
src/main/java/com/ydtech/modules/order/service/impl/YongchengOrderApiServiceImpl.java

@@ -24,7 +24,6 @@ import com.ydtech.modules.esm.service.EsmInsCompanyService;
 import com.ydtech.modules.ins.dao.InsAlltrustRegionMapper;
 import com.ydtech.modules.ins.model.dto.CarInsDateDto;
 import com.ydtech.modules.ins.model.dto.CarInsPolicyDto;
-import com.ydtech.modules.ins.model.guoren.PolicyResp;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
@@ -51,7 +50,6 @@ import com.ydtech.modules.ins.model.yc.ruote.Base;
 import com.ydtech.modules.ins.model.yc.ruote.Ruote;
 import com.ydtech.modules.ins.model.yc.ruote.response.RuoteResponse;
 import com.ydtech.modules.ins.model.yc.ruote.response.TfiWarnListResponse;
-import com.ydtech.modules.ins.service.InsApiLogService;
 import com.ydtech.modules.order.components.ConfigureParametersComponents;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.components.VerificationCodeIdentification;
@@ -72,13 +70,13 @@ import com.ydtech.modules.protocol.utils.AssertionUtils;
 import com.ydtech.utils.DateTimeUtil;
 import com.ydtech.utils.IDCardUtils;
 import com.ydtech.utils.IPUtil;
-import com.ydtech.utils.StringUtils;
 import com.ydtech.utils.baidu.FileUtil;
+import lombok.RequiredArgsConstructor;
+import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -95,26 +93,11 @@ import static com.ydtech.modules.order.constants.OrderCacheConstant.*;
 
 
 @Service
+@RequiredArgsConstructor
 public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
     private static final Logger log = LoggerFactory.getLogger("alltrust");
 
-    @Autowired
-    private YongchengApiConfigurationProperties apiComponents;
-
-    @Autowired
-    private InsAlltrustRegionMapper insAlltrustRegionMapper;
-
-    @Autowired
-    private InsOrdersComponents insOrdersComponents;
-
-    @Autowired
-    private RedisTemplate redisTemplate;
-
-    //请求信息列表
-    List<String> requestInfoList = new ArrayList<>();
-
-
     @Value("${upload.file.path}")
     private String uploadFilePath;
 
@@ -124,34 +107,32 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
     @Value("${api.url}")
     private String apiUrl;
 
-    @Autowired
-    private InsAreaCompanyService insAreaCompanyService;
+    private final YongchengApiConfigurationProperties apiComponents;
 
-    @Autowired
-    private InsOrdersService insOrdersService;
+    private final InsAlltrustRegionMapper insAlltrustRegionMapper;
 
-    @Autowired
-    private InsTaskImagesService insTaskImagesService;
+    private final InsOrdersComponents insOrdersComponents;
 
-    @Autowired
-    private EsmInsAttachInsureMapper esmInsAttachInsureMapper;
+    private final StringRedisTemplate redisTemplate;
 
-    @Autowired
-    private EsmInsAttachInsureDetailsMapper esmInsAttachInsureDetailsMapper;
+    private final InsAreaCompanyService insAreaCompanyService;
 
-    @Autowired
-    private EsmInsCompanyService esmInsCompanyService;
+    private final InsOrdersService insOrdersService;
 
-    @Autowired
-    InsApiLogService insApiLogService;
+    private final InsTaskImagesService insTaskImagesService;
 
-    @Autowired
-    ConfigureParametersComponents configureParametersComponents;
+    private final EsmInsAttachInsureMapper esmInsAttachInsureMapper;
 
-    @Autowired
-    private YongchengRequestApiComponents yongchengRequestApiComponents;
+    private final EsmInsAttachInsureDetailsMapper esmInsAttachInsureDetailsMapper;
+
+    private final EsmInsCompanyService esmInsCompanyService;
+
+    private final ConfigureParametersComponents configureParametersComponents;
+
+    private final YongchengRequestApiComponents yongchengRequestApiComponents;
+
+    private final VerificationCodeIdentification verificationCodeIdentification;
 
-    //
     //==============================API 方式
     //
     public void gainVehicleModel(YcConfigureParameters ycConfigureParameters, CarInfoVo carInfo) {
@@ -172,30 +153,39 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
         }
 
         //车辆年款不能超过注册日期
-        List<ModelsQueryResponse.VehicleInfo> vehicleInfoList =
-                rd.getVehicleInfoList().stream().filter(a -> DateTimeUtil.dateIsAfter(carInfo.getRegisterDate(), a.getVehicleYear())).sorted(Comparator.comparing(ModelsQueryResponse.VehicleInfo::getVehiclePrice)).collect(Collectors.toList());
+        List<ModelsQueryResponse.VehicleInfo> vehicleInfoList = rd.getVehicleInfoList().stream()
+                .filter(a -> DateTimeUtil.dateIsAfter(carInfo.getRegisterDate(), a.getVehicleYear()))
+                .sorted(Comparator.comparing(ModelsQueryResponse.VehicleInfo::getVehiclePrice))
+                .collect(Collectors.toList());
 
         //匹配的车辆信息数据  为空
         if (CollUtil.isEmpty(vehicleInfoList)) {
 
             //匹配金额
-            vehicleInfoList =
-                    rd.getVehicleInfoList().stream().filter(a -> a.getVehiclePrice().equals(carInfo.getPurchasePrice())).collect(Collectors.toList());
+            vehicleInfoList = rd.getVehicleInfoList().stream()
+                    .filter(a -> a.getVehiclePrice().equals(carInfo.getPurchasePrice()))
+                    .collect(Collectors.toList());
+
             if (CollUtil.isNotEmpty(vehicleInfoList)) {
                 buildCarInfo(carInfo, vehicleInfoList.get(0));
                 return;
             }
 
             //金额升序
-            vehicleInfoList =
-                    rd.getVehicleInfoList().stream().sorted(Comparator.comparing(ModelsQueryResponse.VehicleInfo::getVehiclePrice)).collect(Collectors.toList());
+            vehicleInfoList = rd.getVehicleInfoList().stream()
+                    .sorted(Comparator.comparing(ModelsQueryResponse.VehicleInfo::getVehiclePrice))
+                    .collect(Collectors.toList());
+
             buildCarInfo(carInfo, vehicleInfoList.get(0));
             return;
         }
 
         //匹配的车辆信息数据
-        ModelsQueryResponse.VehicleInfo matchVehicleInfo =
-                vehicleInfoList.stream().filter(a -> a.getVehiclePrice().equals(carInfo.getPurchasePrice())).findFirst().orElse(null);
+        ModelsQueryResponse.VehicleInfo matchVehicleInfo = vehicleInfoList.stream()
+                .filter(a -> a.getVehiclePrice().equals(carInfo.getPurchasePrice()))
+                .findFirst()
+                .orElse(null);
+
         if (null != matchVehicleInfo) {
             buildCarInfo(carInfo, matchVehicleInfo);
             return;
@@ -203,11 +193,12 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
         //匹配的车辆信息数据里  未匹配成功   默认选择第一条
         //排序  年款降序  金额升序
-        vehicleInfoList = vehicleInfoList.stream().sorted(Comparator.comparing(ModelsQueryResponse.VehicleInfo::getVehicleYear)
-                        .thenComparing((o1, o2) -> Integer.compare(StringUtils.toInt(o2.getVehiclePrice()),
-                                StringUtils.toInt(o1.getVehiclePrice()))).reversed())
+        vehicleInfoList = vehicleInfoList.stream()
+                .sorted(Comparator.comparing(ModelsQueryResponse.VehicleInfo::getVehicleYear)
+                        .thenComparing((o1, o2) -> Integer.compare(Integer.parseInt(o2.getVehiclePrice()),
+                                Integer.parseInt(o1.getVehiclePrice())))
+                        .reversed())
                 .collect(Collectors.toList());
-
         buildCarInfo(carInfo, vehicleInfoList.get(0));
 
     }
@@ -244,9 +235,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
      * @return
      * @throws JsonProcessingException
      */
-    private RuoteResponse getResponse(Ruote m, String vinNo) throws JsonProcessingException {
+    private RuoteResponse getResponse(Ruote m, String vinNo, List<String> requestInfoList) throws JsonProcessingException {
         boolean boo = false;
-        boolean isBiRepeat = true;
         RuoteResponse rr = yongchengRequestApiComponents.newPremiumXnyCalculation(m);
         //交强
         m.getRequestLabel().getCondition().getVhl().setCCheckCodeJQ("");
@@ -260,41 +250,38 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
         }
         //处理返回信息
         //1、交强险重复投保处理
-        boo = ciRepetitionInsure(rr, m);
+        boo = ciRepetitionInsure(rr, m, requestInfoList);
         if (!boo) {
             InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 交强险重复投保处理", vinNo);
-            rr = this.getResponse(m, vinNo);
+            rr = this.getResponse(m, vinNo, requestInfoList);
         }
 
         //1、商业险重复投保处理
-        boo = commerceRepetitionInsure(rr, m);
+        boo = commerceRepetitionInsure(rr, m, requestInfoList);
         if (!boo) {
             InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 商业险重复投保处理", vinNo);
-            rr = this.getResponse(m, vinNo);
+            rr = this.getResponse(m, vinNo, requestInfoList);
         }
 
-
         //2、转保处理
         boo = reinsurance(rr, m);
         if (!boo) {
             InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 转保处理", vinNo);
-            rr = this.getResponse(m, vinNo);
+            rr = this.getResponse(m, vinNo, requestInfoList);
         }
 
-        if (isBiRepeat) {
-            //3、商业险日期处理
-            boo = biRepetitionInsure(rr, m);
-            if (!boo) {
-                InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 商业险日期处理", vinNo);
-                rr = this.getResponse(m, vinNo);
-            }
+        //3、商业险日期处理
+        boo = biRepetitionInsure(rr, m, requestInfoList);
+        if (!boo) {
+            InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 商业险日期处理", vinNo);
+            rr = this.getResponse(m, vinNo, requestInfoList);
         }
 
         // 转保验证码
         boo = reinsuranceCodeError(rr, m);
         if (!boo) {
             InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 转保处理", vinNo);
-            rr = this.getResponse(m, vinNo);
+            rr = this.getResponse(m, vinNo, requestInfoList);
         }
         return rr;
     }
@@ -325,7 +312,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
     @Override
     public HttpResult quoteApi(BaseQuoteVo<AccidentalDrivingVo> quoteVo) throws JsonProcessingException {
 
-        requestInfoList = new ArrayList<>();
+        List<String> requestInfoList = new ArrayList<>();
         //获取报价信息
         BaseQuoteInfoVo yaQuoteInfoVo = insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo());
 
@@ -333,7 +320,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
         Ruote m = this.builderParams(quoteVo, yaQuoteInfoVo);
 
         //递归报价
-        RuoteResponse rr = this.getResponse(m, yaQuoteInfoVo.getCarInfo().getVinNo());
+        RuoteResponse rr = this.getResponse(m, yaQuoteInfoVo.getCarInfo().getVinNo(), requestInfoList);
 
         //错误信息
         StringBuilder errorInfo = this.getErrorInfo(rr);
@@ -366,13 +353,10 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
     }
 
-    //endregion
-
-
     /**
      * 报价  交强险 重复 投保业务处理
      */
-    public boolean ciRepetitionInsure(RuoteResponse rr, Ruote m) {
+    public boolean ciRepetitionInsure(RuoteResponse rr, Ruote m, List<String> requestInfoList) {
         String errorMsg = rr.getHead().getErrorMessage();
 
         if (rr.getHead().getErrorCode().equals("009999") && errorMsg.contains("重复投保") && errorMsg.contains("机动车交通事故强制险")) {
@@ -394,8 +378,9 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
             }
 
             String newEndDate = DateTimeUtil.getEndTimeOfDayStr(end, DateTimeUtil.DATETIME_PATTERN);
-            System.err.println("新起:" + newStartDate);
-            System.err.println("新止:" + newEndDate);
+            log.error("新起:{}", newStartDate);
+            log.error("新止:{}", newEndDate);
+
             CarInsDateDto cidd = Base.buildInsDate(newStartDate, newEndDate);
 
             m.getRequestLabel().getCondition().getBase().setTInsrncBgnTmJQ(cidd.getStartDate());
@@ -413,7 +398,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
     /**
      * 报价  商业 重复 投保业务处理
      */
-    public boolean commerceRepetitionInsure(RuoteResponse rr, Ruote m) {
+    public boolean commerceRepetitionInsure(RuoteResponse rr, Ruote m, List<String> requestInfoList) {
         String errorMsg = rr.getHead().getErrorMessage();
         if (rr.getHead().getErrorCode().equals("009999") && errorMsg.contains("重复投保") && errorMsg.contains("机动车综合商业保险")) {
             requestInfoList.add(errorMsg);
@@ -435,8 +420,9 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
             LocalDateTime end = start.plusYears(1L).minusDays(1L);
             String newStartDate = DateTimeUtil.getStartTimeOfDayStr(start, DateTimeUtil.DATETIME_PATTERN);
             String newEndDate = DateTimeUtil.getEndTimeOfDayStr(end, DateTimeUtil.DATETIME_PATTERN);
-            System.err.println("商业新起:" + newStartDate);
-            System.err.println("商业新止:" + newEndDate);
+
+            log.error("商业新起:{}", newStartDate);
+            log.error("商业新止:{}", newEndDate);
 
             m.getRequestLabel().getCondition().getBase().setTInsrncBgnTmSY(newStartDate);
             m.getRequestLabel().getCondition().getBase().setTInsrncEndTmSY(newEndDate);
@@ -454,16 +440,12 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
     /**
      * 报价  商业险 重复 投保业务处理
      */
-    public boolean biRepetitionInsure(RuoteResponse rr, Ruote m) {
+    public boolean biRepetitionInsure(RuoteResponse rr, Ruote m, List<String> requestInfoList) {
 
         if (rr.getHead().getErrorCode().equals("000000") && null != rr.getTfiWarnList() && CollUtil.isNotEmpty(rr.getTfiWarnList().getTfiWarnData())) {
 
-            TfiWarnListResponse.TfiWarnData tfiWarnData = rr.getTfiWarnList().getTfiWarnData().stream()
-                    .filter(Objects::nonNull)
-                    .filter(item -> StringUtils.isNotEmpty(item.getWarnMessage()))
-                    .filter(item -> item.getWarnMessage().contains("终保日期"))
-                    .findFirst()
-                    .orElse(null);
+            TfiWarnListResponse.TfiWarnData tfiWarnData =
+                    rr.getTfiWarnList().getTfiWarnData().stream().filter(Objects::nonNull).filter(item -> StringUtils.isNotEmpty(item.getWarnMessage())).filter(item -> item.getWarnMessage().contains("终保日期")).findFirst().orElse(null);
 
             if (null == tfiWarnData) return true;
 
@@ -503,7 +485,6 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
     public boolean reinsuranceCodeError(RuoteResponse rr, Ruote m) {
 
         if (rr.getHead().getErrorMessage().contains("录入的校验码有误")) {
-            requestInfoList.add(rr.getHead().getErrorMessage());
             //转保信息清空  重新报价
             m.getRequestLabel().getCondition().getVhl().setCBusType("0");
             m.getRequestLabel().getCondition().getVhl().setCQryCdeJQ("");
@@ -516,8 +497,6 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
     }
 
-    @Autowired
-    private VerificationCodeIdentification verificationCodeIdentification;
 
 
     /**
@@ -531,10 +510,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
             //转保调用自动识别转保码
             if (StringUtils.isNotEmpty(cCheckCodeJQ) || StringUtils.isNotEmpty(cCheckCodeSY)) {
-                log.info(String.format("永诚API方式 - xml请求 报价,车牌号《%s》 ->   转保业务处理----------------",
-                        m.getRequestLabel().getCondition().getVhl().getCPlateNo()));
-
-                requestInfoList.add(rr.getHead().getErrorMessage());
+                log.info("永诚API方式 - xml请求 报价,车牌号《{}》 ->   转保业务处理----------------",
+                        m.getRequestLabel().getCondition().getVhl().getCPlateNo());
                 //调用python ocr
                 RecognitionRequest recognitionRequest = new RecognitionRequest();
 
@@ -599,8 +576,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
         try {
             AuditResponse rd = yongchengRequestApiComponents.newXnyUnderwritingService(m);
             if (rd.getResponseHead().getReturnCode().equals("0000")) {
-                String statusJq = StringUtils.toString(rd.getStatusJq(), "");
-                String statusSy = StringUtils.toString(rd.getStatusSY(), "");
+                String statusJq = rd.getStatusJq();
+                String statusSy = rd.getStatusSY();
                 if (statusJq.equals("0") || statusSy.equals("0")) {
                     iac.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
                 } else if (statusJq.equals("3") || statusSy.equals("3")) {
@@ -624,8 +601,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
             iac.setAuditid(StpUtil.getLoginId().toString());
             iac.setInsOrderNo(rd.getOrderCode());
             iac.setAudittime(LocalDateTime.now());
-            iac.setJqapplyno(StringUtils.toString(rd.getPolicyAppNoJQ(), ""));
-            iac.setSyapplyno(StringUtils.toString(rd.getPolicyAppNoSY(), ""));
+            iac.setJqapplyno(rd.getPolicyAppNoJQ());
+            iac.setSyapplyno(rd.getPolicyAppNoSY());
             iac.setJqappoint(""); //交强特别约定
             iac.setSyappoint(""); //商业特别约定
 
@@ -745,7 +722,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
                         iac.setJqpolicyno(param.getCiPolicyNo());
                     }
 
-                    if(StringUtils.isNotEmpty(param.getYwPolicyNo())){
+                    if (StringUtils.isNotEmpty(param.getYwPolicyNo())) {
                         DrivingInsuranceDto drivingInsuranceDto = new DrivingInsuranceDto();
                         drivingInsuranceDto.setPolicyNumber(param.getYwPolicyNo());
                         drivingInsuranceDto.setApplicationNumber(param.getYwPolicyAppNo());
@@ -853,7 +830,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
                 //交强
                 if (StringUtils.isNotEmpty(pResp.getJqpolicyUrl())) {
-                    String jqInsUrl = pResp.getJqpolicyUrl().replaceAll(";pkid", "&pkid");
+                    String jqInsUrl = pResp.getJqpolicyUrl().replace(";pkid", "&pkid");
                     String jqUrl = gainCarInsPolicy(jqInsUrl, licensePlate + jqbd, licensePlate);
                     cipDto.setJqUrl(jqUrl);
 
@@ -861,7 +838,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
                 //商业
                 if (StringUtils.isNotEmpty(pResp.getSypolicyUrl())) {
-                    String syInsUrl = pResp.getSypolicyUrl().replaceAll(";pkid", "&pkid");
+                    String syInsUrl = pResp.getSypolicyUrl().replace(";pkid", "&pkid");
                     String syUrl = gainCarInsPolicy(syInsUrl, licensePlate + sybd, licensePlate);
                     cipDto.setSyUrl(syUrl);
 
@@ -869,7 +846,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
                 // 非车险
                 if (StringUtils.isNotEmpty(pResp.getYwpolicUrl())) {
-                    String jyInsUrl = pResp.getYwpolicUrl().replaceAll(";pkid", "&pkid");
+                    String jyInsUrl = pResp.getYwpolicUrl().replace(";pkid", "&pkid");
                     String jyUrl = gainCarInsPolicy(jyInsUrl, licensePlate + jybd, licensePlate);
                     cipDto.setJyUrl(jyUrl);
                 }
@@ -920,7 +897,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
                     ati.setCompanyId(accidentalDrivingVo.getCompanyCode());
                     ati.setType(AttachInsureEnum.AI001.getCode());
                     ati.setEnable(WhetherEnum.YES.getCode());
-                    ati.setRestrictNum(StringUtils.toInt(a.getNPurchaseLimitsNum()));
+                    ati.setRestrictNum(Integer.parseInt(a.getNPurchaseLimitsNum()));
                     esmInsAttachInsureMapper.insert(ati);
                     eiaiList.add(ati);
                 });
@@ -971,7 +948,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
                 ati.setCompanyId(accidentalDrivingVo.getCompanyCode());
                 ati.setType(AttachInsureEnum.AI001.getCode());
                 ati.setEnable(WhetherEnum.YES.getCode());
-                ati.setRestrictNum(StringUtils.toInt(item.getNPurchaseLimitsNum()));
+                ati.setRestrictNum(Integer.parseInt(item.getNPurchaseLimitsNum()));
                 insAttachInsureList.add(ati);
             });
         }
@@ -1070,7 +1047,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
                 ati.setCompanyId(accidentalDrivingVo.getCompanyCode());
                 ati.setType(AttachInsureEnum.AI001.getCode());
                 ati.setEnable(WhetherEnum.YES.getCode());
-                ati.setRestrictNum(StringUtils.toInt(a.getNPurchaseLimitsNum()));
+                ati.setRestrictNum(Integer.parseInt(a.getNPurchaseLimitsNum()));
 
                 esmInsAttachInsureMapper.insert(ati);
 
@@ -1088,7 +1065,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
                         atiDetails.setCarSum(d.getNInsuranceAmountCar());
                         atiDetails.setSeatSum(d.getNInsuranceAmountSeat());
                         atiDetails.setPremium(d.getNLiabilityPremium());
-                        total.addAndGet(StringUtils.toInt(d.getNLiabilityPremium()));
+                        total.addAndGet(Integer.parseInt(d.getNLiabilityPremium()));
                         esmInsAttachInsureDetailsMapper.insert(atiDetails);
                     });
 
@@ -1146,7 +1123,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
                 iac = buildCallBack(iac, param);
 
                 InsOrders order = insOrdersService.getById(iac.getOrderno());
-                if (StringUtils.toInt(order.getOrderstatus()) < StringUtils.toInt(iac.getOrderstatus())) {
+                if (Integer.parseInt(order.getOrderstatus()) < Integer.parseInt(iac.getOrderstatus())) {
                     order.setOrderstatus(iac.getOrderstatus());
                 }
 
@@ -1199,10 +1176,10 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
         //交强保费 含税
         double jqPremium =
-                StringUtils.toDouble(responseData.getBase().getNBefTaxPrmJQ()) + StringUtils.toDouble(responseData.getBase().getNAppTaxAmtJQ());
+                Double.parseDouble(responseData.getBase().getNBefTaxPrmJQ()) + Double.parseDouble(responseData.getBase().getNAppTaxAmtJQ());
         //商业保费 含税
         double syPremium =
-                StringUtils.toDouble(responseData.getBase().getNBefTaxPrmSY()) + StringUtils.toDouble(responseData.getBase().getNAppTaxAmtSY());
+                Double.parseDouble(responseData.getBase().getNBefTaxPrmSY()) + Double.parseDouble(responseData.getBase().getNAppTaxAmtSY());
         //保险公司订单号
         String insOrderNo = responseData.getBase().getCresvTxt6();