|
@@ -255,6 +255,20 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
planProcedureTotal.setTotalFillTime(workingTime);
|
|
planProcedureTotal.setTotalFillTime(workingTime);
|
|
planProcedureTotal.setTotalProgress((int)(workingTime / planProcedureTotal.getTotalWorkingHours()) * 100);
|
|
planProcedureTotal.setTotalProgress((int)(workingTime / planProcedureTotal.getTotalWorkingHours()) * 100);
|
|
planProcedureTotalMapper.updateById(planProcedureTotal);
|
|
planProcedureTotalMapper.updateById(planProcedureTotal);
|
|
|
|
+ //检查该计划下的所有工序是否都已经完成
|
|
|
|
+ List<PlanProcedureTotal> planProcedureTotalList = planProcedureTotalMapper.selectList(new QueryWrapper<PlanProcedureTotal>().eq("plan_id", planProcedureTotal.getPlanId()));
|
|
|
|
+ boolean isAllFinish = true;
|
|
|
|
+ for (PlanProcedureTotal p : planProcedureTotalList) {
|
|
|
|
+ if (p.getTotalProgress() < 100) {
|
|
|
|
+ isAllFinish = false;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (isAllFinish) {
|
|
|
|
+ //该计划下的所有工序都已经完成了,那么该计划就是完成状态
|
|
|
|
+ plan.setRealEndDate(LocalDate.now());
|
|
|
|
+ planMapper.updateById(plan);
|
|
|
|
+ }
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
|
|
|