|
|
@@ -143,7 +143,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
|
|
|
AppPlan plan = baseMapper.selectById(dto.getId());
|
|
|
plan.setOrgId(d.getOrgId().toString());
|
|
|
- plan.setDistributeStatus("0");
|
|
|
+ plan.setDistributeStatus("1");
|
|
|
plan.setPlanOfOrgId(d.getOrgId());
|
|
|
plan.setPlanStatus(d.getStatus());
|
|
|
plan.setDistributePlanStatus(d.getStatus().toString());
|
|
|
@@ -179,22 +179,44 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
AppPlan plan = new AppPlan();
|
|
|
plan.setId(dto.getId());
|
|
|
plan.setDistribute("1");
|
|
|
+ plan.setPlanStatus(1);
|
|
|
baseMapper.updateById(plan);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void cheHui(Long id) {
|
|
|
+ public int cheHui(Long id) {
|
|
|
AppPlan plan = baseMapper.selectById(id);
|
|
|
+
|
|
|
//修改所有子计划
|
|
|
List<AppPlan> appPlans = baseMapper.selectList(new LambdaQueryWrapper<AppPlan>().eq(AppPlan::getParentId, id));
|
|
|
for (AppPlan ap :
|
|
|
appPlans) {
|
|
|
//修改计划状态为停用
|
|
|
+ //如果是已经撤回的计划
|
|
|
+ if("2".equals(plan.getDistribute())){
|
|
|
+ //修改计划状态到进行中,下发状态到1
|
|
|
+ plan.setDistribute("1");
|
|
|
+ plan.setPlanStatus(1);
|
|
|
+ }else {
|
|
|
ap.setPlanStatus(2);
|
|
|
+ }
|
|
|
baseMapper.updateById(ap);
|
|
|
}
|
|
|
- plan.setDistribute("2");
|
|
|
- baseMapper.updateById(plan);
|
|
|
+ //如果是已经撤回的计划
|
|
|
+ if("2".equals(plan.getDistribute())){
|
|
|
+ //修改计划状态到进行中,下发状态到1
|
|
|
+ plan.setDistribute("3");
|
|
|
+ plan.setPlanStatus(1);
|
|
|
+ baseMapper.updateById(plan);
|
|
|
+ return 2;
|
|
|
+ }else{
|
|
|
+ plan.setDistribute("2");
|
|
|
+ plan.setPlanStatus(0);
|
|
|
+ baseMapper.updateById(plan);
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|