任务表查询排序
This commit is contained in:
@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.List;
|
||||
|
||||
import static com.ruoyi.common.TaskExceptionType.TASK_EXCEPTION_STOCKIN_OCCUPIED;
|
||||
@@ -68,7 +69,7 @@ public class TaskHandler {
|
||||
*/
|
||||
//@Scheduled(fixedDelay = 3000)
|
||||
public void cancelMydoJob(){
|
||||
List<MydoJob> jobs = mydoJobService.selectInOrOutMydoJobList(
|
||||
List<MydoJob> jobs = mydoJobService.selectMydoJobList(
|
||||
new MydoJob().builder().status(TASK_STATUS_INVALID).build()
|
||||
);
|
||||
|
||||
@@ -85,7 +86,7 @@ public class TaskHandler {
|
||||
*/
|
||||
//@Scheduled(fixedDelay = 3000)
|
||||
public void finishMydoJob(){
|
||||
List<MydoJob> jobs = mydoJobService.selectInOrOutMydoJobList(
|
||||
List<MydoJob> jobs = mydoJobService.selectMydoJobList(
|
||||
new MydoJob().builder().status(TASK_STATUS_FINISH_MANUAL).build()
|
||||
);
|
||||
|
||||
@@ -111,7 +112,7 @@ public class TaskHandler {
|
||||
*/
|
||||
@Scheduled(fixedDelay = DEFAULTTIMEINTERVAL)
|
||||
public void stockinExceptionHandler() {
|
||||
List<MydoJob> jobs = mydoJobService.selectInOrOutMydoJobList(
|
||||
List<MydoJob> jobs = mydoJobService.selectMydoJobList(
|
||||
new MydoJob().builder().executionPhase(TASK_EXCEPTION_PUT).build()
|
||||
);
|
||||
|
||||
@@ -162,7 +163,7 @@ public class TaskHandler {
|
||||
*/
|
||||
@Scheduled(fixedDelay = DEFAULTTIMEINTERVAL)
|
||||
public void stockoutExceptionHandler() {
|
||||
List<MydoJob> jobs = mydoJobService.selectInOrOutMydoJobList(
|
||||
List<MydoJob> jobs = mydoJobService.selectMydoJobList(
|
||||
new MydoJob().builder().executionPhase(TASK_EXCEPTION_PICK).build()
|
||||
);
|
||||
|
||||
@@ -201,25 +202,47 @@ public class TaskHandler {
|
||||
*/
|
||||
@Scheduled(fixedDelay = DEFAULTTIMEINTERVAL)
|
||||
public void sendTaskForStacker(){
|
||||
List<MydoJob> jobs = mydoJobService.selectInOrOutMydoJobList(
|
||||
List<MydoJob> jobs = mydoJobService.selectMydoJobList(
|
||||
new MydoJob().builder().executionPhase(TASK_EXCEPTION_PUT_REASSIGN).build()
|
||||
);
|
||||
|
||||
if (!jobs.isEmpty()) {
|
||||
for (MydoJob job : jobs) {
|
||||
//获取重分的货位重新向堆垛机下发任务
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByWmsCargoSpaceId(job.getCargoSpaceId());
|
||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueue =
|
||||
ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(Long.valueOf(job.getTaskNo()), Integer.valueOf(job.getRoadwayId()));
|
||||
ddjDeviceExecutionQueue.setMbph(basCargoSpace.getThePlatoon());
|
||||
ddjDeviceExecutionQueue.setMblh(basCargoSpace.getTheColumn());
|
||||
ddjDeviceExecutionQueue.setMbch(basCargoSpace.getTheFloor());
|
||||
ddjDeviceExecutionQueue.setDdjxf("0");
|
||||
ddjDeviceExecutionQueueService.updateDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
|
||||
stackerTask(job);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新堆垛机任务队列 - 异常盘点重新下发
|
||||
* @param mydoJob
|
||||
*/
|
||||
public void stackerTask(MydoJob mydoJob) {
|
||||
//获取重分的货位重新向堆垛机下发任务
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByWmsCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueue =
|
||||
ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(Long.valueOf(mydoJob.getTaskNo()), Integer.valueOf(mydoJob.getRoadwayId()));
|
||||
ddjDeviceExecutionQueue.setMbph(basCargoSpace.getThePlatoon());
|
||||
ddjDeviceExecutionQueue.setMblh(basCargoSpace.getTheColumn());
|
||||
ddjDeviceExecutionQueue.setMbch(basCargoSpace.getTheFloor());
|
||||
ddjDeviceExecutionQueue.setDdjxf("0");
|
||||
ddjDeviceExecutionQueueService.updateDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询正在执行的堆垛机队列是否为遗留记录 - 清理遗留队列数据
|
||||
*/
|
||||
// @Scheduled(fixedDelay = 30000)
|
||||
public void clearStackerQueue(){
|
||||
// ddjDeviceExecutionQueueService.se
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void mpTest(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user