Commit 1776e2b637e915e1756a71a4aca4c94e618a3208
1 parent
74188821
平库入库功能
Showing
31 changed files
with
1855 additions
and
1377 deletions
Too many changes to show.
To preserve performance only 30 of 31 files are displayed.
src/main/java/com/huaheng/api/wcs/controller/EmptyOutHandle.java
... | ... | @@ -12,11 +12,12 @@ import org.springframework.web.bind.annotation.*; |
12 | 12 | import javax.annotation.Resource; |
13 | 13 | import java.util.Map; |
14 | 14 | |
15 | -/**空出处理接口 | |
15 | +/** | |
16 | + * 空出处理接口 | |
16 | 17 | * wcs向wms传递数据 |
17 | - * @author ricard | |
18 | - * @date 2019/10/11 | |
19 | 18 | * |
19 | + * @author ricard | |
20 | + * @date 2019/10/11 | |
20 | 21 | */ |
21 | 22 | |
22 | 23 | @RestController |
... | ... | @@ -30,10 +31,9 @@ public class EmptyOutHandle extends BaseController { |
30 | 31 | @PostMapping("/emptyOutHandle") |
31 | 32 | @ApiOperation("wcs空出处理") |
32 | 33 | @ResponseBody |
33 | - public AjaxResult emptyOutHandle(@RequestBody Map<String,String> map) { | |
34 | + public AjaxResult emptyOutHandle(@RequestBody Map<String, String> map) { | |
34 | 35 | String taskNo = map.get("taskNo"); |
35 | - AjaxResult ajaxResult = emptyOutHandleService.EmptyOutHandle(taskNo); | |
36 | - return ajaxResult; | |
36 | + return handleQuest("emptyOutHandle", () -> emptyOutHandleService.EmptyOutHandle(taskNo)); | |
37 | 37 | } |
38 | 38 | |
39 | 39 | |
... | ... |
src/main/java/com/huaheng/api/wcs/controller/OverrideHandle.java
... | ... | @@ -15,11 +15,12 @@ import org.springframework.web.bind.annotation.*; |
15 | 15 | |
16 | 16 | import javax.annotation.Resource; |
17 | 17 | |
18 | -/**重入处理接口 | |
18 | +/** | |
19 | + * 重入处理接口 | |
19 | 20 | * wcs向wms传递数据 |
20 | - * @author ricard | |
21 | - * @date 2019/10/11 | |
22 | 21 | * |
22 | + * @author ricard | |
23 | + * @date 2019/10/11 | |
23 | 24 | */ |
24 | 25 | |
25 | 26 | @RestController |
... | ... | @@ -34,7 +35,7 @@ public class OverrideHandle extends BaseController { |
34 | 35 | @ApiOperation("wcs重入处理") |
35 | 36 | @ResponseBody |
36 | 37 | public AjaxResult reenterHandle(@RequestBody TaskFinishDomain taskFinishDomain) { |
37 | - return overrideHandleService.OverrideHandle(taskFinishDomain); | |
38 | + return handleQuest("reenterHandle", () -> overrideHandleService.OverrideHandle(taskFinishDomain)); | |
38 | 39 | } |
39 | 40 | |
40 | 41 | } |
... | ... |
src/main/java/com/huaheng/api/wcs/controller/PickupErrorController.java
... | ... | @@ -20,12 +20,12 @@ public class PickupErrorController extends BaseController { |
20 | 20 | |
21 | 21 | @PostMapping("/pickupError") |
22 | 22 | @ApiOperation("取货错") |
23 | - @ApiLogger(apiName = "取货错", from="WCS") | |
23 | + @ApiLogger(apiName = "取货错", from = "WCS") | |
24 | 24 | @Transactional(rollbackFor = Exception.class) |
25 | 25 | @ResponseBody |
26 | - public AjaxResult pickupError(@RequestBody Map<String,String> map) { | |
26 | + public AjaxResult pickupError(@RequestBody Map<String, String> map) { | |
27 | 27 | String taskNo = map.get("taskNo"); |
28 | - return pickupErrorHandleService.PickupErrorHandle(taskNo); | |
28 | + return handleQuest("pickupError", () -> pickupErrorHandleService.PickupErrorHandle(taskNo)); | |
29 | 29 | } |
30 | 30 | |
31 | 31 | |
... | ... |
src/main/java/com/huaheng/api/wcs/controller/TaskFinishController.java
... | ... | @@ -35,14 +35,7 @@ public class TaskFinishController extends BaseController { |
35 | 35 | @ApiLogger(apiName = "wcs任务完成", from = "WCS") |
36 | 36 | @ResponseBody |
37 | 37 | public AjaxResult complete(@RequestBody TaskFinishDomain taskFinishDomain) { |
38 | - AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() { | |
39 | - @Override | |
40 | - public AjaxResult doProcess() { | |
41 | - AjaxResult ajaxResult = taskFinishService.completeTaskByWCS(taskFinishDomain); | |
42 | - return ajaxResult; | |
43 | - } | |
44 | - }); | |
45 | - return ajaxResult; | |
38 | + return handleMultiProcess(() -> taskFinishService.completeTaskByWCS(taskFinishDomain)); | |
46 | 39 | } |
47 | 40 | |
48 | 41 | } |
... | ... |
src/main/java/com/huaheng/api/wcs/controller/TaskInfoController.java
... | ... | @@ -23,8 +23,8 @@ public class TaskInfoController extends BaseController { |
23 | 23 | |
24 | 24 | @ResponseBody |
25 | 25 | @PostMapping("/info") |
26 | - @ApiLogger(apiName = "取消任务", from="WCS") | |
26 | + @ApiLogger(apiName = "取消任务", from = "WCS") | |
27 | 27 | public AjaxResult info(@RequestBody WcsTask wcsTask) { |
28 | - return taskInfoService.taskInfo(wcsTask.getTaskNo(), wcsTask.getWarehouseCode(), wcsTask.getArea()); | |
28 | + return handleMultiProcess(() -> taskInfoService.taskInfo(wcsTask.getTaskNo(), wcsTask.getWarehouseCode(), wcsTask.getArea())); | |
29 | 29 | } |
30 | 30 | } |
... | ... |
src/main/java/com/huaheng/api/wcs/controller/WarecellAllocation.java
... | ... | @@ -15,11 +15,12 @@ import org.springframework.web.bind.annotation.*; |
15 | 15 | |
16 | 16 | import javax.annotation.Resource; |
17 | 17 | |
18 | -/**仓位分配 接口 | |
18 | +/** | |
19 | + * 仓位分配 接口 | |
19 | 20 | * wcs向wms传递数据 |
20 | - * @author ricard | |
21 | - * @date 2019/10/11 | |
22 | 21 | * |
22 | + * @author ricard | |
23 | + * @date 2019/10/11 | |
23 | 24 | */ |
24 | 25 | |
25 | 26 | @RestController |
... | ... | @@ -31,28 +32,21 @@ public class WarecellAllocation extends BaseController { |
31 | 32 | |
32 | 33 | @Log(title = "wcs仓位分配", action = BusinessType.INSERT) |
33 | 34 | @PostMapping("/warecellAllocation") |
34 | - @ApiOperation(value="wcs仓位分配", notes="wcs仓位分配", httpMethod = "POST") | |
35 | + @ApiOperation(value = "wcs仓位分配", notes = "wcs仓位分配", httpMethod = "POST") | |
35 | 36 | @ResponseBody |
36 | - @ApiLogger(apiName = "wcs调用wms分配库位", from="WCS") | |
37 | + @ApiLogger(apiName = "wcs调用wms分配库位", from = "WCS") | |
37 | 38 | /* |
38 | 39 | WCS给的长,宽,高,重在有不同规格库位才有用,destination是区域, locationType库位类型 |
39 | 40 | */ |
40 | - public AjaxResult warecellAllocation(@RequestBody WarecellDomain warecellDomain) { | |
41 | - AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() { | |
42 | - @Override | |
43 | - public AjaxResult doProcess() { | |
44 | - AjaxResult ajaxResult = warecellAllocationService.warecellAllocation(warecellDomain); | |
45 | - return ajaxResult; | |
46 | - } | |
47 | - }); | |
48 | - return ajaxResult; | |
41 | + public AjaxResult warecellAllocation(@RequestBody WarecellDomain warecellDomain) { | |
42 | + return handleMultiProcess(() -> warecellAllocationService.warecellAllocation(warecellDomain)); | |
49 | 43 | } |
50 | 44 | |
51 | 45 | @Log(title = "wcs去向分配", action = BusinessType.INSERT) |
52 | 46 | @PostMapping("/destinationAllocation") |
53 | - @ApiOperation(value="wcs去向分配", notes="wcs去向分配", httpMethod = "POST") | |
47 | + @ApiOperation(value = "wcs去向分配", notes = "wcs去向分配", httpMethod = "POST") | |
54 | 48 | @ResponseBody |
55 | - @ApiLogger(apiName = "去向分配", from="WCS") | |
49 | + @ApiLogger(apiName = "去向分配", from = "WCS") | |
56 | 50 | public AjaxResult destinationAllocation(String taskNo, String length, String width, String height, String weight) { |
57 | 51 | WcsTask wcsTask = new WcsTask(); |
58 | 52 | wcsTask.setTaskNo(taskNo); |
... | ... |
src/main/java/com/huaheng/common/constant/QuantityConstant.java
... | ... | @@ -5,7 +5,7 @@ import com.huaheng.mobile.download.Constant; |
5 | 5 | /** |
6 | 6 | * 数字自定义常量 |
7 | 7 | * |
8 | - * @author ricard | |
8 | + * @author ricard | |
9 | 9 | */ |
10 | 10 | public class QuantityConstant { |
11 | 11 | /** |
... | ... | @@ -42,7 +42,9 @@ public class QuantityConstant { |
42 | 42 | /**通过*/ |
43 | 43 | // public static final Integer RECEIPT_HEADER_APPROVE = 50; |
44 | 44 | |
45 | - /**订单池*/ | |
45 | + /** | |
46 | + * 订单池 | |
47 | + */ | |
46 | 48 | public static final Integer RECEIPT_HEADER_POOL = 100; |
47 | 49 | |
48 | 50 | //入库预约 |
... | ... | @@ -63,19 +65,22 @@ public class QuantityConstant { |
63 | 65 | //等待上架 |
64 | 66 | public static final Integer RECEIPT_HEADER_WAIT = 280; |
65 | 67 | |
66 | - /** 上架 */ | |
68 | + /** | |
69 | + * 上架 | |
70 | + */ | |
67 | 71 | public static final Integer RECEIPT_HEADER_SHELF = 300; |
68 | 72 | |
69 | - /** 过账*/ | |
73 | + /** | |
74 | + * 过账 | |
75 | + */ | |
70 | 76 | public static final Integer RECEIPT_HEADER_POSTING = 800; |
71 | 77 | |
72 | - /** 回传 */ | |
78 | + /** | |
79 | + * 回传 | |
80 | + */ | |
73 | 81 | public static final Integer RECEIPT_HEADER_RETURN = 900; |
74 | 82 | |
75 | 83 | |
76 | - | |
77 | - | |
78 | - | |
79 | 84 | //2、出库单状态 |
80 | 85 | |
81 | 86 | //新建 |
... | ... | @@ -106,7 +111,6 @@ public class QuantityConstant { |
106 | 111 | public static final Integer SHIPMENT_HEADER_RETURN = 900; |
107 | 112 | |
108 | 113 | |
109 | - | |
110 | 114 | // 查询未完成的出入库单据使用 |
111 | 115 | public static final Integer HEADER_STATE = 290; |
112 | 116 | |
... | ... | @@ -123,96 +127,139 @@ public class QuantityConstant { |
123 | 127 | public static final Integer UPLOAD_SUCCESS = 20; |
124 | 128 | |
125 | 129 | |
126 | - | |
127 | - | |
128 | 130 | //4、入库组盘状态 |
129 | 131 | |
130 | 132 | //新建 |
131 | 133 | public static final Integer RECEIPT_CONTAINER_BUILD = 0; |
132 | 134 | |
133 | - /** 生成任务 */ | |
134 | - public static final Integer RECEIPT_CONTAINER_TASK= 10; | |
135 | + /** | |
136 | + * 生成任务 | |
137 | + */ | |
138 | + public static final Integer RECEIPT_CONTAINER_TASK = 10; | |
135 | 139 | |
136 | - /**上架完成 */ | |
140 | + /** | |
141 | + * 上架完成 | |
142 | + */ | |
137 | 143 | public static final Integer RECEIPT_CONTAINER_FINISHED = 20; |
138 | 144 | |
139 | - /** 复核完成*/ | |
145 | + /** | |
146 | + * 复核完成 | |
147 | + */ | |
140 | 148 | public static final Integer RECEIPT_CONTAINER_REVIEWSUCCESS = 30; |
141 | 149 | |
142 | 150 | |
143 | - | |
144 | 151 | //5、出库组盘状态 |
145 | 152 | |
146 | - /** 新建 */ | |
153 | + /** | |
154 | + * 新建 | |
155 | + */ | |
147 | 156 | public static final Integer SHIPMENT_CONTAINER_BUILD = 0; |
148 | 157 | |
149 | - /** 生成任务 */ | |
150 | - public static final Integer SHIPMENT_CONTAINER_TASK= 10; | |
158 | + /** | |
159 | + * 生成任务 | |
160 | + */ | |
161 | + public static final Integer SHIPMENT_CONTAINER_TASK = 10; | |
151 | 162 | |
152 | - /** 拣货完成 */ | |
163 | + /** | |
164 | + * 拣货完成 | |
165 | + */ | |
153 | 166 | public static final Integer SHIPMENT_CONTAINER_FINISHED = 20; |
154 | 167 | |
155 | - /** 复核完成 */ | |
168 | + /** | |
169 | + * 复核完成 | |
170 | + */ | |
156 | 171 | public static final Integer SHIPMENT_CONTAINER_REVIEWSUCCESS = 30; |
157 | 172 | |
158 | 173 | |
159 | - | |
160 | 174 | //6、任务类型 |
161 | 175 | |
162 | - /** 整盘入库 */ | |
176 | + /** | |
177 | + * 整盘入库 | |
178 | + */ | |
163 | 179 | public static final int TASK_TYPE_WHOLERECEIPT = 100; |
164 | 180 | |
165 | - /** 补充入库 */ | |
181 | + /** | |
182 | + * 补充入库 | |
183 | + */ | |
166 | 184 | public static final int TASK_TYPE_SUPPLEMENTRECEIPT = 200; |
167 | 185 | |
168 | - /** 整盘出库 */ | |
186 | + /** | |
187 | + * 整盘出库 | |
188 | + */ | |
169 | 189 | public static final int TASK_TYPE_WHOLESHIPMENT = 300; |
170 | 190 | |
171 | - /** 分拣出库 */ | |
191 | + /** | |
192 | + * 分拣出库 | |
193 | + */ | |
172 | 194 | public static final int TASK_TYPE_SORTINGSHIPMENT = 400; |
173 | 195 | |
174 | - /** 空容器入库 */ | |
196 | + /** | |
197 | + * 空容器入库 | |
198 | + */ | |
175 | 199 | public static final int TASK_TYPE_EMPTYRECEIPT = 500; |
176 | 200 | |
177 | - /** 空容器出库 */ | |
201 | + /** | |
202 | + * 空容器出库 | |
203 | + */ | |
178 | 204 | public static final int TASK_TYPE_EMPTYSHIPMENT = 600; |
179 | 205 | |
180 | - /** 盘点 */ | |
206 | + /** | |
207 | + * 盘点 | |
208 | + */ | |
181 | 209 | public static final int TASK_TYPE_CYCLECOUNT = 700; |
182 | 210 | |
183 | - /** 移库 */ | |
211 | + /** | |
212 | + * 移库 | |
213 | + */ | |
184 | 214 | public static final int TASK_TYPE_TRANSFER = 800; |
185 | 215 | |
186 | - /** 出库查看 */ | |
216 | + /** | |
217 | + * 出库查看 | |
218 | + */ | |
187 | 219 | public static final int TASK_TYPE_VIEW = 900; |
188 | 220 | |
189 | - /** 过站 */ | |
221 | + /** | |
222 | + * 过站 | |
223 | + */ | |
190 | 224 | public static final int TASK_TYPE_OVER_STATION = 1000; |
191 | 225 | |
192 | - /** 空托盘组入库 */ | |
226 | + /** | |
227 | + * 空托盘组入库 | |
228 | + */ | |
193 | 229 | public static final int TASK_TYPE_MANY_EMPTYRECEIPT = 1100; |
194 | 230 | |
195 | - /** 空托盘组出库 */ | |
231 | + /** | |
232 | + * 空托盘组出库 | |
233 | + */ | |
196 | 234 | public static final int TASK_TYPE_MANY_EMPTYSHIPMENT = 1200; |
197 | 235 | |
198 | 236 | |
199 | - | |
200 | 237 | //7、任务状态 |
201 | 238 | |
202 | - /** 生成任务 */ | |
239 | + /** | |
240 | + * 生成任务 | |
241 | + */ | |
203 | 242 | public static final int TASK_STATUS_BUILD = 1; |
204 | 243 | |
205 | - /** 下达任务 */ | |
244 | + /** | |
245 | + * 下达任务 | |
246 | + */ | |
206 | 247 | public static final int TASK_STATUS_RELEASE = 10; |
207 | 248 | |
208 | - /** 开始执行 */ | |
249 | + /** | |
250 | + * 开始执行 | |
251 | + */ | |
209 | 252 | public static final int TASK_STATUS_RUNNING = 20; |
210 | 253 | |
211 | - /** 到达拣选站台 */ | |
254 | + /** | |
255 | + * 到达拣选站台 | |
256 | + */ | |
212 | 257 | public static final int TASK_STATUS_ARRIVED_STATION = 50; |
213 | 258 | |
214 | 259 | |
215 | - /** 任务完成 */ | |
260 | + /** | |
261 | + * 任务完成 | |
262 | + */ | |
216 | 263 | public static final int TASK_STATUS_COMPLETED = 100; |
217 | 264 | |
218 | 265 | |
... | ... | @@ -250,8 +297,6 @@ public class QuantityConstant { |
250 | 297 | public static final Integer WAVE_STEP_ERROR = 120; |
251 | 298 | |
252 | 299 | |
253 | - | |
254 | - | |
255 | 300 | //9、质检状态 |
256 | 301 | |
257 | 302 | //新建 |
... | ... | @@ -264,7 +309,6 @@ public class QuantityConstant { |
264 | 309 | public static final Integer CHECK_STATUS_COMPLETED = 20; |
265 | 310 | |
266 | 311 | |
267 | - | |
268 | 312 | //10、盘点状态 |
269 | 313 | |
270 | 314 | //新建 |
... | ... | @@ -277,7 +321,7 @@ public class QuantityConstant { |
277 | 321 | public static final Integer CYCLECOUNT_STATUS_EXECUTING = 10; |
278 | 322 | |
279 | 323 | //已登记 |
280 | - public static final Integer CYCLECOUNT_STATUS_REGISTERED= 15; | |
324 | + public static final Integer CYCLECOUNT_STATUS_REGISTERED = 15; | |
281 | 325 | |
282 | 326 | //审核 |
283 | 327 | public static final Integer CYCLECOUNT_STATUS_REVIEW = 30; |
... | ... | @@ -295,36 +339,49 @@ public class QuantityConstant { |
295 | 339 | public static final Integer CYCLECOUNT_STATUS_GENERATEADJUST = 110; |
296 | 340 | |
297 | 341 | |
298 | - | |
299 | - | |
300 | 342 | //11、库存交易类型 |
301 | 343 | |
302 | - /** 入库 */ | |
344 | + /** | |
345 | + * 入库 | |
346 | + */ | |
303 | 347 | public static final Integer INVENTORY_TRANSACTION_RECEIPT = 10; |
304 | 348 | |
305 | - /** 出库 */ | |
349 | + /** | |
350 | + * 出库 | |
351 | + */ | |
306 | 352 | public static final Integer INVENTORY_TRANSACTION_SHIPMENT = 20; |
307 | 353 | |
308 | - /** 调整入 */ | |
354 | + /** | |
355 | + * 调整入 | |
356 | + */ | |
309 | 357 | public static final Integer INVENTORY_TRANSACTION_ADJUSTINTO = 30; |
310 | 358 | |
311 | - /** 调整出 */ | |
359 | + /** | |
360 | + * 调整出 | |
361 | + */ | |
312 | 362 | public static final Integer INVENTORY_TRANSACTION_ADJUSTOUT = 40; |
313 | 363 | |
314 | - /** 调整属性 */ | |
364 | + /** | |
365 | + * 调整属性 | |
366 | + */ | |
315 | 367 | public static final Integer INVENTORY_TRANSACTION_ADJUSTPROPERTIES = 50; |
316 | 368 | |
317 | - /** 盘点 */ | |
369 | + /** | |
370 | + * 盘点 | |
371 | + */ | |
318 | 372 | public static final Integer INVENTORY_TRANSACTION_CYCLECOUNT = 60; |
319 | 373 | |
320 | - /** 移库入 */ | |
374 | + /** | |
375 | + * 移库入 | |
376 | + */ | |
321 | 377 | public static final Integer INVENTORY_TRANSACTION_TRANSFERINTO = 70; |
322 | 378 | |
323 | - /** 移库出 */ | |
379 | + /** | |
380 | + * 移库出 | |
381 | + */ | |
324 | 382 | public static final Integer INVENTORY_TRANSACTION_TRANSFEROUT = 80; |
325 | 383 | |
326 | 384 | |
327 | - | |
328 | 385 | //12、调整单状态 |
329 | 386 | |
330 | 387 | //未批准 |
... | ... | @@ -342,20 +399,25 @@ public class QuantityConstant { |
342 | 399 | |
343 | 400 | //13、任务内部类型 |
344 | 401 | |
345 | - /** 上架任务*/ | |
402 | + /** | |
403 | + * 上架任务 | |
404 | + */ | |
346 | 405 | public static final Integer TASK_INTENERTYPE_RECEIPT = 100; |
347 | 406 | |
348 | - /** 拣货任务*/ | |
407 | + /** | |
408 | + * 拣货任务 | |
409 | + */ | |
349 | 410 | public static final Integer TASK_INTENERTYPE_SHIPMENT = 200; |
350 | 411 | |
351 | - /** 工作任务*/ | |
412 | + /** | |
413 | + * 工作任务 | |
414 | + */ | |
352 | 415 | public static final Integer TASK_INTENERTYPE_WORK = 300; |
353 | 416 | |
354 | 417 | //盘点任务 |
355 | 418 | public static final Integer TASK_INTENERTYPE_CYCLECOUNT = 400; |
356 | 419 | |
357 | 420 | |
358 | - | |
359 | 421 | //13、质检单类型 |
360 | 422 | |
361 | 423 | //入库质检 |
... | ... | @@ -412,7 +474,7 @@ public class QuantityConstant { |
412 | 474 | public static final String STATUS_LOCATION_EMPTY = "empty"; |
413 | 475 | public static final String STATUS_LOCATION_LOCK = "lock"; |
414 | 476 | |
415 | - public static final String RULE_SHIPMENT_TASK= "shipmentTaskRule"; | |
477 | + public static final String RULE_SHIPMENT_TASK = "shipmentTaskRule"; | |
416 | 478 | public static final String RULE_TASK_LOCATION = "taskLocationRule"; |
417 | 479 | public static final String RULE_CONNECT_WCS = "connectWcs"; |
418 | 480 | public static final String RULE_ALLOCATION = "allocationRule"; |
... | ... | @@ -444,6 +506,8 @@ public class QuantityConstant { |
444 | 506 | |
445 | 507 | public static final int EMPTY_OUT = 1; |
446 | 508 | public static final int NORMAL_OUT = 0; |
509 | + public static final String ZONE_TYPE_PK = "平库"; | |
510 | + public static final String ZONE_TYPE_LK = "立库"; | |
447 | 511 | |
448 | 512 | |
449 | 513 | public static String ryTask_warehouse_code; |
... | ... |
src/main/java/com/huaheng/pc/config/container/domain/Container.java
... | ... | @@ -10,14 +10,14 @@ import java.io.Serializable; |
10 | 10 | import java.util.Date; |
11 | 11 | |
12 | 12 | @Data |
13 | -@ApiModel(value="com.huaheng.pc.config.container.domain.Container") | |
13 | +@ApiModel(value = "com.huaheng.pc.config.container.domain.Container") | |
14 | 14 | @TableName(value = "container") |
15 | 15 | public class Container implements Serializable { |
16 | 16 | /** |
17 | 17 | * 内部号 |
18 | 18 | */ |
19 | 19 | @TableId(value = "id", type = IdType.AUTO) |
20 | - @ApiModelProperty(value="内部号") | |
20 | + @ApiModelProperty(value = "内部号") | |
21 | 21 | @Excel(name = "内部号", type = Excel.Type.EXPORT) |
22 | 22 | private Integer id; |
23 | 23 | |
... | ... | @@ -25,7 +25,7 @@ public class Container implements Serializable { |
25 | 25 | * 容器名字 |
26 | 26 | */ |
27 | 27 | @TableField(value = "name") |
28 | - @ApiModelProperty(value="容器名字") | |
28 | + @ApiModelProperty(value = "容器名字") | |
29 | 29 | @Excel(name = "容器名字") |
30 | 30 | private String name; |
31 | 31 | |
... | ... | @@ -33,7 +33,7 @@ public class Container implements Serializable { |
33 | 33 | * 容器编码 |
34 | 34 | */ |
35 | 35 | @TableField(value = "code") |
36 | - @ApiModelProperty(value="容器编码") | |
36 | + @ApiModelProperty(value = "容器编码") | |
37 | 37 | @Excel(name = "容器编码") |
38 | 38 | private String code; |
39 | 39 | |
... | ... | @@ -41,7 +41,7 @@ public class Container implements Serializable { |
41 | 41 | * 区域 |
42 | 42 | */ |
43 | 43 | @TableField(value = "area") |
44 | - @ApiModelProperty(value="区域") | |
44 | + @ApiModelProperty(value = "区域") | |
45 | 45 | @Excel(name = "区域") |
46 | 46 | private String area; |
47 | 47 | |
... | ... | @@ -49,7 +49,7 @@ public class Container implements Serializable { |
49 | 49 | * 仓库代码 |
50 | 50 | */ |
51 | 51 | @TableField(value = "warehouseCode") |
52 | - @ApiModelProperty(value="仓库代码") | |
52 | + @ApiModelProperty(value = "仓库代码") | |
53 | 53 | @Excel(name = "仓库编码") |
54 | 54 | private String warehouseCode; |
55 | 55 | |
... | ... | @@ -57,7 +57,7 @@ public class Container implements Serializable { |
57 | 57 | * 货主编码 |
58 | 58 | */ |
59 | 59 | @TableField(value = "companyCode") |
60 | - @ApiModelProperty(value="货主编码") | |
60 | + @ApiModelProperty(value = "货主编码") | |
61 | 61 | @Excel(name = "货主编码") |
62 | 62 | private String companyCode; |
63 | 63 | |
... | ... | @@ -69,7 +69,7 @@ public class Container implements Serializable { |
69 | 69 | * 容器类型 |
70 | 70 | */ |
71 | 71 | @TableField(value = "containerType") |
72 | - @ApiModelProperty(value="容器类型") | |
72 | + @ApiModelProperty(value = "容器类型") | |
73 | 73 | @Excel(name = "容器类型") |
74 | 74 | private String containerType; |
75 | 75 | |
... | ... | @@ -78,7 +78,7 @@ public class Container implements Serializable { |
78 | 78 | * 容器类型 |
79 | 79 | */ |
80 | 80 | @TableField(value = "goodsShelfNo") |
81 | - @ApiModelProperty(value="AGV货架编码") | |
81 | + @ApiModelProperty(value = "AGV货架编码") | |
82 | 82 | @Excel(name = "AGV货架编码") |
83 | 83 | private String goodsShelfNo; |
84 | 84 | |
... | ... | @@ -86,58 +86,58 @@ public class Container implements Serializable { |
86 | 86 | * 创建时间 |
87 | 87 | */ |
88 | 88 | @TableField(value = "created", fill = FieldFill.INSERT) |
89 | - @ApiModelProperty(value="创建时间") | |
89 | + @ApiModelProperty(value = "创建时间") | |
90 | 90 | private Date created; |
91 | 91 | |
92 | 92 | /** |
93 | 93 | * 创建人 |
94 | 94 | */ |
95 | 95 | @TableField(value = "createdBy", fill = FieldFill.INSERT) |
96 | - @ApiModelProperty(value="创建人") | |
96 | + @ApiModelProperty(value = "创建人") | |
97 | 97 | private String createdBy; |
98 | 98 | |
99 | 99 | /** |
100 | 100 | * 最后更新时间 |
101 | 101 | */ |
102 | 102 | @TableField(value = "lastUpdated", fill = FieldFill.INSERT_UPDATE) |
103 | - @ApiModelProperty(value="最后更新时间") | |
103 | + @ApiModelProperty(value = "最后更新时间") | |
104 | 104 | private Date lastUpdated; |
105 | 105 | |
106 | 106 | /** |
107 | 107 | * 最后更新人 |
108 | 108 | */ |
109 | 109 | @TableField(value = "lastUpdatedBy", fill = FieldFill.INSERT_UPDATE) |
110 | - @ApiModelProperty(value="最后更新人") | |
110 | + @ApiModelProperty(value = "最后更新人") | |
111 | 111 | private String lastUpdatedBy; |
112 | 112 | |
113 | 113 | /** |
114 | 114 | * 状态 |
115 | 115 | */ |
116 | 116 | @TableField(value = "status") |
117 | - @ApiModelProperty(value="状态") | |
117 | + @ApiModelProperty(value = "状态") | |
118 | 118 | private String status; |
119 | 119 | |
120 | 120 | /** |
121 | 121 | * 状态 |
122 | 122 | */ |
123 | 123 | @TableField(value = "lastStatus") |
124 | - @ApiModelProperty(value="状态") | |
124 | + @ApiModelProperty(value = "状态") | |
125 | 125 | private String lastStatus; |
126 | 126 | |
127 | 127 | @TableField(value = "useCount") |
128 | - @ApiModelProperty(value="生成任务计数") | |
128 | + @ApiModelProperty(value = "生成任务计数") | |
129 | 129 | @Excel(name = "生成任务计数") |
130 | 130 | private int useCount; |
131 | 131 | |
132 | 132 | @TableField(value = "movementCount") |
133 | - @ApiModelProperty(value="移库计数") | |
133 | + @ApiModelProperty(value = "移库计数") | |
134 | 134 | @Excel(name = "移库计数") |
135 | 135 | private int movementCount; |
136 | 136 | /** |
137 | 137 | * 启用;0—禁用 |
138 | 138 | */ |
139 | 139 | @TableField(value = "enable") |
140 | - @ApiModelProperty(value="启用;0—禁用") | |
140 | + @ApiModelProperty(value = "启用;0—禁用") | |
141 | 141 | @Excel(name = "是否启用", prompt = "启用;0 禁用:1") |
142 | 142 | private Boolean enable; |
143 | 143 | |
... | ... | @@ -145,85 +145,90 @@ public class Container implements Serializable { |
145 | 145 | * 打印次数 |
146 | 146 | */ |
147 | 147 | @TableField(value = "printNum") |
148 | - @ApiModelProperty(value="打印次数") | |
148 | + @ApiModelProperty(value = "打印次数") | |
149 | 149 | private Integer printNum; |
150 | 150 | |
151 | 151 | /** |
152 | 152 | * 数据版本 |
153 | 153 | */ |
154 | 154 | @TableField(value = "version") |
155 | - @ApiModelProperty(value="数据版本") | |
155 | + @ApiModelProperty(value = "数据版本") | |
156 | 156 | private Integer version; |
157 | 157 | |
158 | 158 | /** |
159 | 159 | * 自定义字段1 |
160 | 160 | */ |
161 | 161 | @TableField(value = "userDef1") |
162 | - @ApiModelProperty(value="自定义字段1") | |
162 | + @ApiModelProperty(value = "自定义字段1") | |
163 | 163 | private String userDef1; |
164 | 164 | |
165 | 165 | /** |
166 | 166 | * 自定义字段2 |
167 | 167 | */ |
168 | 168 | @TableField(value = "userDef2") |
169 | - @ApiModelProperty(value="自定义字段2") | |
169 | + @ApiModelProperty(value = "自定义字段2") | |
170 | 170 | private String userDef2; |
171 | 171 | |
172 | 172 | /** |
173 | 173 | * 自定义字段3 |
174 | 174 | */ |
175 | 175 | @TableField(value = "userDef3") |
176 | - @ApiModelProperty(value="自定义字段3") | |
176 | + @ApiModelProperty(value = "自定义字段3") | |
177 | 177 | private String userDef3; |
178 | 178 | |
179 | 179 | /** |
180 | 180 | * 自定义字段4 |
181 | 181 | */ |
182 | 182 | @TableField(value = "userDef4") |
183 | - @ApiModelProperty(value="自定义字段4") | |
183 | + @ApiModelProperty(value = "自定义字段4") | |
184 | 184 | private String userDef4; |
185 | 185 | |
186 | 186 | /** |
187 | 187 | * 自定义字段5 |
188 | 188 | */ |
189 | 189 | @TableField(value = "userDef5") |
190 | - @ApiModelProperty(value="自定义字段5") | |
190 | + @ApiModelProperty(value = "自定义字段5") | |
191 | 191 | private String userDef5; |
192 | 192 | |
193 | 193 | /** |
194 | 194 | * 自定义字段6 |
195 | 195 | */ |
196 | 196 | @TableField(value = "userDef6") |
197 | - @ApiModelProperty(value="自定义字段6") | |
197 | + @ApiModelProperty(value = "自定义字段6") | |
198 | 198 | private String userDef6; |
199 | 199 | |
200 | 200 | /** |
201 | 201 | * 自定义字段7 |
202 | 202 | */ |
203 | 203 | @TableField(value = "userDef7") |
204 | - @ApiModelProperty(value="自定义字段7") | |
204 | + @ApiModelProperty(value = "自定义字段7") | |
205 | 205 | private String userDef7; |
206 | 206 | |
207 | 207 | /** |
208 | 208 | * 自定义字段8 |
209 | 209 | */ |
210 | 210 | @TableField(value = "userDef8") |
211 | - @ApiModelProperty(value="自定义字段8") | |
211 | + @ApiModelProperty(value = "自定义字段8") | |
212 | 212 | private String userDef8; |
213 | 213 | |
214 | 214 | /** |
215 | 215 | * 处理标记 |
216 | 216 | */ |
217 | 217 | @TableField(value = "processStamp") |
218 | - @ApiModelProperty(value="处理标记") | |
218 | + @ApiModelProperty(value = "处理标记") | |
219 | 219 | private String processStamp; |
220 | 220 | |
221 | - /** | |
222 | - * 打印机名称 | |
223 | - * 当该类模板调用时 | |
224 | - */ | |
225 | - // private static final String printName = "Bar Code Printer T-4503E"; | |
226 | - private static final long serialVersionUID = 1L; | |
221 | + | |
222 | + @TableField(value = "flat") | |
223 | + @ApiModelProperty(value = "是否平库") | |
224 | + private Integer flat; | |
225 | + | |
226 | + /** | |
227 | + * 打印机名称 | |
228 | + * 当该类模板调用时 | |
229 | + */ | |
230 | + // private static final String printName = "Bar Code Printer T-4503E"; | |
231 | + private static final long serialVersionUID = 1L; | |
227 | 232 | |
228 | 233 | @Override |
229 | 234 | public String toString() { |
... | ... | @@ -246,8 +251,8 @@ public class Container implements Serializable { |
246 | 251 | sb.append(", enable=").append(enable); |
247 | 252 | sb.append(", printNum=").append(printNum); |
248 | 253 | sb.append(", version=").append(version); |
249 | - // sb.append(", printName").append(printName); | |
250 | - sb.append(", userDef1=").append(userDef1); | |
254 | + // sb.append(", printName").append(printName); | |
255 | + sb.append(", userDef1=").append(userDef1); | |
251 | 256 | sb.append(", userDef2=").append(userDef2); |
252 | 257 | sb.append(", userDef3=").append(userDef3); |
253 | 258 | sb.append(", userDef4=").append(userDef4); |
... | ... |
src/main/java/com/huaheng/pc/config/zone/controller/ZoneController.java
... | ... | @@ -109,17 +109,12 @@ public class ZoneController extends BaseController { |
109 | 109 | @PostMapping("/add") |
110 | 110 | @ResponseBody |
111 | 111 | public AjaxResult addSave(Zone zone) { |
112 | - zone.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
113 | - zone.setCreatedBy(ShiroUtils.getName()); | |
114 | - zone.setLastUpdatedBy(ShiroUtils.getName()); | |
115 | - zone.setZoneDescribe(zone.getZoneDescribe()); | |
116 | - zone.setZoneType(zone.getLocationType()); | |
117 | - try { | |
118 | - zoneService.dataValidation(zone); | |
119 | - } catch (Exception e) { | |
120 | - return AjaxResult.error(e.getMessage()); | |
121 | - } | |
122 | - return toAjax(zoneService.save(zone)); | |
112 | + //try { | |
113 | + // zoneService.dataValidation(zone); | |
114 | + //} catch (Exception e) { | |
115 | + // return AjaxResult.error(e.getMessage()); | |
116 | + //} | |
117 | + return toAjax(zoneService.saveZone(zone)); | |
123 | 118 | } |
124 | 119 | |
125 | 120 | /** |
... | ... | @@ -155,10 +150,7 @@ public class ZoneController extends BaseController { |
155 | 150 | if (StringUtils.isEmpty(ids)) { |
156 | 151 | return AjaxResult.error("id不能为空"); |
157 | 152 | } |
158 | - for (Integer id : Convert.toIntArray(ids)) { | |
159 | - Zone record = new Zone(); | |
160 | - zoneService.removeById(id); | |
161 | - } | |
153 | + zoneService.removeZoneById(ids); | |
162 | 154 | return AjaxResult.success("删除成功!"); |
163 | 155 | } |
164 | 156 | |
... | ... |
src/main/java/com/huaheng/pc/config/zone/service/ZoneService.java
... | ... | @@ -6,22 +6,29 @@ import com.huaheng.pc.config.zone.domain.Zone; |
6 | 6 | import java.util.List; |
7 | 7 | import java.util.Map; |
8 | 8 | |
9 | -public interface ZoneService extends IService<Zone>{ | |
9 | +public interface ZoneService extends IService<Zone> { | |
10 | 10 | public List<Map<String, Object>> getZoneCodeList(); |
11 | 11 | |
12 | 12 | /* 复制库区表*/ |
13 | 13 | boolean zoneCopy(String warehouseCode, String newWarehouseCode); |
14 | 14 | |
15 | - boolean exists(String code,String warehouseCode); | |
15 | + boolean exists(String code, String warehouseCode); | |
16 | 16 | |
17 | 17 | List<Map<String, Object>> getCode(); |
18 | 18 | |
19 | + List<Map<String, Object>> getZoneFlatCodeList(); | |
20 | + | |
19 | 21 | Zone getZoneByArea(String area); |
20 | 22 | |
21 | 23 | /** |
22 | 24 | * 数据校验 |
25 | + * | |
23 | 26 | * @param zone 待校验数据 |
24 | 27 | * @throws Exception 错误提升 |
25 | 28 | */ |
26 | 29 | void dataValidation(Zone zone) throws Exception; |
30 | + | |
31 | + int saveZone(Zone zone); | |
32 | + | |
33 | + void removeZoneById(String id); | |
27 | 34 | } |
... | ... |
src/main/java/com/huaheng/pc/config/zone/service/ZoneServiceImpl.java
... | ... | @@ -3,12 +3,23 @@ package com.huaheng.pc.config.zone.service; |
3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | 5 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
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.common.utils.security.ShiroUtils; |
10 | +import com.huaheng.framework.web.domain.AjaxResult; | |
9 | 11 | import com.huaheng.pc.config.company.domain.Company; |
12 | +import com.huaheng.pc.config.container.domain.Container; | |
13 | +import com.huaheng.pc.config.container.service.ContainerService; | |
14 | +import com.huaheng.pc.config.containerType.domain.ContainerType; | |
15 | +import com.huaheng.pc.config.containerType.service.ContainerTypeService; | |
16 | +import com.huaheng.pc.config.location.domain.Location; | |
17 | +import com.huaheng.pc.config.location.service.LocationService; | |
18 | +import com.huaheng.pc.config.locationType.domain.LocationType; | |
19 | +import com.huaheng.pc.config.locationType.service.LocationTypeService; | |
10 | 20 | import com.huaheng.pc.config.zone.domain.Zone; |
11 | 21 | import com.huaheng.pc.config.zone.mapper.ZoneMapper; |
22 | +import org.springframework.beans.factory.annotation.Autowired; | |
12 | 23 | import org.springframework.stereotype.Service; |
13 | 24 | import org.springframework.transaction.annotation.Transactional; |
14 | 25 | |
... | ... | @@ -21,6 +32,16 @@ public class ZoneServiceImpl extends ServiceImpl<ZoneMapper, Zone> implements Zo |
21 | 32 | |
22 | 33 | @Resource |
23 | 34 | private ZoneMapper zoneMapper; |
35 | + @Autowired | |
36 | + private ZoneService zoneService; | |
37 | + @Resource | |
38 | + private LocationTypeService locationTypeService; | |
39 | + @Resource | |
40 | + private LocationService locationService; | |
41 | + @Resource | |
42 | + private ContainerService containerService; | |
43 | + @Resource | |
44 | + private ContainerTypeService containerTypeService; | |
24 | 45 | |
25 | 46 | @Override |
26 | 47 | public List<Map<String, Object>> getZoneCodeList() { |
... | ... | @@ -35,18 +56,17 @@ public class ZoneServiceImpl extends ServiceImpl<ZoneMapper, Zone> implements Zo |
35 | 56 | public boolean zoneCopy(String warehouseCode, String newWarehouseCode) { |
36 | 57 | int i = 0; |
37 | 58 | //复制流程主表 |
38 | - i = zoneMapper.zoneCopy(warehouseCode,newWarehouseCode); | |
39 | - if(i < 1){ | |
59 | + i = zoneMapper.zoneCopy(warehouseCode, newWarehouseCode); | |
60 | + if (i < 1) { | |
40 | 61 | throw new ServiceException("复制菜单数据失败"); |
41 | 62 | } |
42 | 63 | return true; |
43 | 64 | } |
44 | 65 | |
45 | 66 | @Override |
46 | - public boolean exists(String code,String warehouseCode) | |
47 | - { | |
67 | + public boolean exists(String code, String warehouseCode) { | |
48 | 68 | LambdaQueryWrapper<Zone> lambda = Wrappers.lambdaQuery(); |
49 | - lambda.eq(Zone::getCode,code) | |
69 | + lambda.eq(Zone::getCode, code) | |
50 | 70 | .eq(Zone::getWarehouseCode, warehouseCode); |
51 | 71 | return this.listMaps(lambda).size() != 0; |
52 | 72 | } |
... | ... | @@ -59,6 +79,16 @@ public class ZoneServiceImpl extends ServiceImpl<ZoneMapper, Zone> implements Zo |
59 | 79 | return this.listMaps(lambda); |
60 | 80 | } |
61 | 81 | |
82 | + | |
83 | + @Override | |
84 | + public List<Map<String, Object>> getZoneFlatCodeList() { | |
85 | + LambdaQueryWrapper<Zone> lambda = Wrappers.lambdaQuery(); | |
86 | + lambda.select(Zone::getCode, Zone::getId, Zone::getName) | |
87 | + .eq(Zone::getZoneType, "平库") | |
88 | + .eq(Zone::getWarehouseCode, ShiroUtils.getWarehouseCode()); | |
89 | + return this.listMaps(lambda); | |
90 | + } | |
91 | + | |
62 | 92 | @Override |
63 | 93 | public Zone getZoneByArea(String area) { |
64 | 94 | LambdaQueryWrapper<Zone> zoneLambdaQueryWrapper = Wrappers.lambdaQuery(); |
... | ... | @@ -69,17 +99,163 @@ public class ZoneServiceImpl extends ServiceImpl<ZoneMapper, Zone> implements Zo |
69 | 99 | |
70 | 100 | @Override |
71 | 101 | public void dataValidation(Zone zone) throws Exception { |
72 | - if (StringUtils.isEmpty(zone.getCode())){ | |
102 | + if (StringUtils.isEmpty(zone.getCode())) { | |
73 | 103 | throw new Exception("库区编码不能为空值!"); |
74 | 104 | } |
75 | - if (StringUtils.isEmpty(zone.getWarehouseCode())){ | |
105 | + if (StringUtils.isEmpty(zone.getWarehouseCode())) { | |
76 | 106 | throw new Exception("仓库编码不能为空值!"); |
77 | 107 | } |
78 | 108 | LambdaQueryWrapper<Zone> query = Wrappers.lambdaQuery(); |
79 | 109 | query.eq(Zone::getCode, zone.getCode()). |
80 | 110 | eq(Zone::getWarehouseCode, zone.getWarehouseCode()); |
81 | - if (this.getOne(query) != null){ | |
111 | + if (this.getOne(query) != null) { | |
82 | 112 | throw new Exception("库区编码已存在!"); |
83 | 113 | } |
84 | 114 | } |
115 | + | |
116 | + @Transactional | |
117 | + @Override | |
118 | + public int saveZone(Zone zone) { | |
119 | + zone.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
120 | + zone.setCreatedBy(ShiroUtils.getName()); | |
121 | + zone.setLastUpdatedBy(ShiroUtils.getName()); | |
122 | + zone.setZoneDescribe(zone.getZoneDescribe()); | |
123 | + zone.setEnable("1"); | |
124 | + | |
125 | + if (StringUtils.isEmpty(zone.getCode())) { | |
126 | + throw new ServiceException(("库区编码不能为空值!")); | |
127 | + } | |
128 | + if (getOne(new LambdaQueryWrapper<Zone>().eq(Zone::getCode, zone.getCode()).eq(Zone::getWarehouseCode, zone.getWarehouseCode())) != null) { | |
129 | + throw new ServiceException(("库区编码已存在!")); | |
130 | + } | |
131 | + //如果新增平库库区,需要新增库位类型和库位,容器类型和容器 | |
132 | + | |
133 | + if (zone.getZoneType().equals(QuantityConstant.ZONE_TYPE_PK)) { | |
134 | + //新增库位类型 | |
135 | + String locationTypeCode = addLocationType(zone); | |
136 | + zone.setLocationType(locationTypeCode); | |
137 | + //新增库位 | |
138 | + addLocation(zone, locationTypeCode); | |
139 | + //新增容器类型 | |
140 | + String containerTypeCode = addContainerType(zone, locationTypeCode); | |
141 | + //新增容器 | |
142 | + addContainer(zone, containerTypeCode); | |
143 | + } | |
144 | + | |
145 | + zone.setZoneType(zone.getZoneType()); | |
146 | + return zoneMapper.insert(zone); | |
147 | + } | |
148 | + | |
149 | + | |
150 | + private void addContainer(Zone zone, String containerTypeCode) { | |
151 | + Container container = new Container(); | |
152 | + container.setCode(zone.getCode() + "TP"); | |
153 | + container.setWarehouseCode(zone.getWarehouseCode()); | |
154 | + container.setContainerType(containerTypeCode); | |
155 | + container.setCreatedBy(zone.getCreatedBy()); | |
156 | + container.setLastUpdatedBy(zone.getLastUpdatedBy()); | |
157 | + container.setEnable(true); | |
158 | + container.setStatus("empty"); | |
159 | + container.setFlat(1); | |
160 | + boolean save = containerService.save(container); | |
161 | + if (!save) { | |
162 | + throw new ServiceException("新增容器失败"); | |
163 | + } | |
164 | + } | |
165 | + | |
166 | + private String addContainerType(Zone zone, String locationTypeCode) { | |
167 | + ContainerType containerType = new ContainerType(); | |
168 | + containerType.setCode(zone.getCode()); | |
169 | + containerType.setName(zone.getName() + "托盘"); | |
170 | + containerType.setWarehouseCode(zone.getWarehouseCode()); | |
171 | + containerType.setCreatedBy(zone.getCreatedBy()); | |
172 | + containerType.setLastUpdatedBy(zone.getLastUpdatedBy()); | |
173 | + containerType.setLocationType(locationTypeCode); | |
174 | + containerType.setEnable(true); | |
175 | + containerType.setFillPercent(100); | |
176 | + boolean save = containerTypeService.save(containerType); | |
177 | + if (!save) { | |
178 | + throw new ServiceException("新增容器类型失败"); | |
179 | + } | |
180 | + return containerType.getCode(); | |
181 | + } | |
182 | + | |
183 | + private void addLocation(Zone zone, String locationTypeCode) { | |
184 | + Location location = new Location(); | |
185 | + location.setCode(zone.getCode() + "KW"); | |
186 | + location.setWarehouseCode(zone.getWarehouseCode()); | |
187 | + location.setLocationType(locationTypeCode); | |
188 | + location.setStatus("empty"); | |
189 | + location.setCreatedBy(zone.getCreatedBy()); | |
190 | + location.setZoneCode(zone.getCode()); | |
191 | + location.setArea(zone.getArea()); | |
192 | + location.setIColumn(1); | |
193 | + location.setIRow(1); | |
194 | + location.setILayer(1); | |
195 | + location.setIGrid(1); | |
196 | + location.setRowFlag(0); | |
197 | + location.setRoadway("1"); | |
198 | + location.setZoneCode(zone.getCode()); | |
199 | + boolean save = locationService.save(location); | |
200 | + if (!save) { | |
201 | + throw new ServiceException("新增库位失败"); | |
202 | + } | |
203 | + } | |
204 | + | |
205 | + | |
206 | + private String addLocationType(Zone zone) { | |
207 | + LocationType locationType = new LocationType(); | |
208 | + locationType.setCode(zone.getCode()); | |
209 | + locationType.setName(zone.getName() + "库位"); | |
210 | + locationType.setWarehouseCode(zone.getWarehouseCode()); | |
211 | + locationType.setCreatedBy(zone.getCreatedBy()); | |
212 | + locationType.setLastUpdatedBy(zone.getCreatedBy()); | |
213 | + locationType.setHeight("1"); | |
214 | + locationType.setLength("1"); | |
215 | + locationType.setWidth("1"); | |
216 | + locationType.setEnable(true); | |
217 | + locationType.setZoneCode(zone.getCode()); | |
218 | + boolean save = locationTypeService.save(locationType); | |
219 | + if (!save) { | |
220 | + throw new ServiceException("新增库位类型失败"); | |
221 | + } | |
222 | + return locationType.getCode(); | |
223 | + } | |
224 | + | |
225 | + | |
226 | + @Override | |
227 | + @Transactional | |
228 | + public void removeZoneById(String id) { | |
229 | + boolean remove = false; | |
230 | + Zone zone = getById(id); | |
231 | + if (zone == null) { | |
232 | + throw new ServiceException("库区不存在"); | |
233 | + } | |
234 | + if (zone.getZoneType().equals(QuantityConstant.ZONE_TYPE_PK)) { | |
235 | + //删除库位类型 | |
236 | + remove = locationTypeService.remove(new LambdaQueryWrapper<LocationType>().eq(LocationType::getCode, zone.getCode())); | |
237 | + if (!remove) { | |
238 | + throw new ServiceException("删除库位类型失败"); | |
239 | + } | |
240 | + //删除库位 | |
241 | + remove = locationService.remove(new LambdaQueryWrapper<Location>().eq(Location::getLocationType, zone.getCode())); | |
242 | + if (!remove) { | |
243 | + throw new ServiceException("删除库位失败"); | |
244 | + } | |
245 | + //删除容器类型 | |
246 | + remove = containerTypeService.remove(new LambdaQueryWrapper<ContainerType>().eq(ContainerType::getCode, zone.getCode())); | |
247 | + if (!remove) { | |
248 | + throw new ServiceException("删除容器类型失败"); | |
249 | + } | |
250 | + //删除容器 | |
251 | + remove = containerService.remove(new LambdaQueryWrapper<Container>().eq(Container::getContainerType, zone.getCode())); | |
252 | + if (!remove) { | |
253 | + throw new ServiceException("删除容器失败"); | |
254 | + } | |
255 | + } | |
256 | + if (!removeById(id)) { | |
257 | + throw new ServiceException("删除库区失败"); | |
258 | + } | |
259 | + } | |
260 | + | |
85 | 261 | } |
... | ... |
src/main/java/com/huaheng/pc/monitor/apilog/controller/ApiLogController.java
... | ... | @@ -75,7 +75,7 @@ public class ApiLogController extends BaseController { |
75 | 75 | Date requestTime = new Date(); |
76 | 76 | try { |
77 | 77 | requestTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD, endRequestTime); |
78 | - }catch (Exception e){ | |
78 | + } catch (Exception e) { | |
79 | 79 | |
80 | 80 | } |
81 | 81 | requestTime = DateUtils.addDays(requestTime, 1); |
... | ... | @@ -85,10 +85,11 @@ public class ApiLogController extends BaseController { |
85 | 85 | .eq(StringUtils.isNotEmpty(apiLog.getRequestFrom()), ApiLog::getRequestFrom, apiLog.getRequestFrom()) |
86 | 86 | .eq(StringUtils.isNotEmpty(apiLog.getResponseBy()), ApiLog::getResponseBy, apiLog.getResponseBy()) |
87 | 87 | .like(StringUtils.isNotEmpty(apiLog.getRequestBody()), ApiLog::getRequestBody, apiLog.getRequestBody()) |
88 | + .like(StringUtils.isNotEmpty(apiLog.getResponseBody()), ApiLog::getResponseBody, apiLog.getResponseBody()) | |
88 | 89 | .ge(StringUtils.isNotEmpty(beginRequestTime), ApiLog::getRequestTime, beginRequestTime) |
89 | 90 | .ge(NumberUtils.isDigits(paramDuration), ApiLog::getDuration, paramDuration) |
90 | - .isNotNull("1".equals(hasException),ApiLog::getException) | |
91 | - .isNull("0".equals(hasException),ApiLog::getException) | |
91 | + .isNotNull("1".equals(hasException), ApiLog::getException) | |
92 | + .isNull("0".equals(hasException), ApiLog::getException) | |
92 | 93 | .le(StringUtils.isNotEmpty(endRequestTime), ApiLog::getRequestTime, requestTime) |
93 | 94 | .eq(StringUtils.isNotEmpty(apiLog.getHttpCode()), ApiLog::getHttpCode, apiLog.getHttpCode()) |
94 | 95 | .eq(StringUtils.isNotEmpty(apiLog.getRetCode()), ApiLog::getRetCode, apiLog.getRetCode()).orderByDesc(ApiLog::getId); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/controller/ReceiptContainerDetailController.java
... | ... | @@ -40,27 +40,27 @@ public class ReceiptContainerDetailController extends BaseController { |
40 | 40 | @RequiresPermissions("receipt:receiptContainerDetail:view") |
41 | 41 | @Log(title = "入库-入库详情列表", operating = "入库详情列表", action = BusinessType.GRANT) |
42 | 42 | @GetMapping("/list/{id}") |
43 | - public String list(@PathVariable("id")Integer id, ModelMap mmap) { | |
43 | + public String list(@PathVariable("id") Integer id, ModelMap mmap) { | |
44 | 44 | mmap.put("receiptId", id); |
45 | - return prefix+"/receiptDetail"; | |
45 | + return prefix + "/receiptDetail"; | |
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | 49 | * 查询入库详情 |
50 | 50 | */ |
51 | - @ApiOperation(value="查看入库详情", notes="根据头表id获取入库单明细信息", httpMethod = "POST") | |
51 | + @ApiOperation(value = "查看入库详情", notes = "根据头表id获取入库单明细信息", httpMethod = "POST") | |
52 | 52 | @RequiresPermissions("receipt:receiptDetail:list") |
53 | 53 | @Log(title = "入库-入库单明细管理", operating = "查看入库单明细", action = BusinessType.GRANT) |
54 | 54 | @PostMapping("/list/{id}") |
55 | 55 | @ResponseBody |
56 | - public TableDataInfo list(@ApiParam(name="receiptDetail",value="入库详情") @PathVariable("id")Integer receiptDetailId) { | |
56 | + public TableDataInfo list(@ApiParam(name = "receiptDetail", value = "入库详情") @PathVariable("id") Integer receiptDetailId) { | |
57 | 57 | LambdaQueryWrapper<ReceiptContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); |
58 | 58 | PageDomain pageDomain = TableSupport.buildPageRequest(); |
59 | 59 | Integer pageNum = pageDomain.getPageNum(); |
60 | 60 | Integer pageSize = pageDomain.getPageSize(); |
61 | 61 | lambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptContainerId, receiptDetailId); |
62 | 62 | |
63 | - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
63 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { | |
64 | 64 | /*使用分页查询*/ |
65 | 65 | Page<ReceiptContainerDetail> page = new Page<>(pageNum, pageSize); |
66 | 66 | IPage<ReceiptContainerDetail> iPage = receiptContainerDetailService.page(page, lambdaQueryWrapper); |
... | ... | @@ -76,11 +76,10 @@ public class ReceiptContainerDetailController extends BaseController { |
76 | 76 | @PostMapping("remove") |
77 | 77 | @ResponseBody |
78 | 78 | public AjaxResult remove(String ids) { |
79 | - if (StringUtils.isEmpty(ids)){ | |
79 | + if (StringUtils.isEmpty(ids)) { | |
80 | 80 | return AjaxResult.error("id不能为空"); |
81 | 81 | } |
82 | - | |
83 | 82 | List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); |
84 | - return toAjax(receiptContainerDetailService.detailRemove(idList)); | |
83 | + return handleMultiProcess(() -> toAjax(receiptContainerDetailService.detailRemove(idList))); | |
85 | 84 | } |
86 | 85 | } |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/domain/ReceiptContainerDetail.java
... | ... | @@ -9,352 +9,356 @@ import java.io.Serializable; |
9 | 9 | import java.math.BigDecimal; |
10 | 10 | import java.util.Date; |
11 | 11 | |
12 | -@ApiModel(value="com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail") | |
12 | +@ApiModel(value = "com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail") | |
13 | 13 | @TableName(value = "receipt_container_detail") |
14 | 14 | @Data |
15 | 15 | public class ReceiptContainerDetail implements Serializable { |
16 | 16 | /** |
17 | 17 | * ID |
18 | 18 | */ |
19 | - @TableId(value = "id", type = IdType.AUTO) | |
20 | - @ApiModelProperty(value="ID") | |
19 | + @TableId(value = "id", type = IdType.AUTO) | |
20 | + @ApiModelProperty(value = "ID") | |
21 | 21 | private Integer id; |
22 | 22 | |
23 | 23 | /** |
24 | 24 | * 主表标识 |
25 | 25 | */ |
26 | 26 | @TableField(value = "receiptContainerId") |
27 | - @ApiModelProperty(value="主表标识") | |
27 | + @ApiModelProperty(value = "主表标识") | |
28 | 28 | private Integer receiptContainerId; |
29 | 29 | |
30 | 30 | /** |
31 | 31 | * 仓库 |
32 | 32 | */ |
33 | 33 | @TableField(value = "warehouseCode") |
34 | - @ApiModelProperty(value="仓库") | |
34 | + @ApiModelProperty(value = "仓库") | |
35 | 35 | private String warehouseCode; |
36 | 36 | |
37 | 37 | /** |
38 | 38 | * 入库单内部号 |
39 | 39 | */ |
40 | 40 | @TableField(value = "receiptId") |
41 | - @ApiModelProperty(value="入库单内部号") | |
41 | + @ApiModelProperty(value = "入库单内部号") | |
42 | 42 | private Integer receiptId; |
43 | 43 | |
44 | 44 | /** |
45 | 45 | * 入库单明细行号 |
46 | 46 | */ |
47 | 47 | @TableField(value = "receiptDetailId") |
48 | - @ApiModelProperty(value="入库单明细行号") | |
48 | + @ApiModelProperty(value = "入库单明细行号") | |
49 | 49 | private Integer receiptDetailId; |
50 | 50 | |
51 | 51 | /** |
52 | 52 | * 入库单编码 |
53 | 53 | */ |
54 | 54 | @TableField(value = "receiptCode") |
55 | - @ApiModelProperty(value="入库单编码") | |
55 | + @ApiModelProperty(value = "入库单编码") | |
56 | 56 | private String receiptCode; |
57 | 57 | |
58 | 58 | /** |
59 | 59 | * 入库单类型 |
60 | 60 | */ |
61 | 61 | @TableField(value = "receiptType") |
62 | - @ApiModelProperty(value="入库单类型") | |
62 | + @ApiModelProperty(value = "入库单类型") | |
63 | 63 | private String receiptType; |
64 | 64 | |
65 | 65 | /** |
66 | 66 | * 库位编码 |
67 | 67 | */ |
68 | 68 | @TableField(value = "locationCode") |
69 | - @ApiModelProperty(value="库位编码") | |
69 | + @ApiModelProperty(value = "库位编码") | |
70 | 70 | private String locationCode; |
71 | 71 | |
72 | 72 | /** |
73 | 73 | * 货箱号 |
74 | 74 | */ |
75 | 75 | @TableField(value = "containerCode") |
76 | - @ApiModelProperty(value="货箱号") | |
76 | + @ApiModelProperty(value = "货箱号") | |
77 | 77 | private String containerCode; |
78 | 78 | |
79 | 79 | /** |
80 | 80 | * 货箱类型 |
81 | 81 | */ |
82 | 82 | @TableField(value = "containerType") |
83 | - @ApiModelProperty(value="货箱类型") | |
83 | + @ApiModelProperty(value = "货箱类型") | |
84 | 84 | private String containerType; |
85 | 85 | |
86 | 86 | /** |
87 | 87 | * 任务类型 |
88 | 88 | */ |
89 | 89 | @TableField(value = "taskType") |
90 | - @ApiModelProperty(value="任务类型") | |
90 | + @ApiModelProperty(value = "任务类型") | |
91 | 91 | private Integer taskType; |
92 | 92 | |
93 | 93 | /** |
94 | 94 | * 货主 |
95 | 95 | */ |
96 | 96 | @TableField(value = "companyCode") |
97 | - @ApiModelProperty(value="货主") | |
97 | + @ApiModelProperty(value = "货主") | |
98 | 98 | private String companyCode; |
99 | 99 | |
100 | 100 | /** |
101 | 101 | * 物料 |
102 | 102 | */ |
103 | 103 | @TableField(value = "materialCode") |
104 | - @ApiModelProperty(value="物料") | |
104 | + @ApiModelProperty(value = "物料") | |
105 | 105 | private String materialCode; |
106 | 106 | |
107 | 107 | /** |
108 | 108 | * 物料名称 |
109 | 109 | */ |
110 | 110 | @TableField(value = "materialName") |
111 | - @ApiModelProperty(value="物料名称") | |
111 | + @ApiModelProperty(value = "物料名称") | |
112 | 112 | private String materialName; |
113 | 113 | |
114 | 114 | /** |
115 | 115 | * 物料规格 |
116 | 116 | */ |
117 | 117 | @TableField(value = "materialSpec") |
118 | - @ApiModelProperty(value="物料规格") | |
118 | + @ApiModelProperty(value = "物料规格") | |
119 | 119 | private String materialSpec; |
120 | 120 | |
121 | 121 | /** |
122 | 122 | * 物料单位 |
123 | 123 | */ |
124 | 124 | @TableField(value = "materialUnit") |
125 | - @ApiModelProperty(value="物料单位") | |
125 | + @ApiModelProperty(value = "物料单位") | |
126 | 126 | private String materialUnit; |
127 | 127 | |
128 | 128 | /** |
129 | 129 | * 数量 |
130 | 130 | */ |
131 | 131 | @TableField(value = "qty") |
132 | - @ApiModelProperty(value="数量") | |
132 | + @ApiModelProperty(value = "数量") | |
133 | 133 | private BigDecimal qty; |
134 | 134 | |
135 | 135 | /** |
136 | 136 | * 状态 |
137 | 137 | */ |
138 | 138 | @TableField(value = "status") |
139 | - @ApiModelProperty(value="状态") | |
139 | + @ApiModelProperty(value = "状态") | |
140 | 140 | private Integer status; |
141 | 141 | |
142 | 142 | /** |
143 | 143 | * 属性号 |
144 | 144 | */ |
145 | 145 | @TableField(value = "attributeId") |
146 | - @ApiModelProperty(value="属性号") | |
146 | + @ApiModelProperty(value = "属性号") | |
147 | 147 | private Integer attributeId; |
148 | 148 | |
149 | 149 | /** |
150 | 150 | * 属性1 |
151 | 151 | */ |
152 | 152 | @TableField(value = "attribute1") |
153 | - @ApiModelProperty(value="属性1") | |
153 | + @ApiModelProperty(value = "属性1") | |
154 | 154 | private String attribute1; |
155 | 155 | |
156 | 156 | /** |
157 | 157 | * 属性2 |
158 | 158 | */ |
159 | 159 | @TableField(value = "attribute2") |
160 | - @ApiModelProperty(value="属性2") | |
160 | + @ApiModelProperty(value = "属性2") | |
161 | 161 | private String attribute2; |
162 | 162 | |
163 | 163 | /** |
164 | 164 | * 属性3 |
165 | 165 | */ |
166 | 166 | @TableField(value = "attribute3") |
167 | - @ApiModelProperty(value="属性3") | |
167 | + @ApiModelProperty(value = "属性3") | |
168 | 168 | private String attribute3; |
169 | 169 | |
170 | 170 | /** |
171 | 171 | * 属性4 |
172 | 172 | */ |
173 | 173 | @TableField(value = "attribute4") |
174 | - @ApiModelProperty(value="属性4") | |
174 | + @ApiModelProperty(value = "属性4") | |
175 | 175 | private String attribute4; |
176 | 176 | |
177 | 177 | /** |
178 | 178 | * 供应商编码 |
179 | 179 | */ |
180 | 180 | @TableField(value = "supplierCode") |
181 | - @ApiModelProperty(value="供应商编码") | |
181 | + @ApiModelProperty(value = "供应商编码") | |
182 | 182 | private String supplierCode; |
183 | 183 | |
184 | 184 | /** |
185 | 185 | * 批次 |
186 | 186 | */ |
187 | 187 | @TableField(value = "batch") |
188 | - @ApiModelProperty(value="批次") | |
188 | + @ApiModelProperty(value = "批次") | |
189 | 189 | private String batch; |
190 | 190 | |
191 | 191 | /** |
192 | 192 | * 批号 |
193 | 193 | */ |
194 | 194 | @TableField(value = "lot") |
195 | - @ApiModelProperty(value="批号") | |
195 | + @ApiModelProperty(value = "批号") | |
196 | 196 | private String lot; |
197 | 197 | |
198 | 198 | /** |
199 | 199 | * 项目号 |
200 | 200 | */ |
201 | 201 | @TableField(value = "projectNo") |
202 | - @ApiModelProperty(value="项目号") | |
202 | + @ApiModelProperty(value = "项目号") | |
203 | 203 | private String projectNo; |
204 | 204 | |
205 | 205 | /** |
206 | 206 | * 重量 |
207 | 207 | */ |
208 | 208 | @TableField(value = "weight") |
209 | - @ApiModelProperty(value="重量") | |
209 | + @ApiModelProperty(value = "重量") | |
210 | 210 | private String weight; |
211 | 211 | |
212 | 212 | /** |
213 | 213 | * 生产日期 |
214 | 214 | */ |
215 | 215 | @TableField(value = "manufactureDate") |
216 | - @ApiModelProperty(value="生产日期") | |
216 | + @ApiModelProperty(value = "生产日期") | |
217 | 217 | private Date manufactureDate; |
218 | 218 | |
219 | 219 | /** |
220 | 220 | * 失效日期 |
221 | 221 | */ |
222 | 222 | @TableField(value = "expirationDate") |
223 | - @ApiModelProperty(value="失效日期") | |
223 | + @ApiModelProperty(value = "失效日期") | |
224 | 224 | private Date expirationDate; |
225 | 225 | |
226 | 226 | /** |
227 | 227 | * 入库日期 |
228 | 228 | */ |
229 | 229 | @TableField(value = "agingDate") |
230 | - @ApiModelProperty(value="入库日期") | |
230 | + @ApiModelProperty(value = "入库日期") | |
231 | 231 | private Date agingDate; |
232 | 232 | |
233 | 233 | /** |
234 | 234 | * 库存状态 |
235 | 235 | */ |
236 | 236 | @TableField(value = "inventorySts") |
237 | - @ApiModelProperty(value="库存状态") | |
237 | + @ApiModelProperty(value = "库存状态") | |
238 | 238 | private String inventorySts; |
239 | 239 | |
240 | 240 | /** |
241 | 241 | * 任务已创建 |
242 | 242 | */ |
243 | 243 | @TableField(value = "taskCreated") |
244 | - @ApiModelProperty(value="任务已创建") | |
244 | + @ApiModelProperty(value = "任务已创建") | |
245 | 245 | private Integer taskCreated; |
246 | 246 | |
247 | 247 | /** |
248 | 248 | * 换算数量 |
249 | 249 | */ |
250 | 250 | @TableField(value = "convertedQty") |
251 | - @ApiModelProperty(value="换算数量") | |
251 | + @ApiModelProperty(value = "换算数量") | |
252 | 252 | private Integer convertedQty; |
253 | 253 | |
254 | 254 | /** |
255 | 255 | * 换算单位 |
256 | 256 | */ |
257 | 257 | @TableField(value = "convertedQtyUnit") |
258 | - @ApiModelProperty(value="换算单位") | |
258 | + @ApiModelProperty(value = "换算单位") | |
259 | 259 | private String convertedQtyUnit; |
260 | 260 | |
261 | 261 | /** |
262 | 262 | * 创建时间 |
263 | 263 | */ |
264 | 264 | @TableField(value = "created", fill = FieldFill.INSERT) |
265 | - @ApiModelProperty(value="创建时间") | |
265 | + @ApiModelProperty(value = "创建时间") | |
266 | 266 | private Date created; |
267 | 267 | |
268 | 268 | /** |
269 | 269 | * 创建用户 |
270 | 270 | */ |
271 | 271 | @TableField(value = "createdBy", fill = FieldFill.INSERT) |
272 | - @ApiModelProperty(value="创建用户") | |
272 | + @ApiModelProperty(value = "创建用户") | |
273 | 273 | private String createdBy; |
274 | 274 | |
275 | 275 | /** |
276 | 276 | * 创建时间 |
277 | 277 | */ |
278 | 278 | @TableField(value = "lastUpdated", fill = FieldFill.INSERT_UPDATE) |
279 | - @ApiModelProperty(value="创建时间") | |
279 | + @ApiModelProperty(value = "创建时间") | |
280 | 280 | private Date lastUpdated; |
281 | 281 | |
282 | 282 | /** |
283 | 283 | * 更新用户 |
284 | 284 | */ |
285 | 285 | @TableField(value = "lastUpdatedBy", fill = FieldFill.INSERT_UPDATE) |
286 | - @ApiModelProperty(value="更新用户") | |
286 | + @ApiModelProperty(value = "更新用户") | |
287 | 287 | private String lastUpdatedBy; |
288 | 288 | |
289 | 289 | /** |
290 | 290 | * 数据版本 |
291 | 291 | */ |
292 | 292 | @TableField(value = "version") |
293 | - @ApiModelProperty(value="数据版本") | |
293 | + @ApiModelProperty(value = "数据版本") | |
294 | 294 | private Integer version; |
295 | 295 | |
296 | 296 | /** |
297 | 297 | * 自定义字段1 |
298 | 298 | */ |
299 | 299 | @TableField(value = "userDef1") |
300 | - @ApiModelProperty(value="自定义字段1") | |
300 | + @ApiModelProperty(value = "自定义字段1") | |
301 | 301 | private String userDef1; |
302 | 302 | |
303 | 303 | /** |
304 | 304 | * 自定义字段2 |
305 | 305 | */ |
306 | 306 | @TableField(value = "userDef2") |
307 | - @ApiModelProperty(value="自定义字段2") | |
307 | + @ApiModelProperty(value = "自定义字段2") | |
308 | 308 | private String userDef2; |
309 | 309 | |
310 | 310 | /** |
311 | 311 | * 自定义字段3 |
312 | 312 | */ |
313 | 313 | @TableField(value = "userDef3") |
314 | - @ApiModelProperty(value="自定义字段3") | |
314 | + @ApiModelProperty(value = "自定义字段3") | |
315 | 315 | private String userDef3; |
316 | 316 | |
317 | 317 | /** |
318 | 318 | * 自定义字段4 |
319 | 319 | */ |
320 | 320 | @TableField(value = "userDef4") |
321 | - @ApiModelProperty(value="自定义字段4") | |
321 | + @ApiModelProperty(value = "自定义字段4") | |
322 | 322 | private String userDef4; |
323 | 323 | |
324 | 324 | /** |
325 | 325 | * 自定义字段5 |
326 | 326 | */ |
327 | 327 | @TableField(value = "userDef5") |
328 | - @ApiModelProperty(value="自定义字段5") | |
328 | + @ApiModelProperty(value = "自定义字段5") | |
329 | 329 | private String userDef5; |
330 | 330 | |
331 | 331 | /** |
332 | 332 | * 自定义字段6 |
333 | 333 | */ |
334 | 334 | @TableField(value = "userDef6") |
335 | - @ApiModelProperty(value="自定义字段6") | |
335 | + @ApiModelProperty(value = "自定义字段6") | |
336 | 336 | private String userDef6; |
337 | 337 | |
338 | 338 | /** |
339 | 339 | * 自定义字段7 |
340 | 340 | */ |
341 | 341 | @TableField(value = "userDef7") |
342 | - @ApiModelProperty(value="自定义字段7") | |
342 | + @ApiModelProperty(value = "自定义字段7") | |
343 | 343 | private String userDef7; |
344 | 344 | |
345 | 345 | /** |
346 | 346 | * 自定义字段8 |
347 | 347 | */ |
348 | 348 | @TableField(value = "userDef8") |
349 | - @ApiModelProperty(value="自定义字段8") | |
349 | + @ApiModelProperty(value = "自定义字段8") | |
350 | 350 | private String userDef8; |
351 | 351 | |
352 | 352 | /** |
353 | 353 | * 处理标记 |
354 | 354 | */ |
355 | 355 | @TableField(value = "processStamp") |
356 | - @ApiModelProperty(value="处理标记") | |
356 | + @ApiModelProperty(value = "处理标记") | |
357 | 357 | private String processStamp; |
358 | 358 | |
359 | + | |
360 | + @TableField(value = "flat") | |
361 | + @ApiModelProperty(value = "是否平库") | |
362 | + private Integer flat; | |
359 | 363 | private static final long serialVersionUID = 1L; |
360 | -} | |
361 | 364 | \ No newline at end of file |
365 | +} | |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailServiceImpl.java
... | ... | @@ -9,6 +9,8 @@ import com.huaheng.common.utils.StringUtils; |
9 | 9 | import com.huaheng.common.utils.security.ShiroUtils; |
10 | 10 | import com.huaheng.framework.web.domain.AjaxResult; |
11 | 11 | import com.huaheng.mobile.receipt.ReceiptBill; |
12 | +import com.huaheng.pc.config.container.domain.Container; | |
13 | +import com.huaheng.pc.config.container.service.ContainerService; | |
12 | 14 | import com.huaheng.pc.config.location.service.LocationService; |
13 | 15 | import com.huaheng.pc.config.material.domain.Material; |
14 | 16 | import com.huaheng.pc.config.material.service.MaterialService; |
... | ... | @@ -41,6 +43,9 @@ public class ReceiptContainerDetailServiceImpl extends ServiceImpl<ReceiptContai |
41 | 43 | @Resource |
42 | 44 | private LocationService locationService; |
43 | 45 | |
46 | + @Resource | |
47 | + private ContainerService containerService; | |
48 | + | |
44 | 49 | /** |
45 | 50 | * 根据入库单编码查询入库组盘明细 |
46 | 51 | * |
... | ... | @@ -73,11 +78,19 @@ public class ReceiptContainerDetailServiceImpl extends ServiceImpl<ReceiptContai |
73 | 78 | ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()); |
74 | 79 | receiptDetail.setTaskQty(receiptDetail.getTaskQty().subtract(receiptContainerDetail.getQty())); |
75 | 80 | |
76 | - //如果为临时容器,则删除 | |
77 | - receiptContainerDetail.getContainerCode(); | |
81 | + //如果是临时容器,取消组盘时删除容器表 | |
82 | + //if (receiptContainerDetail.getContainerCode().length() > 6) { | |
83 | + // Container one = containerService.getOne(new LambdaQueryWrapper<Container>().eq(Container::getCode, receiptContainerDetail.getContainerCode())); | |
84 | + // if (one == null) { | |
85 | + // throw new ServiceException("容器表没有该容器,容器号是" + receiptContainerDetail.getContainerCode()); | |
86 | + // } | |
87 | + // if (!containerService.removeById(one)) { | |
88 | + // throw new ServiceException("删除容器表失败,容器号是" + receiptContainerDetail.getContainerCode()); | |
89 | + // } | |
90 | + //} | |
78 | 91 | |
79 | 92 | if (!receiptDetailService.updateById(receiptDetail)) { |
80 | - throw new SecurityException("回滚入库单明细失败"); | |
93 | + throw new ServiceException("回滚入库单明细失败"); | |
81 | 94 | } |
82 | 95 | //删除组盘明细 |
83 | 96 | if (!this.removeById(id)) { |
... | ... | @@ -103,7 +116,7 @@ public class ReceiptContainerDetailServiceImpl extends ServiceImpl<ReceiptContai |
103 | 116 | |
104 | 117 | |
105 | 118 | //如果入库组盘没有该入库单的组盘信息,回滚入库单状态 |
106 | - if (containerDetailList.size() == 0) { | |
119 | + if (containerDetailList.isEmpty()) { | |
107 | 120 | ReceiptHeader receiptHeader = new ReceiptHeader(); |
108 | 121 | receiptHeader.setId(receiptContainerDetail.getReceiptId()); |
109 | 122 | receiptHeader.setFirstStatus(QuantityConstant.RECEIPT_HEADER_RECEIVING); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
... | ... | @@ -40,6 +40,7 @@ import java.util.stream.Collectors; |
40 | 40 | |
41 | 41 | /** |
42 | 42 | * 入库组盘头表控制 |
43 | + * | |
43 | 44 | * @author mahuaheng |
44 | 45 | */ |
45 | 46 | @Controller |
... | ... | @@ -61,8 +62,7 @@ public class ReceiptContainerHeaderController extends BaseController { |
61 | 62 | |
62 | 63 | @RequiresPermissions("receipt:receiptContainer:view") |
63 | 64 | @GetMapping() |
64 | - public String containerCapacity() | |
65 | - { | |
65 | + public String containerCapacity() { | |
66 | 66 | return prefix + "/receiptContainerHeader"; |
67 | 67 | } |
68 | 68 | |
... | ... | @@ -73,8 +73,8 @@ public class ReceiptContainerHeaderController extends BaseController { |
73 | 73 | @Log(title = "入库-入库单组盘", operating = "查看入库组盘列表", action = BusinessType.GRANT) |
74 | 74 | @PostMapping("/list") |
75 | 75 | @ResponseBody |
76 | - public TableDataInfo list(@ApiParam(name="receiptDetail",value="入库组盘头表") ReceiptContainerHeader receiptContainerHeader, | |
77 | - @ApiParam(name = "receiptCode",value = "入库单号")String receiptCode, | |
76 | + public TableDataInfo list(@ApiParam(name = "receiptDetail", value = "入库组盘头表") ReceiptContainerHeader receiptContainerHeader, | |
77 | + @ApiParam(name = "receiptCode", value = "入库单号") String receiptCode, | |
78 | 78 | @ApiParam(name = "createdBegin", value = "起止时间") String createdBegin, |
79 | 79 | @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd) { |
80 | 80 | LambdaQueryWrapper<ReceiptContainerHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(); |
... | ... | @@ -83,24 +83,24 @@ public class ReceiptContainerHeaderController extends BaseController { |
83 | 83 | Integer pageSize = pageDomain.getPageSize(); |
84 | 84 | String sql = null; |
85 | 85 | if (StringUtils.isNotEmpty(receiptCode)) { |
86 | - sql = "select receiptContainerId from receipt_container_detail where receiptCode = \'"+receiptCode+"\'"; | |
86 | + sql = "select receiptContainerId from receipt_container_detail where receiptCode = \'" + receiptCode + "\'"; | |
87 | 87 | } |
88 | 88 | lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin), ReceiptContainerHeader::getCreated, createdBegin) |
89 | 89 | .le(StringUtils.isNotEmpty(createdEnd), ReceiptContainerHeader::getCreated, createdEnd) |
90 | 90 | .eq(ReceiptContainerHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()) |
91 | - .like(StringUtils.isNotEmpty(receiptContainerHeader.getContainerCode()),ReceiptContainerHeader::getContainerCode, receiptContainerHeader.getContainerCode()) | |
92 | - .eq(StringUtils.isNotEmpty(receiptContainerHeader.getToLocation()),ReceiptContainerHeader::getToLocation, receiptContainerHeader.getToLocation()) | |
93 | - .eq(StringUtils.isNotNull(receiptContainerHeader.getTaskType()),ReceiptContainerHeader::getTaskType, receiptContainerHeader.getTaskType()) | |
94 | - .eq(StringUtils.isNotNull(receiptContainerHeader.getStatus()),ReceiptContainerHeader::getStatus, receiptContainerHeader.getStatus()) | |
95 | - .eq(StringUtils.isNotEmpty(receiptContainerHeader.getCreatedBy()),ReceiptContainerHeader::getCreatedBy, receiptContainerHeader.getCreatedBy()) | |
91 | + .like(StringUtils.isNotEmpty(receiptContainerHeader.getContainerCode()), ReceiptContainerHeader::getContainerCode, receiptContainerHeader.getContainerCode()) | |
92 | + .eq(StringUtils.isNotEmpty(receiptContainerHeader.getToLocation()), ReceiptContainerHeader::getToLocation, receiptContainerHeader.getToLocation()) | |
93 | + .eq(StringUtils.isNotNull(receiptContainerHeader.getTaskType()), ReceiptContainerHeader::getTaskType, receiptContainerHeader.getTaskType()) | |
94 | + .eq(StringUtils.isNotNull(receiptContainerHeader.getStatus()), ReceiptContainerHeader::getStatus, receiptContainerHeader.getStatus()) | |
95 | + .eq(StringUtils.isNotEmpty(receiptContainerHeader.getCreatedBy()), ReceiptContainerHeader::getCreatedBy, receiptContainerHeader.getCreatedBy()) | |
96 | 96 | .inSql(StringUtils.isNotEmpty(receiptCode), ReceiptContainerHeader::getId, sql) |
97 | 97 | .orderByAsc(ReceiptContainerHeader::getStatus) |
98 | 98 | .orderByDesc(ReceiptContainerHeader::getId); |
99 | 99 | |
100 | - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
100 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { | |
101 | 101 | Page<ReceiptContainerHeader> page = new Page<>(pageNum, pageSize); |
102 | 102 | IPage<ReceiptContainerHeader> iPage = receiptContainerHeaderService.page(page, lambdaQueryWrapper); |
103 | - return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | |
103 | + return getMpDataTable(iPage.getRecords(), iPage.getTotal()); | |
104 | 104 | } else { |
105 | 105 | List<ReceiptContainerHeader> list = receiptContainerHeaderService.list(lambdaQueryWrapper); |
106 | 106 | return getDataTable(list); |
... | ... | @@ -110,13 +110,13 @@ public class ReceiptContainerHeaderController extends BaseController { |
110 | 110 | /** |
111 | 111 | * 删除入库组盘 |
112 | 112 | */ |
113 | - @ApiOperation(value="取消", notes="取消入库组盘", httpMethod = "POST") | |
113 | + @ApiOperation(value = "取消", notes = "取消入库组盘", httpMethod = "POST") | |
114 | 114 | @RequiresPermissions("receipt:receiptContainer:remove") |
115 | - @Log(title = "入库-入库单 ",operating = "取消入库组盘", action = BusinessType.UPDATE) | |
115 | + @Log(title = "入库-入库单 ", operating = "取消入库组盘", action = BusinessType.UPDATE) | |
116 | 116 | @PostMapping("/remove") |
117 | 117 | @ResponseBody |
118 | - public AjaxResult remove(@ApiParam(name = "id", value = "入库头表id字符串")String ids){ | |
119 | - if (StringUtils.isNull(ids)){ | |
118 | + public AjaxResult remove(@ApiParam(name = "id", value = "入库头表id字符串") String ids) { | |
119 | + if (StringUtils.isNull(ids)) { | |
120 | 120 | return AjaxResult.error("id为空"); |
121 | 121 | } |
122 | 122 | List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); |
... | ... | @@ -127,7 +127,7 @@ public class ReceiptContainerHeaderController extends BaseController { |
127 | 127 | * 选择出库口 |
128 | 128 | */ |
129 | 129 | @GetMapping("/chooseStation/{ids}") |
130 | - public String chooseStation(@PathVariable("ids")String ids, ModelMap mmap) { | |
130 | + public String chooseStation(@PathVariable("ids") String ids, ModelMap mmap) { | |
131 | 131 | List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); |
132 | 132 | List<Integer> idsList = idList.stream().distinct().collect(Collectors.toList()); |
133 | 133 | ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(idsList.get(0)); |
... | ... | @@ -135,10 +135,10 @@ public class ReceiptContainerHeaderController extends BaseController { |
135 | 135 | mmap.put("containerCode", containerCode); |
136 | 136 | mmap.put("id", ids); |
137 | 137 | int taskType = receiptContainerHeader.getTaskType().intValue(); |
138 | - if(taskType == QuantityConstant.TASK_TYPE_WHOLESHIPMENT || | |
139 | - taskType == QuantityConstant.TASK_TYPE_EMPTYSHIPMENT) { | |
138 | + if (taskType == QuantityConstant.TASK_TYPE_WHOLESHIPMENT || | |
139 | + taskType == QuantityConstant.TASK_TYPE_EMPTYSHIPMENT) { | |
140 | 140 | mmap.put("type", QuantityConstant.STATION_OUT); |
141 | - } else if(taskType == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT || | |
141 | + } else if (taskType == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT || | |
142 | 142 | taskType == QuantityConstant.TASK_TYPE_SORTINGSHIPMENT || |
143 | 143 | taskType == QuantityConstant.TASK_TYPE_VIEW || |
144 | 144 | taskType == QuantityConstant.TASK_TYPE_CYCLECOUNT) { |
... | ... | @@ -152,10 +152,10 @@ public class ReceiptContainerHeaderController extends BaseController { |
152 | 152 | @Log(title = "设置站台", operating = "设置站台", action = BusinessType.GRANT) |
153 | 153 | @PostMapping("/setStation") |
154 | 154 | @ResponseBody |
155 | - public AjaxResult setStation (String ids, String type, String containerCode, String port){ | |
155 | + public AjaxResult setStation(String ids, String type, String containerCode, String port) { | |
156 | 156 | List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); |
157 | 157 | List<Integer> idsList = idList.stream().distinct().collect(Collectors.toList()); |
158 | - for(Integer id : idsList) { | |
158 | + for (Integer id : idsList) { | |
159 | 159 | LambdaQueryWrapper<ReceiptContainerHeader> receiptContainerHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
160 | 160 | receiptContainerHeaderLambdaQueryWrapper.eq(ReceiptContainerHeader::getId, id); |
161 | 161 | ReceiptContainerHeader receiptContainerHeader1 = receiptContainerHeaderService.getOne(receiptContainerHeaderLambdaQueryWrapper); |
... | ... | @@ -170,15 +170,15 @@ public class ReceiptContainerHeaderController extends BaseController { |
170 | 170 | */ |
171 | 171 | @RequiresPermissions("receipt:receiptContainer:createTask") |
172 | 172 | @Log(title = "入库-任务生成", operating = "生成入库任务", action = BusinessType.INSERT) |
173 | - @PostMapping( "/createTask") | |
173 | + @PostMapping("/createTask") | |
174 | 174 | @ResponseBody |
175 | 175 | public AjaxResult addTask(String ids) { |
176 | - if (StringUtils.isEmpty(ids)){ | |
176 | + if (StringUtils.isEmpty(ids)) { | |
177 | 177 | return AjaxResult.error("id不能为空"); |
178 | 178 | } |
179 | 179 | List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); |
180 | 180 | List<Integer> idsList = idList.stream().distinct().collect(Collectors.toList()); |
181 | - return receiptTaskService.createReceiptTask(idsList); | |
181 | + return handleMultiProcess(() -> receiptTaskService.createReceiptTask(idsList)); | |
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
... | ... | @@ -186,24 +186,24 @@ public class ReceiptContainerHeaderController extends BaseController { |
186 | 186 | */ |
187 | 187 | @RequiresPermissions("receipt:receiptContainer:position") |
188 | 188 | @Log(title = "入库-定位", operating = "定位", action = BusinessType.INSERT) |
189 | - @PostMapping( "/position") | |
189 | + @PostMapping("/position") | |
190 | 190 | @ResponseBody |
191 | - public AjaxResult position(PositionBean positionBean){ | |
192 | - if (StringUtils.isEmpty(positionBean.getIds())){ | |
191 | + public AjaxResult position(PositionBean positionBean) { | |
192 | + if (StringUtils.isEmpty(positionBean.getIds())) { | |
193 | 193 | return AjaxResult.error("id不能为空"); |
194 | 194 | } |
195 | 195 | boolean result = false; |
196 | 196 | List<Integer> idList = Arrays.asList(Convert.toIntArray(positionBean.getIds())); |
197 | 197 | List<Integer> idsList = idList.stream().distinct().collect(Collectors.toList()); |
198 | - for (int i = 0; i<idsList.size(); i++) { | |
198 | + for (int i = 0; i < idsList.size(); i++) { | |
199 | 199 | LambdaQueryWrapper<ReceiptContainerDetail> lambda = Wrappers.lambdaQuery(); |
200 | 200 | lambda.eq(ReceiptContainerDetail::getReceiptContainerId, idsList.get(i)); |
201 | 201 | List<ReceiptContainerDetail> receiptContainerDetails = receiptContainerDetailService.list(lambda); |
202 | 202 | for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetails) { |
203 | - result = receivingService.position(receiptContainerDetail, positionBean.getArea()); | |
203 | + result = receivingService.position(receiptContainerDetail, positionBean.getArea()); | |
204 | 204 | } |
205 | 205 | } |
206 | - if(!result) { | |
206 | + if (!result) { | |
207 | 207 | return AjaxResult.error("定位失败"); |
208 | 208 | } |
209 | 209 | return AjaxResult.success("定位成功"); |
... | ... | @@ -214,14 +214,14 @@ public class ReceiptContainerHeaderController extends BaseController { |
214 | 214 | */ |
215 | 215 | @RequiresPermissions("receipt:receiptContainer:canalPosition") |
216 | 216 | @Log(title = "入库-取消定位", operating = "取消定位", action = BusinessType.OTHER) |
217 | - @PostMapping( "/cancelPosition") | |
217 | + @PostMapping("/cancelPosition") | |
218 | 218 | @ResponseBody |
219 | - public AjaxResult cancelPosition(String ids){ | |
220 | - if (StringUtils.isEmpty(ids)){ | |
219 | + public AjaxResult cancelPosition(String ids) { | |
220 | + if (StringUtils.isEmpty(ids)) { | |
221 | 221 | return AjaxResult.error("id不能为空"); |
222 | 222 | } |
223 | 223 | List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); |
224 | - for (int i = 0; i<idList.size(); i++){ | |
224 | + for (int i = 0; i < idList.size(); i++) { | |
225 | 225 | LambdaQueryWrapper<ReceiptContainerDetail> lambda = Wrappers.lambdaQuery(); |
226 | 226 | lambda.eq(ReceiptContainerDetail::getReceiptContainerId, idList.get(i)); |
227 | 227 | List<ReceiptContainerDetail> receiptContainerDetails = receiptContainerDetailService.list(lambda); |
... | ... | @@ -236,7 +236,7 @@ public class ReceiptContainerHeaderController extends BaseController { |
236 | 236 | * 定位 |
237 | 237 | */ |
238 | 238 | @GetMapping("/positioning/{ids}") |
239 | - public String positioning(@PathVariable("ids")String ids, ModelMap mmap){ | |
239 | + public String positioning(@PathVariable("ids") String ids, ModelMap mmap) { | |
240 | 240 | mmap.put("ids", ids); |
241 | 241 | return "receipt/receiving" + "/positioning"; |
242 | 242 | } |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/domain/ReceiptContainerHeader.java
... | ... | @@ -8,220 +8,225 @@ import lombok.Data; |
8 | 8 | import java.io.Serializable; |
9 | 9 | import java.util.Date; |
10 | 10 | |
11 | -@ApiModel(value="com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader") | |
11 | +@ApiModel(value = "com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader") | |
12 | 12 | @TableName(value = "receipt_container_header") |
13 | 13 | @Data |
14 | 14 | public class ReceiptContainerHeader implements Serializable { |
15 | 15 | /** |
16 | 16 | * ID |
17 | 17 | */ |
18 | - @TableId(value = "id", type = IdType.AUTO) | |
19 | - @ApiModelProperty(value="ID") | |
18 | + @TableId(value = "id", type = IdType.AUTO) | |
19 | + @ApiModelProperty(value = "ID") | |
20 | 20 | private Integer id; |
21 | 21 | |
22 | 22 | /** |
23 | 23 | * 仓库 |
24 | 24 | */ |
25 | 25 | @TableField(value = "warehouseCode") |
26 | - @ApiModelProperty(value="仓库") | |
26 | + @ApiModelProperty(value = "仓库") | |
27 | 27 | private String warehouseCode; |
28 | 28 | |
29 | 29 | /** |
30 | 30 | * 货主 |
31 | 31 | */ |
32 | 32 | @TableField(value = "companyCode") |
33 | - @ApiModelProperty(value="货主") | |
33 | + @ApiModelProperty(value = "货主") | |
34 | 34 | private String companyCode; |
35 | 35 | |
36 | 36 | /** |
37 | 37 | * 容器号 |
38 | 38 | */ |
39 | 39 | @TableField(value = "containerCode") |
40 | - @ApiModelProperty(value="容器号") | |
40 | + @ApiModelProperty(value = "容器号") | |
41 | 41 | private String containerCode; |
42 | 42 | |
43 | 43 | /** |
44 | 44 | * 容器类型 |
45 | 45 | */ |
46 | 46 | @TableField(value = "containerType") |
47 | - @ApiModelProperty(value="容器类型") | |
47 | + @ApiModelProperty(value = "容器类型") | |
48 | 48 | private String containerType; |
49 | 49 | |
50 | 50 | /** |
51 | 51 | * 任务类型 |
52 | 52 | */ |
53 | 53 | @TableField(value = "taskType") |
54 | - @ApiModelProperty(value="任务类型") | |
54 | + @ApiModelProperty(value = "任务类型") | |
55 | 55 | private Integer taskType; |
56 | 56 | |
57 | 57 | /** |
58 | 58 | * 重量 |
59 | 59 | */ |
60 | 60 | @TableField(value = "weight") |
61 | - @ApiModelProperty(value="重量") | |
61 | + @ApiModelProperty(value = "重量") | |
62 | 62 | private String weight; |
63 | 63 | |
64 | 64 | /** |
65 | 65 | * 项目号 |
66 | 66 | */ |
67 | 67 | @TableField(value = "projectNo") |
68 | - @ApiModelProperty(value="项目号") | |
68 | + @ApiModelProperty(value = "项目号") | |
69 | 69 | private String projectNo; |
70 | 70 | |
71 | 71 | /** |
72 | 72 | * 定位规则 |
73 | 73 | */ |
74 | 74 | @TableField(value = "locatingRule") |
75 | - @ApiModelProperty(value="定位规则") | |
75 | + @ApiModelProperty(value = "定位规则") | |
76 | 76 | private String locatingRule; |
77 | 77 | |
78 | 78 | /** |
79 | 79 | * 从库位 |
80 | 80 | */ |
81 | 81 | @TableField(value = "fromLocation") |
82 | - @ApiModelProperty(value="从库位") | |
82 | + @ApiModelProperty(value = "从库位") | |
83 | 83 | private String fromLocation; |
84 | 84 | |
85 | 85 | /** |
86 | 86 | * 目标库位 |
87 | 87 | */ |
88 | 88 | @TableField(value = "toLocation") |
89 | - @ApiModelProperty(value="目标库位") | |
89 | + @ApiModelProperty(value = "目标库位") | |
90 | 90 | private String toLocation; |
91 | 91 | |
92 | 92 | /** |
93 | 93 | * 出入口 |
94 | 94 | */ |
95 | 95 | @TableField(value = "port") |
96 | - @ApiModelProperty(value="出入口") | |
96 | + @ApiModelProperty(value = "出入口") | |
97 | 97 | private String port; |
98 | 98 | |
99 | 99 | /** |
100 | 100 | * 波次号 |
101 | 101 | */ |
102 | 102 | @TableField(value = "waveId") |
103 | - @ApiModelProperty(value="波次号") | |
103 | + @ApiModelProperty(value = "波次号") | |
104 | 104 | private Integer waveId; |
105 | 105 | |
106 | 106 | /** |
107 | 107 | * 任务已创建 |
108 | 108 | */ |
109 | 109 | @TableField(value = "taskCreated") |
110 | - @ApiModelProperty(value="任务已创建") | |
110 | + @ApiModelProperty(value = "任务已创建") | |
111 | 111 | private Integer taskCreated; |
112 | 112 | |
113 | 113 | /** |
114 | 114 | * 创建时间 |
115 | 115 | */ |
116 | 116 | @TableField(value = "created", fill = FieldFill.INSERT) |
117 | - @ApiModelProperty(value="创建时间") | |
117 | + @ApiModelProperty(value = "创建时间") | |
118 | 118 | private Date created; |
119 | 119 | |
120 | 120 | /** |
121 | 121 | * 创建用户 |
122 | 122 | */ |
123 | 123 | @TableField(value = "createdBy", fill = FieldFill.INSERT) |
124 | - @ApiModelProperty(value="创建用户") | |
124 | + @ApiModelProperty(value = "创建用户") | |
125 | 125 | private String createdBy; |
126 | 126 | |
127 | 127 | /** |
128 | 128 | * 创建时间 |
129 | 129 | */ |
130 | 130 | @TableField(value = "lastUpdated", fill = FieldFill.INSERT_UPDATE) |
131 | - @ApiModelProperty(value="创建时间") | |
131 | + @ApiModelProperty(value = "创建时间") | |
132 | 132 | private Date lastUpdated; |
133 | 133 | |
134 | 134 | /** |
135 | 135 | * 更新用户 |
136 | 136 | */ |
137 | 137 | @TableField(value = "lastUpdatedBy", fill = FieldFill.INSERT_UPDATE) |
138 | - @ApiModelProperty(value="更新用户") | |
138 | + @ApiModelProperty(value = "更新用户") | |
139 | 139 | private String lastUpdatedBy; |
140 | 140 | |
141 | 141 | /** |
142 | 142 | * 数据版本 |
143 | 143 | */ |
144 | 144 | @TableField(value = "version") |
145 | - @ApiModelProperty(value="数据版本") | |
145 | + @ApiModelProperty(value = "数据版本") | |
146 | 146 | private Integer version; |
147 | 147 | |
148 | 148 | /** |
149 | 149 | * 自定义字段1 |
150 | 150 | */ |
151 | 151 | @TableField(value = "userDef1") |
152 | - @ApiModelProperty(value="自定义字段1") | |
152 | + @ApiModelProperty(value = "自定义字段1") | |
153 | 153 | private String userDef1; |
154 | 154 | |
155 | 155 | /** |
156 | 156 | * 自定义字段2 |
157 | 157 | */ |
158 | 158 | @TableField(value = "userDef2") |
159 | - @ApiModelProperty(value="自定义字段2") | |
159 | + @ApiModelProperty(value = "自定义字段2") | |
160 | 160 | private String userDef2; |
161 | 161 | |
162 | 162 | /** |
163 | 163 | * 自定义字段3 |
164 | 164 | */ |
165 | 165 | @TableField(value = "userDef3") |
166 | - @ApiModelProperty(value="自定义字段3") | |
166 | + @ApiModelProperty(value = "自定义字段3") | |
167 | 167 | private String userDef3; |
168 | 168 | |
169 | 169 | /** |
170 | 170 | * 自定义字段4 |
171 | 171 | */ |
172 | 172 | @TableField(value = "userDef4") |
173 | - @ApiModelProperty(value="自定义字段4") | |
173 | + @ApiModelProperty(value = "自定义字段4") | |
174 | 174 | private String userDef4; |
175 | 175 | |
176 | 176 | /** |
177 | 177 | * 自定义字段5 |
178 | 178 | */ |
179 | 179 | @TableField(value = "userDef5") |
180 | - @ApiModelProperty(value="自定义字段5") | |
180 | + @ApiModelProperty(value = "自定义字段5") | |
181 | 181 | private String userDef5; |
182 | 182 | |
183 | 183 | /** |
184 | 184 | * 自定义字段6 |
185 | 185 | */ |
186 | 186 | @TableField(value = "userDef6") |
187 | - @ApiModelProperty(value="自定义字段6") | |
187 | + @ApiModelProperty(value = "自定义字段6") | |
188 | 188 | private String userDef6; |
189 | 189 | |
190 | 190 | /** |
191 | 191 | * 自定义字段7 |
192 | 192 | */ |
193 | 193 | @TableField(value = "userDef7") |
194 | - @ApiModelProperty(value="自定义字段7") | |
194 | + @ApiModelProperty(value = "自定义字段7") | |
195 | 195 | private String userDef7; |
196 | 196 | |
197 | 197 | /** |
198 | 198 | * 自定义字段8 |
199 | 199 | */ |
200 | 200 | @TableField(value = "userDef8") |
201 | - @ApiModelProperty(value="自定义字段8") | |
201 | + @ApiModelProperty(value = "自定义字段8") | |
202 | 202 | private String userDef8; |
203 | 203 | |
204 | 204 | /** |
205 | 205 | * 处理标记 |
206 | 206 | */ |
207 | 207 | @TableField(value = "processStamp") |
208 | - @ApiModelProperty(value="处理标记") | |
208 | + @ApiModelProperty(value = "处理标记") | |
209 | 209 | private String processStamp; |
210 | 210 | |
211 | 211 | /** |
212 | 212 | * 状态 |
213 | 213 | */ |
214 | 214 | @TableField(value = "status") |
215 | - @ApiModelProperty(value="状态") | |
215 | + @ApiModelProperty(value = "状态") | |
216 | 216 | private Integer status; |
217 | 217 | |
218 | 218 | /** |
219 | 219 | * 站台 |
220 | 220 | */ |
221 | 221 | @TableField(value = "recvDock") |
222 | - @ApiModelProperty(value="站台") | |
222 | + @ApiModelProperty(value = "站台") | |
223 | 223 | private String recvDock; |
224 | 224 | |
225 | + | |
226 | + @TableField(value = "flat") | |
227 | + @ApiModelProperty(value = "是否平库") | |
228 | + private Integer flat; | |
229 | + | |
225 | 230 | private static final long serialVersionUID = 1L; |
226 | 231 | |
227 | -} | |
228 | 232 | \ No newline at end of file |
233 | +} | |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderService.java
... | ... | @@ -11,7 +11,7 @@ import java.math.BigDecimal; |
11 | 11 | import java.util.Date; |
12 | 12 | import java.util.List; |
13 | 13 | |
14 | -public interface ReceiptContainerHeaderService extends IService<ReceiptContainerHeader>{ | |
14 | +public interface ReceiptContainerHeaderService extends IService<ReceiptContainerHeader> { | |
15 | 15 | |
16 | 16 | /** |
17 | 17 | * 保存入库组盘 |
... | ... | @@ -25,10 +25,16 @@ public interface ReceiptContainerHeaderService extends IService<ReceiptContainer |
25 | 25 | * @return 是否保存成功 |
26 | 26 | */ |
27 | 27 | AjaxResult saveContainer(String receiptCode, String containerCode, Integer receiptDetailId, |
28 | - String locationCode, BigDecimal qty, String locatingRule); | |
28 | + String locationCode, BigDecimal qty, String locatingRule); | |
29 | + | |
30 | + /** | |
31 | + * 平库组盘 | |
32 | + */ | |
33 | + AjaxResult flatSaveContainer(String receiptCode, Integer receiptDetailId, String locationCode, BigDecimal qty); | |
29 | 34 | |
30 | 35 | /** |
31 | 36 | * 取消组盘 |
37 | + * | |
32 | 38 | * @param id |
33 | 39 | * @return |
34 | 40 | */ |
... | ... | @@ -36,6 +42,7 @@ public interface ReceiptContainerHeaderService extends IService<ReceiptContainer |
36 | 42 | |
37 | 43 | /** |
38 | 44 | * 检查容器状态 |
45 | + * | |
39 | 46 | * @param record |
40 | 47 | * @return |
41 | 48 | */ |
... | ... | @@ -46,6 +53,7 @@ public interface ReceiptContainerHeaderService extends IService<ReceiptContainer |
46 | 53 | |
47 | 54 | /** |
48 | 55 | * 移动端校验库位 |
56 | + * | |
49 | 57 | * @param record |
50 | 58 | * @return |
51 | 59 | */ |
... | ... | @@ -55,6 +63,7 @@ public interface ReceiptContainerHeaderService extends IService<ReceiptContainer |
55 | 63 | |
56 | 64 | /** |
57 | 65 | * 取消入库任务 |
66 | + * | |
58 | 67 | * @param id 入库组盘头id |
59 | 68 | * @return |
60 | 69 | */ |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -41,6 +41,8 @@ import org.springframework.transaction.annotation.Transactional; |
41 | 41 | import javax.annotation.Resource; |
42 | 42 | import java.math.BigDecimal; |
43 | 43 | import java.text.MessageFormat; |
44 | +import java.time.LocalDateTime; | |
45 | +import java.time.format.DateTimeFormatter; | |
44 | 46 | import java.util.Calendar; |
45 | 47 | import java.util.Date; |
46 | 48 | import java.util.List; |
... | ... | @@ -218,6 +220,130 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
218 | 220 | return ajaxResult; |
219 | 221 | } |
220 | 222 | |
223 | + @Transactional(rollbackFor = Exception.class) | |
224 | + @Override | |
225 | + public AjaxResult flatSaveContainer(String receiptCode, Integer receiptDetailId, String locationType, BigDecimal qty) { | |
226 | + ReceiptDetail detail = receiptDetailService.getById(receiptDetailId); | |
227 | + BigDecimal receiptQty = detail.getQty().subtract(detail.getTaskQty()); | |
228 | + if (receiptQty.compareTo(qty) < 0) { | |
229 | + return AjaxResult.error("不允许超收"); | |
230 | + } | |
231 | + if (StringUtils.isEmpty(locationType)) { | |
232 | + throw new ServiceException("平库不能为空"); | |
233 | + } | |
234 | + //创建临时容器 | |
235 | + //String containerCode = createFlatContainer(locationType); | |
236 | + | |
237 | + Container container = containerService.getOne(new LambdaQueryWrapper<Container>().eq(Container::getContainerType, locationType)); | |
238 | + String containerCode = container.getCode(); | |
239 | + | |
240 | + //检查容器编码合法性 | |
241 | + Integer taskType = checkContainer(containerCode, detail.getMaterialCode()); | |
242 | + if (taskType == 1) { | |
243 | + throw new ServiceException("没有容器,material.getAutoGenSerialNum() == 0"); | |
244 | + } else if (taskType == 2) { | |
245 | + throw new ServiceException("该物料不能放在这个容器上,请检查该物料是否可以混放"); | |
246 | + } else { | |
247 | + if (taskType == 0) { | |
248 | + throw new ServiceException("容器状态未知"); | |
249 | + } | |
250 | + } | |
251 | + | |
252 | + String locationCode = ""; | |
253 | + //补充入库 | |
254 | + if (QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT == taskType.intValue()) { | |
255 | + if (StringUtils.isNotNull(container) && StringUtils.isNotEmpty(container.getLocationCode())) { | |
256 | + locationCode = container.getLocationCode(); | |
257 | + } | |
258 | + } | |
259 | + //检查库位编码合法性 | |
260 | + checkLocationCode(locationCode, containerCode, taskType); | |
261 | + | |
262 | + int unCompleteCombineNumber = shipmentContainerHeaderService.getUnCompleteCombineNumber(containerCode); | |
263 | + if (unCompleteCombineNumber > 0) { | |
264 | + throw new ServiceException("该托盘已经用于出库组盘"); | |
265 | + } | |
266 | + /* 新建保存组盘头表记录*/ | |
267 | + //根据容器编码查询组盘表头记录 | |
268 | + LambdaQueryWrapper<ReceiptContainerHeader> lambda = Wrappers.lambdaQuery(); | |
269 | + lambda.eq(ReceiptContainerHeader::getContainerCode, containerCode) | |
270 | + .eq(ReceiptContainerHeader::getStatus, QuantityConstant.RECEIPT_CONTAINER_BUILD); | |
271 | + List<ReceiptContainerHeader> list = list(lambda); | |
272 | + | |
273 | + ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader(); | |
274 | + //当size大于等于1表示容器已经有入库组盘了 | |
275 | + if (list.isEmpty()) { | |
276 | + ReceiptDetail receiptDetail = receiptDetailService.getById(receiptDetailId); | |
277 | + receiptContainerHeader.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
278 | + receiptContainerHeader.setCompanyCode(receiptDetail.getCompanyCode()); | |
279 | + receiptContainerHeader.setContainerCode(containerCode); | |
280 | + receiptContainerHeader.setContainerType(container.getContainerType()); | |
281 | + receiptContainerHeader.setFlat(1); | |
282 | + receiptContainerHeader.setTaskType(taskType); | |
283 | + if (taskType.equals(QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT)) { | |
284 | + receiptContainerHeader.setFromLocation(container.getLocationCode()); | |
285 | + String value = configService.getKey(QuantityConstant.RULE_TASK_LOCATION); | |
286 | + int taskLocationRule = Integer.parseInt(value); | |
287 | + if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION) { | |
288 | + receiptContainerHeader.setToLocation(container.getLocationCode()); | |
289 | + } | |
290 | + } else { | |
291 | + receiptContainerHeader.setToLocation(locationCode); | |
292 | + } | |
293 | + receiptContainerHeader.setProjectNo(receiptDetail.getProjectNo()); | |
294 | + receiptContainerHeader.setCreatedBy(ShiroUtils.getName()); | |
295 | + receiptContainerHeader.setLastUpdatedBy(ShiroUtils.getName()); | |
296 | + receiptContainerHeader.setLocatingRule(null); | |
297 | + receiptContainerHeader.setCreatedBy("test"); | |
298 | + if (!this.save(receiptContainerHeader)) { | |
299 | + throw new ServiceException("入库组盘头表保存失败"); | |
300 | + } | |
301 | + } else { | |
302 | + receiptContainerHeader = list.get(0); | |
303 | + if (receiptContainerHeader.getStatus() >= QuantityConstant.RECEIPT_CONTAINER_TASK && receiptContainerHeader.getStatus() < QuantityConstant.RECEIPT_CONTAINER_FINISHED) { | |
304 | + throw new ServiceException("容器已经生成任务,不能放物料了!"); | |
305 | + } | |
306 | + } | |
307 | + List<ReceiptContainerHeader> receiptContainerHeaders = this.list(lambda); | |
308 | + /* 更新入库单详情的收货数量*/ | |
309 | + //根据入库单详情id查询入库详情 | |
310 | + ReceiptDetail receiptDetail = receiptDetailService.getById(receiptDetailId); | |
311 | + receiptDetail.setId(receiptDetailId); | |
312 | + receiptDetail.setTaskQty(qty.add(receiptDetail.getTaskQty())); | |
313 | + //更新入库单详情的收货数量 | |
314 | + if (!receiptDetailService.updateById(receiptDetail)) { | |
315 | + throw new ServiceException("更新入库单详情失败"); | |
316 | + } | |
317 | + | |
318 | + receiptDetail = receiptDetailService.getById(receiptDetailId); | |
319 | + | |
320 | + receiptContainerDetailAdd(receiptContainerHeaders.get(0), receiptDetail, qty, containerCode, locationCode); | |
321 | + //如果单据数量等于已收数量,更新入库详情状态和入库单状态 | |
322 | + if (receiptDetail.getQty().compareTo(receiptDetail.getTaskQty()) == 0) { | |
323 | + if (StringUtils.isNotEmpty(locationCode)) { | |
324 | + receiptDetail.setProcessStamp(QuantityConstant.RECEIPT_HEADER_POSITION.toString()); | |
325 | + } else { | |
326 | + receiptDetail.setProcessStamp(QuantityConstant.RECEIPT_HEADER_RECEIVING.toString()); | |
327 | + } | |
328 | + if (!receiptDetailService.updateById(receiptDetail)) { | |
329 | + throw new ServiceException("更新入库详情处理标记失败"); | |
330 | + } | |
331 | + | |
332 | + ReceiptDetail receiptDetail1 = receiptDetailService.queryflow(receiptDetail); | |
333 | + if (!receiptDetailService.updateById(receiptDetail1)) { | |
334 | + throw new ServiceException("更新入库详情下一流程失败"); | |
335 | + } | |
336 | + } | |
337 | + receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId()); | |
338 | + JSONObject json = new JSONObject(); | |
339 | + json.put("id", receiptContainerHeader.getId()); | |
340 | + AjaxResult ajaxResult = new AjaxResult(); | |
341 | + ajaxResult.setData(json); | |
342 | + ajaxResult.setMsg("组盘成功"); | |
343 | + ajaxResult.setCode(200); | |
344 | + return ajaxResult; | |
345 | + } | |
346 | + | |
221 | 347 | /** |
222 | 348 | * 超收检查 |
223 | 349 | * |
... | ... | @@ -282,7 +408,16 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
282 | 408 | List<ReceiptContainerDetail> containerDetailList = receiptContainerDetailService.list(containerDetailLambda); |
283 | 409 | |
284 | 410 | //如果是临时容器,取消组盘时删除容器表 |
285 | - containerService.removeContainer(receiptContainerDetail.getContainerType(), receiptContainerDetail.getContainerCode()); | |
411 | + //if (receiptContainerDetail.getContainerCode().length() > 6) { | |
412 | + // Container one = containerService.getOne(new LambdaQueryWrapper<Container>().eq(Container::getCode, receiptContainerDetail.getContainerCode())); | |
413 | + // if (one == null) { | |
414 | + // throw new ServiceException("容器表没有该容器,容器号是" + receiptContainerDetail.getContainerCode()); | |
415 | + // } | |
416 | + // if (!containerService.removeById(one)) { | |
417 | + // throw new ServiceException("删除容器表失败,容器号是" + receiptContainerDetail.getContainerCode()); | |
418 | + // } | |
419 | + //} | |
420 | + //containerService.removeContainer(receiptContainerDetail.getContainerType(), receiptContainerDetail.getContainerCode()); | |
286 | 421 | |
287 | 422 | //如果入库组盘没有该入库单的组盘信息,回滚入库单状态 |
288 | 423 | if (containerDetailList == null) { |
... | ... | @@ -384,15 +519,13 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
384 | 519 | * 判断物料是否可以放在当前容器 |
385 | 520 | */ |
386 | 521 | if (!material.getIsMix()) { |
387 | - LambdaQueryWrapper<InventoryDetail> queryWrapper = Wrappers.lambdaQuery(); | |
388 | - queryWrapper.eq(InventoryDetail::getContainerCode, containerCode); | |
389 | 522 | /* 该容器已存物料数*/ |
390 | - int inventoryDetailCount = inventoryDetailService.count(queryWrapper); | |
391 | - LambdaQueryWrapper<InventoryDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
392 | - lambdaQueryWrapper.eq(InventoryDetail::getContainerCode, containerCode) | |
393 | - .eq(InventoryDetail::getMaterialCode, materialCode); | |
523 | + int inventoryDetailCount = inventoryDetailService.count(new LambdaQueryWrapper<InventoryDetail>() | |
524 | + .eq(InventoryDetail::getContainerCode, containerCode)); | |
394 | 525 | /* 该容器存放该物料的记录数*/ |
395 | - int inventoryDetailMaterialCount = inventoryDetailService.count(lambdaQueryWrapper); | |
526 | + int inventoryDetailMaterialCount = inventoryDetailService.count(new LambdaQueryWrapper<InventoryDetail>() | |
527 | + .eq(InventoryDetail::getContainerCode, containerCode) | |
528 | + .eq(InventoryDetail::getMaterialCode, materialCode)); | |
396 | 529 | /* 存放多种物料时返回*/ |
397 | 530 | if (inventoryDetailCount != inventoryDetailMaterialCount) { |
398 | 531 | return 2; |
... | ... | @@ -408,19 +541,20 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
408 | 541 | |
409 | 542 | |
410 | 543 | //检查该容器编码是否已存任务 |
411 | - LambdaQueryWrapper<TaskHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
412 | - lambdaQueryWrapper.eq(TaskHeader::getContainerCode, containerCode) | |
544 | + LambdaQueryWrapper<TaskHeader> wrapper = Wrappers.lambdaQuery(); | |
545 | + wrapper.eq(TaskHeader::getContainerCode, containerCode) | |
413 | 546 | .lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED) |
414 | 547 | .eq(TaskHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()); |
415 | 548 | //补充入库跳过校验 |
416 | - if (taskHeaderService.count(lambdaQueryWrapper) > 0 && taskHeaderService.getOne(lambdaQueryWrapper).getStatus() == QuantityConstant.TASK_STATUS_ARRIVED_STATION) { | |
549 | + if (taskHeaderService.count(wrapper) > 0 && taskHeaderService.getOne(wrapper).getStatus() == | |
550 | + QuantityConstant.TASK_STATUS_ARRIVED_STATION) { | |
417 | 551 | |
418 | 552 | } else { |
419 | 553 | if (container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { |
420 | 554 | throw new ServiceException("容器已经锁定,不能再组盘"); |
421 | 555 | } |
422 | 556 | } |
423 | - if (taskHeaderService.count(lambdaQueryWrapper) > 0 && taskHeaderService.getOne(lambdaQueryWrapper).getTaskType() != 200) { | |
557 | + if (taskHeaderService.count(wrapper) > 0 && taskHeaderService.getOne(wrapper).getTaskType() != 200) { | |
424 | 558 | throw new ServiceException("容器已经存在任务,请更换容器"); |
425 | 559 | } |
426 | 560 | if (StringUtils.isEmpty(container.getLocationCode())) { |
... | ... | @@ -545,6 +679,9 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
545 | 679 | receiptContainerDetail.setInventorySts(receiptDetail.getInventorySts()); |
546 | 680 | receiptContainerDetail.setCreatedBy(ShiroUtils.getName()); |
547 | 681 | receiptContainerDetail.setLastUpdatedBy(ShiroUtils.getName()); |
682 | + if (receiptContainerHeader.getFlat() != null && receiptContainerHeader.getFlat() == 1) { | |
683 | + receiptContainerDetail.setFlat(1); | |
684 | + } | |
548 | 685 | if (!receiptContainerDetailService.save(receiptContainerDetail)) { |
549 | 686 | throw new ServiceException("保存入库组盘详情失败"); |
550 | 687 | } |
... | ... | @@ -584,6 +721,32 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
584 | 721 | return code; |
585 | 722 | } |
586 | 723 | |
724 | + | |
725 | + /** | |
726 | + * 自动生成平库容器编码 | |
727 | + */ | |
728 | + @Transactional | |
729 | + public String createFlatContainer(String locationCode) { | |
730 | + LocalDateTime now = LocalDateTime.now(); | |
731 | + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyMMddHHmmssSSS"); | |
732 | + String timestamp = now.format(formatter); | |
733 | + String code = locationCode + timestamp; | |
734 | + Container container = new Container(); | |
735 | + container.setCode(code); | |
736 | + container.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
737 | + container.setCompanyCode(ShiroUtils.getCompanyCodeList().get(0)); | |
738 | + container.setContainerType("PK"); | |
739 | + container.setCreatedBy(ShiroUtils.getName()); | |
740 | + container.setLastUpdated(new Date()); | |
741 | + container.setLastUpdatedBy(ShiroUtils.getName()); | |
742 | + container.setEnable(true); | |
743 | + container.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); | |
744 | + if (!containerService.save(container)) { | |
745 | + throw new ServiceException("新增容器失败"); | |
746 | + } | |
747 | + return code; | |
748 | + } | |
749 | + | |
587 | 750 | @Override |
588 | 751 | @Transactional |
589 | 752 | public int insertTodayReceiptContainerHeader(ReceiptBill receiptBill, String receiptCode) { |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiving/controller/ReceivingController.java
... | ... | @@ -86,10 +86,10 @@ public class ReceivingController extends BaseController { |
86 | 86 | @ResponseBody |
87 | 87 | @PostMapping("/scanBill") |
88 | 88 | @RequiresPermissions("receipt:receiving:receiving") |
89 | - @Log(title = "入库-获取订单明细", operating ="PC端扫描收货单号", action = BusinessType.OTHER) | |
90 | - public AjaxResult scanBill(String code) { | |
89 | + @Log(title = "入库-获取订单明细", operating = "PC端扫描收货单号", action = BusinessType.OTHER) | |
90 | + public AjaxResult scanBill(String code) { | |
91 | 91 | ReceiptHeader receiptHeader = receiptHeaderService.getOne(new LambdaQueryWrapper<ReceiptHeader>().eq(ReceiptHeader::getCode, code)); |
92 | - if (receiptHeader == null || receiptHeader.getLastStatus()>= QuantityConstant.RECEIPT_HEADER_POSTING) { | |
92 | + if (receiptHeader == null || receiptHeader.getLastStatus() >= QuantityConstant.RECEIPT_HEADER_POSTING) { | |
93 | 93 | throw new ServiceException("单据已完结不能收货"); |
94 | 94 | } |
95 | 95 | AjaxResult result = receivingService.scanReceiptCode(code); |
... | ... | @@ -102,8 +102,8 @@ public class ReceivingController extends BaseController { |
102 | 102 | @ResponseBody |
103 | 103 | @PostMapping("/getReceiptInfoByBill") |
104 | 104 | @RequiresPermissions("receipt:receiving:receiving") |
105 | - @Log(title = "入库-获取收货信息", operating ="获取收货信息", action = BusinessType.OTHER) | |
106 | - public AjaxResult getReceiptInfoByBill(String code) { | |
105 | + @Log(title = "入库-获取收货信息", operating = "获取收货信息", action = BusinessType.OTHER) | |
106 | + public AjaxResult getReceiptInfoByBill(String code) { | |
107 | 107 | AjaxResult result = receiptContainerDetailService.getReceiptInfoByBill(code); |
108 | 108 | return result; |
109 | 109 | } |
... | ... | @@ -119,19 +119,19 @@ public class ReceivingController extends BaseController { |
119 | 119 | /** |
120 | 120 | * 保存收货 |
121 | 121 | */ |
122 | - @ApiOperation(value="保存收货 ", notes="保存收货 ", httpMethod = "POST") | |
122 | + @ApiOperation(value = "保存收货 ", notes = "保存收货 ", httpMethod = "POST") | |
123 | 123 | @ResponseBody |
124 | 124 | @PostMapping("/save") |
125 | 125 | @RequiresPermissions("receipt:receiving:receiving") |
126 | - @Log(title = "入库-保存收货", operating ="PC端保存收货", action = BusinessType.OTHER) | |
126 | + @Log(title = "入库-保存收货", operating = "PC端保存收货", action = BusinessType.OTHER) | |
127 | 127 | public AjaxResult save( |
128 | - @ApiParam(name="receiptCode",value="入库单编码") String receiptCode, | |
129 | - @ApiParam(name="containerCode",value="容器编码")String containerCode, | |
130 | - @ApiParam(name="receiptDetailId",value="入库单详情id")Integer receiptDetailId, | |
131 | - @ApiParam(name="locationCode",value="库位编码", required = false)String locationCode, | |
132 | - @ApiParam(name="qty",value="收货数量") BigDecimal qty, | |
133 | - @ApiParam(name="localtionRule",value="定位规则", required = false)String locatingRule){ | |
134 | - if(qty.intValue() <= 0) { | |
128 | + @ApiParam(name = "receiptCode", value = "入库单编码") String receiptCode, | |
129 | + @ApiParam(name = "containerCode", value = "容器编码") String containerCode, | |
130 | + @ApiParam(name = "receiptDetailId", value = "入库单详情id") Integer receiptDetailId, | |
131 | + @ApiParam(name = "locationCode", value = "库位编码", required = false) String locationCode, | |
132 | + @ApiParam(name = "qty", value = "收货数量") BigDecimal qty, | |
133 | + @ApiParam(name = "localtionRule", value = "定位规则", required = false) String locatingRule) { | |
134 | + if (qty.intValue() <= 0) { | |
135 | 135 | return AjaxResult.error("配盘数量必须大于0"); |
136 | 136 | } |
137 | 137 | |
... | ... | @@ -148,35 +148,62 @@ public class ReceivingController extends BaseController { |
148 | 148 | |
149 | 149 | |
150 | 150 | /** |
151 | + * 平库组盘 | |
152 | + */ | |
153 | + @ApiOperation(value = "保存收货 ", notes = "保存收货 ", httpMethod = "POST") | |
154 | + @ResponseBody | |
155 | + @PostMapping("/flatSave") | |
156 | + @RequiresPermissions("receipt:receiving:receiving") | |
157 | + @Log(title = "入库-保存收货", operating = "PC端保存收货", action = BusinessType.OTHER) | |
158 | + public AjaxResult flatSave( | |
159 | + @ApiParam(name = "receiptCode", value = "入库单编码") String receiptCode, | |
160 | + @ApiParam(name = "receiptDetailId", value = "入库单详情id") Integer receiptDetailId, | |
161 | + @ApiParam(name = "locationCode", value = "库位编码", required = false) String locationCode, | |
162 | + @ApiParam(name = "qty", value = "收货数量") BigDecimal qty) { | |
163 | + if (qty == null || qty.intValue() <= 0) { | |
164 | + return AjaxResult.error("配盘数量必须大于0"); | |
165 | + } | |
166 | + AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() { | |
167 | + @Override | |
168 | + public AjaxResult doProcess() { | |
169 | + AjaxResult ajaxResult = receiptContainerHeaderService.flatSaveContainer(receiptCode, receiptDetailId, locationCode, qty); | |
170 | + return ajaxResult; | |
171 | + } | |
172 | + }); | |
173 | + return ajaxResult; | |
174 | + } | |
175 | + | |
176 | + | |
177 | + /** | |
151 | 178 | * 保存收货 |
152 | 179 | */ |
153 | - @ApiOperation(value="保存收货 ", notes="保存收货 ", httpMethod = "POST") | |
180 | + @ApiOperation(value = "保存收货 ", notes = "保存收货 ", httpMethod = "POST") | |
154 | 181 | @ResponseBody |
155 | 182 | @PostMapping("/saveBatch") |
156 | - @Log(title = "入库-保存收货", operating ="PC端保存收货", action = BusinessType.OTHER) | |
157 | - public AjaxResult saveBatch(@RequestBody List<ReceiptSave>list){ | |
158 | - String id=""; | |
159 | - for (ReceiptSave receipt:list){ | |
160 | - if (receipt.getReceiptDetailId()!=null){ | |
161 | - if(receipt.getQty()==null){ | |
162 | - return AjaxResult.error("入库详情id:"+receipt.getReceiptDetailId()+",数量为空!!"); | |
183 | + @Log(title = "入库-保存收货", operating = "PC端保存收货", action = BusinessType.OTHER) | |
184 | + public AjaxResult saveBatch(@RequestBody List<ReceiptSave> list) { | |
185 | + String id = ""; | |
186 | + for (ReceiptSave receipt : list) { | |
187 | + if (receipt.getReceiptDetailId() != null) { | |
188 | + if (receipt.getQty() == null) { | |
189 | + return AjaxResult.error("入库详情id:" + receipt.getReceiptDetailId() + ",数量为空!!"); | |
163 | 190 | } |
164 | - if(receipt.getQty().intValue()<= 0) { | |
165 | - return AjaxResult.error("入库详情id:"+receipt.getReceiptDetailId()+",配盘数量必须大于0"); | |
191 | + if (receipt.getQty().intValue() <= 0) { | |
192 | + return AjaxResult.error("入库详情id:" + receipt.getReceiptDetailId() + ",配盘数量必须大于0"); | |
166 | 193 | } |
167 | 194 | AjaxResult result = receiptContainerHeaderService.saveContainer(receipt.getReceiptCode(), receipt.getContainerCode(), receipt.getReceiptDetailId(), |
168 | 195 | receipt.getLocationCode(), receipt.getQty(), receipt.getLocaltionRule()); |
169 | - if (result.getCode()!=200){ | |
170 | - return AjaxResult.error("入库详情id:"+receipt.getReceiptDetailId()+",组盘失败!"); | |
196 | + if (result.getCode() != 200) { | |
197 | + return AjaxResult.error("入库详情id:" + receipt.getReceiptDetailId() + ",组盘失败!"); | |
171 | 198 | } |
172 | - String str=result.getData().toString(); | |
173 | - JSONObject obj= JSON.parseObject(str); | |
174 | - id=obj.getString("id"); | |
199 | + String str = result.getData().toString(); | |
200 | + JSONObject obj = JSON.parseObject(str); | |
201 | + id = obj.getString("id"); | |
175 | 202 | } |
176 | 203 | } |
177 | - AjaxResult ajaxResult=new AjaxResult(); | |
178 | - JSONObject json=new JSONObject(); | |
179 | - json.put("id",id); | |
204 | + AjaxResult ajaxResult = new AjaxResult(); | |
205 | + JSONObject json = new JSONObject(); | |
206 | + json.put("id", id); | |
180 | 207 | ajaxResult.setData(json); |
181 | 208 | ajaxResult.setMsg("组盘成功"); |
182 | 209 | ajaxResult.setCode(200); |
... | ... | @@ -190,24 +217,24 @@ public class ReceivingController extends BaseController { |
190 | 217 | @ResponseBody |
191 | 218 | @PostMapping("/getInventoryInfo") |
192 | 219 | @RequiresPermissions("receipt:receiving:add") |
193 | - @Log(title = "入库-入库单", operating ="获取库存信息", action = BusinessType.OTHER) | |
194 | - public AjaxResult getInventoryInfo(String code,Integer id) throws Exception { | |
220 | + @Log(title = "入库-入库单", operating = "获取库存信息", action = BusinessType.OTHER) | |
221 | + public AjaxResult getInventoryInfo(String code, Integer id) throws Exception { | |
195 | 222 | //找到主单的账套和仓库 |
196 | - LambdaQueryWrapper<ReceiptHeader> lambdaQueryWrapper= Wrappers.lambdaQuery(); | |
197 | - lambdaQueryWrapper.eq(ReceiptHeader::getCode,code) | |
198 | - .eq(ReceiptHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()); | |
199 | - ReceiptHeader receiptHeader=receiptHeaderService.getOne(lambdaQueryWrapper); | |
200 | - if(receiptHeader == null) { | |
223 | + LambdaQueryWrapper<ReceiptHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
224 | + lambdaQueryWrapper.eq(ReceiptHeader::getCode, code) | |
225 | + .eq(ReceiptHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()); | |
226 | + ReceiptHeader receiptHeader = receiptHeaderService.getOne(lambdaQueryWrapper); | |
227 | + if (receiptHeader == null) { | |
201 | 228 | throw new ServiceException("找不到主单"); |
202 | 229 | } |
203 | 230 | |
204 | 231 | //找到子单物料 |
205 | - LambdaQueryWrapper<ReceiptDetail> lambdaQuery=Wrappers.lambdaQuery(); | |
206 | - lambdaQuery.eq(ReceiptDetail::getReceiptCode,code) | |
232 | + LambdaQueryWrapper<ReceiptDetail> lambdaQuery = Wrappers.lambdaQuery(); | |
233 | + lambdaQuery.eq(ReceiptDetail::getReceiptCode, code) | |
207 | 234 | .eq(ReceiptDetail::getWarehouseCode, ShiroUtils.getWarehouseCode()) |
208 | - .eq(ReceiptDetail::getId,id); | |
209 | - ReceiptDetail receiptDetail=receiptDetailService.getOne(lambdaQuery); | |
210 | - if(receiptDetail == null) { | |
235 | + .eq(ReceiptDetail::getId, id); | |
236 | + ReceiptDetail receiptDetail = receiptDetailService.getOne(lambdaQuery); | |
237 | + if (receiptDetail == null) { | |
211 | 238 | throw new ServiceException("找不到子单"); |
212 | 239 | } |
213 | 240 | |
... | ... | @@ -216,18 +243,18 @@ public class ReceivingController extends BaseController { |
216 | 243 | List<ShipmentContainerHeader> shipmentContainerHeaderList = |
217 | 244 | shipmentContainerHeaderService.getUnCompleteCombineList(); |
218 | 245 | List<String> containerList = new ArrayList<>(); |
219 | - if(unCompleteTaskList != null && unCompleteTaskList.size() > 0) { | |
220 | - for(TaskHeader taskHeader : unCompleteTaskList) { | |
246 | + if (unCompleteTaskList != null && unCompleteTaskList.size() > 0) { | |
247 | + for (TaskHeader taskHeader : unCompleteTaskList) { | |
221 | 248 | String containerCode = taskHeader.getContainerCode(); |
222 | 249 | containerList.add(containerCode); |
223 | 250 | } |
224 | 251 | } |
225 | 252 | |
226 | 253 | //排除有出库组盘的托盘 |
227 | - if(shipmentContainerHeaderList != null && shipmentContainerHeaderList.size() > 0) { | |
228 | - for(ShipmentContainerHeader shipmentContainerHeader : shipmentContainerHeaderList) { | |
254 | + if (shipmentContainerHeaderList != null && shipmentContainerHeaderList.size() > 0) { | |
255 | + for (ShipmentContainerHeader shipmentContainerHeader : shipmentContainerHeaderList) { | |
229 | 256 | String containerCode = shipmentContainerHeader.getContainerCode(); |
230 | - if(!containerList.contains(containerCode)) { | |
257 | + if (!containerList.contains(containerCode)) { | |
231 | 258 | containerList.add(containerCode); |
232 | 259 | } |
233 | 260 | } |
... | ... | @@ -235,31 +262,31 @@ public class ReceivingController extends BaseController { |
235 | 262 | |
236 | 263 | //本物料库存 |
237 | 264 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambda = Wrappers.lambdaQuery(); |
238 | - inventoryDetailLambda.eq(InventoryDetail::getWarehouseCode,ShiroUtils.getWarehouseCode()) | |
239 | - .eq(InventoryDetail::getCompanyCode,receiptHeader.getCompanyCode()) | |
240 | - .eq(InventoryDetail::getMaterialCode,receiptDetail.getMaterialCode()) | |
241 | - .eq((StringUtils.isNotEmpty(receiptDetail.getProjectNo())),InventoryDetail::getProjectNo, | |
242 | - receiptDetail.getProjectNo()); | |
265 | + inventoryDetailLambda.eq(InventoryDetail::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
266 | + .eq(InventoryDetail::getCompanyCode, receiptHeader.getCompanyCode()) | |
267 | + .eq(InventoryDetail::getMaterialCode, receiptDetail.getMaterialCode()) | |
268 | + .eq((StringUtils.isNotEmpty(receiptDetail.getProjectNo())), InventoryDetail::getProjectNo, | |
269 | + receiptDetail.getProjectNo()); | |
243 | 270 | List<InventoryDetail> inventoryList = inventoryDetailService.list(inventoryDetailLambda); |
244 | 271 | List<InventoryDetail> removeInventoryList = new ArrayList<>(); |
245 | 272 | |
246 | 273 | //空容器 |
247 | - LambdaQueryWrapper<Container> container=Wrappers.lambdaQuery(); | |
248 | - container.eq(Container::getWarehouseCode,ShiroUtils.getWarehouseCode()) | |
249 | - .eq(Container::getCompanyCode,receiptHeader.getCompanyCode()) | |
274 | + LambdaQueryWrapper<Container> container = Wrappers.lambdaQuery(); | |
275 | + container.eq(Container::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
276 | + .eq(Container::getCompanyCode, receiptHeader.getCompanyCode()) | |
250 | 277 | .eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_EMPTY); |
251 | - List<Container> emptyContainerList=containerService.list(container); | |
278 | + List<Container> emptyContainerList = containerService.list(container); | |
252 | 279 | List<Container> removeEmptyContainerList = new ArrayList<>(); |
253 | 280 | |
254 | - for(String containerCode : containerList) { | |
255 | - if(inventoryList != null && inventoryList.size() > 0) { | |
281 | + for (String containerCode : containerList) { | |
282 | + if (inventoryList != null && inventoryList.size() > 0) { | |
256 | 283 | for (InventoryDetail inventoryDetail : inventoryList) { |
257 | 284 | if (inventoryDetail.getContainerCode().equals(containerCode)) { |
258 | 285 | removeInventoryList.add(inventoryDetail); |
259 | 286 | } |
260 | 287 | } |
261 | 288 | } |
262 | - if(emptyContainerList != null && emptyContainerList.size() > 0) { | |
289 | + if (emptyContainerList != null && emptyContainerList.size() > 0) { | |
263 | 290 | for (Container container1 : emptyContainerList) { |
264 | 291 | if (container1.getCode().equals(containerCode)) { |
265 | 292 | removeEmptyContainerList.add(container1); |
... | ... | @@ -270,9 +297,9 @@ public class ReceivingController extends BaseController { |
270 | 297 | inventoryList.removeAll(removeInventoryList); |
271 | 298 | emptyContainerList.removeAll(removeEmptyContainerList); |
272 | 299 | |
273 | - Map map=new ModelMap(); | |
274 | - map.put("inventoryList",inventoryList); | |
275 | - map.put("containerList",emptyContainerList); | |
300 | + Map map = new ModelMap(); | |
301 | + map.put("inventoryList", inventoryList); | |
302 | + map.put("containerList", emptyContainerList); | |
276 | 303 | return AjaxResult.success(map); |
277 | 304 | } |
278 | 305 | } |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentContainerDetail/controller/ShipmentContainerDetailController.java
... | ... | @@ -29,88 +29,89 @@ import java.util.List; |
29 | 29 | |
30 | 30 | /** |
31 | 31 | * 出库组盘明细 信息操作处理 |
32 | - * | |
32 | + * | |
33 | 33 | * @author huaheng |
34 | 34 | * @date 2018-08-19 |
35 | 35 | */ |
36 | 36 | @Controller |
37 | 37 | @RequestMapping("/shipment/shipmentContainerDetail") |
38 | -public class ShipmentContainerDetailController extends BaseController | |
39 | -{ | |
38 | +public class ShipmentContainerDetailController extends BaseController { | |
40 | 39 | private String prefix = "shipment/shipmentContainerDetail"; |
41 | - | |
42 | - @Autowired | |
43 | - private ShipmentContainerDetailService shipmentContainerDetailService; | |
44 | 40 | |
45 | - @Autowired | |
41 | + @Autowired | |
42 | + private ShipmentContainerDetailService shipmentContainerDetailService; | |
43 | + | |
44 | + @Autowired | |
46 | 45 | ShipmentContainerHeaderServiceImpl shipmentContainerHeaderService; |
47 | - @Autowired | |
46 | + @Autowired | |
48 | 47 | ShipmentHeaderServiceImpl shipmentHeaderService; |
49 | 48 | |
50 | 49 | |
51 | - @RequiresPermissions("shipment:container:view") | |
50 | + @RequiresPermissions("shipment:container:view") | |
52 | 51 | @GetMapping("/{headerId}") |
53 | - public String shipmentContainerDetail(@PathVariable("headerId") String headerId, ModelMap mmap) | |
54 | - { | |
55 | - mmap.put("headerId", headerId); | |
56 | - return prefix + "/shipmentContainerDetail"; | |
57 | - } | |
58 | - | |
59 | - /** | |
60 | - * 查询出库组盘明细列表 | |
61 | - */ | |
62 | - @RequiresPermissions("shipment:container:list") | |
63 | - @Log(title ="出库-出库组盘", operating = "查看出库组盘明细", action = BusinessType.GRANT) | |
64 | - @PostMapping("/list") | |
65 | - @ResponseBody | |
66 | - public TableDataInfo list(ShipmentContainerDetail shipmentContainerDetail) | |
67 | - { | |
68 | - LambdaQueryWrapper<ShipmentContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
69 | - PageDomain pageDomain = TableSupport.buildPageRequest(); | |
70 | - Integer pageNum = pageDomain.getPageNum(); | |
71 | - Integer pageSize = pageDomain.getPageSize(); | |
52 | + public String shipmentContainerDetail(@PathVariable("headerId") String headerId, ModelMap mmap) { | |
53 | + mmap.put("headerId", headerId); | |
54 | + return prefix + "/shipmentContainerDetail"; | |
55 | + } | |
56 | + | |
57 | + /** | |
58 | + * 查询出库组盘明细列表 | |
59 | + */ | |
60 | + @RequiresPermissions("shipment:container:list") | |
61 | + @Log(title = "出库-出库组盘", operating = "查看出库组盘明细", action = BusinessType.GRANT) | |
62 | + @PostMapping("/list") | |
63 | + @ResponseBody | |
64 | + public TableDataInfo list(ShipmentContainerDetail shipmentContainerDetail) { | |
65 | + LambdaQueryWrapper<ShipmentContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
66 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | |
67 | + Integer pageNum = pageDomain.getPageNum(); | |
68 | + Integer pageSize = pageDomain.getPageSize(); | |
69 | + | |
70 | + lambdaQueryWrapper | |
71 | + .eq(ShipmentContainerDetail::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
72 | + .in(ShipmentContainerDetail::getCompanyCode, ShiroUtils.getCompanyCodeList()) | |
73 | + .eq(shipmentContainerDetail.getShippingContainerId() != null, ShipmentContainerDetail::getShippingContainerId, shipmentContainerDetail.getShippingContainerId()) | |
74 | + .orderByAsc(ShipmentContainerDetail::getId); | |
75 | + | |
76 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { | |
77 | + /** | |
78 | + * 使用分页查询 | |
79 | + */ | |
80 | + Page<ShipmentContainerDetail> page = new Page<>(pageNum, pageSize); | |
81 | + IPage<ShipmentContainerDetail> iPage = shipmentContainerDetailService.page(page, lambdaQueryWrapper); | |
82 | + return getMpDataTable(iPage.getRecords(), iPage.getTotal()); | |
83 | + } else { | |
84 | + List<ShipmentContainerDetail> list = shipmentContainerDetailService.list(lambdaQueryWrapper); | |
85 | + return getDataTable(list); | |
86 | + } | |
87 | + } | |
72 | 88 | |
73 | - lambdaQueryWrapper | |
74 | - .eq(ShipmentContainerDetail::getWarehouseCode,ShiroUtils.getWarehouseCode()) | |
75 | - .in(ShipmentContainerDetail::getCompanyCode,ShiroUtils.getCompanyCodeList()) | |
76 | - .eq(shipmentContainerDetail.getShippingContainerId()!=null,ShipmentContainerDetail::getShippingContainerId,shipmentContainerDetail.getShippingContainerId()) | |
77 | - .orderByAsc(ShipmentContainerDetail::getId); | |
89 | + /** | |
90 | + * 新增出库组盘明细 | |
91 | + */ | |
92 | + @GetMapping("/add") | |
93 | + public String add() { | |
94 | + return prefix + "/add"; | |
95 | + } | |
78 | 96 | |
79 | - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
80 | - /** | |
81 | - * 使用分页查询 | |
82 | - */ | |
83 | - Page<ShipmentContainerDetail> page = new Page<>(pageNum, pageSize); | |
84 | - IPage<ShipmentContainerDetail> iPage = shipmentContainerDetailService.page(page, lambdaQueryWrapper); | |
85 | - return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | |
86 | - } else { | |
87 | - List<ShipmentContainerDetail> list = shipmentContainerDetailService.list(lambdaQueryWrapper); | |
88 | - return getDataTable(list); | |
89 | - } | |
90 | - } | |
91 | - | |
92 | - /** | |
93 | - * 新增出库组盘明细 | |
94 | - */ | |
95 | - @GetMapping("/add") | |
96 | - public String add() | |
97 | - { | |
98 | - return prefix + "/add"; | |
99 | - } | |
100 | 97 | |
101 | - | |
102 | - /** | |
103 | - * 删除出库组盘明细 | |
104 | - */ | |
105 | - @RequiresPermissions("shipment:container:remove") | |
106 | - @Log(title ="出库-出库组盘", operating = "删除出库组盘明细", action = BusinessType.DELETE) | |
107 | - @PostMapping( "/remove") | |
108 | - @ResponseBody | |
109 | - public AjaxResult remove(String ids) | |
110 | - { | |
111 | - if (StringUtils.isEmpty(ids)) { | |
98 | + /** | |
99 | + * 删除出库组盘明细 | |
100 | + */ | |
101 | + @RequiresPermissions("shipment:container:remove") | |
102 | + @Log(title = "出库-出库组盘", operating = "删除出库组盘明细", action = BusinessType.DELETE) | |
103 | + @PostMapping("/remove") | |
104 | + @ResponseBody | |
105 | + public AjaxResult remove(String ids) { | |
106 | + if (StringUtils.isEmpty(ids)) { | |
112 | 107 | return AjaxResult.error("id不能为空"); |
113 | 108 | } |
114 | - return shipmentContainerHeaderService.cancelCombinationDetail(Arrays.asList((Convert.toIntArray(ids)))); | |
115 | - } | |
109 | + AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() { | |
110 | + @Override | |
111 | + public AjaxResult doProcess() { | |
112 | + return shipmentContainerHeaderService.cancelCombinationDetail(Arrays.asList((Convert.toIntArray(ids)))); | |
113 | + } | |
114 | + }); | |
115 | + return ajaxResult; | |
116 | + } | |
116 | 117 | } |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderServiceImpl.java
... | ... | @@ -290,7 +290,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
290 | 290 | if (shipmentContainerDetail != null) { |
291 | 291 | shipmentContainerDetail.setQty(shipmentContainerDetail.getQty().add(shipmentCombinationModel.getShipQty())); |
292 | 292 | flag = shipmentContainerDetailService.saveOrUpdate(shipmentContainerDetail); |
293 | - if (flag == false) { | |
293 | + if (!flag) { | |
294 | 294 | throw new ServiceException("修改组盘明细失败,sql错误"); |
295 | 295 | } |
296 | 296 | } else { |
... | ... | @@ -327,7 +327,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
327 | 327 | shipmentContainerDetaill.setProjectNo(shipmentDetail.getProjectNo()); |
328 | 328 | shipmentContainerDetaill.setCreatedBy(ShiroUtils.getName()); |
329 | 329 | flag = shipmentContainerDetailService.save(shipmentContainerDetaill); |
330 | - if (flag == false) { | |
330 | + if (!flag) { | |
331 | 331 | throw new ServiceException("新建组盘明细失败,sql错误"); |
332 | 332 | } |
333 | 333 | } |
... | ... | @@ -395,7 +395,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
395 | 395 | taskDetail.setCreatedBy(ShiroUtils.getName()); |
396 | 396 | taskDetail.setLastUpdatedBy(ShiroUtils.getName()); |
397 | 397 | flag = taskDetailService.save(taskDetail); |
398 | - if (flag == false) { | |
398 | + if (!flag) { | |
399 | 399 | throw new ServiceException("新建任务明细失败,sql错误"); |
400 | 400 | } |
401 | 401 | } |
... | ... | @@ -411,6 +411,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
411 | 411 | * @return |
412 | 412 | */ |
413 | 413 | @Override |
414 | + @Transactional | |
414 | 415 | public AjaxResult cancelCombinationDetail(List<Integer> detailIds) { |
415 | 416 | List<ShipmentContainerDetail> shipmentContainerDetails = new ArrayList<>(); |
416 | 417 | for (int detailId : detailIds) { |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/ReceiptTaskService.java
1 | 1 | package com.huaheng.pc.task.taskHeader.service; |
2 | 2 | |
3 | +import com.alibaba.druid.sql.visitor.functions.If; | |
3 | 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 5 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
5 | 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
... | ... | @@ -7,6 +8,7 @@ import com.huaheng.api.mes.controller.MesReceiptController; |
7 | 8 | import com.huaheng.api.mes.result.ReturnInfo; |
8 | 9 | import com.huaheng.common.constant.QuantityConstant; |
9 | 10 | import com.huaheng.common.exception.service.ServiceException; |
11 | +import com.huaheng.common.support.Convert; | |
10 | 12 | import com.huaheng.common.utils.DateUtils; |
11 | 13 | import com.huaheng.common.utils.StringUtils; |
12 | 14 | import com.huaheng.common.utils.reflect.ReflectUtils; |
... | ... | @@ -21,6 +23,8 @@ import com.huaheng.pc.config.material.service.MaterialService; |
21 | 23 | import com.huaheng.pc.config.materialMultiple.domain.MaterialMultiple; |
22 | 24 | import com.huaheng.pc.config.materialMultiple.service.MaterialMultipleServiceImpl; |
23 | 25 | import com.huaheng.pc.config.materialWarnning.service.IMaterialWarningService; |
26 | +import com.huaheng.pc.config.zone.domain.Zone; | |
27 | +import com.huaheng.pc.config.zone.service.ZoneService; | |
24 | 28 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
25 | 29 | import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService; |
26 | 30 | import com.huaheng.pc.inventory.inventoryHeader.domain.InventoryHeader; |
... | ... | @@ -39,6 +43,7 @@ import com.huaheng.pc.task.taskDetail.domain.TaskDetail; |
39 | 43 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; |
40 | 44 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; |
41 | 45 | import com.huaheng.pc.task.taskHeader.mapper.TaskHeaderMapper; |
46 | +import io.swagger.models.auth.In; | |
42 | 47 | import org.slf4j.Logger; |
43 | 48 | import org.slf4j.LoggerFactory; |
44 | 49 | import org.springframework.stereotype.Service; |
... | ... | @@ -90,6 +95,8 @@ public class ReceiptTaskService { |
90 | 95 | private IMaterialWarningService materialWarningService; |
91 | 96 | @Resource |
92 | 97 | private MesReceiptController mesReceiptController; |
98 | + @Resource | |
99 | + private ZoneService zoneService; | |
93 | 100 | |
94 | 101 | private static Logger logger = LoggerFactory.getLogger(ReflectUtils.class); |
95 | 102 | |
... | ... | @@ -102,6 +109,7 @@ public class ReceiptTaskService { |
102 | 109 | @Transactional(rollbackFor = Exception.class) |
103 | 110 | public AjaxResult createReceiptTask(List<Integer> ids) { |
104 | 111 | List<String> taskIds = new ArrayList<>(); |
112 | + List<String> taskFlatIds = new ArrayList<>(); | |
105 | 113 | for (Integer id : ids) { |
106 | 114 | ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(id); |
107 | 115 | if (receiptContainerHeader == null) { |
... | ... | @@ -114,21 +122,19 @@ public class ReceiptTaskService { |
114 | 122 | if (container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { |
115 | 123 | throw new ServiceException("托盘已经锁定,不能生成任务"); |
116 | 124 | } |
125 | + String flatLocationCode = container.getContainerType() + "KW"; | |
117 | 126 | //锁定容器 |
118 | 127 | containerService.updateStatus(receiptContainerHeader.getContainerCode(), |
119 | 128 | QuantityConstant.STATUS_CONTAINER_LOCK, container.getWarehouseCode()); |
120 | 129 | //查询入库组盘明细 |
121 | - LambdaQueryWrapper<ReceiptContainerDetail> containerDetailLambda = Wrappers.lambdaQuery(); | |
122 | - containerDetailLambda.eq(ReceiptContainerDetail::getReceiptContainerId, id); | |
123 | - List<ReceiptContainerDetail> list = receiptContainerDetailService.list(containerDetailLambda); | |
124 | - | |
130 | + List<ReceiptContainerDetail> list = receiptContainerDetailService.list(new LambdaQueryWrapper<ReceiptContainerDetail>() | |
131 | + .eq(ReceiptContainerDetail::getReceiptContainerId, id)); | |
125 | 132 | if (list.isEmpty()) { |
126 | 133 | throw new ServiceException("id:" + id + "的入库组盘,没有组盘明细,请先组盘!"); |
127 | 134 | } |
128 | 135 | |
129 | 136 | if (StringUtils.isNotEmpty(receiptContainerHeader.getFromLocation())) { |
130 | - locationService.updateStatus(receiptContainerHeader.getFromLocation(), | |
131 | - QuantityConstant.STATUS_LOCATION_LOCK); | |
137 | + locationService.updateStatus(receiptContainerHeader.getFromLocation(), QuantityConstant.STATUS_LOCATION_LOCK); | |
132 | 138 | } |
133 | 139 | String locationCode = receiptContainerHeader.getToLocation(); |
134 | 140 | if (StringUtils.isNotEmpty(locationCode)) { |
... | ... | @@ -153,13 +159,17 @@ public class ReceiptTaskService { |
153 | 159 | .eq(TaskHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()); |
154 | 160 | |
155 | 161 | TaskHeader task = new TaskHeader(); |
162 | + //这个托盘有未完成的补充入库任务 | |
156 | 163 | if (taskHeaderService.count(lambdaQueryWrapper) > 0 && taskHeaderService.getOne(lambdaQueryWrapper).getTaskType() == 200) { |
157 | 164 | task = taskHeaderService.getOne(lambdaQueryWrapper); |
165 | + //入库组盘ID | |
158 | 166 | task.setAllocationHeadId(receiptContainerHeader.getId()); |
159 | 167 | taskHeaderService.updateById(task); |
160 | 168 | } else { |
161 | 169 | //添加任务主表 |
162 | - | |
170 | + if (container.getFlat() != null && container.getFlat() == 1) { | |
171 | + task.setToLocation(flatLocationCode); | |
172 | + } | |
163 | 173 | task.setAllocationHeadId(receiptContainerHeader.getId()); |
164 | 174 | task.setInternalTaskType(QuantityConstant.TASK_INTENERTYPE_RECEIPT); |
165 | 175 | task.setWarehouseCode(receiptContainerHeader.getWarehouseCode()); |
... | ... | @@ -167,11 +177,10 @@ public class ReceiptTaskService { |
167 | 177 | task.setStatus(QuantityConstant.TASK_STATUS_BUILD); |
168 | 178 | task.setTaskType(receiptContainerHeader.getTaskType()); |
169 | 179 | task.setFromLocation(receiptContainerHeader.getFromLocation()); |
170 | - if (receiptContainerHeader.getToLocation() != null) { | |
180 | + if (receiptContainerHeader.getToLocation() != null && !receiptContainerHeader.getToLocation().isEmpty()) { | |
171 | 181 | task.setToLocation(receiptContainerHeader.getToLocation()); |
172 | 182 | } |
173 | - Location location = locationService.getLocationByCode( | |
174 | - task.getToLocation(), ShiroUtils.getWarehouseCode()); | |
183 | + Location location = locationService.getLocationByCode(task.getToLocation(), ShiroUtils.getWarehouseCode()); | |
175 | 184 | if (location != null) { |
176 | 185 | task.setZoneCode(location.getZoneCode()); |
177 | 186 | } |
... | ... | @@ -180,58 +189,66 @@ public class ReceiptTaskService { |
180 | 189 | task.setPort(receiptContainerHeader.getPort()); |
181 | 190 | taskHeaderService.save(task); |
182 | 191 | } |
183 | - if (task != null) { | |
184 | - //添加任务明细表 | |
185 | - for (ReceiptContainerDetail item : list) { | |
186 | - TaskDetail taskDetail = new TaskDetail(); | |
187 | - taskDetail.setTaskId(task.getId()); | |
188 | - taskDetail.setTaskType(task.getTaskType()); | |
189 | - taskDetail.setInternalTaskType(QuantityConstant.TASK_INTENERTYPE_RECEIPT); | |
190 | - taskDetail.setWarehouseCode(task.getWarehouseCode()); | |
191 | - taskDetail.setAllocationId(item.getId()); | |
192 | - taskDetail.setCompanyCode(task.getCompanyCode()); | |
193 | - taskDetail.setMaterialCode(item.getMaterialCode()); | |
194 | - taskDetail.setMaterialName(item.getMaterialName()); | |
195 | - taskDetail.setMaterialSpec(item.getMaterialSpec()); | |
196 | - taskDetail.setLastUpdated(item.getLastUpdated()); | |
197 | - taskDetail.setMaterialUnit(item.getMaterialUnit()); | |
198 | - taskDetail.setInventorySts(item.getInventorySts()); | |
199 | - taskDetail.setBillCode(item.getReceiptCode()); | |
200 | - taskDetail.setBillDetailId(item.getReceiptDetailId()); | |
201 | - taskDetail.setQty(item.getQty()); | |
202 | - taskDetail.setContainerCode(task.getContainerCode()); | |
203 | - taskDetail.setFromLocation(task.getFromLocation()); | |
204 | - if (task.getToLocation() != null) { | |
205 | - taskDetail.setToLocation(task.getToLocation()); | |
206 | - } | |
207 | - taskDetail.setBatch(item.getBatch()); | |
208 | - taskDetail.setProjectNo(item.getProjectNo()); | |
209 | - if (!taskDetailService.save(taskDetail)) { | |
210 | - throw new ServiceException("生成任务明细失败"); | |
211 | - } | |
192 | + //添加任务明细表 | |
193 | + for (ReceiptContainerDetail item : list) { | |
194 | + TaskDetail taskDetail = new TaskDetail(); | |
195 | + taskDetail.setTaskId(task.getId()); | |
196 | + taskDetail.setTaskType(task.getTaskType()); | |
197 | + taskDetail.setInternalTaskType(QuantityConstant.TASK_INTENERTYPE_RECEIPT); | |
198 | + taskDetail.setWarehouseCode(task.getWarehouseCode()); | |
199 | + taskDetail.setAllocationId(item.getId()); | |
200 | + taskDetail.setCompanyCode(task.getCompanyCode()); | |
201 | + taskDetail.setMaterialCode(item.getMaterialCode()); | |
202 | + taskDetail.setMaterialName(item.getMaterialName()); | |
203 | + taskDetail.setMaterialSpec(item.getMaterialSpec()); | |
204 | + taskDetail.setLastUpdated(item.getLastUpdated()); | |
205 | + taskDetail.setMaterialUnit(item.getMaterialUnit()); | |
206 | + taskDetail.setInventorySts(item.getInventorySts()); | |
207 | + taskDetail.setBillCode(item.getReceiptCode()); | |
208 | + taskDetail.setBillDetailId(item.getReceiptDetailId()); | |
209 | + taskDetail.setQty(item.getQty()); | |
210 | + taskDetail.setContainerCode(task.getContainerCode()); | |
211 | + taskDetail.setFromLocation(task.getFromLocation()); | |
212 | + if (task.getToLocation() != null) { | |
213 | + taskDetail.setToLocation(task.getToLocation()); | |
214 | + } | |
215 | + taskDetail.setBatch(item.getBatch()); | |
216 | + taskDetail.setProjectNo(item.getProjectNo()); | |
217 | + if (!taskDetailService.save(taskDetail)) { | |
218 | + throw new ServiceException("生成任务明细失败"); | |
219 | + } | |
212 | 220 | |
213 | - //更新入库组盘明细状态 | |
214 | - item.setStatus(QuantityConstant.RECEIPT_CONTAINER_TASK); | |
215 | - if (!receiptContainerDetailService.updateById(item)) { | |
216 | - throw new ServiceException("更新入库组盘明细状态出错"); | |
217 | - } | |
221 | + //更新入库组盘明细状态 | |
222 | + item.setStatus(QuantityConstant.RECEIPT_CONTAINER_TASK); | |
223 | + if (!receiptContainerDetailService.updateById(item)) { | |
224 | + throw new ServiceException("更新入库组盘明细状态出错"); | |
225 | + } | |
218 | 226 | |
219 | - /* 修改明细状态为上架*/ | |
220 | - ReceiptDetail receiptDetail = receiptDetailService.getById(item.getReceiptDetailId()); | |
221 | - receiptDetail.setProcessStamp(String.valueOf(QuantityConstant.RECEIPT_HEADER_SHELF)); | |
222 | - if (!receiptDetailService.updateById(receiptDetail)) { | |
223 | - throw new ServiceException("更新入库单详情失败"); | |
224 | - } | |
225 | - //更新头表状态 | |
226 | - receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId()); | |
227 | + /* 修改明细状态为上架*/ | |
228 | + ReceiptDetail receiptDetail = receiptDetailService.getById(item.getReceiptDetailId()); | |
229 | + receiptDetail.setProcessStamp(String.valueOf(QuantityConstant.RECEIPT_HEADER_SHELF)); | |
230 | + if (!receiptDetailService.updateById(receiptDetail)) { | |
231 | + throw new ServiceException("更新入库单详情失败"); | |
227 | 232 | } |
228 | - String taskId = String.valueOf(task.getId()); | |
229 | - taskIds.add(taskId); | |
230 | - } else { | |
231 | - throw new ServiceException("任务生成失败"); | |
233 | + //更新头表状态 | |
234 | + receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId()); | |
235 | + } | |
236 | + String taskId = String.valueOf(task.getId()); | |
237 | + taskIds.add(taskId); | |
238 | + //平库 | |
239 | + if (container.getFlat() != null && container.getFlat() == 1) { | |
240 | + taskFlatIds.add(taskId); | |
232 | 241 | } |
233 | 242 | } |
234 | 243 | } |
244 | + //任务完成 | |
245 | + if (!taskFlatIds.isEmpty()) { | |
246 | + Integer[] taskFlatIdsArray = taskFlatIds.stream().map(Integer::valueOf).toArray(Integer[]::new); | |
247 | + AjaxResult ajaxResult = taskHeaderService.completeTaskByWMS(taskFlatIdsArray, null); | |
248 | + if (ajaxResult.getCode() != 200) { | |
249 | + throw new ServiceException("任务完成失败" + ajaxResult.getMsg()); | |
250 | + } | |
251 | + } | |
235 | 252 | return AjaxResult.success("生成上架任务成功").setData(taskIds); |
236 | 253 | } |
237 | 254 | |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -377,7 +377,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
377 | 377 | } |
378 | 378 | //如果已完成则不管 |
379 | 379 | if (task.getStatus().equals(QuantityConstant.TASK_STATUS_COMPLETED)) { |
380 | - return AjaxResult.success("任务(" + taskIds[i] + ")任务已经是完成的!"); | |
380 | + return AjaxResult.error("任务(" + taskIds[i] + ")任务已经是完成的!"); | |
381 | 381 | } |
382 | 382 | //整盘入库,空托入库库位自动分配 |
383 | 383 | //整盘入库手动完成分配库位,已分配则略过 |
... | ... |
src/main/resources/templates/config/zone/add.html
... | ... | @@ -29,12 +29,12 @@ |
29 | 29 | <input id="name" name="name" class="form-control" type="text"> |
30 | 30 | </div> |
31 | 31 | </div> |
32 | - <div class="form-group"> | |
33 | - <label class="col-sm-3 control-label">库位类型:</label> | |
34 | - <div class="col-sm-8"> | |
35 | - <input id="locationType" name="locationType" class="form-control" type="text"> | |
36 | - </div> | |
37 | - </div> | |
32 | + <!-- <div class="form-group">--> | |
33 | + <!-- <label class="col-sm-3 control-label">库位类型:</label>--> | |
34 | + <!-- <div class="col-sm-8">--> | |
35 | + <!-- <input id="locationType" name="locationType" class="form-control" type="text">--> | |
36 | + <!-- </div>--> | |
37 | + <!-- </div>--> | |
38 | 38 | <div class="form-group"> |
39 | 39 | <label class="col-sm-3 control-label">区域:</label> |
40 | 40 | <div class="col-sm-8"> |
... | ... |
src/main/resources/templates/config/zone/edit.html
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | </div> |
33 | 33 | |
34 | 34 | <div class="form-group"> |
35 | - <label class="col-sm-3 control-label">编码:</label> | |
35 | + <label class="col-sm-3 control-label">区域:</label> | |
36 | 36 | <div class="col-sm-8"> |
37 | 37 | <input id="area" name="area" th:field="*{area}" class="form-control" type="text"> |
38 | 38 | </div> |
... | ... | @@ -52,30 +52,6 @@ |
52 | 52 | <input id="zoneDescribe" name="zoneDescribe" class="form-control" type="text"> |
53 | 53 | </div> |
54 | 54 | </div> |
55 | - <!--<div class="form-group"> --> | |
56 | - <!--<label class="col-sm-3 control-label">创建时间:</label>--> | |
57 | - <!--<div class="col-sm-8">--> | |
58 | - <!--<input id="created" name="created" th:field="*{created}" class="form-control" type="text">--> | |
59 | - <!--</div>--> | |
60 | - <!--</div>--> | |
61 | - <!--<div class="form-group"> --> | |
62 | - <!--<label class="col-sm-3 control-label">创建用户:</label>--> | |
63 | - <!--<div class="col-sm-8">--> | |
64 | - <!--<input id="createdBy" name="createdBy" th:field="*{createdBy}" class="form-control" type="text">--> | |
65 | - <!--</div>--> | |
66 | - <!--</div>--> | |
67 | - <!--<div class="form-group"> --> | |
68 | - <!--<label class="col-sm-3 control-label">创建时间:</label>--> | |
69 | - <!--<div class="col-sm-8">--> | |
70 | - <!--<input id="lastUpdated" name="lastUpdated" th:field="*{lastUpdated}" class="form-control" type="text">--> | |
71 | - <!--</div>--> | |
72 | - <!--</div>--> | |
73 | - <!--<div class="form-group"> --> | |
74 | - <!--<label class="col-sm-3 control-label">更新用户:</label>--> | |
75 | - <!--<div class="col-sm-8">--> | |
76 | - <!--<input id="lastUpdatedBy" name="lastUpdatedBy" th:field="*{lastUpdatedBy}" class="form-control" type="text">--> | |
77 | - <!--</div>--> | |
78 | - <!--</div>--> | |
79 | 55 | <div class="form-group"> |
80 | 56 | <label class="col-sm-3 control-label">是否有效:</label> |
81 | 57 | <div class="col-sm-8"> |
... | ... | @@ -90,42 +66,6 @@ |
90 | 66 | </div> |
91 | 67 | </div> |
92 | 68 | </div> |
93 | - <!--<div class="form-group"> --> | |
94 | - <!--<label class="col-sm-3 control-label">是否删除:</label>--> | |
95 | - <!--<div class="col-sm-8">--> | |
96 | - <!--<input id="deleted" name="deleted" th:field="*{deleted}" class="form-control" type="text">--> | |
97 | - <!--</div>--> | |
98 | - <!--</div>--> | |
99 | - <!--<div class="form-group"> --> | |
100 | - <!--<label class="col-sm-3 control-label">自定义字段1:</label>--> | |
101 | - <!--<div class="col-sm-8">--> | |
102 | - <!--<input id="userDef1" name="userDef1" th:field="*{userDef1}" class="form-control" type="text">--> | |
103 | - <!--</div>--> | |
104 | - <!--</div>--> | |
105 | - <!--<div class="form-group"> --> | |
106 | - <!--<label class="col-sm-3 control-label">自定义字段2:</label>--> | |
107 | - <!--<div class="col-sm-8">--> | |
108 | - <!--<input id="userDef2" name="userDef2" th:field="*{userDef2}" class="form-control" type="text">--> | |
109 | - <!--</div>--> | |
110 | - <!--</div>--> | |
111 | - <!--<div class="form-group"> --> | |
112 | - <!--<label class="col-sm-3 control-label">自定义字段3:</label>--> | |
113 | - <!--<div class="col-sm-8">--> | |
114 | - <!--<input id="userDef3" name="userDef3" th:field="*{userDef3}" class="form-control" type="text">--> | |
115 | - <!--</div>--> | |
116 | - <!--</div>--> | |
117 | - <!--<div class="form-group"> --> | |
118 | - <!--<label class="col-sm-3 control-label">自定义字段4:</label>--> | |
119 | - <!--<div class="col-sm-8">--> | |
120 | - <!--<input id="userDef4" name="userDef4" th:field="*{userDef4}" class="form-control" type="text">--> | |
121 | - <!--</div>--> | |
122 | - <!--</div>--> | |
123 | - <!--<div class="form-group"> --> | |
124 | - <!--<label class="col-sm-3 control-label">自定义字段5:</label>--> | |
125 | - <!--<div class="col-sm-8">--> | |
126 | - <!--<input id="userDef5" name="userDef5" th:field="*{userDef5}" class="form-control" type="text">--> | |
127 | - <!--</div>--> | |
128 | - <!--</div>--> | |
129 | 69 | <div class="form-group"> |
130 | 70 | <div class="form-control-static col-sm-offset-9"> |
131 | 71 | <button type="submit" class="btn btn-primary">提交</button> |
... | ... |
src/main/resources/templates/config/zone/zone.html
... | ... | @@ -44,10 +44,10 @@ |
44 | 44 | shiro:hasPermission="config:zone:add"> |
45 | 45 | <i class="fa fa-plus"></i> 新增 |
46 | 46 | </a> |
47 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" | |
48 | - shiro:hasPermission="config:zone:remove"> | |
49 | - <i class="fa fa-trash-o"></i> 删除 | |
50 | - </a> | |
47 | + <!-- <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()"--> | |
48 | + <!-- shiro:hasPermission="config:zone:remove">--> | |
49 | + <!-- <i class="fa fa-trash-o"></i> 删除--> | |
50 | + <!-- </a>--> | |
51 | 51 | </div> |
52 | 52 | |
53 | 53 | <div class="col-sm-12 select-info"> |
... | ... |
src/main/resources/templates/monitor/apilog/apilog.html
... | ... | @@ -13,35 +13,40 @@ |
13 | 13 | <label>接口名称:</label> |
14 | 14 | <select name="apiName"> |
15 | 15 | <option value=""></option> |
16 | - <option th:each="item:${@apiLogService.getApiNameList()}" th:value="${item}" th:text="${item}"></option> | |
16 | + <option th:each="item:${@apiLogService.getApiNameList()}" th:value="${item}" | |
17 | + th:text="${item}"></option> | |
17 | 18 | </select> |
18 | 19 | </li> |
19 | 20 | <li> |
20 | 21 | <label>请求方:</label> |
21 | 22 | <select name="requestFrom"> |
22 | 23 | <option value=""></option> |
23 | - <option th:each="item:${@apiLogService.getRequestFromList()}" th:value="${item}" th:text="${item}"></option> | |
24 | + <option th:each="item:${@apiLogService.getRequestFromList()}" th:value="${item}" | |
25 | + th:text="${item}"></option> | |
24 | 26 | </select> |
25 | 27 | </li> |
26 | 28 | <li> |
27 | 29 | <label>响应方:</label> |
28 | 30 | <select name="responseBy"> |
29 | 31 | <option value=""></option> |
30 | - <option th:each="item:${@apiLogService.getResponseByList()}" th:value="${item}" th:text="${item}"></option> | |
32 | + <option th:each="item:${@apiLogService.getResponseByList()}" th:value="${item}" | |
33 | + th:text="${item}"></option> | |
31 | 34 | </select> |
32 | 35 | </li> |
33 | 36 | <li> |
34 | 37 | <label>httpCode:</label> |
35 | 38 | <select name="httpCode"> |
36 | 39 | <option value=""></option> |
37 | - <option th:each="item:${@apiLogService.getHttpCodeList()}" th:value="${item}" th:text="${item}"></option> | |
40 | + <option th:each="item:${@apiLogService.getHttpCodeList()}" th:value="${item}" | |
41 | + th:text="${item}"></option> | |
38 | 42 | </select> |
39 | 43 | </li> |
40 | 44 | <li> |
41 | 45 | <label>retCode:</label> |
42 | 46 | <select name="retCode"> |
43 | 47 | <option value=""></option> |
44 | - <option th:each="item:${@apiLogService.getRetCodeList()}" th:value="${item}" th:text="${item}"></option> | |
48 | + <option th:each="item:${@apiLogService.getRetCodeList()}" th:value="${item}" | |
49 | + th:text="${item}"></option> | |
45 | 50 | </select> |
46 | 51 | </li> |
47 | 52 | <li> |
... | ... | @@ -58,13 +63,19 @@ |
58 | 63 | </li> |
59 | 64 | <li> |
60 | 65 | <label>请求内容: </label> |
61 | - <input type="text" name="requestBody" /> | |
66 | + <input type="text" name="requestBody"/> | |
67 | + </li> | |
68 | + <li> | |
69 | + <label>响应内容: </label> | |
70 | + <input type="text" name="responseBody"/> | |
62 | 71 | </li> |
63 | 72 | <li class="time"> |
64 | 73 | <label>请求时间:</label> |
65 | - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginRequestTime"/> | |
74 | + <input type="text" class="time-input" id="startTime" placeholder="开始时间" | |
75 | + name="beginRequestTime"/> | |
66 | 76 | <span>-</span> |
67 | - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endRequestTime"/> | |
77 | + <input type="text" class="time-input" id="endTime" placeholder="结束时间" | |
78 | + name="endRequestTime"/> | |
68 | 79 | </li> |
69 | 80 | <li> |
70 | 81 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i |
... | ... | @@ -110,7 +121,7 @@ |
110 | 121 | // updateUrl: prefix + "/edit/{id}", |
111 | 122 | // removeUrl: prefix + "/remove", |
112 | 123 | modalName: "接口调用日志", |
113 | - height:610, | |
124 | + height: 610, | |
114 | 125 | pageSize: 30, |
115 | 126 | columns: [ |
116 | 127 | { |
... | ... | @@ -136,10 +147,10 @@ |
136 | 147 | title: '接口名称' |
137 | 148 | }, |
138 | 149 | /** |
139 | - { | |
140 | - field: 'ip', | |
141 | - title: 'IP' | |
142 | - }, | |
150 | + { | |
151 | + field: 'ip', | |
152 | + title: 'IP' | |
153 | + }, | |
143 | 154 | **/ |
144 | 155 | |
145 | 156 | { |
... | ... | @@ -147,36 +158,36 @@ |
147 | 158 | title: 'to' |
148 | 159 | }, |
149 | 160 | /** |
150 | - { | |
151 | - field: 'url', | |
152 | - title: '请求地址' | |
153 | - }, | |
161 | + { | |
162 | + field: 'url', | |
163 | + title: '请求地址' | |
164 | + }, | |
154 | 165 | **/ |
155 | 166 | { |
156 | 167 | field: 'httpCode', |
157 | 168 | title: 'http', |
158 | - formatter: function(value, row, index) { | |
169 | + formatter: function (value, row, index) { | |
159 | 170 | var actions = []; |
160 | 171 | var style = "style='color:green'" |
161 | - if(value>200) | |
172 | + if (value > 200) | |
162 | 173 | style = " style='color:red'"; |
163 | - if(value == undefined) | |
174 | + if (value == undefined) | |
164 | 175 | value = " " |
165 | - actions.push('<span '+ style + '>'+value+ '</span>') | |
176 | + actions.push('<span ' + style + '>' + value + '</span>') | |
166 | 177 | return actions.join(" ") |
167 | 178 | } |
168 | 179 | }, |
169 | 180 | { |
170 | 181 | field: 'retCode', |
171 | 182 | title: 'ret', |
172 | - formatter: function(value, row, index) { | |
183 | + formatter: function (value, row, index) { | |
173 | 184 | var actions = []; |
174 | 185 | var style = "style='color:green'" |
175 | - if(value>200) | |
186 | + if (value > 200) | |
176 | 187 | style = " style='color:red'"; |
177 | - if(value == undefined) | |
188 | + if (value == undefined) | |
178 | 189 | value = " " |
179 | - actions.push('<span '+ style + '>'+value+ '</span>') | |
190 | + actions.push('<span ' + style + '>' + value + '</span>') | |
180 | 191 | return actions.join(" ") |
181 | 192 | } |
182 | 193 | }, |
... | ... | @@ -193,51 +204,51 @@ |
193 | 204 | { |
194 | 205 | field: 'duration', |
195 | 206 | title: '耗时', |
196 | - formatter: function(value, row, index) { | |
207 | + formatter: function (value, row, index) { | |
197 | 208 | var actions = []; |
198 | 209 | var style = "" |
199 | - if(value>1000) | |
210 | + if (value > 1000) | |
200 | 211 | style = " style='color:red'"; |
201 | - if(value == undefined) | |
212 | + if (value == undefined) | |
202 | 213 | value = " " |
203 | - actions.push('<span '+ style + ' title="毫秒">'+value+ '</span>') | |
214 | + actions.push('<span ' + style + ' title="毫秒">' + value + '</span>') | |
204 | 215 | return actions.join(" ") |
205 | 216 | } |
206 | 217 | }, |
207 | 218 | /** |
208 | - { | |
209 | - field: 'requestHeader', | |
210 | - title: '请求头' | |
211 | - }, | |
219 | + { | |
220 | + field: 'requestHeader', | |
221 | + title: '请求头' | |
222 | + }, | |
212 | 223 | **/ |
213 | 224 | |
214 | 225 | { |
215 | 226 | field: 'requestBody', |
216 | 227 | title: '请求内容', |
217 | - formatter: function(value, row, index) { | |
228 | + formatter: function (value, row, index) { | |
218 | 229 | var actions = []; |
219 | - if(value == undefined || value == '') | |
230 | + if (value == undefined || value == '') | |
220 | 231 | value = " " |
221 | 232 | else |
222 | - actions.push('<pre style="max-height:100px; white-space: pre-wrap; width:350px" ondblclick="copy(this)" title="双击复制">'+value+ '</pre>') | |
233 | + actions.push('<pre style="max-height:100px; white-space: pre-wrap; width:350px" ondblclick="copy(this)" title="双击复制">' + value + '</pre>') | |
223 | 234 | return actions.join(" ") |
224 | 235 | } |
225 | 236 | }, |
226 | 237 | /** |
227 | - { | |
228 | - field: 'responseHeader', | |
229 | - title: '响应头' | |
230 | - }, | |
238 | + { | |
239 | + field: 'responseHeader', | |
240 | + title: '响应头' | |
241 | + }, | |
231 | 242 | **/ |
232 | 243 | { |
233 | 244 | field: 'responseBody', |
234 | 245 | title: '响应内容', |
235 | - formatter: function(value, row, index) { | |
246 | + formatter: function (value, row, index) { | |
236 | 247 | var actions = []; |
237 | - if(value == undefined) | |
248 | + if (value == undefined) | |
238 | 249 | value = " " |
239 | 250 | else |
240 | - actions.push('<pre style="vertical-align: top; max-height:100px; white-space: pre-wrap; width:350px" ondblclick="copy(this)" title="双击复制">'+value+ '</pre>') | |
251 | + actions.push('<pre style="vertical-align: top; max-height:100px; white-space: pre-wrap; width:350px" ondblclick="copy(this)" title="双击复制">' + value + '</pre>') | |
241 | 252 | return actions.join(" ") |
242 | 253 | } |
243 | 254 | }, |
... | ... | @@ -245,38 +256,38 @@ |
245 | 256 | { |
246 | 257 | field: 'exceptionMsg', |
247 | 258 | title: '异常信息', |
248 | - formatter: function(value, row, index) { | |
259 | + formatter: function (value, row, index) { | |
249 | 260 | var actions = []; |
250 | - if(value == undefined) | |
261 | + if (value == undefined) | |
251 | 262 | value = " " |
252 | 263 | else |
253 | - actions.push('<span style="color:red">'+value+ '</span>') | |
264 | + actions.push('<span style="color:red">' + value + '</span>') | |
254 | 265 | return actions.join(" ") |
255 | 266 | } |
256 | 267 | } |
257 | - ] | |
268 | + ] | |
258 | 269 | }; |
259 | 270 | $.table.init(options); |
260 | 271 | }); |
261 | 272 | |
262 | 273 | /** |
263 | - function parseJson(obj){ | |
264 | - var str = obj.innerHTML | |
265 | - try { | |
266 | - str = JSON.parse(str); | |
267 | - obj.outerHTML = '<pre style="white-space: pre-wrap; width:350px" ondblclick="unParse(this)">' + JSON.stringify(str, null, 2) + '</pre>'; | |
268 | - }catch (e) { | |
269 | - str = str.split("&").join(" ") | |
270 | - obj.outerHTML = '<pre style="white-space: pre-wrap; width:350px" ondblclick="unParse(this)">' + str + '</pre>'; | |
271 | - } | |
272 | - } | |
274 | + function parseJson(obj){ | |
275 | + var str = obj.innerHTML | |
276 | + try { | |
277 | + str = JSON.parse(str); | |
278 | + obj.outerHTML = '<pre style="white-space: pre-wrap; width:350px" ondblclick="unParse(this)">' + JSON.stringify(str, null, 2) + '</pre>'; | |
279 | + }catch (e) { | |
280 | + str = str.split("&").join(" ") | |
281 | + obj.outerHTML = '<pre style="white-space: pre-wrap; width:350px" ondblclick="unParse(this)">' + str + '</pre>'; | |
282 | + } | |
283 | + } | |
273 | 284 | |
274 | - function unParse(obj) { | |
275 | - var str = obj.innerHTML; | |
285 | + function unParse(obj) { | |
286 | + var str = obj.innerHTML; | |
276 | 287 | |
277 | - obj.outerHTML = '<pre style="white-space: pre-wrap; width:350px" ondblclick="parseJson(this)" title="双击格式化">'+str.replaceAll("\n","")+ '</pre>' | |
278 | - } | |
279 | - **/ | |
288 | + obj.outerHTML = '<pre style="white-space: pre-wrap; width:350px" ondblclick="parseJson(this)" title="双击格式化">'+str.replaceAll("\n","")+ '</pre>' | |
289 | + } | |
290 | + **/ | |
280 | 291 | |
281 | 292 | function copy(obj) { |
282 | 293 | let transfer = document.createElement('textarea'); |
... | ... |
src/main/resources/templates/receipt/receiptContainerHeader/receiptContainerHeader.html
... | ... | @@ -3,222 +3,231 @@ |
3 | 3 | <meta charset="utf-8"> |
4 | 4 | <head th:include="include :: header"></head> |
5 | 5 | <body class="gray-bg"> |
6 | - <div class="container-div"> | |
7 | - <div class="row"> | |
8 | - <div class="col-sm-12 select-info"> | |
9 | - <ul id="myTab" class="nav nav-tabs"> | |
10 | - <li class="active"><a href="#tabHeader" data-toggle="tab">主表</a></li> | |
11 | - <li><a href="#tabDetail" data-toggle="tab">明细</a></li> | |
12 | - </ul> | |
13 | - <div id="myTabContent" class="tab-content"> | |
14 | - <div class="tab-pane fade in active" id="tabHeader"> | |
6 | +<div class="container-div"> | |
7 | + <div class="row"> | |
8 | + <div class="col-sm-12 select-info"> | |
9 | + <ul id="myTab" class="nav nav-tabs"> | |
10 | + <li class="active"><a href="#tabHeader" data-toggle="tab">主表</a></li> | |
11 | + <li><a href="#tabDetail" data-toggle="tab">明细</a></li> | |
12 | + </ul> | |
13 | + <div id="myTabContent" class="tab-content"> | |
14 | + <div class="tab-pane fade in active" id="tabHeader"> | |
15 | 15 | |
16 | - <div class="col-sm-12 select-info"> | |
17 | - <form id="receiptContainerHeader-form"> | |
18 | - <div class="select-list"> | |
19 | - <ul> | |
20 | - <li> | |
21 | - 入库单号:<input type="text" name="receiptCode"/> | |
22 | - </li> | |
23 | - <li> | |
24 | - 容器编号:<input type="text" name="containerCode"/> | |
25 | - </li> | |
26 | - <li> | |
27 | - 库位编号:<input type="text" name="toLocation"/> | |
28 | - </li> | |
29 | - <li> | |
30 | - <!--入库类型:<input type="text" name="sourceCode"/> | |
31 | - --> | |
32 | - 任务类型:<select name="taskType" th:with="type=${@dict.getType('receiptTaskType')}"> | |
33 | - <option value="">所有</option> | |
34 | - <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select> | |
35 | - </li> | |
36 | - <li> | |
37 | - <!--头 状 态:<input type="text" name="firstStatus"/>--> | |
38 | - 容器任务状态:<select name="Status" th:with="firstStatus=${@dict.getType('receiptContainerHeaderStatus')}"> | |
39 | - <option value="">所有</option> | |
40 | - <option th:each="e : ${firstStatus}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select> | |
41 | - </li> | |
42 | - <li> | |
43 | - 创 建 人:<input type="text" name="createdBy"/> | |
44 | - </li> | |
45 | - <li class="time"> | |
46 | - <label>创建时间: </label> | |
47 | - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin" autocomplete="off"/> | |
48 | - <span>-</span> | |
49 | - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd" autocomplete="off"/> | |
50 | - </li> | |
51 | - <li> | |
52 | - <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> | |
53 | - <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('receiptContainerHeader-form')"><i class="fa fa-refresh"></i> 重置</a> | |
54 | - <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="receipt:receiptHeader:export"><i class="fa fa-download"></i> 导出</a>--> | |
55 | - </li> | |
56 | - </ul> | |
57 | - </div> | |
58 | - </form> | |
59 | - </div> | |
60 | - <div class="btn-group hidden-xs" id="toolbar" role="group"> | |
61 | - <a class="btn btn-outline btn-success btn-rounded" onclick="batchCreateTask()" shiro:hasPermission="receipt:receiptContainer:add"> | |
62 | - <i class="fa fa-edit"></i> 批量生成任务 | |
63 | - </a> | |
64 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="batchRemoveHead()" shiro:hasPermission="receipt:receiptContainer:remove"> | |
65 | - <i class="fa fa-remove"></i> 批量撤销组盘 | |
66 | - </a> | |
67 | - </div> | |
68 | - <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | |
16 | + <div class="col-sm-12 select-info"> | |
17 | + <form id="receiptContainerHeader-form"> | |
18 | + <div class="select-list"> | |
19 | + <ul> | |
20 | + <li> | |
21 | + 入库单号:<input type="text" name="receiptCode"/> | |
22 | + </li> | |
23 | + <li> | |
24 | + 容器编号:<input type="text" name="containerCode"/> | |
25 | + </li> | |
26 | + <li> | |
27 | + 库位编号:<input type="text" name="toLocation"/> | |
28 | + </li> | |
29 | + <li> | |
30 | + <!--入库类型:<input type="text" name="sourceCode"/> | |
31 | + --> | |
32 | + 任务类型:<select name="taskType" | |
33 | + th:with="type=${@dict.getType('receiptTaskType')}"> | |
34 | + <option value="">所有</option> | |
35 | + <option th:each="e : ${type}" th:text="${e['dictLabel']}" | |
36 | + th:value="${e['dictValue']}"></option> | |
37 | + </select> | |
38 | + </li> | |
39 | + <li> | |
40 | + <!--头 状 态:<input type="text" name="firstStatus"/>--> | |
41 | + 容器任务状态:<select name="Status" | |
42 | + th:with="firstStatus=${@dict.getType('receiptContainerHeaderStatus')}"> | |
43 | + <option value="">所有</option> | |
44 | + <option th:each="e : ${firstStatus}" th:text="${e['dictLabel']}" | |
45 | + th:value="${e['dictValue']}"></option> | |
46 | + </select> | |
47 | + </li> | |
48 | + <li> | |
49 | + 创 建 人:<input type="text" name="createdBy"/> | |
50 | + </li> | |
51 | + <li class="time"> | |
52 | + <label>创建时间: </label> | |
53 | + <input type="text" class="time-input" id="startTime" placeholder="开始时间" | |
54 | + name="createdBegin" autocomplete="off"/> | |
55 | + <span>-</span> | |
56 | + <input type="text" class="time-input" id="endTime" placeholder="结束时间" | |
57 | + name="createdEnd" autocomplete="off"/> | |
58 | + </li> | |
59 | + <li> | |
60 | + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i | |
61 | + class="fa fa-search"></i> 搜索</a> | |
62 | + <a class="btn btn-warning btn-rounded btn-sm" | |
63 | + onclick="$.form.reset('receiptContainerHeader-form')"><i | |
64 | + class="fa fa-refresh"></i> 重置</a> | |
65 | + <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="receipt:receiptHeader:export"><i class="fa fa-download"></i> 导出</a>--> | |
66 | + </li> | |
67 | + </ul> | |
68 | + </div> | |
69 | + </form> | |
70 | + </div> | |
71 | + <div class="btn-group hidden-xs" id="toolbar" role="group"> | |
72 | + <a class="btn btn-outline btn-success btn-rounded" onclick="batchCreateTask()" | |
73 | + shiro:hasPermission="receipt:receiptContainer:add"> | |
74 | + <i class="fa fa-edit"></i> 批量生成任务 | |
75 | + </a> | |
76 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="batchRemoveHead()" | |
77 | + shiro:hasPermission="receipt:receiptContainer:remove"> | |
78 | + <i class="fa fa-remove"></i> 批量撤销组盘 | |
79 | + </a> | |
80 | + </div> | |
81 | + <table id="bootstrap-table" data-mobile-responsive="true" | |
82 | + class="table table-bordered table-hover"></table> | |
69 | 83 | |
70 | - </div> | |
71 | - <div class="tab-pane fade" id="tabDetail"> | |
72 | - <table id="bootstrap-table1" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | |
73 | - </div> | |
74 | - </div> | |
75 | - </div> | |
76 | - </div> | |
84 | + </div> | |
85 | + <div class="tab-pane fade" id="tabDetail"> | |
86 | + <table id="bootstrap-table1" data-mobile-responsive="true" | |
87 | + class="table table-bordered table-hover"></table> | |
88 | + </div> | |
89 | + </div> | |
90 | + </div> | |
77 | 91 | </div> |
78 | - <div th:include="include :: footer"></div> | |
79 | - <script th:inline="javascript"> | |
80 | - var createTaskFlag = [[${@permission.hasPermi('receipt:receiptContainer:add')}]]; | |
81 | - var removeFlag = [[${@permission.hasPermi('receipt:receiptContainer:remove')}]]; | |
82 | - var prefix = ctx + "receipt/receiptContainerHeader"; | |
83 | - var detailPrefix = ctx + "receipt/receiptContainerDetail"; | |
84 | - var taskType=[[${@dict.getType('taskType')}]]; | |
85 | - // var taskStatus=[[${@dict.getType('taskStatus')}]]; //任务状态 | |
86 | - var receiptContainerHeaderStatus = [[${@dict.getType('receiptContainerHeaderStatus')}]] //容器状态 | |
87 | - var S_headerId; | |
88 | - $(function() { | |
89 | - var options = { | |
90 | - url: prefix + "/list", | |
91 | - createUrl: prefix + "/add", | |
92 | - updateUrl: prefix + "/edit/{id}", | |
93 | - removeUrl: prefix + "/remove", | |
94 | - sortName: "created", | |
95 | - // height:610, | |
96 | - sortOrder: "desc", | |
97 | - modalName: "入库组盘头", | |
98 | - search: false, | |
99 | - columns: [{ | |
100 | - checkbox: true | |
101 | - }, | |
102 | - { | |
103 | - field : 'id', | |
104 | - title : '组盘头id' , | |
105 | - sortable:true | |
106 | - }, | |
107 | - { | |
108 | - field : 'containerCode', | |
109 | - title : '容器编号' , | |
110 | - sortable:true | |
111 | - }, | |
112 | - { | |
113 | - field : 'toLocation', | |
114 | - title : '库位编号' , | |
115 | - sortable:true | |
116 | - }, | |
117 | - { | |
118 | - field : 'taskType', | |
119 | - title : '任务类型', | |
92 | +</div> | |
93 | +<div th:include="include :: footer"></div> | |
94 | +<script th:inline="javascript"> | |
95 | + var createTaskFlag = [[${@permission.hasPermi('receipt:receiptContainer:add')}]]; | |
96 | + var removeFlag = [[${@permission.hasPermi('receipt:receiptContainer:remove')}]]; | |
97 | + var prefix = ctx + "receipt/receiptContainerHeader"; | |
98 | + var detailPrefix = ctx + "receipt/receiptContainerDetail"; | |
99 | + var taskType = [[${@dict.getType('taskType')}]]; | |
100 | + // var taskStatus=[[${@dict.getType('taskStatus')}]]; //任务状态 | |
101 | + var receiptContainerHeaderStatus = [[${@dict.getType('receiptContainerHeaderStatus')}]] //容器状态 | |
102 | + var S_headerId; | |
103 | + $(function () { | |
104 | + var options = { | |
105 | + url: prefix + "/list", | |
106 | + createUrl: prefix + "/add", | |
107 | + updateUrl: prefix + "/edit/{id}", | |
108 | + removeUrl: prefix + "/remove", | |
109 | + sortName: "created", | |
110 | + // height:610, | |
111 | + sortOrder: "desc", | |
112 | + modalName: "入库组盘头", | |
113 | + search: false, | |
114 | + columns: [{ | |
115 | + checkbox: true | |
116 | + }, | |
117 | + { | |
118 | + field: 'id', | |
119 | + title: '组盘头id', | |
120 | + }, | |
121 | + { | |
122 | + field: 'containerCode', | |
123 | + title: '容器编号', | |
124 | + }, | |
125 | + { | |
126 | + field: 'toLocation', | |
127 | + title: '库位编号', | |
128 | + }, | |
129 | + { | |
130 | + field: 'taskType', | |
131 | + title: '任务类型', | |
120 | 132 | align: 'center', |
121 | - formatter: function(value, row, index) { | |
133 | + formatter: function (value, row, index) { | |
122 | 134 | return $.table.selectDictLabel(taskType, value); |
123 | - },sortable:true | |
124 | - }, | |
125 | - { | |
126 | - field : 'status', | |
127 | - title : '容器任务状态', | |
128 | - formatter: function(value, row, index) { | |
135 | + }, | |
136 | + }, | |
137 | + { | |
138 | + field: 'status', | |
139 | + title: '容器任务状态', | |
140 | + formatter: function (value, row, index) { | |
129 | 141 | return $.table.selectDictLabel(receiptContainerHeaderStatus, value); |
130 | - } , | |
131 | - sortable:true | |
132 | - }, | |
133 | - { | |
134 | - field : 'created', | |
135 | - title : '创建时间' , | |
136 | - sortable:true | |
137 | - }, | |
138 | - { | |
139 | - field : 'createdBy', | |
140 | - title : '创建人' , | |
141 | - sortable:true | |
142 | - }, | |
143 | - { | |
144 | - title: '操作', | |
145 | - align: 'center', | |
146 | - formatter: function(value, row, index) { | |
147 | - var actions = []; | |
142 | + }, | |
143 | + }, | |
144 | + { | |
145 | + field: 'created', | |
146 | + title: '创建时间', | |
147 | + }, | |
148 | + { | |
149 | + field: 'createdBy', | |
150 | + title: '创建人', | |
151 | + }, | |
152 | + { | |
153 | + title: '操作', | |
154 | + align: 'center', | |
155 | + formatter: function (value, row, index) { | |
156 | + var actions = []; | |
148 | 157 | actions.push('<a class="btn btn-info btn-xs " href="#" onclick="detail(\'' + row.id + '\')"><i class="fa fa-list-ul"></i>明细</a> '); |
149 | - if (row.status < 10){ | |
150 | - if(row.taskType == 200) { | |
151 | - actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="chooseStation(\'' + row.id + '\')"><i class="fa fa-edit"></i>生成任务</a> '); | |
152 | - } else { | |
153 | - actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="createTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>生成任务</a> '); | |
154 | - } | |
155 | - } | |
156 | - if (row.status == 0) { | |
158 | + if (row.status < 10) { | |
159 | + if (row.taskType == 200 && row.flat != 1) { | |
160 | + actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="chooseStation(\'' + row.id + '\')"><i class="fa fa-edit"></i>生成任务</a> '); | |
161 | + } else { | |
162 | + actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="createTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>生成任务</a> '); | |
163 | + } | |
164 | + } | |
165 | + if (row.status == 0) { | |
157 | 166 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>取消配盘</a>'); |
158 | - } | |
159 | - return actions.join(''); | |
160 | - } | |
161 | - }] | |
162 | - }; | |
163 | - $.table.init(options); | |
164 | - }); | |
167 | + } | |
168 | + return actions.join(''); | |
169 | + } | |
170 | + }] | |
171 | + }; | |
172 | + $.table.init(options); | |
173 | + }); | |
165 | 174 | |
166 | - $("#bootstrap-table1").bootstrapTable({ | |
167 | - // url: detailPrefix + "/headerId", | |
168 | - // createUrl: detailPrefix + "/add", | |
169 | - // updateUrl: detailPrefix + "/edit/{id}", | |
170 | - // removeUrl: detailPrefix + "/remove", | |
171 | - // search: true, //搜索 | |
172 | - sortable: true, //排序 | |
173 | - showRefresh: true, //刷新 | |
174 | - showToggle:true, //视图切换 | |
175 | - clickToSelect: true, | |
176 | - showColumns:true, //列选择 | |
177 | - // detailView:true, | |
178 | - showExport: true, //导出 | |
179 | - exportDataType: "all", //导出类型basic', 'all', 'selected'.当前页、所有数据、选中数据 | |
180 | - modalName: "入库明细", | |
181 | - iconSize: "outline", | |
182 | - toolbar: "#toolbar1", | |
183 | - contentType: "application/x-www-form-urlencoded", | |
184 | - columns: [ | |
175 | + $("#bootstrap-table1").bootstrapTable({ | |
176 | + // url: detailPrefix + "/headerId", | |
177 | + // createUrl: detailPrefix + "/add", | |
178 | + // updateUrl: detailPrefix + "/edit/{id}", | |
179 | + // removeUrl: detailPrefix + "/remove", | |
180 | + // search: true, //搜索 | |
181 | + sortable: true, //排序 | |
182 | + showRefresh: true, //刷新 | |
183 | + showToggle: true, //视图切换 | |
184 | + clickToSelect: true, | |
185 | + showColumns: true, //列选择 | |
186 | + // detailView:true, | |
187 | + showExport: true, //导出 | |
188 | + exportDataType: "all", //导出类型basic', 'all', 'selected'.当前页、所有数据、选中数据 | |
189 | + modalName: "入库明细", | |
190 | + iconSize: "outline", | |
191 | + toolbar: "#toolbar1", | |
192 | + contentType: "application/x-www-form-urlencoded", | |
193 | + columns: [ | |
185 | 194 | // { |
186 | 195 | // checkbox: true |
187 | 196 | // }, |
188 | 197 | { |
189 | - field : 'id', | |
190 | - title : '明细id' | |
198 | + field: 'id', | |
199 | + title: '明细id' | |
191 | 200 | }, |
192 | 201 | { |
193 | - field : 'headerId', | |
194 | - title : '组盘头标识', | |
195 | - visible:false | |
202 | + field: 'headerId', | |
203 | + title: '组盘头标识', | |
204 | + visible: false | |
196 | 205 | }, |
197 | 206 | { |
198 | - field : 'receiptDetailId', | |
199 | - title : '入库单明细标识', | |
200 | - visible:false | |
207 | + field: 'receiptDetailId', | |
208 | + title: '入库单明细标识', | |
209 | + visible: false | |
201 | 210 | }, |
202 | - { | |
203 | - field : 'receiptCode', | |
204 | - title : '入库单号' , | |
205 | - sortable:true | |
206 | - }, | |
207 | 211 | { |
208 | - field : 'materialCode', | |
209 | - title : '物料编码', | |
210 | - sortable:true | |
212 | + field: 'receiptCode', | |
213 | + title: '入库单号', | |
214 | + sortable: true | |
215 | + }, | |
216 | + { | |
217 | + field: 'materialCode', | |
218 | + title: '物料编码', | |
219 | + sortable: true | |
220 | + }, | |
221 | + { | |
222 | + field: 'materialName', | |
223 | + title: '物料名称', | |
224 | + sortable: true | |
225 | + }, | |
226 | + { | |
227 | + field: 'materialSpec', | |
228 | + title: '物料规格', | |
229 | + sortable: true | |
211 | 230 | }, |
212 | - { | |
213 | - field : 'materialName', | |
214 | - title : '物料名称', | |
215 | - sortable:true | |
216 | - }, | |
217 | - { | |
218 | - field : 'materialSpec', | |
219 | - title : '物料规格', | |
220 | - sortable:true | |
221 | - }, | |
222 | 231 | /*{ |
223 | 232 | field : 'batch', |
224 | 233 | title : '批次', |
... | ... | @@ -229,23 +238,23 @@ |
229 | 238 | title : '批号', |
230 | 239 | sortable:true |
231 | 240 | },*/ |
232 | - { | |
233 | - field : 'project', | |
234 | - title : '项目号' | |
235 | - }, | |
236 | 241 | { |
237 | - field : 'qty', | |
238 | - title : '组盘数量' | |
242 | + field: 'project', | |
243 | + title: '项目号' | |
239 | 244 | }, |
240 | 245 | { |
241 | - field : 'created', | |
242 | - title : '创建时间', | |
243 | - sortable:true | |
246 | + field: 'qty', | |
247 | + title: '组盘数量' | |
244 | 248 | }, |
245 | 249 | { |
246 | - field : 'createdBy', | |
247 | - title : '创建用户', | |
248 | - sortable:true | |
250 | + field: 'created', | |
251 | + title: '创建时间', | |
252 | + sortable: true | |
253 | + }, | |
254 | + { | |
255 | + field: 'createdBy', | |
256 | + title: '创建用户', | |
257 | + sortable: true | |
249 | 258 | }, |
250 | 259 | // { |
251 | 260 | // title: '操作', |
... | ... | @@ -256,105 +265,104 @@ |
256 | 265 | // return actions.join(''); |
257 | 266 | // } |
258 | 267 | // } |
259 | - ] | |
260 | - }); | |
268 | + ] | |
269 | + }); | |
261 | 270 | |
262 | - function createtable(url,headerId) { | |
263 | - // $("#tabDetail").children().remove(); | |
264 | - $("#myTab li").removeClass("active"); | |
265 | - $(".tab-pane").removeClass("in active"); | |
266 | - $("#myTab li:eq(1)").addClass("active"); | |
267 | - $("#tabDetail").addClass("in active"); | |
268 | - $.ajax({ | |
269 | - url:url, | |
270 | - type: 'post', | |
271 | - data:{ | |
272 | - headerId:headerId | |
273 | - }, | |
274 | - success : function (value) { | |
275 | - $("#bootstrap-table1").bootstrapTable('load',value.data); | |
276 | - } | |
277 | - }) | |
278 | - } | |
271 | + function createtable(url, headerId) { | |
272 | + // $("#tabDetail").children().remove(); | |
273 | + $("#myTab li").removeClass("active"); | |
274 | + $(".tab-pane").removeClass("in active"); | |
275 | + $("#myTab li:eq(1)").addClass("active"); | |
276 | + $("#tabDetail").addClass("in active"); | |
277 | + $.ajax({ | |
278 | + url: url, | |
279 | + type: 'post', | |
280 | + data: { | |
281 | + headerId: headerId | |
282 | + }, | |
283 | + success: function (value) { | |
284 | + $("#bootstrap-table1").bootstrapTable('load', value.data); | |
285 | + } | |
286 | + }) | |
287 | + } | |
279 | 288 | |
280 | - /*入库单列表-详细*/ | |
281 | - function detail(headerId) { | |
282 | - var url = detailPrefix + "/list/"+headerId; | |
283 | - // createMenuItem(url, "入库组盘明细"); | |
284 | - S_headerId=headerId; | |
285 | - createtable(url, S_headerId); | |
286 | - } | |
289 | + /*入库单列表-详细*/ | |
290 | + function detail(headerId) { | |
291 | + var url = detailPrefix + "/list/" + headerId; | |
292 | + // createMenuItem(url, "入库组盘明细"); | |
293 | + S_headerId = headerId; | |
294 | + createtable(url, S_headerId); | |
295 | + } | |
287 | 296 | |
288 | - /* 单个删除组盘明细 */ | |
289 | - function remove(id) { | |
290 | - $.modal.confirm("确定删除该条明细信息吗?", function() { | |
291 | - var url = detailPrefix + "/remove"; | |
292 | - var data = { "id": id }; | |
293 | - $.operate.post(url, data); | |
294 | - createtable(url, S_headerId); | |
295 | - }); | |
296 | - } | |
297 | + /* 单个删除组盘明细 */ | |
298 | + function remove(id) { | |
299 | + $.modal.confirm("确定删除该条明细信息吗?", function () { | |
300 | + var url = detailPrefix + "/remove"; | |
301 | + var data = {"id": id}; | |
302 | + $.operate.post(url, data); | |
303 | + createtable(url, S_headerId); | |
304 | + }); | |
305 | + } | |
297 | 306 | |
298 | - /* 批量删除组盘 */ | |
299 | - function batchRemoveHead() { | |
300 | - var rows=$("#bootstrap-table").bootstrapTable('getSelections'); | |
301 | - if (rows.length == 0) { | |
302 | - $.modal.alertWarning("请至少选择一条记录"); | |
303 | - return; | |
307 | + /* 批量删除组盘 */ | |
308 | + function batchRemoveHead() { | |
309 | + var rows = $("#bootstrap-table").bootstrapTable('getSelections'); | |
310 | + if (rows.length == 0) { | |
311 | + $.modal.alertWarning("请至少选择一条记录"); | |
312 | + return; | |
313 | + } | |
314 | + $.modal.confirm("确认要撤销选中的" + rows.length + "条组盘吗?", function () { | |
315 | + var url = prefix + "/remove"; | |
316 | + var ids = ""; | |
317 | + for (var i = 0; i < rows.length; i++) { | |
318 | + ids = ids + rows[i].id + "," | |
304 | 319 | } |
305 | - $.modal.confirm("确认要撤销选中的" + rows.length + "条组盘吗?", function() { | |
306 | - var url = prefix + "/remove"; | |
307 | - var ids = ""; | |
308 | - for(var i=0; i<rows.length; i++) { | |
309 | - ids = ids + rows[i].id + "," | |
310 | - } | |
311 | - var data = { "ids": ids.substring(0, ids.length-1) }; | |
312 | - $.operate.post(url, data); | |
313 | - // submit(url, "post", "json", data); | |
314 | - }); | |
315 | - } | |
320 | + var data = {"ids": ids.substring(0, ids.length - 1)}; | |
321 | + $.operate.post(url, data); | |
322 | + // submit(url, "post", "json", data); | |
323 | + }); | |
324 | + } | |
316 | 325 | |
317 | - function chooseStation(id) { | |
318 | - var url = ctx + "receipt/receiptContainerHeader/chooseStation" + "/" + id; | |
319 | - $.modal.open("选择站台", url); | |
320 | - } | |
326 | + function chooseStation(id) { | |
327 | + var url = ctx + "receipt/receiptContainerHeader/chooseStation" + "/" + id; | |
328 | + $.modal.open("选择站台", url); | |
329 | + } | |
321 | 330 | |
322 | 331 | |
332 | + /* 单个生成任务 */ | |
333 | + function createTask(id) { | |
334 | + var url = prefix + "/createTask"; | |
335 | + var data = {"ids": id}; | |
336 | + $.operate.post(url, data); | |
337 | + } | |
323 | 338 | |
324 | - /* 单个生成任务 */ | |
325 | - function createTask(id) { | |
326 | - var url = prefix + "/createTask"; | |
327 | - var data = { "ids" : id }; | |
328 | - $.operate.post(url, data); | |
339 | + /* 批量生成任务 */ | |
340 | + function batchCreateTask() { | |
341 | + var rows = $("#bootstrap-table").bootstrapTable('getSelections'); | |
342 | + if (rows.length == 0) { | |
343 | + $.modal.alertWarning("请至少选择一条记录"); | |
344 | + return; | |
329 | 345 | } |
330 | - | |
331 | - /* 批量生成任务 */ | |
332 | - function batchCreateTask() { | |
333 | - var rows=$("#bootstrap-table").bootstrapTable('getSelections'); | |
334 | - if (rows.length == 0) { | |
335 | - $.modal.alertWarning("请至少选择一条记录"); | |
336 | - return; | |
337 | - } | |
338 | - var ids = ""; | |
339 | - for (var i = 0; i < rows.length; i++) { | |
340 | - ids = ids + rows[i].id + "," | |
341 | - } | |
342 | - var data = {"ids": ids.substring(0, ids.length - 1)}; | |
343 | - // debugger | |
344 | - chooseStation(ids); | |
345 | - | |
346 | + var ids = ""; | |
347 | + for (var i = 0; i < rows.length; i++) { | |
348 | + ids = ids + rows[i].id + "," | |
346 | 349 | } |
350 | + var data = {"ids": ids.substring(0, ids.length - 1)}; | |
351 | + // debugger | |
352 | + chooseStation(ids); | |
353 | + | |
354 | + } | |
347 | 355 | |
348 | - function chooseStation(id) { | |
349 | - var url = ctx + "receipt/receiptContainerHeader/chooseStation" + "/" + id; | |
350 | - $.modal.open("选择站台", url); | |
351 | - } | |
356 | + function chooseStation(id) { | |
357 | + var url = ctx + "receipt/receiptContainerHeader/chooseStation" + "/" + id; | |
358 | + $.modal.open("选择站台", url); | |
359 | + } | |
352 | 360 | |
353 | - function position(id){ | |
354 | - var url = prefix + "/position/"; | |
355 | - var data = { "ids" : id }; | |
356 | - $.operate.post(url, data); | |
357 | - } | |
358 | - </script> | |
361 | + function position(id) { | |
362 | + var url = prefix + "/position/"; | |
363 | + var data = {"ids": id}; | |
364 | + $.operate.post(url, data); | |
365 | + } | |
366 | +</script> | |
359 | 367 | </body> |
360 | 368 | </html> |
... | ... |
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... | ... | @@ -113,10 +113,10 @@ |
113 | 113 | </form> |
114 | 114 | </div> |
115 | 115 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
116 | - <!-- <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"--> | |
117 | - <!-- shiro:hasPermission="receipt:receiptHeader:add">--> | |
118 | - <!-- <i class="fa fa-plus"></i> 新增--> | |
119 | - <!-- </a>--> | |
116 | + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" | |
117 | + shiro:hasPermission="receipt:receiptHeader:add"> | |
118 | + <i class="fa fa-plus"></i> 新增 | |
119 | + </a> | |
120 | 120 | <!-- <a class="btn btn-outline btn-default btn-rounded" onclick="submitReview()" shiro:hasPermission="receipt:receiptHeader:approval">--> |
121 | 121 | <!-- <i class="fa fa-fighter-jet"></i> 提交审核--> |
122 | 122 | <!-- </a>--> |
... | ... | @@ -240,10 +240,10 @@ |
240 | 240 | </form> |
241 | 241 | </div> |
242 | 242 | <div class="btn-group hidden-xs" id="toolbar1" role="group" style="position:relative;"> |
243 | - <!-- <a class="btn btn-outline btn-success btn-rounded" onclick="add()"--> | |
244 | - <!-- shiro:hasPermission="receipt:receiptDetail:add">--> | |
245 | - <!-- <i class="fa fa-plus"></i> 新增--> | |
246 | - <!-- </a>--> | |
243 | + <a class="btn btn-outline btn-success btn-rounded" onclick="add()" | |
244 | + shiro:hasPermission="receipt:receiptDetail:add"> | |
245 | + <i class="fa fa-plus"></i> 新增 | |
246 | + </a> | |
247 | 247 | <!-- <a class="btn btn-outline btn-danger btn-rounded" onclick="batRemove()"--> |
248 | 248 | <!-- shiro:hasPermission="receipt:receiptDetail:remove">--> |
249 | 249 | <!-- <i class="fa fa-trash-o"></i> 删除--> |
... | ... |