|
|
@@ -17,10 +17,7 @@ import com.jzg.commons.entity.dto.VerifyOrderParam;
|
|
|
import com.jzg.commons.entity.orders.po.*;
|
|
|
import com.jzg.commons.entity.orders.vo.AuditCostInfoVo;
|
|
|
import com.jzg.commons.entity.orders.vo.FeeAuditVo;
|
|
|
-import com.jzg.commons.entity.po.InsFeeOrders;
|
|
|
-import com.jzg.commons.entity.po.SysUser;
|
|
|
-import com.jzg.commons.entity.po.SysUserAccount;
|
|
|
-import com.jzg.commons.entity.po.SysUserJzgInfo;
|
|
|
+import com.jzg.commons.entity.po.*;
|
|
|
import com.jzg.commons.entity.quote.vo.aggregated.QuoteEchoVo;
|
|
|
import com.jzg.commons.entity.rights.po.InsOrderRights;
|
|
|
import com.jzg.commons.entity.rights.po.InsOrderRightsPackage;
|
|
|
@@ -333,14 +330,14 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
*
|
|
|
* @param orderNo 订单号(jzg系统内部的车险订单号)
|
|
|
* @param userName 操作用户
|
|
|
+ * @return HttpResult<String>
|
|
|
*/
|
|
|
@Override
|
|
|
- public void updateSigningTime(String orderNo, String userName) {
|
|
|
+ public HttpResult<String> updateSigningTime(String orderNo, String userName) {
|
|
|
log.info("用户[{}]更新订单[{}]的签单时间",userName,orderNo);
|
|
|
- InsOrders orders = insOrdersService.getById(orderNo);
|
|
|
+ InsOrders order = insOrdersService.getById(orderNo);
|
|
|
// 查询电子保单路径
|
|
|
InsOrdersPdfUrl pdfUrl = ordersPdfUrlService.getById(orderNo);
|
|
|
- log.info("订单[{}]没有生成电子表单",orderNo);
|
|
|
AssertionUtils.isFail(Objects.isNull(pdfUrl), "未生成电子保单!");
|
|
|
String url = null;
|
|
|
int type = 0;
|
|
|
@@ -355,11 +352,23 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
|
|
|
// 转为本地路径
|
|
|
String localUrl = PDFUtil.trafferHttpToLocalPath(url);
|
|
|
+ log.info("url[{}]转换为本地路径为[{}]",url,localUrl);
|
|
|
+
|
|
|
+ String companyId = order.getCompanyId();
|
|
|
+ HttpResult<EsmInsCompany> companyHttpResult = esmInsCompanyClient.findById(companyId);
|
|
|
+ EsmInsCompany insCompany = companyHttpResult.getData();
|
|
|
+ if(insCompany == null){
|
|
|
+ return HttpResult.error("订单关联的保险公司不存在");
|
|
|
+ }
|
|
|
//通过保险公司配置读取截取的前缀和后缀
|
|
|
LambdaQueryWrapper<InsOrderReadPdf> qws = new LambdaQueryWrapper<>();
|
|
|
- qws.eq(InsOrderReadPdf::getCompanyId, orders.getCompanyId());
|
|
|
+ qws.eq(InsOrderReadPdf::getCompanyId, insCompany.getCompanyCode());
|
|
|
qws.eq(InsOrderReadPdf::getType, type);
|
|
|
List<InsOrderReadPdf> list = ordersReadPdfService.list(qws);
|
|
|
+ if(CollUtil.isEmpty(list)){
|
|
|
+ log.error("保险公司发票读取规则未配置. companyId=[{}]",order.getCompanyId());
|
|
|
+ return HttpResult.error("保险公司发票读取规则未配置");
|
|
|
+ }
|
|
|
|
|
|
HashMap<String, LocalDateTime> map = new HashMap<>();
|
|
|
String pdfText = PDFUtil.getPdfText(localUrl);
|
|
|
@@ -370,6 +379,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
map.put(insOrderReadPdf.getOrderMsg(), pdfContentDate);
|
|
|
}
|
|
|
}
|
|
|
+ log.info("ins_order_read_pdf配置转换得到的map是[{}]", JSONUtil.toJsonStr(map));
|
|
|
}
|
|
|
|
|
|
//刪除临时文件
|
|
|
@@ -378,13 +388,22 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
|
|
|
file.delete();
|
|
|
}
|
|
|
if (map.get("payDate") != null) {
|
|
|
- orders.setPayTime(map.get("payDate"));
|
|
|
+ order.setPayTime(map.get("payDate"));
|
|
|
}
|
|
|
if (map.get("signingTime") != null) {
|
|
|
- orders.setSigningTime(map.get("signingTime"));
|
|
|
- }
|
|
|
- //更新时间表
|
|
|
- insOrdersService.updateById(orders);
|
|
|
+ order.setSigningTime(map.get("signingTime"));
|
|
|
+ }
|
|
|
+ //更新时间表 modify by lipf, 只更新指定的字段 2026年6月15日16:41:32
|
|
|
+ // insOrdersService.updateById(order);
|
|
|
+ LambdaUpdateWrapper<InsOrders> updateWrapper = new LambdaUpdateWrapper<>();
|
|
|
+ updateWrapper.eq(InsOrders::getId,order.getId());
|
|
|
+ updateWrapper.set(InsOrders::getPayTime,order.getPayTime());
|
|
|
+ updateWrapper.set(InsOrders::getSigningTime,order.getSigningTime());
|
|
|
+ updateWrapper.set(InsOrders::getUpdateTime, LocalDateTime.now());
|
|
|
+ updateWrapper.set(InsOrders::getUpdateBy, baseController.getUserName());
|
|
|
+
|
|
|
+ insOrdersService.update(null, updateWrapper);
|
|
|
+ return HttpResult.ok("更新成功");
|
|
|
}
|
|
|
|
|
|
/**
|