Commit 953e50cd62863685b8dc2758e4ffdc543fea1dbc
1 parent
a7f27daf
fix: 修复出入口getOne报错问题
Showing
3 changed files
with
133 additions
and
116 deletions
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/port/service/IPortService.java
... | ... | @@ -8,9 +8,9 @@ import com.baomidou.mybatisplus.extension.service.IService; |
8 | 8 | |
9 | 9 | /** |
10 | 10 | * @Description: 出入口 |
11 | - * @Author: jeecg-boot | |
12 | - * @Date: 2022-10-27 | |
13 | - * @Version: V1.0 | |
11 | + * @Author: jeecg-boot | |
12 | + * @Date: 2022-10-27 | |
13 | + * @Version: V1.0 | |
14 | 14 | */ |
15 | 15 | public interface IPortService extends IService<Port> { |
16 | 16 | |
... | ... | @@ -22,7 +22,7 @@ public interface IPortService extends IService<Port> { |
22 | 22 | |
23 | 23 | Port getPortByCode(String code, Integer type, String zoneCode, String warehouseCode); |
24 | 24 | |
25 | - Port getPortByCode(String code, String zoneCode, String warehouseCode); | |
25 | + //Port getPortByCode(String code, String zoneCode, String warehouseCode); | |
26 | 26 | |
27 | 27 | Port getPortByCode(String code, String warehouseCode); |
28 | 28 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/port/service/impl/PortServiceImpl.java
... | ... | @@ -14,9 +14,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
14 | 14 | |
15 | 15 | /** |
16 | 16 | * @Description: 出入口 |
17 | - * @Author: jeecg-boot | |
18 | - * @Date: 2022-10-27 | |
19 | - * @Version: V1.0 | |
17 | + * @Author: jeecg-boot | |
18 | + * @Date: 2022-10-27 | |
19 | + * @Version: V1.0 | |
20 | 20 | */ |
21 | 21 | @Service |
22 | 22 | public class PortServiceImpl extends ServiceImpl<PortMapper, Port> implements IPortService { |
... | ... | @@ -33,7 +33,7 @@ public class PortServiceImpl extends ServiceImpl<PortMapper, Port> implements IP |
33 | 33 | public List<Port> getPortListByType(int type, Integer roadWay, String zoneCode, String warehouseCode) { |
34 | 34 | LambdaQueryWrapper<Port> portLambdaQueryWrapper = Wrappers.lambdaQuery(); |
35 | 35 | portLambdaQueryWrapper.eq(Port::getType, type).eq(Port::getZoneCode, zoneCode).eq(Port::getWarehouseCode, warehouseCode).in(roadWay != null, |
36 | - Port::getRoadWay, roadWay); | |
36 | + Port::getRoadWay, roadWay); | |
37 | 37 | List<Port> portList = list(portLambdaQueryWrapper); |
38 | 38 | if (CollectionUtils.isEmpty(portList)) { |
39 | 39 | portList = getPortListByType(type, zoneCode, warehouseCode); |
... | ... | @@ -44,19 +44,17 @@ public class PortServiceImpl extends ServiceImpl<PortMapper, Port> implements IP |
44 | 44 | @Override |
45 | 45 | public Port getPortByCode(String code, Integer type, String zoneCode, String warehouseCode) { |
46 | 46 | LambdaQueryWrapper<Port> portLambdaQueryWrapper = Wrappers.lambdaQuery(); |
47 | - portLambdaQueryWrapper.eq(Port::getCode, code).eq(Port::getZoneCode, zoneCode).eq(Port::getWarehouseCode, warehouseCode).in(type != null, Port::getType, | |
48 | - type); | |
49 | - Port port = getOne(portLambdaQueryWrapper); | |
50 | - return port; | |
47 | + portLambdaQueryWrapper.eq(Port::getCode, code).eq(Port::getZoneCode, zoneCode).eq(Port::getWarehouseCode, warehouseCode).in(type != null, Port::getType, type); | |
48 | + return getOne(portLambdaQueryWrapper); | |
51 | 49 | } |
52 | 50 | |
53 | - @Override | |
54 | - public Port getPortByCode(String code, String zoneCode, String warehouseCode) { | |
55 | - LambdaQueryWrapper<Port> portLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
56 | - portLambdaQueryWrapper.eq(Port::getCode, code).eq(Port::getZoneCode, zoneCode).eq(Port::getWarehouseCode, warehouseCode); | |
57 | - Port port = getOne(portLambdaQueryWrapper); | |
58 | - return port; | |
59 | - } | |
51 | + //@Override | |
52 | + //public Port getPortByCode(String code, String zoneCode, String warehouseCode) { | |
53 | + // LambdaQueryWrapper<Port> portLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
54 | + // portLambdaQueryWrapper.eq(Port::getCode, code).eq(Port::getZoneCode, zoneCode).eq(Port::getWarehouseCode, warehouseCode); | |
55 | + // Port port = getOne(portLambdaQueryWrapper); | |
56 | + // return port; | |
57 | + //} | |
60 | 58 | |
61 | 59 | @Override |
62 | 60 | public Port getPortByCode(String code, String warehouseCode) { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... | ... | @@ -91,9 +91,9 @@ import lombok.extern.slf4j.Slf4j; |
91 | 91 | |
92 | 92 | /** |
93 | 93 | * @Description: 任务表 |
94 | - * @Author: jeecg-boot | |
95 | - * @Date: 2022-11-10 | |
96 | - * @Version: V1.0 | |
94 | + * @Author: jeecg-boot | |
95 | + * @Date: 2022-11-10 | |
96 | + * @Version: V1.0 | |
97 | 97 | */ |
98 | 98 | @Slf4j |
99 | 99 | @Service |
... | ... | @@ -222,7 +222,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
222 | 222 | |
223 | 223 | /** |
224 | 224 | * 如果库位是锁定的,那么这个库位一定是被某个任务占用。 |
225 | - * @param location | |
225 | + * | |
226 | + * @param location | |
226 | 227 | * @return |
227 | 228 | */ |
228 | 229 | @Override |
... | ... | @@ -332,11 +333,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
332 | 333 | } |
333 | 334 | |
334 | 335 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_TRANSFER, containerCode, fromLocationCode, toLocationCode, |
335 | - warehouseCode); | |
336 | + warehouseCode); | |
336 | 337 | if (!result.isSuccess()) { |
337 | 338 | throw new JeecgBootException(result.getMessage()); |
338 | 339 | } |
339 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | |
340 | + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult(); | |
340 | 341 | String zoneCode = taskLockEntity.getZoneCode(); |
341 | 342 | // 4. 判断源库位旁边有托盘但是没有任务,那么不允许移库 |
342 | 343 | TaskHeader taskHeader = new TaskHeader(); |
... | ... | @@ -403,13 +404,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
403 | 404 | toLocationCode = fromLocationCode; |
404 | 405 | } |
405 | 406 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_CHECK_OUT, containerCode, fromLocationCode, toLocationCode, |
406 | - warehouseCode); | |
407 | + warehouseCode); | |
407 | 408 | if (!result.isSuccess()) { |
408 | 409 | throw new JeecgBootException(result.getMessage()); |
409 | 410 | } |
410 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | |
411 | + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult(); | |
411 | 412 | String zoneCode = taskLockEntity.getZoneCode(); |
412 | - Port port = portService.getPortByCode(toPortCode, zoneCode, warehouseCode); | |
413 | + Port port = portService.getPortByCode(toPortCode, QuantityConstant.PORT_TYPE_PICK, zoneCode, warehouseCode); | |
413 | 414 | if (port == null) { |
414 | 415 | throw new JeecgBootException("创建出库查看任务时,没有找到出库口:" + toPortCode); |
415 | 416 | } |
... | ... | @@ -465,11 +466,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
465 | 466 | toLocationCode = fromLocationCode; |
466 | 467 | } |
467 | 468 | Result result = |
468 | - taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_QUALITY, containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
469 | + taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_QUALITY, containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
469 | 470 | if (!result.isSuccess()) { |
470 | 471 | throw new JeecgBootException(result.getMessage()); |
471 | 472 | } |
472 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | |
473 | + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult(); | |
473 | 474 | String zoneCode = taskLockEntity.getZoneCode(); |
474 | 475 | Port port = portService.getPortByCode(toPortCode, QuantityConstant.PORT_TYPE_PICK, zoneCode, warehouseCode); |
475 | 476 | if (port == null) { |
... | ... | @@ -493,7 +494,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
493 | 494 | } |
494 | 495 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
495 | 496 | inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getContainerCode, containerCode).eq(InventoryDetail::getWarehouseCode, warehouseCode) |
496 | - .eq(InventoryDetail::getLocationCode, fromLocationCode); | |
497 | + .eq(InventoryDetail::getLocationCode, fromLocationCode); | |
497 | 498 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper); |
498 | 499 | List<TaskDetail> taskDetailList = new ArrayList<>(); |
499 | 500 | if (inventoryDetailList.size() != 0) { |
... | ... | @@ -552,7 +553,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
552 | 553 | return Result.error("创建跨站任务时,起始站台和目标站台不能相同"); |
553 | 554 | } |
554 | 555 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_OVER_STATION, containerCode, QuantityConstant.EMPTY_STRING, |
555 | - QuantityConstant.EMPTY_STRING, warehouseCode); | |
556 | + QuantityConstant.EMPTY_STRING, warehouseCode); | |
556 | 557 | if (!result.isSuccess()) { |
557 | 558 | throw new JeecgBootException(result.getMessage()); |
558 | 559 | } |
... | ... | @@ -628,7 +629,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
628 | 629 | int high = locationHigh.getHigh(); |
629 | 630 | boolean bypass = false; |
630 | 631 | String toLocationCode = |
631 | - allocationService.allocation(allocationRule, locationTypeCodeList, high, zoneCode, roadWays, warehouseCode, containerCode, null, null, bypass); | |
632 | + allocationService.allocation(allocationRule, locationTypeCodeList, high, zoneCode, roadWays, warehouseCode, containerCode, null, null, bypass); | |
632 | 633 | if (StringUtils.isEmpty(toLocationCode)) { |
633 | 634 | throw new JeecgBootException("创建空托盘组入库任务时,目标库位为空"); |
634 | 635 | } |
... | ... | @@ -650,11 +651,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
650 | 651 | } |
651 | 652 | log.info("开始创建空托盘组入库任务,容器编码" + containerCode + ",库位编码" + toLocationCode); |
652 | 653 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT, containerCode, |
653 | - QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); | |
654 | + QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); | |
654 | 655 | if (!result.isSuccess()) { |
655 | 656 | throw new JeecgBootException(result.getMessage()); |
656 | 657 | } |
657 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | |
658 | + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult(); | |
658 | 659 | String zoneCode = taskLockEntity.getZoneCode(); |
659 | 660 | TaskHeader taskHeader = new TaskHeader(); |
660 | 661 | taskHeader.setWarehouseCode(warehouseCode); |
... | ... | @@ -687,11 +688,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
687 | 688 | return Result.error("创建空托盘组出库任务时,仓库编码为空"); |
688 | 689 | } |
689 | 690 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_MANY_EMPTYSHIPMENT, containerCode, |
690 | - QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode); | |
691 | + QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode); | |
691 | 692 | if (!result.isSuccess()) { |
692 | 693 | throw new JeecgBootException(result.getMessage()); |
693 | 694 | } |
694 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | |
695 | + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult(); | |
695 | 696 | String zoneCode = taskLockEntity.getZoneCode(); |
696 | 697 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); |
697 | 698 | String fromLocationCode = container.getLocationCode(); |
... | ... | @@ -764,13 +765,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
764 | 765 | } |
765 | 766 | // 5、删除容器上的库位编码,并设置状态为空闲,填充度状态为空盘 |
766 | 767 | boolean success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, |
767 | - QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); | |
768 | + QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); | |
768 | 769 | if (!success) { |
769 | 770 | throw new JeecgBootException("处理空出失败, 更新容器状态失败"); |
770 | 771 | } |
771 | 772 | // 6、删除库位上的容器编码,并设置状态为空闲 |
772 | 773 | success = |
773 | - locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
774 | + locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
774 | 775 | if (!success) { |
775 | 776 | throw new JeecgBootException("处理空出失败, 更新库位状态失败"); |
776 | 777 | } |
... | ... | @@ -785,7 +786,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
785 | 786 | // 8、删除库存详情失败 |
786 | 787 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); |
787 | 788 | if (inventoryDetailList.size() != 0) { |
788 | - List<Integer> idList = inventoryDetailList.stream().map(InventoryDetail::getId).collect(Collectors.toList());; | |
789 | + List<Integer> idList = inventoryDetailList.stream().map(InventoryDetail::getId).collect(Collectors.toList()); | |
790 | + ; | |
789 | 791 | success = inventoryDetailService.removeByIds(idList); |
790 | 792 | if (!success) { |
791 | 793 | throw new JeecgBootException("处理空出失败, 删除库存详情失败"); |
... | ... | @@ -843,7 +845,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
843 | 845 | } |
844 | 846 | } |
845 | 847 | } |
846 | - ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(taskHeader.getReceiptContainerHeaderId());; | |
848 | + ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(taskHeader.getReceiptContainerHeaderId()); | |
849 | + ; | |
847 | 850 | if (receiptContainerHeader != null) { |
848 | 851 | success = receiptContainerHeaderService.updateStatusById(QuantityConstant.RECEIPT_CONTAINER_FINISHED, receiptContainerHeader.getId()); |
849 | 852 | if (!success) { |
... | ... | @@ -989,7 +992,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
989 | 992 | public TaskHeader getUnCompleteTaskByFromLocationCode(String fromLocationCode, String warehouseCode) { |
990 | 993 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
991 | 994 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getFromLocationCode, fromLocationCode).eq(TaskHeader::getWarehouseCode, warehouseCode).lt(TaskHeader::getStatus, |
992 | - QuantityConstant.TASK_STATUS_COMPLETED); | |
995 | + QuantityConstant.TASK_STATUS_COMPLETED); | |
993 | 996 | TaskHeader taskHeader = taskHeaderService.getOne(taskHeaderLambdaQueryWrapper); |
994 | 997 | return taskHeader; |
995 | 998 | } |
... | ... | @@ -998,7 +1001,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
998 | 1001 | public TaskHeader getUnCompleteTaskByToLocationCode(String toLocationCode, String warehouseCode) { |
999 | 1002 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
1000 | 1003 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getToLocationCode, toLocationCode).eq(TaskHeader::getWarehouseCode, warehouseCode).lt(TaskHeader::getStatus, |
1001 | - QuantityConstant.TASK_STATUS_COMPLETED); | |
1004 | + QuantityConstant.TASK_STATUS_COMPLETED); | |
1002 | 1005 | TaskHeader taskHeader = taskHeaderService.getOne(taskHeaderLambdaQueryWrapper); |
1003 | 1006 | return taskHeader; |
1004 | 1007 | } |
... | ... | @@ -1016,7 +1019,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1016 | 1019 | public TaskHeader getUnCompleteTaskByContainerCode(String containerCode, String warehouseCode) { |
1017 | 1020 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
1018 | 1021 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getContainerCode, containerCode).eq(TaskHeader::getWarehouseCode, warehouseCode).lt(TaskHeader::getStatus, |
1019 | - QuantityConstant.TASK_STATUS_COMPLETED); | |
1022 | + QuantityConstant.TASK_STATUS_COMPLETED); | |
1020 | 1023 | TaskHeader taskHeader = taskHeaderService.getOne(taskHeaderLambdaQueryWrapper); |
1021 | 1024 | return taskHeader; |
1022 | 1025 | } |
... | ... | @@ -1025,7 +1028,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1025 | 1028 | public TaskHeader getUnCompleteTaskByPreTaskNo(int preTaskNo, String warehouseCode) { |
1026 | 1029 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
1027 | 1030 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getPreTaskNo, preTaskNo).eq(TaskHeader::getWarehouseCode, warehouseCode).lt(TaskHeader::getStatus, |
1028 | - QuantityConstant.TASK_STATUS_COMPLETED); | |
1031 | + QuantityConstant.TASK_STATUS_COMPLETED); | |
1029 | 1032 | TaskHeader taskHeader = taskHeaderService.getOne(taskHeaderLambdaQueryWrapper); |
1030 | 1033 | return taskHeader; |
1031 | 1034 | } |
... | ... | @@ -1223,9 +1226,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1223 | 1226 | * 创建空托盘入库 |
1224 | 1227 | * 1. 判断托盘号、库位编码是否满足要求 |
1225 | 1228 | * 2. 创建任务,锁定容器、库位 |
1226 | - * @param containerCode | |
1227 | - * @param toLocationCode | |
1228 | - * @param warehouseCode | |
1229 | + * | |
1230 | + * @param containerCode | |
1231 | + * @param toLocationCode | |
1232 | + * @param warehouseCode | |
1229 | 1233 | * @return |
1230 | 1234 | */ |
1231 | 1235 | @Override |
... | ... | @@ -1251,7 +1255,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1251 | 1255 | } |
1252 | 1256 | |
1253 | 1257 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_EMPTYRECEIPT, containerCode, QuantityConstant.EMPTY_STRING, |
1254 | - toLocationCode, warehouseCode); | |
1258 | + toLocationCode, warehouseCode); | |
1255 | 1259 | if (!result.isSuccess()) { |
1256 | 1260 | throw new JeecgBootException(result.getMessage()); |
1257 | 1261 | } |
... | ... | @@ -1282,9 +1286,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1282 | 1286 | |
1283 | 1287 | /** |
1284 | 1288 | * 创建空托盘出库 |
1285 | - * @param containerCode | |
1286 | - * @param toPortCode | |
1287 | - * @param warehouseCode | |
1289 | + * | |
1290 | + * @param containerCode | |
1291 | + * @param toPortCode | |
1292 | + * @param warehouseCode | |
1288 | 1293 | * @return |
1289 | 1294 | */ |
1290 | 1295 | @Override |
... | ... | @@ -1303,13 +1308,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1303 | 1308 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); |
1304 | 1309 | String fromLocationCode = container.getLocationCode(); |
1305 | 1310 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_EMPTYSHIPMENT, containerCode, QuantityConstant.EMPTY_STRING, |
1306 | - QuantityConstant.EMPTY_STRING, warehouseCode); | |
1311 | + QuantityConstant.EMPTY_STRING, warehouseCode); | |
1307 | 1312 | if (!result.isSuccess()) { |
1308 | 1313 | throw new JeecgBootException(result.getMessage()); |
1309 | 1314 | } |
1310 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | |
1315 | + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult(); | |
1311 | 1316 | String zoneCode = taskLockEntity.getZoneCode(); |
1312 | - Port port = portService.getPortByCode(toPortCode, zoneCode, warehouseCode); | |
1317 | + Port port = portService.getPortByCode(toPortCode, QuantityConstant.PORT_TYPE_OUT, zoneCode, warehouseCode); | |
1313 | 1318 | if (port == null) { |
1314 | 1319 | return Result.error("创建空托盘出库时, 没有找到出库口" + toPortCode); |
1315 | 1320 | } |
... | ... | @@ -1347,8 +1352,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1347 | 1352 | } |
1348 | 1353 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
1349 | 1354 | containerLambdaQueryWrapper.eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_EMPTY).ne(Container::getLocationCode, QuantityConstant.EMPTY_STRING) |
1350 | - .eq(Container::getFillStatus, QuantityConstant.STATUS_CONTAINER_FILL_EMPTY).eq(Container::getWarehouseCode, warehouseCode) | |
1351 | - .orderByAsc(Container::getUpdateTime); | |
1355 | + .eq(Container::getFillStatus, QuantityConstant.STATUS_CONTAINER_FILL_EMPTY).eq(Container::getWarehouseCode, warehouseCode) | |
1356 | + .orderByAsc(Container::getUpdateTime); | |
1352 | 1357 | List<Container> containerList = containerService.list(containerLambdaQueryWrapper); |
1353 | 1358 | List<Container> removeContainerList = new ArrayList<>(); |
1354 | 1359 | if (CollectionUtils.isNotEmpty(containerList)) { |
... | ... | @@ -1380,16 +1385,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1380 | 1385 | |
1381 | 1386 | /** |
1382 | 1387 | * 完成入库任务 |
1383 | - * @param taskHeader 任务 | |
1384 | - * @return AjaxResult 完成入库任务结果 | |
1388 | + * | |
1389 | + * @param taskHeader 任务 | |
1390 | + * @return AjaxResult 完成入库任务结果 | |
1385 | 1391 | */ |
1386 | 1392 | @Override |
1387 | 1393 | @Transactional(rollbackFor = Exception.class) |
1388 | 1394 | @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'入库任务完成'", extra = "#extraJsonString1", |
1389 | - msg = "#taskHeader == null ? '' : '任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", | |
1390 | - recordReturnValue = true) | |
1395 | + msg = "#taskHeader == null ? '' : '任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", | |
1396 | + recordReturnValue = true) | |
1391 | 1397 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务完成'", extra = "#extraJsonString1", |
1392 | - msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", recordReturnValue = true) | |
1398 | + msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", recordReturnValue = true) | |
1393 | 1399 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情入库完成'", extra = "#extraJsonString2", msg = "''", recordReturnValue = true) |
1394 | 1400 | public Result completeReceiptTask(TaskHeader taskHeader) { |
1395 | 1401 | if (taskHeader == null) { |
... | ... | @@ -1411,7 +1417,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1411 | 1417 | int allow = parameterConfigurationService.getIntValueByCode(QuantityConstant.RULE_CALL_BOX_ALLOW_EMPTY); |
1412 | 1418 | if (allow == QuantityConstant.RULE_ALLOW_EMPTY) { |
1413 | 1419 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, |
1414 | - fromLocationCode, toLocationCode, warehouseCode); | |
1420 | + fromLocationCode, toLocationCode, warehouseCode); | |
1415 | 1421 | if (!result.isSuccess()) { |
1416 | 1422 | throw new JeecgBootException(result.getMessage()); |
1417 | 1423 | } |
... | ... | @@ -1565,7 +1571,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1565 | 1571 | } |
1566 | 1572 | } |
1567 | 1573 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, fromLocationCode, |
1568 | - toLocationCode, warehouseCode); | |
1574 | + toLocationCode, warehouseCode); | |
1569 | 1575 | if (!result.isSuccess()) { |
1570 | 1576 | throw new JeecgBootException(result.getMessage()); |
1571 | 1577 | } |
... | ... | @@ -1583,17 +1589,18 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1583 | 1589 | |
1584 | 1590 | /** |
1585 | 1591 | * 完成出库任务 |
1586 | - * @param taskHeader 任务 | |
1587 | - * @return result 完成出库任务 | |
1592 | + * | |
1593 | + * @param taskHeader 任务 | |
1594 | + * @return result 完成出库任务 | |
1588 | 1595 | */ |
1589 | 1596 | @Override |
1590 | 1597 | @Transactional(rollbackFor = Exception.class) |
1591 | 1598 | @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'出库任务完成'", extra = "#extraJsonString1", |
1592 | - msg = "#taskHeader == null ? '' : '任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", | |
1593 | - recordReturnValue = true) | |
1599 | + msg = "#taskHeader == null ? '' : '任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", | |
1600 | + recordReturnValue = true) | |
1594 | 1601 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务完成'", extra = "#extraJsonString1", |
1595 | - msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getFromLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()", | |
1596 | - recordReturnValue = true) | |
1602 | + msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getFromLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()", | |
1603 | + recordReturnValue = true) | |
1597 | 1604 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情出库完成'", extra = "#extraJsonString2", msg = "''", recordReturnValue = true) |
1598 | 1605 | public Result completeShipmentTask(TaskHeader taskHeader) { |
1599 | 1606 | if (taskHeader == null) { |
... | ... | @@ -1633,7 +1640,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1633 | 1640 | } |
1634 | 1641 | } |
1635 | 1642 | List<ShipmentContainerAdvice> shipmentContainerAdviceList = |
1636 | - shipmentContainerAdviceService.getShipmentContainerAdviceListByShipmentContainerId(shipmentContainerHeader.getId()); | |
1643 | + shipmentContainerAdviceService.getShipmentContainerAdviceListByShipmentContainerId(shipmentContainerHeader.getId()); | |
1637 | 1644 | for (ShipmentContainerAdvice shipmentContainerAdvice : shipmentContainerAdviceList) { |
1638 | 1645 | if (!shipmentContainerAdviceService.updateStatusById(QuantityConstant.SHIPMENT_CONTAINER_FINISHED, shipmentContainerAdvice.getId())) { |
1639 | 1646 | throw new JeecgBootException("完成出库任务,更新出库预配盘失败"); |
... | ... | @@ -1657,7 +1664,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1657 | 1664 | } |
1658 | 1665 | } |
1659 | 1666 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, |
1660 | - fromLocationCode, toLocationCode, warehouseCode); | |
1667 | + fromLocationCode, toLocationCode, warehouseCode); | |
1661 | 1668 | if (!result.isSuccess()) { |
1662 | 1669 | throw new JeecgBootException(result.getMessage()); |
1663 | 1670 | } |
... | ... | @@ -1828,7 +1835,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1828 | 1835 | } |
1829 | 1836 | } |
1830 | 1837 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, fromLocationCode, |
1831 | - toLocationCode, warehouseCode); | |
1838 | + toLocationCode, warehouseCode); | |
1832 | 1839 | if (!result.isSuccess()) { |
1833 | 1840 | throw new JeecgBootException(result.getMessage()); |
1834 | 1841 | } |
... | ... | @@ -1904,8 +1911,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1904 | 1911 | InventoryDetail inventoryDetail1 = inventoryDetailList.get(i); |
1905 | 1912 | InventoryDetail inventoryDetail2 = inventoryDetailList.get(j); |
1906 | 1913 | if (inventoryDetail1.getMaterialCode().equals(inventoryDetail2.getMaterialCode()) && inventoryDetail1.getBatch().equals(inventoryDetail2.getBatch()) |
1907 | - && inventoryDetail1.getLot().equals(inventoryDetail2.getLot()) && inventoryDetail1.getProject().equals(inventoryDetail2.getProject()) | |
1908 | - && inventoryDetail1.getInventoryStatus().equals(inventoryDetail2.getInventoryStatus())) { | |
1914 | + && inventoryDetail1.getLot().equals(inventoryDetail2.getLot()) && inventoryDetail1.getProject().equals(inventoryDetail2.getProject()) | |
1915 | + && inventoryDetail1.getInventoryStatus().equals(inventoryDetail2.getInventoryStatus())) { | |
1909 | 1916 | // 属性一样的库存,相加合并。 |
1910 | 1917 | if (StringUtils.isNotEmpty(inventoryDetail1.getSn())) { |
1911 | 1918 | if (!inventoryDetail1.getSn().equals(inventoryDetail2.getSn())) { |
... | ... | @@ -1950,6 +1957,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1950 | 1957 | |
1951 | 1958 | /** |
1952 | 1959 | * 锁定容器和库位分4种情况,入库任务、出库任务、分拣任务、换站任务 |
1960 | + * | |
1953 | 1961 | * @param |
1954 | 1962 | */ |
1955 | 1963 | @Override |
... | ... | @@ -2166,7 +2174,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2166 | 2174 | @Override |
2167 | 2175 | @Transactional(rollbackFor = Exception.class) |
2168 | 2176 | public Result completeTaskUnLockContainerAndLocation(String containerFillStatus, int taskType, String containerCode, String fromLocationCode, |
2169 | - String toLocationCode, String warehouseCode) { | |
2177 | + String toLocationCode, String warehouseCode) { | |
2170 | 2178 | boolean success = false; |
2171 | 2179 | if (StringUtils.isEmpty(containerCode)) { |
2172 | 2180 | return Result.error("任务类型" + taskType + "完成任务时, 容器编码为空"); |
... | ... | @@ -2212,7 +2220,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2212 | 2220 | break; |
2213 | 2221 | case QuantityConstant.TASK_TYPE_OVER_STATION: |
2214 | 2222 | success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, |
2215 | - warehouseCode); | |
2223 | + warehouseCode); | |
2216 | 2224 | break; |
2217 | 2225 | } |
2218 | 2226 | if (!success) { |
... | ... | @@ -2224,7 +2232,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2224 | 2232 | return Result.error("任务类型" + taskType + "完成任务时," + toLocationCode + "目标库位不存在"); |
2225 | 2233 | } |
2226 | 2234 | success = |
2227 | - locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
2235 | + locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
2228 | 2236 | if (!success) { |
2229 | 2237 | throw new JeecgBootException("任务类型" + taskType + "完成任务时,更新源库位失败"); |
2230 | 2238 | } |
... | ... | @@ -2378,7 +2386,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2378 | 2386 | if (!result.isSuccess()) { |
2379 | 2387 | throw new JeecgBootException(result.getMessage()); |
2380 | 2388 | } |
2381 | - TaskHeader taskHeader = (TaskHeader)result.getResult(); | |
2389 | + TaskHeader taskHeader = (TaskHeader) result.getResult(); | |
2382 | 2390 | if (taskHeader.getTaskType() == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) { |
2383 | 2391 | if (port == null) { |
2384 | 2392 | throw new JeecgBootException("快速入库, 生成补充任务时必须有入库口"); |
... | ... | @@ -2448,7 +2456,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2448 | 2456 | shipmentDetailList.add(shipmentDetail); |
2449 | 2457 | shipmentQtyList.add(qty); |
2450 | 2458 | List<InventoryDetail> inventoryDetailList = |
2451 | - inventoryDetailService.getInventoryDetailListByMaterialCodeToShipment(materialCode, zoneCode, qty, warehouseCode); | |
2459 | + inventoryDetailService.getInventoryDetailListByMaterialCodeToShipment(materialCode, zoneCode, qty, warehouseCode); | |
2452 | 2460 | List<InventoryDetail> removeInventoryDetailList = new ArrayList<>(); |
2453 | 2461 | for (InventoryDetail inventoryDetail : inventoryDetailList) { |
2454 | 2462 | if (roadWay.intValue() == inventoryDetail.getRoadWay().intValue()) { |
... | ... | @@ -2484,7 +2492,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2484 | 2492 | ShipmentDetail shipmentDetail = shipmentDetailService.getById(shipmentDetailId); |
2485 | 2493 | BigDecimal shipQty = shipmentQtyList.get(i); |
2486 | 2494 | InventoryDetail inventoryDetail = |
2487 | - inventoryDetailService.getInventoryDetailByMaterialCodeToShipment(switchContainerCode, shipmentDetail.getMaterialCode(), shipQty, warehouseCode); | |
2495 | + inventoryDetailService.getInventoryDetailByMaterialCodeToShipment(switchContainerCode, shipmentDetail.getMaterialCode(), shipQty, warehouseCode); | |
2488 | 2496 | CombinationModel combinationModel = new CombinationModel(); |
2489 | 2497 | combinationModel.setShipmentDetail(shipmentDetail); |
2490 | 2498 | combinationModel.setInventoryDetail(inventoryDetail); |
... | ... | @@ -2577,8 +2585,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2577 | 2585 | |
2578 | 2586 | /** |
2579 | 2587 | * 完成空托盘入库任务 |
2580 | - * @param taskHeader 任务 | |
2581 | - * @return Result 完成入库任务结果 | |
2588 | + * | |
2589 | + * @param taskHeader 任务 | |
2590 | + * @return Result 完成入库任务结果 | |
2582 | 2591 | */ |
2583 | 2592 | @Override |
2584 | 2593 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -2597,7 +2606,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2597 | 2606 | return Result.error("完成空托盘入库任务时, 目标库位编码为空"); |
2598 | 2607 | } |
2599 | 2608 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_EMPTYRECEIPT, |
2600 | - containerCode, QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); | |
2609 | + containerCode, QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); | |
2601 | 2610 | if (!result.isSuccess()) { |
2602 | 2611 | throw new JeecgBootException(result.getMessage()); |
2603 | 2612 | } |
... | ... | @@ -2612,7 +2621,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2612 | 2621 | /** |
2613 | 2622 | * 盘点完成 |
2614 | 2623 | * 盘点有差异完成时状态为105 |
2615 | - * @param taskHeader | |
2624 | + * | |
2625 | + * @param taskHeader | |
2616 | 2626 | * @return |
2617 | 2627 | */ |
2618 | 2628 | @Override |
... | ... | @@ -2901,7 +2911,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2901 | 2911 | cycleCountHeaderService.updataHeaderStatus(cycleCountDetail.getCycleCountHeadCode()); |
2902 | 2912 | |
2903 | 2913 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_CHECK_OUT, |
2904 | - containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
2914 | + containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
2905 | 2915 | if (!result.isSuccess()) { |
2906 | 2916 | throw new JeecgBootException(result.getMessage()); |
2907 | 2917 | } |
... | ... | @@ -2915,8 +2925,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2915 | 2925 | |
2916 | 2926 | /** |
2917 | 2927 | * 完成空托盘出库任务 |
2918 | - * @param taskHeader 任务 | |
2919 | - * @return Result 完成出库任务结果 | |
2928 | + * | |
2929 | + * @param taskHeader 任务 | |
2930 | + * @return Result 完成出库任务结果 | |
2920 | 2931 | */ |
2921 | 2932 | @Override |
2922 | 2933 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -2947,12 +2958,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2947 | 2958 | if (fromLocation == null) { |
2948 | 2959 | return Result.error("完成空托盘出库任务时," + fromLocationCode + "目标库位不存在"); |
2949 | 2960 | } |
2950 | - Port port = portService.getPortByCode(toPortCode, zoneCode, warehouseCode); | |
2961 | + Port port = portService.getPortByCode(toPortCode, QuantityConstant.PORT_TYPE_OUT, zoneCode, warehouseCode); | |
2951 | 2962 | if (port == null) { |
2952 | 2963 | return Result.error("完成空托盘出库任务时," + toPortCode + "目标出库口不存在"); |
2953 | 2964 | } |
2954 | 2965 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_EMPTYSHIPMENT, |
2955 | - containerCode, fromLocationCode, QuantityConstant.EMPTY_STRING, warehouseCode); | |
2966 | + containerCode, fromLocationCode, QuantityConstant.EMPTY_STRING, warehouseCode); | |
2956 | 2967 | if (!result.isSuccess()) { |
2957 | 2968 | throw new JeecgBootException(result.getMessage()); |
2958 | 2969 | } |
... | ... | @@ -2966,8 +2977,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2966 | 2977 | |
2967 | 2978 | /** |
2968 | 2979 | * 完成移库任务 |
2969 | - * @param taskHeader 任务 | |
2970 | - * @return Result 完成移库任务结果 | |
2980 | + * | |
2981 | + * @param taskHeader 任务 | |
2982 | + * @return Result 完成移库任务结果 | |
2971 | 2983 | */ |
2972 | 2984 | @Override |
2973 | 2985 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -2994,7 +3006,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2994 | 3006 | List<InventoryTransaction> inventoryTransactionList = new ArrayList<>(); |
2995 | 3007 | LambdaUpdateWrapper<InventoryDetail> inventoryDetailLambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
2996 | 3008 | inventoryDetailLambdaUpdateWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getContainerCode, containerCode) |
2997 | - .eq(InventoryDetail::getLocationCode, fromLocationCode); | |
3009 | + .eq(InventoryDetail::getLocationCode, fromLocationCode); | |
2998 | 3010 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaUpdateWrapper); |
2999 | 3011 | for (InventoryDetail inventoryDetail : inventoryDetailList) { |
3000 | 3012 | inventoryDetail.setLocationCode(toLocationCode); |
... | ... | @@ -3025,7 +3037,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3025 | 3037 | } |
3026 | 3038 | } |
3027 | 3039 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_TRANSFER, |
3028 | - containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
3040 | + containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
3029 | 3041 | if (!result.isSuccess()) { |
3030 | 3042 | throw new JeecgBootException(result.getMessage()); |
3031 | 3043 | } |
... | ... | @@ -3039,8 +3051,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3039 | 3051 | |
3040 | 3052 | /** |
3041 | 3053 | * 完成出库查看任务 |
3042 | - * @param taskHeader 任务 | |
3043 | - * @return Result 完成出库查看任务结果 | |
3054 | + * | |
3055 | + * @param taskHeader 任务 | |
3056 | + * @return Result 完成出库查看任务结果 | |
3044 | 3057 | */ |
3045 | 3058 | @Override |
3046 | 3059 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -3071,7 +3084,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3071 | 3084 | boolean success = false; |
3072 | 3085 | LambdaUpdateWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaUpdate(); |
3073 | 3086 | inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getContainerCode, containerCode) |
3074 | - .eq(InventoryDetail::getLocationCode, fromLocationCode); | |
3087 | + .eq(InventoryDetail::getLocationCode, fromLocationCode); | |
3075 | 3088 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper); |
3076 | 3089 | if (inventoryDetailList.size() != 0) { |
3077 | 3090 | List<InventoryDetail> inventoryDetailList1 = new ArrayList<>(); |
... | ... | @@ -3098,7 +3111,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3098 | 3111 | } |
3099 | 3112 | |
3100 | 3113 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_CHECK_OUT, |
3101 | - containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
3114 | + containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
3102 | 3115 | if (!result.isSuccess()) { |
3103 | 3116 | throw new JeecgBootException(result.getMessage()); |
3104 | 3117 | } |
... | ... | @@ -3113,8 +3126,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3113 | 3126 | |
3114 | 3127 | /** |
3115 | 3128 | * 完成跨站任务 |
3116 | - * @param taskHeader 任务 | |
3117 | - * @return Result 完成跨站任务结果 | |
3129 | + * | |
3130 | + * @param taskHeader 任务 | |
3131 | + * @return Result 完成跨站任务结果 | |
3118 | 3132 | */ |
3119 | 3133 | @Override |
3120 | 3134 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -3149,7 +3163,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3149 | 3163 | return Result.error("创建跨站任务时,目标站台为空"); |
3150 | 3164 | } |
3151 | 3165 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_OVER_STATION, |
3152 | - containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode); | |
3166 | + containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode); | |
3153 | 3167 | if (!result.isSuccess()) { |
3154 | 3168 | throw new JeecgBootException(result.getMessage()); |
3155 | 3169 | } |
... | ... | @@ -3164,8 +3178,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3164 | 3178 | |
3165 | 3179 | /** |
3166 | 3180 | * 完成空托盘组入库任务 |
3167 | - * @param taskHeader 任务 | |
3168 | - * @return Result 完成空托盘组入库任务结果 | |
3181 | + * | |
3182 | + * @param taskHeader 任务 | |
3183 | + * @return Result 完成空托盘组入库任务结果 | |
3169 | 3184 | */ |
3170 | 3185 | @Override |
3171 | 3186 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -3192,7 +3207,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3192 | 3207 | return Result.error("完成空托盘组入库任务时,没有找到库位" + toLocationCode); |
3193 | 3208 | } |
3194 | 3209 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT, |
3195 | - containerCode, QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); | |
3210 | + containerCode, QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); | |
3196 | 3211 | if (!result.isSuccess()) { |
3197 | 3212 | throw new JeecgBootException(result.getMessage()); |
3198 | 3213 | } |
... | ... | @@ -3207,8 +3222,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3207 | 3222 | |
3208 | 3223 | /** |
3209 | 3224 | * 完成空托盘组出库任务 |
3210 | - * @param taskHeader 任务 | |
3211 | - * @return Result 完成空托盘组出库任务结果 | |
3225 | + * | |
3226 | + * @param taskHeader 任务 | |
3227 | + * @return Result 完成空托盘组出库任务结果 | |
3212 | 3228 | */ |
3213 | 3229 | @Override |
3214 | 3230 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -3243,7 +3259,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3243 | 3259 | return Result.error("完成空托盘组出库任务时," + fromLocationCode + "起始库位不存在"); |
3244 | 3260 | } |
3245 | 3261 | String zoneCode = fromLocation.getZoneCode(); |
3246 | - Port port = portService.getPortByCode(toPortCode, zoneCode, warehouseCode); | |
3262 | + Port port = portService.getPortByCode(toPortCode, QuantityConstant.PORT_TYPE_OUT, zoneCode, warehouseCode); | |
3247 | 3263 | if (port == null) { |
3248 | 3264 | return Result.error("完成空托盘组出库任务时,没有找到出入口" + toPortCode); |
3249 | 3265 | } |
... | ... | @@ -3253,7 +3269,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3253 | 3269 | throw new JeecgBootException("完成空托盘组出库任务时, 更新任务失败"); |
3254 | 3270 | } |
3255 | 3271 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_MANY_EMPTYSHIPMENT, |
3256 | - containerCode, fromLocationCode, QuantityConstant.EMPTY_STRING, warehouseCode); | |
3272 | + containerCode, fromLocationCode, QuantityConstant.EMPTY_STRING, warehouseCode); | |
3257 | 3273 | if (!result.isSuccess()) { |
3258 | 3274 | throw new JeecgBootException(result.getMessage()); |
3259 | 3275 | } |
... | ... | @@ -3392,7 +3408,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3392 | 3408 | } |
3393 | 3409 | } |
3394 | 3410 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_QUALITY, |
3395 | - containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
3411 | + containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
3396 | 3412 | if (!result.isSuccess()) { |
3397 | 3413 | throw new JeecgBootException(result.getMessage()); |
3398 | 3414 | } |
... | ... | @@ -3406,8 +3422,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3406 | 3422 | |
3407 | 3423 | /** |
3408 | 3424 | * 取消入库任务 |
3409 | - * @param taskHeader 任务 | |
3410 | - * @return Result 取消入库任务结果 | |
3425 | + * | |
3426 | + * @param taskHeader 任务 | |
3427 | + * @return Result 取消入库任务结果 | |
3411 | 3428 | */ |
3412 | 3429 | @Override |
3413 | 3430 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -3426,8 +3443,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3426 | 3443 | |
3427 | 3444 | /** |
3428 | 3445 | * 取消出库任务 |
3429 | - * @param taskHeader 任务 | |
3430 | - * @return Result 取消出库任务结果 | |
3446 | + * | |
3447 | + * @param taskHeader 任务 | |
3448 | + * @return Result 取消出库任务结果 | |
3431 | 3449 | */ |
3432 | 3450 | @Override |
3433 | 3451 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -3449,7 +3467,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3449 | 3467 | log.info("开始取消盘点任务"); |
3450 | 3468 | LambdaQueryWrapper<CycleCountDetail> cycleCountDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
3451 | 3469 | cycleCountDetailLambdaQueryWrapper.eq(CycleCountDetail::getContainerCode, taskHeader.getContainerCode()).ne(CycleCountDetail::getEnableStatus, |
3452 | - QuantityConstant.SHIPMENT_RECEIVE_SUCCESS); | |
3470 | + QuantityConstant.SHIPMENT_RECEIVE_SUCCESS); | |
3453 | 3471 | CycleCountDetail cycleCountDetail = cycleCountDetailService.getOne(cycleCountDetailLambdaQueryWrapper); |
3454 | 3472 | if (cycleCountDetail == null) { |
3455 | 3473 | throw new JeecgBootException("取消盘点任务,没有找到盘点明细"); |
... | ... | @@ -3505,7 +3523,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3505 | 3523 | |
3506 | 3524 | /** |
3507 | 3525 | * 取消任务,恢复容器和库位状态 |
3508 | - * @param taskHeader | |
3526 | + * | |
3527 | + * @param taskHeader | |
3509 | 3528 | * @return |
3510 | 3529 | */ |
3511 | 3530 | @Override |
... | ... | @@ -3557,7 +3576,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3557 | 3576 | public boolean updateById(TaskHeader taskHeader) { |
3558 | 3577 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
3559 | 3578 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getId, taskHeader.getId()).lt(taskHeader.getStatus() != null, TaskHeader::getStatus, |
3560 | - QuantityConstant.TASK_STATUS_COMPLETED); | |
3579 | + QuantityConstant.TASK_STATUS_COMPLETED); | |
3561 | 3580 | return super.update(taskHeader, taskHeaderLambdaQueryWrapper); |
3562 | 3581 | } |
3563 | 3582 | |
... | ... |