一楼出库调度修改

This commit is contained in:
liuhanqing
2025-09-29 15:31:02 +08:00
parent 45019e66df
commit 764e9ee031
3 changed files with 12 additions and 8 deletions

View File

@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 启动程序
@@ -11,6 +12,7 @@ import org.springframework.context.annotation.ComponentScan;
* @author ruoyi
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@EnableScheduling
public class RuoYiApplication
{
public static void main(String[] args)

View File

@@ -1,6 +1,7 @@
package com.ruoyi.api.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.json.JSONUtil;
import com.ruoyi.api.domain.AgvMoveParam;
@@ -14,6 +15,7 @@ import com.ruoyi.job.mydojob.service.IMydoJobService;
import com.ruoyi.log.domain.RequestLog;
import com.ruoyi.log.service.IRequestLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import java.util.*;
@@ -38,6 +40,7 @@ public class ToWcsServiceImpl implements IToWcsService {
@Override
@Scheduled(fixedDelay=1500)
public void pushOutMydoJob() {
//查询所有未推送的料箱出库作业
MydoJob mydoJobParam = new MydoJob();
@@ -49,8 +52,9 @@ public class ToWcsServiceImpl implements IToWcsService {
for (MydoJob outMydoJob : outMydoJobs) {
RequestLog requestLog = requestLogService.getRequestLog(PUSH_OUT_MYDO_JOB, JSONUtil.toJsonStr(outMydoJob), "推送出库任务");
if ("1".equals(requestLog.getIsSuccessful())){
outMydoJob.setStatus("2");
//outMydoJob.setStartTime(DateUtil.formatDateTime(DateUtil.date()));
outMydoJob.setStatus("3");
outMydoJob.setExecutionPhase("1");
outMydoJob.setStartTime(DateUtil.formatDateTime(new Date()));
mydoJobService.updateMydoJob(outMydoJob);
}
}

View File

@@ -192,6 +192,7 @@ public class ToWmsServiceImpl implements IToWmsService {
mydoJob.setTrayCode(basJobIdService.getJobId("TP"));
mydoJob.setWarehouseId("01");
mydoJob.setRoadwayId(getRoadway(size));
mydoJob.setLineId(erpBill);
BasRoadway basRoadway = basRoadwayService.selectBasRoadwayById(mydoJob.getRoadwayId());
if ("1".equals(requestEnter.getFloor())) {
if ("Y".equals(basRoadway.getInLocked())) {
@@ -353,18 +354,15 @@ public class ToWmsServiceImpl implements IToWmsService {
mydoJobService.manualCompleted(inMydoJob, 1);
break;
case "2":
if (StrUtil.isEmpty(wmsJobRequest.getPickSsj())) {
return AjaxResult.error(MessageUtils.message("error.message3"));
}
if (StrUtil.isEmpty(wmsJobRequest.getTaskNo())) {
return AjaxResult.error(MessageUtils.message("error.message2"));
return AjaxResult.error("任务号不能为空");
}
//出库
mydoJobParam.setTaskNo(wmsJobRequest.getTaskNo());
//mydoJobParam.setTrayCode(wmsJobRequest.getTrayCode());
List<MydoJob> outMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
if (outMydoJobs.isEmpty()) {
return AjaxResult.error(MessageUtils.message("warn.message"));
return AjaxResult.error("任务不存在");
}
MydoJob outJob = outMydoJobs.get(0);
outJob.setExecutionPhase("2");