Browse Source

生产订单查询

master
常熟吴彦祖 5 months ago
parent
commit
040fda8b0f
  1. 7
      src/main/java/com/gaotao/modules/boxManage/service/impl/BoxForNotificationServiceImpl.java

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

@ -137,6 +137,13 @@ public class BoxForNotificationServiceImpl implements BoxForNotificationService
if (!partNoMatch) { if (!partNoMatch) {
throw new RuntimeException("该卷的物料编号与销售发货单中的物料编号不匹配"); throw new RuntimeException("该卷的物料编号与销售发货单中的物料编号不匹配");
} }
// 校验批次号只要有一行partNo和batchNo都匹配即可
boolean batchNoMatch = checkPartNo.stream()
.filter(detail -> detail.getPartNo() != null && detail.getPartNo().equals(stock.getPartNo()))
.anyMatch(detail -> detail.getOutBatchNo() != null && detail.getOutBatchNo().equals(stock.getBatchNo()));
if (!batchNoMatch) {
throw new RuntimeException("该卷的批次号与销售发货单中的批次号不匹配");
}
// 检查箱的仓库是否为空如果为空则更新为卷的仓库如果不为空则检查是否一致 // 检查箱的仓库是否为空如果为空则更新为卷的仓库如果不为空则检查是否一致
if(box.getWareHouseID()==null||"".equals(box.getWareHouseID())){ if(box.getWareHouseID()==null||"".equals(box.getWareHouseID())){
boxForNotificationMapper.updateBoxWareHouse(data.getSite(),data.getBuNo(),data.getBoxNo(),stock.getWarehouseId()); boxForNotificationMapper.updateBoxWareHouse(data.getSite(),data.getBuNo(),data.getBoxNo(),stock.getWarehouseId());

Loading…
Cancel
Save