|
@@ -10,6 +10,7 @@ import com.ydtech.modules.ins.model.pingan.respose.PingAnQuoteRespVo;
|
|
|
import com.ydtech.modules.ins.model.vo.*;
|
|
import com.ydtech.modules.ins.model.vo.*;
|
|
|
import com.ydtech.modules.order.components.ConfigureParametersComponents;
|
|
import com.ydtech.modules.order.components.ConfigureParametersComponents;
|
|
|
import com.ydtech.modules.order.components.pingan.PinganRequestApiComponents;
|
|
import com.ydtech.modules.order.components.pingan.PinganRequestApiComponents;
|
|
|
|
|
+import com.ydtech.modules.order.dao.InsTaskImagesMapper;
|
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
import com.ydtech.modules.order.entity.InsDrivingIntentionInsuranceSon;
|
|
import com.ydtech.modules.order.entity.InsDrivingIntentionInsuranceSon;
|
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
@@ -31,6 +32,7 @@ import com.ydtech.modules.order.entity.api.zijin.request.SubmitVerifyRequest;
|
|
|
import com.ydtech.modules.order.entity.api.zijin.response.QueryClauseDataResponse;
|
|
import com.ydtech.modules.order.entity.api.zijin.response.QueryClauseDataResponse;
|
|
|
import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
|
|
import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
|
|
|
import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
|
|
import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
|
|
|
|
|
+import com.ydtech.modules.order.entity.dto.InsUploadImagesDto;
|
|
|
import com.ydtech.modules.order.entity.po.InsTaskImages;
|
|
import com.ydtech.modules.order.entity.po.InsTaskImages;
|
|
|
import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
|
|
import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
|
|
|
import com.ydtech.modules.order.entity.po.InsUploadFiles;
|
|
import com.ydtech.modules.order.entity.po.InsUploadFiles;
|
|
@@ -87,6 +89,8 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
|
|
|
|
|
|
|
|
private final PinganApiLogService pinganApiLogService;
|
|
private final PinganApiLogService pinganApiLogService;
|
|
|
|
|
|
|
|
|
|
+ private final InsTaskImagesMapper insTaskImagesMapper;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @Description 获取财意险险种套餐列表 调用 4.4
|
|
* @Description 获取财意险险种套餐列表 调用 4.4
|
|
@@ -448,9 +452,13 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
|
|
|
ptlAgreementAttribution);
|
|
ptlAgreementAttribution);
|
|
|
PinganApiLog pinganApiLog = new PinganApiLog(insAreaCompany.getOrderno(),subOrderNo,insAreaCompany.getAgreementId());
|
|
PinganApiLog pinganApiLog = new PinganApiLog(insAreaCompany.getOrderno(),subOrderNo,insAreaCompany.getAgreementId());
|
|
|
InsOrders insOrders = insOrdersService.existOrder(insAreaCompany.getOrderno());
|
|
InsOrders insOrders = insOrdersService.existOrder(insAreaCompany.getOrderno());
|
|
|
- List<InsTaskImagesBase64> insTaskImagesBase64s = insTaskImagesService.findByOrderNo(insOrders.getOrderno(),
|
|
|
|
|
- insAreaCompany.getId(), true);
|
|
|
|
|
- if (insTaskImagesBase64s.isEmpty()) {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //图片
|
|
|
|
|
+ List<InsUploadImagesDto> imgList = insTaskImagesMapper.getByOrderNoInsUploadImagesDtoList(insAreaCompany.getOrderno());
|
|
|
|
|
+
|
|
|
|
|
+ // List<InsTaskImagesBase64> insTaskImagesBase64s = insTaskImagesService.findByOrderNo(insOrders.getOrderno(),
|
|
|
|
|
+ // insAreaCompany.getId(), true);
|
|
|
|
|
+ if (imgList.isEmpty()) {
|
|
|
return HttpResult.error("影像集合为空");
|
|
return HttpResult.error("影像集合为空");
|
|
|
} else {
|
|
} else {
|
|
|
List<InsTaskImages> listNew = new ArrayList<InsTaskImages>();
|
|
List<InsTaskImages> listNew = new ArrayList<InsTaskImages>();
|
|
@@ -460,14 +468,14 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
|
|
|
// 获取上级目录
|
|
// 获取上级目录
|
|
|
String parentPath = projectFile.getParent();
|
|
String parentPath = projectFile.getParent();
|
|
|
List<InsTaskImages> insTaskImages =new ArrayList<>();
|
|
List<InsTaskImages> insTaskImages =new ArrayList<>();
|
|
|
- for (InsTaskImagesBase64 insTaskImagesBase64 : insTaskImagesBase64s) {
|
|
|
|
|
- InsUploadFiles fiels = insUploadFilesService.getById(insTaskImagesBase64.getImageId());
|
|
|
|
|
- InsTaskImages imagevo = insTaskImagesService.getById(insTaskImagesBase64.getId());
|
|
|
|
|
|
|
+ for (InsUploadImagesDto insUploadImagesDto : imgList) {
|
|
|
|
|
+ InsUploadFiles fiels = insUploadFilesService.getById(insUploadImagesDto.getImageId());
|
|
|
|
|
+ InsTaskImages imagevo = insTaskImagesService.getById(insUploadImagesDto.getId());
|
|
|
String key=parameters.getUserId()+"-"+new SimpleDateFormat("yyyyMMddhhmmss").format(new Date())+"-"+UUID.randomUUID();
|
|
String key=parameters.getUserId()+"-"+new SimpleDateFormat("yyyyMMddhhmmss").format(new Date())+"-"+UUID.randomUUID();
|
|
|
File file =new File( parentPath+ fiels.getFilePath());
|
|
File file =new File( parentPath+ fiels.getFilePath());
|
|
|
imagevo.setPinganKey(key);
|
|
imagevo.setPinganKey(key);
|
|
|
insTaskImages.add(imagevo);
|
|
insTaskImages.add(imagevo);
|
|
|
- PingAnDocumentClassEnum fileEnum = PingAnDocumentClassEnum.getCode(insTaskImagesBase64.getImageType());
|
|
|
|
|
|
|
+ PingAnDocumentClassEnum fileEnum = PingAnDocumentClassEnum.getCode(insUploadImagesDto.getImageType());
|
|
|
String documentClass=fileEnum.getDocument();
|
|
String documentClass=fileEnum.getDocument();
|
|
|
String documentType=fileEnum.getDocumentType();
|
|
String documentType=fileEnum.getDocumentType();
|
|
|
String fileName = file.getName();
|
|
String fileName = file.getName();
|
|
@@ -1049,26 +1057,41 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
|
|
|
ArrayList<DocumentStatusListResponse.DocumentDTO> documentList = documentStatusListResponse.getDocumentList();
|
|
ArrayList<DocumentStatusListResponse.DocumentDTO> documentList = documentStatusListResponse.getDocumentList();
|
|
|
Boolean jqflag = false;
|
|
Boolean jqflag = false;
|
|
|
Boolean sqflag = false;
|
|
Boolean sqflag = false;
|
|
|
|
|
+ String jqpolicyno=null;
|
|
|
|
|
+ String sypolicyno=null;
|
|
|
|
|
+ String status="";
|
|
|
|
|
+ String noticeNo="";
|
|
|
//B5 为 承保
|
|
//B5 为 承保
|
|
|
for (DocumentStatusListResponse.DocumentDTO dto : documentList) {
|
|
for (DocumentStatusListResponse.DocumentDTO dto : documentList) {
|
|
|
- if (OrderStatusCodeEnum.ORDER_STATUS_CODE_B5.getCode().equals(dto.getStatus()) && bizApplyNo.equals(dto.getApplyNo()==null?"":dto.getApplyNo())) {
|
|
|
|
|
|
|
+ status = dto.getStatus();
|
|
|
|
|
+ noticeNo=dto.getNoticeNo();
|
|
|
|
|
+ if ((bizApplyNo==null?"":bizApplyNo).equals(dto.getApplyNo()==null?"":dto.getApplyNo())) {
|
|
|
|
|
+ jqpolicyno=dto.getPolicyNo();
|
|
|
sqflag = true;
|
|
sqflag = true;
|
|
|
}
|
|
}
|
|
|
- if (OrderStatusCodeEnum.ORDER_STATUS_CODE_B5
|
|
|
|
|
- .getCode().equals(dto.getStatus()) && forceApplyNo.equals(dto.getApplyNo()==null?"":dto.getApplyNo())) {
|
|
|
|
|
|
|
+ if ((forceApplyNo==null?"":forceApplyNo).equals(dto.getApplyNo()==null?"":dto.getApplyNo())) {
|
|
|
|
|
+ sypolicyno=dto.getPolicyNo();
|
|
|
jqflag = true;
|
|
jqflag = true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if ("单交".equals(insAreaCompany.getProduct()) && !jqflag) {
|
|
|
|
|
- insAreaCompany.setJqpolicyno(bizApplyNo);
|
|
|
|
|
- } else if (("交三".equals(insAreaCompany.getProduct()) || "交商".equals(insAreaCompany.getProduct())) && !jqflag && !sqflag) {
|
|
|
|
|
- insAreaCompany.setJqpolicyno(bizApplyNo);
|
|
|
|
|
- insAreaCompany.setSypolicyno(forceApplyNo);
|
|
|
|
|
- } else if (("单商".equals(insAreaCompany.getProduct()) || "单三".equals(insAreaCompany.getProduct())) && !sqflag) {
|
|
|
|
|
- insAreaCompany.setSypolicyno(forceApplyNo);
|
|
|
|
|
|
|
+ if ("单交".equals(insAreaCompany.getProduct()) && jqflag) {
|
|
|
|
|
+ insAreaCompany.setJqpolicyno(jqpolicyno);
|
|
|
|
|
+ } else if (("交三".equals(insAreaCompany.getProduct()) || "交商".equals(insAreaCompany.getProduct())) && jqflag && sqflag) {
|
|
|
|
|
+ insAreaCompany.setJqpolicyno(jqpolicyno);
|
|
|
|
|
+ insAreaCompany.setSypolicyno(sypolicyno);
|
|
|
|
|
+ } else if (("单商".equals(insAreaCompany.getProduct()) || "单三".equals(insAreaCompany.getProduct())) && sqflag) {
|
|
|
|
|
+ insAreaCompany.setSypolicyno(sypolicyno);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(OrderStatusCodeEnum.ORDER_STATUS_CODE_B2.getCode().equals(status)){
|
|
|
|
|
+ //已核保待缴费
|
|
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
|
|
+ }else if(OrderStatusCodeEnum.ORDER_STATUS_CODE_B5.getCode().equals(status)){
|
|
|
|
|
+ //说明核保成功,更新大订单和小订单的状态为3 更新为已承保
|
|
|
|
|
+ if(StringUtils.isNotBlank(noticeNo)){
|
|
|
|
|
+ insAreaCompany.setNoticeNo(noticeNo);
|
|
|
|
|
+ }
|
|
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
}
|
|
}
|
|
|
- //说明核保成功,更新大订单和小订单的状态为3 更新为已承保
|
|
|
|
|
- insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.ok("更新状态成功");
|
|
return HttpResult.ok("更新状态成功");
|
|
|
|
|
|