Commit 89b6bfe34b3aa9d4d0a9769f29d9220aef428c8e
1 parent
70332032
1. 选择的时候 不能合计
2. 入库时,可收数量由后台计算
Showing
4 changed files
with
24 additions
and
12 deletions
ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue
... | ... | @@ -402,7 +402,8 @@ export default { |
402 | 402 | { |
403 | 403 | title:'序列号', |
404 | 404 | align:"center", |
405 | - dataIndex: 'sn' | |
405 | + dataIndex: 'sn', | |
406 | + ellipsis: true, | |
406 | 407 | }, |
407 | 408 | { |
408 | 409 | title: '入库日期', |
... | ... | @@ -693,6 +694,7 @@ export default { |
693 | 694 | if (selectedRowKeys != null && selectedRowKeys.length > 0) { |
694 | 695 | this.selectedMainId = selectedRowKeys[0].toString(); |
695 | 696 | } |
697 | + selectedRowKeys = selectedRowKeys.filter((item) => item !== '合计'); | |
696 | 698 | this.selectedRowKeys = selectedRowKeys; |
697 | 699 | this.selectRecord = selectionRows; |
698 | 700 | }, |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/SelfCheck.java
... | ... | @@ -72,7 +72,8 @@ public class SelfCheck implements Job { |
72 | 72 | LambdaQueryWrapper<InventoryHeader> inventoryHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
73 | 73 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); |
74 | 74 | // 锁定的容器查看是否有任务 |
75 | - containerLambdaQueryWrapper.eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_LOCK); | |
75 | + containerLambdaQueryWrapper.eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_LOCK).ne(Container::getContainerTypeCode, | |
76 | + QuantityConstant.CONTAINER_TYPE_LS); | |
76 | 77 | containerList = containerService.list(containerLambdaQueryWrapper); |
77 | 78 | if (!CollectionUtils.isEmpty(containerList)) { |
78 | 79 | container = containerList.stream().map(i -> i.getCode()).collect(Collectors.toList()); |
... | ... | @@ -112,7 +113,8 @@ public class SelfCheck implements Job { |
112 | 113 | // } |
113 | 114 | // 有货或满盘的容器 查看是否有库存 |
114 | 115 | containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
115 | - containerLambdaQueryWrapper.in(Container::getFillStatus, QuantityConstant.STATUS_CONTAINER_FILL_SOME, QuantityConstant.STATUS_CONTAINER_FILL_FULL); | |
116 | + containerLambdaQueryWrapper.ne(Container::getContainerTypeCode, QuantityConstant.CONTAINER_TYPE_LS).in(Container::getFillStatus, | |
117 | + QuantityConstant.STATUS_CONTAINER_FILL_SOME, QuantityConstant.STATUS_CONTAINER_FILL_FULL); | |
116 | 118 | containerList = containerService.list(containerLambdaQueryWrapper); |
117 | 119 | if (!CollectionUtils.isEmpty(containerList)) { |
118 | 120 | container = containerList.stream().map(i -> i.getCode()).collect(Collectors.toList()); |
... | ... | @@ -133,7 +135,8 @@ public class SelfCheck implements Job { |
133 | 135 | } |
134 | 136 | // 空盘容器 是否有库存 |
135 | 137 | containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
136 | - containerLambdaQueryWrapper.in(Container::getFillStatus, QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_FILL_MANY); | |
138 | + containerLambdaQueryWrapper.ne(Container::getContainerTypeCode, QuantityConstant.CONTAINER_TYPE_LS).in(Container::getFillStatus, | |
139 | + QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_FILL_MANY); | |
137 | 140 | containerList = containerService.list(containerLambdaQueryWrapper); |
138 | 141 | if (!CollectionUtils.isEmpty(containerList)) { |
139 | 142 | container = containerList.stream().map(i -> i.getCode()).collect(Collectors.toList()); |
... | ... | @@ -150,7 +153,8 @@ public class SelfCheck implements Job { |
150 | 153 | } |
151 | 154 | // 容器有库位=对应库位有这个容器 |
152 | 155 | containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
153 | - containerLambdaQueryWrapper.ne(Container::getLocationCode, QuantityConstant.EMPTY_STRING); | |
156 | + containerLambdaQueryWrapper.ne(Container::getContainerTypeCode, QuantityConstant.CONTAINER_TYPE_LS).ne(Container::getLocationCode, | |
157 | + QuantityConstant.EMPTY_STRING); | |
154 | 158 | containerList = containerService.list(containerLambdaQueryWrapper); |
155 | 159 | if (!CollectionUtils.isEmpty(containerList)) { |
156 | 160 | common = new ArrayList<>(); |
... | ... | @@ -213,7 +217,8 @@ public class SelfCheck implements Job { |
213 | 217 | // } |
214 | 218 | // 容器没库位 查看库位是否有容器 |
215 | 219 | containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
216 | - containerLambdaQueryWrapper.eq(Container::getLocationCode, QuantityConstant.EMPTY_STRING); | |
220 | + containerLambdaQueryWrapper.ne(Container::getContainerTypeCode, QuantityConstant.CONTAINER_TYPE_LS).eq(Container::getLocationCode, | |
221 | + QuantityConstant.EMPTY_STRING); | |
217 | 222 | containerList = containerService.list(containerLambdaQueryWrapper); |
218 | 223 | if (!CollectionUtils.isEmpty(containerList)) { |
219 | 224 | container = containerList.stream().map(i -> i.getCode()).collect(Collectors.toList()); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
... | ... | @@ -224,8 +224,12 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl |
224 | 224 | List<ReceiptDetail> receiptDetailList = new ArrayList<>(); |
225 | 225 | List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>(); |
226 | 226 | for (Receive receive : receiveList) { |
227 | + ReceiptDetail receiptDetail = receiptDetailService.getById(receive.getId()); | |
228 | + if (receiptDetail == null) { | |
229 | + throw new JeecgBootException("入库组盘,没有找到入库单详情ID:" + receive.getId()); | |
230 | + } | |
227 | 231 | // 可收数量 |
228 | - BigDecimal qty = receive.getQty(); | |
232 | + BigDecimal qty = receiptDetail.getQty().subtract(receiptDetail.getTaskQty()); | |
229 | 233 | // 收货数量 |
230 | 234 | BigDecimal taskQty = receive.getTaskQty(); |
231 | 235 | if (qty == null || taskQty == null) { |
... | ... | @@ -241,10 +245,6 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl |
241 | 245 | if (taskQty.compareTo(BigDecimal.ZERO) <= 0) { |
242 | 246 | continue; |
243 | 247 | } |
244 | - ReceiptDetail receiptDetail = receiptDetailService.getById(receive.getId()); | |
245 | - if (receiptDetail == null) { | |
246 | - throw new JeecgBootException("入库组盘,没有找到入库单详情ID:" + receive.getId()); | |
247 | - } | |
248 | 248 | ReceiptHeader receiptHeader = receiptHeaderService.getById(receiptDetail.getReceiptId()); |
249 | 249 | if (receiptHeader == null) { |
250 | 250 | throw new JeecgBootException("入库组盘,没有找到入库单ID:" + receiptDetail.getReceiptId()); |
... | ... | @@ -281,6 +281,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl |
281 | 281 | LambdaQueryWrapper<ReceiptContainerDetail> receiptContainerDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
282 | 282 | receiptContainerDetailLambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptId, receiptDetail.getReceiptId()) |
283 | 283 | .eq(ReceiptContainerDetail::getReceiptDetailId, receiptDetail.getId()) |
284 | + .eq(StringUtils.isNotEmpty(receive.getSn()), ReceiptContainerDetail::getSn, receive.getSn()) | |
284 | 285 | .eq(ReceiptContainerDetail::getReceiptContainerId, receiptContainerHeader.getId()); |
285 | 286 | ReceiptContainerDetail receiptContainerDetail = receiptContainerDetailService.getOne(receiptContainerDetailLambdaQueryWrapper); |
286 | 287 | if (receiptContainerDetail != null) { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerAdvice/service/impl/ShipmentContainerAdviceServiceImpl.java
... | ... | @@ -280,10 +280,14 @@ public class ShipmentContainerAdviceServiceImpl extends ServiceImpl<ShipmentCont |
280 | 280 | throw new JeecgBootException("预配盘扣减库存失败, 没有找到" + containerCode + "库存表头"); |
281 | 281 | } |
282 | 282 | List<InventoryDetail> inventoryDetailList1 = inventoryDetailService.getInventoryDetailListByInventoryHeaderId(inventoryHeader.getId()); |
283 | - if (inventoryDetailList1.size() == 0) { | |
283 | + if (CollectionUtils.isEmpty(inventoryDetailList1)) { | |
284 | 284 | if (!inventoryHeaderService.removeById(inventoryHeader.getId())) { |
285 | 285 | throw new JeecgBootException("预配盘扣减库存失败,删除库存头失败" + inventoryHeader.getId()); |
286 | 286 | } |
287 | + } else { | |
288 | + if (!taskHeaderService.combineInventoryDetail(containerCode, warehouseCode)) { | |
289 | + throw new JeecgBootException("预配盘扣减库存失败,托盘:" + containerCode + "调整库存失败"); | |
290 | + } | |
287 | 291 | } |
288 | 292 | return Result.OK("预配盘扣减库存成功"); |
289 | 293 | } |
... | ... |