|
|
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.ydtech.constants.enums.InsuranceOrderPdf;
|
|
|
import com.ydtech.constants.enums.InsuranceRisk;
|
|
|
@@ -67,6 +68,9 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
|
|
|
@Autowired
|
|
|
private InsAreaCompanyService insAreaCompanyService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private InsAreaCompanyRelatedInfoService insAreaCompanyRelatedInfoService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private InsTaskImagesService insTaskImagesService;
|
|
|
|
|
|
@@ -178,11 +182,13 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
|
|
|
insAreaCompanyAccidentalDriving.setRideRiskName(accidentalDriving.getProjectName());
|
|
|
insAreaCompanyAccidentalDrivings.add(insAreaCompanyAccidentalDriving);
|
|
|
});
|
|
|
-
|
|
|
- // 特约
|
|
|
- insAreaCompany.setJqappoint(quoteRespVo.getJqappoint());
|
|
|
- insAreaCompany.setSyappoint(quoteRespVo.getSyappoint());
|
|
|
insAreaCompanyService.insertCompanyAndOrders(insAreaCompany, insAreaCompanyAccidentalDrivings);
|
|
|
+ // 保存交强特约信息
|
|
|
+ InsAreaCompanyRelatedInfo info = new InsAreaCompanyRelatedInfo();
|
|
|
+ info.setCompanyId(insAreaCompany.getCompanyId());
|
|
|
+ info.setJqappoint(quoteRespVo.getJqappoint());
|
|
|
+ info.setSyappoint(quoteRespVo.getSyappoint());
|
|
|
+ insAreaCompanyRelatedInfoService.save(info);
|
|
|
quoteRespVo.setCompanyId(insAreaCompany.getId());
|
|
|
return HttpResult.ok("报价成功", quoteRespVo);
|
|
|
|
|
|
@@ -385,6 +391,9 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
|
|
|
public HttpResult<Object> audit(String companyId) throws Exception {
|
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
|
|
|
InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
+ LambdaQueryWrapper<InsAreaCompanyRelatedInfo> infoLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ infoLambdaQueryWrapper.eq(InsAreaCompanyRelatedInfo::getCompanyId, insAreaCompany.getCompanyId());
|
|
|
+ List<InsAreaCompanyRelatedInfo> infoList = insAreaCompanyRelatedInfoService.list(infoLambdaQueryWrapper);
|
|
|
// 1 通过 协议id获取配置实体
|
|
|
PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
|
|
|
ChengTaiConfigureParameters parameters = configureParametersComponents.toEntity(ChengTaiConfigureParameters.class,
|
|
|
@@ -398,25 +407,27 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
|
|
|
|
|
|
List<SubmitVerifyRequest.EngageListDTO> engageDTO = new ArrayList<>();
|
|
|
// 获取特约
|
|
|
- List<SubmitVerifyRequest.EngageListDTO> ciEngageDTO = JSON.parseArray(insAreaCompany.getJqappoint(),
|
|
|
- SubmitVerifyRequest.EngageListDTO.class);
|
|
|
- if(CollUtil.isNotEmpty(ciEngageDTO)){
|
|
|
- for (SubmitVerifyRequest.EngageListDTO engageListDTO : ciEngageDTO) {
|
|
|
- engageListDTO.setRiskCode(RiskCodeEnum.R1002.getCode());
|
|
|
+ if (CollUtil.isNotEmpty(infoList)){
|
|
|
+ List<SubmitVerifyRequest.EngageListDTO> ciEngageDTO = JSON.parseArray(infoList.get(0).getJqappoint(),
|
|
|
+ SubmitVerifyRequest.EngageListDTO.class);
|
|
|
+ if(CollUtil.isNotEmpty(ciEngageDTO)){
|
|
|
+ for (SubmitVerifyRequest.EngageListDTO engageListDTO : ciEngageDTO) {
|
|
|
+ engageListDTO.setRiskCode(RiskCodeEnum.R1002.getCode());
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- List<SubmitVerifyRequest.EngageListDTO> biEngageDTO = JSON.parseArray(insAreaCompany.getSyappoint(),
|
|
|
- SubmitVerifyRequest.EngageListDTO.class);
|
|
|
- if(CollUtil.isNotEmpty(biEngageDTO)){
|
|
|
- for (SubmitVerifyRequest.EngageListDTO engageListDTO : biEngageDTO) {
|
|
|
- engageListDTO.setRiskCode(RiskCodeEnum.R0821.getCode());
|
|
|
+ List<SubmitVerifyRequest.EngageListDTO> biEngageDTO = JSON.parseArray(infoList.get(0).getSyappoint(),
|
|
|
+ SubmitVerifyRequest.EngageListDTO.class);
|
|
|
+ if(CollUtil.isNotEmpty(biEngageDTO)){
|
|
|
+ for (SubmitVerifyRequest.EngageListDTO engageListDTO : biEngageDTO) {
|
|
|
+ engageListDTO.setRiskCode(RiskCodeEnum.R0821.getCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(CollUtil.isNotEmpty(ciEngageDTO)){
|
|
|
+ engageDTO.addAll(ciEngageDTO);
|
|
|
+ }
|
|
|
+ if(CollUtil.isNotEmpty(biEngageDTO)){
|
|
|
+ engageDTO.addAll(biEngageDTO);
|
|
|
}
|
|
|
- }
|
|
|
- if(CollUtil.isNotEmpty(ciEngageDTO)){
|
|
|
- engageDTO.addAll(ciEngageDTO);
|
|
|
- }
|
|
|
- if(CollUtil.isNotEmpty(biEngageDTO)){
|
|
|
- engageDTO.addAll(biEngageDTO);
|
|
|
}
|
|
|
// 投保保存
|
|
|
SubmitVerifyRequest submitVerifyRequest = new SubmitVerifyRequest(parameters,insAreaCompany,
|