Commit 64b9032a0300602fa46c069f3834f1387dc993a4
Merge remote-tracking branch 'origin/develop' into develop
Showing
13 changed files
with
130 additions
and
102 deletions
pom.xml
... | ... | @@ -62,11 +62,6 @@ |
62 | 62 | <!-- net.sf.jasperreports.engine.JRException: Error printing report.--> |
63 | 63 | <!--IReport模板--> |
64 | 64 | <!--QRCode begin--> |
65 | - <dependency> | |
66 | - <groupId>org.webjars</groupId> | |
67 | - <artifactId>jquery</artifactId> | |
68 | - <version>3.1.1-1</version> | |
69 | - </dependency> | |
70 | 65 | |
71 | 66 | <dependency> |
72 | 67 | <groupId>com.google.zxing</groupId> |
... | ... |
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.getMsg()); | |
91 | + return AjaxResult.error(checkReceiptHeaderResult.getMessage()); | |
92 | 92 | } |
93 | 93 | |
94 | 94 | /* 3.step 检查入库明细合法性*/ |
95 | 95 | AjaxResult checkReceiptDetailResult = checkReceiptDetail(receiptDetails); |
96 | 96 | if (checkReceiptDetailResult.hasErr() ){ |
97 | - return AjaxResult.error(checkReceiptDetailResult.getMsg()); | |
97 | + return AjaxResult.error(checkReceiptDetailResult.getMessage()); | |
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.getMsg()); | |
80 | + return AjaxResult.error(checkReceiptHeaderResult.getMessage()); | |
81 | 81 | } |
82 | 82 | |
83 | 83 | /* 3.step 检查入库明细合法性*/ |
84 | 84 | AjaxResult checkReceiptDetailResult = checkReceiptDetail(receiptDetails); |
85 | 85 | if (checkReceiptDetailResult.hasErr() ){ |
86 | - return AjaxResult.error(checkReceiptDetailResult.getMsg()); | |
86 | + return AjaxResult.error(checkReceiptDetailResult.getMessage()); | |
87 | 87 | } |
88 | 88 | |
89 | 89 | /* 4.step 计算入库明细总行数、总数量*/ |
... | ... |
src/main/java/com/huaheng/api/wcs/domain/WcsTask.java
src/main/java/com/huaheng/api/wcs/service/taskAssignService/TaskAssignServiceImpl.java
... | ... | @@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
6 | 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
7 | 7 | import com.huaheng.api.wcs.domain.TaskDetails; |
8 | 8 | import com.huaheng.api.wcs.domain.WcsTask; |
9 | +import com.huaheng.common.constant.HttpConstant; | |
10 | +import com.huaheng.common.constant.QuantityConstant; | |
9 | 11 | import com.huaheng.common.exception.service.ServiceException; |
10 | 12 | import com.huaheng.common.support.Convert; |
11 | 13 | import com.huaheng.common.utils.StringUtils; |
... | ... | @@ -107,31 +109,44 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
107 | 109 | // wcsTask.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
108 | 110 | wcsTask.setTaskNo(taskHeader.getId().toString()); |
109 | 111 | wcsTask.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
110 | - wcsTask.setTaskType(taskHeader.getTaskType().toString()); | |
112 | + wcsTask.setTaskType(taskHeader.getTaskType()); | |
111 | 113 | wcsTask.setFromPort(""); |
112 | 114 | wcsTask.setToPort(taskHeader.getStationCode()); |
113 | 115 | |
114 | 116 | wcsTask.setContainerCode(taskHeader.getContainerCode()); |
115 | 117 | Location location; |
116 | - if ( "300".equals(wcsTask.getTaskType()) || "600".equals(wcsTask.getTaskType())){ | |
117 | - location = locationService.findLocationByCode(taskHeader.getFromLocation()); | |
118 | - } else if("200".equals(wcsTask.getTaskType()) || "400".equals(wcsTask.getTaskType()) || "900".equals(wcsTask.getTaskType())) { | |
119 | - location = locationService.findLocationByCode(taskHeader.getFromLocation()); | |
120 | - } else if ("800".equals(wcsTask.getTaskType())){ | |
121 | - location = locationService.findLocationByCode(taskHeader.getToLocation()); | |
122 | - } else { | |
123 | - location = locationService.findLocationByCode(taskHeader.getToLocation()); | |
118 | + switch(wcsTask.getTaskType().intValue()) { | |
119 | + case QuantityConstant.TASK_TYPE_WHOLESHIPMENT: | |
120 | + case QuantityConstant.TASK_TYPE_EMPTYSHIPMENT: | |
121 | + case QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT: | |
122 | + case QuantityConstant.TASK_TYPE_SORTINGSHIPMENT: | |
123 | + case QuantityConstant.TASK_TYPE_VIEW: | |
124 | + case QuantityConstant.TASK_TYPE_CYCLECOUNT: | |
125 | + location = locationService.findLocationByCode(taskHeader.getFromLocation()); | |
126 | + break; | |
127 | + case QuantityConstant.TASK_TYPE_TRANSFER: | |
128 | + case QuantityConstant.TASK_TYPE_WHOLERECEIPT: | |
129 | + case QuantityConstant.TASK_TYPE_EMPTYRECEIPT: | |
130 | + location = locationService.findLocationByCode(taskHeader.getToLocation()); | |
131 | + break; | |
132 | + default: | |
133 | + location = locationService.findLocationByCode(taskHeader.getToLocation()); | |
134 | + break; | |
124 | 135 | } |
125 | - | |
126 | - if ("200".equals(wcsTask.getTaskType()) || "300".equals(wcsTask.getTaskType()) || "400".equals(wcsTask.getTaskType()) || "600".equals(wcsTask.getTaskType()) || "900".equals(wcsTask.getTaskType())) { | |
136 | + int taskType = wcsTask.getTaskType().intValue(); | |
137 | + if (taskType == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT | |
138 | + || taskType == QuantityConstant.TASK_TYPE_WHOLESHIPMENT | |
139 | + || taskType == QuantityConstant.TASK_TYPE_SORTINGSHIPMENT | |
140 | + || taskType == QuantityConstant.TASK_TYPE_EMPTYSHIPMENT | |
141 | + || taskType == QuantityConstant.TASK_TYPE_VIEW ) { | |
127 | 142 | int rowFlag = location.getRowFlag().intValue(); |
128 | - if(rowFlag == 1) { | |
143 | + if(rowFlag == QuantityConstant.ROW_OUT) { | |
129 | 144 | Location insideLocation = locationService.getInsideNear(location); |
130 | 145 | String insideLocationCode = insideLocation.getCode(); |
131 | 146 | if(StringUtils.isNotEmpty(insideLocation.getContainerCode())) { |
132 | 147 | LambdaQueryWrapper<TaskHeader> lambdaWrapper = Wrappers.lambdaQuery(); |
133 | 148 | lambdaWrapper.eq(TaskHeader::getFromLocation, insideLocationCode); |
134 | - lambdaWrapper.lt(TaskHeader::getStatus, 100); | |
149 | + lambdaWrapper.lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED.intValue()); | |
135 | 150 | TaskHeader taskHeader2 = taskHeaderService.getOne(lambdaWrapper); |
136 | 151 | if(taskHeader2 != null) { |
137 | 152 | preTaskNo = taskHeader2.getId(); |
... | ... | @@ -150,7 +165,7 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
150 | 165 | } else { |
151 | 166 | LambdaQueryWrapper<TaskHeader> lambdaWrapper = Wrappers.lambdaQuery(); |
152 | 167 | lambdaWrapper.eq(TaskHeader::getToLocation, insideLocationCode); |
153 | - lambdaWrapper.lt(TaskHeader::getStatus, 100); | |
168 | + lambdaWrapper.lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED.intValue()); | |
154 | 169 | TaskHeader taskHeader1 = taskHeaderService.getOne(lambdaWrapper); |
155 | 170 | if(taskHeader1 != null) { |
156 | 171 | return AjaxResult.error("执行外侧库位出库时,相应的内侧库位有任务,请先执行完内侧库位任务"); |
... | ... | @@ -163,56 +178,61 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
163 | 178 | taskHeaderService.update(taskHeader, lambdaWrapper2); |
164 | 179 | } |
165 | 180 | |
166 | - Location insideLocation = locationService.getNear(location); | |
167 | - if(insideLocation != null) { | |
168 | - String nearLocationCode = insideLocation.getCode(); | |
169 | - LambdaQueryWrapper<TaskHeader> lambdaWrapper = Wrappers.lambdaQuery(); | |
170 | - lambdaWrapper.eq(TaskHeader::getFromLocation, nearLocationCode) | |
171 | - .lt(TaskHeader::getStatus, 100) | |
172 | - .in(TaskHeader::getTaskType, 200, 400, 900) | |
173 | - .ge(TaskHeader::getStatus, 10); | |
174 | - List<TaskHeader> taskHeader2 = taskHeaderService.list(lambdaWrapper); | |
175 | - if (taskHeader2 != null && taskHeader2.size() > 0) { | |
176 | - return AjaxResult.error("执行任务出库时,相应的旁边库位有分拣出库或者补充入库任务,请先执行完旁边库位任务"); | |
181 | + if(location != null) { | |
182 | + Location insideLocation = locationService.getNear(location); | |
183 | + if (insideLocation != null) { | |
184 | + String nearLocationCode = insideLocation.getCode(); | |
185 | + LambdaQueryWrapper<TaskHeader> lambdaWrapper = Wrappers.lambdaQuery(); | |
186 | + lambdaWrapper.eq(TaskHeader::getFromLocation, nearLocationCode) | |
187 | + .lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED.intValue()) | |
188 | + .in(TaskHeader::getTaskType, QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT, | |
189 | + QuantityConstant.TASK_TYPE_SORTINGSHIPMENT, QuantityConstant.TASK_TYPE_VIEW) | |
190 | + .ge(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_RELEASE.intValue()); | |
191 | + List<TaskHeader> taskHeader2 = taskHeaderService.list(lambdaWrapper); | |
192 | + if (taskHeader2 != null && taskHeader2.size() > 0) { | |
193 | + return AjaxResult.error("执行任务出库时,相应的旁边库位有分拣出库或者补充入库任务,请先执行完旁边库位任务"); | |
194 | + } | |
177 | 195 | } |
178 | - } | |
179 | 196 | |
180 | - Location insideNear = locationService.getInsideNear(location); | |
181 | - if(location.getRowFlag().intValue() == 1) { | |
182 | - String locationCode = location.getCode(); | |
183 | - LambdaQueryWrapper<TaskHeader> lambdaWrapper3 = Wrappers.lambdaQuery(); | |
184 | - lambdaWrapper3.eq(TaskHeader::getFromLocation, locationCode) | |
185 | - .lt(TaskHeader::getStatus, 100) | |
186 | - .in(TaskHeader::getTaskType, 200, 400, 900) | |
187 | - .ge(TaskHeader::getStatus, 1); | |
188 | - List<TaskHeader> taskHeader3 = taskHeaderService.list(lambdaWrapper3); | |
189 | - if (taskHeader3 != null && taskHeader3.size() > 0) { | |
190 | - String insideNearCode = insideNear.getCode(); | |
191 | - LambdaQueryWrapper<TaskHeader> lambdaWrapper4 = Wrappers.lambdaQuery(); | |
192 | - lambdaWrapper4.eq(TaskHeader::getFromLocation, insideNearCode) | |
193 | - .lt(TaskHeader::getStatus, 100) | |
194 | - .ge(TaskHeader::getStatus, 1); | |
195 | - List<TaskHeader> taskHeader4 = taskHeaderService.list(lambdaWrapper4); | |
196 | - if(taskHeader4 != null && taskHeader4.size() > 0) { | |
197 | - return AjaxResult.error("执行任务出库时,请先执行完旁边库位任务"); | |
197 | + Location insideNear = locationService.getInsideNear(location); | |
198 | + if (location.getRowFlag().intValue() == 1) { | |
199 | + String locationCode = location.getCode(); | |
200 | + LambdaQueryWrapper<TaskHeader> lambdaWrapper3 = Wrappers.lambdaQuery(); | |
201 | + lambdaWrapper3.eq(TaskHeader::getFromLocation, locationCode) | |
202 | + .lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED.intValue()) | |
203 | + .in(TaskHeader::getTaskType, QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT, | |
204 | + QuantityConstant.TASK_TYPE_SORTINGSHIPMENT, QuantityConstant.TASK_TYPE_VIEW) | |
205 | + .ge(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_BUILD.intValue()); | |
206 | + List<TaskHeader> taskHeader3 = taskHeaderService.list(lambdaWrapper3); | |
207 | + if (taskHeader3 != null && taskHeader3.size() > 0) { | |
208 | + String insideNearCode = insideNear.getCode(); | |
209 | + LambdaQueryWrapper<TaskHeader> lambdaWrapper4 = Wrappers.lambdaQuery(); | |
210 | + lambdaWrapper4.eq(TaskHeader::getFromLocation, insideNearCode) | |
211 | + .lt(TaskHeader::getStatus, 100) | |
212 | + .ge(TaskHeader::getStatus, 1); | |
213 | + List<TaskHeader> taskHeader4 = taskHeaderService.list(lambdaWrapper4); | |
214 | + if (taskHeader4 != null && taskHeader4.size() > 0) { | |
215 | + return AjaxResult.error("执行任务出库时,请先执行完旁边库位任务"); | |
216 | + } | |
198 | 217 | } |
199 | 218 | } |
200 | 219 | } |
201 | - | |
202 | 220 | if (0 != preTaskNo) { |
203 | 221 | wcsTask.setPreTaskNo(String.valueOf(preTaskNo)); |
204 | 222 | } |
205 | - wcsTask.setStation(location.getRoadway()); | |
206 | - wcsTask.setDestination(location.getRoadway()); | |
207 | - if(StringUtils.isEmpty(taskHeader.getFromLocation())){ | |
208 | - wcsTask.setFromLocationCode(""); | |
209 | - }else { | |
210 | - wcsTask.setFromLocationCode(taskHeader.getFromLocation()); | |
211 | - } | |
212 | - if(StringUtils.isEmpty(taskHeader.getToLocation())){ | |
213 | - wcsTask.setToLocationCode(""); | |
214 | - }else { | |
215 | - wcsTask.setToLocationCode(taskHeader.getToLocation()); | |
223 | + if(location != null) { | |
224 | + wcsTask.setStation(location.getRoadway()); | |
225 | + wcsTask.setDestination(location.getRoadway()); | |
226 | + if (StringUtils.isEmpty(taskHeader.getFromLocation())) { | |
227 | + wcsTask.setFromLocationCode(""); | |
228 | + } else { | |
229 | + wcsTask.setFromLocationCode(taskHeader.getFromLocation()); | |
230 | + } | |
231 | + if (StringUtils.isEmpty(taskHeader.getToLocation())) { | |
232 | + wcsTask.setToLocationCode(""); | |
233 | + } else { | |
234 | + wcsTask.setToLocationCode(taskHeader.getToLocation()); | |
235 | + } | |
216 | 236 | } |
217 | 237 | |
218 | 238 | wcsTask.setPriority(10); |
... | ... | @@ -256,9 +276,9 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
256 | 276 | throw new ServiceException("接口地址错误或返回为空"); |
257 | 277 | } |
258 | 278 | AjaxResult ajaxResult = JSON.parseObject(result, AjaxResult.class); |
259 | - if(ajaxResult.getCode()!=200){ | |
260 | - throw new ServiceException(ajaxResult.getMsg()); | |
279 | + if(ajaxResult.getCode()!= HttpConstant.OK){ | |
280 | + return AjaxResult.error(ajaxResult.getMessage()); | |
261 | 281 | } |
262 | - return AjaxResult.success("123"); | |
282 | + return AjaxResult.success(""); | |
263 | 283 | } |
264 | 284 | } |
... | ... |
src/main/java/com/huaheng/common/constant/HttpConstant.java
0 → 100644
src/main/java/com/huaheng/common/constant/QuantityConstant.java
1 | 1 | package com.huaheng.common.constant; |
2 | 2 | |
3 | +import com.huaheng.mobile.download.Constant; | |
4 | + | |
3 | 5 | /** |
4 | 6 | * 数字自定义常量 |
5 | 7 | * |
... | ... | @@ -155,31 +157,31 @@ public class QuantityConstant { |
155 | 157 | //6、任务类型 |
156 | 158 | |
157 | 159 | /** 整盘入库 */ |
158 | - public static final Integer TASK_TYPE_WHOLERECEIPT = 100; | |
160 | + public static final int TASK_TYPE_WHOLERECEIPT = 100; | |
159 | 161 | |
160 | 162 | /** 补充入库 */ |
161 | - public static final Integer TASK_TYPE_SUPPLEMENTRECEIPT = 200; | |
163 | + public static final int TASK_TYPE_SUPPLEMENTRECEIPT = 200; | |
162 | 164 | |
163 | 165 | /** 整盘出库 */ |
164 | - public static final Integer TASK_TYPE_WHOLESHIPMENT = 300; | |
166 | + public static final int TASK_TYPE_WHOLESHIPMENT = 300; | |
165 | 167 | |
166 | 168 | /** 分拣出库 */ |
167 | - public static final Integer TASK_TYPE_SORTINGSHIPMENT = 400; | |
169 | + public static final int TASK_TYPE_SORTINGSHIPMENT = 400; | |
168 | 170 | |
169 | 171 | /** 空容器入库 */ |
170 | - public static final Integer TASK_TYPE_EMPTYRECEIPT = 500; | |
172 | + public static final int TASK_TYPE_EMPTYRECEIPT = 500; | |
171 | 173 | |
172 | 174 | /** 空容器出库 */ |
173 | - public static final Integer TASK_TYPE_EMPTYSHIPMENT = 600; | |
175 | + public static final int TASK_TYPE_EMPTYSHIPMENT = 600; | |
174 | 176 | |
175 | 177 | /** 盘点 */ |
176 | - public static final Integer TASK_TYPE_CYCLECOUNT = 700; | |
178 | + public static final int TASK_TYPE_CYCLECOUNT = 700; | |
177 | 179 | |
178 | 180 | /** 移库 */ |
179 | - public static final Integer TASK_TYPE_TRANSFER = 800; | |
181 | + public static final int TASK_TYPE_TRANSFER = 800; | |
180 | 182 | |
181 | 183 | /** 出库查看 */ |
182 | - public static final Integer TASK_TYPE_VIEW = 900; | |
184 | + public static final int TASK_TYPE_VIEW = 900; | |
183 | 185 | |
184 | 186 | |
185 | 187 | |
... | ... | @@ -363,4 +365,8 @@ public class QuantityConstant { |
363 | 365 | |
364 | 366 | //非空货架 |
365 | 367 | public static final Integer POINTS_SOME = 1; |
368 | + | |
369 | + public static final int ROW_OUT = 1; | |
370 | + | |
371 | + public static final int ROW_IN = 0; | |
366 | 372 | } |
... | ... |
src/main/java/com/huaheng/framework/web/domain/AjaxResult.java
... | ... | @@ -14,7 +14,7 @@ public class AjaxResult<T> implements Serializable |
14 | 14 | |
15 | 15 | public int code; |
16 | 16 | |
17 | - private String msg; | |
17 | + private String message; | |
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 getMsg() { | |
44 | - return msg; | |
43 | + public String getMessage() { | |
44 | + return message; | |
45 | 45 | } |
46 | 46 | |
47 | - public AjaxResult<T> setMsg(String msg) { | |
48 | - this.msg = msg; | |
47 | + public AjaxResult<T> setMessage(String msg) { | |
48 | + this.message = 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).setMsg(message); | |
82 | + return new AjaxResult<>().setCode(RetCode.SUCCESS).setMessage(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).setMsg("成功"); | |
90 | + return new AjaxResult<>().setCode(RetCode.SUCCESS).setMessage("成功"); | |
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).setMsg("成功").setData(data); | |
98 | + return new AjaxResult<T>().setCode(RetCode.SUCCESS).setMessage("成功").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).setMsg(message).setData(data); | |
106 | + return new AjaxResult<T>().setCode(RetCode.SUCCESS).setMessage(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).setMsg(message); | |
114 | + return new AjaxResult<>().setCode(RetCode.FAIL).setMessage(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).setMsg(message).setData(data); | |
122 | + return new AjaxResult<T>().setCode(RetCode.FAIL).setMessage(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).setMsg("失败"); | |
130 | + return new AjaxResult<T>().setCode(RetCode.FAIL).setMessage("失败"); | |
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).setMsg(message).setData(data); | |
138 | + return new AjaxResult<T>().setCode(retCode).setMessage(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).setMsg(message); | |
150 | + return new AjaxResult<T>().setCode(code).setMessage(message); | |
151 | 151 | } |
152 | 152 | |
153 | 153 | } |
... | ... |
src/main/java/com/huaheng/mobile/receipt/MobileBatchReceiptController.java
... | ... | @@ -569,7 +569,7 @@ public class MobileBatchReceiptController { |
569 | 569 | TaskHeader taskHeader = new TaskHeader(); |
570 | 570 | taskHeader.setWarehouseCode(loc.getWarehouseCode()); |
571 | 571 | taskHeader.setCompanyCode(companyCode);//货主 |
572 | - if(type == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT.intValue()) { | |
572 | + if(type == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) { | |
573 | 573 | taskHeader.setInternalTaskType(QuantityConstant.TASK_INTENERTYPE_SHELF); |
574 | 574 | taskHeader.setTaskType(QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT); |
575 | 575 | } else { |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -94,7 +94,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
94 | 94 | } else { |
95 | 95 | if (taskType == 0){ throw new ServiceException("容器状态未知"); } |
96 | 96 | } |
97 | - if (QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT.equals(taskType)) { | |
97 | + if (QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT == taskType.intValue()) { | |
98 | 98 | Container container = containerService.findAllByCode(containerCode); |
99 | 99 | if (StringUtils.isNotNull(container) && StringUtils.isNotEmpty(container.getLocationCode())) { |
100 | 100 | locationCode = container.getLocationCode(); |
... | ... | @@ -384,7 +384,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
384 | 384 | Boolean checkLocationCode(String locationCode, String containerCode, Integer taskType) { |
385 | 385 | //如果选了库位,就要校验库位和已经组盘的库位是否一致,避免重入库 |
386 | 386 | if (StringUtils.isEmpty(locationCode)) { |
387 | - if (QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT.equals(taskType)) { | |
387 | + if (QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT == taskType.intValue()) { | |
388 | 388 | throw new ServiceException("补充入库,必须填写库位"); |
389 | 389 | } else { |
390 | 390 | return true; |
... | ... | @@ -418,13 +418,13 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
418 | 418 | if (!"empty".equals(location.getStatus()) ) { |
419 | 419 | throw new ServiceException("库位不是空闲状态!"); |
420 | 420 | } |
421 | - if (QuantityConstant.TASK_TYPE_WHOLERECEIPT.equals(taskType)) { | |
421 | + if (QuantityConstant.TASK_TYPE_WHOLERECEIPT == taskType.intValue()) { | |
422 | 422 | if (com.huaheng.common.utils.StringUtils.isNotEmpty(location.getContainerCode())) { |
423 | 423 | throw new ServiceException("库位(" + containerCode + ")有容器(" + location.getContainerCode() + "),不能整盘入库!"); |
424 | 424 | } |
425 | 425 | } |
426 | - if(QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT.equals(taskType)) { | |
427 | - if (com.huaheng.common.utils.StringUtils.isEmpty(location.getContainerCode())){ | |
426 | + if(QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT== taskType.intValue()) { | |
427 | + if (StringUtils.isEmpty(location.getContainerCode())){ | |
428 | 428 | throw new ServiceException("库位(" + locationCode + ")没有容器,不能补充入库!"); |
429 | 429 | } else if (!location.getContainerCode().equals(containerCode)) { |
430 | 430 | throw new ServiceException("库位(" + containerCode + ")对应的容器是:" + location.getContainerCode()+ ",请重选库位!"); |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderServiceImpl.java
... | ... | @@ -544,7 +544,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
544 | 544 | ShipmentCombinationModel shipmentCombination = new ShipmentCombinationModel(); |
545 | 545 | shipmentCombination.setInventoryDetailId(inventory.getId()); |
546 | 546 | shipmentCombination.setShipmentDetailId(item.getId()); |
547 | - shipmentCombination.setType((short) QuantityConstant.TASK_TYPE_WHOLESHIPMENT.intValue()); | |
547 | + shipmentCombination.setType((short) QuantityConstant.TASK_TYPE_WHOLESHIPMENT); | |
548 | 548 | |
549 | 549 | //如果库存数 >= 待出库数,组盘数就是待出库数并且结束组盘,否则组盘数就是库存数 |
550 | 550 | if (inventoryQty.compareTo(shipmentQty) > -1) { |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -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.getMsg()); | |
344 | + return AjaxResult.error(ajaxResult.getMessage()); | |
345 | 345 | } |
346 | 346 | |
347 | 347 | |
... | ... | @@ -746,7 +746,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
746 | 746 | //给组盘分配库位 |
747 | 747 | |
748 | 748 | int internalTaskType = taskHeader.getInternalTaskType(); |
749 | - if(internalTaskType == QuantityConstant.TASK_TYPE_WHOLERECEIPT.intValue() || internalTaskType == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT.intValue() ) { | |
749 | + if(internalTaskType == QuantityConstant.TASK_TYPE_WHOLERECEIPT || internalTaskType == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) { | |
750 | 750 | ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader(); |
751 | 751 | receiptContainerHeader.setId(taskHeader.getAllocationHeadId()); |
752 | 752 | receiptContainerHeader.setToLocation(location.getCode()); |
... | ... |
src/main/resources/templates/task/taskHeader/taskHeader.html
... | ... | @@ -164,7 +164,7 @@ |
164 | 164 | var actions = []; |
165 | 165 | actions.push('<a class="btn btn-info btn-xs " href="#" onclick="detail(\'' + row.id + '\')"><i class="fa fa-list-ul"></i>明细</a> '); |
166 | 166 | if (row.status < 10) { |
167 | - if(row.taskType == 300 || row.taskType == 400) { | |
167 | + if(row.taskType == 300 || row.taskType == 400 || row.taskType == 900) { | |
168 | 168 | actions.push('<a class="btn btn-success btn-xs ' + executeFlag + '" href="#" onclick="chooseStation(\'' + row.id + '\')"><i class="fa fa-send" style="padding-right: 1px;"></i>执行</a> '); |
169 | 169 | } else { |
170 | 170 | actions.push('<a class="btn btn-success btn-xs ' + executeFlag + '" href="#" onclick="execute(\'' + row.id + '\')"><i class="fa fa-send" style="padding-right: 1px;"></i>执行</a> '); |
... | ... |