Commit d03aa7ec authored by chenzhao's avatar chenzhao

修改外部计划状态校验

parent 9a37b718
......@@ -378,22 +378,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
continue;
paramMap.clear();
paramMap.put("id", plan.getId());
// 2.1计划数据合法性校验
Boolean fileFlag = PlanTaskUtil.checkMustFile(plan);
if (!fileFlag) {
paramMap.put("next_gen_date", tomorrow);
planMapper.updPlanStatusOrGenDate(paramMap);// 更新为明天
continue;
}
// 2.2.计算生成数据的日期区间
CalDateVo vo = PlanTaskUtil.reGenPlanTaskData(plan, tomorrow, tomorrow);
// 计划未开始,则更新生成时间为明天
if (null == vo) {
paramMap.put("next_gen_date", tomorrow);
planMapper.updPlanStatusOrGenDate(paramMap);// 更新为明天
continue;
}
// 计划已过期,则更新status = 7,已完成
if (!vo.getIsGenData()) {
int num = 0;
......@@ -413,9 +400,28 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
paramMap.put("status", PlanStatusEnum.COMPLETED.getValue());
}
}
if (plan.getIsFixedDate().equals("2")){
paramMap.put("status", PlanStatusEnum.OUT_TIME.getValue());
planMapper.updPlanStatusOrGenDate(paramMap);
continue;
}
planMapper.updPlanStatusOrGenDate(paramMap);
continue;
}
// 2.1计划数据合法性校验
Boolean fileFlag = PlanTaskUtil.checkMustFile(plan);
if (!fileFlag) {
paramMap.put("next_gen_date", tomorrow);
planMapper.updPlanStatusOrGenDate(paramMap);// 更新为明天
continue;
}
// 计划未开始,则更新生成时间为明天
if (null == vo) {
paramMap.put("next_gen_date", tomorrow);
planMapper.updPlanStatusOrGenDate(paramMap);// 更新为明天
continue;
}
// 2.3.执行数据生成(具体时间 + 人员)
List<HashMap<String, Object>> list = genAllExeDate(plan, vo, XJConstant.SCHED_FLAG);
......@@ -757,7 +763,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
ReginParams reginParam = JSON.parseObject(redisUtils
.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(),
ReginParams.class);
params.put("loginUserId", reginParam.getPersonIdentity().getPersonSeq());
// params.put("loginUserId", reginParam.getPersonIdentity().getPersonSeq());
long total = planTaskMapper.getPlanTasksCount(params);
if (total == 0) {
return new PageImpl<>(content, pageParam, total);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment