订单发货校验去除;
This commit is contained in:
+4
-4
@@ -104,11 +104,11 @@ public class InboundOrderService extends ServiceImpl<InboundOrderMapper, Inbound
|
||||
|
||||
// 2.2 校验整机编号管理
|
||||
if (material.isCodeManaged()) { // 如果物料需要编号管理
|
||||
if (!StringUtils.hasText(detailDTO.getMachineSerialNo())) {
|
||||
/*if (!StringUtils.hasText(detailDTO.getMachineSerialNo())) {
|
||||
log.error("物料校验失败: 物料 '{}' 需要整机编号,但未提供", material.getName());
|
||||
throw new IllegalArgumentException(
|
||||
"物料 '" + material.getName() + "' 需要整机编号");
|
||||
}
|
||||
}*/
|
||||
// 校验数量必须为 1
|
||||
if (detailDTO.getQuantity().compareTo(BigDecimal.ONE) != 0) {
|
||||
log.error("物料校验失败: 编号管理的物料 '{}' 数量必须为 1, 实际为 {}",
|
||||
@@ -120,12 +120,12 @@ public class InboundOrderService extends ServiceImpl<InboundOrderMapper, Inbound
|
||||
// 检查当前入库单内整机编号是否在库存中存在
|
||||
boolean existsInStock = checkSerialNumberExistsInStock(createDTO.getOwnerId(),
|
||||
detailDTO.getMaterialId(), detailDTO.getMachineSerialNo());
|
||||
if (existsInStock) {
|
||||
/*if (existsInStock) {
|
||||
throw new IllegalArgumentException(
|
||||
"当前货主ID " + createDTO.getOwnerId() + "货主名称:" + ownerName + " (" + ownerName
|
||||
+ ") 的整机编号为"
|
||||
+ detailDTO.getMachineSerialNo() + "的货物已在库存中");
|
||||
}
|
||||
}*/
|
||||
|
||||
} else { // 如果物料不需要编号管理
|
||||
if (StringUtils.hasText(detailDTO.getMachineSerialNo())) {
|
||||
|
||||
Reference in New Issue
Block a user