Commit 654a8942e380ca9d36e01c070b413cc5bb1f80cb

Authored by 肖超群
1 parent 4bc3e205

容器更新 任务排序

Showing 16 changed files with 113 additions and 53 deletions
ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue
@@ -144,6 +144,10 @@ @@ -144,6 +144,10 @@
144 data () { 144 data () {
145 return { 145 return {
146 description: 'AGV任务管理页面', 146 description: 'AGV任务管理页面',
  147 + isorter: {
  148 + column: 'status',
  149 + order: 'asc',
  150 + },
147 // 表头 151 // 表头
148 columns: [ 152 columns: [
149 { 153 {
ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue
@@ -192,6 +192,10 @@ export default { @@ -192,6 +192,10 @@ export default {
192 return { 192 return {
193 description: '任务表管理页面', 193 description: '任务表管理页面',
194 zoneList: [], 194 zoneList: [],
  195 + isorter: {
  196 + column: 'status',
  197 + order: 'asc',
  198 + },
195 // 表头 199 // 表头
196 columns: [ 200 columns: [
197 { 201 {
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
@@ -172,6 +172,7 @@ import {execute} from '@/api/api' @@ -172,6 +172,7 @@ import {execute} from '@/api/api'
172 import {getZoneList, handleEmptyOut, handlePickupError, handleDoubleIn} from '@/api/api' 172 import {getZoneList, handleEmptyOut, handlePickupError, handleDoubleIn} from '@/api/api'
173 import EmptyInTaskModal from './modules/EmptyInTaskModal' 173 import EmptyInTaskModal from './modules/EmptyInTaskModal'
174 import ManyEmptyInTaskModal from "./modules/ManyEmptyInTaskModal"; 174 import ManyEmptyInTaskModal from "./modules/ManyEmptyInTaskModal";
  175 +import {filterObj} from "@/utils/util";
175 176
176 export default { 177 export default {
177 name: "TaskHeaderList", 178 name: "TaskHeaderList",
@@ -186,6 +187,10 @@ export default { @@ -186,6 +187,10 @@ export default {
186 return { 187 return {
187 description: '任务表管理页面', 188 description: '任务表管理页面',
188 zoneList: [], 189 zoneList: [],
  190 + isorter: {
  191 + column: 'status',
  192 + order: 'asc',
  193 + },
189 // 表头 194 // 表头
190 columns: [ 195 columns: [
191 { 196 {
@@ -292,6 +297,7 @@ export default { @@ -292,6 +297,7 @@ export default {
292 }, 297 },
293 selectedMainId: '', 298 selectedMainId: '',
294 superFieldList: [], 299 superFieldList: [],
  300 +
295 } 301 }
296 }, 302 },
297 created() { 303 created() {
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
@@ -189,6 +189,10 @@ export default { @@ -189,6 +189,10 @@ export default {
189 data() { 189 data() {
190 return { 190 return {
191 description: '任务表管理页面', 191 description: '任务表管理页面',
  192 + isorter: {
  193 + column: 'status',
  194 + order: 'asc',
  195 + },
192 // 表头 196 // 表头
193 columns: [ 197 columns: [
194 { 198 {
ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue
@@ -194,6 +194,10 @@ export default { @@ -194,6 +194,10 @@ export default {
194 return { 194 return {
195 description: '任务表管理页面', 195 description: '任务表管理页面',
196 zoneList: [], 196 zoneList: [],
  197 + isorter: {
  198 + column: 'status',
  199 + order: 'asc',
  200 + },
197 // 表头 201 // 表头
198 columns: [ 202 columns: [
199 { 203 {
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,12 +167,12 @@ public class WcsServiceImpl implements WcsService {
167 return Result.error("分配库位时,没有库位可分配"); 167 return Result.error("分配库位时,没有库位可分配");
168 } 168 }
169 boolean success = 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 if (!success) { 171 if (!success) {
172 throw new JeecgBootException("分配库位时,更新库位状态失败"); 172 throw new JeecgBootException("分配库位时,更新库位状态失败");
173 } 173 }
174 if (StringUtils.isNotEmpty(taskHeader.getToLocationCode()) && !locationCode.equals(taskHeader.getToLocationCode())) { 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 QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); 176 QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
177 if (!success) { 177 if (!success) {
178 throw new JeecgBootException("分配库位时,更新之前分配的库位状态失败"); 178 throw new JeecgBootException("分配库位时,更新之前分配的库位状态失败");
@@ -595,7 +595,7 @@ public class WcsServiceImpl implements WcsService { @@ -595,7 +595,7 @@ public class WcsServiceImpl implements WcsService {
595 } 595 }
596 // 6. 锁定WMS分配的库位 596 // 6. 锁定WMS分配的库位
597 boolean success = 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 if (!success) { 599 if (!success) {
600 throw new JeecgBootException("重入处理失败, 更新库位状态失败"); 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,6 +21,16 @@ public interface IContainerService extends IService<Container> {
21 21
22 boolean updateStatus(String containerCode, String status, String wareohuseCode); 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 boolean restoreContainer(String containerCode, String wareohuseCode); 34 boolean restoreContainer(String containerCode, String wareohuseCode);
25 35
26 boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String warehouseCode); 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,6 +81,20 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container
81 } 81 }
82 82
83 @Override 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 public boolean restoreContainer(String containerCode, String wareohuseCode) { 98 public boolean restoreContainer(String containerCode, String wareohuseCode) {
85 Container container = this.getContainerByCode(containerCode, wareohuseCode); 99 Container container = this.getContainerByCode(containerCode, wareohuseCode);
86 if (container == null) { 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&lt;Location&gt; { @@ -27,7 +27,15 @@ public interface ILocationService extends IService&lt;Location&gt; {
27 27
28 boolean updateStatus(String locationCode, String status, String warehouseCode); 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 boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode); 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&lt;LocationMapper, Location&gt; i @@ -93,13 +93,13 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
93 } 93 }
94 94
95 @Override 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 Location location = getLocationByCode(locationCode, warehouseCode); 97 Location location = getLocationByCode(locationCode, warehouseCode);
98 if (location == null) { 98 if (location == null) {
99 return false; 99 return false;
100 } 100 }
101 LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); 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 location.setStatus(status); 103 location.setStatus(status);
104 boolean result = update(location, locationLambdaQueryWrapper); 104 boolean result = update(location, locationLambdaQueryWrapper);
105 return result; 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&lt;ReceiptContai @@ -120,14 +120,15 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
120 if (receiptContainerDetailList.size() == 0) { 120 if (receiptContainerDetailList.size() == 0) {
121 return Result.error("id:" + receiptContainerHeader.getId() + "的入库组盘,没有组盘明细,请先组盘!"); 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 if (!success) { 125 if (!success) {
125 throw new JeecgBootException("更新容器状态失败"); 126 throw new JeecgBootException("更新容器状态失败");
126 } 127 }
127 String fromLocationCode = receiptContainerHeader.getFromLocationCode(); 128 String fromLocationCode = receiptContainerHeader.getFromLocationCode();
128 String toLocaitonCode = receiptContainerHeader.getToLocationCode(); 129 String toLocaitonCode = receiptContainerHeader.getToLocationCode();
129 if (StringUtils.isNotEmpty(fromLocationCode)) { 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 warehouseCode); 132 warehouseCode);
132 if (!success) { 133 if (!success) {
133 throw new JeecgBootException("更新起始库位状态失败"); 134 throw new JeecgBootException("更新起始库位状态失败");
@@ -135,7 +136,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai @@ -135,7 +136,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
135 } 136 }
136 String zoneCode = null; 137 String zoneCode = null;
137 if (StringUtils.isNotEmpty(toLocaitonCode)) { 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 warehouseCode); 140 warehouseCode);
140 if (!success) { 141 if (!success) {
141 throw new JeecgBootException("更新目标库位状态失败"); 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,8 +475,8 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
475 if (!success) { 475 if (!success) {
476 throw new JeecgBootException("生成出库任务时, 更新容器失败" + containerCode); 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 if (!success) { 480 if (!success) {
481 throw new JeecgBootException("生成出库任务时, 更新库位失败" + fromLocationCode); 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&lt;CycleCountDetailMap @@ -223,14 +223,17 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;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 if (!success) { 228 if (!success) {
229 throw new JeecgBootException("更新库位状态失败"); 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 TaskHeader task = new TaskHeader(); 238 TaskHeader task = new TaskHeader();
236 task.setWarehouseCode(warehouseCode); 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,7 +22,6 @@ import org.jeecg.utils.constant.QuantityConstant;
22 import org.springframework.stereotype.Service; 22 import org.springframework.stereotype.Service;
23 import org.springframework.transaction.annotation.Transactional; 23 import org.springframework.transaction.annotation.Transactional;
24 24
25 -import org.jeecg.common.exception.JeecgBootException;  
26 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 25 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
27 import com.baomidou.mybatisplus.core.toolkit.Wrappers; 26 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
28 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 27 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -173,7 +172,7 @@ public class AgvTaskServiceImpl extends ServiceImpl&lt;AgvTaskMapper, AgvTask&gt; impl @@ -173,7 +172,7 @@ public class AgvTaskServiceImpl extends ServiceImpl&lt;AgvTaskMapper, AgvTask&gt; impl
173 if (inventoryDetailList.size() != 0) { 172 if (inventoryDetailList.size() != 0) {
174 containerStatus = QuantityConstant.STATUS_CONTAINER_SOME; 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 if (!success) { 176 if (!success) {
178 throw new JeecgBootException("取消AGV任务。 更新容器状态失败"); 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,16 +42,7 @@ import org.jeecgframework.poi.excel.entity.ExportParams;
42 import org.jeecgframework.poi.excel.entity.ImportParams; 42 import org.jeecgframework.poi.excel.entity.ImportParams;
43 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; 43 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
44 import org.springframework.beans.factory.annotation.Autowired; 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 import org.springframework.web.multipart.MultipartFile; 46 import org.springframework.web.multipart.MultipartFile;
56 import org.springframework.web.multipart.MultipartHttpServletRequest; 47 import org.springframework.web.multipart.MultipartHttpServletRequest;
57 import org.springframework.web.servlet.ModelAndView; 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&lt;TaskHeaderMapper, TaskHea @@ -289,17 +289,18 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
289 throw new JeecgBootException("创建移库任务时,创建任务失败"); 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 if (!success) { 294 if (!success) {
295 throw new JeecgBootException("创建移库任务时, 起始库位" + fromLocationCode + "更新失败"); 295 throw new JeecgBootException("创建移库任务时, 起始库位" + fromLocationCode + "更新失败");
296 } 296 }
297 success = 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 if (!success) { 299 if (!success) {
300 throw new JeecgBootException("创建移库任务时, 终点库位" + toLocationCode + "更新失败"); 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 if (!success) { 304 if (!success) {
304 throw new JeecgBootException("创建移库任务时,容器" + fromLocation.getContainerCode() + "更新失败"); 305 throw new JeecgBootException("创建移库任务时,容器" + fromLocation.getContainerCode() + "更新失败");
305 } 306 }
@@ -352,12 +353,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -352,12 +353,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
352 throw new JeecgBootException("创建出库查看任务时,更新库存详情失败"); 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 if (!success) { 358 if (!success) {
358 throw new JeecgBootException("创建出库查看任务时,更新库位状态失败"); 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 if (!success) { 363 if (!success) {
362 throw new JeecgBootException("创建出库查看任务时,更新容器状态失败"); 364 throw new JeecgBootException("创建出库查看任务时,更新容器状态失败");
363 } 365 }
@@ -425,7 +427,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -425,7 +427,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
425 if (!success) { 427 if (!success) {
426 return Result.error("创建跨站任务时, 创建任务失败"); 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 if (!success) { 432 if (!success) {
430 return Result.error("创建跨站任务时, 更新容器状态失败"); 433 return Result.error("创建跨站任务时, 更新容器状态失败");
431 } 434 }
@@ -517,7 +520,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -517,7 +520,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
517 if (!container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)) { 520 if (!container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)) {
518 return Result.error("创建空托盘组入库任务时,容器状态不为空容器"); 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 if (!success) { 525 if (!success) {
522 throw new JeecgBootException("创建空托盘组入库任务时, 更新容器状态失败"); 526 throw new JeecgBootException("创建空托盘组入库任务时, 更新容器状态失败");
523 } 527 }
@@ -529,7 +533,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -529,7 +533,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
529 if (!toLocation.getStatus().equals(QuantityConstant.STATUS_LOCATION_EMPTY)) { 533 if (!toLocation.getStatus().equals(QuantityConstant.STATUS_LOCATION_EMPTY)) {
530 return Result.error("创建空托盘组入库任务时,目标库位状态不是空闲"); 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 warehouseCode); 537 warehouseCode);
534 if (!success) { 538 if (!success) {
535 throw new JeecgBootException("创建空托盘组入库任务时, 更新库位状态失败"); 539 throw new JeecgBootException("创建空托盘组入库任务时, 更新库位状态失败");
@@ -582,12 +586,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -582,12 +586,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
582 if (StringUtils.isEmpty(zoneCode)) { 586 if (StringUtils.isEmpty(zoneCode)) {
583 return Result.error("创建空托盘组出库任务时, 库区为空"); 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 if (!success) { 591 if (!success) {
587 throw new JeecgBootException("创建空托盘组出库任务时, 更新容器状态失败"); 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 if (!success) { 596 if (!success) {
592 throw new JeecgBootException("创建空托盘组出库任务时, 更新库位状态失败"); 597 throw new JeecgBootException("创建空托盘组出库任务时, 更新库位状态失败");
593 } 598 }
@@ -982,14 +987,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -982,14 +987,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
982 if (!QuantityConstant.STATUS_LOCATION_EMPTY.equals(toLocation.getStatus())) { 987 if (!QuantityConstant.STATUS_LOCATION_EMPTY.equals(toLocation.getStatus())) {
983 return Result.error("创建空托盘入库时, 目标库位非空闲"); 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 if (!success) { 992 if (!success) {
988 throw new JeecgBootException("创建空托盘入库时,更新库位状态失败"); 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 if (!success) { 999 if (!success) {
994 throw new JeecgBootException("创建空托盘入库时,更新容器状态失败"); 1000 throw new JeecgBootException("创建空托盘入库时,更新容器状态失败");
995 } 1001 }
@@ -1049,12 +1055,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -1049,12 +1055,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1049 if (port == null) { 1055 if (port == null) {
1050 return Result.error("创建空托盘出库时, 没有找到出库口" + toPortCode); 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 if (!success) { 1060 if (!success) {
1055 throw new JeecgBootException("创建空托盘出库时,更新库位状态失败"); 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 if (!success) { 1065 if (!success) {
1059 throw new JeecgBootException("创建空托盘出库时,更新容器状态失败"); 1066 throw new JeecgBootException("创建空托盘出库时,更新容器状态失败");
1060 } 1067 }
@@ -1788,7 +1795,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -1788,7 +1795,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1788 List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); 1795 List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode);
1789 if (inventoryDetailList.size() != 0) { 1796 if (inventoryDetailList.size() != 0) {
1790 if (fromLocationCode.equals(toLocationCode)) { 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 } else { 1800 } else {
1793 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); 1801 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode);
1794 } 1802 }
@@ -1796,7 +1804,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -1796,7 +1804,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1796 throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); 1804 throw new JeecgBootException("完成出库查看任务时,更新容器状态失败");
1797 } 1805 }
1798 } else { 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 if (!success) { 1809 if (!success) {
1801 throw new JeecgBootException("完成出库查看任务时,更新容器状态失败"); 1810 throw new JeecgBootException("完成出库查看任务时,更新容器状态失败");
1802 } 1811 }
@@ -2022,7 +2031,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -2022,7 +2031,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2022 throw new JeecgBootException("完成出库查看任务时,更新库存头失败"); 2031 throw new JeecgBootException("完成出库查看任务时,更新库存头失败");
2023 } 2032 }
2024 if (fromLocationCode.equals(toLocationCode)) { 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 } else { 2036 } else {
2027 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); 2037 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode);
2028 } 2038 }
@@ -2031,7 +2041,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -2031,7 +2041,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2031 } 2041 }
2032 } else { 2042 } else {
2033 if (fromLocationCode.equals(toLocationCode)) { 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 } else { 2046 } else {
2036 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode); 2047 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode);
2037 } 2048 }
@@ -2097,7 +2108,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -2097,7 +2108,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2097 if (!success) { 2108 if (!success) {
2098 throw new JeecgBootException("创建跨站任务时, 更新任务失败"); 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 if (!success) { 2113 if (!success) {
2102 throw new JeecgBootException("创建跨站任务时, 更新容器状态失败"); 2114 throw new JeecgBootException("创建跨站任务时, 更新容器状态失败");
2103 } 2115 }
@@ -2255,14 +2267,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -2255,14 +2267,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2255 2267
2256 boolean success = false; 2268 boolean success = false;
2257 if (StringUtils.isNotEmpty(fromLocationCode)) { 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 warehouseCode); 2271 warehouseCode);
2260 if (!success) { 2272 if (!success) {
2261 throw new JeecgBootException("取消任务时, 更新起始库位状态失败"); 2273 throw new JeecgBootException("取消任务时, 更新起始库位状态失败");
2262 } 2274 }
2263 } 2275 }
2264 if (StringUtils.isNotEmpty(toLocationCode)) { 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 warehouseCode); 2278 warehouseCode);
2267 if (!success) { 2279 if (!success) {
2268 throw new JeecgBootException("取消任务时, 更新目标库位状态失败"); 2280 throw new JeecgBootException("取消任务时, 更新目标库位状态失败");