koushanshan 1 год назад
Родитель
Сommit
4cdc85841d

+ 3 - 3
src/main/java/com/dk/mdm/service/ivt/inventory/InventoryService.java

@@ -332,7 +332,7 @@ public class InventoryService extends BaseService<Inventory> {
             //region 新建
             if (addOrEditFlag) {
                 //先出
-                if (outDetail.size() > 0) {
+                if (outDetail.size() > 0 ) {
                     outList = outDetail.toJavaList(InOutRecordVO.class);
                     //赋值并校验库存流水数据
                     outList = this.setInOutRecordMessageByOut(outList);
@@ -340,7 +340,7 @@ public class InventoryService extends BaseService<Inventory> {
                     outList = this.warehouseAdjustmentOut(outList);
                     //反写出库单金额等信息
                     this.updateOutbound(outList);
-                } else {
+                } else if (outDetail.size() == 0 && intoDetail.size() == 0 ) {
                     throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.NO_DATA_MOVED_OUT.getMessage());
 
                 }
@@ -355,7 +355,7 @@ public class InventoryService extends BaseService<Inventory> {
                     this.warehouseAdjustmentInto(intoList);
                     //修改入库单单价、金额、成本等信息
                     this.updateIntobound(intoList);
-                } else {
+                } else if (outDetail.size() == 0 && intoDetail.size() == 0 ) {
                     throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.NO_DATA_MOVED_IN.getMessage());
                 }
             }