Crazy 8 months ago
parent
commit
436a7eeba5

+ 1 - 1
yudao-module-md/yudao-module-md-biz/src/main/java/cn/iocoder/yudao/module/md/controller/admin/AcsController.java

@@ -64,7 +64,7 @@ public class AcsController {
 
 
     //
-//    @Scheduled(cron = "0 */10 * * * ?") // 每10分钟执行
+    @Scheduled(cron = "0 */10 * * * ?") // 每10分钟执行
     public void scheduledTask() throws UnsupportedEncodingException, InterruptedException {
         acsService.searchEvents(adminUserService, studentAttendanceService);
     }

+ 12 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java

@@ -76,6 +76,18 @@ public class DeptController {
     @PreAuthorize("@ss.hasPermission('system:dept:query')")
     public CommonResult<List<DeptRespVO>> getDeptList(DeptListReqVO reqVO) {
         List<DeptDO> list = deptService.getDeptList(reqVO);
+        for (DeptDO L :list){
+            DeptRespVO newDept =BeanUtils.toBean(L, DeptRespVO.class);
+            List<Long> leaderUserIds = newDept.getLeaderUserId();
+            List<AdminUserDO> userList =  new ArrayList<>();
+            if (leaderUserIds.size()>0) {
+                for (Long leaderUserId : leaderUserIds) {
+                    AdminUserDO user = (leaderUserId != null) ? adminUserService.getUser(leaderUserId) : null;
+                    userList.add(user);
+                }
+                newDept.setUser(userList);
+            }
+        }
         return success(BeanUtils.toBean(list, DeptRespVO.class));
     }
 
@@ -105,7 +117,6 @@ public class DeptController {
             newDept.setUser(userList);
         }
         return success(newDept);
-
     }
 
 

+ 2 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSaveReqVO.java

@@ -9,6 +9,7 @@ import javax.validation.constraints.Email;
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
 import javax.validation.constraints.Size;
+import java.util.List;
 
 @Schema(description = "管理后台 - 部门创建/修改 Request VO")
 @Data
@@ -30,7 +31,7 @@ public class DeptSaveReqVO {
     private Integer sort;
 
     @Schema(description = "负责人的用户编号", example = "2048")
-    private Long leaderUserId;
+    private List<Long> leaderUserId;
 
     @Schema(description = "联系电话", example = "15601691000")
     @Size(max = 11, message = "联系电话长度不能超过11个字符")