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