Commit 97e2adbbf695e467a7b93842147eefc910d11f28

Authored by mahuandong
1 parent 11fb3b91

修改任务执行接口

src/main/java/com/huaheng/api/wcs/domain/WcsTask.java
1 1 package com.huaheng.api.wcs.domain;
2 2  
  3 +import lombok.Data;
  4 +
3 5 import java.io.Serializable;
4 6  
5 7 /**
... ... @@ -7,6 +9,8 @@ import java.io.Serializable;
7 9 * @author ricard
8 10 * @date 2019/10/11
9 11 */
  12 +
  13 +@Data
10 14 public class WcsTask implements Serializable {
11 15 private static final long serialVersionUID = -8855840499538794854L;
12 16  
... ... @@ -38,134 +42,15 @@ public class WcsTask implements Serializable {
38 42 private String reason;
39 43  
40 44 //长
41   - private Float length;
  45 + private String length;
42 46  
43 47 //宽
44   - private Float width;
  48 + private String width;
45 49  
46 50 //高
47   - private Float height;
  51 + private String height;
48 52  
49 53 //重
50   - private Float weight;
51   -
52   - public String getTaskNo() {
53   - return taskNo;
54   - }
55   -
56   - public void setTaskNo(String taskNo) {
57   - this.taskNo = taskNo;
58   - }
59   -
60   - public String getTaskType() {
61   - return taskType;
62   - }
63   -
64   - public void setTaskType(String taskType) {
65   - this.taskType = taskType;
66   - }
67   -
68   - public String getStation() {
69   - return station;
70   - }
71   -
72   - public void setStation(String station) {
73   - this.station = station;
74   - }
75   -
76   - public String getPlatform() {
77   - return platform;
78   - }
79   -
80   - public void setPlatform(String platform) {
81   - this.platform = platform;
82   - }
83   -
84   - public String getPalletNo() {
85   - return palletNo;
86   - }
87   -
88   - public void setPalletNo(String palletNo) {
89   - this.palletNo = palletNo;
90   - }
91   -
92   - public String getFromLocationCode() {
93   - return fromLocationCode;
94   - }
95   -
96   - public void setFromLocationCode(String fromLocationCode) {
97   - this.fromLocationCode = fromLocationCode;
98   - }
99   -
100   - public String getToLocationCode() {
101   - return toLocationCode;
102   - }
103   -
104   - public void setToLocationCode(String toLocationCode) {
105   - this.toLocationCode = toLocationCode;
106   - }
107   -
108   - public String getReason() {
109   - return reason;
110   - }
111   -
112   - public void setReason(String reason) {
113   - this.reason = reason;
114   - }
115   -
116   - public float getLength() {
117   - return length;
118   - }
119   -
120   - public void setLength(float length) {
121   - this.length = length;
122   - }
123   -
124   - public float getWidth() {
125   - return width;
126   - }
127   -
128   - public void setWidth(float width) {
129   - this.width = width;
130   - }
131   -
132   - public float getHeight() {
133   - return height;
134   - }
135   -
136   - public void setHeight(float height) {
137   - this.height = height;
138   - }
139   -
140   - public float getWeight() {
141   - return weight;
142   - }
143   -
144   - public void setWeight(float weight) {
145   - this.weight = weight;
146   - }
147   -
148   - public String getLocationCode() {
149   - return locationCode;
150   - }
151   -
152   - public void setLocationCode(String locationCode) {
153   - this.locationCode = locationCode;
154   - }
155   -
156   - public void setLength(Float length) {
157   - this.length = length;
158   - }
159   -
160   - public void setWidth(Float width) {
161   - this.width = width;
162   - }
163   -
164   - public void setHeight(Float height) {
165   - this.height = height;
166   - }
  54 + private String weight;
167 55  
168   - public void setWeight(Float weight) {
169   - this.weight = weight;
170   - }
171 56 }
... ...
src/main/java/com/huaheng/api/wcs/service/taskAssignService/TaskAssignServiceImpl.java
... ... @@ -57,9 +57,9 @@ public class TaskAssignServiceImpl implements TaskAssignService {
57 57 if(StringUtils.isEmpty(taskHeader.getContainerCode())){
58 58 throw new ServiceException("wms任务中容器为空");
59 59 }
60   -// if(StringUtils.isEmpty(taskHeader.getStation())){
61   -// throw new ServiceException("wms站台为空");
62   -// }
  60 + if(StringUtils.isEmpty(taskHeader.getRecvDock())){
  61 + throw new ServiceException("wms站台为空");
  62 + }
63 63  
64 64 //入库性质的任务源库位不能为空
65 65 if(taskHeader.getTaskType()==100 || taskHeader.getTaskType()==200
... ... @@ -93,6 +93,7 @@ public class TaskAssignServiceImpl implements TaskAssignService {
93 93 String param="wcs";
94 94 String url=addressService.selectAddress(param)+"TaskAssign";
95 95 String JsonParam = JSON.toJSONString(wcsTask);
  96 + System.out.println(JsonParam);
96 97 String result = HttpUtils.bodypost(url, JsonParam);
97 98 if(StringUtils.isEmpty(result)){
98 99 throw new ServiceException("接口地址错误");
... ...
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java
... ... @@ -220,10 +220,6 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
220 220 taskHeader.setToLocation(locationCode);
221 221 if (!taskHeaderService.updateById(taskHeader)){throw new ServiceException("更新任务头表目标库位失败");}
222 222 WcsTask wcsTaskResult = new WcsTask();
223   - wcsTaskResult.setLength(0);
224   - wcsTaskResult.setWidth(0);
225   - wcsTaskResult.setHeight(0);
226   - wcsTaskResult.setWeight(0);
227 223 wcsTaskResult.setTaskNo(wcsTask.getTaskNo());
228 224 wcsTaskResult.setStation(wcsTask.getStation());
229 225 wcsTaskResult.setPalletNo(wcsTask.getPalletNo());
... ...