|
|
@@ -309,6 +309,55 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
|
|
|
baseMapper.updateById(plan);
|
|
|
|
|
|
+
|
|
|
+ List<AppPlan> appPlans = baseMapper.selectList(new LambdaQueryWrapper<AppPlan>().eq(AppPlan::getParentId, plan.getId()));
|
|
|
+ for (AppPlan ap :
|
|
|
+ appPlans) {
|
|
|
+ ap.setPlanName(plan.getPlanName());
|
|
|
+ ap.setPlanType(plan.getPlanType());
|
|
|
+ ap.setPlanCycle(plan.getPlanCycle());
|
|
|
+ ap.setPlanStatus(plan.getPlanStatus());
|
|
|
+ ap.setExecOrgType(plan.getExecOrgType());
|
|
|
+ ap.setPlanExec(plan.getPlanExec());
|
|
|
+ baseMapper.updateById(ap);
|
|
|
+
|
|
|
+ if (app.getRoleList().size() > 0) {
|
|
|
+ QueryWrapper<AppPlanToRole> apr = new QueryWrapper<>();
|
|
|
+ apr.lambda().eq(AppPlanToRole::getPlanId, ap.getId());
|
|
|
+ appPlanToRoleMapper.delete(apr);
|
|
|
+ }
|
|
|
+
|
|
|
+ QueryWrapper<AppPlanToPoint> api = new QueryWrapper<>();
|
|
|
+ api.lambda().eq(AppPlanToPoint::getPlanId, ap.getId());
|
|
|
+ appPlanToItemMapper.delete(api);
|
|
|
+
|
|
|
+ List<Long> roleList = app.getRoleList();
|
|
|
+ AppPlanToRole atr = null;
|
|
|
+ for (Long roleId : roleList) {
|
|
|
+ atr = new AppPlanToRole();
|
|
|
+ atr.setRoleId(roleId);
|
|
|
+ atr.setPlanId(ap.getId());
|
|
|
+ appPlanToRoleMapper.insert(atr);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ List<RuleItemVo> itemList = app.getItemList();
|
|
|
+ if (itemList.size() == 0) {
|
|
|
+ throw new RuntimeException("请选择履职要点");
|
|
|
+ }
|
|
|
+ AppPlanToPoint item = null;
|
|
|
+ for (RuleItemVo ruleItemVo : itemList) {
|
|
|
+ item = new AppPlanToPoint();
|
|
|
+ item.setPointId(ruleItemVo.getId());
|
|
|
+ item.setPlanId(ap.getId());
|
|
|
+ item.setPointScan(ruleItemVo.isPointScan());
|
|
|
+ item.setRequired(ruleItemVo.isRequired());
|
|
|
+ appPlanToItemMapper.insert(item);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
Long id = plan.getId();
|
|
|
if (app.getRoleList().size() > 0) {
|
|
|
QueryWrapper<AppPlanToRole> apr = new QueryWrapper<>();
|