Эх сурвалжийг харах

update:
1.永安报价因子提交核保问题

wks 1 жил өмнө
parent
commit
f6f583fab3

+ 8 - 5
src/main/java/com/ydtech/modules/fee/dto/vo/RuleAttrMappingVo.java

@@ -359,21 +359,24 @@ public class RuleAttrMappingVo {
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("CommercialDiscount", String.valueOf(insAreaCompany.getSyAdjustRate())));
 
         //永安评分
-        Optional.ofNullable(quoteRespVo.getYaScore())
+        Optional.ofNullable(quoteRespVo)
+                .map(quoteRespVo1 -> quoteRespVo.getYaScore())
                 .ifPresent(x -> {
                     ruleAttrMappingVoList.add(new RuleAttrMappingVo("YaScore", x));
                 });
 
         //永安交强费用浮动
-        Optional.ofNullable(quoteRespVo.getCifeeFloat())
+        Optional.ofNullable(quoteRespVo)
+                .map(quoteRespVo1 -> quoteRespVo.getCifeeFloat())
                 .ifPresent(x -> {
-                    ruleAttrMappingVoList.add(new RuleAttrMappingVo("CifeeFloat", quoteRespVo.getCifeeFloat()));
+                    ruleAttrMappingVoList.add(new RuleAttrMappingVo("CifeeFloat", x));
                 });
 
         //永安商业费用浮动
-        Optional.ofNullable(quoteRespVo.getBifeeFloat())
+        Optional.ofNullable(quoteRespVo)
+                .map(quoteRespVo1 -> quoteRespVo.getBifeeFloat())
                 .ifPresent(x -> {
-                    ruleAttrMappingVoList.add(new RuleAttrMappingVo("BifeeFloat", quoteRespVo.getBifeeFloat()));
+                    ruleAttrMappingVoList.add(new RuleAttrMappingVo("BifeeFloat", x));
                 });
 
         //数值型总评分

+ 4 - 8
src/main/java/com/ydtech/modules/protocol/controller/PtlAgreementController.java

@@ -6,11 +6,8 @@ import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.PageResult;
 import com.ydtech.exception.SystemException;
 import com.ydtech.modules.base.controller.BaseController;
-import com.ydtech.modules.esm.model.EsmInsCompany;
 import com.ydtech.modules.order.entity.po.InsUploadFiles;
 import com.ydtech.modules.order.service.InsUploadFilesService;
-import com.ydtech.modules.protocol.entity.dto.PtlAgreementAttributionDto;
-import com.ydtech.modules.protocol.entity.dto.PtlAgreementSaveDto;
 import com.ydtech.modules.protocol.entity.po.PtlAgreement;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementNonCarProductCosts;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementProductCosts;
@@ -23,7 +20,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiOperation;
 import org.apache.poi.ss.formula.functions.T;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
@@ -113,8 +109,8 @@ public class PtlAgreementController extends BaseController {
     @ApiOperation("校验登录")
     public HttpResult<Object> checkLogin(@RequestBody PtlAgreementSaveVo agreement) {
         String userName = getUserName();
-        boolean result = ptlAgreementService.checkLogin(userName,agreement.getAgreementId(),agreement);
-        return result ? HttpResult.ok("登录成功"):HttpResult.error("登录失败");
+        boolean result = ptlAgreementService.checkLogin(userName, agreement.getAgreementId(), agreement);
+        return result ? HttpResult.ok("登录成功") : HttpResult.error("登录失败");
     }
 
     @PostMapping("/batch")
@@ -272,10 +268,10 @@ public class PtlAgreementController extends BaseController {
     @PostMapping("/updateFeeFile")
     @ApiOperation("上传费用文件")
     public HttpResult updateFeeFile(@CheckObjectNotNull(message = "上传文件不能为空") MultipartFile multipartFile, String agreementId) throws IOException {
-        agreementId = agreementId.replace(",","");
+        agreementId = agreementId.replace(",", "");
         InsUploadFiles insUploadFiles = insUploadFilesService.uploadFile(multipartFile, getUserName(), "file");
         PtlAgreement byId = ptlAgreementService.getById(agreementId);
-        if(Objects.isNull(byId)){
+        if (Objects.isNull(byId)) {
             throw new SystemException("找不到协议");
         }
         byId.setFeeFileId(insUploadFiles.getId());