demand: 修复虚拟单重复录入问题

committer: heyu
This commit is contained in:
aike 2025-06-24 14:57:51 +08:00
parent efd3e7f455
commit bfd40fc09e

View File

@ -2845,13 +2845,23 @@ public class EmisBaseService {
}
if ("002".equals(waybill.getTransLineType()) && StringUtil.isNotBlank(waybill.getVirtualRemark())) {
// 取每个虚拟单号的后六位,用逗号拼接
String[] codes = waybill.getVirtualRemark().split(",");
String shortCodes = Arrays.stream(codes)
.filter(s -> s != null && s.length() >= 6)
.map(s -> s.substring(s.length() - 6))
.collect(Collectors.joining(","));
remark = remark + " " + "该运单为主单,对应虚拟单为" + shortCodes + ",";
Date sendDate = waybill.getSendDate();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date limitDate = null;
try {
limitDate = sdf.parse("2025-06-23 20:00:00");
} catch (ParseException e) {
// ignore
}
if (sendDate != null && limitDate != null && sendDate.after(limitDate)) {
// 取每个虚拟单号的后六位,用逗号拼接
String[] codes = waybill.getVirtualRemark().split(",");
String shortCodes = Arrays.stream(codes)
.filter(s -> s != null && s.length() >= 6)
.map(s -> s.substring(s.length() - 6))
.collect(Collectors.joining(","));
remark = remark + " " + "该运单为主单,对应虚拟单为" + shortCodes + ",";
}
}
// if (StringUtil.isNotBlank(waybill.getMasterBillCode())) {
// remark = remark + " " + "该运单为虚拟单,对应主单为" + waybill.getMasterBillCode();
@ -4792,6 +4802,10 @@ public class EmisBaseService {
return;
}
updateMasterWaybill(emisWaybillSave,emisWaybillOld);
if ("1".equals(emisWaybillOld.getBlVirtual()
)) {
return;
}
// 做问题件录入
scanProblemInfo(emisWaybillSave,emisWaybillOld);
}