|
@@ -60,9 +60,11 @@ import com.ydtech.modules.order.components.ConfigureParametersComponents;
|
|
|
import com.ydtech.modules.order.components.InsOrdersComponents;
|
|
import com.ydtech.modules.order.components.InsOrdersComponents;
|
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
|
|
|
+import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
|
|
|
import com.ydtech.modules.order.entity.vo.*;
|
|
import com.ydtech.modules.order.entity.vo.*;
|
|
|
import com.ydtech.modules.order.service.InsAreaCompanyService;
|
|
import com.ydtech.modules.order.service.InsAreaCompanyService;
|
|
|
import com.ydtech.modules.order.service.InsOrdersService;
|
|
import com.ydtech.modules.order.service.InsOrdersService;
|
|
|
|
|
+import com.ydtech.modules.order.service.InsTaskImagesService;
|
|
|
import com.ydtech.modules.protocol.utils.AssertionUtils;
|
|
import com.ydtech.modules.protocol.utils.AssertionUtils;
|
|
|
import com.ydtech.utils.*;
|
|
import com.ydtech.utils.*;
|
|
|
import com.ydtech.utils.baidu.FileUtil;
|
|
import com.ydtech.utils.baidu.FileUtil;
|
|
@@ -140,7 +142,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private InsOrdersService insOrdersService;
|
|
private InsOrdersService insOrdersService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- private InsTaskImageService insTaskImageService;
|
|
|
|
|
|
|
+ private InsTaskImagesService insTaskImagesService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private EsmInsAttachInsureMapper esmInsAttachInsureMapper;
|
|
private EsmInsAttachInsureMapper esmInsAttachInsureMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -281,8 +283,6 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
//构造车辆信息
|
|
//构造车辆信息
|
|
|
gainVehicleModel(ycConfigureParameters, carInfo);
|
|
gainVehicleModel(ycConfigureParameters, carInfo);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- HttpResult httpResult = new HttpResult();
|
|
|
|
|
// ObjectMapper xmlMapper = this.gainXmlMapper();
|
|
// ObjectMapper xmlMapper = this.gainXmlMapper();
|
|
|
|
|
|
|
|
InsAreaCompany iac = null;
|
|
InsAreaCompany iac = null;
|
|
@@ -371,6 +371,11 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
// //车主
|
|
// //车主
|
|
|
// CustomerInfoVo ownerInfo =
|
|
// CustomerInfoVo ownerInfo =
|
|
|
|
|
|
|
|
|
|
+ //查询码交强
|
|
|
|
|
+ String queryCodeJq = rr.getVhl().getCQryCdeJQ();
|
|
|
|
|
+ //查询码商业
|
|
|
|
|
+ String queryCodeSy = rr.getVhl().getCQryCdeSY();
|
|
|
|
|
+
|
|
|
order.setOwnerinfo(JSONObject.parseObject(JSONObject.toJSONString(yaQuoteInfoVo.getOwnerInfo())));
|
|
order.setOwnerinfo(JSONObject.parseObject(JSONObject.toJSONString(yaQuoteInfoVo.getOwnerInfo())));
|
|
|
order.setInsureinfo(JSONObject.parseObject(JSONObject.toJSONString(yaQuoteInfoVo.getInsuredPersonInfo())));
|
|
order.setInsureinfo(JSONObject.parseObject(JSONObject.toJSONString(yaQuoteInfoVo.getInsuredPersonInfo())));
|
|
|
order.setApplyinfo(JSONObject.parseObject(JSONObject.toJSONString(yaQuoteInfoVo.getPolicyHolderInfo())));
|
|
order.setApplyinfo(JSONObject.parseObject(JSONObject.toJSONString(yaQuoteInfoVo.getPolicyHolderInfo())));
|
|
@@ -575,9 +580,8 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
try {
|
|
try {
|
|
|
//子订单
|
|
//子订单
|
|
|
InsAreaCompany iac = insAreaCompanyService.getById(quoteOrderNo);
|
|
InsAreaCompany iac = insAreaCompanyService.getById(quoteOrderNo);
|
|
|
- if (iac == null) {
|
|
|
|
|
- return HttpResult.error("订单不存在");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ AssertionUtils.isEmpty(iac,"子订单不存在");
|
|
|
|
|
+ if(!iac.getOrderstatus().equals(InsOrderStatusEnum.QUOTE_ING)) return HttpResult.error("报价中的订单才允许核保");
|
|
|
InsOrders order = insOrdersService.getById(iac.getOrderno());
|
|
InsOrders order = insOrdersService.getById(iac.getOrderno());
|
|
|
|
|
|
|
|
// 获取协议配置信息
|
|
// 获取协议配置信息
|
|
@@ -611,7 +615,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
|
|
//接口请求
|
|
//接口请求
|
|
|
String responseData = httpPostResultLog(m, YcBuildData.API_AUDIT, "永诚API方式 - 核保(车牌号:"+order.getLicenseno()+") - ");
|
|
String responseData = httpPostResultLog(m, YcBuildData.API_AUDIT, "永诚API方式 - 核保(车牌号:"+order.getLicenseno()+") - ");
|
|
|
- AssertionUtils.isEmpty(responseData,"(日志号"+logNo+")核保请求超时请重试。");
|
|
|
|
|
|
|
+ AssertionUtils.isEmpty(responseData,logNo + "核保请求超时请重试。");
|
|
|
|
|
|
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseData);
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseData);
|
|
|
AuditResponse rd = gainXmlMapper().readValue(cleanStr, AuditResponse.class);
|
|
AuditResponse rd = gainXmlMapper().readValue(cleanStr, AuditResponse.class);
|
|
@@ -681,10 +685,11 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
@Override
|
|
@Override
|
|
|
public HttpResult UploadImageApi(String quoteOrderNo) {
|
|
public HttpResult UploadImageApi(String quoteOrderNo) {
|
|
|
|
|
|
|
|
- HttpResult resutl = HttpResult.ok();
|
|
|
|
|
|
|
+ String logNo = String.format("(日志号:%s)", IPUtil.gainServerNo());
|
|
|
InsAreaCompany iac = insAreaCompanyService.getByIdIsExist(quoteOrderNo);
|
|
InsAreaCompany iac = insAreaCompanyService.getByIdIsExist(quoteOrderNo);
|
|
|
InsOrders order = insOrdersService.getById(iac.getOrderno());
|
|
InsOrders order = insOrdersService.getById(iac.getOrderno());
|
|
|
- List<InsTaskImage> insTaskImages = insTaskImageService.selectByTaskId(order.getQuoteno());
|
|
|
|
|
|
|
+ List<InsTaskImagesBase64> insTaskImages = insTaskImagesService.findByOrderNo(iac.getOrderno());
|
|
|
|
|
+ if(CollUtil.isEmpty(insTaskImages)) return HttpResult.error("获取影像失败");
|
|
|
|
|
|
|
|
//获取协议配置信息
|
|
//获取协议配置信息
|
|
|
YcConfigureParameters ycConfigureParameters = gainYcConfigParams(iac.getAgreementId());
|
|
YcConfigureParameters ycConfigureParameters = gainYcConfigParams(iac.getAgreementId());
|
|
@@ -694,14 +699,12 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
InsApiLog apiLog = null;
|
|
InsApiLog apiLog = null;
|
|
|
//组装参数
|
|
//组装参数
|
|
|
//接口请求
|
|
//接口请求
|
|
|
- ImageUp iUp = ImageUp.buildImageUpParam(order, ycConfigureParameters, a.getImage(), a.getImgtype());
|
|
|
|
|
|
|
+ ImageUp iUp = ImageUp.buildImageUpParam(order, ycConfigureParameters, a.getBase64String(), a.getImageType());
|
|
|
ObjectMapper xmlMapper = gainXmlMapper();
|
|
ObjectMapper xmlMapper = gainXmlMapper();
|
|
|
//接口请求
|
|
//接口请求
|
|
|
// apiLog = httpPost(xmlMapper, iUp, YcBuildData.API_UPLOAD);
|
|
// apiLog = httpPost(xmlMapper, iUp, YcBuildData.API_UPLOAD);
|
|
|
- String responseData = httpPostResultLog(iUp, YcBuildData.API_UPLOAD, "永诚API方式 - 影像上传 - ");
|
|
|
|
|
- verifyRequest(apiLog, iac, InsQuoteFlow.Q_S_2);
|
|
|
|
|
|
|
+ String responseData = httpPostResultLog(iUp, YcBuildData.API_UPLOAD, logNo +"永诚API方式(车牌号:)"+order.getLicenseno()+" - 影像上传 - "+iUp.getNewImgUpLoadInfoRequest().getRequestBase().getPicTureName()+" - ");
|
|
|
try {
|
|
try {
|
|
|
-// String responseData = apiLog.getResponseData();
|
|
|
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseData);
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseData);
|
|
|
log.error("===永诚API方式--上传影像清洗返回参数:" + cleanStr);
|
|
log.error("===永诚API方式--上传影像清洗返回参数:" + cleanStr);
|
|
|
ImageUpResponse iur = xmlMapper.readValue(cleanStr, ImageUpResponse.class);
|
|
ImageUpResponse iur = xmlMapper.readValue(cleanStr, ImageUpResponse.class);
|