Commit 57182a412152647a91bd9c94735044db36a3433f

Authored by wangqian
1 parent 4e0c6402

出库使用唯一的库存id查询

urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/materialinventoryout/vo/MaterialInventoryOutSaveReqVO.java
... ... @@ -13,6 +13,9 @@ public class MaterialInventoryOutSaveReqVO {
13 13  
14 14 @Schema(description = "入库ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18713")
15 15 private Long id;
  16 + @Schema(description = "库存ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
  17 + @NotNull(message = "库存ID不能为空")
  18 + private Long inventoryId;
16 19  
17 20 @Schema(description = "物料ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14541")
18 21 @NotNull(message = "物料ID不能为空")
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventoryout/MaterialInventoryOutServiceImpl.java
... ... @@ -55,7 +55,7 @@ public class MaterialInventoryOutServiceImpl implements MaterialInventoryOutServ
55 55 if(null == material){
56 56 throw exception0(BAD_REQUEST.getCode(), "无效参数-materialId");
57 57 }
58   - MaterialInventoryDO materialInventory = materialInventoryService.selectMaterialInventoryByMaterialId(material.getMaterialId(),getCompanyId());
  58 + MaterialInventoryDO materialInventory = materialInventoryService.getMaterialInventory(createReqVO.getInventoryId());
59 59 if(null == materialInventory){
60 60 throw exception0(BAD_REQUEST.getCode(),createReqVO.getMaterialName()+"没有库存");
61 61 }
... ...