Commit 662abaaf6bb47fb236425d27ed0bb28580bc54b9

Authored by 肖超群
1 parent 4a465959

更新swagger wcs接口

ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue
... ... @@ -63,10 +63,10 @@
63 63  
64 64 <!-- table区域-begin -->
65 65 <div>
66   - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
67   - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
68   - <a style="margin-left: 24px" @click="onClearSelected">清空</a>
69   - </div>
  66 +<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
  67 +<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项-->
  68 +<!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
  69 +<!-- </div>-->
70 70  
71 71 <a-table
72 72 ref="table"
... ...
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
... ... @@ -104,11 +104,11 @@
104 104  
105 105 <!-- table区域-begin -->
106 106 <div>
107   - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
108   - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
109   - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
110   - <a style="margin-left: 24px" @click="onClearSelected">清空</a>
111   - </div>
  107 +<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
  108 +<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a-->
  109 +<!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>项-->
  110 +<!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
  111 +<!-- </div>-->
112 112  
113 113 <a-table
114 114 ref="table"
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/acs/controller/AcsController.java
... ... @@ -44,8 +44,8 @@ public class AcsController extends HuahengBaseController {
44 44 }
45 45  
46 46 @PostMapping("/notifyAGVTask")
47   - @ApiOperation("更新AGV状态")
48 47 @ResponseBody
  48 + @ApiOperation("更新AGV状态")
49 49 @ApiLogger(apiName = "更新AGV状态", from = "ACS")
50 50 public Result notifyAGVTask(@RequestBody AcsStatus acsStatus) {
51 51 if (acsStatus == null) {
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/controller/WcsController.java
1 1 package org.jeecg.modules.wms.api.wcs.controller;
2 2  
3   -import java.util.Map;
4   -
5 3 import javax.annotation.Resource;
6 4 import javax.servlet.http.HttpServletRequest;
7 5  
8 6 import org.jeecg.common.api.vo.Result;
9 7 import org.jeecg.common.aspect.annotation.AutoLog;
10   -import org.jeecg.modules.wms.api.wcs.entity.ManyEmptyDomain;
11   -import org.jeecg.modules.wms.api.wcs.entity.MaterialInfoEntity;
12   -import org.jeecg.modules.wms.api.wcs.entity.TaskFinishEntity;
13   -import org.jeecg.modules.wms.api.wcs.entity.WarecellDomain;
  8 +import org.jeecg.modules.wms.api.wcs.entity.*;
14 9 import org.jeecg.modules.wms.api.wcs.service.WcsService;
15 10 import org.jeecg.modules.wms.framework.aspectj.lang.annotation.ApiLogger;
16 11 import org.jeecg.modules.wms.framework.controller.HuahengBaseController;
17   -import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader;
18 12 import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService;
19   -import org.jeecg.utils.HuahengJwtUtil;
20 13 import org.jeecg.utils.StringUtils;
21   -import org.jeecg.utils.constant.QuantityConstant;
22 14 import org.springframework.web.bind.annotation.*;
23 15  
  16 +import io.swagger.annotations.Api;
  17 +import io.swagger.annotations.ApiOperation;
  18 +
  19 +/**
  20 + * @author 游杰
  21 + */
24 22 @RestController
25 23 @RequestMapping("/api/wcs")
  24 +@Api(tags = "WCS接口")
26 25 public class WcsController extends HuahengBaseController {
27 26  
28 27 @Resource
... ... @@ -33,16 +32,19 @@ public class WcsController extends HuahengBaseController {
33 32 /**
34 33 ** WCS给的长,宽,高,重在有不同规格库位才有用,destination是区域, locationType库位类型
35 34 */
36   - @AutoLog(value = "WCS仓位分配")
  35 + @AutoLog(value = "仓位分配")
37 36 @PostMapping("/warecellAllocation")
38 37 @ResponseBody
  38 + @ApiOperation("仓位分配")
39 39 @ApiLogger(apiName = "仓位分配", from = "WCS")
40 40 public Result warecellAllocation(@RequestBody WarecellDomain warecellDomain, HttpServletRequest req) {
41 41 String warehouseCode = warecellDomain.getWarehouseCode();
  42 + String taskNo = warecellDomain.getTaskNo();
  43 + String zoneCode = warecellDomain.getZoneCode();
42 44 if (StringUtils.isEmpty(warehouseCode)) {
43 45 return Result.error("仓位分配, 仓库号为空");
44 46 }
45   - if (StringUtils.isEmpty(warecellDomain.getTaskNo())) {
  47 + if (StringUtils.isEmpty(taskNo)) {
46 48 return Result.error("仓位分配, 任务号为空");
47 49 }
48 50 if (StringUtils.isEmpty(warecellDomain.getZoneCode())) {
... ... @@ -51,7 +53,8 @@ public class WcsController extends HuahengBaseController {
51 53 if (StringUtils.isEmpty(warecellDomain.getHeight())) {
52 54 return Result.error("仓位分配, 高度为空");
53 55 }
54   - Result result = handleMultiProcess("warecellAllocation", new MultiProcessListener() {
  56 + String lockKey = warehouseCode + zoneCode;
  57 + Result result = handleMultiProcess("warecellAllocation", lockKey, new MultiProcessListener() {
55 58 @Override
56 59 public Result<?> doProcess() {
57 60 Result result = wcsService.warecellAllocation(warecellDomain);
... ... @@ -65,18 +68,28 @@ public class WcsController extends HuahengBaseController {
65 68 * WCS申请空托盘组入库
66 69 * @return
67 70 */
68   - @AutoLog(value = "WCS申请空托盘组入库")
  71 + @AutoLog(value = "申请空托盘组入库")
69 72 @PostMapping("/manyEmptyIn")
70 73 @ResponseBody
71   - @ApiLogger(apiName = "manyEmptyIn", from = "WCS")
72   - public Result manyEmptyIn(@RequestBody ManyEmptyDomain manyEmptyDomain, HttpServletRequest req) {
  74 + @ApiOperation("申请空托盘组入库")
  75 + @ApiLogger(apiName = "申请空托盘组入库", from = "WCS")
  76 + public Result manyEmptyIn(@RequestBody ManyEmptyDomain manyEmptyDomain) {
73 77 String containerCode = manyEmptyDomain.getContainerCode();
74   - String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
  78 + String warehouseCode = manyEmptyDomain.getWarehouseCode();
75 79 String zoneCode = manyEmptyDomain.getZoneCode();
76 80 String height = manyEmptyDomain.getHeight();
77 81 String roadWay = manyEmptyDomain.getRoadWay();
78   -
79   - Result result = handleMultiProcess("manyEmptyIn", new MultiProcessListener() {
  82 + if (StringUtils.isEmpty(warehouseCode)) {
  83 + return Result.error("申请空托盘组入库, 仓库号为空");
  84 + }
  85 + if (StringUtils.isEmpty(containerCode)) {
  86 + return Result.error("申请空托盘组入库, 托盘号为空");
  87 + }
  88 + if (StringUtils.isEmpty(zoneCode)) {
  89 + return Result.error("申请空托盘组入库, 库区编码为空");
  90 + }
  91 + String lockKey = warehouseCode + zoneCode;
  92 + Result result = handleMultiProcess("manyEmptyIn", lockKey, new MultiProcessListener() {
80 93 @Override
81 94 public Result<?> doProcess() {
82 95 Result result = taskHeaderService.createManyEmptyInTask(containerCode, zoneCode, roadWay, height, warehouseCode);
... ... @@ -90,15 +103,26 @@ public class WcsController extends HuahengBaseController {
90 103 * WCS申请空托盘组出库
91 104 * @return
92 105 */
93   - @AutoLog(value = "WCS申请空托盘组出库")
  106 + @AutoLog(value = "申请空托盘组出库")
94 107 @PostMapping("/manyEmptyOut")
95 108 @ResponseBody
96   - @ApiLogger(apiName = "manyEmptyOut", from = "WCS")
97   - public Result manyEmptyOut(@RequestBody ManyEmptyDomain manyEmptyDomain, HttpServletRequest req) {
  109 + @ApiOperation("申请空托盘组出库")
  110 + @ApiLogger(apiName = "申请空托盘组出库", from = "WCS")
  111 + public Result manyEmptyOut(@RequestBody ManyEmptyDomain manyEmptyDomain) {
98 112 String containerCode = manyEmptyDomain.getContainerCode();
99 113 String toPortCode = manyEmptyDomain.getPort();
100   - String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
101   - Result result = handleMultiProcess("manyEmptyOut", new MultiProcessListener() {
  114 + String warehouseCode = manyEmptyDomain.getWarehouseCode();
  115 + if (StringUtils.isEmpty(warehouseCode)) {
  116 + return Result.error("申请空托盘组出库, 仓库号为空");
  117 + }
  118 + if (StringUtils.isEmpty(toPortCode)) {
  119 + return Result.error("申请空托盘组出库, 出库口为空");
  120 + }
  121 + if (StringUtils.isEmpty(containerCode)) {
  122 + return Result.error("申请空托盘组出库, 托盘号为空");
  123 + }
  124 + String lockKey = warehouseCode + containerCode;
  125 + Result result = handleMultiProcess("manyEmptyOut", lockKey, new MultiProcessListener() {
102 126 @Override
103 127 public Result<?> doProcess() {
104 128 Result result = taskHeaderService.createManyEmptyOutTask(containerCode, toPortCode, warehouseCode);
... ... @@ -115,13 +139,18 @@ public class WcsController extends HuahengBaseController {
115 139 @AutoLog(value = "WCS任务完成")
116 140 @PostMapping("/completeTaskByWMS")
117 141 @ResponseBody
  142 + @ApiOperation("WCS任务完成")
118 143 @ApiLogger(apiName = "WCS任务完成", from = "WCS")
119   - public Result completeTaskByWMS(@RequestBody TaskFinishEntity taskFinishEntity, HttpServletRequest req) {
120   - int taskNo = taskFinishEntity.getTaskNo();
121   - Result result = handleMultiProcess("completeTaskByWMS", new MultiProcessListener() {
  144 + public Result completeTaskByWMS(@RequestBody TaskEntity taskEntity) {
  145 + String taskNo = taskEntity.getTaskNo();
  146 + String lockKey = taskNo;
  147 + if (StringUtils.isEmpty(taskNo)) {
  148 + return Result.error("WCS任务完成, 没有找到任务taskNo:" + taskNo);
  149 + }
  150 + Result result = handleMultiProcess("completeTaskByWMS", lockKey, new MultiProcessListener() {
122 151 @Override
123 152 public Result<?> doProcess() {
124   - Result result = taskHeaderService.completeTaskByWMS(taskNo);
  153 + Result result = taskHeaderService.completeTaskByWMS(Integer.parseInt(taskNo));
125 154 return result;
126 155 }
127 156 });
... ... @@ -135,6 +164,7 @@ public class WcsController extends HuahengBaseController {
135 164 @AutoLog(value = "WCS设置物料信息")
136 165 @PostMapping("/setMaterialInfo")
137 166 @ResponseBody
  167 + @ApiOperation("设置物料信息")
138 168 @ApiLogger(apiName = "WCS设置物料信息", from = "WCS")
139 169 public Result setMaterialInfo(@RequestBody MaterialInfoEntity materialInfoEntity) {
140 170 Result result = wcsService.setMaterialInfo(materialInfoEntity);
... ... @@ -144,60 +174,69 @@ public class WcsController extends HuahengBaseController {
144 174 @AutoLog(value = "到达拣选台")
145 175 @PostMapping("/arrivedNotice")
146 176 @ResponseBody
  177 + @ApiOperation("到达拣选台")
147 178 @ApiLogger(apiName = "到达拣选台", from = "WCS")
148   - public Result arrivedNotice(@RequestBody Map<String, String> map, HttpServletRequest req) {
149   - String taskNo = map.get("taskNo");
150   - String port = map.get("port");
151   - String msg = map.get("msg");
152   - String state = map.get("state");
153   - TaskHeader taskHeader = taskHeaderService.getById(taskNo);
154   - if (taskHeader == null) {
155   - return Result.error("没有找到任务taskNo:" + taskNo);
156   - }
157   - String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
158   - if (!taskHeader.getWarehouseCode().equals(warehouseCode)) {
159   - return Result.error("任务仓库编码不匹配");
160   - }
161   - int status = taskHeader.getStatus();
162   - if (status == QuantityConstant.TASK_STATUS_COMPLETED) {
163   - return Result.error("任务已经完成taskNo:" + taskNo);
164   - }
165   - taskHeader.setStatus(QuantityConstant.TASK_STATUS_ARRIVED_STATION);
166   - taskHeader.setToPortCode(port);
167   - boolean result = taskHeaderService.updateById(taskHeader);
168   - if (!result) {
169   - return Result.error("更新到达站台失败");
170   - }
171   - return Result.ok("更新到达站台成功");
  179 + public Result arrivedNotice(@RequestBody ArriveEntity arriveEntity) {
  180 + String taskNo = arriveEntity.getTaskNo();
  181 + String port = arriveEntity.getPort();
  182 + Result result = wcsService.arrivedNotice(taskNo, port);
  183 + return result;
172 184 }
173 185  
174 186 @AutoLog(value = "空出处理")
175 187 @PostMapping("/emptyOutHandle")
176 188 @ResponseBody
  189 + @ApiOperation("空出处理")
177 190 @ApiLogger(apiName = "空出处理", from = "WCS")
178   - public Result emptyOutHandle(@RequestBody Map<String, String> map) {
179   - String taskNo = map.get("taskNo");
180   - Result result = wcsService.emptyOutHandle(taskNo);
  191 + public Result emptyOutHandle(@RequestBody TaskEntity taskEntity) {
  192 + String taskNo = taskEntity.getTaskNo();
  193 + String warehouseCode = taskEntity.getWarehouseCode();
  194 + String lockKey = warehouseCode;
  195 + Result result = handleMultiProcess("emptyOutHandle", lockKey, new MultiProcessListener() {
  196 + @Override
  197 + public Result<?> doProcess() {
  198 + Result result = wcsService.emptyOutHandle(taskNo);
  199 + return result;
  200 + }
  201 + });
181 202 return result;
182 203 }
183 204  
184 205 @AutoLog(value = "重入处理")
185 206 @PostMapping("/reentryHandle")
186 207 @ResponseBody
  208 + @ApiOperation("重入处理")
187 209 @ApiLogger(apiName = "重入处理", from = "WCS")
188   - public Result reentryHandle(@RequestBody Map<String, String> map) {
189   - String taskNo = map.get("taskNo");
190   - Result result = wcsService.reentryHandle(taskNo);
  210 + public Result reentryHandle(@RequestBody TaskEntity taskEntity) {
  211 + String taskNo = taskEntity.getTaskNo();
  212 + String warehouseCode = taskEntity.getWarehouseCode();
  213 + String lockKey = warehouseCode;
  214 + Result result = handleMultiProcess("reentryHandle", lockKey, new MultiProcessListener() {
  215 + @Override
  216 + public Result<?> doProcess() {
  217 + Result result = wcsService.reentryHandle(taskNo);
  218 + return result;
  219 + }
  220 + });
191 221 return result;
192 222 }
193 223  
194 224 @AutoLog(value = "取货错处理")
195 225 @PostMapping("/pickupErrorHandle")
196 226 @ResponseBody
  227 + @ApiOperation("取货错处理")
197 228 @ApiLogger(apiName = "取货错处理", from = "WCS")
198   - public Result pickupErrorHandle(@RequestBody Map<String, String> map) {
199   - String taskNo = map.get("taskNo");
200   - Result result = wcsService.pickupErrorHandle(taskNo);
  229 + public Result pickupErrorHandle(@RequestBody TaskEntity taskEntity) {
  230 + String taskNo = taskEntity.getTaskNo();
  231 + String warehouseCode = taskEntity.getWarehouseCode();
  232 + String lockKey = warehouseCode;
  233 + Result result = handleMultiProcess("pickupErrorHandle", warehouseCode, new MultiProcessListener() {
  234 + @Override
  235 + public Result<?> doProcess() {
  236 + Result result = wcsService.pickupErrorHandle(taskNo);
  237 + return result;
  238 + }
  239 + });
201 240 return result;
202 241 }
203 242 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/entity/ArriveEntity.java 0 → 100644
  1 +package org.jeecg.modules.wms.api.wcs.entity;
  2 +
  3 +import io.swagger.annotations.ApiModelProperty;
  4 +import lombok.Data;
  5 +
  6 +/**
  7 + * @author 游杰
  8 + */
  9 +@Data
  10 +public class ArriveEntity {
  11 +
  12 + /** 任务号 */
  13 + @ApiModelProperty(value = "任务号", required = true)
  14 + private String taskNo;
  15 + /** 分拣口 */
  16 + @ApiModelProperty(value = "分拣口", required = true)
  17 + private String port;
  18 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/entity/ManyEmptyDomain.java
1 1 package org.jeecg.modules.wms.api.wcs.entity;
2 2  
  3 +import io.swagger.annotations.ApiModelProperty;
3 4 import lombok.Data;
4 5  
5 6 @Data
6 7 public class ManyEmptyDomain {
7 8  
  9 + /** 托盘号 */
  10 + @ApiModelProperty(value = "托盘号", required = true)
8 11 private String containerCode;
  12 + /** 长度 */
  13 + @ApiModelProperty(value = "长度")
9 14 private String length;
  15 + /** 宽度 */
  16 + @ApiModelProperty(value = "宽度")
10 17 private String width;
  18 + /** 高度 */
  19 + @ApiModelProperty(value = "高度")
11 20 private String height;
  21 + /** 重量 */
  22 + @ApiModelProperty(value = "重量")
12 23 private String weight;
13   - // 可用巷道
  24 + /** 重量 */
  25 + @ApiModelProperty(value = "重量")
  26 + private String warehouseCode;
  27 + /** 巷道 */
  28 + @ApiModelProperty(value = "巷道")
14 29 private String roadWay;
  30 + /** 库区 */
  31 + @ApiModelProperty(value = "库区")
15 32 private String zoneCode;
  33 + /** 分拣口 */
  34 + @ApiModelProperty(value = "分拣口", required = true)
16 35 private String port;
17 36  
18 37 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/entity/MaterialInfoEntity.java
1 1 package org.jeecg.modules.wms.api.wcs.entity;
2 2  
  3 +import io.swagger.annotations.ApiModelProperty;
3 4 import lombok.Data;
4 5  
5 6 @Data
... ... @@ -8,21 +9,26 @@ public class MaterialInfoEntity {
8 9 /**
9 10 * 任务号
10 11 */
  12 + @ApiModelProperty(value = "任务号", required = true)
11 13 private int taskNo;
12 14 /**
13 15 * 重量
14 16 */
  17 + @ApiModelProperty(value = "重量")
15 18 private int weight;
16 19 /**
17 20 * 长度
18 21 */
  22 + @ApiModelProperty(value = "长度")
19 23 private int length;
20 24 /**
21 25 * 宽度
22 26 */
  27 + @ApiModelProperty(value = "宽度")
23 28 private int width;
24 29 /**
25 30 * 高度
26 31 */
  32 + @ApiModelProperty(value = "高度")
27 33 private int height;
28 34 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/entity/TaskEntity.java 0 → 100644
  1 +package org.jeecg.modules.wms.api.wcs.entity;
  2 +
  3 +import io.swagger.annotations.ApiModelProperty;
  4 +import lombok.Data;
  5 +
  6 +/**
  7 + * @author 游杰
  8 + */
  9 +@Data
  10 +public class TaskEntity {
  11 +
  12 + /**
  13 + * 任务号
  14 + */
  15 + @ApiModelProperty(value = "任务号", required = true)
  16 + private String taskNo;
  17 + /**
  18 + * 仓库编码
  19 + */
  20 + @ApiModelProperty(value = "仓库编码", required = true)
  21 + private String warehouseCode;
  22 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/entity/TaskFinishEntity.java deleted
1   -package org.jeecg.modules.wms.api.wcs.entity;
2   -
3   -import lombok.Data;
4   -
5   -@Data
6   -public class TaskFinishEntity {
7   -
8   - private Integer taskNo;
9   -}
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/entity/WarecellDomain.java
1 1 package org.jeecg.modules.wms.api.wcs.entity;
2 2  
3   -import lombok.Data;
4   -
5 3 import java.util.List;
6 4  
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Data;
  7 +
7 8 @Data
8 9 public class WarecellDomain {
9 10  
10   - // 任务号
  11 + /**
  12 + * 任务号
  13 + */
  14 + @ApiModelProperty(value = "任务号", required = true)
11 15 private String taskNo;
12 16  
13   - // 相关任务号
  17 + /**
  18 + * 相关任务号
  19 + */
  20 + @ApiModelProperty(value = "相关任务号")
14 21 private String relatedTaskNo;
15 22  
16   - // 仓库编号
  23 + /**
  24 + * 仓库编号
  25 + */
  26 + @ApiModelProperty(value = "仓库编号", required = true)
17 27 private String warehouseCode;
18 28  
19   - // 区域
  29 + /**
  30 + * 区域
  31 + */
  32 + @ApiModelProperty(value = "区域", required = true)
20 33 private String zoneCode;
21 34  
22   - // 长
  35 + /**
  36 + * 长度
  37 + */
  38 + @ApiModelProperty(value = "长度")
23 39 private String length;
24 40  
25   - // 宽
  41 + /**
  42 + * 宽度
  43 + */
  44 + @ApiModelProperty(value = "宽度")
26 45 private String width;
27 46  
28   - // 高
  47 + /**
  48 + * 高度
  49 + */
  50 + @ApiModelProperty(value = "高度")
29 51 private String height;
30 52  
31   - // 重
  53 + /**
  54 + * 重量
  55 + */
  56 + @ApiModelProperty(value = "重量")
32 57 private String weight;
33   - // 巷道
  58 + /**
  59 + * 可用巷道
  60 + */
  61 + @ApiModelProperty(value = "可用巷道")
34 62 private List<Integer> roadWays;
35 63 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/entity/WcsTask.java
1 1 package org.jeecg.modules.wms.api.wcs.entity;
2 2  
  3 +import io.swagger.annotations.ApiModelProperty;
3 4 import lombok.Data;
4 5  
5 6 /**
... ... @@ -11,59 +12,106 @@ import lombok.Data;
11 12 @Data
12 13 public class WcsTask {
13 14  
14   - // 任务号
  15 + /**
  16 + * 任务号
  17 + */
  18 + @ApiModelProperty(value = "任务号", required = true)
15 19 private String taskNo;
16 20  
17   - // 前置任务
  21 + /**
  22 + * 前置任务
  23 + */
  24 + @ApiModelProperty(value = "前置任务")
18 25 private String preTaskNo;
19 26  
20   - // 任务类型
  27 + /**
  28 + * 任务类型
  29 + */
  30 + @ApiModelProperty(value = "任务类型")
21 31 private Integer taskType;
22 32  
23   - // 任务状态
  33 + /**
  34 + * 任务状态
  35 + */
  36 + @ApiModelProperty(value = "任务状态")
24 37 private Integer taskStatus;
25 38  
26   - // 平台
27   - private String platform;
28   -
  39 + /**
  40 + * 任务状态
  41 + */
  42 + @ApiModelProperty(value = "任务状态")
29 43 private String warehouseCode;
30 44  
31   - // 容器编码
  45 + /**
  46 + * 容器编码
  47 + */
  48 + @ApiModelProperty(value = "容器编码")
32 49 private String containerCode;
33 50  
34   - // 来源口”,一般用于指定入库口,string (50),默认0,必填
  51 + /**
  52 + * 起始站台口
  53 + */
  54 + @ApiModelProperty(value = "起始站台口")
35 55 private String fromPort;
36 56  
37   - // 目的口”,出库性质的任务必须填写,string (50),默认0,必填
  57 + /**
  58 + * 终点站台口
  59 + */
  60 + @ApiModelProperty(value = "终点站台口")
38 61 private String toPort;
39 62  
40   - // 源位置库位编码
  63 + /**
  64 + * 起始库位编码
  65 + */
  66 + @ApiModelProperty(value = "起始库位编码")
41 67 private String fromLocationCode;
42 68  
43   - // 目的位置库位编码
  69 + /**
  70 + * 目的库位编码
  71 + */
  72 + @ApiModelProperty(value = "目的库位编码")
44 73 private String toLocationCode;
45 74  
46   - // 重入后再次分配的位置编码
47   - private String locationCode;
48   -
49 75 // 优先级,int,默认100 ,数字越小优先级越高",必填
  76 + /**
  77 + * 优先级
  78 + */
  79 + @ApiModelProperty(value = "优先级")
50 80 private Integer priority;
51 81  
52   - // 巷道
  82 + /**
  83 + * 巷道
  84 + */
  85 + @ApiModelProperty(value = "巷道")
53 86 private String roadWay;
54 87  
55   - // 区域
  88 + /**
  89 + * 区域
  90 + */
  91 + @ApiModelProperty(value = "区域")
56 92 private String zoneCode;
57 93  
58   - // 备注
  94 + /**
  95 + * 备注
  96 + */
  97 + @ApiModelProperty(value = "备注")
59 98 private String remark;
60 99  
61   - // 出库单顺序,越小优先级越大
  100 + /**
  101 + * 出库单顺序,越小优先级越大
  102 + */
  103 + @ApiModelProperty(value = "出库单顺序")
62 104 private long shipmentOrder;
63 105  
64   - // 顺序
  106 + /**
  107 + * 顺序
  108 + */
  109 + @ApiModelProperty(value = "顺序")
65 110 private int sequence;
66 111  
67   - // 顺序数量
  112 + /**
  113 + * 顺序数量
  114 + */
  115 + @ApiModelProperty(value = "顺序数量")
68 116 private int sequenceNumber;
69 117 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsService.java
... ... @@ -41,4 +41,8 @@ public interface WcsService {
41 41 */
42 42 Result pickupErrorHandle(String taskNo);
43 43  
  44 + /**
  45 + * 到达拣选台
  46 + */
  47 + Result arrivedNotice(String taskNo, String port);
44 48 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
1 1 package org.jeecg.modules.wms.api.wcs.service;
2 2  
3 3 import java.util.ArrayList;
4   -import java.util.Collections;
5 4 import java.util.List;
6 5 import java.util.stream.Collectors;
7 6  
... ... @@ -376,7 +375,6 @@ public class WcsServiceImpl implements WcsService {
376 375 wcsTask.setSequence(taskHeader.getSequence());
377 376 wcsTask.setSequenceNumber(taskHeader.getSequenceNumber());
378 377 wcsTask.setPriority(10);
379   - wcsTask.setPlatform(QuantityConstant.PLATFORM_WMS);
380 378 wcsTask.setRemark(QuantityConstant.EMPTY_STRING);
381 379 Container container = containerService.getContainerByCode(containerCode, warehouseCode);
382 380 if (container == null) {
... ... @@ -611,4 +609,23 @@ public class WcsServiceImpl implements WcsService {
611 609 return Result.ok("取货错处理成功");
612 610 }
613 611  
  612 + @Override
  613 + public Result arrivedNotice(String taskNo, String port) {
  614 + TaskHeader taskHeader = taskHeaderService.getById(taskNo);
  615 + if (taskHeader == null) {
  616 + return Result.error("没有找到任务taskNo:" + taskNo);
  617 + }
  618 + int status = taskHeader.getStatus();
  619 + if (status == QuantityConstant.TASK_STATUS_COMPLETED) {
  620 + return Result.error("任务已经完成taskNo:" + taskNo);
  621 + }
  622 + taskHeader.setStatus(QuantityConstant.TASK_STATUS_ARRIVED_STATION);
  623 + taskHeader.setToPortCode(port);
  624 + boolean result = taskHeaderService.updateById(taskHeader);
  625 + if (!result) {
  626 + return Result.error("更新到达站台失败");
  627 + }
  628 + return Result.ok("更新到达站台成功");
  629 + }
  630 +
614 631 }
... ...