Commit f0d97cb767243b247aa70051d225a2d6b71ffe51
1 parent
253b4882
优化代码
Showing
34 changed files
with
288 additions
and
273 deletions
src/main/java/com/huaheng/api/general/service/ReceiptApiService.java
... | ... | @@ -88,13 +88,13 @@ public class ReceiptApiService { |
88 | 88 | /* 2.step 检查入库头表合法性*/ |
89 | 89 | AjaxResult checkReceiptHeaderResult = checkReceiptHeader(receiptHeader); |
90 | 90 | if (checkReceiptHeaderResult.hasErr() ){ |
91 | - return AjaxResult.error(checkReceiptHeaderResult.getMessage()); | |
91 | + return AjaxResult.error(checkReceiptHeaderResult.getMsg()); | |
92 | 92 | } |
93 | 93 | |
94 | 94 | /* 3.step 检查入库明细合法性*/ |
95 | 95 | AjaxResult checkReceiptDetailResult = checkReceiptDetail(receiptDetails); |
96 | 96 | if (checkReceiptDetailResult.hasErr() ){ |
97 | - return AjaxResult.error(checkReceiptDetailResult.getMessage()); | |
97 | + return AjaxResult.error(checkReceiptDetailResult.getMsg()); | |
98 | 98 | } |
99 | 99 | |
100 | 100 | /* 4.step 计算入库明细总行数、总数量*/ |
... | ... |
src/main/java/com/huaheng/api/general/service/ReceiptService.java
... | ... | @@ -77,13 +77,13 @@ public class ReceiptService { |
77 | 77 | /* 2.step 检查入库头表合法性*/ |
78 | 78 | AjaxResult checkReceiptHeaderResult = checkReceiptHeader(receiptHeader); |
79 | 79 | if (checkReceiptHeaderResult.hasErr() ){ |
80 | - return AjaxResult.error(checkReceiptHeaderResult.getMessage()); | |
80 | + return AjaxResult.error(checkReceiptHeaderResult.getMsg()); | |
81 | 81 | } |
82 | 82 | |
83 | 83 | /* 3.step 检查入库明细合法性*/ |
84 | 84 | AjaxResult checkReceiptDetailResult = checkReceiptDetail(receiptDetails); |
85 | 85 | if (checkReceiptDetailResult.hasErr() ){ |
86 | - return AjaxResult.error(checkReceiptDetailResult.getMessage()); | |
86 | + return AjaxResult.error(checkReceiptDetailResult.getMsg()); | |
87 | 87 | } |
88 | 88 | |
89 | 89 | /* 4.step 计算入库明细总行数、总数量*/ |
... | ... |
src/main/java/com/huaheng/api/wcs/service/overrideHandle/OverrideHandleServiceImpl.java
... | ... | @@ -101,7 +101,7 @@ public class OverrideHandleServiceImpl implements OverrideHandleService { |
101 | 101 | if(location == null){ |
102 | 102 | return AjaxResult.error("此任务的原目的库位在系统中不存在"); |
103 | 103 | } |
104 | - location.setStatus("empty"); | |
104 | + location.setStatus(QuantityConstant.STATUS_EMPTY); | |
105 | 105 | location.setContainerCode(""); |
106 | 106 | flag = locationService.updateById(location); |
107 | 107 | if(flag == false){ |
... | ... | @@ -122,7 +122,7 @@ public class OverrideHandleServiceImpl implements OverrideHandleService { |
122 | 122 | if(!"0".equals(taskFinishDomain.getRedirectionLocationCode())) { |
123 | 123 | LambdaQueryWrapper<Location> locationLa = Wrappers.lambdaQuery(); |
124 | 124 | locationLa.eq(Location::getCode, taskFinishDomain.getRedirectionLocationCode()) |
125 | - .eq(Location::getStatus,"empty") | |
125 | + .eq(Location::getStatus,QuantityConstant.STATUS_EMPTY) | |
126 | 126 | .eq(Location::getWarehouseCode, ShiroUtils.getWarehouseCode()); |
127 | 127 | newlocation = locationService.getOne(locationLa); |
128 | 128 | if (newlocation == null) { |
... | ... |
src/main/java/com/huaheng/api/wcs/service/taskAssignService/TaskAssignServiceImpl.java
... | ... | @@ -85,19 +85,19 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
85 | 85 | return AjaxResult.error("wms任务中容器为空"); |
86 | 86 | } |
87 | 87 | |
88 | - | |
88 | + int taskType = taskHeader.getTaskType().intValue(); | |
89 | 89 | //入库性质的任务源库位不能为空 |
90 | - if(taskHeader.getTaskType()==100 || taskHeader.getTaskType()==200 | |
91 | - || taskHeader.getTaskType()==500 || taskHeader.getTaskType()==800) { | |
90 | + if(taskType == QuantityConstant.TASK_TYPE_WHOLERECEIPT || taskType == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT | |
91 | + || taskType == QuantityConstant.TASK_TYPE_EMPTYRECEIPT || taskType == QuantityConstant.TASK_TYPE_TRANSFER) { | |
92 | 92 | if (taskHeader.getFromLocation() == null) { |
93 | 93 | return AjaxResult.error("源库位为空"); |
94 | 94 | } |
95 | 95 | } |
96 | 96 | |
97 | 97 | // 出库性质的任务目的库位不能为空 |
98 | - if(taskHeader.getTaskType()==300 || taskHeader.getTaskType()==400 | |
99 | - || taskHeader.getTaskType()==600 || taskHeader.getTaskType()==700 | |
100 | - || taskHeader.getTaskType()==800 || taskHeader.getTaskType()==900) | |
98 | + if(taskType == QuantityConstant.TASK_TYPE_WHOLESHIPMENT || taskType == QuantityConstant.TASK_TYPE_SORTINGSHIPMENT | |
99 | + || taskType == QuantityConstant.TASK_TYPE_EMPTYSHIPMENT || taskType == QuantityConstant.TASK_TYPE_CYCLECOUNT | |
100 | + || taskType == QuantityConstant.TASK_TYPE_TRANSFER || taskType ==QuantityConstant.TASK_TYPE_VIEW) | |
101 | 101 | { |
102 | 102 | if (taskHeader.getToLocation() == null) { |
103 | 103 | return AjaxResult.error("目的库位为空"); |
... | ... | @@ -106,13 +106,11 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
106 | 106 | |
107 | 107 | //3、转换实体,初始化wcs任务实体 |
108 | 108 | WcsTask wcsTask = new WcsTask(); |
109 | -// wcsTask.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
110 | 109 | wcsTask.setTaskNo(taskHeader.getId().toString()); |
111 | 110 | wcsTask.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
112 | - wcsTask.setTaskType(taskHeader.getTaskType()); | |
111 | + wcsTask.setTaskType(taskType); | |
113 | 112 | wcsTask.setFromPort(""); |
114 | 113 | wcsTask.setToPort(taskHeader.getStationCode()); |
115 | - | |
116 | 114 | wcsTask.setContainerCode(taskHeader.getContainerCode()); |
117 | 115 | Location location; |
118 | 116 | switch(wcsTask.getTaskType().intValue()) { |
... | ... | @@ -133,7 +131,6 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
133 | 131 | location = locationService.findLocationByCode(taskHeader.getToLocation()); |
134 | 132 | break; |
135 | 133 | } |
136 | - int taskType = wcsTask.getTaskType().intValue(); | |
137 | 134 | if (taskType == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT |
138 | 135 | || taskType == QuantityConstant.TASK_TYPE_WHOLESHIPMENT |
139 | 136 | || taskType == QuantityConstant.TASK_TYPE_SORTINGSHIPMENT |
... | ... | @@ -146,7 +143,7 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
146 | 143 | if(StringUtils.isNotEmpty(insideLocation.getContainerCode())) { |
147 | 144 | LambdaQueryWrapper<TaskHeader> lambdaWrapper = Wrappers.lambdaQuery(); |
148 | 145 | lambdaWrapper.eq(TaskHeader::getFromLocation, insideLocationCode); |
149 | - lambdaWrapper.lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED.intValue()); | |
146 | + lambdaWrapper.lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED); | |
150 | 147 | TaskHeader taskHeader2 = taskHeaderService.getOne(lambdaWrapper); |
151 | 148 | if(taskHeader2 != null) { |
152 | 149 | preTaskNo = taskHeader2.getId(); |
... | ... | @@ -165,7 +162,7 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
165 | 162 | } else { |
166 | 163 | LambdaQueryWrapper<TaskHeader> lambdaWrapper = Wrappers.lambdaQuery(); |
167 | 164 | lambdaWrapper.eq(TaskHeader::getToLocation, insideLocationCode); |
168 | - lambdaWrapper.lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED.intValue()); | |
165 | + lambdaWrapper.lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED); | |
169 | 166 | TaskHeader taskHeader1 = taskHeaderService.getOne(lambdaWrapper); |
170 | 167 | if(taskHeader1 != null) { |
171 | 168 | return AjaxResult.error("执行外侧库位出库时,相应的内侧库位有任务,请先执行完内侧库位任务"); |
... | ... | @@ -184,10 +181,10 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
184 | 181 | String nearLocationCode = insideLocation.getCode(); |
185 | 182 | LambdaQueryWrapper<TaskHeader> lambdaWrapper = Wrappers.lambdaQuery(); |
186 | 183 | lambdaWrapper.eq(TaskHeader::getFromLocation, nearLocationCode) |
187 | - .lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED.intValue()) | |
184 | + .lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED) | |
188 | 185 | .in(TaskHeader::getTaskType, QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT, |
189 | 186 | QuantityConstant.TASK_TYPE_SORTINGSHIPMENT, QuantityConstant.TASK_TYPE_VIEW) |
190 | - .ge(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_RELEASE.intValue()); | |
187 | + .ge(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_RELEASE); | |
191 | 188 | List<TaskHeader> taskHeader2 = taskHeaderService.list(lambdaWrapper); |
192 | 189 | if (taskHeader2 != null && taskHeader2.size() > 0) { |
193 | 190 | return AjaxResult.error("执行任务出库时,相应的旁边库位有分拣出库或者补充入库任务,请先执行完旁边库位任务"); |
... | ... | @@ -195,21 +192,21 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
195 | 192 | } |
196 | 193 | |
197 | 194 | Location insideNear = locationService.getInsideNear(location); |
198 | - if (location.getRowFlag().intValue() == 1) { | |
195 | + if (location.getRowFlag().intValue() == QuantityConstant.ROW_OUT) { | |
199 | 196 | String locationCode = location.getCode(); |
200 | 197 | LambdaQueryWrapper<TaskHeader> lambdaWrapper3 = Wrappers.lambdaQuery(); |
201 | 198 | lambdaWrapper3.eq(TaskHeader::getFromLocation, locationCode) |
202 | - .lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED.intValue()) | |
199 | + .lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED) | |
203 | 200 | .in(TaskHeader::getTaskType, QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT, |
204 | 201 | QuantityConstant.TASK_TYPE_SORTINGSHIPMENT, QuantityConstant.TASK_TYPE_VIEW) |
205 | - .ge(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_BUILD.intValue()); | |
202 | + .ge(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_BUILD); | |
206 | 203 | List<TaskHeader> taskHeader3 = taskHeaderService.list(lambdaWrapper3); |
207 | 204 | if (taskHeader3 != null && taskHeader3.size() > 0) { |
208 | 205 | String insideNearCode = insideNear.getCode(); |
209 | 206 | LambdaQueryWrapper<TaskHeader> lambdaWrapper4 = Wrappers.lambdaQuery(); |
210 | 207 | lambdaWrapper4.eq(TaskHeader::getFromLocation, insideNearCode) |
211 | - .lt(TaskHeader::getStatus, 100) | |
212 | - .ge(TaskHeader::getStatus, 1); | |
208 | + .lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED) | |
209 | + .ge(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_BUILD); | |
213 | 210 | List<TaskHeader> taskHeader4 = taskHeaderService.list(lambdaWrapper4); |
214 | 211 | if (taskHeader4 != null && taskHeader4.size() > 0) { |
215 | 212 | return AjaxResult.error("执行任务出库时,请先执行完旁边库位任务"); |
... | ... | @@ -236,7 +233,7 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
236 | 233 | } |
237 | 234 | |
238 | 235 | wcsTask.setPriority(10); |
239 | - if("800".equals(wcsTask.getTaskType())) { | |
236 | + if(QuantityConstant.TASK_TYPE_TRANSFER == taskType) { | |
240 | 237 | wcsTask.setPriority(100); |
241 | 238 | } |
242 | 239 | wcsTask.setRemark("0"); |
... | ... | @@ -250,7 +247,7 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
250 | 247 | return AjaxResult.error("没有子任务"); |
251 | 248 | } |
252 | 249 | List<TaskDetails> taskDetails =new ArrayList<>(); |
253 | - for(TaskDetail item : taskDetailList){ | |
250 | + for(TaskDetail item : taskDetailList) { | |
254 | 251 | TaskDetails details = new TaskDetails(); |
255 | 252 | details.setMaterialCode(item.getMaterialCode()); |
256 | 253 | details.setMaterialName(item.getMaterialName()); |
... | ... | @@ -267,17 +264,17 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
267 | 264 | wcsTask.setTaskDetails(taskDetails); |
268 | 265 | |
269 | 266 | //4、发送数据 |
270 | - String param="wcs"; | |
271 | - String url=addressService.selectAddress(param)+"TaskAssign"; | |
267 | + String param = "wcs"; | |
268 | + String url = addressService.selectAddress(param)+"TaskAssign"; | |
272 | 269 | String JsonParam = JSON.toJSONString(wcsTask); |
273 | 270 | System.out.println(JsonParam); |
274 | 271 | String result = HttpUtils.bodypost(url, JsonParam); |
275 | - if(StringUtils.isEmpty(result)){ | |
272 | + if(StringUtils.isEmpty(result)) { | |
276 | 273 | throw new ServiceException("接口地址错误或返回为空"); |
277 | 274 | } |
278 | 275 | AjaxResult ajaxResult = JSON.parseObject(result, AjaxResult.class); |
279 | - if(ajaxResult.getCode()!= HttpConstant.OK){ | |
280 | - return AjaxResult.error(ajaxResult.getMessage()); | |
276 | + if(ajaxResult.getCode()!= HttpConstant.OK) { | |
277 | + return AjaxResult.error(ajaxResult.getMsg()); | |
281 | 278 | } |
282 | 279 | return AjaxResult.success(""); |
283 | 280 | } |
... | ... |
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/LocationAllocationServiceImpl.java
... | ... | @@ -3,6 +3,7 @@ package com.huaheng.api.wcs.service.warecellAllocation; |
3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | 5 | import com.huaheng.common.constant.Constants; |
6 | +import com.huaheng.common.constant.QuantityConstant; | |
6 | 7 | import com.huaheng.common.exception.service.ServiceException; |
7 | 8 | import com.huaheng.common.utils.StringUtils; |
8 | 9 | import com.huaheng.pc.config.container.domain.Container; |
... | ... | @@ -83,7 +84,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
83 | 84 | LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery(); |
84 | 85 | locationLambda.eq(Location::getArea, area). |
85 | 86 | eq(Location::getWarehouseCode, warehouseCode) |
86 | - .eq(Location::getStatus, "empty") | |
87 | + .eq(Location::getStatus, QuantityConstant.STATUS_EMPTY) | |
87 | 88 | .eq(Location::getRowFlag, 1) |
88 | 89 | .eq(Location::getContainerCode, ""); |
89 | 90 | List<Location> locationList = locationService.list(locationLambda); |
... | ... | @@ -100,7 +101,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
100 | 101 | locationLambda = Wrappers.lambdaQuery(); |
101 | 102 | locationLambda.eq(Location::getArea, area). |
102 | 103 | eq(Location::getWarehouseCode, warehouseCode) |
103 | - .eq(Location::getStatus, "empty") | |
104 | + .eq(Location::getStatus, QuantityConstant.STATUS_EMPTY) | |
104 | 105 | .eq(Location::getRowFlag, 0) |
105 | 106 | .eq(Location::getContainerCode, ""); |
106 | 107 | locationList = locationService.list(locationLambda); |
... | ... | @@ -125,7 +126,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
125 | 126 | LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery(); |
126 | 127 | locationLambda.eq(Location::getArea, area). |
127 | 128 | eq(Location::getWarehouseCode, warehouseCode) |
128 | - .eq(Location::getStatus, "empty") | |
129 | + .eq(Location::getStatus, QuantityConstant.STATUS_EMPTY) | |
129 | 130 | .eq(Location::getContainerCode, ""); |
130 | 131 | List<Location> locationList = locationService.list(locationLambda); |
131 | 132 | String locationCode = filter(locationList, locationTypeList, area); |
... | ... |
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java
... | ... | @@ -3,6 +3,7 @@ package com.huaheng.api.wcs.service.warecellAllocation; |
3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | 5 | import com.huaheng.api.wcs.domain.WCSInfo; |
6 | +import com.huaheng.common.constant.QuantityConstant; | |
6 | 7 | import com.huaheng.common.exception.service.ServiceException; |
7 | 8 | import com.huaheng.common.support.Convert; |
8 | 9 | import com.huaheng.common.utils.StringUtils; |
... | ... | @@ -174,9 +175,9 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService |
174 | 175 | } |
175 | 176 | |
176 | 177 | if (StringUtils.isNotEmpty(locationCode)) { |
177 | - locationService.updateStatus(locationCode, "lock", wcsTask.getWarehouseCode()); | |
178 | + locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCK, wcsTask.getWarehouseCode()); | |
178 | 179 | if (StringUtils.isNotEmpty(taskHeader.getToLocation()) && !locationCode.equals(taskHeader.getToLocation())) { |
179 | - locationService.updateStatus(taskHeader.getToLocation(), "empty", wcsTask.getWarehouseCode()); | |
180 | + locationService.updateStatus(taskHeader.getToLocation(), QuantityConstant.STATUS_EMPTY, wcsTask.getWarehouseCode()); | |
180 | 181 | } |
181 | 182 | } else { |
182 | 183 | throw new ServiceException("定位失败,请检查定位规则是否正确"); |
... | ... |
src/main/java/com/huaheng/common/constant/Constants.java
... | ... | @@ -72,9 +72,4 @@ public class Constants |
72 | 72 | |
73 | 73 | public static final String SINGER_RK = "SingleRK"; |
74 | 74 | |
75 | - public static final String EMPTY_STATUS = "empty"; | |
76 | - | |
77 | - public static final String LOCK_STATUS = "lock"; | |
78 | - | |
79 | - public static final String SOME_STATUS = "some"; | |
80 | 75 | } |
... | ... |
src/main/java/com/huaheng/common/constant/QuantityConstant.java
... | ... | @@ -188,16 +188,16 @@ public class QuantityConstant { |
188 | 188 | //7、任务状态 |
189 | 189 | |
190 | 190 | /** 生成任务 */ |
191 | - public static final Integer TASK_STATUS_BUILD = 1; | |
191 | + public static final int TASK_STATUS_BUILD = 1; | |
192 | 192 | |
193 | 193 | /** 下达任务 */ |
194 | - public static final Integer TASK_STATUS_RELEASE = 10; | |
194 | + public static final int TASK_STATUS_RELEASE = 10; | |
195 | 195 | |
196 | 196 | /** 开始执行 */ |
197 | - public static final Integer TASK_STATUS_RUNNING = 20; | |
197 | + public static final int TASK_STATUS_RUNNING = 20; | |
198 | 198 | |
199 | 199 | /** 任务完成 */ |
200 | - public static final Integer TASK_STATUS_COMPLETED = 100; | |
200 | + public static final int TASK_STATUS_COMPLETED = 100; | |
201 | 201 | |
202 | 202 | |
203 | 203 | //8、波次状态 |
... | ... | @@ -369,4 +369,10 @@ public class QuantityConstant { |
369 | 369 | public static final int ROW_OUT = 1; |
370 | 370 | |
371 | 371 | public static final int ROW_IN = 0; |
372 | + | |
373 | + public static final String STATUS_EMPTY = "empty"; | |
374 | + public static final String STATUS_LOCK = "lock"; | |
375 | + public static final String STATUS_SOME = "some"; | |
376 | + | |
377 | + | |
372 | 378 | } |
... | ... |
src/main/java/com/huaheng/framework/web/domain/AjaxResult.java
... | ... | @@ -5,7 +5,7 @@ import java.io.Serializable; |
5 | 5 | |
6 | 6 | /** |
7 | 7 | * 操作消息提醒 |
8 | - * | |
8 | + * | |
9 | 9 | * @author huaheng |
10 | 10 | */ |
11 | 11 | public class AjaxResult<T> implements Serializable |
... | ... | @@ -14,7 +14,7 @@ public class AjaxResult<T> implements Serializable |
14 | 14 | |
15 | 15 | public int code; |
16 | 16 | |
17 | - private String message; | |
17 | + private String msg; | |
18 | 18 | |
19 | 19 | private T data; |
20 | 20 | |
... | ... | @@ -40,12 +40,12 @@ public class AjaxResult<T> implements Serializable |
40 | 40 | return this; |
41 | 41 | } |
42 | 42 | |
43 | - public String getMessage() { | |
44 | - return message; | |
43 | + public String getMsg() { | |
44 | + return msg; | |
45 | 45 | } |
46 | 46 | |
47 | - public AjaxResult<T> setMessage(String msg) { | |
48 | - this.message = msg; | |
47 | + public AjaxResult<T> setMsg(String msg) { | |
48 | + this.msg = msg; | |
49 | 49 | return this; |
50 | 50 | } |
51 | 51 | |
... | ... | @@ -79,7 +79,7 @@ public class AjaxResult<T> implements Serializable |
79 | 79 | */ |
80 | 80 | public static AjaxResult success(String message) |
81 | 81 | { |
82 | - return new AjaxResult<>().setCode(RetCode.SUCCESS).setMessage(message); | |
82 | + return new AjaxResult<>().setCode(RetCode.SUCCESS).setMsg(message); | |
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
... | ... | @@ -87,7 +87,7 @@ public class AjaxResult<T> implements Serializable |
87 | 87 | */ |
88 | 88 | public static AjaxResult success() |
89 | 89 | { |
90 | - return new AjaxResult<>().setCode(RetCode.SUCCESS).setMessage("成功"); | |
90 | + return new AjaxResult<>().setCode(RetCode.SUCCESS).setMsg("成功"); | |
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
... | ... | @@ -95,7 +95,7 @@ public class AjaxResult<T> implements Serializable |
95 | 95 | */ |
96 | 96 | public static <T> AjaxResult<T> success(T data) |
97 | 97 | { |
98 | - return new AjaxResult<T>().setCode(RetCode.SUCCESS).setMessage("成功").setData(data); | |
98 | + return new AjaxResult<T>().setCode(RetCode.SUCCESS).setMsg("成功").setData(data); | |
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
... | ... | @@ -103,7 +103,7 @@ public class AjaxResult<T> implements Serializable |
103 | 103 | */ |
104 | 104 | public static <T> AjaxResult<T> success(String message, T data) |
105 | 105 | { |
106 | - return new AjaxResult<T>().setCode(RetCode.SUCCESS).setMessage(message).setData(data); | |
106 | + return new AjaxResult<T>().setCode(RetCode.SUCCESS).setMsg(message).setData(data); | |
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
... | ... | @@ -111,7 +111,7 @@ public class AjaxResult<T> implements Serializable |
111 | 111 | */ |
112 | 112 | public static AjaxResult error(String message) |
113 | 113 | { |
114 | - return new AjaxResult<>().setCode(RetCode.FAIL).setMessage(message); | |
114 | + return new AjaxResult<>().setCode(RetCode.FAIL).setMsg(message); | |
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
... | ... | @@ -119,7 +119,7 @@ public class AjaxResult<T> implements Serializable |
119 | 119 | */ |
120 | 120 | public static <T> AjaxResult<T> error(String message,T data) |
121 | 121 | { |
122 | - return new AjaxResult<T>().setCode(RetCode.FAIL).setMessage(message).setData(data); | |
122 | + return new AjaxResult<T>().setCode(RetCode.FAIL).setMsg(message).setData(data); | |
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
... | ... | @@ -127,7 +127,7 @@ public class AjaxResult<T> implements Serializable |
127 | 127 | */ |
128 | 128 | public static <T> AjaxResult<T> error() |
129 | 129 | { |
130 | - return new AjaxResult<T>().setCode(RetCode.FAIL).setMessage("失败"); | |
130 | + return new AjaxResult<T>().setCode(RetCode.FAIL).setMsg("失败"); | |
131 | 131 | } |
132 | 132 | |
133 | 133 | /** |
... | ... | @@ -135,7 +135,7 @@ public class AjaxResult<T> implements Serializable |
135 | 135 | */ |
136 | 136 | public static <T> AjaxResult<T> setResult(RetCode retCode, String message, T data) |
137 | 137 | { |
138 | - return new AjaxResult<T>().setCode(retCode).setMessage(message).setData(data); | |
138 | + return new AjaxResult<T>().setCode(retCode).setMsg(message).setData(data); | |
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
... | ... | @@ -147,7 +147,7 @@ public class AjaxResult<T> implements Serializable |
147 | 147 | */ |
148 | 148 | public static <T> AjaxResult<T> setResultCS(int code, String message) |
149 | 149 | { |
150 | - return new AjaxResult<T>().setCode(code).setMessage(message); | |
150 | + return new AjaxResult<T>().setCode(code).setMsg(message); | |
151 | 151 | } |
152 | 152 | |
153 | 153 | } |
... | ... |
src/main/java/com/huaheng/mobile/invenory/MobileInventoryController.java
... | ... | @@ -445,8 +445,8 @@ public class MobileInventoryController { |
445 | 445 | for(Location location : locations) { |
446 | 446 | for(Container container : containers) { |
447 | 447 | if(container.getCode().equals(location.getContainerCode())) { |
448 | - if("some".equals(container.getStatus())) { | |
449 | - location.setStatus("some"); | |
448 | + if(QuantityConstant.STATUS_SOME.equals(container.getStatus())) { | |
449 | + location.setStatus(QuantityConstant.STATUS_SOME); | |
450 | 450 | } |
451 | 451 | } |
452 | 452 | } |
... | ... |
src/main/java/com/huaheng/mobile/receipt/MobileBatchReceiptController.java
... | ... | @@ -113,7 +113,7 @@ public class MobileBatchReceiptController { |
113 | 113 | if (container == null) { |
114 | 114 | return AjaxResult.error("托盘编码错误"); |
115 | 115 | } |
116 | - if (!"empty".equals(container.getStatus())) { | |
116 | + if (!QuantityConstant.STATUS_EMPTY.equals(container.getStatus())) { | |
117 | 117 | return AjaxResult.error("托盘状态不为空"); |
118 | 118 | } |
119 | 119 | if (!"".equals(container.getLocationCode())) { |
... | ... | @@ -429,7 +429,7 @@ public class MobileBatchReceiptController { |
429 | 429 | if(StringUtils.isEmpty(containerCode)) { |
430 | 430 | LambdaQueryWrapper<Container> containerQueryWrapper2 = Wrappers.lambdaQuery(); |
431 | 431 | containerQueryWrapper2.eq(Container::getEnable, true) |
432 | - .eq(Container::getStatus, "empty") | |
432 | + .eq(Container::getStatus, QuantityConstant.STATUS_EMPTY) | |
433 | 433 | .eq(Container::getContainerType, "DM"); |
434 | 434 | List<Container> containerList = containerService.list(containerQueryWrapper2); |
435 | 435 | containerCode = containerList.get(0).getCode(); |
... | ... | @@ -450,7 +450,7 @@ public class MobileBatchReceiptController { |
450 | 450 | throw new JSONException("不存在这个托盘"); |
451 | 451 | } |
452 | 452 | |
453 | - if(!"empty".equals(location.getStatus())) { | |
453 | + if(!QuantityConstant.STATUS_EMPTY.equals(location.getStatus())) { | |
454 | 454 | throw new JSONException("库位状态不是空闲"); |
455 | 455 | } |
456 | 456 | } |
... | ... | @@ -485,7 +485,6 @@ public class MobileBatchReceiptController { |
485 | 485 | } |
486 | 486 | receiptContainerHeaderService.batchSave(receiptContainerViewList); |
487 | 487 | AjaxResult retResult = taskHeaderService.createQuickTask(containerCode); |
488 | - | |
489 | 488 | return retResult; |
490 | 489 | } |
491 | 490 | |
... | ... | @@ -552,13 +551,13 @@ public class MobileBatchReceiptController { |
552 | 551 | if (loc == null) { |
553 | 552 | return AjaxResult.error("目标库位不存在"); |
554 | 553 | } |
555 | - if (!"empty".equals(loc.getStatus())) { | |
554 | + if (!QuantityConstant.STATUS_EMPTY.equals(loc.getStatus())) { | |
556 | 555 | return AjaxResult.error("目标库位非空闲"); |
557 | 556 | } |
558 | 557 | } |
559 | 558 | //判断托盘是否已经存在任务 |
560 | 559 | LambdaQueryWrapper<TaskHeader> headerQueryWrapper = Wrappers.lambdaQuery(); |
561 | - headerQueryWrapper.ne(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED.intValue()) | |
560 | + headerQueryWrapper.ne(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED) | |
562 | 561 | .eq(TaskHeader::getContainerCode, containerCode); |
563 | 562 | Integer taskCount = taskHeaderService.count(headerQueryWrapper); |
564 | 563 | if (taskCount != null && taskCount.intValue() > 0) { |
... | ... | @@ -586,7 +585,7 @@ public class MobileBatchReceiptController { |
586 | 585 | taskHeader.setLastUpdated(new Date()); |
587 | 586 | if (taskHeaderService.save(taskHeader)){ |
588 | 587 | //锁定库位状态 |
589 | - locationService.updateStatus(loc.getCode(),"lock"); | |
588 | + locationService.updateStatus(loc.getCode(),QuantityConstant.STATUS_LOCK); | |
590 | 589 | } else { |
591 | 590 | throw new ServiceException("补充入库主表生成失败!"); |
592 | 591 | } |
... | ... |
src/main/java/com/huaheng/pc/config/configWarning/service/ConfigWarningService.java
... | ... | @@ -2,6 +2,7 @@ package com.huaheng.pc.config.configWarning.service; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | +import com.huaheng.common.constant.QuantityConstant; | |
5 | 6 | import com.huaheng.common.utils.security.ShiroUtils; |
6 | 7 | import com.huaheng.framework.web.domain.AjaxResult; |
7 | 8 | import com.huaheng.pc.config.location.domain.Location; |
... | ... | @@ -187,7 +188,7 @@ public class ConfigWarningService extends ServiceImpl<ConfigWarningMapper, Confi |
187 | 188 | |
188 | 189 | LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery(); |
189 | 190 | locationLambda.eq(Location::getWarehouseCode, ShiroUtils.getWarehouseCode()) |
190 | - .eq(Location::getStatus, "empty"); | |
191 | + .eq(Location::getStatus, QuantityConstant.STATUS_EMPTY); | |
191 | 192 | BigDecimal sum = new BigDecimal(locationService.list(locationLambda).size()); |
192 | 193 | SendMail sendMail = new SendMail(); |
193 | 194 | sendMail.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
... | ... |
src/main/java/com/huaheng/pc/config/container/controller/ContainerController.java
... | ... | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; |
5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
6 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
7 | +import com.huaheng.common.constant.QuantityConstant; | |
7 | 8 | import com.huaheng.common.support.Convert; |
8 | 9 | import com.huaheng.common.utils.StringUtils; |
9 | 10 | import com.huaheng.common.utils.poi.ExcelUtil; |
... | ... | @@ -98,7 +99,7 @@ public class ContainerController extends BaseController { |
98 | 99 | Integer pageNum = pageDomain.getPageNum(); |
99 | 100 | Integer pageSize = pageDomain.getPageSize(); |
100 | 101 | lambdaQueryWrapper |
101 | - .eq(Container::getStatus, "empty") | |
102 | + .eq(Container::getStatus, QuantityConstant.STATUS_EMPTY) | |
102 | 103 | .isNotNull(Container::getLocationCode) |
103 | 104 | .ne(Container::getLocationCode, "") |
104 | 105 | .eq(Container::getWarehouseCode, ShiroUtils.getWarehouseCode()) |
... | ... | @@ -178,7 +179,7 @@ public class ContainerController extends BaseController { |
178 | 179 | |
179 | 180 | for (Integer id : Convert.toIntArray(ids)) { |
180 | 181 | Container container = containerService.getById(id); |
181 | - if ("empty".equals(container.getStatus()) && StringUtils.isEmpty(container.getLocationCode())) { | |
182 | + if (QuantityConstant.STATUS_EMPTY.equals(container.getStatus()) && StringUtils.isEmpty(container.getLocationCode())) { | |
182 | 183 | container.setEnable(false); |
183 | 184 | container.setLastUpdatedBy(ShiroUtils.getLoginName()); |
184 | 185 | containerService.updateById(container); |
... | ... |
src/main/java/com/huaheng/pc/config/location/controller/LocationController.java
... | ... | @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
5 | 5 | import com.baomidou.mybatisplus.core.metadata.IPage; |
6 | 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
7 | 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
8 | +import com.huaheng.common.constant.QuantityConstant; | |
8 | 9 | import com.huaheng.common.support.Convert; |
9 | 10 | import com.huaheng.common.utils.StringUtils; |
10 | 11 | import com.huaheng.common.utils.security.ShiroUtils; |
... | ... | @@ -175,11 +176,11 @@ public class LocationController extends BaseController { |
175 | 176 | @PostMapping("/addBatchSave") |
176 | 177 | @ResponseBody |
177 | 178 | public AjaxResult addBatchSave (String prefix, String firstRow, String lastRow, String firstColumn, String lastColumn, String firstLayer, String lastLayer, |
178 | - String firstGrid, String lastGrid, String roadway, String area, String status, String zoneCode, String locationType, String high) { | |
179 | + String firstGrid, String lastGrid, String roadway, String status, String zoneCode, String locationType, String high) { | |
179 | 180 | |
180 | 181 | return toAjax(locationService.addBatchSave(prefix, Integer.parseInt(firstRow), Integer.parseInt(lastRow), |
181 | 182 | Integer.parseInt(firstColumn), Integer.parseInt(lastColumn), Integer.parseInt(firstLayer), Integer.parseInt(lastLayer), |
182 | - Integer.parseInt(firstGrid), Integer.parseInt(lastGrid), roadway, area, status, zoneCode, locationType, high)); | |
183 | + Integer.parseInt(firstGrid), Integer.parseInt(lastGrid), roadway, status, zoneCode, locationType, high)); | |
183 | 184 | } |
184 | 185 | |
185 | 186 | /** |
... | ... | @@ -210,7 +211,7 @@ public class LocationController extends BaseController { |
210 | 211 | @ResponseBody |
211 | 212 | public AjaxResult editSave (Location location) { |
212 | 213 | Location locationCurrent = locationService.getById(location.getId()); |
213 | - if (!locationCurrent.getStatus().equals("empty")&&!locationCurrent.getStatus().equals("disable")){ | |
214 | + if (!locationCurrent.getStatus().equals(QuantityConstant.STATUS_EMPTY)&&!locationCurrent.getStatus().equals("disable")){ | |
214 | 215 | return AjaxResult.success("只有在空闲或禁用状态下才能更改库位"); |
215 | 216 | } |
216 | 217 | location.setLastUpdatedBy(ShiroUtils.getLoginName()); |
... | ... | @@ -304,7 +305,7 @@ public class LocationController extends BaseController { |
304 | 305 | List<String> batchList = inventoryDetails.stream().map(InventoryDetail::getBatch).collect(Collectors.toList()); |
305 | 306 | List<String> materialCodeList = inventoryDetails.stream().map(InventoryDetail::getMaterialCode).collect(Collectors.toList()); |
306 | 307 | List<BigDecimal> qtyList = inventoryDetails.stream().map(InventoryDetail::getQty).collect(Collectors.toList()); |
307 | - if("empty".equals(status)) { | |
308 | + if(QuantityConstant.STATUS_EMPTY.equals(status)) { | |
308 | 309 | if(StringUtils.isEmpty(containerCode)) { |
309 | 310 | userDef3 = LocationStatus.IDLE_EMPTY_LOCATION; |
310 | 311 | } else { |
... | ... | @@ -318,7 +319,7 @@ public class LocationController extends BaseController { |
318 | 319 | userDef3 = LocationStatus.IDLE_FULL_CONTAINER; |
319 | 320 | } |
320 | 321 | } |
321 | - } else if("lock".equals(status)) { | |
322 | + } else if(QuantityConstant.STATUS_LOCK.equals(status)) { | |
322 | 323 | if(StringUtils.isEmpty(containerCode)) { |
323 | 324 | userDef3 = LocationStatus.LOCK_EMPTY_LOCATION; |
324 | 325 | } else { |
... | ... |
src/main/java/com/huaheng/pc/config/location/service/LocationService.java
... | ... | @@ -30,7 +30,7 @@ public interface LocationService extends IService<Location>{ |
30 | 30 | * @return boolean |
31 | 31 | */ |
32 | 32 | boolean addBatchSave(String prefix, Integer firstRow, Integer lastRow, Integer firstColumn, Integer lastColumn, Integer firstLayer, |
33 | - Integer lastLayer, Integer firstGrid, Integer lastGrid, String roadWay, String area, String status, String zoneCode, String locationType, String high); | |
33 | + Integer lastLayer, Integer firstGrid, Integer lastGrid, String roadWay, String status, String zoneCode, String locationType, String high); | |
34 | 34 | |
35 | 35 | |
36 | 36 | /** |
... | ... |
src/main/java/com/huaheng/pc/config/location/service/LocationServiceImpl.java
... | ... | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
6 | 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7 | +import com.huaheng.common.constant.QuantityConstant; | |
7 | 8 | import com.huaheng.common.exception.service.ServiceException; |
8 | 9 | import com.huaheng.common.utils.StringUtils; |
9 | 10 | import com.huaheng.common.utils.security.ShiroUtils; |
... | ... | @@ -195,7 +196,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
195 | 196 | |
196 | 197 | @Override |
197 | 198 | public boolean addBatchSave(String prefix, Integer firstRow, Integer lastRow, Integer firstColumn, Integer lastColumn, Integer firstLayer, Integer lastLayer, |
198 | - Integer firstGrid, Integer lastGrid, String roadWay, String area, String status, String zoneCode, String locationType, String high) { | |
199 | + Integer firstGrid, Integer lastGrid, String roadWay, String status, String zoneCode, String locationType, String high) { | |
199 | 200 | LambdaQueryWrapper<LocationType> typeLambda = Wrappers.lambdaQuery(); |
200 | 201 | typeLambda.eq(LocationType::getCode, locationType) |
201 | 202 | .select(LocationType::getCode); |
... | ... | @@ -217,7 +218,10 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
217 | 218 | /* if(!zoneCode.equals(locationType)){ |
218 | 219 | throw new ServiceException(locationType+"的库位类型与"+ zoneCode +"库区不匹配"); |
219 | 220 | }*/ |
220 | - | |
221 | + LambdaQueryWrapper<Zone> zoneLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
222 | + zoneLambdaQueryWrapper.eq(Zone::getCode, zoneCode); | |
223 | + Zone zone = zoneService.getOne(zoneLambdaQueryWrapper); | |
224 | + String area = zone.getArea(); | |
221 | 225 | List<Location> locations = new ArrayList<>(); // 为零? |
222 | 226 | for (int i=firstRow.intValue(); i<=lastRow.intValue(); i++) { |
223 | 227 | for (int j=firstColumn.intValue(); j<=lastColumn.intValue(); j++) { |
... | ... | @@ -386,7 +390,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
386 | 390 | throw new ServiceException("货架上已有容器"); |
387 | 391 | } |
388 | 392 | String status = location.getStatus(); |
389 | - if(!"empty".equals(status)) { | |
393 | + if(!QuantityConstant.STATUS_EMPTY.equals(status)) { | |
390 | 394 | throw new ServiceException("库位状态不为空"); |
391 | 395 | } |
392 | 396 | return true; |
... | ... | @@ -401,7 +405,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
401 | 405 | lambdaQueryWrapper.eq(Location::getWarehouseCode, ShiroUtils.getWarehouseCode()) |
402 | 406 | .eq(Location::getContainerCode, "") |
403 | 407 | .eq(Location::getDeleted, false) |
404 | - .eq(Location::getStatus, "empty"); | |
408 | + .eq(Location::getStatus, QuantityConstant.STATUS_EMPTY); | |
405 | 409 | List<Location> locations = locationService.list(lambdaQueryWrapper); |
406 | 410 | if(locations != null && locations.size() > 0) { |
407 | 411 | return true; |
... | ... | @@ -495,7 +499,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
495 | 499 | |
496 | 500 | private boolean getOutSideCanMove(Location location) { |
497 | 501 | Location locaiton2 = getInsideNear(location); |
498 | - if(!locaiton2.getStatus().equals("empty")) { | |
502 | + if(!locaiton2.getStatus().equals(QuantityConstant.STATUS_EMPTY)) { | |
499 | 503 | return false; |
500 | 504 | } |
501 | 505 | if(!locaiton2.getContainerCode().equals("")) { |
... | ... | @@ -512,7 +516,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
512 | 516 | queryWrapper.eq(Location::getRoadway, location.getRoadway()); |
513 | 517 | queryWrapper.eq(Location::getRowFlag, 1); |
514 | 518 | queryWrapper.eq(Location::getContainerCode, ""); |
515 | - queryWrapper.eq(Location::getStatus, "empty"); | |
519 | + queryWrapper.eq(Location::getStatus, QuantityConstant.STATUS_EMPTY); | |
516 | 520 | queryWrapper.eq(Location::getLocationType, location.getLocationType()); |
517 | 521 | List<Location> locationList = list(queryWrapper); |
518 | 522 | List<Location> removeLocationList = new ArrayList<>(); |
... | ... | @@ -556,7 +560,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
556 | 560 | queryWrapper.eq(Location::getRoadway, location.getRoadway()); |
557 | 561 | queryWrapper.eq(Location::getRowFlag, 0); |
558 | 562 | queryWrapper.eq(Location::getContainerCode, ""); |
559 | - queryWrapper.eq(Location::getStatus, "empty"); | |
563 | + queryWrapper.eq(Location::getStatus, QuantityConstant.STATUS_EMPTY); | |
560 | 564 | queryWrapper.eq(Location::getLocationType, location.getLocationType()); |
561 | 565 | List<Location> locationList = list(queryWrapper); |
562 | 566 | List<Location> removeLocaationList = new ArrayList<>(); |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailServiceImpl.java
... | ... | @@ -198,7 +198,7 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj |
198 | 198 | location.setWarehouseCode(inventoryDetail.getWarehouseCode()); |
199 | 199 | LambdaQueryWrapper<Location> lambdaQueryWrapper = Wrappers.lambdaQuery(location); |
200 | 200 | location = locationService.getOne(lambdaQueryWrapper); |
201 | - if (!"empty".equals(location.getStatus())) { | |
201 | + if (!QuantityConstant.STATUS_EMPTY.equals(location.getStatus())) { | |
202 | 202 | return AjaxResult.error (inventoryDetail.getId() + "库位非空闲,请等待其他任务完成再进行调整!"); |
203 | 203 | } |
204 | 204 | //判断调整库存状态还是数量 |
... | ... | @@ -251,8 +251,8 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj |
251 | 251 | if(inventoryDetailList.size() == 0){ |
252 | 252 | //恢复库位和容器状态,删除库存头 |
253 | 253 | inventoryHeaderService.removeById(inventoryDetail.getInventoryHeaderId()); |
254 | - locationService.updateContainerCodeAndStatus(inventoryDetail.getLocationCode(),"","empty"); | |
255 | - containerService.updateLocationCodeAndStatus(inventoryDetail.getContainerCode(),"","empty"); | |
254 | + locationService.updateContainerCodeAndStatus(inventoryDetail.getLocationCode(),"",QuantityConstant.STATUS_EMPTY); | |
255 | + containerService.updateLocationCodeAndStatus(inventoryDetail.getContainerCode(),"",QuantityConstant.STATUS_EMPTY); | |
256 | 256 | } |
257 | 257 | }else{ |
258 | 258 | //修改库存 |
... | ... | @@ -423,8 +423,8 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj |
423 | 423 | inventoryHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); |
424 | 424 | inventoryHeaderService.saveOrUpdate(inventoryHeader); |
425 | 425 | //更新库位和容器 |
426 | - locationService.updateContainerCodeAndStatus(inventoryHeader.getLocationCode(),inventoryHeader.getContainerCode(),"empty"); | |
427 | - containerService.updateLocationCodeAndStatus(inventoryHeader.getContainerCode(),inventoryHeader.getLocationCode(),"empty"); | |
426 | + locationService.updateContainerCodeAndStatus(inventoryHeader.getLocationCode(),inventoryHeader.getContainerCode(),QuantityConstant.STATUS_EMPTY); | |
427 | + containerService.updateLocationCodeAndStatus(inventoryHeader.getContainerCode(),inventoryHeader.getLocationCode(),QuantityConstant.STATUS_EMPTY); | |
428 | 428 | |
429 | 429 | } |
430 | 430 | //生成库存明细 |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/service/CycleCountDetailServiceImpl.java
... | ... | @@ -305,7 +305,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
305 | 305 | inventoryHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); |
306 | 306 | inventoryHeaderService.updateById(inventoryHeader); |
307 | 307 | //生成盘点任务时锁定库位 |
308 | - locationService.updateStatus(inventoryHeader.getLocationCode(), "lock"); | |
308 | + locationService.updateStatus(inventoryHeader.getLocationCode(), QuantityConstant.STATUS_LOCK); | |
309 | 309 | } |
310 | 310 | //更新主单的总货位数和物料数 |
311 | 311 | if(!updateNum(cycleCountHeaderCode)){ |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryDetail/service/InventoryDetailServiceImpl.java
... | ... | @@ -83,7 +83,7 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe |
83 | 83 | if(loc == null){ |
84 | 84 | throw new ServiceException("库存没有库位!"); |
85 | 85 | } |
86 | - if(!"empty".equals(loc.getStatus())){ | |
86 | + if(!QuantityConstant.STATUS_EMPTY.equals(loc.getStatus())){ | |
87 | 87 | throw new ServiceException(inventoryDetail.getLocationCode()+"状态非空闲,操作失败"); |
88 | 88 | } |
89 | 89 | if(StringUtils.isEmpty(loc.getContainerCode())){ |
... | ... | @@ -105,7 +105,7 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe |
105 | 105 | taskHeader.setLastUpdated(new Date()); |
106 | 106 | if(taskHeaderService.save(taskHeader)){ |
107 | 107 | //锁定库位状态 |
108 | - locationService.updateStatus(loc.getCode(),"lock"); | |
108 | + locationService.updateStatus(loc.getCode(),QuantityConstant.STATUS_LOCK); | |
109 | 109 | }else{ |
110 | 110 | throw new ServiceException("出库查看任务主表生成失败!"); |
111 | 111 | } |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryHeader/service/InventoryHeaderServiceImpl.java
... | ... | @@ -191,7 +191,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe |
191 | 191 | Location location = new Location(); |
192 | 192 | location.setCode(code); |
193 | 193 | location.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
194 | - location.setStatus("empty"); | |
194 | + location.setStatus(QuantityConstant.STATUS_EMPTY); | |
195 | 195 | location.setDeleted(false); |
196 | 196 | LambdaQueryWrapper lamdba62 = Wrappers.lambdaQuery(location); |
197 | 197 | Location location1 = locationService.getOne(lamdba62); |
... | ... | @@ -220,7 +220,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe |
220 | 220 | if(location2 != null) { |
221 | 221 | Container container = new Container(); |
222 | 222 | container.setCode(location2.getContainerCode()); |
223 | - container.setStatus("empty"); | |
223 | + container.setStatus(QuantityConstant.STATUS_EMPTY); | |
224 | 224 | LambdaQueryWrapper lamdba6 = Wrappers.lambdaQuery(container); |
225 | 225 | container = containerService.getOne(lamdba6); |
226 | 226 | if(container != null) { |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailServiceImpl.java
... | ... | @@ -98,7 +98,7 @@ public class ReceiptContainerDetailServiceImpl extends ServiceImpl<ReceiptContai |
98 | 98 | if (list.size() == 0){ |
99 | 99 | String locationCode = receiptContainerDetail.getLocationCode(); |
100 | 100 | if(StringUtils.isNotEmpty(locationCode)) { |
101 | - locationService.updateStatus(locationCode, "empty"); | |
101 | + locationService.updateStatus(locationCode, QuantityConstant.STATUS_EMPTY); | |
102 | 102 | } |
103 | 103 | if (!receiptContainerHeaderService.removeById(receiptContainerDetail.getReceiptContainerId())){ |
104 | 104 | throw new ServiceException("删除入库组盘头失败"); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
... | ... | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; |
5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
6 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
7 | +import com.huaheng.common.constant.HttpConstant; | |
7 | 8 | import com.huaheng.common.support.Convert; |
8 | 9 | import com.huaheng.common.utils.StringUtils; |
9 | 10 | import com.huaheng.common.utils.security.ShiroUtils; |
... | ... | @@ -120,6 +121,7 @@ public class ReceiptContainerHeaderController extends BaseController { |
120 | 121 | List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); |
121 | 122 | return toAjax(receiptContainerHeaderService.cancelByIds(idList)); |
122 | 123 | } |
124 | + | |
123 | 125 | /** |
124 | 126 | * 生成任务 |
125 | 127 | */ |
... | ... | @@ -127,13 +129,22 @@ public class ReceiptContainerHeaderController extends BaseController { |
127 | 129 | @Log(title = "入库-任务生成", operating = "生成入库任务", action = BusinessType.INSERT) |
128 | 130 | @PostMapping( "/createTask") |
129 | 131 | @ResponseBody |
130 | - public AjaxResult addTask(String ids){ | |
132 | + public AjaxResult addTask(String ids) { | |
131 | 133 | if (StringUtils.isEmpty(ids)){ |
132 | 134 | return AjaxResult.error("id不能为空"); |
133 | 135 | } |
134 | 136 | List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); |
135 | 137 | List<Integer> idsList = idList.stream().distinct().collect(Collectors.toList()); |
136 | - return receiptTaskService.createReceiptTask(idsList); | |
138 | + AjaxResult ajaxResult = receiptTaskService.createReceiptTask(idsList); | |
139 | + if(ajaxResult.getCode() != HttpConstant.OK) { | |
140 | + return ajaxResult; | |
141 | + } | |
142 | + List<String> taskList = (List<String>)ajaxResult.getData(); | |
143 | + Integer[] taskIds = new Integer[taskList.size()]; | |
144 | + for(int i=0; i < taskList.size(); i++) { | |
145 | + taskIds[i] = Integer.valueOf(taskList.get(i)); | |
146 | + } | |
147 | + return taskHeaderService.sendTaskToWcs(taskIds); | |
137 | 148 | } |
138 | 149 | |
139 | 150 | /** |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -103,7 +103,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
103 | 103 | //检查库位编码合法性 |
104 | 104 | checkLocationCode(locationCode, containerCode, taskType); |
105 | 105 | // if(locationCode != null) { |
106 | -// locationService.updateStatus(locationCode, "lock"); | |
106 | +// locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCK); | |
107 | 107 | // } |
108 | 108 | |
109 | 109 | /* 新建保存组盘头表记录*/ |
... | ... | @@ -365,7 +365,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
365 | 365 | } |
366 | 366 | if (StringUtils.isEmpty(container.getLocationCode())){ |
367 | 367 | return QuantityConstant.TASK_TYPE_WHOLERECEIPT; |
368 | - }else if (StringUtils.isNotEmpty(container.getStatus()) &&(container.getStatus().equals("empty")||container.getStatus().equals("some"))) { | |
368 | + }else if (StringUtils.isNotEmpty(container.getStatus()) &&(container.getStatus().equals(QuantityConstant.STATUS_EMPTY)||container.getStatus().equals(QuantityConstant.STATUS_SOME))) { | |
369 | 369 | return QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT; |
370 | 370 | } else if ("full".equals(container.getStatus())) { |
371 | 371 | throw new ServiceException("该容器已满,请更换容器"); |
... | ... | @@ -415,7 +415,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
415 | 415 | if (location == null) { |
416 | 416 | throw new ServiceException("库位不存在!"); |
417 | 417 | } |
418 | - if (!"empty".equals(location.getStatus()) ) { | |
418 | + if (!QuantityConstant.STATUS_EMPTY.equals(location.getStatus()) ) { | |
419 | 419 | throw new ServiceException("库位不是空闲状态!"); |
420 | 420 | } |
421 | 421 | if (QuantityConstant.TASK_TYPE_WHOLERECEIPT == taskType.intValue()) { |
... | ... | @@ -519,7 +519,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
519 | 519 | container.setLastUpdated(new Date()); |
520 | 520 | container.setLastUpdatedBy(ShiroUtils.getLoginName()); |
521 | 521 | container.setEnable(true); |
522 | - container.setStatus("empty"); | |
522 | + container.setStatus(QuantityConstant.STATUS_EMPTY); | |
523 | 523 | if (!containerService.save(container)){ |
524 | 524 | throw new ServiceException("新增容器失败"); |
525 | 525 | } |
... | ... | @@ -555,8 +555,8 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
555 | 555 | return receiptContainerHeader.getId(); |
556 | 556 | } |
557 | 557 | |
558 | - locationService.updateStatus(locationCode, "lock"); | |
559 | - containerService.updateLocationCodeAndStatus(receiptContainerCode, locationCode, "some"); | |
558 | + locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCK); | |
559 | + containerService.updateLocationCodeAndStatus(receiptContainerCode, locationCode, QuantityConstant.STATUS_SOME); | |
560 | 560 | return recorder.getId(); |
561 | 561 | } |
562 | 562 | |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiving/controller/ReceivingController.java
... | ... | @@ -2,6 +2,7 @@ package com.huaheng.pc.receipt.receiving.controller; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | +import com.huaheng.common.constant.QuantityConstant; | |
5 | 6 | import com.huaheng.common.exception.service.ServiceException; |
6 | 7 | import com.huaheng.common.utils.StringUtils; |
7 | 8 | import com.huaheng.common.utils.security.ShiroUtils; |
... | ... | @@ -168,7 +169,7 @@ public class ReceivingController extends BaseController { |
168 | 169 | LambdaQueryWrapper<Container> container=Wrappers.lambdaQuery(); |
169 | 170 | container.eq(Container::getWarehouseCode,ShiroUtils.getWarehouseCode()) |
170 | 171 | .eq(Container::getCompanyCode,receiptHeader.getCompanyCode()) |
171 | - .eq(Container::getStatus,"empty"); | |
172 | + .eq(Container::getStatus, QuantityConstant.STATUS_EMPTY); | |
172 | 173 | List<Container> containerList=containerService.list(container); |
173 | 174 | |
174 | 175 | Map map=new ModelMap(); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java
... | ... | @@ -162,7 +162,7 @@ public class ReceivingService { |
162 | 162 | String locationCode = locationAllocationService.allocation(locatingRule, area, ShiroUtils.getWarehouseCode(),container.getCode() ); |
163 | 163 | |
164 | 164 | if (StringUtils.isNotEmpty(locationCode)){ |
165 | - locationService.updateStatus(locationCode, "lock"); | |
165 | + locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCK); | |
166 | 166 | } else { |
167 | 167 | throw new ServiceException("定位失败,请检查定位规则是否正确"); |
168 | 168 | } |
... | ... | @@ -252,7 +252,7 @@ public class ReceivingService { |
252 | 252 | throw new ServiceException("回滚入库明细状态失败"); |
253 | 253 | } |
254 | 254 | |
255 | - locationService.updateStatus(locationCode, "empty"); | |
255 | + locationService.updateStatus(locationCode, QuantityConstant.STATUS_EMPTY); | |
256 | 256 | |
257 | 257 | receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId()); |
258 | 258 | |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderServiceImpl.java
... | ... | @@ -140,8 +140,8 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
140 | 140 | inventoryDetail.setTaskQty(inventoryDetail.getTaskQty().add(shipmentCombinationModel.getShipQty())); |
141 | 141 | inventoryDetailService.saveOrUpdate(inventoryDetail); |
142 | 142 | //获取库位,然后锁定 |
143 | -// if("empty".equals(location.getStatus())) { | |
144 | -// location.setStatus("lock"); | |
143 | +// if(QuantityConstant.STATUS_EMPTY.equals(location.getStatus())) { | |
144 | +// location.setStatus(QuantityConstant.STATUS_LOCK); | |
145 | 145 | // locationService.saveOrUpdate(location); |
146 | 146 | // } |
147 | 147 | //3.更新单据明细的已出库数量 |
... | ... | @@ -419,7 +419,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
419 | 419 | List<Map<String, Object>> list= shipmentContainerDetailService.selectListMapByEqual("id", condition); |
420 | 420 | if(list==null||list.size() == 0){ |
421 | 421 | this.removeById(shipmentContainerHeader.getId()); |
422 | - locationService.updateStatus(shipmentContainerHeader.getLocationCode(),"empty"); | |
422 | + locationService.updateStatus(shipmentContainerHeader.getLocationCode(),QuantityConstant.STATUS_EMPTY); | |
423 | 423 | } |
424 | 424 | //更新单据状态 |
425 | 425 | shipmentHeaderService.updateShipmentStatus(shipmentDetail.getShipmentId()); |
... | ... | @@ -513,7 +513,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
513 | 513 | queryWrapper = Wrappers.lambdaQuery(); |
514 | 514 | queryWrapper.eq(Container::getCode,inventoryDetail.getContainerCode()); |
515 | 515 | Container container = containerService.getOne(queryWrapper); |
516 | - if ("lock".equals(container.getStatus())){ | |
516 | + if (QuantityConstant.STATUS_LOCK.equals(container.getStatus())){ | |
517 | 517 | lockList.add(inventoryDetail); |
518 | 518 | lock = true; |
519 | 519 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/CycleCountTaskService.java
... | ... | @@ -120,16 +120,16 @@ public class CycleCountTaskService { |
120 | 120 | if (taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_SHELF) || taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_PICKING)) { |
121 | 121 | if (taskHeader.getToLocation() != null) { |
122 | 122 | //更新托盘、库位状态 |
123 | - locationService.updateStatus(taskHeader.getToLocation(), "empty"); | |
123 | + locationService.updateStatus(taskHeader.getToLocation(), QuantityConstant.STATUS_EMPTY); | |
124 | 124 | } |
125 | 125 | LambdaQueryWrapper<InventoryHeader> inventoryHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
126 | 126 | inventoryHeaderLambdaQueryWrapper.eq(InventoryHeader::getContainerCode, taskHeader.getContainerCode()); |
127 | 127 | InventoryHeader inventoryHeader = inventoryHeaderService.getOne(inventoryHeaderLambdaQueryWrapper); |
128 | 128 | Container container = new Container(); |
129 | - container.setStatus("empty"); | |
129 | + container.setStatus(QuantityConstant.STATUS_EMPTY); | |
130 | 130 | if(inventoryHeader != null) { |
131 | - if(inventoryHeader.getContainerStatus().equals("some")) { | |
132 | - container.setStatus("some"); | |
131 | + if(inventoryHeader.getContainerStatus().equals(QuantityConstant.STATUS_SOME)) { | |
132 | + container.setStatus(QuantityConstant.STATUS_SOME); | |
133 | 133 | } |
134 | 134 | } |
135 | 135 | LambdaUpdateWrapper<Container> containerUpdateWrapper = Wrappers.lambdaUpdate(); |
... | ... | @@ -168,14 +168,14 @@ public class CycleCountTaskService { |
168 | 168 | temp.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
169 | 169 | LambdaQueryWrapper<Location> lambdaQueryWrapper = Wrappers.lambdaQuery(temp); |
170 | 170 | Location loc = locationService.getOne(lambdaQueryWrapper); |
171 | - /*if(!loc.getStatus().equals("empty")){ | |
171 | + /*if(!loc.getStatus().equals(QuantityConstant.STATUS_EMPTY)){ | |
172 | 172 | return AjaxResult.error(cycleCountDetail.getLocationCode() + "库位不在空闲状态,请先完成其他任务,操作失败!"); |
173 | 173 | }*/ |
174 | 174 | if(StringUtils.isEmpty(loc.getContainerCode())){ |
175 | 175 | return AjaxResult.error(cycleCountDetail.getLocationCode() + "库位中没有容器,操作失败!"); |
176 | 176 | } |
177 | 177 | //生成任务同时锁定库位 |
178 | - locationService.updateStatus(loc.getCode(), "lock"); | |
178 | + locationService.updateStatus(loc.getCode(), QuantityConstant.STATUS_LOCK); | |
179 | 179 | //每个明细单生成一张主任务,子单就是任务明细。 |
180 | 180 | TaskHeader task = new TaskHeader(); |
181 | 181 | task.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
... | ... | @@ -194,7 +194,7 @@ public class CycleCountTaskService { |
194 | 194 | task.setLastUpdated(new Date()); |
195 | 195 | if(taskHeaderService.save(task)){ |
196 | 196 | //锁定库位状态 |
197 | - locationService.updateStatus(loc.getContainerCode(),"lock"); | |
197 | + locationService.updateStatus(loc.getContainerCode(),QuantityConstant.STATUS_LOCK); | |
198 | 198 | cycleCountDetail.setTaskHeaderId(task.getId()); //盘点明细修改状态task数据源 |
199 | 199 | }else{ |
200 | 200 | throw new ServiceException("盘点任务主表生成失败!"); |
... | ... | @@ -345,7 +345,7 @@ public class CycleCountTaskService { |
345 | 345 | //更新主单状态 |
346 | 346 | cycleCountHeaderService.updataHeaderStatus(cycleCountDetail.getCycleCountHeadCode()); |
347 | 347 | //释放库位 |
348 | - locationService.updateStatus(cycleCountDetail.getLocationCode(), "empty"); | |
348 | + locationService.updateStatus(cycleCountDetail.getLocationCode(), QuantityConstant.STATUS_EMPTY); | |
349 | 349 | |
350 | 350 | return AjaxResult.success("完成盘点任务成功!"); |
351 | 351 | |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/ReceiptTaskService.java
... | ... | @@ -44,6 +44,7 @@ import org.springframework.transaction.annotation.Transactional; |
44 | 44 | |
45 | 45 | import javax.annotation.Resource; |
46 | 46 | import java.math.BigDecimal; |
47 | +import java.util.ArrayList; | |
47 | 48 | import java.util.Date; |
48 | 49 | import java.util.List; |
49 | 50 | import java.util.Map; |
... | ... | @@ -95,7 +96,7 @@ public class ReceiptTaskService { |
95 | 96 | */ |
96 | 97 | @Transactional(rollbackFor = Exception.class) |
97 | 98 | public AjaxResult createReceiptTask(List<Integer> ids) { |
98 | - String taskId = new String(); | |
99 | + List<String> taskIds = new ArrayList<>(); | |
99 | 100 | for (Integer id : ids) { |
100 | 101 | ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(id); |
101 | 102 | if (receiptContainerHeader == null) { |
... | ... | @@ -108,7 +109,7 @@ public class ReceiptTaskService { |
108 | 109 | |
109 | 110 | //锁定容器 |
110 | 111 | Container container = new Container(); |
111 | - container.setStatus("lock"); | |
112 | + container.setStatus(QuantityConstant.STATUS_LOCK); | |
112 | 113 | LambdaUpdateWrapper<Container> containerUpdateWrapper = Wrappers.lambdaUpdate(); |
113 | 114 | containerUpdateWrapper.eq(Container::getCode, receiptContainerHeader.getContainerCode()); |
114 | 115 | containerService.update(container, containerUpdateWrapper); |
... | ... | @@ -123,11 +124,11 @@ public class ReceiptTaskService { |
123 | 124 | } |
124 | 125 | |
125 | 126 | if(StringUtils.isNotEmpty(receiptContainerHeader.getFromLocation())) { |
126 | - locationService.updateStatus(receiptContainerHeader.getFromLocation(), "lock"); | |
127 | + locationService.updateStatus(receiptContainerHeader.getFromLocation(), QuantityConstant.STATUS_LOCK); | |
127 | 128 | } |
128 | 129 | String locationCode = receiptContainerHeader.getToLocation(); |
129 | 130 | if(StringUtils.isNotEmpty(locationCode)) { |
130 | - locationService.updateStatus(locationCode, "lock"); | |
131 | + locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCK); | |
131 | 132 | Location desLocation = locationService.findLocationByCode(locationCode); |
132 | 133 | String loginWarehouse = ShiroUtils.getWarehouseCode(); |
133 | 134 | if(!desLocation.getWarehouseCode().equals(loginWarehouse)) { |
... | ... | @@ -199,13 +200,14 @@ public class ReceiptTaskService { |
199 | 200 | //更新头表状态 |
200 | 201 | receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId()); |
201 | 202 | } |
202 | - taskId = String.valueOf(task.getId()); | |
203 | + String taskId = String.valueOf(task.getId()); | |
204 | + taskIds.add(taskId); | |
203 | 205 | } else { |
204 | 206 | throw new ServiceException("任务生成失败"); |
205 | 207 | } |
206 | 208 | } |
207 | 209 | } |
208 | - return AjaxResult.success("生成上架任务成功").setData(taskId); | |
210 | + return AjaxResult.success("生成上架任务成功").setData(taskIds); | |
209 | 211 | } |
210 | 212 | |
211 | 213 | /** |
... | ... | @@ -242,7 +244,7 @@ public class ReceiptTaskService { |
242 | 244 | locationLambdaQueryWrapper.eq(Location::getWarehouseCode, ShiroUtils.getWarehouseCode()); |
243 | 245 | Location location = locationService.getOne(locationLambdaQueryWrapper); |
244 | 246 | location.setContainerCode(""); |
245 | - location.setStatus("empty"); | |
247 | + location.setStatus(QuantityConstant.STATUS_EMPTY); | |
246 | 248 | locationService.updateById(location); |
247 | 249 | inventoryHeader.setLocationCode(task.getToLocation()); |
248 | 250 | inventoryHeaderService.updateById(inventoryHeader); |
... | ... | @@ -271,7 +273,7 @@ public class ReceiptTaskService { |
271 | 273 | inventoryHeader.setWarehouseCode(task.getWarehouseCode()); |
272 | 274 | inventoryHeader.setLocationCode(task.getToLocation()); |
273 | 275 | inventoryHeader.setContainerCode(task.getContainerCode()); |
274 | - inventoryHeader.setContainerStatus("some"); | |
276 | + inventoryHeader.setContainerStatus(QuantityConstant.STATUS_SOME); | |
275 | 277 | inventoryHeader.setTotalWeight(task.getWeight()); |
276 | 278 | inventoryHeader.setTotalQty(new BigDecimal(0)); |
277 | 279 | inventoryHeader.setTotalLines(0); |
... | ... | @@ -329,7 +331,7 @@ public class ReceiptTaskService { |
329 | 331 | Location location = new Location(); |
330 | 332 | location.setContainerCode(task.getContainerCode()); |
331 | 333 | location.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
332 | - location.setStatus("empty"); | |
334 | + location.setStatus(QuantityConstant.STATUS_EMPTY); | |
333 | 335 | LambdaUpdateWrapper<Location> locationLambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
334 | 336 | locationLambdaUpdateWrapper.eq(Location::getCode, task.getToLocation()); |
335 | 337 | locationLambdaUpdateWrapper.eq(Location::getWarehouseCode, ShiroUtils.getWarehouseCode()); |
... | ... | @@ -339,7 +341,7 @@ public class ReceiptTaskService { |
339 | 341 | //修改容器状态和对应的库位 |
340 | 342 | Container container = new Container(); |
341 | 343 | container.setLocationCode(task.getToLocation()); |
342 | - container.setStatus("some"); | |
344 | + container.setStatus(QuantityConstant.STATUS_SOME); | |
343 | 345 | LambdaUpdateWrapper<Container> containerLambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
344 | 346 | containerLambdaUpdateWrapper.eq(Container::getCode, task.getContainerCode()); |
345 | 347 | if (!containerService.update(container, containerLambdaUpdateWrapper)) { |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/ShipmentTaskService.java
... | ... | @@ -130,12 +130,12 @@ public class ShipmentTaskService { |
130 | 130 | if (StringUtils.isNull(container)) { |
131 | 131 | return AjaxResult.error("托盘不存在!"); |
132 | 132 | } |
133 | - if(container.getStatus().equals("lock")) { | |
133 | + if(container.getStatus().equals(QuantityConstant.STATUS_LOCK)) { | |
134 | 134 | return AjaxResult.error("托盘已经锁定!"); |
135 | 135 | } |
136 | - container.setStatus("lock"); | |
136 | + container.setStatus(QuantityConstant.STATUS_LOCK); | |
137 | 137 | containerService.update(container, containerLambdaQueryWrapper); |
138 | - locationService.updateStatus(location.getCode(), "lock"); | |
138 | + locationService.updateStatus(location.getCode(), QuantityConstant.STATUS_LOCK); | |
139 | 139 | //创建任务头 |
140 | 140 | TaskHeader task = new TaskHeader(); |
141 | 141 | task.setTaskType(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT); |
... | ... | @@ -260,7 +260,7 @@ public class ShipmentTaskService { |
260 | 260 | String locationCode = inventoryHeader.getLocationCode(); |
261 | 261 | Location location = locationService.findLocationByCode(locationCode); |
262 | 262 | // location.setContainerCode(""); |
263 | - location.setStatus("empty"); | |
263 | + location.setStatus(QuantityConstant.STATUS_EMPTY); | |
264 | 264 | locationService.updateById(location); |
265 | 265 | inventoryHeader.setLocationCode(task.getToLocation()); |
266 | 266 | inventoryHeaderService.updateById(inventoryHeader); |
... | ... | @@ -419,7 +419,7 @@ public class ShipmentTaskService { |
419 | 419 | if (StringUtils.isNull(fromLocationRecord)) { |
420 | 420 | throw new ServiceException("系统没有" + toLocation + "库位"); |
421 | 421 | } |
422 | - toLocationRecord.setStatus("empty"); | |
422 | + toLocationRecord.setStatus(QuantityConstant.STATUS_EMPTY); | |
423 | 423 | if (taskType.equals(QuantityConstant.TASK_TYPE_WHOLESHIPMENT)) { |
424 | 424 | toLocationRecord.setContainerCode(""); |
425 | 425 | } else { |
... | ... | @@ -428,7 +428,7 @@ public class ShipmentTaskService { |
428 | 428 | locationService.updateById(toLocationRecord); |
429 | 429 | fromLocationRecord.setContainerCode(""); |
430 | 430 | } |
431 | - fromLocationRecord.setStatus("empty"); | |
431 | + fromLocationRecord.setStatus(QuantityConstant.STATUS_EMPTY); | |
432 | 432 | if (taskType.equals(QuantityConstant.TASK_TYPE_WHOLESHIPMENT)) { |
433 | 433 | fromLocationRecord.setContainerCode(""); |
434 | 434 | } |
... | ... | @@ -445,7 +445,7 @@ public class ShipmentTaskService { |
445 | 445 | throw new ServiceException("删除临时容器失败"); |
446 | 446 | } |
447 | 447 | } else { |
448 | - containerService.updateLocationCodeAndStatus(containerCode, "", "empty"); | |
448 | + containerService.updateLocationCodeAndStatus(containerCode, "", QuantityConstant.STATUS_EMPTY); | |
449 | 449 | } |
450 | 450 | } else { |
451 | 451 | //查询是否存在关联的库存,入如果没有就修改容器状态为empty |
... | ... | @@ -454,9 +454,9 @@ public class ShipmentTaskService { |
454 | 454 | List<InventoryDetail> detailList = inventoryDetailService.list(inventoryDetaillambdaQueryWrapper); |
455 | 455 | //库存查询不到该容器就把容器状态改为可用 |
456 | 456 | if (detailList.isEmpty()) { |
457 | - containerService.updateLocationCodeAndStatus(containerCode, toLocation, "empty"); | |
457 | + containerService.updateLocationCodeAndStatus(containerCode, toLocation, QuantityConstant.STATUS_EMPTY); | |
458 | 458 | } else { |
459 | - containerService.updateLocationCodeAndStatus(containerCode, toLocation, "some"); | |
459 | + containerService.updateLocationCodeAndStatus(containerCode, toLocation, QuantityConstant.STATUS_SOME); | |
460 | 460 | } |
461 | 461 | } |
462 | 462 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -170,7 +170,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
170 | 170 | if (taskHeader == null) { |
171 | 171 | return AjaxResult.error("任务" + taskId + "未找到,操作中止"); |
172 | 172 | } |
173 | - if (taskHeader.getStatus() >= QuantityConstant.TASK_STATUS_RELEASE) { | |
173 | + if (taskHeader.getStatus() > QuantityConstant.TASK_STATUS_RELEASE) { | |
174 | 174 | return AjaxResult.error("存在任务" + taskHeader.getId() + "已下发或执行,操作中止"); |
175 | 175 | } |
176 | 176 | //查出任务明细 |
... | ... | @@ -230,20 +230,20 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
230 | 230 | if (taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_TRANSFER)) { |
231 | 231 | if (taskHeader.getFromLocation() != null) { |
232 | 232 | //更新托盘、库位状态 |
233 | - locationService.updateStatus(taskHeader.getFromLocation(), "empty"); | |
233 | + locationService.updateStatus(taskHeader.getFromLocation(), QuantityConstant.STATUS_EMPTY); | |
234 | 234 | } |
235 | 235 | if (taskHeader.getToLocation() != null) { |
236 | 236 | //更新托盘、库位状态 |
237 | - locationService.updateStatus(taskHeader.getToLocation(), "empty"); | |
237 | + locationService.updateStatus(taskHeader.getToLocation(), QuantityConstant.STATUS_EMPTY); | |
238 | 238 | } |
239 | 239 | LambdaQueryWrapper<InventoryHeader> inventoryHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
240 | 240 | inventoryHeaderLambdaQueryWrapper.eq(InventoryHeader::getContainerCode, taskHeader.getContainerCode()); |
241 | 241 | InventoryHeader inventoryHeader = inventoryHeaderService.getOne(inventoryHeaderLambdaQueryWrapper); |
242 | 242 | Container container = new Container(); |
243 | - container.setStatus("empty"); | |
243 | + container.setStatus(QuantityConstant.STATUS_EMPTY); | |
244 | 244 | if(inventoryHeader != null) { |
245 | - if("some".equals(inventoryHeader.getContainerStatus())) { | |
246 | - container.setStatus("some"); | |
245 | + if(QuantityConstant.STATUS_SOME.equals(inventoryHeader.getContainerStatus())) { | |
246 | + container.setStatus(QuantityConstant.STATUS_SOME); | |
247 | 247 | } |
248 | 248 | } |
249 | 249 | container.setLocationCode(taskHeader.getFromLocation()); |
... | ... | @@ -254,20 +254,20 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
254 | 254 | if (taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_WORK)) { |
255 | 255 | if (taskHeader.getFromLocation() != null) { |
256 | 256 | //更新托盘、库位状态 |
257 | - locationService.updateStatus(taskHeader.getFromLocation(), "empty"); | |
257 | + locationService.updateStatus(taskHeader.getFromLocation(), QuantityConstant.STATUS_EMPTY); | |
258 | 258 | } |
259 | 259 | if (taskHeader.getToLocation() != null) { |
260 | 260 | //更新托盘、库位状态 |
261 | - locationService.updateStatus(taskHeader.getToLocation(), "empty"); | |
261 | + locationService.updateStatus(taskHeader.getToLocation(), QuantityConstant.STATUS_EMPTY); | |
262 | 262 | } |
263 | 263 | LambdaQueryWrapper<InventoryHeader> inventoryHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
264 | 264 | inventoryHeaderLambdaQueryWrapper.eq(InventoryHeader::getContainerCode, taskHeader.getContainerCode()); |
265 | 265 | InventoryHeader inventoryHeader = inventoryHeaderService.getOne(inventoryHeaderLambdaQueryWrapper); |
266 | 266 | Container container = new Container(); |
267 | - container.setStatus("empty"); | |
267 | + container.setStatus(QuantityConstant.STATUS_EMPTY); | |
268 | 268 | if(inventoryHeader != null) { |
269 | - if("some".equals(inventoryHeader.getContainerStatus())) { | |
270 | - container.setStatus("some"); | |
269 | + if(QuantityConstant.STATUS_SOME.equals(inventoryHeader.getContainerStatus())) { | |
270 | + container.setStatus(QuantityConstant.STATUS_SOME); | |
271 | 271 | } |
272 | 272 | } |
273 | 273 | container.setLocationCode(taskHeader.getFromLocation()); |
... | ... | @@ -278,7 +278,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
278 | 278 | if (taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_SHELF) || taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_PICKING)) { |
279 | 279 | if (StringUtils.isNotEmpty(taskHeader.getToLocation()) && taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_SHELF) ) { |
280 | 280 | //更新托盘、库位状态 |
281 | - locationService.updateStatus(taskHeader.getToLocation(), "empty"); | |
281 | + locationService.updateStatus(taskHeader.getToLocation(), QuantityConstant.STATUS_EMPTY); | |
282 | 282 | LambdaQueryWrapper<ReceiptContainerHeader> lambda = Wrappers.lambdaQuery(); |
283 | 283 | lambda.eq(ReceiptContainerHeader::getContainerCode, taskHeader.getContainerCode()) |
284 | 284 | .ne(ReceiptContainerHeader::getStatus, QuantityConstant.RECEIPT_CONTAINER_FINISHED) |
... | ... | @@ -298,16 +298,16 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
298 | 298 | } |
299 | 299 | if (StringUtils.isNotEmpty(taskHeader.getFromLocation())) { |
300 | 300 | //更新托盘、库位状态 |
301 | - locationService.updateStatus(taskHeader.getFromLocation(), "empty"); | |
301 | + locationService.updateStatus(taskHeader.getFromLocation(), QuantityConstant.STATUS_EMPTY); | |
302 | 302 | } |
303 | 303 | LambdaQueryWrapper<InventoryHeader> inventoryHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
304 | 304 | inventoryHeaderLambdaQueryWrapper.eq(InventoryHeader::getContainerCode, taskHeader.getContainerCode()); |
305 | 305 | InventoryHeader inventoryHeader = inventoryHeaderService.getOne(inventoryHeaderLambdaQueryWrapper); |
306 | 306 | Container container = new Container(); |
307 | - container.setStatus("empty"); | |
307 | + container.setStatus(QuantityConstant.STATUS_EMPTY); | |
308 | 308 | if(inventoryHeader != null) { |
309 | - if("some".equals(inventoryHeader.getContainerStatus())) { | |
310 | - container.setStatus("some"); | |
309 | + if(QuantityConstant.STATUS_SOME.equals(inventoryHeader.getContainerStatus())) { | |
310 | + container.setStatus(QuantityConstant.STATUS_SOME); | |
311 | 311 | } |
312 | 312 | } |
313 | 313 | LambdaUpdateWrapper<Container> containerUpdateWrapper = Wrappers.lambdaUpdate(); |
... | ... | @@ -341,7 +341,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
341 | 341 | |
342 | 342 | AjaxResult ajaxResult = taskAssignService.wcsTaskAssign(task); |
343 | 343 | if(ajaxResult != null && ajaxResult.hasErr()) { |
344 | - return AjaxResult.error(ajaxResult.getMessage()); | |
344 | + return AjaxResult.error(ajaxResult.getMsg()); | |
345 | 345 | } |
346 | 346 | |
347 | 347 | |
... | ... | @@ -646,7 +646,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
646 | 646 | } |
647 | 647 | header.setTotalQty(totalQty); |
648 | 648 | header.setTotalLines(totalLines); |
649 | - header.setContainerStatus("some"); | |
649 | + header.setContainerStatus(QuantityConstant.STATUS_SOME); | |
650 | 650 | LambdaQueryWrapper<InventoryHeader> wrapper = Wrappers.lambdaQuery(); |
651 | 651 | wrapper.eq(InventoryHeader::getId, header.getId()); |
652 | 652 | inventoryHeaderService.update(header, wrapper); |
... | ... | @@ -728,7 +728,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
728 | 728 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); |
729 | 729 | locationLambdaQueryWrapper.eq(Location::getWarehouseCode,ShiroUtils.getWarehouseCode()) |
730 | 730 | .eq(Location::getContainerCode,"") |
731 | - .eq(Location::getStatus,"empty") | |
731 | + .eq(Location::getStatus,QuantityConstant.STATUS_EMPTY) | |
732 | 732 | .eq(Location::getDeleted,false); |
733 | 733 | |
734 | 734 | List<Location> locations = locationService.list(locationLambdaQueryWrapper); |
... | ... | @@ -742,7 +742,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
742 | 742 | throw new ServiceException("库位分配错误!"); |
743 | 743 | } |
744 | 744 | //锁定库位 |
745 | - locationService.updateStatus(location.getCode(),"lock"); | |
745 | + locationService.updateStatus(location.getCode(), QuantityConstant.STATUS_LOCK); | |
746 | 746 | //给组盘分配库位 |
747 | 747 | |
748 | 748 | int internalTaskType = taskHeader.getInternalTaskType(); |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TransferTaskService.java
... | ... | @@ -64,7 +64,7 @@ public class TransferTaskService { |
64 | 64 | if (StringUtils.isNull(sourceLocation)) { |
65 | 65 | return AjaxResult.error("源库位:" + sourceLocation + "未找到"); |
66 | 66 | } |
67 | - if (!"empty".equals(sourceLocation.getStatus())) { | |
67 | + if (!QuantityConstant.STATUS_EMPTY.equals(sourceLocation.getStatus())) { | |
68 | 68 | return AjaxResult.error("源库位:" + sourceLocation + "状态非空闲"); |
69 | 69 | } |
70 | 70 | if (StringUtils.isEmpty(sourceLocation.getContainerCode())) { |
... | ... | @@ -81,7 +81,7 @@ public class TransferTaskService { |
81 | 81 | if (StringUtils.isNull(desLocation)) { |
82 | 82 | return AjaxResult.error("目标库位:" + desLocationCode + "未找到"); |
83 | 83 | } |
84 | - if (!"empty".equals(desLocation.getStatus())) { | |
84 | + if (!QuantityConstant.STATUS_EMPTY.equals(desLocation.getStatus())) { | |
85 | 85 | return AjaxResult.error("目标库位:" + desLocationCode + "状态非空闲"); |
86 | 86 | } |
87 | 87 | if (StringUtils.isNotEmpty(desLocation.getContainerCode())) { |
... | ... | @@ -132,9 +132,9 @@ public class TransferTaskService { |
132 | 132 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); |
133 | 133 | taskHeader.setPreTaskNo(preTaskNo); |
134 | 134 | if (taskHeaderService.save(taskHeader)) { |
135 | - locationService.updateStatus(sourceLocationCode, "lock"); | |
136 | - locationService.updateStatus(desLocationCode, "lock"); | |
137 | - containerService.updateLocationCodeAndStatus(sourceLocation.getContainerCode(), sourceLocationCode, "lock"); | |
135 | + locationService.updateStatus(sourceLocationCode, QuantityConstant.STATUS_LOCK); | |
136 | + locationService.updateStatus(desLocationCode, QuantityConstant.STATUS_LOCK); | |
137 | + containerService.updateLocationCodeAndStatus(sourceLocation.getContainerCode(), sourceLocationCode, QuantityConstant.STATUS_LOCK); | |
138 | 138 | } else { |
139 | 139 | throw new ServiceException("创建任务失败"); |
140 | 140 | } |
... | ... | @@ -226,9 +226,9 @@ public class TransferTaskService { |
226 | 226 | if (!taskHeaderService.saveOrUpdate(taskHeader)) { |
227 | 227 | throw new ServiceException("任务单据状态更新失败!"); |
228 | 228 | } |
229 | - locationService.updateContainerCodeAndStatus(taskHeader.getFromLocation(), "", "empty"); | |
230 | - locationService.updateContainerCodeAndStatus(taskHeader.getToLocation(), taskHeader.getContainerCode(), "empty"); | |
231 | - containerService.updateLocationCodeAndStatus(taskHeader.getContainerCode(), taskHeader.getToLocation(), "some"); | |
229 | + locationService.updateContainerCodeAndStatus(taskHeader.getFromLocation(), "", QuantityConstant.STATUS_EMPTY); | |
230 | + locationService.updateContainerCodeAndStatus(taskHeader.getToLocation(), taskHeader.getContainerCode(), QuantityConstant.STATUS_EMPTY); | |
231 | + containerService.updateLocationCodeAndStatus(taskHeader.getContainerCode(), taskHeader.getToLocation(), QuantityConstant.STATUS_SOME); | |
232 | 232 | inventoryHeadIdList = inventoryHeadIdList.stream().distinct().collect(Collectors.toList()); |
233 | 233 | LambdaUpdateWrapper<InventoryHeader> headerUpdateWrapper = Wrappers.lambdaUpdate(); |
234 | 234 | headerUpdateWrapper.set(InventoryHeader::getLocationCode, taskHeader.getToLocation()) |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/WorkTaskService.java
... | ... | @@ -82,7 +82,7 @@ public class WorkTaskService { |
82 | 82 | if (StringUtils.isNotEmpty(location.getContainerCode())) { |
83 | 83 | return AjaxResult.error(destinationLocation+"上已存在容器"+location.getContainerCode()); |
84 | 84 | } |
85 | - if (!"empty".equals(location.getStatus())) { | |
85 | + if (!QuantityConstant.STATUS_EMPTY.equals(location.getStatus())) { | |
86 | 86 | return AjaxResult.error("目标库位非空闲"); |
87 | 87 | } |
88 | 88 | } |
... | ... | @@ -124,7 +124,7 @@ public class WorkTaskService { |
124 | 124 | } |
125 | 125 | LambdaUpdateWrapper<Container> containerUpdateWrapper = Wrappers.lambdaUpdate(); |
126 | 126 | containerUpdateWrapper.eq(Container::getCode, container.getCode()) |
127 | - .set(Container::getStatus, "lock"); | |
127 | + .set(Container::getStatus, QuantityConstant.STATUS_LOCK); | |
128 | 128 | if (!containerService.update(container, containerUpdateWrapper)) { |
129 | 129 | throw new ServiceException("容器状态更新失败"); |
130 | 130 | } |
... | ... | @@ -141,7 +141,7 @@ public class WorkTaskService { |
141 | 141 | if(taskHeaderService.save(taskHeader)){ |
142 | 142 | //锁定库位状态 |
143 | 143 | if(StringUtils.isNotEmpty(destinationLocation)) { |
144 | - locationService.updateStatus(destinationLocation, "lock"); | |
144 | + locationService.updateStatus(destinationLocation, QuantityConstant.STATUS_LOCK); | |
145 | 145 | } |
146 | 146 | } else { |
147 | 147 | throw new ServiceException("空托入库主表生成失败!"); |
... | ... | @@ -162,7 +162,7 @@ public class WorkTaskService { |
162 | 162 | } |
163 | 163 | //锁库位 |
164 | 164 | if (StringUtils.isNotEmpty(destinationLocation)) { |
165 | - locationService.updateStatus(destinationLocation, "lock"); | |
165 | + locationService.updateStatus(destinationLocation, QuantityConstant.STATUS_LOCK); | |
166 | 166 | } |
167 | 167 | return AjaxResult.success(taskHeader.getId()); |
168 | 168 | } |
... | ... | @@ -190,7 +190,7 @@ public class WorkTaskService { |
190 | 190 | if (StringUtils.isNull(container)) { |
191 | 191 | return AjaxResult.error(containerCode+"容器不存在"); |
192 | 192 | } |
193 | - if (!"empty".equals(container.getStatus())) { | |
193 | + if (!QuantityConstant.STATUS_EMPTY.equals(container.getStatus())) { | |
194 | 194 | return AjaxResult.error(containerCode+"容器状态不为空,不能执行空托出库"); |
195 | 195 | } |
196 | 196 | if (StringUtils.isEmpty(container.getLocationCode())) { |
... | ... | @@ -215,7 +215,7 @@ public class WorkTaskService { |
215 | 215 | if (StringUtils.isNull(location)) { |
216 | 216 | return AjaxResult.error(sourceLocation+"库位不存在"); |
217 | 217 | } |
218 | - if (!"empty".equals(location.getStatus())) { | |
218 | + if (!QuantityConstant.STATUS_EMPTY.equals(location.getStatus())) { | |
219 | 219 | return AjaxResult.error(location.getCode()+"库位状态不为空闲不能执行出库"); |
220 | 220 | } |
221 | 221 | if (StringUtils.isEmpty(location.getContainerCode())) { |
... | ... | @@ -247,11 +247,11 @@ public class WorkTaskService { |
247 | 247 | taskHeader.setStationCode(stationCode); |
248 | 248 | if(taskHeaderService.save(taskHeader)){ |
249 | 249 | //锁定库位状态 |
250 | - locationService.updateStatus(locationCode,"lock"); | |
250 | + locationService.updateStatus(locationCode,QuantityConstant.STATUS_LOCK); | |
251 | 251 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
252 | 252 | containerLambdaQueryWrapper.eq(Container::getCode, conCode); |
253 | 253 | Container container = containerService.getOne(containerLambdaQueryWrapper); |
254 | - container.setStatus("lock"); | |
254 | + container.setStatus(QuantityConstant.STATUS_LOCK); | |
255 | 255 | containerService.update(container, containerLambdaQueryWrapper); |
256 | 256 | } else { |
257 | 257 | throw new ServiceException("空托出库主表生成失败!"); |
... | ... | @@ -289,9 +289,9 @@ public class WorkTaskService { |
289 | 289 | } |
290 | 290 | |
291 | 291 | //解锁容器,更新库位 |
292 | - containerService.updateLocationCodeAndStatus(taskHeader.getContainerCode(), taskHeader.getToLocation(), "empty"); | |
292 | + containerService.updateLocationCodeAndStatus(taskHeader.getContainerCode(), taskHeader.getToLocation(), QuantityConstant.STATUS_EMPTY); | |
293 | 293 | //解锁库位,更新容器 |
294 | - locationService.updateContainerCodeAndStatus(taskHeader.getToLocation(), taskHeader.getContainerCode(), "empty"); | |
294 | + locationService.updateContainerCodeAndStatus(taskHeader.getToLocation(), taskHeader.getContainerCode(), QuantityConstant.STATUS_EMPTY); | |
295 | 295 | return AjaxResult.success(); |
296 | 296 | } |
297 | 297 | |
... | ... | @@ -311,9 +311,9 @@ public class WorkTaskService { |
311 | 311 | throw new ServiceException("任务单据状态更新失败!"); |
312 | 312 | } |
313 | 313 | //解锁容器,更新库位 |
314 | - containerService.updateLocationCodeAndStatus(taskHeader.getContainerCode(), "", "empty"); | |
314 | + containerService.updateLocationCodeAndStatus(taskHeader.getContainerCode(), "", QuantityConstant.STATUS_EMPTY); | |
315 | 315 | //解锁库位,更新容器 |
316 | - locationService.updateContainerCodeAndStatus(taskHeader.getFromLocation(), "", "empty"); | |
316 | + locationService.updateContainerCodeAndStatus(taskHeader.getFromLocation(), "", QuantityConstant.STATUS_EMPTY); | |
317 | 317 | return AjaxResult.success(); |
318 | 318 | } |
319 | 319 | |
... | ... | @@ -328,7 +328,7 @@ public class WorkTaskService { |
328 | 328 | if (StringUtils.isNull(location)) { |
329 | 329 | throw new ServiceException("库存没有库位!"); |
330 | 330 | } |
331 | - if (!"empty".equals(location.getStatus())) { | |
331 | + if (!QuantityConstant.STATUS_EMPTY.equals(location.getStatus())) { | |
332 | 332 | throw new ServiceException(locationCode+"状态非空闲,操作失败"); |
333 | 333 | } |
334 | 334 | if (StringUtils.isEmpty(location.getContainerCode())) { |
... | ... | @@ -374,8 +374,8 @@ public class WorkTaskService { |
374 | 374 | } |
375 | 375 | } |
376 | 376 | |
377 | - locationService.updateStatus(locationCode, "lock"); | |
378 | - containerService.updateLocationCodeAndStatus(location.getContainerCode(), location.getCode(), "lock"); | |
377 | + locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCK); | |
378 | + containerService.updateLocationCodeAndStatus(location.getContainerCode(), location.getCode(), QuantityConstant.STATUS_LOCK); | |
379 | 379 | } |
380 | 380 | return AjaxResult.success(); |
381 | 381 | } |
... | ... | @@ -413,15 +413,15 @@ public class WorkTaskService { |
413 | 413 | !taskHeaderService.saveOrUpdate(taskHeader)) { |
414 | 414 | throw new ServiceException("任务单据状态更新失败!"); |
415 | 415 | } |
416 | - locationService.updateContainerCodeAndStatus(taskHeader.getFromLocation(), "","empty"); | |
416 | + locationService.updateContainerCodeAndStatus(taskHeader.getFromLocation(), "",QuantityConstant.STATUS_EMPTY); | |
417 | 417 | |
418 | - locationService.updateContainerCodeAndStatus(taskHeader.getToLocation(), taskHeader.getContainerCode(), "empty"); | |
418 | + locationService.updateContainerCodeAndStatus(taskHeader.getToLocation(), taskHeader.getContainerCode(), QuantityConstant.STATUS_EMPTY); | |
419 | 419 | Container container = containerService.findAllByCode(taskHeader.getContainerCode()); |
420 | 420 | container.setLocationCode(taskHeader.getToLocation()); |
421 | 421 | if (StringUtils.isEmpty(container.getLocationCode())) { |
422 | - container.setStatus("empty"); | |
422 | + container.setStatus(QuantityConstant.STATUS_EMPTY); | |
423 | 423 | } else { |
424 | - container.setStatus("some"); | |
424 | + container.setStatus(QuantityConstant.STATUS_SOME); | |
425 | 425 | } |
426 | 426 | if (!containerService.updateById(container)) { |
427 | 427 | throw new ServiceException("更新容器状态失败"); |
... | ... | @@ -447,7 +447,7 @@ public class WorkTaskService { |
447 | 447 | } |
448 | 448 | } |
449 | 449 | |
450 | - if ("some".equals(container.getStatus())) { | |
450 | + if (QuantityConstant.STATUS_SOME.equals(container.getStatus())) { | |
451 | 451 | LambdaUpdateWrapper<InventoryDetail> queryWrapper = Wrappers.lambdaUpdate(); |
452 | 452 | queryWrapper.eq(InventoryDetail::getLocationCode, taskHeader.getToLocation()) |
453 | 453 | .eq(InventoryDetail::getContainerCode, taskHeader.getContainerCode()) |
... | ... | @@ -478,7 +478,7 @@ public class WorkTaskService { |
478 | 478 | if (StringUtils.isNull(container)) { |
479 | 479 | return AjaxResult.error(containerCode+"容器不存在"); |
480 | 480 | } |
481 | - if (!"empty".equals(container.getStatus())) { | |
481 | + if (!QuantityConstant.STATUS_EMPTY.equals(container.getStatus())) { | |
482 | 482 | return AjaxResult.error(containerCode+"容器状态不为空,不能执行空托出库"); |
483 | 483 | } |
484 | 484 | if (StringUtils.isEmpty(container.getLocationCode())) { |
... | ... | @@ -503,7 +503,7 @@ public class WorkTaskService { |
503 | 503 | if (StringUtils.isNull(location)) { |
504 | 504 | return AjaxResult.error(sourceLocation+"库位不存在"); |
505 | 505 | } |
506 | - if (!"empty".equals(location.getStatus())) { | |
506 | + if (!QuantityConstant.STATUS_EMPTY.equals(location.getStatus())) { | |
507 | 507 | return AjaxResult.error(location.getCode()+"库位状态不为空闲不能执行出库"); |
508 | 508 | } |
509 | 509 | if (StringUtils.isEmpty(location.getContainerCode())) { |
... | ... | @@ -533,8 +533,8 @@ public class WorkTaskService { |
533 | 533 | taskHeader.setToLocation(locationCode); |
534 | 534 | if(taskHeaderService.save(taskHeader)){ |
535 | 535 | //锁定库位状态 |
536 | - locationService.updateStatus(locationCode,"lock"); | |
537 | - containerService.updateStatus(containerCode, "lock"); | |
536 | + locationService.updateStatus(locationCode,QuantityConstant.STATUS_LOCK); | |
537 | + containerService.updateStatus(containerCode, QuantityConstant.STATUS_LOCK); | |
538 | 538 | } else { |
539 | 539 | throw new ServiceException("空托出库主表生成失败!"); |
540 | 540 | } |
... | ... |
src/main/resources/static/huaheng/js/huahengUI.js
... | ... | @@ -165,7 +165,7 @@ var table = { |
165 | 165 | if (res.code == 200) { |
166 | 166 | return {rows: res.data, total: res.total}; |
167 | 167 | } else { |
168 | - $.modal.alertWarning(res.message); | |
168 | + $.modal.alertWarning(res.msg); | |
169 | 169 | return {rows: [], total: 0}; |
170 | 170 | } |
171 | 171 | }, |
... | ... | @@ -335,9 +335,9 @@ var table = { |
335 | 335 | $.modal.loading("正在导出数据,请稍后..."); |
336 | 336 | $.post(table.options.exportUrl, $("#" + currentId).serializeArray(), function (result) { |
337 | 337 | if (result.code == web_status.SUCCESS) { |
338 | - window.location.href = ctx + "common/download?fileName=" + result.message + "&delete=" + true; | |
338 | + window.location.href = ctx + "common/download?fileName=" + result.msg + "&delete=" + true; | |
339 | 339 | } else { |
340 | - $.modal.alertError(result.message); | |
340 | + $.modal.alertError(result.msg); | |
341 | 341 | } |
342 | 342 | $.modal.closeLoading(); |
343 | 343 | }); |
... | ... | @@ -346,11 +346,11 @@ var table = { |
346 | 346 | importTemplate: function () { |
347 | 347 | $.get($.table._option.importTemplateUrl, function (result) { |
348 | 348 | if (result.code == web_status.SUCCESS) { |
349 | - window.location.href = ctx + "common/download?fileName=" + encodeURI(result.message) + "&delete=" + true; | |
349 | + window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; | |
350 | 350 | } else if (result.code == web_status.WARNING) { |
351 | - $.modal.alertWarning(result.message) | |
351 | + $.modal.alertWarning(result.msg) | |
352 | 352 | } else { |
353 | - $.modal.alertError(result.message); | |
353 | + $.modal.alertError(result.msg); | |
354 | 354 | } |
355 | 355 | }); |
356 | 356 | }, |
... | ... | @@ -390,16 +390,16 @@ var table = { |
390 | 390 | success: function (result) { |
391 | 391 | if (result.code == web_status.SUCCESS) { |
392 | 392 | $.modal.closeAll(); |
393 | - $.modal.alertSuccess(result.message); | |
393 | + $.modal.alertSuccess(result.msg); | |
394 | 394 | $.table.refresh(); |
395 | 395 | } else if (result.code == web_status.WARNING) { |
396 | 396 | layer.close(index); |
397 | 397 | $.modal.enable(); |
398 | - $.modal.alertWarning(result.message) | |
398 | + $.modal.alertWarning(result.msg) | |
399 | 399 | } else { |
400 | 400 | layer.close(index); |
401 | 401 | $.modal.enable(); |
402 | - $.modal.alertError(result.message); | |
402 | + $.modal.alertError(result.msg); | |
403 | 403 | } |
404 | 404 | } |
405 | 405 | }); |
... | ... | @@ -518,57 +518,57 @@ var table = { |
518 | 518 | return actions.join(''); |
519 | 519 | }, |
520 | 520 | // 导入数据 |
521 | -/* importExcel: function (formId) { | |
522 | - var currentId = $.common.isEmpty(formId) ? 'importTpl' : formId; | |
523 | - layer.open({ | |
524 | - type: 1, | |
525 | - area: ['400px', '230px'], | |
526 | - fix: false, | |
527 | - //不固定 | |
528 | - maxmin: true, | |
529 | - shade: 0.3, | |
530 | - title: '导入' + $.table._option.modalName + '数据', | |
531 | - content: $('#' + currentId).html(), | |
532 | - btn: ['<i class="fa fa-check"></i> 导入', '<i class="fa fa-remove"></i> 取消'], | |
533 | - // 弹层外区域关闭 | |
534 | - shadeClose: true, | |
535 | - btn1: function (index, layero) { | |
536 | - var file = layero.find('#file').val(); | |
537 | - if (file == '' || (!$.common.endWith(file, '.xls') && !$.common.endWith(file, '.xlsx'))) { | |
538 | - $.modal.msgWarning("请选择后缀为 “xls”或“xlsx”的文件。"); | |
539 | - return false; | |
540 | - } | |
541 | - var index = layer.load(2, {shade: false}); | |
542 | - $.modal.disable(); | |
543 | - var formData = new FormData(); | |
544 | - formData.append("file", $('#file')[0].files[0]); | |
545 | - formData.append("updateSupport", $("input[name='updateSupport']").is(':checked')); | |
546 | - $.ajax({ | |
547 | - url: $.table._option.importUrl, | |
548 | - data: formData, | |
549 | - cache: false, | |
550 | - contentType: false, | |
551 | - processData: false, | |
552 | - type: 'POST', | |
553 | - success: function (result) { | |
554 | - if (result.code == web_status.SUCCESS) { | |
555 | - $.modal.closeAll(); | |
556 | - $.modal.alertSuccess(result.msg); | |
557 | - $.table.refresh(); | |
558 | - } else if (result.code == web_status.WARNING) { | |
559 | - layer.close(index); | |
560 | - $.modal.enable(); | |
561 | - $.modal.alertWarning(result.msg) | |
562 | - } else { | |
563 | - layer.close(index); | |
564 | - $.modal.enable(); | |
565 | - $.modal.alertError(result.msg); | |
521 | + /* importExcel: function (formId) { | |
522 | + var currentId = $.common.isEmpty(formId) ? 'importTpl' : formId; | |
523 | + layer.open({ | |
524 | + type: 1, | |
525 | + area: ['400px', '230px'], | |
526 | + fix: false, | |
527 | + //不固定 | |
528 | + maxmin: true, | |
529 | + shade: 0.3, | |
530 | + title: '导入' + $.table._option.modalName + '数据', | |
531 | + content: $('#' + currentId).html(), | |
532 | + btn: ['<i class="fa fa-check"></i> 导入', '<i class="fa fa-remove"></i> 取消'], | |
533 | + // 弹层外区域关闭 | |
534 | + shadeClose: true, | |
535 | + btn1: function (index, layero) { | |
536 | + var file = layero.find('#file').val(); | |
537 | + if (file == '' || (!$.common.endWith(file, '.xls') && !$.common.endWith(file, '.xlsx'))) { | |
538 | + $.modal.msgWarning("请选择后缀为 “xls”或“xlsx”的文件。"); | |
539 | + return false; | |
540 | + } | |
541 | + var index = layer.load(2, {shade: false}); | |
542 | + $.modal.disable(); | |
543 | + var formData = new FormData(); | |
544 | + formData.append("file", $('#file')[0].files[0]); | |
545 | + formData.append("updateSupport", $("input[name='updateSupport']").is(':checked')); | |
546 | + $.ajax({ | |
547 | + url: $.table._option.importUrl, | |
548 | + data: formData, | |
549 | + cache: false, | |
550 | + contentType: false, | |
551 | + processData: false, | |
552 | + type: 'POST', | |
553 | + success: function (result) { | |
554 | + if (result.code == web_status.SUCCESS) { | |
555 | + $.modal.closeAll(); | |
556 | + $.modal.alertSuccess(result.msg); | |
557 | + $.table.refresh(); | |
558 | + } else if (result.code == web_status.WARNING) { | |
559 | + layer.close(index); | |
560 | + $.modal.enable(); | |
561 | + $.modal.alertWarning(result.msg) | |
562 | + } else { | |
563 | + layer.close(index); | |
564 | + $.modal.enable(); | |
565 | + $.modal.alertError(result.msg); | |
566 | + } | |
567 | + } | |
568 | + }); | |
566 | 569 | } |
567 | - } | |
568 | - }); | |
569 | - } | |
570 | - }); | |
571 | - },*/ | |
570 | + }); | |
571 | + },*/ | |
572 | 572 | // 显示表格指定列 |
573 | 573 | showColumn: function (column, tableId) { |
574 | 574 | var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId; |
... | ... | @@ -648,7 +648,7 @@ var table = { |
648 | 648 | table.options.responseHandler(res); |
649 | 649 | } |
650 | 650 | if (res.code != undefined && res.code != 0) { |
651 | - $.modal.alertWarning(res.message); | |
651 | + $.modal.alertWarning(res.msg); | |
652 | 652 | return []; |
653 | 653 | } else { |
654 | 654 | return res; |
... | ... | @@ -950,10 +950,10 @@ var table = { |
950 | 950 | data: data, |
951 | 951 | success: function (result) { |
952 | 952 | if (result.code == web_status.SUCCESS) { |
953 | - $.modal.msgSuccess(result.message); | |
953 | + $.modal.msgSuccess(result.msg); | |
954 | 954 | callback(); |
955 | 955 | } else { |
956 | - $.modal.alertError(result.message); | |
956 | + $.modal.alertError(result.msg); | |
957 | 957 | } |
958 | 958 | $.modal.closeLoading(); |
959 | 959 | } |
... | ... | @@ -1131,11 +1131,11 @@ var table = { |
1131 | 1131 | callback(result); |
1132 | 1132 | } |
1133 | 1133 | if (result.code == web_status.SUCCESS) { |
1134 | - $.modal.alertSuccess(result.message) | |
1134 | + $.modal.alertSuccess(result.msg) | |
1135 | 1135 | } else if (result.code == web_status.WARNING) { |
1136 | - $.modal.alertWarning(result.message) | |
1136 | + $.modal.alertWarning(result.msg) | |
1137 | 1137 | } else { |
1138 | - $.modal.alertError(result.message); | |
1138 | + $.modal.alertError(result.msg); | |
1139 | 1139 | } |
1140 | 1140 | $.modal.closeLoading(); |
1141 | 1141 | } |
... | ... | @@ -1165,10 +1165,10 @@ var table = { |
1165 | 1165 | // 保存结果弹出msg刷新table表格 |
1166 | 1166 | ajaxSuccess: function (result) { |
1167 | 1167 | if (result.code == web_status.SUCCESS) { |
1168 | - $.modal.msgSuccess(result.message); | |
1168 | + $.modal.msgSuccess(result.msg); | |
1169 | 1169 | $.table.refresh(); |
1170 | 1170 | } else { |
1171 | - $.modal.alertError(result.message); | |
1171 | + $.modal.alertError(result.msg); | |
1172 | 1172 | } |
1173 | 1173 | $.modal.closeLoading(); |
1174 | 1174 | }, |
... | ... | @@ -1177,7 +1177,7 @@ var table = { |
1177 | 1177 | if (result.code == web_status.SUCCESS) { |
1178 | 1178 | $.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS); |
1179 | 1179 | } else { |
1180 | - $.modal.alertError(result.message); | |
1180 | + $.modal.alertError(result.msg); | |
1181 | 1181 | } |
1182 | 1182 | $.modal.closeLoading(); |
1183 | 1183 | }, |
... | ... | @@ -1188,7 +1188,7 @@ var table = { |
1188 | 1188 | var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-panel'); |
1189 | 1189 | var $contentWindow = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0].contentWindow; |
1190 | 1190 | $.modal.close(); |
1191 | - $contentWindow.$.modal.msgSuccess(result.message); | |
1191 | + $contentWindow.$.modal.msgSuccess(result.msg); | |
1192 | 1192 | $contentWindow.$(".layui-layer-padding").removeAttr("style"); |
1193 | 1193 | if ($contentWindow.table.options.type == table_type.bootstrapTable) { |
1194 | 1194 | $contentWindow.$.table.refresh(); |
... | ... | @@ -1197,9 +1197,9 @@ var table = { |
1197 | 1197 | } |
1198 | 1198 | $.modal.closeTab(); |
1199 | 1199 | } else if (result.code == web_status.WARNING) { |
1200 | - $.modal.alertWarning(result.message) | |
1200 | + $.modal.alertWarning(result.msg) | |
1201 | 1201 | } else { |
1202 | - $.modal.alertError(result.message); | |
1202 | + $.modal.alertError(result.msg); | |
1203 | 1203 | } |
1204 | 1204 | $.modal.closeLoading(); |
1205 | 1205 | } |
... | ... |
src/main/resources/templates/config/location/addBatch.html
... | ... | @@ -65,12 +65,12 @@ |
65 | 65 | <input id="roadway" name="roadway" class="form-control" type="text"> |
66 | 66 | </div> |
67 | 67 | </div> |
68 | - <div class="form-group"> | |
69 | - <label class="col-sm-3 control-label">区域:</label> | |
70 | - <div class="col-sm-8"> | |
71 | - <input id="area" name="area" class="form-control" type="text"> | |
72 | - </div> | |
73 | - </div> | |
68 | +<!-- <div class="form-group">--> | |
69 | +<!-- <label class="col-sm-3 control-label">区域:</label>--> | |
70 | +<!-- <div class="col-sm-8">--> | |
71 | +<!-- <input id="area" name="area" class="form-control" type="text">--> | |
72 | +<!-- </div>--> | |
73 | +<!-- </div>--> | |
74 | 74 | <div class="form-group"> |
75 | 75 | <label class="col-sm-3 control-label">高低位:</label> |
76 | 76 | <div class="col-sm-8"> |
... | ... | @@ -159,10 +159,6 @@ |
159 | 159 | required:true, |
160 | 160 | digits:true |
161 | 161 | }, |
162 | - area:{ | |
163 | - required:true, | |
164 | - digits:true | |
165 | - }, | |
166 | 162 | locationType:{ |
167 | 163 | required:true |
168 | 164 | }, |
... | ... | @@ -187,7 +183,6 @@ |
187 | 183 | "firstGrid": $("input[name='firstGrid']").val(), |
188 | 184 | "lastGrid": $("input[name='lastGrid']").val(), |
189 | 185 | "roadway": $("input[name='roadway']").val(), |
190 | - "area": $("input[name='area']").val(), | |
191 | 186 | "locationType": $("#locationType option:selected").val(), |
192 | 187 | "zoneCode": $("#zone option:selected").attr("code"), |
193 | 188 | "status" : $("#status option:selected").val(), |
... | ... |