Parcourir la source

提交签章码不好识别问题,
提交报价异常问题

hxl13994548489 il y a 2 ans
Parent
commit
49af500d7f

+ 25 - 18
src/main/java/com/ydtech/modules/order/service/impl/PingAnOrderApiServiceImpl.java

@@ -260,7 +260,7 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
                 throw new SystemException(searchPAVehicleListResponse.getResultMessage());
             }
             if(searchPAVehicleListResponse.getModels()==null || searchPAVehicleListResponse.getModels().size()==0){
-                throw new SystemException("车型检索失败,请输入正确车型");
+                throw new SystemException("未匹配到车型,请输入正确车型");
             }
             List<SearchPAVehicleListResponse.ModelsDto> models = searchPAVehicleListResponse.getModels();
             SearchPAVehicleListResponse.ModelsDto model = new SearchPAVehicleListResponse.ModelsDto();
@@ -413,20 +413,24 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
         double jqPremium = 0;
         //车船税
         double sumPayTax = 0;
+        //车船税+交强费
+        double ciSumPermium =0;
         if (!ObjectUtils.isEmpty(forceQuoteResult)) {
             //交+车船税总计
-            double totalPremium = Double.parseDouble(forceQuoteResult.getTotalPremium() == null ? "0" : forceQuoteResult.getTotalPremium());
+            ciSumPermium = Double.parseDouble(forceQuoteResult.getTotalPremium() == null ? "0" : forceQuoteResult.getTotalPremium());
             jqPremium = Double.parseDouble(forceQuoteResult.getForcePremium() == null ? "0" : forceQuoteResult.getForcePremium());
             sumPayTax = Double.parseDouble(forceQuoteResult.getTaxPremium() == null ? "0" : forceQuoteResult.getTaxPremium());
-            quoteRespVo.setCiSumPermium(totalPremium);
+            quoteRespVo.setCiSumPermium(ciSumPermium);
             quoteRespVo.setJqPremium(jqPremium);
             //交强保单号
             quoteRespVo.setJqApplyNo(forceQuoteResult.getQueryRequestCode());
         }
         QuoteResponse.QuoteDTO forceQuote = response.getForceQuote();
-        // 交强
-        quoteRespVo.setStartDateJq(forceQuote.getBeginDate());
-        quoteRespVo.setEndDateJq(forceQuote.getEndDate());
+        if(forceQuote!=null ){
+            // 交强
+            quoteRespVo.setStartDateJq(forceQuote.getBeginDate());
+            quoteRespVo.setEndDateJq(forceQuote.getEndDate());
+        }
         // 商业险
         QuoteResponse.BizQuoteResultDTO bizQuoteResult = response.getBizQuoteResult();
         //商业险险种
@@ -438,12 +442,11 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
             //商业险保费
             quoteRespVo.setSyPremium(syPremium);
             QuoteResponse.QuoteDTO bizQuote = response.getBizQuote();
-            // 交强
-            quoteRespVo.setStartDateJq(forceQuote.getBeginDate());
-            quoteRespVo.setEndDateJq(forceQuote.getEndDate());
-            // 商业 起保开始和结束时间
-            quoteRespVo.setStartDateSy(bizQuote.getBeginDate());
-            quoteRespVo.setEndDateSy(bizQuote.getEndDate());
+            if(bizQuote!=null){
+                // 商业 起保开始和结束时间
+                quoteRespVo.setStartDateSy(bizQuote.getBeginDate());
+                quoteRespVo.setEndDateSy(bizQuote.getEndDate());
+            }
             // 商业险险种
             List<KindInfoVo> kindList = yaQuoteInfoVo.getKindList();
             QuoteKindRespVo kind;
@@ -515,7 +518,7 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
         quoteRespVo.setTaxAmount(sumPayTax);
         quoteRespVo.setJyPremium(jyPremium);
         //交强险和车船税合计
-        quoteRespVo.setCiSumPermium(CalculateUtils.add(jqPremium, sumPayTax));
+        quoteRespVo.setCiSumPermium(ciSumPermium);
         //保费合计
         quoteRespVo.setSumPermium(CalculateUtils.add(jqPremium, syPremium, sumPayTax, jyPremium));
         quoteRespVo.setTotalAdjustRate(0);
@@ -544,11 +547,15 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
             insAreaCompany.setAccidentInfo(JSON.parseArray(JSON.toJSONString(yjList)));
         }
         // 车船税
-        QuoteResponse.ForceQuoteResultDTO.TaxDTO tax = response.getForceQuoteResult().getTax();
-        TaxArrears taxArrears = new TaxArrears("往年欠税", Double.parseDouble(tax.getLastYearPay()),
-                Double.parseDouble(tax.getDelayPayMoney()));
-        List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
-        insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));
+        if(response.getForceQuoteResult()!=null){
+            QuoteResponse.ForceQuoteResultDTO.TaxDTO tax = response.getForceQuoteResult().getTax();
+            if(tax!=null){
+                TaxArrears taxArrears = new TaxArrears("往年欠税", Double.parseDouble(tax.getLastYearPay()),
+                        Double.parseDouble(tax.getDelayPayMoney()));
+                List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
+                insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));
+            }
+        }
         // centile  商业险评分      商业险出现次数
         //商业出险次数
         if(response.getBizQuoteResult()!=null && response.getBizQuoteResult().getClaimNumber()!=null){

+ 2 - 2
src/main/java/com/ydtech/modules/order/utils/QrCodeGenerator.java

@@ -43,9 +43,9 @@ public class QrCodeGenerator {
 
 
     // 二维码宽度
-    private static final int DEFAULT_QR_CODE_WIDTH = 300;
+    private static final int DEFAULT_QR_CODE_WIDTH = 200;
     // 二维码高度
-    private static final int DEFAULT_QR_CODE_HEIGHT = 300;
+    private static final int DEFAULT_QR_CODE_HEIGHT = 200;
 
 
     /**