|
|
|
@ -15,10 +15,12 @@ import com.shkj.wcs.third.workbinWcs.WCSUtil; |
|
|
|
import com.shkj.wcs.third.workbinWcs.dto.*; |
|
|
|
import com.shkj.wcs.third.workbinWcs.dto.*; |
|
|
|
import com.shkj.wcs.vo.WcsResponseVo; |
|
|
|
import com.shkj.wcs.vo.WcsResponseVo; |
|
|
|
import com.shkj.wcs.domain.BusinDataTask; |
|
|
|
import com.shkj.wcs.domain.BusinDataTask; |
|
|
|
|
|
|
|
import com.shkj.wms.enums.TaskStatusEnum; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
|
|
|
|
@ -44,10 +46,9 @@ public class WcsTaskController { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* wz-wcs任务下发 |
|
|
|
* wz-wcs任务下发 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Log(title = "wz-wcs任务下发", businessType = BusinessType.UPDATE) |
|
|
|
|
|
|
|
@PostMapping("/toKjWcs/commonApi") |
|
|
|
@PostMapping("/toKjWcs/commonApi") |
|
|
|
@RepeatSubmit |
|
|
|
@RepeatSubmit |
|
|
|
public WcsResponseVo commonApi(WcsCreateTaskDto bo) { |
|
|
|
public WcsResponseVo commonApi(@RequestBody WcsCreateTaskDto bo) { |
|
|
|
if (bo != null) { |
|
|
|
if (bo != null) { |
|
|
|
List<WcsCreateTaskBody> body = bo.getBody(); |
|
|
|
List<WcsCreateTaskBody> body = bo.getBody(); |
|
|
|
if (!body.isEmpty()) { |
|
|
|
if (!body.isEmpty()) { |
|
|
|
@ -60,8 +61,8 @@ public class WcsTaskController { |
|
|
|
String dataChange = by.getDataChange(); |
|
|
|
String dataChange = by.getDataChange(); |
|
|
|
String priority = by.getPriority(); |
|
|
|
String priority = by.getPriority(); |
|
|
|
LambdaQueryWrapper<BusinDataTask> lqwDataTask = new LambdaQueryWrapper<BusinDataTask>() |
|
|
|
LambdaQueryWrapper<BusinDataTask> lqwDataTask = new LambdaQueryWrapper<BusinDataTask>() |
|
|
|
.eq(BusinDataTask::getContainerId, trayCode) |
|
|
|
.eq(BusinDataTask::getContainerCode, trayCode) |
|
|
|
.in(BusinDataTask::getTaskStatus, "1", "2"); |
|
|
|
.in(BusinDataTask::getTaskStatus, TaskStatusEnum.wait_put.getValue(),TaskStatusEnum.wait_callback.getValue() ); |
|
|
|
BusinDataTask one = iBusinDataTaskService.getOne(lqwDataTask); |
|
|
|
BusinDataTask one = iBusinDataTaskService.getOne(lqwDataTask); |
|
|
|
if (dataChange.equals("1")) { |
|
|
|
if (dataChange.equals("1")) { |
|
|
|
if (one != null) { |
|
|
|
if (one != null) { |
|
|
|
@ -70,9 +71,10 @@ public class WcsTaskController { |
|
|
|
BusinDataTask businDataTask = new BusinDataTask(); |
|
|
|
BusinDataTask businDataTask = new BusinDataTask(); |
|
|
|
businDataTask.setTaskCode(taskId); |
|
|
|
businDataTask.setTaskCode(taskId); |
|
|
|
businDataTask.setTaskType(taskType); |
|
|
|
businDataTask.setTaskType(taskType); |
|
|
|
businDataTask.setContainerId(Long.valueOf(trayCode)); |
|
|
|
businDataTask.setContainerCode(trayCode); |
|
|
|
businDataTask.setFromSide(fromBinCode); |
|
|
|
businDataTask.setFromSide(fromBinCode); |
|
|
|
businDataTask.setToSide(toBinCode); |
|
|
|
businDataTask.setToSide(toBinCode); |
|
|
|
|
|
|
|
businDataTask.setTaskStatus(TaskStatusEnum.wait_put.getValue()); |
|
|
|
businDataTask.setCreateTime(DateUtils.getNowDate()); |
|
|
|
businDataTask.setCreateTime(DateUtils.getNowDate()); |
|
|
|
if (!priority.isEmpty()){ |
|
|
|
if (!priority.isEmpty()){ |
|
|
|
businDataTask.setPriority(priority); |
|
|
|
businDataTask.setPriority(priority); |
|
|
|
@ -121,10 +123,10 @@ public class WcsTaskController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Log(title = "查询是否存在出库任务测试接口", businessType = BusinessType.UPDATE) |
|
|
|
@Log(title = "查询是否存在出库任务测试接口") |
|
|
|
@PostMapping("/toWzWcs/queryTaskStatus") |
|
|
|
@PostMapping("/toWzWcs/queryTaskStatus") |
|
|
|
@RepeatSubmit |
|
|
|
@RepeatSubmit |
|
|
|
public WcsResponseVo queryTaskStatus(WCSQueryTaskStatusBody body) { |
|
|
|
public WcsResponseVo queryTaskStatus(@RequestBody WCSQueryTaskStatusBody body) { |
|
|
|
WcsResponseVo vo = wcsUtil.queryTaskStatus(body); |
|
|
|
WcsResponseVo vo = wcsUtil.queryTaskStatus(body); |
|
|
|
return vo; |
|
|
|
return vo; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -133,7 +135,7 @@ public class WcsTaskController { |
|
|
|
@Log(title = "查询每个库区状态测试接口", businessType = BusinessType.UPDATE) |
|
|
|
@Log(title = "查询每个库区状态测试接口", businessType = BusinessType.UPDATE) |
|
|
|
@PostMapping("/toKjWcs/queryAreaStatus") |
|
|
|
@PostMapping("/toKjWcs/queryAreaStatus") |
|
|
|
@RepeatSubmit |
|
|
|
@RepeatSubmit |
|
|
|
public WcsResponseVo queryAreaStatus(WCSQueryAreaStatusDto dto) { |
|
|
|
public WcsResponseVo queryAreaStatus(@RequestBody WCSQueryAreaStatusDto dto) { |
|
|
|
//调用plc接口 暂时不用
|
|
|
|
//调用plc接口 暂时不用
|
|
|
|
WCSQueryAreaStatusDto wcsQueryAreaStatusDto = new WCSQueryAreaStatusDto(); |
|
|
|
WCSQueryAreaStatusDto wcsQueryAreaStatusDto = new WCSQueryAreaStatusDto(); |
|
|
|
List<WCSQueryAreaStatusBody> areaStatusBodyList = new ArrayList<>(); |
|
|
|
List<WCSQueryAreaStatusBody> areaStatusBodyList = new ArrayList<>(); |
|
|
|
@ -156,7 +158,7 @@ public class WcsTaskController { |
|
|
|
@Log(title = "任务状态上报测试接口", businessType = BusinessType.UPDATE) |
|
|
|
@Log(title = "任务状态上报测试接口", businessType = BusinessType.UPDATE) |
|
|
|
@PostMapping("/toWzWcs/uploadWCSTaskStatus") |
|
|
|
@PostMapping("/toWzWcs/uploadWCSTaskStatus") |
|
|
|
@RepeatSubmit |
|
|
|
@RepeatSubmit |
|
|
|
public WcsResponseVo uploadWCSTaskStatus(UploadWCSTaskStatusDto dto) { |
|
|
|
public WcsResponseVo uploadWCSTaskStatus(@RequestBody UploadWCSTaskStatusDto dto) { |
|
|
|
//调用plc接口 暂时不用
|
|
|
|
//调用plc接口 暂时不用
|
|
|
|
WcsResponseVo vo = wcsUtil.uploadWCSTaskStatus(dto); |
|
|
|
WcsResponseVo vo = wcsUtil.uploadWCSTaskStatus(dto); |
|
|
|
return vo; |
|
|
|
return vo; |
|
|
|
@ -166,7 +168,7 @@ public class WcsTaskController { |
|
|
|
@Log(title = "扫码处入库申请测试接口", businessType = BusinessType.UPDATE) |
|
|
|
@Log(title = "扫码处入库申请测试接口", businessType = BusinessType.UPDATE) |
|
|
|
@PostMapping("/toWzWcs/wcsIncomingTaskRequest") |
|
|
|
@PostMapping("/toWzWcs/wcsIncomingTaskRequest") |
|
|
|
@RepeatSubmit |
|
|
|
@RepeatSubmit |
|
|
|
public WcsResponseVo wcsIncomingTaskRequest(WcsIncomingTaskRequestDto dto) { |
|
|
|
public WcsResponseVo wcsIncomingTaskRequest(@RequestBody WcsIncomingTaskRequestDto dto) { |
|
|
|
//调用plc接口 暂时不用
|
|
|
|
//调用plc接口 暂时不用
|
|
|
|
WcsResponseVo vo = wcsUtil.wcsIncomingTaskRequest(dto); |
|
|
|
WcsResponseVo vo = wcsUtil.wcsIncomingTaskRequest(dto); |
|
|
|
return vo; |
|
|
|
return vo; |
|
|
|
@ -175,7 +177,7 @@ public class WcsTaskController { |
|
|
|
@Log(title = "生产区入库校验测试接口", businessType = BusinessType.UPDATE) |
|
|
|
@Log(title = "生产区入库校验测试接口", businessType = BusinessType.UPDATE) |
|
|
|
@PostMapping("/toWzWcs/wcsIncomingTrayCheck") |
|
|
|
@PostMapping("/toWzWcs/wcsIncomingTrayCheck") |
|
|
|
@RepeatSubmit |
|
|
|
@RepeatSubmit |
|
|
|
public WcsResponseVo wcsIncomingTrayCheck(WcsIncomingTrayCheckBody dto) { |
|
|
|
public WcsResponseVo wcsIncomingTrayCheck(@RequestBody WcsIncomingTrayCheckBody dto) { |
|
|
|
|
|
|
|
|
|
|
|
WcsResponseVo vo = wcsUtil.wcsIncomingTrayCheck(dto); |
|
|
|
WcsResponseVo vo = wcsUtil.wcsIncomingTrayCheck(dto); |
|
|
|
return vo; |
|
|
|
return vo; |
|
|
|
|