Commit 2c80bc2cbddb73688ba6145b83ccd0a4b777ee3f
Merge branch 'develop' of http://172.16.29.40:8010/huhai/WMSV1 into develop
# Conflicts: # src/main/java/com/huaheng/pc/task/task/service/TaskServiceImpl.java
Showing
8 changed files
with
57 additions
and
47 deletions
src/main/java/com/huaheng/mobile/inventory/MobileInventoryController.java
... | ... | @@ -83,14 +83,14 @@ public class MobileInventoryController { |
83 | 83 | return ajaxResult; |
84 | 84 | } |
85 | 85 | |
86 | - @PostMapping( "/completeTaskByWCS") | |
86 | + @PostMapping( "/completeTaskByWMS") | |
87 | 87 | @ApiOperation("完成立库任务") |
88 | 88 | @ResponseBody |
89 | - public AjaxResult completeTaskByWCS(@RequestBody @ApiParam(value="任务id") Map<String, String> param) throws Exception { | |
89 | + public AjaxResult completeTaskByWMS(@RequestBody @ApiParam(value="任务id") Map<String, String> param) throws Exception { | |
90 | 90 | String taskId = param.get("taskId"); |
91 | 91 | if (StringUtils.isEmpty(taskId)) |
92 | 92 | return AjaxResult.error("taskId不能为空"); |
93 | - AjaxResult ajaxResult = taskService.completeTaskByWCS(Convert.toIntArray(taskId)); | |
93 | + AjaxResult ajaxResult = taskService.completeTaskByWMS(Convert.toIntArray(taskId)); | |
94 | 94 | return ajaxResult; |
95 | 95 | } |
96 | 96 | |
... | ... |
src/main/java/com/huaheng/pc/general/location/service/ILocationService.java
src/main/java/com/huaheng/pc/general/location/service/LocationServiceImpl.java
... | ... | @@ -89,35 +89,35 @@ public class LocationServiceImpl implements ILocationService { |
89 | 89 | return aotuMapper.deleteByCondition(condition); |
90 | 90 | } |
91 | 91 | |
92 | - /** | |
93 | - * 更新货位状态 | |
94 | - * @param location | |
95 | - */ | |
96 | - @Override | |
97 | - public void updateLocationStatus(String location){ | |
98 | - //获取这个库位 | |
99 | - Location condition = new Location(); | |
100 | - condition.setCode(location); | |
101 | - condition.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
102 | - List<Location> list = this.selectListEntityByEqual(condition); | |
103 | - if (list.size() < 1) return; | |
104 | - Location loc = list.get(0); | |
105 | - //获取关联在这个货位上的任务 | |
106 | - Task task = taskService.getTaskByLocationCode(location, ShiroUtils.getWarehouseCode()); | |
107 | - if(task != null){ | |
108 | - //查看任务状态,一般情况下,对应一个库位的,只有一条在执行的主任务; | |
109 | - int status = task.getFirstStatus(); | |
110 | - if(status<=10){ | |
111 | - loc.setStatus("lock"); | |
112 | - }else{ | |
113 | - loc.setStatus("occupy"); | |
114 | - } | |
115 | - }else { | |
116 | - //没有任务,则是空闲 | |
117 | - loc.setStatus("empty"); | |
118 | - } | |
119 | - this.updateByModel(loc); | |
120 | - } | |
92 | +// /** | |
93 | +// * 更新货位状态 | |
94 | +// * @param location | |
95 | +// */ | |
96 | +// @Override | |
97 | +// public void updateLocationStatus(String location){ | |
98 | +// //获取这个库位 | |
99 | +// Location condition = new Location(); | |
100 | +// condition.setCode(location); | |
101 | +// condition.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
102 | +// List<Location> list = this.selectListEntityByEqual(condition); | |
103 | +// if (list.size() < 1) return; | |
104 | +// Location loc = list.get(0); | |
105 | +// //获取关联在这个货位上的任务 | |
106 | +// Task task = taskService.getTaskByLocationCode(location, ShiroUtils.getWarehouseCode()); | |
107 | +// if(task != null){ | |
108 | +// //查看任务状态,一般情况下,对应一个库位的,只有一条在执行的主任务; | |
109 | +// int status = task.getFirstStatus(); | |
110 | +// if(status<=10){ | |
111 | +// loc.setStatus("lock"); | |
112 | +// }else{ | |
113 | +// loc.setStatus("occupy"); | |
114 | +// } | |
115 | +// }else { | |
116 | +// //没有任务,则是空闲 | |
117 | +// loc.setStatus("empty"); | |
118 | +// } | |
119 | +// this.updateByModel(loc); | |
120 | +// } | |
121 | 121 | |
122 | 122 | @Override |
123 | 123 | public boolean insertLocation(Location location) { |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentContainerDetail/controller/ShipmentContainerDetailController.java
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/controller/ShipmentContainerHeaderController.java
... | ... | @@ -123,8 +123,8 @@ public class ShipmentContainerHeaderController extends BaseController |
123 | 123 | if (StringUtils.isEmpty(ids)) |
124 | 124 | return AjaxResult.error("id不能为空"); |
125 | 125 | return shipmentContainerHeaderService.cancelCombination(Arrays.asList(Convert.toIntArray(ids))); |
126 | - } | |
127 | 126 | |
127 | + } | |
128 | 128 | /** |
129 | 129 | * 生成任务 |
130 | 130 | */ |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderServiceImpl.java
... | ... | @@ -611,6 +611,14 @@ public class ShipmentContainerHeaderServiceImpl implements IShipmentContainerHea |
611 | 611 | |
612 | 612 | return AjaxResult.success(""); |
613 | 613 | } |
614 | +/** | |
615 | + * 原来的流程:出库组盘的时候不锁定库位,生成任务锁定库位, 取消任务的时候取消任务锁定,取消组盘的时候不需要库位锁定 | |
616 | + * 新流程:出库组盘锁定库位,生成任务的时候不需要锁定库位, 取消任务的时候不需要锁定库位,取消组盘的时候取消库位锁定 | |
617 | + * | |
618 | + * */ | |
619 | + | |
620 | + | |
621 | + | |
614 | 622 | |
615 | 623 | /** |
616 | 624 | * 检查是否可以进行取消配盘 |
... | ... |
src/main/java/com/huaheng/pc/task/task/service/TaskServiceImpl.java
... | ... | @@ -181,21 +181,21 @@ public class TaskServiceImpl implements ITaskService { |
181 | 181 | receiptContainerHeaderService.updateByModel(record); |
182 | 182 | return AjaxResult.success("取消任务成功!"); |
183 | 183 | } |
184 | - if(task.getSourceLocation()!=null){ | |
185 | - locationService.updateLocationStatus(task.getSourceLocation()); | |
186 | - } | |
187 | - if(task.getDestinationLocation()!=null){ | |
188 | - locationService.updateLocationStatus(task.getDestinationLocation()); | |
189 | - } | |
190 | 184 | //根据任务类型来更新货箱状态 |
191 | 185 | //修改关联的货箱状态 |
192 | - | |
193 | 186 | if(task.getType() == 300 || task.getType() == 400){ |
194 | 187 | //出库任务,则修改关联的出库货箱状态 |
195 | 188 | shipmentContainerHeaderService.resetStatusShipmentContainer(task.getAllocationHeadId(),(short)0); |
196 | 189 | } |
197 | 190 | if(task.getType()==800||task.getType()==900||task.getType()==500||task.getType()==600){ |
198 | - //移库任务没有关联的货箱,故这里不做处理 | |
191 | + if(task.getSourceLocation()!=null){ | |
192 | + //更新托盘、库位状态 | |
193 | + locationService.updateStatus(task.getSourceLocation(), "empty"); | |
194 | + } | |
195 | + if(task.getDestinationLocation()!=null){ | |
196 | + //更新托盘、库位状态 | |
197 | + locationService.updateStatus(task.getDestinationLocation(), "empty"); | |
198 | + } | |
199 | 199 | } |
200 | 200 | // if(task.getType()==900){ |
201 | 201 | // //出库查看任务没有关联的货箱,不做处理 |
... | ... | @@ -549,7 +549,7 @@ public class TaskServiceImpl implements ITaskService { |
549 | 549 | container.setStatus("empty"); |
550 | 550 | containerService.updateByModel(container); |
551 | 551 | } |
552 | - locationService.updateLocationStatus(task.getSourceLocation()); | |
552 | + locationService.updateStatus(task.getSourceLocation(), "empty"); | |
553 | 553 | |
554 | 554 | //设置出库货箱状态为拣货任务完成 |
555 | 555 | shipmentContainerHeaderService.resetStatusShipmentContainer(task.getAllocationHeadId(),(short)20); |
... | ... | @@ -706,7 +706,7 @@ public class TaskServiceImpl implements ITaskService { |
706 | 706 | task.setLastStatus((short)40); |
707 | 707 | taskService.updateByModel(task); |
708 | 708 | |
709 | - locationService.updateLocationStatus(task.getSourceLocation()); | |
709 | + locationService.updateStatus(task.getSourceLocation(), "empty"); | |
710 | 710 | |
711 | 711 | return AjaxResult.success("完成出库查看任务"); |
712 | 712 | } |
... | ... | @@ -1063,6 +1063,8 @@ public class TaskServiceImpl implements ITaskService { |
1063 | 1063 | } |
1064 | 1064 | // //更新货位状态 |
1065 | 1065 | // locationService.updateLocationStatus(location.getCode()); |
1066 | + //更新货位状态 | |
1067 | +// locationService.updateLocationStatus(location.getCode()); | |
1066 | 1068 | //更新货箱状态 |
1067 | 1069 | ShipmentContainerHeader record = new ShipmentContainerHeader(); |
1068 | 1070 | record.setId(shipmentContainerHeaderId); |
... | ... | @@ -1207,7 +1209,7 @@ public class TaskServiceImpl implements ITaskService { |
1207 | 1209 | taskDetailService.insert(taskDetail); |
1208 | 1210 | } |
1209 | 1211 | //更新货位状态 |
1210 | - locationService.updateLocationStatus(location.getCode()); | |
1212 | +// locationService.updateLocationStatus(location.getCode()); | |
1211 | 1213 | //更新货箱状态 |
1212 | 1214 | ShipmentContainerHeader record = shipmentContainerHeaderService.selectEntityById(shipmentContainerHeaderId); |
1213 | 1215 | record.setStatus((short)10); |
... | ... |
src/main/resources/templates/shipment/shipmentContainerHeader/shipmentContainerHeader.html
... | ... | @@ -144,7 +144,8 @@ |
144 | 144 | align: 'center', |
145 | 145 | formatter: function(value, row, index) { |
146 | 146 | var actions = []; |
147 | - actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
147 | + // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
148 | + | |
148 | 149 | actions.push('<a class="btn btn-info btn-xs " href="#" onclick="detail(\'' + row.id + '\')"><i class="fa fa-list-ul"></i>列表</a> '); |
149 | 150 | actions.push('<a class="btn btn-primary btn-xs ' + createTaskFlag + '" href="#" onclick="createTask(\'' + row.id + '\')"><i class="fa fa-cab"></i>生成任务</a> '); |
150 | 151 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="removeHead(\'' + row.id + '\')"><i class="fa fa-remove"></i>取消配盘</a>'); |
... | ... |