Selaa lähdekoodia

1. 代码优化

ligang134 2 vuotta sitten
vanhempi
commit
e6adb3b3e7

+ 5 - 0
src/main/java/com/ydtech/modules/ins/service/impl/InsAlltrustApiServiceImpl.java

@@ -1604,6 +1604,11 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
             insAreaCompany.setKindinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getKindList())));
         }
 
+        //出险信息
+        insAreaCompany.setAccidentStrInfo(quoteRespVo.getAccidentInfoStr());
+        //评分
+        insAreaCompany.setScore(quoteRespVo.getILogPreUdwMess());
+
 
         insAreaCompanyService.save(insAreaCompany);
         return insAreaCompany;

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

@@ -262,6 +262,20 @@ public class InsAreaCompany implements Serializable {
     @TableField(value = "sy_end_date")
     private String syEndDate;
 
+    /**
+     * 出险 字符串 信息
+     * lig 新增字段  2023-10-10
+     */
+    @TableField(value = "accident_str_info")
+    private String accidentStrInfo;
+
+    /**
+     * 评分
+     * lig 新增字段  2023-10-10
+     */
+    @TableField(value = "score")
+    private String score;
+
 
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
@@ -289,6 +303,9 @@ public class InsAreaCompany implements Serializable {
         this.syStartDate = quoteRespVo.getStartDateSy();
         this.syEndDate = quoteRespVo.getEndDateSy();
 
+        this.accidentStrInfo = quoteRespVo.getAccidentInfoStr();
+        this.score = quoteRespVo.getILogPreUdwMess();
+
     }
 
 }

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

@@ -320,6 +320,8 @@ public class OrderVo implements Serializable {
     @TableField(value = "cross_insurance", typeHandler = FastjsonTypeHandler.class)
     private JSONArray crossInsurance;
 
+
+
     /**
      * 扩展字段
      */

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

@@ -32,4 +32,24 @@ public class YaExtendInfoDto implements Serializable {
 
     @ApiModelProperty("交强深度定价分档")
     private String deepPriceGradeCI;
+
+
+    /**
+     *  临时增加
+     *
+     * @author: lig
+     * @date: 2023年10月10日 0010
+     */
+    @ApiModelProperty("评分")
+    private String score;
+
+
+    /**
+     *  临时增加
+     *
+     * @author: lig
+     * @date: 2023年10月10日 0010
+     */
+    @ApiModelProperty("出险信息")
+    private String accidentInfoStr;
 }

+ 28 - 22
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -28,10 +28,7 @@ import com.ydtech.modules.order.entity.BasePageResult;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsOrders;
 import com.ydtech.modules.order.entity.bo.UnderwritingRulesBo;
-import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
-import com.ydtech.modules.order.entity.vo.OrderQueryVo;
-import com.ydtech.modules.order.entity.vo.OrderVo;
-import com.ydtech.modules.order.entity.vo.VerifyOrdersVo;
+import com.ydtech.modules.order.entity.vo.*;
 import com.ydtech.modules.order.entity.vo.ya.YaExtendInfoDto;
 import com.ydtech.modules.order.service.InsAreaCompanyService;
 import com.ydtech.modules.order.service.InsOrdersService;
@@ -212,35 +209,44 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
     @Override
     public HttpResult<OrderVo> getByCompanyId(@NotBlank(message = "子订单不能为空") String companyId) {
         OrderVo orderAndAreaCompany = baseMapper.getOrderAndAreaCompany(companyId);
+
+        YaExtendInfoDto yaExtendInfoDto = new YaExtendInfoDto();
         // 永安财险
         if (InsuranceEnum.YAIC.getCode().equals(orderAndAreaCompany.getCompanyId().substring(0, 4))) {
             JSONObject reptxt = orderAndAreaCompany.getReptxt();
             ResponseDataC2 responseDataC2 = JSON.toJavaObject(reptxt, ResponseDataC2.class);
             List<ExtendInfoDto> extendInfoDtos = responseDataC2.getResponseBody().getExtendInfo();
             Map<String, String> stringStringMap = extendInfoDtos.stream().collect(LinkedHashMap::new, (m, v) -> m.put(v.getKey(), v.getValue()), LinkedHashMap::putAll);
-            YaExtendInfoDto yaExtendInfoDto = MapToYaExtendInfoDto.INSTANCE.mapToYaExtendInfoDto(stringStringMap);
+            yaExtendInfoDto = MapToYaExtendInfoDto.INSTANCE.mapToYaExtendInfoDto(stringStringMap);
             orderAndAreaCompany.setExtendInfo(yaExtendInfoDto);
-        }else
-        //永诚
-        if (InsuranceEnum.AICS.getCode().equals(orderAndAreaCompany.getCompanyId().substring(0, 4))) {
-
-            InsAreaCompany iac = insAreaCompanyService.getById(companyId);
-            orderAndAreaCompany.setJqstartdate(iac.getJqStartDate());
-            orderAndAreaCompany.setJqenddate(iac.getJqEndDate());
-
-            orderAndAreaCompany.setSystartdate(iac.getSyStartDate());
-            orderAndAreaCompany.setSyenddate(iac.getSyEndDate());
-
-        }
-        else {
-            orderAndAreaCompany.setExtendInfo(new YaExtendInfoDto());
         }
+//        else
+//        //永诚
+//        if (InsuranceEnum.AICS.getCode().equals(orderAndAreaCompany.getCompanyId().substring(0, 4))) {
+//
+//            InsAreaCompany iac = insAreaCompanyService.getById(companyId);
+//            orderAndAreaCompany.setJqstartdate(iac.getJqStartDate());
+//            orderAndAreaCompany.setJqenddate(iac.getJqEndDate());
+//
+//            orderAndAreaCompany.setSystartdate(iac.getSyStartDate());
+//            orderAndAreaCompany.setSyenddate(iac.getSyEndDate());
+//
+//
+//        }
+
+        InsAreaCompany iac = insAreaCompanyService.getById(companyId);
+        //保费因素
+        yaExtendInfoDto.setAccidentInfoStr(iac.getAccidentStrInfo());
+        yaExtendInfoDto.setScore(iac.getScore());
+        orderAndAreaCompany.setExtendInfo(yaExtendInfoDto);
+
         orderAndAreaCompany.setReptxt(null);
 
         //add 解决返回null页面错误  lig 2023-09-14
-        if(null == orderAndAreaCompany.getExtendInfo()) orderAndAreaCompany.setExtendInfo("");
-        if(null == orderAndAreaCompany.getCrossInsurance()) orderAndAreaCompany.setCrossInsurance(JSON.parseArray("[]"));
-        if(null == orderAndAreaCompany.getKindinfo()) orderAndAreaCompany.setKindinfo(JSON.parseArray("[]"));
+        if (null == orderAndAreaCompany.getExtendInfo()) orderAndAreaCompany.setExtendInfo("");
+        if (null == orderAndAreaCompany.getCrossInsurance())
+            orderAndAreaCompany.setCrossInsurance(JSON.parseArray("[]"));
+        if (null == orderAndAreaCompany.getKindinfo()) orderAndAreaCompany.setKindinfo(JSON.parseArray("[]"));
         return HttpResult.ok("success", orderAndAreaCompany);
     }
 

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

@@ -129,10 +129,10 @@
                o.frameno,
                o.licenseno,
                o.insuredname,
-               o.jqstartdate,
-               o.jqenddate,
-               o.systartdate,
-               o.syenddate,
+               iac.jqstartdate,
+               iac.jqenddate,
+               iac.systartdate,
+               iac.syenddate,
                iac.id,
                iac.company_id,
                iac.reptxt,