Browse Source

2026-01-07

固定载具标签优化、固定打印模板A004优化
master
fengyuan_yang 7 days ago
parent
commit
45305c9a5f
  1. 18
      src/main/java/com/gaotao/modules/boxManage/service/impl/BoxForNotificationServiceImpl.java
  2. 22
      src/main/resources/mapper/boxManage/BoxForNotificationMapper.xml

18
src/main/java/com/gaotao/modules/boxManage/service/impl/BoxForNotificationServiceImpl.java

@ -339,10 +339,24 @@ public class BoxForNotificationServiceImpl implements BoxForNotificationService
throw new RuntimeException("标签 " + rollInfo.getRollNo() + " 已经装盒/装箱,不允许重复扫描"); throw new RuntimeException("标签 " + rollInfo.getRollNo() + " 已经装盒/装箱,不允许重复扫描");
} }
// 校验3: 检查合约号码
// 校验3: 检查合约号码outBatchNo可能是多个号码用";"拼接如A001;B002;C003
String rollBatchNo = rollInfo.getBatchNo();
boolean batchMatched = outboundDetails.stream() boolean batchMatched = outboundDetails.stream()
.filter(detail -> detail.getPartNo() != null && detail.getPartNo().equals(data.getPartNo())) .filter(detail -> detail.getPartNo() != null && detail.getPartNo().equals(data.getPartNo()))
.anyMatch(detail -> detail.getOutBatchNo() != null && detail.getOutBatchNo().equals(rollInfo.getBatchNo()));
.anyMatch(detail -> {
String outBatchNo = detail.getOutBatchNo();
if (outBatchNo == null || outBatchNo.isEmpty()) {
return false;
}
// ";"分割检查是否包含rollBatchNo
String[] batchNos = outBatchNo.split(";");
for (String batchNo : batchNos) {
if (batchNo != null && batchNo.trim().equals(rollBatchNo)) {
return true;
}
}
return false;
});
if (!batchMatched) { if (!batchMatched) {
throw new RuntimeException("标签 " + rollInfo.getRollNo() + " 合约号码(" + rollInfo.getBatchNo() + ")不符,请检查"); throw new RuntimeException("标签 " + rollInfo.getRollNo() + " 合约号码(" + rollInfo.getBatchNo() + ")不符,请检查");

22
src/main/resources/mapper/boxManage/BoxForNotificationMapper.xml

@ -158,9 +158,25 @@
</update> </update>
<select id="searchOutboundNotificationDetail" resultType="com.gaotao.modules.outboundNotification.entity.OutboundNotificationDetailEntity"> <select id="searchOutboundNotificationDetail" resultType="com.gaotao.modules.outboundNotification.entity.OutboundNotificationDetailEntity">
select site,bu_no,order_no,part_no,part_desc,unit,required_qty,out_warehouse,out_batch_no,created_by,created_date,updated_by,
updated_date,order_qty,related_order_no,related_order_line_no,inspection_flag
from outbound_notification_detail
SELECT
site,
bu_no,
order_no,
part_no,
part_desc,
unit,
required_qty,
out_warehouse,
out_batch_no,
created_by,
created_date,
updated_by,
updated_date,
order_qty,
related_order_no,
related_order_line_no,
inspection_flag
FROM outbound_notification_detail
where site = #{site} and bu_no = #{buNo} and order_no = #{orderNo} where site = #{site} and bu_no = #{buNo} and order_no = #{orderNo}
</select> </select>

Loading…
Cancel
Save