diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java index 5b2b5c14..fe1ba6b9 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java @@ -53,6 +53,8 @@ import org.jeecg.modules.demo.expscore.service.IExpScoreService; import org.jeecg.modules.demo.score_management.entity.ScoreManagement; import org.jeecg.modules.demo.scorepersion.entity.ScorePersion; import org.jeecg.modules.demo.scorepersion.service.IScorePersionService; +import org.jeecg.modules.demo.seteacher.entity.Seteacher; +import org.jeecg.modules.demo.seteacher.service.ISeteacherService; import org.jeecg.modules.demo.upfile_persion.entity.UpfilePersion; import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService; import org.jeecg.modules.system.entity.SysDict; @@ -114,6 +116,8 @@ public class AnnualCompPointController extends JeecgController qw1 = new QueryWrapper<>(); qw1.eq("work_no", list.get(k).getStudentcode()); - List listsys1 = sysUserService.list(qw1); - tm.setUserId(listsys1.get(0).getId()); + SysUser listsys1 = sysUserService.getOne(qw1); + tm.setUserId(listsys1.getId()); tm.setCaptain("0"); teamManagementService.save(tm); //开始处理指导老师数据 @@ -1133,39 +1137,33 @@ public class AnnualCompPointController extends JeecgController teachertypelist = Arrays.asList(teachertypes); List teacherNamelist = Arrays.asList(teacherNames); - List teacherXllist = Arrays.asList(teacherXls); - List teacherZclist = Arrays.asList(teacherZcs); - List teacherZysList = Arrays.asList(teacherZys); - List teacherYjfxlist = Arrays.asList(teacherYjfxs); - List teacherPhonelist = Arrays.asList(teacherPhone); + List teauserwork = Arrays.asList(teacherXls); + List userbyworkonList = sysUserService.query().eq("work_no",teauserwork).list(); + List UserIDS= userbyworkonList.stream() + .map(SysUser::getId) // 提取每个 SysUser 的 id + .collect(Collectors.toList()); // 收集结果到 List + List seteacherList =seteacherService.query().in("user_id",UserIDS).list(); for (int c =0;c qw1 = new QueryWrapper<>(); qw1.eq("work_no",teamworknolist.get(a)); - List listsys1 = sysUserService.list(qw1); - tm.setUserId(listsys1.get(a).getId()); + SysUser listsys1 = sysUserService.getOne(qw1); + tm.setUserId(listsys1.getId()); if (a==0) { tm.setCaptain("1"); } @@ -1229,41 +1227,34 @@ public class AnnualCompPointController extends JeecgController teachertypelist = Arrays.asList(teachertypes); List teacherNamelist = Arrays.asList(teacherNames); - List teacherXllist = Arrays.asList(teacherXls); - List teacherZclist = Arrays.asList(teacherZcs); - List teacherZysList = Arrays.asList(teacherZys); - List teacherYjfxlist = Arrays.asList(teacherYjfxs); - List teacherPhonelist = Arrays.asList(teacherPhone); + //创建指导老师工号的成字符串数组 + String[] teacherXls1 = list.get(k).getTeacherUserworkon().split("%"); + List teauserwork1 = Arrays.asList(teacherXls1); + List userbyworkonList = sysUserService.query().in("work_no",teauserwork1).list(); + List UserIDS= userbyworkonList.stream() + .map(SysUser::getId) // 提取每个 SysUser 的 id + .collect(Collectors.toList()); // 收集结果到 List + List seteacherList =seteacherService.query().in("user_id",UserIDS).list(); for (int c =0;c