From 97e2adbbf695e467a7b93842147eefc910d11f28 Mon Sep 17 00:00:00 2001 From: mahuandong <752432958@qq.com> Date: Mon, 14 Oct 2019 15:44:50 +0800 Subject: [PATCH] 修改任务执行接口 --- src/main/java/com/huaheng/api/wcs/domain/WcsTask.java | 131 ++++++++--------------------------------------------------------------------------------------------------------------------------- src/main/java/com/huaheng/api/wcs/service/taskAssignService/TaskAssignServiceImpl.java | 7 ++++--- src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java | 4 ---- 3 files changed, 12 insertions(+), 130 deletions(-) diff --git a/src/main/java/com/huaheng/api/wcs/domain/WcsTask.java b/src/main/java/com/huaheng/api/wcs/domain/WcsTask.java index 405da20..8219ed9 100644 --- a/src/main/java/com/huaheng/api/wcs/domain/WcsTask.java +++ b/src/main/java/com/huaheng/api/wcs/domain/WcsTask.java @@ -1,5 +1,7 @@ package com.huaheng.api.wcs.domain; +import lombok.Data; + import java.io.Serializable; /** @@ -7,6 +9,8 @@ import java.io.Serializable; * @author ricard * @date 2019/10/11 */ + +@Data public class WcsTask implements Serializable { private static final long serialVersionUID = -8855840499538794854L; @@ -38,134 +42,15 @@ public class WcsTask implements Serializable { private String reason; //长 - private Float length; + private String length; //宽 - private Float width; + private String width; //高 - private Float height; + private String height; //重 - private Float weight; - - public String getTaskNo() { - return taskNo; - } - - public void setTaskNo(String taskNo) { - this.taskNo = taskNo; - } - - public String getTaskType() { - return taskType; - } - - public void setTaskType(String taskType) { - this.taskType = taskType; - } - - public String getStation() { - return station; - } - - public void setStation(String station) { - this.station = station; - } - - public String getPlatform() { - return platform; - } - - public void setPlatform(String platform) { - this.platform = platform; - } - - public String getPalletNo() { - return palletNo; - } - - public void setPalletNo(String palletNo) { - this.palletNo = palletNo; - } - - public String getFromLocationCode() { - return fromLocationCode; - } - - public void setFromLocationCode(String fromLocationCode) { - this.fromLocationCode = fromLocationCode; - } - - public String getToLocationCode() { - return toLocationCode; - } - - public void setToLocationCode(String toLocationCode) { - this.toLocationCode = toLocationCode; - } - - public String getReason() { - return reason; - } - - public void setReason(String reason) { - this.reason = reason; - } - - public float getLength() { - return length; - } - - public void setLength(float length) { - this.length = length; - } - - public float getWidth() { - return width; - } - - public void setWidth(float width) { - this.width = width; - } - - public float getHeight() { - return height; - } - - public void setHeight(float height) { - this.height = height; - } - - public float getWeight() { - return weight; - } - - public void setWeight(float weight) { - this.weight = weight; - } - - public String getLocationCode() { - return locationCode; - } - - public void setLocationCode(String locationCode) { - this.locationCode = locationCode; - } - - public void setLength(Float length) { - this.length = length; - } - - public void setWidth(Float width) { - this.width = width; - } - - public void setHeight(Float height) { - this.height = height; - } + private String weight; - public void setWeight(Float weight) { - this.weight = weight; - } } diff --git a/src/main/java/com/huaheng/api/wcs/service/taskAssignService/TaskAssignServiceImpl.java b/src/main/java/com/huaheng/api/wcs/service/taskAssignService/TaskAssignServiceImpl.java index 81be68c..395ea4f 100644 --- a/src/main/java/com/huaheng/api/wcs/service/taskAssignService/TaskAssignServiceImpl.java +++ b/src/main/java/com/huaheng/api/wcs/service/taskAssignService/TaskAssignServiceImpl.java @@ -57,9 +57,9 @@ public class TaskAssignServiceImpl implements TaskAssignService { if(StringUtils.isEmpty(taskHeader.getContainerCode())){ throw new ServiceException("wms任务中容器为空"); } -// if(StringUtils.isEmpty(taskHeader.getStation())){ -// throw new ServiceException("wms站台为空"); -// } + if(StringUtils.isEmpty(taskHeader.getRecvDock())){ + throw new ServiceException("wms站台为空"); + } //入库性质的任务源库位不能为空 if(taskHeader.getTaskType()==100 || taskHeader.getTaskType()==200 @@ -93,6 +93,7 @@ public class TaskAssignServiceImpl implements TaskAssignService { String param="wcs"; String url=addressService.selectAddress(param)+"TaskAssign"; String JsonParam = JSON.toJSONString(wcsTask); + System.out.println(JsonParam); String result = HttpUtils.bodypost(url, JsonParam); if(StringUtils.isEmpty(result)){ throw new ServiceException("接口地址错误"); diff --git a/src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java b/src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java index a0bfb0d..a6e86af 100644 --- a/src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java +++ b/src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java @@ -220,10 +220,6 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService taskHeader.setToLocation(locationCode); if (!taskHeaderService.updateById(taskHeader)){throw new ServiceException("更新任务头表目标库位失败");} WcsTask wcsTaskResult = new WcsTask(); - wcsTaskResult.setLength(0); - wcsTaskResult.setWidth(0); - wcsTaskResult.setHeight(0); - wcsTaskResult.setWeight(0); wcsTaskResult.setTaskNo(wcsTask.getTaskNo()); wcsTaskResult.setStation(wcsTask.getStation()); wcsTaskResult.setPalletNo(wcsTask.getPalletNo()); -- libgit2 0.22.2