1. 更新优化
This commit is contained in:
parent
74a83f2927
commit
9995ed8d02
|
|
@ -179,10 +179,10 @@ public class JobComponent {
|
|||
// 轮询工作站台,判断是否需要下发任务
|
||||
List<Stand> stands = standService.list(new LambdaQueryWrapper<Stand>()
|
||||
.eq(Stand::getIsLock, 0).eq(Stand::getStandStatus, 0)
|
||||
.eq(Stand::getStandType, 2));
|
||||
.eq(Stand::getStandType, 2).orderByAsc(Stand::getStandId));
|
||||
for (Stand workStation : stands) {
|
||||
try {
|
||||
// // 创建工作
|
||||
// 创建工作
|
||||
// workService.createWork(workStation.getStandId());
|
||||
// 分配工作
|
||||
workService.distributeWorks(workStation.getStandId());
|
||||
|
|
|
|||
|
|
@ -1635,7 +1635,7 @@ public class TaskController {
|
|||
if (workFlowService.exists(new LambdaQueryWrapper<WorkFlow>()
|
||||
.eq(WorkFlow::getWorkStation, standId)
|
||||
.in(WorkFlow::getGoodsId, goodsIdList)
|
||||
.ne(WorkFlow::getWorkStatus, 2))) {
|
||||
.notIn(WorkFlow::getWorkStatus, -1, 2))) {
|
||||
// 需要,不放行,返回前台提示信息
|
||||
StandPickVo pickVoEntity = new StandPickVo();
|
||||
pickVoEntity.setTip("当前料箱还有其他物料需要拣货");
|
||||
|
|
@ -1659,7 +1659,7 @@ public class TaskController {
|
|||
// 判断是不是已经完成工作
|
||||
if (workFlowService.exists(new LambdaQueryWrapper<WorkFlow>()
|
||||
.eq(WorkFlow::getWorkStation, standId)
|
||||
.ne(WorkFlow::getWorkStatus, 2))) {
|
||||
.notIn(WorkFlow::getWorkStatus, -1, 2))) {
|
||||
// 当前站台工作未全部完成
|
||||
standService.update(new LambdaUpdateWrapper<Stand>()
|
||||
.set(Stand::getLastUseTime, LocalDateTime.now())
|
||||
|
|
@ -1698,7 +1698,7 @@ public class TaskController {
|
|||
// 判断是不是已经完成工作
|
||||
if (workFlowService.exists(new LambdaQueryWrapper<WorkFlow>()
|
||||
.eq(WorkFlow::getWorkStation, standId)
|
||||
.ne(WorkFlow::getWorkStatus, 2))) {
|
||||
.notIn(WorkFlow::getWorkStatus, -1, 2))) {
|
||||
// 当前站台工作未全部完成
|
||||
standService.update(new LambdaUpdateWrapper<Stand>()
|
||||
.set(Stand::getLastUseTime, LocalDateTime.now())
|
||||
|
|
@ -1815,7 +1815,7 @@ public class TaskController {
|
|||
if (workFlowService.exists(new LambdaQueryWrapper<WorkFlow>()
|
||||
.eq(WorkFlow::getWorkStation, targetStand.getStandId())
|
||||
.in(WorkFlow::getGoodsId, goodsIdList)
|
||||
.ne(WorkFlow::getWorkStatus, 2))) {
|
||||
.notIn(WorkFlow::getWorkStatus, -1, 2))) {
|
||||
// 更新站台信息
|
||||
standService.update(new LambdaUpdateWrapper<Stand>()
|
||||
.set(Stand::getPickGoods, "")
|
||||
|
|
@ -1837,7 +1837,7 @@ public class TaskController {
|
|||
// 判断是不是已经完成工作
|
||||
if (workFlowService.exists(new LambdaQueryWrapper<WorkFlow>()
|
||||
.eq(WorkFlow::getWorkStation, targetStand.getStandId())
|
||||
.ne(WorkFlow::getWorkStatus, 2))) {
|
||||
.notIn(WorkFlow::getWorkStatus, -1, 2))) {
|
||||
standService.update(new LambdaUpdateWrapper<Stand>()
|
||||
.set(Stand::getLastUseTime, LocalDateTime.now())
|
||||
.set(Stand::getPickVehicle, "")
|
||||
|
|
@ -1873,7 +1873,7 @@ public class TaskController {
|
|||
// 判断是不是已经完成工作
|
||||
if (workFlowService.exists(new LambdaQueryWrapper<WorkFlow>()
|
||||
.eq(WorkFlow::getWorkStation, targetStand.getStandId())
|
||||
.ne(WorkFlow::getWorkStatus, 2))) {
|
||||
.notIn(WorkFlow::getWorkStatus, -1, 2))) {
|
||||
// 当前站台工作未全部完成
|
||||
standService.update(new LambdaUpdateWrapper<Stand>()
|
||||
.set(Stand::getLastUseTime, LocalDateTime.now())
|
||||
|
|
|
|||
|
|
@ -267,7 +267,6 @@ public class WorkServiceImplements implements IWorkService {
|
|||
List<WorkFlow> currentWorkFlowList = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
.eq(WorkFlow::getWorkStation, workStation)
|
||||
.notIn(WorkFlow::getWorkStatus, -1, 2));
|
||||
// .ne(WorkFlow::getWorkStatus, 2));
|
||||
// 没有可做的任务
|
||||
if (currentWorkFlowList == null || currentWorkFlowList.isEmpty()) {
|
||||
return;
|
||||
|
|
@ -459,8 +458,7 @@ public class WorkServiceImplements implements IWorkService {
|
|||
try {
|
||||
if (workFlowService.exists(new LambdaQueryWrapper<WorkFlow>()
|
||||
.eq(WorkFlow::getWorkStation, workStation)
|
||||
.notIn(WorkFlow::getWorkStatus, -1, 2)
|
||||
.ne(WorkFlow::getWorkStatus, 2))) {
|
||||
.notIn(WorkFlow::getWorkStatus, -1, 2))) {
|
||||
// 当前站台工作未全部完成
|
||||
return "工作未全部做完,不允许确认完成。";
|
||||
}
|
||||
|
|
@ -817,6 +815,14 @@ public class WorkServiceImplements implements IWorkService {
|
|||
// 仍有未生成的平地机任务,跳过
|
||||
return;
|
||||
}
|
||||
List<WorkFlow> doingMgWorkFlows = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
.eq(WorkFlow::getWorkStation, workStation)
|
||||
.eq(WorkFlow::getMachineType, 2)
|
||||
.ne(WorkFlow::getWorkStatus, -1));
|
||||
if (!doingMgWorkFlows.isEmpty()) {
|
||||
// 当前站台平地机正在做
|
||||
return;
|
||||
}
|
||||
// 查询装载机
|
||||
List<WorkFlow> mwlWorks = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
.eq(WorkFlow::getMachineType, 1)
|
||||
|
|
@ -851,6 +857,14 @@ public class WorkServiceImplements implements IWorkService {
|
|||
// 仍有未生成的装载机任务,跳过
|
||||
return;
|
||||
}
|
||||
List<WorkFlow> doingMwlWorkFlows = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
.eq(WorkFlow::getWorkStation, workStation)
|
||||
.eq(WorkFlow::getMachineType, 1)
|
||||
.ne(WorkFlow::getWorkStatus, -1));
|
||||
if (!doingMwlWorkFlows.isEmpty()) {
|
||||
// 当前站台装载机正在做
|
||||
return;
|
||||
}
|
||||
// 查询平地机
|
||||
List<WorkFlow> mgWorks = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
.eq(WorkFlow::getMachineType, 2)
|
||||
|
|
@ -1055,7 +1069,7 @@ public class WorkServiceImplements implements IWorkService {
|
|||
}
|
||||
// 查找当前站台未开始的工作流
|
||||
List<WorkFlow> currentWorkFlowList = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
.ne(WorkFlow::getWorkStatus, 2)
|
||||
.notIn(WorkFlow::getWorkStatus, -1, 2)
|
||||
.in(WorkFlow::getWorkStation, standIds));
|
||||
// 没有可做的任务
|
||||
if (currentWorkFlowList == null || currentWorkFlowList.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user