2025年5月14日09:53:13

1.修改
main
liuao 1 week ago
parent 0714a2f1bb
commit 48ef91f490
  1. 7
      src/main/java/com/zilber/boot/intelligencesite/schedule/ResourceSchedules.java
  2. 2
      src/main/resources/mappers/IWarnMapper.xml

@ -64,7 +64,7 @@ public class ResourceSchedules {
//如果出现异常,初始化标度
expenses = 5;
}
//查询计划开始时间小于当前时间,计划结束时间大于当前时间的parentId为0的计划以及当前进度
//查询计划开始时间小于当前时间的parentId为0的计划以及当前进度
List<PlanDTO> planDTOS = resourceScheduleMapper.listCheckedPlan(now);
//删除之前的数据
rsService.removeAll();
@ -75,13 +75,12 @@ public class ResourceSchedules {
log.info("计划\"" + plan.getPlanName() + "\"进度较慢");
rsService.save(productionPlan(plan, now, Info.PRODUCTION_PLAN_SLOW.getMessage()));
warnService.save(warn(plan, now, Info.WARN_SLOW.getMessage()));
log.info("计划\"" + plan.getPlanName() + "\"进度更新完毕");
}
else if ( plan.getAccumulativeProgress() >= plan.getDiff() + expenses){//进度快
log.info("计划\"" + plan.getPlanName() + "\"进度更新完毕");
log.info("计划\"" + plan.getPlanName() + "\"进度较快");
rsService.save(productionPlan(plan, now, Info.PRODUCTION_PLAN_QUICK.getMessage()));
log.info("计划\"" + plan.getPlanName() + "\"进度较慢");
}
log.info("计划\"" + plan.getPlanName() + "\"进度更新完毕");
}
Date end = new Date();
log.info("全部计划进度更新已完毕:" + sdf.format(end));

@ -38,7 +38,7 @@ id, plan_id, plan_name, deviation_type, deviation_days, warn_info, create_time,
ipn.start_time,
ipn.end_time
FROM
i_warn iw left join i_production_plan ipn on iw.plan_id=ipn.id
i_warn iw inner join i_production_plan ipn on iw.plan_id=ipn.id
<where>
<if test="planId != null"> and plan_id=#{planId}</if>
<if test="planName != null and planName != ''"> and iw.plan_name like concat('%', #{planName}, '%')</if>

Loading…
Cancel
Save