产线输送机
This commit is contained in:
@@ -42,7 +42,7 @@ public class Wcs2WmsController {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消ctu任务
|
* wms取消任务
|
||||||
* @param jobParam
|
* @param jobParam
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -50,4 +50,7 @@ public class Wcs2WmsController {
|
|||||||
public AjaxResult cancelMydoJob(@RequestBody JobParam jobParam) {
|
public AjaxResult cancelMydoJob(@RequestBody JobParam jobParam) {
|
||||||
return apiService.cancelMydoJob(jobParam);
|
return apiService.cancelMydoJob(jobParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,4 +13,7 @@ public class ReceiveJob {
|
|||||||
private String exitId;
|
private String exitId;
|
||||||
private String trayCode;
|
private String trayCode;
|
||||||
private String entranceId;
|
private String entranceId;
|
||||||
|
private String inOrOut;
|
||||||
|
private String jobId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ public interface IApiService
|
|||||||
*/
|
*/
|
||||||
AjaxResult cancelMydoJob(JobParam jobParam);
|
AjaxResult cancelMydoJob(JobParam jobParam);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 放货有货,重新分配货位
|
* 放货有货,重新分配货位
|
||||||
* @param jobParam
|
* @param jobParam
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.api.service.impl;
|
package com.ruoyi.api.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
@@ -18,6 +19,7 @@ import com.ruoyi.api.domain.wcs2wms.JobParam;
|
|||||||
import com.ruoyi.api.domain.wcs2wms.ReceiveJob;
|
import com.ruoyi.api.domain.wcs2wms.ReceiveJob;
|
||||||
import com.ruoyi.api.service.IApiService;
|
import com.ruoyi.api.service.IApiService;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.job.domain.MydoJob;
|
import com.ruoyi.job.domain.MydoJob;
|
||||||
import com.ruoyi.job.service.IMydoJobService;
|
import com.ruoyi.job.service.IMydoJobService;
|
||||||
import com.ruoyi.queue.agv.domain.AgvQueue;
|
import com.ruoyi.queue.agv.domain.AgvQueue;
|
||||||
@@ -187,26 +189,24 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult cancelMydoJob(JobParam jobParam) {
|
public AjaxResult cancelMydoJob(JobParam jobParam) {
|
||||||
AgvQueue param = new AgvQueue();
|
|
||||||
param.setWmsTaskNo(jobParam.getTaskNo());
|
|
||||||
for (AgvQueue agvQueue : agvQueueService.selectAgvQueueList(param)) {
|
|
||||||
CancelTaskRequest cancelTaskRequest = new CancelTaskRequest();
|
|
||||||
cancelTaskRequest.setTaskCode(agvQueue.getTaskCode());
|
|
||||||
CancelTaskResponse cancelTaskResponse = cancelTask(cancelTaskRequest);
|
|
||||||
if (cancelTaskResponse.getCode() == 0) {
|
|
||||||
agvQueue.setStatus("5");
|
|
||||||
agvQueueService.updateAgvQueue(agvQueue);
|
|
||||||
//插入历史
|
|
||||||
agvQueueService.insertHistory(agvQueue.getReqCode());
|
|
||||||
//删除队列
|
|
||||||
agvQueueService.deleteAgvQueueByReqCode(agvQueue.getReqCode());
|
|
||||||
log.info("【AGV任务单取消】 wms任务号:{} agv任务号:{}", agvQueue.getWmsTaskNo(), agvQueue.getTaskCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(Convert.toLong(jobParam.getTaskNo()));
|
||||||
|
if(mydoJob==null){
|
||||||
|
return AjaxResult.error("任务不存在");
|
||||||
|
}
|
||||||
|
if("1".equals(mydoJob.getStatus())){
|
||||||
|
mydoJob.setStatus("5");
|
||||||
|
mydoJobService.insertHistory(mydoJob.getJobId());
|
||||||
|
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
||||||
|
return AjaxResult.success();
|
||||||
|
}else{
|
||||||
|
return AjaxResult.error("任务已开始");
|
||||||
}
|
}
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult reAssign(JobParam jobParam) {
|
public AjaxResult reAssign(JobParam jobParam) {
|
||||||
RequestLog requestLog = requestLogService.getRequestLog(RE_ASSIGN_URL, "重新分配货位", JSONUtil.toJsonStr(jobParam));
|
RequestLog requestLog = requestLogService.getRequestLog(RE_ASSIGN_URL, "重新分配货位", JSONUtil.toJsonStr(jobParam));
|
||||||
@@ -347,7 +347,22 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult receiveOutMydoJob(ReceiveJob receiveOutJob) {
|
public AjaxResult receiveOutMydoJob(ReceiveJob receiveOutJob) {
|
||||||
return null;
|
MydoJob mydoJob = new MydoJob();
|
||||||
|
mydoJob.setJobId(receiveOutJob.getJobId());
|
||||||
|
mydoJob.setTaskNo(receiveOutJob.getTaskNo());
|
||||||
|
mydoJob.setCargoSpaceId(receiveOutJob.getCargoSpaceId());
|
||||||
|
mydoJob.setExitId(receiveOutJob.getExitId());
|
||||||
|
mydoJob.setInOrOut(receiveOutJob.getInOrOut());
|
||||||
|
mydoJob.setStatus("1");
|
||||||
|
mydoJob.setTrayCode(receiveOutJob.getTrayCode());
|
||||||
|
mydoJob.setCreateTime(DateUtils.getNowDate());
|
||||||
|
int i = mydoJobService.insertMydoJob(mydoJob);
|
||||||
|
if (i > 0) {
|
||||||
|
return AjaxResult.success();
|
||||||
|
}else{
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user