lyhzzz vor 1 Jahr
Ursprung
Commit
e50b3dbfcf

+ 2 - 14
src/main/java/com/fdkankan/fusion/controller/TmDepartmentController.java

@@ -55,20 +55,8 @@ public class TmDepartmentController {
      * 获取部门下拉树列表
      */
     @GetMapping("/treeselect")
-    public ResultData treeselect(@RequestParam(required = false) String caseId) {
-        if(StringUtils.isNotBlank(caseId)){
-            CaseEntity caseEntity = caseService.getById(caseId);
-            if(caseEntity == null ){
-                throw new BusinessException(ResultCode.CASE_NOT_EXIST);
-            }
-            String deptId = caseEntity.getDeptId();
-            if(caseEntity.getType() == 1){
-                TmProject tmProject = tmProjectService.getById(caseEntity.getTmProjectId());
-                if(tmProject == null || StringUtils.isBlank(tmProject.getDeptId())){
-                    throw new BusinessException(ResultCode.CASE_NOT_EXIST);
-                }
-                deptId = tmProject.getDeptId();
-            }
+    public ResultData treeselect(@RequestParam(required = false) String deptId) {
+        if(StringUtils.isNotBlank(deptId)){
             return ResultData.ok(departmentService.getDeptList(deptId));
         }
         return ResultData.ok(departmentService.getDeptList());