Commit 8559fdd3df062950e419c974b88d19d441a0df32
1 parent
66ab4380
耗材登记bug修改
Showing
3 changed files
with
9 additions
and
2 deletions
urbanops-module-api/urbanops-module-garden-api/src/main/java/com/zteits/urbanops/module/garden/dto/material/MaterialInventoryOutDto.java
| ... | ... | @@ -17,6 +17,9 @@ public class MaterialInventoryOutDto { |
| 17 | 17 | @Schema(description = "入库ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18713") |
| 18 | 18 | private Long id; |
| 19 | 19 | |
| 20 | + @Schema(description = "库存id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 21 | + private String inventoryId; | |
| 22 | + | |
| 20 | 23 | @Schema(description = "物料ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14541") |
| 21 | 24 | @NotNull(message = "物料ID不能为空") |
| 22 | 25 | private Long materialId; | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/materialdetail/vo/MaterialDetailSaveReqVO.java
| ... | ... | @@ -79,4 +79,7 @@ public class MaterialDetailSaveReqVO { |
| 79 | 79 | @Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED, example = "规格") |
| 80 | 80 | @NotEmpty(message = "规格不能为空") |
| 81 | 81 | private String specifications; |
| 82 | + | |
| 83 | + @Schema(description = "库存id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 84 | + private String inventoryId; | |
| 82 | 85 | } | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/materialdetail/MaterialDetailServiceImpl.java
| ... | ... | @@ -133,12 +133,13 @@ public class MaterialDetailServiceImpl implements MaterialDetailService { |
| 133 | 133 | // } |
| 134 | 134 | // } |
| 135 | 135 | //耗材出库 |
| 136 | - for (MaterialDetailDO materialDetailDO : materialDetailList) { | |
| 136 | + for (MaterialDetailSaveReqVO materialDetailDO : createReqVO) { | |
| 137 | 137 | MaterialInventoryOutDto outDto = new MaterialInventoryOutDto(); |
| 138 | 138 | outDto.setMaterialId(materialDetailDO.getMaterialId()); |
| 139 | 139 | outDto.setMaterialName(materialDetailDO.getMaterialName()); |
| 140 | - outDto.setOutInventoryNum(materialDetailDO.getUserCount()); | |
| 140 | + outDto.setOutInventoryNum(Long.valueOf(materialDetailDO.getUserCount())); | |
| 141 | 141 | outDto.setOutDate(LocalDateTime.now()); |
| 142 | + outDto.setInventoryId(materialDetailDO.getInventoryId()); | |
| 142 | 143 | materialApi.createMaterialInventoryOut(outDto); |
| 143 | 144 | } |
| 144 | 145 | //保存耗材 | ... | ... |