优化对外接口参数
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.api.controller;
|
||||
|
||||
import com.ruoyi.api.domain.wcs2wms.MydoJob;
|
||||
import com.ruoyi.api.domain.wcs2wms.JobParam;
|
||||
import com.ruoyi.api.domain.wcs2wms.ReceiveJob;
|
||||
import com.ruoyi.api.service.IApiService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -19,44 +20,43 @@ public class Wcs2WmsController {
|
||||
/**
|
||||
* 接收出库任务
|
||||
*
|
||||
* @param mydoJob
|
||||
* @param receiveOutJob
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/receiveOutMydoJob")
|
||||
public AjaxResult receiveOutMydoJob(@RequestBody MydoJob mydoJob) {
|
||||
return apiService.receiveOutMydoJob(mydoJob);
|
||||
public AjaxResult receiveOutMydoJob(@RequestBody ReceiveJob receiveOutJob) {
|
||||
return apiService.receiveOutMydoJob(receiveOutJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 接收流利架空料箱入库任务
|
||||
*
|
||||
* @param mydoJob
|
||||
* @param receiveInJob
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/receiveInMydoJob")
|
||||
public AjaxResult receiveInMydoJob(@RequestBody MydoJob mydoJob) {
|
||||
return apiService.receiveInMydoJob(mydoJob);
|
||||
public AjaxResult receiveInMydoJob(@RequestBody ReceiveJob receiveInJob) {
|
||||
return apiService.receiveInMydoJob(receiveInJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流利架出库确认,清空状态记录表
|
||||
*
|
||||
* @param mydoJob
|
||||
* @param jobParam
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/outMydojobMakesure")
|
||||
public AjaxResult outMydojobMakesure(@RequestBody MydoJob mydoJob) {
|
||||
return apiService.outMydojobMakesure(mydoJob);
|
||||
public AjaxResult outMydojobMakesure(@RequestBody JobParam jobParam) {
|
||||
return apiService.outMydojobMakesure(jobParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消ctu任务
|
||||
*
|
||||
* @param mydoJob
|
||||
* @param jobParam
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/cancelMydoJob")
|
||||
public AjaxResult cancelMydoJob(@RequestBody MydoJob mydoJob) {
|
||||
return apiService.cancelMydoJob(mydoJob);
|
||||
public AjaxResult cancelMydoJob(@RequestBody JobParam jobParam) {
|
||||
return apiService.cancelMydoJob(jobParam);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.api.domain.wcs2wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class JobParam {
|
||||
private String jobId;
|
||||
private String trayCode;
|
||||
private String taskNo;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.api.domain.wcs2wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ReceiveJob {
|
||||
private String taskNo;
|
||||
private String cargoSpaceId;
|
||||
private String exitId;
|
||||
private String trayCode;
|
||||
private String entranceId;
|
||||
}
|
||||
@@ -9,11 +9,12 @@ import com.ruoyi.api.domain.agv.continueTask.ContinueTaskRequest;
|
||||
import com.ruoyi.api.domain.agv.continueTask.ContinueTaskResponse;
|
||||
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskRequest;
|
||||
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
|
||||
import com.ruoyi.api.domain.wcs2wms.JobParam;
|
||||
import com.ruoyi.api.domain.wcs2wms.MydoJob;
|
||||
import com.ruoyi.api.domain.wcs2wms.ReceiveJob;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.device.agv.domain.AgvQueue;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -42,9 +43,9 @@ public interface IApiService
|
||||
|
||||
/**
|
||||
* WMS出库任务推送
|
||||
* @param mydoJob
|
||||
* @param receiveOutJob
|
||||
*/
|
||||
public AjaxResult receiveOutMydoJob(MydoJob mydoJob);
|
||||
public AjaxResult receiveOutMydoJob(ReceiveJob receiveOutJob);
|
||||
|
||||
/**
|
||||
* 生成agv队列
|
||||
@@ -129,20 +130,20 @@ public interface IApiService
|
||||
public GenAgvSchedulingTaskResponse requestAgvQueue(AgvQueue agvQueue);
|
||||
/**
|
||||
* WMS流利架入库任务推送
|
||||
* @param mydoJob
|
||||
* @param receiveInJob
|
||||
*/
|
||||
AjaxResult receiveInMydoJob(MydoJob mydoJob);
|
||||
AjaxResult receiveInMydoJob(ReceiveJob receiveInJob);
|
||||
|
||||
/**
|
||||
* 流利架状态清空表
|
||||
* @param mydoJob
|
||||
* @param jobParam
|
||||
* @return
|
||||
*/
|
||||
AjaxResult outMydojobMakesure(MydoJob mydoJob);
|
||||
AjaxResult outMydojobMakesure(JobParam jobParam);
|
||||
/**
|
||||
* 取消ctu任务
|
||||
* @param mydoJob
|
||||
* @param jobParam
|
||||
* @return
|
||||
*/
|
||||
AjaxResult cancelMydoJob(MydoJob mydoJob);
|
||||
AjaxResult cancelMydoJob(JobParam jobParam);
|
||||
}
|
||||
|
||||
@@ -17,14 +17,15 @@ import com.ruoyi.api.domain.agv.continueTask.ContinueTaskResponse;
|
||||
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskRequest;
|
||||
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
|
||||
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.PositionCodeData;
|
||||
import com.ruoyi.api.domain.wcs2wms.JobParam;
|
||||
import com.ruoyi.api.domain.wcs2wms.MydoJob;
|
||||
import com.ruoyi.api.domain.wcs2wms.ReceiveJob;
|
||||
import com.ruoyi.api.service.IApiService;
|
||||
import com.ruoyi.bas.fluent.domain.BasFluentFrame;
|
||||
import com.ruoyi.bas.fluent.service.IBasFluentFrameService;
|
||||
import com.ruoyi.bas.port.domain.WcsPort;
|
||||
import com.ruoyi.bas.port.service.IWcsPortService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.device.agv.domain.AgvQueue;
|
||||
import com.ruoyi.device.agv.service.IAgvQueueService;
|
||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||
@@ -375,14 +376,14 @@ public class ApiServiceImpl implements IApiService {
|
||||
|
||||
/**
|
||||
* 推送AGV任务
|
||||
* @param mydoJob
|
||||
* @param receiveOutJob
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult receiveOutMydoJob(MydoJob mydoJob) {
|
||||
AgvQueue agvQueue = createAgvQueue(mydoJob.getCargoSpaceId(),mydoJob.getExitId(),mydoJob.getTrayCode(),mydoJob.getTaskNo(),"2");
|
||||
public AjaxResult receiveOutMydoJob(ReceiveJob receiveOutJob) {
|
||||
AgvQueue agvQueue = createAgvQueue(receiveOutJob.getCargoSpaceId(),receiveOutJob.getExitId(),receiveOutJob.getTrayCode(),receiveOutJob.getTaskNo(),"2");
|
||||
if (agvQueue != null){
|
||||
return AjaxResult.success(agvQueue);
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
return AjaxResult.error("生成agv任务失败");
|
||||
}
|
||||
@@ -390,14 +391,14 @@ public class ApiServiceImpl implements IApiService {
|
||||
/**
|
||||
* 接收流利架空料箱入库任务
|
||||
*
|
||||
* @param mydoJob
|
||||
* @param receiveInJob
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult receiveInMydoJob(MydoJob mydoJob) {
|
||||
AgvQueue agvQueue = createAgvQueue(mydoJob.getEntranceId(),mydoJob.getCargoSpaceId(),mydoJob.getTrayCode(),mydoJob.getTaskNo(),"1");
|
||||
public AjaxResult receiveInMydoJob(ReceiveJob receiveInJob) {
|
||||
AgvQueue agvQueue = createAgvQueue(receiveInJob.getEntranceId(),receiveInJob.getCargoSpaceId(),receiveInJob.getTrayCode(),receiveInJob.getTaskNo(),"1");
|
||||
if (agvQueue != null){
|
||||
return AjaxResult.success(agvQueue);
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
return AjaxResult.error("生成agv任务失败");
|
||||
}
|
||||
@@ -405,13 +406,13 @@ public class ApiServiceImpl implements IApiService {
|
||||
|
||||
/**
|
||||
* 流利架出库确认,清空流利架状态信息
|
||||
* @param mydoJob
|
||||
* @param jobParam
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult outMydojobMakesure(MydoJob mydoJob) {
|
||||
public AjaxResult outMydojobMakesure(JobParam jobParam) {
|
||||
BasFluentFrame param = new BasFluentFrame();
|
||||
param.setTrayCode(mydoJob.getTrayCode());
|
||||
param.setTrayCode(jobParam.getTrayCode());
|
||||
List<BasFluentFrame> basFluentFrames = fluentFrameService.selectBasFluentFrameList(param);
|
||||
if (CollUtil.isEmpty(basFluentFrames)){
|
||||
return AjaxResult.error("无流利架信息");
|
||||
@@ -425,13 +426,13 @@ public class ApiServiceImpl implements IApiService {
|
||||
/**
|
||||
* 取消ctu任务
|
||||
*
|
||||
* @param mydoJob
|
||||
* @param jobParam
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult cancelMydoJob(MydoJob mydoJob) {
|
||||
public AjaxResult cancelMydoJob(JobParam jobParam) {
|
||||
AgvQueue param = new AgvQueue();
|
||||
param.setWmsTaskNo(mydoJob.getTaskNo());
|
||||
param.setWmsTaskNo(jobParam.getTaskNo());
|
||||
for (AgvQueue agvQueue : agvQueueService.selectAgvQueueList(param)) {
|
||||
CancelTaskRequest cancelTaskRequest = new CancelTaskRequest();
|
||||
cancelTaskRequest.setTaskCode(agvQueue.getTaskCode());
|
||||
|
||||
Reference in New Issue
Block a user