|
@@ -14,8 +14,10 @@ import com.jzg.commons.entity.po.EsmInsCompany;
|
|
|
import com.jzg.commons.entity.po.PtlAgreement;
|
|
import com.jzg.commons.entity.po.PtlAgreement;
|
|
|
import com.jzg.commons.entity.po.SysUploadFiles;
|
|
import com.jzg.commons.entity.po.SysUploadFiles;
|
|
|
import com.jzg.commons.exception.SystemException;
|
|
import com.jzg.commons.exception.SystemException;
|
|
|
|
|
+import com.jzg.commons.exception.TokenExpireException;
|
|
|
import com.jzg.commons.util.AssertionUtils;
|
|
import com.jzg.commons.util.AssertionUtils;
|
|
|
import com.jzg.commons.util.MinioUtils;
|
|
import com.jzg.commons.util.MinioUtils;
|
|
|
|
|
+import com.jzg.commons.util.idgen.IdGenerate;
|
|
|
import com.jzg.quotation.commons.client.OrgClient;
|
|
import com.jzg.quotation.commons.client.OrgClient;
|
|
|
import com.jzg.quotation.commons.client.PlatformClient;
|
|
import com.jzg.quotation.commons.client.PlatformClient;
|
|
|
import com.jzg.quotation.commons.constant.enums.base.QuoteRuleCategory;
|
|
import com.jzg.quotation.commons.constant.enums.base.QuoteRuleCategory;
|
|
@@ -110,6 +112,9 @@ public class UnifyOrderManager {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
InsOrdersPdfUrlService insOrdersPdfUrlService;
|
|
InsOrdersPdfUrlService insOrdersPdfUrlService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ InsOrdersQrcodeService insOrdersQrcodeService;
|
|
|
|
|
+
|
|
|
@Value("${minio.bucket-name}")
|
|
@Value("${minio.bucket-name}")
|
|
|
private String bucketName;
|
|
private String bucketName;
|
|
|
|
|
|
|
@@ -298,16 +303,23 @@ public class UnifyOrderManager {
|
|
|
// 保存支付链接
|
|
// 保存支付链接
|
|
|
insOrders.setPayLink(paymentLinkResultsVo.getPaymentLink());
|
|
insOrders.setPayLink(paymentLinkResultsVo.getPaymentLink());
|
|
|
insOrdersService.updateById(insOrders);
|
|
insOrdersService.updateById(insOrders);
|
|
|
|
|
+ insOrdersQrcodeService.saveQrCode(insOrders);
|
|
|
return HttpResult.ok("");
|
|
return HttpResult.ok("");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@Operation(summary = "影像上传")
|
|
@Operation(summary = "影像上传")
|
|
|
@PostMapping("/imagesUpload")
|
|
@PostMapping("/imagesUpload")
|
|
|
public HttpResult imagesUpload(@RequestBody InsuranceUploadImageVo insuranceUploadImageVo) {
|
|
public HttpResult imagesUpload(@RequestBody InsuranceUploadImageVo insuranceUploadImageVo) {
|
|
|
|
|
+ if(Objects.isNull(baseController.getToken())){
|
|
|
|
|
+ throw new TokenExpireException("登录过期");
|
|
|
|
|
+ }
|
|
|
InsOrders insOrders = insOrdersService.getById(insuranceUploadImageVo.getOrder().getOrdersNo());
|
|
InsOrders insOrders = insOrdersService.getById(insuranceUploadImageVo.getOrder().getOrdersNo());
|
|
|
HttpResult<EsmInsCompany> esmInsCompanyHttpResult = platformClient.findById(insOrders.getCompanyId(), baseController.getToken());
|
|
HttpResult<EsmInsCompany> esmInsCompanyHttpResult = platformClient.findById(insOrders.getCompanyId(), baseController.getToken());
|
|
|
String systemCode = getSystemCode();
|
|
String systemCode = getSystemCode();
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//先默认第一个协议
|
|
//先默认第一个协议
|
|
|
HttpResult<List<PtlAgreement>> byCompanyId = orgClient.getByCompanyId(insOrders.getCompanyId(), baseController.getToken(),systemCode);
|
|
HttpResult<List<PtlAgreement>> byCompanyId = orgClient.getByCompanyId(insOrders.getCompanyId(), baseController.getToken(),systemCode);
|
|
|
if(byCompanyId.getData().isEmpty()){
|
|
if(byCompanyId.getData().isEmpty()){
|
|
@@ -329,13 +341,19 @@ public class UnifyOrderManager {
|
|
|
@PostMapping("/getOrderStatus")
|
|
@PostMapping("/getOrderStatus")
|
|
|
public HttpResult getOrderStatus(@RequestBody OrderStatusVo orderStatusVo) throws JsonProcessingException {
|
|
public HttpResult getOrderStatus(@RequestBody OrderStatusVo orderStatusVo) throws JsonProcessingException {
|
|
|
|
|
|
|
|
|
|
+ InsOrders insOrders = insOrdersService.getById(orderStatusVo.getOrder().getOrdersNo());
|
|
|
|
|
+ AssertionUtils.isFail(Objects.isNull(insOrders),"订单不存在");
|
|
|
|
|
+ HttpResult<EsmInsCompany> esmInsCompanyHttpResult = platformClient.findById(insOrders.getCompanyId(), baseController.getToken());
|
|
|
|
|
+ orderStatusVo.getOrder().setAgreementId(insOrders.getAgreementId());
|
|
|
|
|
+ orderStatusVo.getOrder().setInsuranceCompanyCode(esmInsCompanyHttpResult.getData().getCompanyCode());
|
|
|
|
|
+ orderStatusVo.getOrder().setCompanyOrderNo(insOrders.getCompanyOrderNo());
|
|
|
|
|
+ orderStatusVo.setInsOrders(insOrders);
|
|
|
//获取保司实体
|
|
//获取保司实体
|
|
|
QuotationApiBaseService orderStatusService = companyFactory.getOrderStatusService(
|
|
QuotationApiBaseService orderStatusService = companyFactory.getOrderStatusService(
|
|
|
orderStatusVo,
|
|
orderStatusVo,
|
|
|
insOrdersService,
|
|
insOrdersService,
|
|
|
baseController);
|
|
baseController);
|
|
|
- InsOrders insOrders = insOrdersService.getById(orderStatusVo.getOrder().getOrdersNo());
|
|
|
|
|
- AssertionUtils.isFail(Objects.isNull(insOrders),"订单不存在");
|
|
|
|
|
|
|
+
|
|
|
InsOrdersPolicy insOrdersPolicy = insOrdersPolicyService.getById(insOrders.getId());
|
|
InsOrdersPolicy insOrdersPolicy = insOrdersPolicyService.getById(insOrders.getId());
|
|
|
orderStatusVo.setInsOrdersPolicy(insOrdersPolicy);
|
|
orderStatusVo.setInsOrdersPolicy(insOrdersPolicy);
|
|
|
OrderStatusResultVo orderStatusResultVo = orderStatusService.queryOrderState(orderStatusVo);
|
|
OrderStatusResultVo orderStatusResultVo = orderStatusService.queryOrderState(orderStatusVo);
|