瀏覽代碼

修复修改履职计划会改变计划创建id

luojun 2 年之前
父節點
當前提交
7d91f21ebf

+ 0 - 13
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/controller/ApiPlanController.java

@@ -40,8 +40,6 @@ public class ApiPlanController {
     @Autowired
     private RemoteOrgService remoteOrgService;
 
-//    @Autowired
-//    ResumptionTaskBusiness taskBusiness;
 
     /**
      * 计划分页查询
@@ -55,7 +53,6 @@ public class ApiPlanController {
         if(ObjectUtil.isNull(info.getOrgId())){
             info.setOrgId(SecurityUtils.getLoginUser().getOrgId());
         }
-//        Page<AppPlan> result = ;
         return TableDataInfo.success(appPlanService.selectPage(info));
     }
 
@@ -71,16 +68,6 @@ public class ApiPlanController {
         }
     }
 
-    @RequestMapping("/test")
-    public AjaxResult test(Integer type) {
-        R<List<Long>> res = remoteOrgService.findListByOrgType(type, SecurityConstants.INNER);
-        List<Long> list = null;
-        if (res.getCode() == 200) {
-            list = res.getData();
-        }
-        return AjaxResult.success(list);
-    }
-
     /**
      * 检查要点分页查询
      *

+ 6 - 4
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/AppPlanServiceImpl.java

@@ -298,9 +298,9 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
                 app.setRoleList(new ArrayList<>());
             }
             //修改
-            QueryWrapper<AppPlan> qw = new QueryWrapper<>();
-            qw.lambda().eq(AppPlan::getPlanName, app.getPlanName())
-                    .ne(AppPlan::getId, plan.getId());
+//            QueryWrapper<AppPlan> qw = new QueryWrapper<>();
+//            qw.lambda().eq(AppPlan::getPlanName, app.getPlanName())
+//                    .ne(AppPlan::getId, plan.getId());
 
 //            Long size = baseMapper.selectCount(qw);
 //
@@ -310,9 +310,11 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
 
             plan.setUpdateTime(new Date());
             plan.setModifiedBy(SecurityUtils.getUserId());
+            //前端总是会传递计划创建id,修改时需要排除
+            plan.setPlanCreateOrgId(null);
+            plan.setPlanCreateOrgName(null);
             baseMapper.updateById(plan);
 
-
             List<AppPlan> appPlans = baseMapper.selectList(new LambdaQueryWrapper<AppPlan>().eq(AppPlan::getParentId, plan.getId()));
             for (AppPlan ap :
                     appPlans) {