Commit 654a8942e380ca9d36e01c070b413cc5bb1f80cb
1 parent
4bc3e205
容器更新 任务排序
Showing
16 changed files
with
113 additions
and
53 deletions
ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue
ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
... | ... | @@ -172,6 +172,7 @@ import {execute} from '@/api/api' |
172 | 172 | import {getZoneList, handleEmptyOut, handlePickupError, handleDoubleIn} from '@/api/api' |
173 | 173 | import EmptyInTaskModal from './modules/EmptyInTaskModal' |
174 | 174 | import ManyEmptyInTaskModal from "./modules/ManyEmptyInTaskModal"; |
175 | +import {filterObj} from "@/utils/util"; | |
175 | 176 | |
176 | 177 | export default { |
177 | 178 | name: "TaskHeaderList", |
... | ... | @@ -186,6 +187,10 @@ export default { |
186 | 187 | return { |
187 | 188 | description: '任务表管理页面', |
188 | 189 | zoneList: [], |
190 | + isorter: { | |
191 | + column: 'status', | |
192 | + order: 'asc', | |
193 | + }, | |
189 | 194 | // 表头 |
190 | 195 | columns: [ |
191 | 196 | { |
... | ... | @@ -292,6 +297,7 @@ export default { |
292 | 297 | }, |
293 | 298 | selectedMainId: '', |
294 | 299 | superFieldList: [], |
300 | + | |
295 | 301 | } |
296 | 302 | }, |
297 | 303 | created() { |
... | ... |
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
... | ... | @@ -167,12 +167,12 @@ public class WcsServiceImpl implements WcsService { |
167 | 167 | return Result.error("分配库位时,没有库位可分配"); |
168 | 168 | } |
169 | 169 | boolean success = |
170 | - locationService.updateStatusByOldStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
170 | + locationService.updateStatusByOriginStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
171 | 171 | if (!success) { |
172 | 172 | throw new JeecgBootException("分配库位时,更新库位状态失败"); |
173 | 173 | } |
174 | 174 | if (StringUtils.isNotEmpty(taskHeader.getToLocationCode()) && !locationCode.equals(taskHeader.getToLocationCode())) { |
175 | - success = locationService.updateStatusByOldStatus(taskHeader.getToLocationCode(), QuantityConstant.STATUS_LOCATION_EMPTY, | |
175 | + success = locationService.updateStatusByOriginStatus(taskHeader.getToLocationCode(), QuantityConstant.STATUS_LOCATION_EMPTY, | |
176 | 176 | QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
177 | 177 | if (!success) { |
178 | 178 | throw new JeecgBootException("分配库位时,更新之前分配的库位状态失败"); |
... | ... | @@ -595,7 +595,7 @@ public class WcsServiceImpl implements WcsService { |
595 | 595 | } |
596 | 596 | // 6. 锁定WMS分配的库位 |
597 | 597 | boolean success = |
598 | - locationService.updateStatusByOldStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
598 | + locationService.updateStatusByOriginStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
599 | 599 | if (!success) { |
600 | 600 | throw new JeecgBootException("重入处理失败, 更新库位状态失败"); |
601 | 601 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java
... | ... | @@ -21,6 +21,16 @@ public interface IContainerService extends IService<Container> { |
21 | 21 | |
22 | 22 | boolean updateStatus(String containerCode, String status, String wareohuseCode); |
23 | 23 | |
24 | + /** | |
25 | + * 更新容器状态status,条件是originStatus,如果originStatus条件不满足,那么返回false | |
26 | + * @param containerCode | |
27 | + * @param status | |
28 | + * @param originStatus | |
29 | + * @param wareohuseCode | |
30 | + * @return | |
31 | + */ | |
32 | + boolean updateStatusByOriginStatus(String containerCode, String status, String originStatus, String wareohuseCode); | |
33 | + | |
24 | 34 | boolean restoreContainer(String containerCode, String wareohuseCode); |
25 | 35 | |
26 | 36 | boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String warehouseCode); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java
... | ... | @@ -81,6 +81,20 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container |
81 | 81 | } |
82 | 82 | |
83 | 83 | @Override |
84 | + public boolean updateStatusByOriginStatus(String containerCode, String status, String originStatus, String wareohuseCode) { | |
85 | + Container container = this.getContainerByCode(containerCode, wareohuseCode); | |
86 | + if (container == null) { | |
87 | + return false; | |
88 | + } | |
89 | + container.setLastStatus(container.getStatus()); | |
90 | + container.setStatus(status); | |
91 | + LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
92 | + containerLambdaQueryWrapper.eq(Container::getCode, containerCode).eq(Container::getStatus, originStatus).eq(Container::getWarehouseCode, wareohuseCode); | |
93 | + boolean result = this.update(container, containerLambdaQueryWrapper); | |
94 | + return result; | |
95 | + } | |
96 | + | |
97 | + @Override | |
84 | 98 | public boolean restoreContainer(String containerCode, String wareohuseCode) { |
85 | 99 | Container container = this.getContainerByCode(containerCode, wareohuseCode); |
86 | 100 | if (container == null) { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/ILocationService.java
... | ... | @@ -27,7 +27,15 @@ public interface ILocationService extends IService<Location> { |
27 | 27 | |
28 | 28 | boolean updateStatus(String locationCode, String status, String warehouseCode); |
29 | 29 | |
30 | - boolean updateStatusByOldStatus(String locationCode, String status, String oldStatus, String warehouseCode); | |
30 | + /** | |
31 | + * 更新库位状态status,条件是originStatus,如果originStatus条件不满足,那么返回false | |
32 | + * @param locationCode | |
33 | + * @param status | |
34 | + * @param originStatus | |
35 | + * @param warehouseCode | |
36 | + * @return | |
37 | + */ | |
38 | + boolean updateStatusByOriginStatus(String locationCode, String status, String originStatus, String warehouseCode); | |
31 | 39 | |
32 | 40 | boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode); |
33 | 41 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java
... | ... | @@ -93,13 +93,13 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
93 | 93 | } |
94 | 94 | |
95 | 95 | @Override |
96 | - public boolean updateStatusByOldStatus(String locationCode, String status, String oldStatus, String warehouseCode) { | |
96 | + public boolean updateStatusByOriginStatus(String locationCode, String status, String originStatus, String warehouseCode) { | |
97 | 97 | Location location = getLocationByCode(locationCode, warehouseCode); |
98 | 98 | if (location == null) { |
99 | 99 | return false; |
100 | 100 | } |
101 | 101 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); |
102 | - locationLambdaQueryWrapper.eq(Location::getStatus, oldStatus).eq(Location::getCode, locationCode).eq(Location::getWarehouseCode, warehouseCode); | |
102 | + locationLambdaQueryWrapper.eq(Location::getStatus, originStatus).eq(Location::getCode, locationCode).eq(Location::getWarehouseCode, warehouseCode); | |
103 | 103 | location.setStatus(status); |
104 | 104 | boolean result = update(location, locationLambdaQueryWrapper); |
105 | 105 | return result; |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -120,14 +120,15 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
120 | 120 | if (receiptContainerDetailList.size() == 0) { |
121 | 121 | return Result.error("id:" + receiptContainerHeader.getId() + "的入库组盘,没有组盘明细,请先组盘!"); |
122 | 122 | } |
123 | - boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); | |
123 | + boolean success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_EMPTY, | |
124 | + warehouseCode); | |
124 | 125 | if (!success) { |
125 | 126 | throw new JeecgBootException("更新容器状态失败"); |
126 | 127 | } |
127 | 128 | String fromLocationCode = receiptContainerHeader.getFromLocationCode(); |
128 | 129 | String toLocaitonCode = receiptContainerHeader.getToLocationCode(); |
129 | 130 | if (StringUtils.isNotEmpty(fromLocationCode)) { |
130 | - success = locationService.updateStatusByOldStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | |
131 | + success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | |
131 | 132 | warehouseCode); |
132 | 133 | if (!success) { |
133 | 134 | throw new JeecgBootException("更新起始库位状态失败"); |
... | ... | @@ -135,7 +136,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
135 | 136 | } |
136 | 137 | String zoneCode = null; |
137 | 138 | if (StringUtils.isNotEmpty(toLocaitonCode)) { |
138 | - success = locationService.updateStatusByOldStatus(toLocaitonCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | |
139 | + success = locationService.updateStatusByOriginStatus(toLocaitonCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | |
139 | 140 | warehouseCode); |
140 | 141 | if (!success) { |
141 | 142 | throw new JeecgBootException("更新目标库位状态失败"); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
... | ... | @@ -475,8 +475,8 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi |
475 | 475 | if (!success) { |
476 | 476 | throw new JeecgBootException("生成出库任务时, 更新容器失败" + containerCode); |
477 | 477 | } |
478 | - success = | |
479 | - locationService.updateStatusByOldStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
478 | + success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | |
479 | + warehouseCode); | |
480 | 480 | if (!success) { |
481 | 481 | throw new JeecgBootException("生成出库任务时, 更新库位失败" + fromLocationCode); |
482 | 482 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailServiceImpl.java
... | ... | @@ -223,14 +223,17 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
223 | 223 | } |
224 | 224 | |
225 | 225 | // 生成任务同时锁定库位 |
226 | - boolean success = locationService.updateStatusByOldStatus(location.getCode(), QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | |
227 | - warehouseCode); | |
226 | + boolean success = locationService.updateStatusByOriginStatus(location.getCode(), QuantityConstant.STATUS_LOCATION_LOCK, | |
227 | + QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
228 | 228 | if (!success) { |
229 | 229 | throw new JeecgBootException("更新库位状态失败"); |
230 | 230 | } |
231 | 231 | // 生成任务同时锁定容器 |
232 | - containerServiceImpl.updateStatus(location.getContainerCode(), QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); | |
233 | - | |
232 | + success = containerServiceImpl.updateStatusByOriginStatus(location.getContainerCode(), QuantityConstant.STATUS_LOCATION_LOCK, | |
233 | + QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
234 | + if (!success) { | |
235 | + throw new JeecgBootException("更新容器状态失败"); | |
236 | + } | |
234 | 237 | // 每个明细单生成一张主任务,子单就是任务明细。 |
235 | 238 | TaskHeader task = new TaskHeader(); |
236 | 239 | task.setWarehouseCode(warehouseCode); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/service/impl/AgvTaskServiceImpl.java
... | ... | @@ -22,7 +22,6 @@ import org.jeecg.utils.constant.QuantityConstant; |
22 | 22 | import org.springframework.stereotype.Service; |
23 | 23 | import org.springframework.transaction.annotation.Transactional; |
24 | 24 | |
25 | -import org.jeecg.common.exception.JeecgBootException; | |
26 | 25 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
27 | 26 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
28 | 27 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
... | ... | @@ -173,7 +172,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl |
173 | 172 | if (inventoryDetailList.size() != 0) { |
174 | 173 | containerStatus = QuantityConstant.STATUS_CONTAINER_SOME; |
175 | 174 | } |
176 | - success = containerService.updateStatus(containerCode, containerStatus, warehouseCode); | |
175 | + success = containerService.updateStatusByOriginStatus(containerCode, containerStatus, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); | |
177 | 176 | if (!success) { |
178 | 177 | throw new JeecgBootException("取消AGV任务。 更新容器状态失败"); |
179 | 178 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java
... | ... | @@ -42,16 +42,7 @@ import org.jeecgframework.poi.excel.entity.ExportParams; |
42 | 42 | import org.jeecgframework.poi.excel.entity.ImportParams; |
43 | 43 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
44 | 44 | import org.springframework.beans.factory.annotation.Autowired; |
45 | -import org.springframework.web.bind.annotation.DeleteMapping; | |
46 | -import org.springframework.web.bind.annotation.GetMapping; | |
47 | -import org.springframework.web.bind.annotation.PathVariable; | |
48 | -import org.springframework.web.bind.annotation.PostMapping; | |
49 | -import org.springframework.web.bind.annotation.RequestBody; | |
50 | -import org.springframework.web.bind.annotation.RequestMapping; | |
51 | -import org.springframework.web.bind.annotation.RequestMethod; | |
52 | -import org.springframework.web.bind.annotation.RequestParam; | |
53 | -import org.springframework.web.bind.annotation.ResponseBody; | |
54 | -import org.springframework.web.bind.annotation.RestController; | |
45 | +import org.springframework.web.bind.annotation.*; | |
55 | 46 | import org.springframework.web.multipart.MultipartFile; |
56 | 47 | import org.springframework.web.multipart.MultipartHttpServletRequest; |
57 | 48 | import org.springframework.web.servlet.ModelAndView; |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... | ... | @@ -289,17 +289,18 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
289 | 289 | throw new JeecgBootException("创建移库任务时,创建任务失败"); |
290 | 290 | } |
291 | 291 | |
292 | - success = | |
293 | - locationService.updateStatusByOldStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
292 | + success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | |
293 | + warehouseCode); | |
294 | 294 | if (!success) { |
295 | 295 | throw new JeecgBootException("创建移库任务时, 起始库位" + fromLocationCode + "更新失败"); |
296 | 296 | } |
297 | 297 | success = |
298 | - locationService.updateStatusByOldStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
298 | + locationService.updateStatusByOriginStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
299 | 299 | if (!success) { |
300 | 300 | throw new JeecgBootException("创建移库任务时, 终点库位" + toLocationCode + "更新失败"); |
301 | 301 | } |
302 | - success = containerService.updateStatus(fromLocation.getContainerCode(), QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); | |
302 | + success = containerService.updateStatusByOriginStatus(fromLocation.getContainerCode(), QuantityConstant.STATUS_CONTAINER_LOCK, | |
303 | + QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | |
303 | 304 | if (!success) { |
304 | 305 | throw new JeecgBootException("创建移库任务时,容器" + fromLocation.getContainerCode() + "更新失败"); |
305 | 306 | } |
... | ... | @@ -352,12 +353,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
352 | 353 | throw new JeecgBootException("创建出库查看任务时,更新库存详情失败"); |
353 | 354 | } |
354 | 355 | } |
355 | - success = | |
356 | - locationService.updateStatusByOldStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
356 | + success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | |
357 | + warehouseCode); | |
357 | 358 | if (!success) { |
358 | 359 | throw new JeecgBootException("创建出库查看任务时,更新库位状态失败"); |
359 | 360 | } |
360 | - success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); | |
361 | + success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_EMPTY, | |
362 | + warehouseCode); | |
361 | 363 | if (!success) { |
362 | 364 | throw new JeecgBootException("创建出库查看任务时,更新容器状态失败"); |
363 | 365 | } |
... | ... | @@ -425,7 +427,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
425 | 427 | if (!success) { |
426 | 428 | return Result.error("创建跨站任务时, 创建任务失败"); |
427 | 429 | } |
428 | - success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); | |
430 | + success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_EMPTY, | |
431 | + warehouseCode); | |
429 | 432 | if (!success) { |
430 | 433 | return Result.error("创建跨站任务时, 更新容器状态失败"); |
431 | 434 | } |
... | ... | @@ -517,7 +520,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
517 | 520 | if (!container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)) { |
518 | 521 | return Result.error("创建空托盘组入库任务时,容器状态不为空容器"); |
519 | 522 | } |
520 | - boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); | |
523 | + boolean success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_EMPTY, | |
524 | + warehouseCode); | |
521 | 525 | if (!success) { |
522 | 526 | throw new JeecgBootException("创建空托盘组入库任务时, 更新容器状态失败"); |
523 | 527 | } |
... | ... | @@ -529,7 +533,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
529 | 533 | if (!toLocation.getStatus().equals(QuantityConstant.STATUS_LOCATION_EMPTY)) { |
530 | 534 | return Result.error("创建空托盘组入库任务时,目标库位状态不是空闲"); |
531 | 535 | } |
532 | - success = locationService.updateStatusByOldStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | |
536 | + success = locationService.updateStatusByOriginStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | |
533 | 537 | warehouseCode); |
534 | 538 | if (!success) { |
535 | 539 | throw new JeecgBootException("创建空托盘组入库任务时, 更新库位状态失败"); |
... | ... | @@ -582,12 +586,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
582 | 586 | if (StringUtils.isEmpty(zoneCode)) { |
583 | 587 | return Result.error("创建空托盘组出库任务时, 库区为空"); |
584 | 588 | } |
585 | - boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); | |
589 | + boolean success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_EMPTY, | |
590 | + warehouseCode); | |
586 | 591 | if (!success) { |
587 | 592 | throw new JeecgBootException("创建空托盘组出库任务时, 更新容器状态失败"); |
588 | 593 | } |
589 | - success = | |
590 | - locationService.updateStatusByOldStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); | |
594 | + success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_LOCK, | |
595 | + warehouseCode); | |
591 | 596 | if (!success) { |
592 | 597 | throw new JeecgBootException("创建空托盘组出库任务时, 更新库位状态失败"); |
593 | 598 | } |
... | ... | @@ -982,14 +987,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
982 | 987 | if (!QuantityConstant.STATUS_LOCATION_EMPTY.equals(toLocation.getStatus())) { |
983 | 988 | return Result.error("创建空托盘入库时, 目标库位非空闲"); |
984 | 989 | } |
985 | - boolean success = locationService.updateStatusByOldStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | |
986 | - warehouseCode); | |
990 | + boolean success = locationService.updateStatusByOriginStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, | |
991 | + QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
987 | 992 | if (!success) { |
988 | 993 | throw new JeecgBootException("创建空托盘入库时,更新库位状态失败"); |
989 | 994 | } |
990 | 995 | } |
991 | 996 | |
992 | - boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); | |
997 | + boolean success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_EMPTY, | |
998 | + warehouseCode); | |
993 | 999 | if (!success) { |
994 | 1000 | throw new JeecgBootException("创建空托盘入库时,更新容器状态失败"); |
995 | 1001 | } |
... | ... | @@ -1049,12 +1055,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1049 | 1055 | if (port == null) { |
1050 | 1056 | return Result.error("创建空托盘出库时, 没有找到出库口" + toPortCode); |
1051 | 1057 | } |
1052 | - boolean success = | |
1053 | - locationService.updateStatusByOldStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
1058 | + boolean success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, | |
1059 | + warehouseCode); | |
1054 | 1060 | if (!success) { |
1055 | 1061 | throw new JeecgBootException("创建空托盘出库时,更新库位状态失败"); |
1056 | 1062 | } |
1057 | - success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); | |
1063 | + success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, QuantityConstant.STATUS_CONTAINER_EMPTY, | |
1064 | + warehouseCode); | |
1058 | 1065 | if (!success) { |
1059 | 1066 | throw new JeecgBootException("创建空托盘出库时,更新容器状态失败"); |
1060 | 1067 | } |
... | ... | @@ -1788,7 +1795,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1788 | 1795 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); |
1789 | 1796 | if (inventoryDetailList.size() != 0) { |
1790 | 1797 | if (fromLocationCode.equals(toLocationCode)) { |
1791 | - success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); | |
1798 | + success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_SOME, QuantityConstant.STATUS_CONTAINER_LOCK, | |
1799 | + warehouseCode); | |
1792 | 1800 | } else { |
1793 | 1801 | success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); |
1794 | 1802 | } |
... | ... | @@ -1796,7 +1804,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1796 | 1804 | throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); |
1797 | 1805 | } |
1798 | 1806 | } else { |
1799 | - success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | |
1807 | + success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_LOCK, | |
1808 | + warehouseCode); | |
1800 | 1809 | if (!success) { |
1801 | 1810 | throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); |
1802 | 1811 | } |
... | ... | @@ -2022,7 +2031,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2022 | 2031 | throw new JeecgBootException("完成出库查看任务时,更新库存头失败"); |
2023 | 2032 | } |
2024 | 2033 | if (fromLocationCode.equals(toLocationCode)) { |
2025 | - success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); | |
2034 | + success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_SOME, QuantityConstant.STATUS_CONTAINER_LOCK, | |
2035 | + warehouseCode); | |
2026 | 2036 | } else { |
2027 | 2037 | success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); |
2028 | 2038 | } |
... | ... | @@ -2031,7 +2041,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2031 | 2041 | } |
2032 | 2042 | } else { |
2033 | 2043 | if (fromLocationCode.equals(toLocationCode)) { |
2034 | - success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); | |
2044 | + success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_SOME, QuantityConstant.STATUS_CONTAINER_LOCK, | |
2045 | + warehouseCode); | |
2035 | 2046 | } else { |
2036 | 2047 | success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); |
2037 | 2048 | } |
... | ... | @@ -2097,7 +2108,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2097 | 2108 | if (!success) { |
2098 | 2109 | throw new JeecgBootException("创建跨站任务时, 更新任务失败"); |
2099 | 2110 | } |
2100 | - success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | |
2111 | + success = containerService.updateStatusByOriginStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_LOCK, | |
2112 | + warehouseCode); | |
2101 | 2113 | if (!success) { |
2102 | 2114 | throw new JeecgBootException("创建跨站任务时, 更新容器状态失败"); |
2103 | 2115 | } |
... | ... | @@ -2255,14 +2267,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2255 | 2267 | |
2256 | 2268 | boolean success = false; |
2257 | 2269 | if (StringUtils.isNotEmpty(fromLocationCode)) { |
2258 | - success = locationService.updateStatusByOldStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, QuantityConstant.STATUS_LOCATION_LOCK, | |
2270 | + success = locationService.updateStatusByOriginStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, QuantityConstant.STATUS_LOCATION_LOCK, | |
2259 | 2271 | warehouseCode); |
2260 | 2272 | if (!success) { |
2261 | 2273 | throw new JeecgBootException("取消任务时, 更新起始库位状态失败"); |
2262 | 2274 | } |
2263 | 2275 | } |
2264 | 2276 | if (StringUtils.isNotEmpty(toLocationCode)) { |
2265 | - success = locationService.updateStatusByOldStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, QuantityConstant.STATUS_LOCATION_LOCK, | |
2277 | + success = locationService.updateStatusByOriginStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, QuantityConstant.STATUS_LOCATION_LOCK, | |
2266 | 2278 | warehouseCode); |
2267 | 2279 | if (!success) { |
2268 | 2280 | throw new JeecgBootException("取消任务时, 更新目标库位状态失败"); |
... | ... |