Commit 1d84943bd42f3658032eb24eb70bea8799a9de2f
1 parent
97e2adbb
修改接口实体类
修改仓位分配接口
Showing
5 changed files
with
71 additions
and
15 deletions
src/main/java/com/huaheng/api/wcs/controller/WarecellAllocation.java
... | ... | @@ -21,7 +21,7 @@ import javax.annotation.Resource; |
21 | 21 | */ |
22 | 22 | |
23 | 23 | @RestController |
24 | -@RequestMapping("/WCS/v1") | |
24 | +@RequestMapping("/WCS/v2") | |
25 | 25 | @Api(tags = {"WarecellAllocation"}, description = "wcs仓位分配接口") |
26 | 26 | public class WarecellAllocation extends BaseController { |
27 | 27 | |
... | ... |
src/main/java/com/huaheng/api/wcs/domain/TaskDetails.java
0 → 100644
1 | +package com.huaheng.api.wcs.domain; | |
2 | + | |
3 | +import lombok.Data; | |
4 | + | |
5 | +/** | |
6 | + * Created by Enzo Cotter on 2019/10/15. | |
7 | + */ | |
8 | +@Data | |
9 | +public class TaskDetails { | |
10 | + | |
11 | + //关联行号,string (50),默认0 ",必填 | |
12 | + private String referLineNo; | |
13 | + | |
14 | + //物料编码,string (50),默认0 ",必填 | |
15 | + private String materialCode; | |
16 | + | |
17 | + //物料名称 | |
18 | + private String materialName; | |
19 | + | |
20 | + //数量,float,默认“0” ,必填" | |
21 | + private Float qty; | |
22 | + | |
23 | + //单位,string(20),默认“PCS” ,必填" | |
24 | + private String unit; | |
25 | +} | |
... | ... |
src/main/java/com/huaheng/api/wcs/domain/TaskFinishDomain.java
0 → 100644
1 | +package com.huaheng.api.wcs.domain; | |
2 | + | |
3 | +import lombok.Data; | |
4 | + | |
5 | +/** | |
6 | + * 任务完成和重入实体类 | |
7 | + * Created by Enzo Cotter on 2019/10/15. | |
8 | + */ | |
9 | +@Data | |
10 | +public class TaskFinishDomain { | |
11 | + | |
12 | + //任务号 | |
13 | + private String taskNo; | |
14 | + | |
15 | + //重入,int,1:重入 0:正常,必填 | |
16 | + private Integer isDoubleIn; | |
17 | + | |
18 | + //空出,int,1:重入 0:正常,必填 | |
19 | + private Integer isEmptyOut; | |
20 | + | |
21 | + //重入的库位编码,string (50),默认0,必填 | |
22 | + private String redirectionLocationCode; | |
23 | + | |
24 | + //目的位置编码,string (50),默认0 ",必填 | |
25 | + private String toLocationCode; | |
26 | +} | |
... | ... |
src/main/java/com/huaheng/api/wcs/domain/WcsTask.java
... | ... | @@ -27,7 +27,13 @@ public class WcsTask implements Serializable { |
27 | 27 | private String platform; |
28 | 28 | |
29 | 29 | //容器编码 |
30 | - private String palletNo; | |
30 | + private String containerCode; | |
31 | + | |
32 | + //来源口”,一般用于指定入库口,string (50),默认0,必填 | |
33 | + private String fromPort; | |
34 | + | |
35 | + //目的口”,出库性质的任务必须填写,string (50),默认0,必填 | |
36 | + private String toPort; | |
31 | 37 | |
32 | 38 | //源位置库位编码 |
33 | 39 | private String fromLocationCode; |
... | ... | @@ -38,8 +44,8 @@ public class WcsTask implements Serializable { |
38 | 44 | //重入后再次分配的位置编码 |
39 | 45 | private String locationCode; |
40 | 46 | |
41 | - //取消任务 | |
42 | - private String reason; | |
47 | + //优先级,int,默认100 ,数字越小优先级越高",必填 | |
48 | + private int priority; | |
43 | 49 | |
44 | 50 | //长 |
45 | 51 | private String length; |
... | ... | @@ -53,4 +59,8 @@ public class WcsTask implements Serializable { |
53 | 59 | //重 |
54 | 60 | private String weight; |
55 | 61 | |
62 | + //备注 | |
63 | + private String remark; | |
64 | + | |
65 | + private TaskDetails taskDetails; | |
56 | 66 | } |
... | ... |
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java
... | ... | @@ -86,12 +86,6 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService |
86 | 86 | if(StringUtils.isEmpty(wcsTask.getTaskNo())){ |
87 | 87 | return AjaxResult.error("任务号为空"); |
88 | 88 | } |
89 | - if(StringUtils.isEmpty(wcsTask.getPalletNo())){ | |
90 | - return AjaxResult.error("托盘编号为空"); | |
91 | - } | |
92 | - if(StringUtils.isEmpty(wcsTask.getStation())){ | |
93 | - return AjaxResult.error("站台编码为空"); | |
94 | - } | |
95 | 89 | if(StringUtils.isNull(wcsTask.getLength())){ |
96 | 90 | return AjaxResult.error("长为空"); |
97 | 91 | } |
... | ... | @@ -220,18 +214,19 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService |
220 | 214 | taskHeader.setToLocation(locationCode); |
221 | 215 | if (!taskHeaderService.updateById(taskHeader)){throw new ServiceException("更新任务头表目标库位失败");} |
222 | 216 | WcsTask wcsTaskResult = new WcsTask(); |
223 | - wcsTaskResult.setTaskNo(wcsTask.getTaskNo()); | |
224 | - wcsTaskResult.setStation(wcsTask.getStation()); | |
225 | - wcsTaskResult.setPalletNo(wcsTask.getPalletNo()); | |
226 | - wcsTaskResult.setFromLocationCode("0"); | |
227 | 217 | wcsTaskResult.setToLocationCode(locationCode); |
228 | 218 | return AjaxResult.success(wcsTaskResult); |
229 | 219 | } |
230 | 220 | |
231 | - | |
232 | 221 | return AjaxResult.error("错误"); |
233 | 222 | } |
234 | 223 | |
224 | + /** | |
225 | + * 库位筛选 | |
226 | + * @param locationList | |
227 | + * @param locationTypeList | |
228 | + * @return | |
229 | + */ | |
235 | 230 | public String filter(List<Location> locationList, List<LocationType> locationTypeList){ |
236 | 231 | String locationCode = null; |
237 | 232 | for (Location location: locationList){ |
... | ... |