2025-2-24 设备点检问题

master
元气满满
parent 35399d7b1b
commit 1d22190911

@ -265,18 +265,33 @@ public class DeviceTaskServiceImpl implements IDeviceTaskService {
EquPlan equPlan = new EquPlan();
equPlan.setPlanType("spotInspection");
List<EquPlan> plans = deviceTaskMapper.getPlans(equPlan);
List<EquPlan> producePlans = this.confirmPlanProduceLine(plans,poolName);
for (EquPlan plan : producePlans) {
EquOrder hasTask = deviceTaskMapper.getNewTaskOrder(plan);
if (hasTask == null || Integer.parseInt(plan.getPlanLoop()) <= hasTask.getDays() || checkHourTask(hasTask, plan)) {
//生成点检计划
int m = this.createOrderPlan(plan);
if (m == 0) {
error("equ_order相关添加失败");
logger.info("++++++++++++" + poolName + "++++需要点检的++++++++++"+plans);
if(poolName.equals("ds_1000")){
List<EquPlan> producePlans = this.confirmPlanProduceLine(plans,poolName);//日点检 无产线计划 不生成点检工单
logger.info("++++++++++++" + poolName + "++++需要点检的++++++++++"+producePlans);
for (EquPlan plan : producePlans) {
EquOrder hasTask = deviceTaskMapper.getNewTaskOrder(plan);
if (hasTask == null || Integer.parseInt(plan.getPlanLoop()) <= hasTask.getDays() || checkHourTask(hasTask, plan)) {
//生成点检计划
int m = this.createOrderPlan(plan);
if (m == 0) {
error("equ_order相关添加失败");
}
}
}
}else{
for (EquPlan plan : plans) {
EquOrder hasTask = deviceTaskMapper.getNewTaskOrder(plan);
if (hasTask == null || Integer.parseInt(plan.getPlanLoop()) <= hasTask.getDays() || checkHourTask(hasTask, plan)) {
//生成点检计划
int m = this.createOrderPlan(plan);
if (m == 0) {
error("equ_order相关添加失败");
}
}
}
}
logger.info("++++++++++++" + poolName + "++++点检结束++++++++++");
}

Loading…
Cancel
Save