feat(out-purchase): 添加扫码批次号和单位信息处理功能
- 在出库采购控制器中新增批次号集合用于存储扫码批次信息 - 添加单位信息设置功能,从二维码主数据获取并设置到项目中 - 实现批次号去重合并功能,将多个批次号以逗号分隔形式存储 - 优化扫码数量累加逻辑,确保单位和批次信息正确关联
This commit is contained in:
parent
93d9572c83
commit
be8c7cedb6
|
|
@ -159,6 +159,7 @@ public class OutPurchaseController extends BaseController {
|
|||
item.setOrderId(orderId);
|
||||
item.setNum(BigDecimal.ZERO);
|
||||
item.setWerks(it.getWerks());
|
||||
Set<String> batchNo=new HashSet<>();
|
||||
if (CollectionUtil.isNotEmpty(it.getQrCodes())) {
|
||||
it.getQrCodes().forEach(qrCode -> {
|
||||
WmsQrCodeMaster qrCodeMaster = qrCodeMasters.stream()
|
||||
|
|
@ -172,7 +173,9 @@ public class OutPurchaseController extends BaseController {
|
|||
.throwMessage("物料" + it.getMatnr() + "与二维码不匹配");
|
||||
// VUtil.trueThrowBusinessError(!check(qrCodeMaster, it.getCharg(), it.getSernrs()))
|
||||
// .throwMessage("物料" + it.getMatnr() + "包含不符合批次号和序列号的扫码记录");
|
||||
item.setMeins(qrCodeMaster.getUnit());
|
||||
item.setNum(item.getNum().add(qrCodeMaster.getQuantity()));
|
||||
batchNo.add(qrCodeMaster.getBatchNo());
|
||||
// qrCodeMaster.setFactoryCode("");
|
||||
// qrCodeMaster.setStorageLocation("");
|
||||
// qrCodeMaster.setBinLocation("");
|
||||
|
|
@ -203,6 +206,7 @@ public class OutPurchaseController extends BaseController {
|
|||
);
|
||||
});
|
||||
}
|
||||
item.setCharg(StrUtil.join(",", batchNo));
|
||||
// VUtil.trueThrowBusinessError(it.getNum().compareTo(item.getTemng()) > 0)
|
||||
// .throwMessage("物料" + it.getMatnr() + "的扫码数量大于退货数量");
|
||||
// VUtil.trueThrowBusinessError(item.getNum().compareTo(it.getNum()) != 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue