|
@@ -26,7 +26,6 @@ import com.xunmei.common.core.domain.drill.vo.CoreDrillPlanDataVo;
|
|
|
import com.xunmei.common.core.domain.drill.vo.CoreDrillPlanDetailVo;
|
|
import com.xunmei.common.core.domain.drill.vo.CoreDrillPlanDetailVo;
|
|
|
import com.xunmei.common.core.domain.drill.vo.CoreDrillPlanPageVo;
|
|
import com.xunmei.common.core.domain.drill.vo.CoreDrillPlanPageVo;
|
|
|
import com.xunmei.common.core.domain.drill.vo.CoreDrillPlanRoleVo;
|
|
import com.xunmei.common.core.domain.drill.vo.CoreDrillPlanRoleVo;
|
|
|
-import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingPlan;
|
|
|
|
|
import com.xunmei.common.core.enums.OrgTypeEnum;
|
|
import com.xunmei.common.core.enums.OrgTypeEnum;
|
|
|
import com.xunmei.common.core.enums.drill.DrillDoStatus;
|
|
import com.xunmei.common.core.enums.drill.DrillDoStatus;
|
|
|
import com.xunmei.common.core.enums.drill.DrillPlanCycleEnum;
|
|
import com.xunmei.common.core.enums.drill.DrillPlanCycleEnum;
|
|
@@ -138,6 +137,9 @@ public class CoreDrillPlanServiceImpl extends ServiceImpl<CoreDrillPlanMapper, C
|
|
|
if (record.getStandard() == 1) {
|
|
if (record.getStandard() == 1) {
|
|
|
final Integer done = coreDrillTaskMapper.checkHasTaskIsDoneByPlanParentId(record.getId());
|
|
final Integer done = coreDrillTaskMapper.checkHasTaskIsDoneByPlanParentId(record.getId());
|
|
|
record.setDone(done);
|
|
record.setDone(done);
|
|
|
|
|
+ //是否存在未完成的任务
|
|
|
|
|
+ final Integer unDone = coreDrillTaskMapper.checkHasTaskUnDoneByPlanParentId(record.getId());
|
|
|
|
|
+ record.setUnDone(unDone);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -358,6 +360,9 @@ public class CoreDrillPlanServiceImpl extends ServiceImpl<CoreDrillPlanMapper, C
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void doUpdatePlanForDeleted(CoreDrillPlan plan, CoreDrillPlanUpdateDto request) {
|
|
private void doUpdatePlanForDeleted(CoreDrillPlan plan, CoreDrillPlanUpdateDto request) {
|
|
|
|
|
+ if (ObjectUtil.isEmpty(request.getRemark())) {
|
|
|
|
|
+ request.setRemark(null);
|
|
|
|
|
+ }
|
|
|
validateFieldForStandard(request.getPlanCycle(), plan.getPlanCycle(), "当前状态仅允许修改任务名称");
|
|
validateFieldForStandard(request.getPlanCycle(), plan.getPlanCycle(), "当前状态仅允许修改任务名称");
|
|
|
validateFieldForStandard(request.getExecTimes(), plan.getExecTimes(), "当前状态仅允许修改任务名称");
|
|
validateFieldForStandard(request.getExecTimes(), plan.getExecTimes(), "当前状态仅允许修改任务名称");
|
|
|
validateFieldForStandard(request.getExecOrgType(), plan.getExecOrgType(), "当前状态仅允许修改任务名称");
|
|
validateFieldForStandard(request.getExecOrgType(), plan.getExecOrgType(), "当前状态仅允许修改任务名称");
|
|
@@ -650,7 +655,7 @@ public class CoreDrillPlanServiceImpl extends ServiceImpl<CoreDrillPlanMapper, C
|
|
|
coreDrillPlanMapper.delByIds(list);
|
|
coreDrillPlanMapper.delByIds(list);
|
|
|
} else {
|
|
} else {
|
|
|
//计划下有已完成:删除本轮次及以后的所有任务,计划本身做逻辑删除。
|
|
//计划下有已完成:删除本轮次及以后的所有任务,计划本身做逻辑删除。
|
|
|
- coreDrillTaskService.delByStartTimeAndEndTimeAndPlanIdList(list, new Date(), null);
|
|
|
|
|
|
|
+ coreDrillTaskService.delByStartTimeAndEndTimeAndPlanIdList(list, DateUtil.beginOfDay(new Date()), null);
|
|
|
removeByIds(list);
|
|
removeByIds(list);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -736,6 +741,9 @@ public class CoreDrillPlanServiceImpl extends ServiceImpl<CoreDrillPlanMapper, C
|
|
|
plan.setBuildTaskNow(0);
|
|
plan.setBuildTaskNow(0);
|
|
|
plan.setEffectiveTime(DateUtil.offsetDay(plan.getPlanEndDate(), 1));
|
|
plan.setEffectiveTime(DateUtil.offsetDay(plan.getPlanEndDate(), 1));
|
|
|
}
|
|
}
|
|
|
|
|
+ if (plan.getPlanCycle().equals(EduTrainingPlanCycleEnum.NONE.getCode())) {
|
|
|
|
|
+ plan.setEffectiveTime(new Date());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private Boolean anotherCheckOrgType(Integer orgType) {
|
|
private Boolean anotherCheckOrgType(Integer orgType) {
|
|
@@ -870,7 +878,7 @@ public class CoreDrillPlanServiceImpl extends ServiceImpl<CoreDrillPlanMapper, C
|
|
|
drillPlan.setParentId(plan.getId());
|
|
drillPlan.setParentId(plan.getId());
|
|
|
drillPlan.setCreateTime(new Date());
|
|
drillPlan.setCreateTime(new Date());
|
|
|
drillPlan.setUpdateTime(new Date());
|
|
drillPlan.setUpdateTime(new Date());
|
|
|
- this.updatePlanTime(plan, status);
|
|
|
|
|
|
|
+ this.updatePlanTime(drillPlan, status);
|
|
|
list.add(drillPlan);
|
|
list.add(drillPlan);
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(planExecOrgList)) {
|
|
if (ObjectUtil.isNotEmpty(planExecOrgList)) {
|