Commit c1461b6de49394ca8030ec98053d30c995ec49d0
Merge remote-tracking branch 'origin/develop' into develop
Showing
42 changed files
with
285 additions
and
145 deletions
src/main/java/com/huaheng/api/wcs/service/stationInfo/StationInfoServiceImpl.java
... | ... | @@ -3,6 +3,7 @@ package com.huaheng.api.wcs.service.stationInfo; |
3 | 3 | |
4 | 4 | import com.alibaba.fastjson.JSON; |
5 | 5 | import com.huaheng.api.wcs.domain.WcsTask; |
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.http.HttpUtils; |
... | ... | @@ -45,8 +46,7 @@ public class StationInfoServiceImpl implements StationInfoService { |
45 | 46 | map.put("port",list); |
46 | 47 | |
47 | 48 | //3、发送数据 |
48 | - String param="wcs"; | |
49 | - String url=addressService.selectAddress(param)+"StationInfo"; | |
49 | + String url=addressService.selectAddress(QuantityConstant.ADDRESS_WCS_STATION_INFOS); | |
50 | 50 | String JsonParam = JSON.toJSONString(map); |
51 | 51 | String result = HttpUtils.bodypost(url, JsonParam); |
52 | 52 | if(StringUtils.isEmpty(result)){ |
... | ... |
src/main/java/com/huaheng/api/wcs/service/taskAssignService/TaskAssignServiceImpl.java
... | ... | @@ -110,7 +110,7 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
110 | 110 | wcsTask.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
111 | 111 | wcsTask.setTaskType(taskType); |
112 | 112 | wcsTask.setFromPort(""); |
113 | - wcsTask.setToPort(taskHeader.getStationCode()); | |
113 | + wcsTask.setToPort(taskHeader.getPort()); | |
114 | 114 | wcsTask.setContainerCode(taskHeader.getContainerCode()); |
115 | 115 | Location location; |
116 | 116 | switch(wcsTask.getTaskType().intValue()) { |
... | ... | @@ -264,8 +264,7 @@ public class TaskAssignServiceImpl implements TaskAssignService { |
264 | 264 | wcsTask.setTaskDetails(taskDetails); |
265 | 265 | |
266 | 266 | //4、发送数据 |
267 | - String param = "wcs"; | |
268 | - String url = addressService.selectAddress(param)+"TaskAssign"; | |
267 | + String url = addressService.selectAddress(QuantityConstant.ADDRESS_WCS_TASK_ASSIGN); | |
269 | 268 | wcsTask = switchTaskTypeToWcs(wcsTask); |
270 | 269 | String JsonParam = JSON.toJSONString(wcsTask); |
271 | 270 | System.out.println(JsonParam); |
... | ... |
src/main/java/com/huaheng/api/wcs/service/taskCancel/TaskCancelServiceImpl.java
... | ... | @@ -2,6 +2,7 @@ package com.huaheng.api.wcs.service.taskCancel; |
2 | 2 | |
3 | 3 | import com.alibaba.fastjson.JSON; |
4 | 4 | import com.huaheng.api.wcs.domain.WcsTask; |
5 | +import com.huaheng.common.constant.QuantityConstant; | |
5 | 6 | import com.huaheng.common.exception.service.ServiceException; |
6 | 7 | import com.huaheng.common.utils.StringUtils; |
7 | 8 | import com.huaheng.common.utils.http.HttpUtils; |
... | ... | @@ -35,14 +36,13 @@ public class TaskCancelServiceImpl implements TaskCancelService { |
35 | 36 | |
36 | 37 | |
37 | 38 | //2、转换实体 |
38 | -// WcsTask wcsTask = new WcsTask(); | |
39 | -// wcsTask.setTaskNo(id.toString()); | |
39 | + WcsTask wcsTask = new WcsTask(); | |
40 | + wcsTask.setTaskNo(id.toString()); | |
40 | 41 | |
41 | 42 | //3、发送数据 |
42 | - String param="wcs"; | |
43 | - String url=addressService.selectAddress(param)+"TaskCancel"; | |
44 | - String JsonParam = JSON.toJSONString(id.toString()); | |
45 | - String result = HttpUtils.bodypost(url, JsonParam); | |
43 | + String url = addressService.selectAddress(QuantityConstant.ADDRESS_WCS_TASK_CANCEL); | |
44 | + String jsonParam = JSON.toJSONString(wcsTask); | |
45 | + String result = HttpUtils.bodypost(url, jsonParam); | |
46 | 46 | if(StringUtils.isEmpty(result)){ |
47 | 47 | throw new ServiceException("接口地址错误"); |
48 | 48 | } |
... | ... |
src/main/java/com/huaheng/api/wcs/service/taskFinish/TaskFinishServiceImpl.java
... | ... | @@ -46,12 +46,14 @@ public class TaskFinishServiceImpl implements TaskFinishService { |
46 | 46 | |
47 | 47 | } |
48 | 48 | |
49 | - if (StringUtils.isEmpty(taskFinishDomain.getWeight())) { | |
50 | - return AjaxResult.error("重量为空"); | |
49 | + | |
50 | + String[] weight = new String[1]; | |
51 | + if (StringUtils.isNotEmpty(taskFinishDomain.getWeight())) { | |
52 | + weight = Convert.toStrArray(taskFinishDomain.getWeight()); | |
51 | 53 | } |
52 | 54 | //任务完成 |
53 | 55 | try{ |
54 | - ajaxResult=taskHeaderService.completeTaskByWMS(Convert.toIntArray(taskFinishDomain.getTaskNo()), Convert.toStrArray(taskFinishDomain.getWeight())); | |
56 | + ajaxResult=taskHeaderService.completeTaskByWMS(Convert.toIntArray(taskFinishDomain.getTaskNo()), weight); | |
55 | 57 | } catch (Exception e) { |
56 | 58 | e.printStackTrace(); |
57 | 59 | } |
... | ... |
src/main/java/com/huaheng/api/wcs/service/taskInfo/TaskInfoServiceImpl.java
... | ... | @@ -2,6 +2,7 @@ package com.huaheng.api.wcs.service.taskInfo; |
2 | 2 | |
3 | 3 | import com.alibaba.fastjson.JSON; |
4 | 4 | import com.huaheng.api.wcs.domain.WcsTask; |
5 | +import com.huaheng.common.constant.QuantityConstant; | |
5 | 6 | import com.huaheng.common.exception.service.ServiceException; |
6 | 7 | import com.huaheng.common.utils.StringUtils; |
7 | 8 | import com.huaheng.common.utils.http.HttpUtils; |
... | ... | @@ -39,8 +40,7 @@ public class TaskInfoServiceImpl implements TaskInfoService { |
39 | 40 | wcsTask.setTaskNo(id.toString()); |
40 | 41 | |
41 | 42 | //3、发送数据 |
42 | - String param="wcs"; | |
43 | - String url=addressService.selectAddress(param)+"TaskInfo"; | |
43 | + String url=addressService.selectAddress(QuantityConstant.ADDRESS_WCS_TASK_INFO); | |
44 | 44 | String JsonParam = JSON.toJSONString(wcsTask); |
45 | 45 | String result = HttpUtils.bodypost(url, JsonParam); |
46 | 46 | if(StringUtils.isEmpty(result)){ |
... | ... |
src/main/java/com/huaheng/common/constant/QuantityConstant.java
... | ... | @@ -361,11 +361,24 @@ public class QuantityConstant { |
361 | 361 | public static final Integer POINTS_SOME = 1; |
362 | 362 | |
363 | 363 | public static final int ROW_OUT = 1; |
364 | - | |
365 | 364 | public static final int ROW_IN = 0; |
366 | 365 | |
366 | + //WCS任务下发 | |
367 | + public static final String ADDRESS_WCS_TASK_ASSIGN = "WCS_TASK_ASSIGN"; | |
368 | + //WCS任务取消 | |
369 | + public static final String ADDRESS_WCS_TASK_CANCEL = "WCS_TASK_CANCEL"; | |
370 | + //WCS任务信息查询 | |
371 | + public static final String ADDRESS_WCS_TASK_INFO = "WCS_TASK_INFO"; | |
372 | + //WCS设置任务优先级 | |
373 | + public static final String ADDRESS_WCS_TASK_PRIORITY_CHANGE = "WCS_TASK_PRIORITY_CHANGE"; | |
374 | + //WCS站台信息查询 | |
375 | + public static final String ADDRESS_WCS_STATION_INFOS = "WCS_STATION_INFOS"; | |
376 | + //WCS获取可用巷道 | |
377 | + public static final String ADDRESS_WCS_AVAILABLE_ROADWAY = "WCS_AVAILABLE_ROADWAY"; | |
378 | + | |
379 | + | |
367 | 380 | public static final String STATUS_CONTAINER_EMPTY = "empty"; |
368 | - public static final String STATUS_CONTAINER_LOCK = "empty"; | |
381 | + public static final String STATUS_CONTAINER_LOCK = "lock"; | |
369 | 382 | public static final String STATUS_CONTAINER_SOME = "some"; |
370 | 383 | |
371 | 384 | public static final String STATUS_LOCATION_EMPTY = "empty"; |
... | ... | @@ -373,7 +386,14 @@ public class QuantityConstant { |
373 | 386 | |
374 | 387 | public static final String RULE_SHIPMENT_TASK= "shipmentTaskRule"; |
375 | 388 | public static final String RULE_TASK_LOCATION = "taskLocationRule"; |
389 | + public static final String RULE_CONNECT_WCS = "connectWcs"; | |
376 | 390 | |
377 | 391 | public static final int RULE_TASK_SET_LOCATION = 1; |
378 | 392 | public static final int RULE_TASK_NOT_LOCATION = 0; |
393 | + | |
394 | + public static final int RULE_TASK_PICK_SHIPMENT = 1; | |
395 | + public static final int RULE_TASK_WHOLE_SHIPMENT = 0; | |
396 | + | |
397 | + public static final int RULE_WCS_CONNECT = 1; | |
398 | + public static final int RULE_WCS_DISCONNECT = 0; | |
379 | 399 | } |
... | ... |
src/main/java/com/huaheng/mobile/invenory/MobileInventoryController.java
... | ... | @@ -104,13 +104,13 @@ public class MobileInventoryController { |
104 | 104 | @ResponseBody |
105 | 105 | public AjaxResult createCheckOutTask(@RequestBody @ApiParam(value="库存ids") Map<String, String> param){ |
106 | 106 | String ids = param.get("ids"); |
107 | - String stationCode = param.get("stationCode"); | |
107 | + String port = param.get("port"); | |
108 | 108 | Integer companyId = DataUtils.getInteger(param.get("companyId")) ; |
109 | 109 | String companyCode = param.get("companyCode"); |
110 | 110 | if(StringUtils.isEmpty(ids)){ |
111 | 111 | return AjaxResult.error("ids不能为空"); |
112 | 112 | } |
113 | - return workTaskService.createCheckOutTaskByIds(Arrays.asList(Convert.toIntArray(ids)), stationCode); | |
113 | + return workTaskService.createCheckOutTaskByIds(Arrays.asList(Convert.toIntArray(ids)), port); | |
114 | 114 | } |
115 | 115 | |
116 | 116 | @PostMapping("/transfer") |
... | ... |
src/main/java/com/huaheng/mobile/receipt/MobileBatchReceiptController.java
... | ... | @@ -252,7 +252,7 @@ public class MobileBatchReceiptController { |
252 | 252 | taskQueryWrapper.eq(TaskHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()) |
253 | 253 | .in(TaskHeader::getTaskType, QuantityConstant.TASK_TYPE_WHOLERECEIPT, |
254 | 254 | QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) |
255 | - .lt(TaskHeader::getStatus, 100) | |
255 | + .lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED) | |
256 | 256 | .eq(TaskHeader::getContainerCode, containerCode); |
257 | 257 | TaskHeader taskHeader = taskHeaderService.getOne(taskQueryWrapper); |
258 | 258 | if(taskHeader == null) { |
... | ... |
src/main/java/com/huaheng/pc/config/address/controller/AddressController.java
... | ... | @@ -41,11 +41,6 @@ public class AddressController extends BaseController { |
41 | 41 | @Resource |
42 | 42 | private AddressService addressService; |
43 | 43 | |
44 | - | |
45 | - | |
46 | - | |
47 | - | |
48 | - @RequiresPermissions("config:address:view") | |
49 | 44 | @GetMapping() |
50 | 45 | public String address() { |
51 | 46 | return prefix + "/address"; |
... | ... | @@ -54,7 +49,6 @@ public class AddressController extends BaseController { |
54 | 49 | /** |
55 | 50 | * 查询接口地址 |
56 | 51 | */ |
57 | - @RequiresPermissions("config:address:list") | |
58 | 52 | @Log(title = "配置-接口地址", operating = "查看接口地址", action = BusinessType.GRANT) |
59 | 53 | @PostMapping("/list") |
60 | 54 | @ResponseBody |
... | ... | @@ -89,7 +83,6 @@ public class AddressController extends BaseController { |
89 | 83 | /** |
90 | 84 | * 新增保存接口地址 |
91 | 85 | */ |
92 | - @RequiresPermissions("config:address:add") | |
93 | 86 | @Log(title = "通用-接口地址", operating = "新增接口地址", action = BusinessType.INSERT) |
94 | 87 | @PostMapping("/add") |
95 | 88 | @ResponseBody |
... | ... | @@ -110,7 +103,6 @@ public class AddressController extends BaseController { |
110 | 103 | /** |
111 | 104 | * 修改保存接口地址 |
112 | 105 | */ |
113 | - @RequiresPermissions("config:address:edit") | |
114 | 106 | @Log(title = "配置-接口地址", operating = "修改接口地址", action = BusinessType.UPDATE) |
115 | 107 | @PostMapping("/edit") |
116 | 108 | @ResponseBody |
... | ... | @@ -121,7 +113,6 @@ public class AddressController extends BaseController { |
121 | 113 | /** |
122 | 114 | * 删除接口地址 |
123 | 115 | */ |
124 | - @RequiresPermissions("config:address:remove") | |
125 | 116 | @Log(title = "配置-接口地址", operating = "删除接口地址", action = BusinessType.DELETE) |
126 | 117 | @PostMapping( "/remove") |
127 | 118 | @ResponseBody |
... | ... |
src/main/java/com/huaheng/pc/config/configValue/service/ConfigValueService.java
... | ... | @@ -3,6 +3,7 @@ package com.huaheng.pc.config.configValue.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.framework.web.domain.AjaxResult; | |
6 | 7 | import com.huaheng.pc.config.configValue.domain.ConfigValue; |
7 | 8 | import com.huaheng.pc.config.configValue.mapper.ConfigValueMapper; |
8 | 9 | import org.springframework.stereotype.Service; |
... | ... | @@ -44,4 +45,12 @@ public class ConfigValueService extends ServiceImpl<ConfigValueMapper, ConfigVal |
44 | 45 | return false; |
45 | 46 | } |
46 | 47 | } |
48 | + | |
49 | + public ConfigValue getConfigValueByIdentifer(String identifier , String warehouseCode) { | |
50 | + LambdaQueryWrapper<ConfigValue> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
51 | + lambdaQueryWrapper.eq(ConfigValue::getWarehouseCode, warehouseCode) | |
52 | + .eq(ConfigValue::getIdentifier, identifier); | |
53 | + ConfigValue configValue = getOne(lambdaQueryWrapper); | |
54 | + return configValue; | |
55 | + } | |
47 | 56 | } |
... | ... |
src/main/java/com/huaheng/pc/config/location/controller/LocationController.java
... | ... | @@ -222,11 +222,13 @@ public class LocationController extends BaseController { |
222 | 222 | @Log(title = "通用-库位管理", operating = "批量修改库位", action = BusinessType.UPDATE) |
223 | 223 | @PostMapping("/editBatchSave") |
224 | 224 | @ResponseBody |
225 | - public AjaxResult editBatchSave (String ids, String area) { | |
225 | + public AjaxResult editBatchSave (String ids, String area, Integer high, String status) { | |
226 | 226 | String[] idArray = Convert.toStrArray(ids); |
227 | 227 | LambdaUpdateWrapper<Location> wrapper = Wrappers.lambdaUpdate(); |
228 | 228 | wrapper.in(Location::getId, idArray) |
229 | - .set(Location::getArea, area); | |
229 | + .set(Location::getArea, area) | |
230 | + .set(Location::getHigh, high) | |
231 | + .set(Location::getStatus, status); | |
230 | 232 | return toAjax(locationService.update(wrapper)); |
231 | 233 | } |
232 | 234 | |
... | ... |
src/main/java/com/huaheng/pc/config/shipmentPreference/service/ShipmentPreferenceServiceImpl.java
... | ... | @@ -86,7 +86,7 @@ public class ShipmentPreferenceServiceImpl extends ServiceImpl<ShipmentPreferenc |
86 | 86 | StatusFlowDetail statusFlowDetail = statusFlowDetailService.getOne(statusFlowDetailLamb); |
87 | 87 | |
88 | 88 | List<ShipmentHeader> shipmentHeaderList = new ArrayList<>(); |
89 | - if (statusFlowDetail != null) { | |
89 | + if (statusFlowDetail != null && statusFlowDetail.getNessary().intValue() == 1) { | |
90 | 90 | if (StringUtils.isNotEmpty(ids)) { |
91 | 91 | for (Integer id : Convert.toIntArray(ids)) { |
92 | 92 | //判断单据是否按出库流程操作 |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryHeader/controller/InventoryHeaderController.java
... | ... | @@ -198,8 +198,8 @@ public class InventoryHeaderController extends BaseController |
198 | 198 | @PostMapping("/emptyOut") |
199 | 199 | @Log(title = "任务-任务管理", operating = "生成空托盘出库任务", action = BusinessType.INSERT) |
200 | 200 | @ResponseBody |
201 | - public AjaxResult emptyOut(String containerCode,String sourceLocation, String stationCode){ | |
202 | - return inventoryHeaderService.createEmptyOut(containerCode, sourceLocation, stationCode); | |
201 | + public AjaxResult emptyOut(String containerCode,String sourceLocation, String port){ | |
202 | + return inventoryHeaderService.createEmptyOut(containerCode, sourceLocation, port); | |
203 | 203 | } |
204 | 204 | |
205 | 205 | /** |
... | ... | @@ -217,17 +217,17 @@ public class InventoryHeaderController extends BaseController |
217 | 217 | /** |
218 | 218 | * 出库查看任务 |
219 | 219 | * @param ids |
220 | - * @param stationCode | |
220 | + * @param port | |
221 | 221 | * @return |
222 | 222 | */ |
223 | 223 | @PostMapping("/checkOut") |
224 | 224 | @Log(title = "任务-任务管理", operating = "出库查看任务", action = BusinessType.INSERT) |
225 | 225 | @ResponseBody |
226 | - public AjaxResult checkOut(String ids,String stationCode){ | |
227 | - if(StringUtils.isEmpty(ids) || StringUtils.isEmpty(stationCode)){ | |
228 | - throw new ServiceException("库存头和出库站台不能为空!"); | |
226 | + public AjaxResult checkOut(String ids,String port){ | |
227 | + if(StringUtils.isEmpty(ids) || StringUtils.isEmpty(port)){ | |
228 | + throw new ServiceException("库存头和出库口不能为空!"); | |
229 | 229 | } |
230 | - return inventoryHeaderService.createCheckOutTask(Arrays.asList(Convert.toIntArray(ids)), stationCode); | |
230 | + return inventoryHeaderService.createCheckOutTask(Arrays.asList(Convert.toIntArray(ids)), port); | |
231 | 231 | } |
232 | 232 | |
233 | 233 | /** |
... | ... | @@ -250,11 +250,11 @@ public class InventoryHeaderController extends BaseController |
250 | 250 | @PostMapping("/emptyCheckOut") |
251 | 251 | @Log(title = "任务-任务管理", operating = "生成空托盘出库查看任务", action = BusinessType.INSERT) |
252 | 252 | @ResponseBody |
253 | - public AjaxResult emptyCheckOut(String containerCode,String sourceLocation){ | |
253 | + public AjaxResult emptyCheckOut(String containerCode,String sourceLocation, String stationCode){ | |
254 | 254 | if(StringUtils.isEmpty(containerCode) || StringUtils.isEmpty(sourceLocation)){ |
255 | 255 | throw new ServiceException("容器和库位不能有空值!"); |
256 | 256 | } |
257 | - return inventoryHeaderService.createEmptyCheckOut(containerCode, sourceLocation); | |
257 | + return inventoryHeaderService.createEmptyCheckOut(containerCode, sourceLocation, stationCode); | |
258 | 258 | } |
259 | 259 | |
260 | 260 | /** |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryHeader/service/InventoryHeaderService.java
... | ... | @@ -13,7 +13,7 @@ public interface InventoryHeaderService extends IService<InventoryHeader> { |
13 | 13 | |
14 | 14 | |
15 | 15 | |
16 | - AjaxResult createCheckOutTask (List<Integer> ids, String stationCode); | |
16 | + AjaxResult createCheckOutTask (List<Integer> ids, String port); | |
17 | 17 | |
18 | 18 | AjaxResult createTransferTask(String sourceLocation, String destinationLocation); |
19 | 19 | |
... | ... | @@ -28,10 +28,12 @@ public interface InventoryHeaderService extends IService<InventoryHeader> { |
28 | 28 | |
29 | 29 | AjaxResult createEmptyOut(String containerCode, String sourceLocation); |
30 | 30 | |
31 | - AjaxResult createEmptyOut(String containerCode, String sourceLocation, String stationCode); | |
31 | + AjaxResult createEmptyOut(String containerCode, String sourceLocation, String port); | |
32 | 32 | |
33 | 33 | AjaxResult createEmptyCheckOut(String containerCode, String location); |
34 | 34 | |
35 | + AjaxResult createEmptyCheckOut(String containerCode, String location, String port); | |
36 | + | |
35 | 37 | /** |
36 | 38 | * 移动端获取库存详情 |
37 | 39 | * @param code 物料编码 |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryHeader/service/InventoryHeaderServiceImpl.java
... | ... | @@ -69,9 +69,9 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe |
69 | 69 | * 出库查看 |
70 | 70 | * */ |
71 | 71 | @Override |
72 | - public AjaxResult createCheckOutTask(List<Integer> ids, String stationCode) { | |
72 | + public AjaxResult createCheckOutTask(List<Integer> ids, String port) { | |
73 | 73 | //生成出库查看任务 |
74 | - return workTaskService.createCheckOutTaskByIds(ids, stationCode); | |
74 | + return workTaskService.createCheckOutTaskByIds(ids, port); | |
75 | 75 | } |
76 | 76 | |
77 | 77 | @Override |
... | ... | @@ -112,8 +112,8 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe |
112 | 112 | *空托出库 |
113 | 113 | * */ |
114 | 114 | @Override |
115 | - public AjaxResult createEmptyOut(String containerCode, String sourceLocation, String stationCode) { | |
116 | - return workTaskService.createEmptyOut(containerCode, sourceLocation, stationCode); | |
115 | + public AjaxResult createEmptyOut(String containerCode, String sourceLocation, String port) { | |
116 | + return workTaskService.createEmptyOut(containerCode, sourceLocation, port); | |
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
... | ... | @@ -121,7 +121,15 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe |
121 | 121 | * */ |
122 | 122 | @Override |
123 | 123 | public AjaxResult createEmptyCheckOut(String containerCode, String location) { |
124 | - return workTaskService.createEmptyCheckOut(containerCode, location); | |
124 | + return workTaskService.createEmptyCheckOut(containerCode, location, null); | |
125 | + } | |
126 | + | |
127 | + /** | |
128 | + *空托出库查看 | |
129 | + * */ | |
130 | + @Override | |
131 | + public AjaxResult createEmptyCheckOut(String containerCode, String location, String port) { | |
132 | + return workTaskService.createEmptyCheckOut(containerCode, location, port); | |
125 | 133 | } |
126 | 134 | |
127 | 135 | /** |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
... | ... | @@ -134,7 +134,7 @@ public class ReceiptContainerHeaderController extends BaseController { |
134 | 134 | List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); |
135 | 135 | List<Integer> idsList = idList.stream().distinct().collect(Collectors.toList()); |
136 | 136 | AjaxResult ajaxResult = receiptTaskService.createReceiptTask(idsList); |
137 | - if(ajaxResult.getCode() != HttpConstant.OK) { | |
137 | + if(ajaxResult.hasErr()) { | |
138 | 138 | return ajaxResult; |
139 | 139 | } |
140 | 140 | List<String> taskList = (List<String>)ajaxResult.getData(); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -8,9 +8,11 @@ import com.huaheng.common.exception.service.ServiceException; |
8 | 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 | +import com.huaheng.framework.web.service.ConfigService; | |
11 | 12 | import com.huaheng.mobile.receipt.ReceiptBill; |
12 | 13 | import com.huaheng.pc.config.configValue.domain.ConfigValue; |
13 | 14 | import com.huaheng.pc.config.configValue.mapper.ConfigValueMapper; |
15 | +import com.huaheng.pc.config.configValue.service.ConfigValueService; | |
14 | 16 | import com.huaheng.pc.config.container.domain.Container; |
15 | 17 | import com.huaheng.pc.config.container.service.ContainerService; |
16 | 18 | import com.huaheng.pc.config.location.domain.Location; |
... | ... | @@ -64,6 +66,8 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
64 | 66 | private ReceiptPreferenceMapper receiptPreferenceMapper; |
65 | 67 | @Resource |
66 | 68 | private ConfigValueMapper configValueMapper; |
69 | + @Resource | |
70 | + private ConfigService configService; | |
67 | 71 | /** |
68 | 72 | * 保存入库组盘 |
69 | 73 | * @param receiptCode 入库单编码 |
... | ... | @@ -126,12 +130,15 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
126 | 130 | receiptContainerHeader.setTaskType(taskType); |
127 | 131 | if (taskType.equals(QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT)) { |
128 | 132 | receiptContainerHeader.setFromLocation(container.getLocationCode()); |
129 | -// receiptContainerHeader.setToLocation(container.getLocationCode()); | |
133 | + String value = configService.getKey(QuantityConstant.RULE_TASK_LOCATION); | |
134 | + int taskLocationRule = Integer.parseInt(value); | |
135 | + if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION) { | |
136 | + receiptContainerHeader.setToLocation(container.getLocationCode()); | |
137 | + } | |
130 | 138 | } else { |
131 | 139 | receiptContainerHeader.setToLocation(locationCode); |
132 | 140 | } |
133 | 141 | receiptContainerHeader.setProjectNo(receiptDetail.getProjectNo()); |
134 | -// receiptContainerHeader.setToLocation(locationCode); | |
135 | 142 | receiptContainerHeader.setCreatedBy(ShiroUtils.getLoginName()); |
136 | 143 | receiptContainerHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); |
137 | 144 | receiptContainerHeader.setLocatingRule(locatingRule); |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/domain/ShipmentContainerHeader.java
... | ... | @@ -57,11 +57,11 @@ public class ShipmentContainerHeader implements Serializable { |
57 | 57 | private Integer status; |
58 | 58 | |
59 | 59 | /** |
60 | - * 出库站台 | |
60 | + * 出库口 | |
61 | 61 | */ |
62 | - @TableField(value = "stationCode") | |
63 | - @ApiModelProperty(value="出库站台") | |
64 | - private String stationCode; | |
62 | + @TableField(value = "port") | |
63 | + @ApiModelProperty(value="出库口") | |
64 | + private String port; | |
65 | 65 | |
66 | 66 | /** |
67 | 67 | * 父 |
... | ... | @@ -450,12 +450,12 @@ public class ShipmentContainerHeader implements Serializable { |
450 | 450 | this.status = status; |
451 | 451 | } |
452 | 452 | |
453 | - public String getStationCode() { | |
454 | - return stationCode; | |
453 | + public String getPort() { | |
454 | + return port; | |
455 | 455 | } |
456 | 456 | |
457 | - public void setStationCode(String stationCode) { | |
458 | - this.stationCode = stationCode; | |
457 | + public void setPort(String port) { | |
458 | + this.port = port; | |
459 | 459 | } |
460 | 460 | |
461 | 461 | /** |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderServiceImpl.java
... | ... | @@ -211,7 +211,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
211 | 211 | shipmentContainerHeader.setLocationCode(location.getCode()); |
212 | 212 | shipmentContainerHeader.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
213 | 213 | shipmentContainerHeader.setCompanyCode(shipmentDetail.getCompanyCode()); |
214 | - shipmentContainerHeader.setStationCode(shipmentDetail.getStationCode()); | |
214 | + shipmentContainerHeader.setPort(shipmentDetail.getPort()); | |
215 | 215 | shipmentContainerHeader.setContainerType(container.getContainerType()); |
216 | 216 | shipmentContainerHeader.setStatus(QuantityConstant.SHIPMENT_CONTAINER_BUILD); |
217 | 217 | shipmentContainerHeader.setTaskCreated(0); |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentDetail/domain/ShipmentDetail.java
... | ... | @@ -188,11 +188,11 @@ public class ShipmentDetail implements Serializable { |
188 | 188 | private String projectNo; |
189 | 189 | |
190 | 190 | /** |
191 | - * 出库站台 | |
191 | + * 出库口 | |
192 | 192 | */ |
193 | - @TableField(value = "stationCode") | |
194 | - @ApiModelProperty(value="出库站台") | |
195 | - private String stationCode; | |
193 | + @TableField(value = "port") | |
194 | + @ApiModelProperty(value="出库口") | |
195 | + private String port; | |
196 | 196 | |
197 | 197 | /** |
198 | 198 | * 生产日期 |
... | ... | @@ -1016,12 +1016,12 @@ public class ShipmentDetail implements Serializable { |
1016 | 1016 | return processStamp; |
1017 | 1017 | } |
1018 | 1018 | |
1019 | - public String getStationCode() { | |
1020 | - return stationCode; | |
1019 | + public String getPort() { | |
1020 | + return port; | |
1021 | 1021 | } |
1022 | 1022 | |
1023 | - public void setStationCode(String stationCode) { | |
1024 | - this.stationCode = stationCode; | |
1023 | + public void setPort(String port) { | |
1024 | + this.port = port; | |
1025 | 1025 | } |
1026 | 1026 | |
1027 | 1027 | /** |
... | ... |
src/main/java/com/huaheng/pc/system/config/controller/ConfigController.java
src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java
... | ... | @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; |
5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
6 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
7 | +import com.huaheng.api.wcs.service.taskCancel.TaskCancelService; | |
8 | +import com.huaheng.common.constant.QuantityConstant; | |
7 | 9 | import com.huaheng.common.support.Convert; |
8 | 10 | import com.huaheng.common.utils.StringUtils; |
9 | 11 | import com.huaheng.common.utils.security.ShiroUtils; |
... | ... | @@ -14,6 +16,9 @@ import com.huaheng.framework.web.domain.AjaxResult; |
14 | 16 | import com.huaheng.framework.web.page.PageDomain; |
15 | 17 | import com.huaheng.framework.web.page.TableDataInfo; |
16 | 18 | import com.huaheng.framework.web.page.TableSupport; |
19 | +import com.huaheng.framework.web.service.ConfigService; | |
20 | +import com.huaheng.pc.config.configValue.domain.ConfigValue; | |
21 | +import com.huaheng.pc.config.configValue.service.ConfigValueService; | |
17 | 22 | import com.huaheng.pc.config.material.service.MaterialService; |
18 | 23 | import com.huaheng.pc.config.warehouse.domain.Warehouse; |
19 | 24 | import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; |
... | ... | @@ -47,6 +52,10 @@ public class TaskHeaderController extends BaseController { |
47 | 52 | private TaskHeaderService taskHeaderService; |
48 | 53 | @Resource |
49 | 54 | private WorkTaskService workTaskService; |
55 | + @Resource | |
56 | + private TaskCancelService taskCancelService; | |
57 | + @Resource | |
58 | + private ConfigService configService; | |
50 | 59 | |
51 | 60 | private String prefix = "task/taskHeader"; |
52 | 61 | |
... | ... | @@ -75,8 +84,8 @@ public class TaskHeaderController extends BaseController { |
75 | 84 | .eq(StringUtils.isNotEmpty(taskHeader.getToLocation()),TaskHeader::getToLocation,taskHeader.getToLocation()) |
76 | 85 | .gt(StringUtils.isNotEmpty(createdBegin),TaskHeader::getCreated,createdBegin) |
77 | 86 | .lt(StringUtils.isNotEmpty(createdEnd),TaskHeader::getCreated,createdEnd) |
78 | - .orderByDesc(TaskHeader::getId) | |
79 | - .orderByAsc(TaskHeader::getStatus); | |
87 | + .orderByAsc(TaskHeader::getStatus) | |
88 | + .orderByDesc(TaskHeader::getId); | |
80 | 89 | |
81 | 90 | PageDomain pageDomain = TableSupport.buildPageRequest(); |
82 | 91 | Integer pageNum = pageDomain.getPageNum(); |
... | ... | @@ -137,6 +146,18 @@ public class TaskHeaderController extends BaseController { |
137 | 146 | if (StringUtils.isEmpty(ids)) { |
138 | 147 | return AjaxResult.error("taskId不能为空"); |
139 | 148 | } |
149 | + String value = configService.getKey(QuantityConstant.RULE_CONNECT_WCS); | |
150 | + int connectWCS = Integer.parseInt(value); | |
151 | + if(connectWCS == QuantityConstant.RULE_WCS_CONNECT) { | |
152 | + Integer[] idList = Convert.toIntArray(ids); | |
153 | + for (int id : idList) { | |
154 | + AjaxResult ajaxResult = taskCancelService.TaskCance(id); | |
155 | + if (ajaxResult.hasErr()) { | |
156 | + return ajaxResult; | |
157 | + } | |
158 | + } | |
159 | + } | |
160 | + | |
140 | 161 | return taskHeaderService.cancelTask(Convert.toIntArray(ids)); |
141 | 162 | } |
142 | 163 | |
... | ... | @@ -172,7 +193,7 @@ public class TaskHeaderController extends BaseController { |
172 | 193 | } |
173 | 194 | |
174 | 195 | /** |
175 | - * 选择出库站台 | |
196 | + * 选择出库口 | |
176 | 197 | */ |
177 | 198 | @GetMapping("/chooseStation/{taskId}") |
178 | 199 | public String chooseStation(@PathVariable("taskId")String taskId, ModelMap mmap) { |
... | ... | @@ -192,7 +213,7 @@ public class TaskHeaderController extends BaseController { |
192 | 213 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
193 | 214 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getId, taskiId); |
194 | 215 | TaskHeader taskHeader1 = taskHeaderService.getOne(taskHeaderLambdaQueryWrapper); |
195 | - taskHeader1.setStationCode(taskHeader.getStationCode()); | |
216 | + taskHeader1.setPort(taskHeader.getPort()); | |
196 | 217 | taskHeaderService.update(taskHeader1, taskHeaderLambdaQueryWrapper); |
197 | 218 | return execute(String.valueOf(taskiId)); |
198 | 219 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/domain/TaskHeader.java
... | ... | @@ -135,11 +135,11 @@ public class TaskHeader implements Serializable { |
135 | 135 | private Integer preTaskNo; |
136 | 136 | |
137 | 137 | /** |
138 | - * 出库站台 | |
138 | + * 出库口 | |
139 | 139 | */ |
140 | - @TableField(value = "stationCode") | |
141 | - @ApiModelProperty(value="出库站台") | |
142 | - private String stationCode; | |
140 | + @TableField(value = "port") | |
141 | + @ApiModelProperty(value="出库口") | |
142 | + private String port; | |
143 | 143 | |
144 | 144 | |
145 | 145 | /** |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/ShipmentTaskService.java
... | ... | @@ -8,6 +8,9 @@ import com.huaheng.common.exception.service.ServiceException; |
8 | 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 | +import com.huaheng.framework.web.service.ConfigService; | |
12 | +import com.huaheng.pc.config.configValue.domain.ConfigValue; | |
13 | +import com.huaheng.pc.config.configValue.service.ConfigValueService; | |
11 | 14 | import com.huaheng.pc.config.container.domain.Container; |
12 | 15 | import com.huaheng.pc.config.container.service.ContainerService; |
13 | 16 | import com.huaheng.pc.config.location.domain.Location; |
... | ... | @@ -76,6 +79,8 @@ public class ShipmentTaskService { |
76 | 79 | private IMaterialWarningService materialWarningService; |
77 | 80 | @Resource |
78 | 81 | private ShipmentPreferenceService shipmentPreferenceService; |
82 | + @Resource | |
83 | + private ConfigService configService; | |
79 | 84 | /** |
80 | 85 | * 创建出库任务 |
81 | 86 | * @param shipmentTaskCreateModel |
... | ... | @@ -109,7 +114,7 @@ public class ShipmentTaskService { |
109 | 114 | if (StringUtils.isNull(location)) { |
110 | 115 | return AjaxResult.error("库位禁用或不存在!"); |
111 | 116 | } |
112 | - if(location.getRowFlag() == 1) { | |
117 | + if(location.getRowFlag() == QuantityConstant.ROW_OUT) { | |
113 | 118 | Location location1 = locationService.getNear(location); |
114 | 119 | if(location1 != null) { |
115 | 120 | String locationCode = location1.getCode(); |
... | ... | @@ -121,7 +126,6 @@ public class ShipmentTaskService { |
121 | 126 | preTaskNo = taskHeaderList.get(0).getPreTaskNo(); |
122 | 127 | } |
123 | 128 | } |
124 | - | |
125 | 129 | } |
126 | 130 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
127 | 131 | containerLambdaQueryWrapper.eq(Container::getCode, shipmentContainerHeader.getContainerCode()) |
... | ... | @@ -140,7 +144,6 @@ public class ShipmentTaskService { |
140 | 144 | TaskHeader task = new TaskHeader(); |
141 | 145 | task.setTaskType(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT); |
142 | 146 | task.setFromLocation(shipmentContainerHeader.getLocationCode()); |
143 | - task.setToLocation(shipmentContainerHeader.getLocationCode()); | |
144 | 147 | //判断是否整出任务,钱柜和AGV不能整出 |
145 | 148 | //表示整出优先 |
146 | 149 | //判断当前子货箱所有数量是否等于该托盘对应的所有库存的数量, |
... | ... | @@ -160,14 +163,19 @@ public class ShipmentTaskService { |
160 | 163 | for (ShipmentContainerDetail item : shipmentContainerDetails) { |
161 | 164 | containerTotal = containerTotal.add(item.getQty()); |
162 | 165 | } |
163 | - LambdaQueryWrapper<ShipmentPreference> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
164 | - lambdaQueryWrapper.eq(ShipmentPreference::getWarehouseCode, ShiroUtils.getWarehouseCode()); | |
165 | - ShipmentPreference shipmentPreference = shipmentPreferenceService.getOne(lambdaQueryWrapper); | |
166 | + String value = configService.getKey(QuantityConstant.RULE_SHIPMENT_TASK); | |
167 | + int shipmentTaskRule = Integer.parseInt(value); | |
166 | 168 | // 当onlyPicking为1,只允许分拣出库 |
167 | - if (inventoryTotal.compareTo(containerTotal) == 0 && (shipmentPreference.getOnlyPicking() == 0)) { | |
169 | + if (inventoryTotal.compareTo(containerTotal) == 0 && | |
170 | + (shipmentTaskRule == QuantityConstant.RULE_TASK_WHOLE_SHIPMENT)) { | |
168 | 171 | //整盘出库 |
169 | 172 | task.setTaskType(QuantityConstant.TASK_TYPE_WHOLESHIPMENT); |
170 | - task.setToLocation(""); | |
173 | + } else { | |
174 | + value = configService.getKey(QuantityConstant.RULE_TASK_LOCATION); | |
175 | + int taskLocationRule = Integer.parseInt(value); | |
176 | + if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION) { | |
177 | + task.setToLocation(shipmentContainerHeader.getLocationCode()); | |
178 | + } | |
171 | 179 | } |
172 | 180 | |
173 | 181 | |
... | ... | @@ -176,7 +184,7 @@ public class ShipmentTaskService { |
176 | 184 | task.setWarehouseCode(shipmentContainerHeader.getWarehouseCode()); |
177 | 185 | task.setAssignedUser(ShiroUtils.getLoginName()); |
178 | 186 | task.setConfirmedBy(ShiroUtils.getLoginName()); |
179 | - task.setStationCode(shipmentContainerHeader.getStationCode()); | |
187 | + task.setPort(shipmentContainerHeader.getPort()); | |
180 | 188 | task.setStatus(QuantityConstant.TASK_STATUS_BUILD); |
181 | 189 | task.setContainerCode(shipmentContainerHeader.getContainerCode()); |
182 | 190 | task.setCompanyCode(shipmentContainerHeader.getCompanyCode()); |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -11,6 +11,9 @@ import com.huaheng.common.support.Convert; |
11 | 11 | import com.huaheng.common.utils.StringUtils; |
12 | 12 | import com.huaheng.common.utils.security.ShiroUtils; |
13 | 13 | import com.huaheng.framework.web.domain.AjaxResult; |
14 | +import com.huaheng.framework.web.service.ConfigService; | |
15 | +import com.huaheng.pc.config.configValue.domain.ConfigValue; | |
16 | +import com.huaheng.pc.config.configValue.service.ConfigValueService; | |
14 | 17 | import com.huaheng.pc.config.configWarning.service.ConfigWarningService; |
15 | 18 | import com.huaheng.pc.config.container.domain.Container; |
16 | 19 | import com.huaheng.pc.config.container.service.ContainerService; |
... | ... | @@ -95,7 +98,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
95 | 98 | private TransferTaskService transferTaskService; |
96 | 99 | @Resource |
97 | 100 | private ReceivingService receivingService; |
98 | - | |
101 | + @Resource | |
102 | + private ConfigService configService; | |
99 | 103 | |
100 | 104 | |
101 | 105 | |
... | ... | @@ -298,12 +302,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
298 | 302 | return AjaxResult.error("任务" + taskId + "已经下发,请不要重复下发,操作中止"); |
299 | 303 | } |
300 | 304 | |
301 | - // 给wcs传递任务 | |
302 | - AjaxResult ajaxResult = taskAssignService.wcsTaskAssign(task); | |
303 | - if(ajaxResult != null && ajaxResult.hasErr()) { | |
304 | - return AjaxResult.error(ajaxResult.getMsg()); | |
305 | - } | |
306 | - | |
305 | + String value = configService.getKey(QuantityConstant.RULE_CONNECT_WCS); | |
306 | + int connectWCS = Integer.parseInt(value); | |
307 | + if(connectWCS == QuantityConstant.RULE_WCS_CONNECT) { | |
308 | + // 给wcs传递任务 | |
309 | + AjaxResult ajaxResult = taskAssignService.wcsTaskAssign(task); | |
310 | + if (ajaxResult != null && ajaxResult.hasErr()) { | |
311 | + return AjaxResult.error(ajaxResult.getMsg()); | |
312 | + } | |
313 | + } | |
307 | 314 | //修改任务头表 |
308 | 315 | task.setId(taskId); |
309 | 316 | task.setStatus(QuantityConstant.TASK_STATUS_RELEASE); |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/WorkTaskService.java
... | ... | @@ -10,6 +10,7 @@ import com.huaheng.common.support.Convert; |
10 | 10 | import com.huaheng.common.utils.StringUtils; |
11 | 11 | import com.huaheng.common.utils.security.ShiroUtils; |
12 | 12 | import com.huaheng.framework.web.domain.AjaxResult; |
13 | +import com.huaheng.framework.web.service.ConfigService; | |
13 | 14 | import com.huaheng.mobile.shipment.Shipment; |
14 | 15 | import com.huaheng.pc.config.FilterConfigDetail.domain.FilterConfigDetail; |
15 | 16 | import com.huaheng.pc.config.FilterConfigDetail.service.FilterConfigDetailService; |
... | ... | @@ -54,7 +55,7 @@ public class WorkTaskService { |
54 | 55 | @Resource |
55 | 56 | private LocationService locationService; |
56 | 57 | @Resource |
57 | - private ConfigValueService configValueService; | |
58 | + private ConfigService configService; | |
58 | 59 | @Resource |
59 | 60 | private ReceiptPreferenceService preferenceService; |
60 | 61 | @Resource |
... | ... | @@ -167,10 +168,11 @@ public class WorkTaskService { |
167 | 168 | * 容器编码与源库位只需要填一个 |
168 | 169 | * @param containerCode 容器编码 |
169 | 170 | * @param sourceLocation 源库位 |
171 | + * @param port 出库口 | |
170 | 172 | * @return |
171 | 173 | */ |
172 | 174 | @Transactional |
173 | - public AjaxResult createEmptyOut(String containerCode, String sourceLocation, String stationCode) { | |
175 | + public AjaxResult createEmptyOut(String containerCode, String sourceLocation, String port) { | |
174 | 176 | /* 容器编码*/ |
175 | 177 | String conCode = null; |
176 | 178 | /* 库位编码*/ |
... | ... | @@ -234,7 +236,7 @@ public class WorkTaskService { |
234 | 236 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); |
235 | 237 | taskHeader.setFromLocation(locationCode); |
236 | 238 | taskHeader.setToLocation(""); |
237 | - taskHeader.setStationCode(stationCode); | |
239 | + taskHeader.setPort(port); | |
238 | 240 | if(taskHeaderService.save(taskHeader)){ |
239 | 241 | //锁定库位状态 |
240 | 242 | locationService.updateStatus(locationCode,QuantityConstant.STATUS_LOCATION_LOCK); |
... | ... | @@ -302,9 +304,10 @@ public class WorkTaskService { |
302 | 304 | /** |
303 | 305 | * 创建出库查看任务 |
304 | 306 | * @param locationCodeList 库位编码列表 |
307 | + * @param port 出库口 | |
305 | 308 | * @return |
306 | 309 | */ |
307 | - public AjaxResult createCheckOutTask(List<String> locationCodeList, String stationCode) { | |
310 | + public AjaxResult createCheckOutTask(List<String> locationCodeList, String port) { | |
308 | 311 | for (String locationCode : locationCodeList) { |
309 | 312 | Location location = locationService.getLocationByCode(locationCode); |
310 | 313 | if (StringUtils.isNull(location)) { |
... | ... | @@ -323,15 +326,13 @@ public class WorkTaskService { |
323 | 326 | taskHeader.setInternalTaskType(QuantityConstant.TASK_INTENERTYPE_WORK); |
324 | 327 | taskHeader.setContainerCode(location.getContainerCode()); |
325 | 328 | taskHeader.setFromLocation(locationCode); |
326 | - LambdaQueryWrapper<ConfigValue> configLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
327 | - configLambdaQueryWrapper.eq(ConfigValue::getIdentifier, QuantityConstant.RULE_TASK_LOCATION); | |
328 | - ConfigValue configValue = configValueService.getOne(configLambdaQueryWrapper); | |
329 | - int taskLocationRule = Integer.parseInt(configValue.getValue()); | |
329 | + String value = configService.getKey(QuantityConstant.RULE_TASK_LOCATION); | |
330 | + int taskLocationRule = Integer.parseInt(value); | |
330 | 331 | if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION) { |
331 | 332 | taskHeader.setToLocation(locationCode); |
332 | 333 | } |
333 | 334 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); |
334 | - taskHeader.setStationCode(stationCode); | |
335 | + taskHeader.setPort(port); | |
335 | 336 | if (!taskHeaderService.save(taskHeader)) { |
336 | 337 | throw new ServiceException("创建任务失败"); |
337 | 338 | } |
... | ... | @@ -375,12 +376,13 @@ public class WorkTaskService { |
375 | 376 | * 根据库存头表id生成出库查看任务 |
376 | 377 | * @param ids 库存头id |
377 | 378 | */ |
378 | - public AjaxResult createCheckOutTaskByIds(List<Integer> ids, String stationCode) { | |
379 | + public AjaxResult createCheckOutTaskByIds(List<Integer> ids, String port) { | |
379 | 380 | LambdaQueryWrapper<InventoryHeader> queryWrapper = Wrappers.lambdaQuery(); |
380 | 381 | queryWrapper.in(InventoryHeader::getId, ids); |
381 | 382 | List<InventoryHeader> inventoryHeaderList = inventoryHeaderService.list(queryWrapper); |
382 | - List<String> locationCodeList = inventoryHeaderList.stream().map(InventoryHeader::getLocationCode).distinct().collect(Collectors.toList()); | |
383 | - return createCheckOutTask(locationCodeList, stationCode); | |
383 | + List<String> locationCodeList = inventoryHeaderList.stream().map( | |
384 | + InventoryHeader::getLocationCode).distinct().collect(Collectors.toList()); | |
385 | + return createCheckOutTask(locationCodeList, port); | |
384 | 386 | } |
385 | 387 | |
386 | 388 | /** |
... | ... | @@ -411,14 +413,7 @@ public class WorkTaskService { |
411 | 413 | taskHeader.getContainerCode(), QuantityConstant.STATUS_LOCATION_EMPTY); |
412 | 414 | Container container = containerService.getContainerByCode(taskHeader.getContainerCode()); |
413 | 415 | container.setLocationCode(taskHeader.getToLocation()); |
414 | - if (StringUtils.isEmpty(container.getLocationCode())) { | |
415 | - container.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); | |
416 | - } else { | |
417 | - container.setStatus(QuantityConstant.STATUS_CONTAINER_SOME); | |
418 | - } | |
419 | - if (!containerService.updateById(container)) { | |
420 | - throw new ServiceException("更新容器状态失败"); | |
421 | - } | |
416 | + container.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); | |
422 | 417 | |
423 | 418 | LambdaQueryWrapper<InventoryHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(); |
424 | 419 | lambdaQueryWrapper.eq(InventoryHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()) |
... | ... | @@ -437,9 +432,14 @@ public class WorkTaskService { |
437 | 432 | inventoryDetail.setLocationCode(taskHeader.getToLocation()); |
438 | 433 | inventoryDetailService.updateById(inventoryDetail); |
439 | 434 | } |
435 | + container.setStatus(QuantityConstant.STATUS_CONTAINER_SOME); | |
440 | 436 | } |
441 | 437 | } |
442 | 438 | |
439 | + if (!containerService.updateById(container)) { | |
440 | + throw new ServiceException("更新容器状态失败"); | |
441 | + } | |
442 | + | |
443 | 443 | if (QuantityConstant.STATUS_CONTAINER_SOME.equals(container.getStatus())) { |
444 | 444 | LambdaUpdateWrapper<InventoryDetail> queryWrapper = Wrappers.lambdaUpdate(); |
445 | 445 | queryWrapper.eq(InventoryDetail::getLocationCode, taskHeader.getToLocation()) |
... | ... | @@ -460,7 +460,7 @@ public class WorkTaskService { |
460 | 460 | * @return |
461 | 461 | */ |
462 | 462 | @Transactional |
463 | - public AjaxResult createEmptyCheckOut(String containerCode, String sourceLocation) { | |
463 | + public AjaxResult createEmptyCheckOut(String containerCode, String sourceLocation, String port) { | |
464 | 464 | /* 容器编码*/ |
465 | 465 | String conCode = null; |
466 | 466 | /* 库位编码*/ |
... | ... | @@ -524,6 +524,7 @@ public class WorkTaskService { |
524 | 524 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); |
525 | 525 | taskHeader.setFromLocation(locationCode); |
526 | 526 | taskHeader.setToLocation(locationCode); |
527 | + taskHeader.setPort(port); | |
527 | 528 | if(taskHeaderService.save(taskHeader)){ |
528 | 529 | //锁定库位状态 |
529 | 530 | locationService.updateStatus(locationCode,QuantityConstant.STATUS_LOCATION_LOCK); |
... | ... |
src/main/resources/static/huaheng/index.js
src/main/resources/templates/config/address/add.html
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
7 | 7 | <form class="form-horizontal m" id="form-address-add"> |
8 | 8 | <div class="form-group"> |
9 | - <label class="col-sm-3 control-label">参数方法名:</label> | |
9 | + <label class="col-sm-3 control-label">参数名称:</label> | |
10 | 10 | <div class="col-sm-8"> |
11 | 11 | <input id="param" name="param" class="form-control" type="text"> |
12 | 12 | </div> |
... | ... |
src/main/resources/templates/config/address/address.html
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | 仓库:<input type="text" name="warehouseCode"/> |
14 | 14 | </li> |
15 | 15 | <li> |
16 | - 参数方法名:<input type="text" name="param"/> | |
16 | + 参数名称:<input type="text" name="param"/> | |
17 | 17 | </li> |
18 | 18 | <!--<li class="time"> |
19 | 19 | <label>创建时间: </label> |
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | </div> |
31 | 31 | |
32 | 32 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
33 | - <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="config:address:add"> | |
33 | + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"> | |
34 | 34 | <i class="fa fa-plus"></i> 新增 |
35 | 35 | </a> |
36 | 36 | </div> |
... | ... | @@ -79,8 +79,8 @@ |
79 | 79 | align: 'center', |
80 | 80 | formatter: function(value, row, index) { |
81 | 81 | var actions = []; |
82 | - actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\' )"><i class="fa fa-edit"></i>编辑</a> '); | |
83 | - actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | |
82 | + actions.push('<a class="btn btn-success btn-xs ' + '" href="#" onclick="$.operate.edit(\'' + row.id + '\' )"><i class="fa fa-edit"></i>编辑</a> '); | |
83 | + actions.push('<a class="btn btn-danger btn-xs ' + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | |
84 | 84 | return actions.join(''); |
85 | 85 | } |
86 | 86 | } |
... | ... |
src/main/resources/templates/config/address/edit.html
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | <form class="form-horizontal m" id="form-address-edit" th:object="${address}"> |
8 | 8 | <input id="id" name="id" th:field="*{id}" type="hidden"> |
9 | 9 | <div class="form-group"> |
10 | - <label class="col-sm-3 control-label">参数方法名:</label> | |
10 | + <label class="col-sm-3 control-label">参数名称:</label> | |
11 | 11 | <div class="col-sm-8"> |
12 | 12 | <input id="param" name="param" th:field="*{param}" class="form-control" type="text"> |
13 | 13 | </div> |
... | ... |
src/main/resources/templates/config/location/editBatch.html
... | ... | @@ -7,7 +7,23 @@ |
7 | 7 | <form class="form-horizontal m" id="form-location-edit"> |
8 | 8 | <input id="ids" name="ids" th:value="${ids}" type="hidden"> |
9 | 9 | <div class="form-group"> |
10 | - <label class="col-sm-3 control-label">区域:</label> | |
10 | + <label class="col-sm-3 control-label">高低位:</label> | |
11 | + <div class="col-sm-8"> | |
12 | + <select id="high" name="high" class="form-control" th:with="high=${@dict.getType('high')}"> | |
13 | + <option th:each="item : ${high}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> | |
14 | + </select> | |
15 | + </div> | |
16 | + </div> | |
17 | + <div class="form-group"> | |
18 | + <label class="col-sm-3 control-label">库位状态:</label> | |
19 | + <div class="col-sm-8"> | |
20 | + <select id="status" name="status" class="form-control" th:with="status=${@dict.getType('locationStatus')}"> | |
21 | + <option th:each="item : ${status}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> | |
22 | + </select> | |
23 | + </div> | |
24 | + </div> | |
25 | + <div class="form-group"> | |
26 | + <label class="col-sm-3 control-label">物料分区:</label> | |
11 | 27 | <div class="col-sm-8"> |
12 | 28 | <select id="area" name="area" class="form-control" th:with="areas=${@dict.getType('material_areas')}"> |
13 | 29 | <option th:each="item : ${areas}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> |
... | ... | @@ -33,6 +49,8 @@ |
33 | 49 | url : prefix + "/editBatchSave", |
34 | 50 | data : { |
35 | 51 | "ids": $("input[name='ids']").val(), |
52 | + "high" : $("#high option:selected").val(), | |
53 | + "status" : $("#status option:selected").val(), | |
36 | 54 | "area" : $("#area option:selected").val() |
37 | 55 | }, |
38 | 56 | async : false, |
... | ... |
src/main/resources/templates/inventory/inventoryHeader/checkOut.html
... | ... | @@ -27,9 +27,9 @@ |
27 | 27 | </div> |
28 | 28 | </div> |
29 | 29 | <div class="form-group"> |
30 | - <label class="col-sm-3 control-label">出库站台:</label> | |
30 | + <label class="col-sm-3 control-label">出库口:</label> | |
31 | 31 | <div class="col-sm-8"> |
32 | - <select id="stationCode" name="stationCode" class="form-control"></select> | |
32 | + <select id="port" name="port" class="form-control"></select> | |
33 | 33 | </div> |
34 | 34 | </div> |
35 | 35 | <div class="form-group"> |
... | ... | @@ -62,7 +62,7 @@ |
62 | 62 | var ids = document.getElementById("ids").value; |
63 | 63 | console.log("ids:" + ids); |
64 | 64 | var data = { "ids": ids }; |
65 | - $('#stationCode').select2({ | |
65 | + $('#port').select2({ | |
66 | 66 | ajax: { |
67 | 67 | url: ctx+'config/station/getStationFromInventory', |
68 | 68 | dataType: 'json', |
... | ... |
src/main/resources/templates/inventory/inventoryHeader/emptyCheckOut.html
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | <div class="form-group"> |
9 | 9 | <label class="col-sm-3 control-label">容器编码:</label> |
10 | 10 | <div class="col-sm-8"> |
11 | - <input id="containerCode" name="containerCode" class="form-control" type="text"> | |
11 | + <input id="containerCode" name="containerCode" class="form-control" type="text" oninput="myFunction()" onpropertychange="myFunction()"> | |
12 | 12 | </div> |
13 | 13 | </div> |
14 | 14 | <div class="form-group"> |
... | ... | @@ -18,6 +18,12 @@ |
18 | 18 | </div> |
19 | 19 | </div> |
20 | 20 | <div class="form-group"> |
21 | + <label class="col-sm-3 control-label">出库口:</label> | |
22 | + <div class="col-sm-8"> | |
23 | + <select id="port" name="port" class="form-control"></select> | |
24 | + </div> | |
25 | + </div> | |
26 | + <div class="form-group"> | |
21 | 27 | <div class="col-sm-offset-9" style="margin-left:62%"> |
22 | 28 | <input type="button" class="btn-success btn" onclick="selectEmptyOut()" value="选取空容器" /> |
23 | 29 | <button type="submit" class="btn btn-primary">提交</button> |
... | ... | @@ -26,7 +32,8 @@ |
26 | 32 | </div> |
27 | 33 | </form> |
28 | 34 | </div> |
29 | -<div th:include="include::footer"></div> | |
35 | +<th:block th:include="include :: footer" /> | |
36 | +<th:block th:include="include :: select2-js" /> | |
30 | 37 | <script type="text/javascript"> |
31 | 38 | var prefix = ctx + "inventory/inventoryHeader" |
32 | 39 | $("#form-task-emptyCheckOut").validate({ |
... | ... | @@ -43,9 +50,29 @@ |
43 | 50 | } |
44 | 51 | }); |
45 | 52 | |
53 | + function myFunction() { | |
54 | + container = document.getElementById("containerCode").value; | |
55 | + console.log("container:" + container); | |
56 | + var data = { "containerCode": container }; | |
57 | + $('#port').select2({ | |
58 | + ajax: { | |
59 | + url: ctx+'config/station/getStation', | |
60 | + dataType: 'json', | |
61 | + type: 'post', | |
62 | + data: data, | |
63 | + success: function(data) { | |
64 | + | |
65 | + } | |
66 | + } | |
67 | + }); | |
68 | + } | |
69 | + | |
70 | + myFunction() | |
71 | + | |
46 | 72 | function selectEmptyOut() { |
47 | 73 | $.modal.open("空托盘选取",prefix+"/listEmpty",780); |
48 | 74 | } |
75 | + | |
49 | 76 | </script> |
50 | 77 | </body> |
51 | 78 | </html> |
... | ... |
src/main/resources/templates/inventory/inventoryHeader/emptyOut.html
... | ... | @@ -21,9 +21,9 @@ |
21 | 21 | </div> |
22 | 22 | </div> |
23 | 23 | <div class="form-group"> |
24 | - <label class="col-sm-3 control-label">出库站台:</label> | |
24 | + <label class="col-sm-3 control-label">出库口:</label> | |
25 | 25 | <div class="col-sm-8"> |
26 | - <select id="stationCode" name="stationCode" class="form-control"></select> | |
26 | + <select id="port" name="port" class="form-control"></select> | |
27 | 27 | </div> |
28 | 28 | </div> |
29 | 29 | <div class="form-group"> |
... | ... | @@ -60,7 +60,7 @@ |
60 | 60 | container = document.getElementById("containerCode").value; |
61 | 61 | console.log("container:" + container); |
62 | 62 | var data = { "containerCode": container }; |
63 | - $('#stationCode').select2({ | |
63 | + $('#port').select2({ | |
64 | 64 | ajax: { |
65 | 65 | url: ctx+'config/station/getStation', |
66 | 66 | dataType: 'json', |
... | ... |
src/main/resources/templates/inventory/inventoryHeader/inventoryHeader.html
... | ... | @@ -25,6 +25,9 @@ |
25 | 25 | <div class="select-list"> |
26 | 26 | <ul> |
27 | 27 | <li> |
28 | + 库区:<input type="text" name="zoneCode"/> | |
29 | + </li> | |
30 | + <li> | |
28 | 31 | 库位编号:<input type="text" name="locationCode"/> |
29 | 32 | </li> |
30 | 33 | <li> |
... | ... | @@ -70,6 +73,10 @@ |
70 | 73 | shiro:hasPermission="inventory:inventoryHeader:emptyOut"> |
71 | 74 | <i class="fa fa-level-up"></i> 空托出库 |
72 | 75 | </a> |
76 | + <a class="btn btn-outline btn-info btn-rounded" onclick="emptyCheckOut()" | |
77 | + shiro:hasPermission="inventory:inventoryHeader:seeOut"> | |
78 | + <i class="fa fa-eye"></i> 空托出库查看 | |
79 | + </a> | |
73 | 80 | </div> |
74 | 81 | <div class="col-sm-12 select-info"> |
75 | 82 | <table id="bootstrap-table" data-mobile-responsive="true" |
... | ... | @@ -117,6 +124,11 @@ |
117 | 124 | visible: false |
118 | 125 | }, |
119 | 126 | { |
127 | + field: 'zoneCode', | |
128 | + title: ' 库区', | |
129 | + visible: false | |
130 | + }, | |
131 | + { | |
120 | 132 | field: 'locationCode', |
121 | 133 | title: '库位 ' |
122 | 134 | }, |
... | ... |
src/main/resources/templates/shipment/shipmentContainerHeader/shipmentContainerHeader.html
src/main/resources/templates/shipment/shipmentDetail/add.html
... | ... | @@ -46,9 +46,9 @@ |
46 | 46 | </div> |
47 | 47 | </div> |
48 | 48 | <div class="form-group"> |
49 | - <label class="col-sm-3 control-label">出库站台:</label> | |
49 | + <label class="col-sm-3 control-label">出库口:</label> | |
50 | 50 | <div class="col-sm-8"> |
51 | - <select id="stationCode" name="stationCode" class="form-control"></select> | |
51 | + <select id="port" name="port" class="form-control"></select> | |
52 | 52 | </div> |
53 | 53 | </div> |
54 | 54 | <div class="form-group"> |
... | ... | @@ -204,7 +204,7 @@ |
204 | 204 | } |
205 | 205 | } |
206 | 206 | }); |
207 | - $('#stationCode').select2({ | |
207 | + $('#port').select2({ | |
208 | 208 | ajax: { |
209 | 209 | url: ctx+'config/station/getData', |
210 | 210 | dataType: 'json', |
... | ... |
src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html
src/main/resources/templates/system/config/config.html
src/main/resources/templates/task/task/emptyOut.html
... | ... | @@ -18,9 +18,9 @@ |
18 | 18 | </div> |
19 | 19 | </div> |
20 | 20 | <div class="form-group"> |
21 | - <label class="col-sm-3 control-label">出库站台:</label> | |
21 | + <label class="col-sm-3 control-label">出库口:</label> | |
22 | 22 | <div class="col-sm-8"> |
23 | - <select id="stationCode" name="stationCode" class="form-control"></select> | |
23 | + <select id="port" name="port" class="form-control"></select> | |
24 | 24 | </div> |
25 | 25 | </div> |
26 | 26 | <div class="form-group"> |
... | ... | @@ -49,7 +49,7 @@ |
49 | 49 | } |
50 | 50 | }); |
51 | 51 | |
52 | - $('#stationCode').select2({ | |
52 | + $('#port').select2({ | |
53 | 53 | ajax: { |
54 | 54 | url: ctx+'config/station/getData', |
55 | 55 | dataType: 'json', |
... | ... |
src/main/resources/templates/task/taskHeader/chooseStation.html
... | ... | @@ -28,9 +28,9 @@ |
28 | 28 | </div> |
29 | 29 | |
30 | 30 | <div class="form-group"> |
31 | - <label class="col-sm-3 control-label">出库站台:</label> | |
31 | + <label class="col-sm-3 control-label">出库口:</label> | |
32 | 32 | <div class="col-sm-8"> |
33 | - <select id="stationCode" name="stationCode" class="form-control"></select> | |
33 | + <select id="port" name="port" class="form-control"></select> | |
34 | 34 | </div> |
35 | 35 | </div> |
36 | 36 | <div class="form-group"> |
... | ... | @@ -60,7 +60,7 @@ |
60 | 60 | var containerCode = document.getElementById("containerCode").value; |
61 | 61 | var type = document.getElementById("type").value; |
62 | 62 | var data = { "containerCode": containerCode, "type":type }; |
63 | - $('#stationCode').select2({ | |
63 | + $('#port').select2({ | |
64 | 64 | ajax: { |
65 | 65 | url: ctx+'config/station/getStationFromType', |
66 | 66 | dataType: 'json', |
... | ... |
src/main/resources/templates/task/taskHeader/taskHeader.html