报名导入完成

main
王家东 3 months ago
parent c8d81da298
commit 10a9dd7bf0
  1. 97
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  2. 30
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/entity/AnnualCompPointMb.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.score_management.entity.ScoreManagement;
import org.jeecg.modules.demo.scorepersion.entity.ScorePersion; import org.jeecg.modules.demo.scorepersion.entity.ScorePersion;
import org.jeecg.modules.demo.scorepersion.service.IScorePersionService; 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.entity.UpfilePersion;
import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService; import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService;
import org.jeecg.modules.system.entity.SysDict; import org.jeecg.modules.system.entity.SysDict;
@ -114,6 +116,8 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
private ITeamManagementService teamManagementService; private ITeamManagementService teamManagementService;
@Autowired @Autowired
private IAnnualService annualService; private IAnnualService annualService;
@Autowired
private ISeteacherService seteacherService;
@Autowired @Autowired
private ITongfenCompService tongfenCompService; private ITongfenCompService tongfenCompService;
@ -1124,8 +1128,8 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
tm.setEnrollCode(enrollCode); tm.setEnrollCode(enrollCode);
QueryWrapper<SysUser> qw1 = new QueryWrapper<>(); QueryWrapper<SysUser> qw1 = new QueryWrapper<>();
qw1.eq("work_no", list.get(k).getStudentcode()); qw1.eq("work_no", list.get(k).getStudentcode());
List<SysUser> listsys1 = sysUserService.list(qw1); SysUser listsys1 = sysUserService.getOne(qw1);
tm.setUserId(listsys1.get(0).getId()); tm.setUserId(listsys1.getId());
tm.setCaptain("0"); tm.setCaptain("0");
teamManagementService.save(tm); teamManagementService.save(tm);
//开始处理指导老师数据 //开始处理指导老师数据
@ -1133,39 +1137,33 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
String[] teachertypes = list.get(k).getTeacherType().split("%"); String[] teachertypes = list.get(k).getTeacherType().split("%");
//创建指导老师姓名的成字符串数组 //创建指导老师姓名的成字符串数组
String[] teacherNames = list.get(k).getTeacherName().split("%"); String[] teacherNames = list.get(k).getTeacherName().split("%");
//创建指导老师学历的成字符串数组 //创建指导老师工号的成字符串数组
String[] teacherXls = list.get(k).getTeacherXl().split("%"); String[] teacherXls = list.get(k).getTeacherUserworkon().split("%");
//创建指导老师职称的成字符串数组
String[] teacherZcs = list.get(k).getTeacherZc().split("%");
//创建指导老师专业的成字符串数组
String[] teacherZys = list.get(k).getTeacherZy().split("%");
//创建指导老师研究方向的成字符串数组
String[] teacherYjfxs = list.get(k).getTeacherYjfx().split("%");
//创建指导老师手机号的成字符串数组
String[] teacherPhone = list.get(k).getTeacherPhone().split("%");
//开始将这些字符串转化成list //开始将这些字符串转化成list
List<String> teachertypelist = Arrays.asList(teachertypes); List<String> teachertypelist = Arrays.asList(teachertypes);
List<String> teacherNamelist = Arrays.asList(teacherNames); List<String> teacherNamelist = Arrays.asList(teacherNames);
List<String> teacherXllist = Arrays.asList(teacherXls); List<String> teauserwork = Arrays.asList(teacherXls);
List<String> teacherZclist = Arrays.asList(teacherZcs); List<SysUser> userbyworkonList = sysUserService.query().eq("work_no",teauserwork).list();
List<String> teacherZysList = Arrays.asList(teacherZys); List<String> UserIDS= userbyworkonList.stream()
List<String> teacherYjfxlist = Arrays.asList(teacherYjfxs); .map(SysUser::getId) // 提取每个 SysUser 的 id
List<String> teacherPhonelist = Arrays.asList(teacherPhone); .collect(Collectors.toList()); // 收集结果到 List<String>
List<Seteacher> seteacherList =seteacherService.query().in("user_id",UserIDS).list();
for (int c =0;c<teachernumber;c++){ for (int c =0;c<teachernumber;c++){
InstructorSheet is = new InstructorSheet(); InstructorSheet is = new InstructorSheet();
is.setEnrollCode(enrollCode); is.setEnrollCode(enrollCode);
is.setAnnualCompid(ndbsxmid); is.setAnnualCompid(ndbsxmid);
is.setTeacherXl(teacherXllist.get(c)); is.setTeacherXl(seteacherList.get(c).getExpTitle());
if (teachertypelist.get(c).equals("指导老师")){ if (teachertypelist.get(c).equals("指导老师")){
is.setTeacherType(1); is.setTeacherType(1);
}else if (teachertypelist.get(c).equals("领队老师")){ }else if (teachertypelist.get(c).equals("领队老师")){
is.setTeacherType(2); is.setTeacherType(2);
} }
is.setTeacherName(teacherNamelist.get(c)); is.setTeacherName(teacherNamelist.get(c));
is.setTeacherZc(teacherZclist.get(c)); is.setTeacherZc(seteacherList.get(c).getExpZc());
is.setTeacherZy(teacherZysList.get(c)); is.setTeacherZy(seteacherList.get(c).getTeamajor());
is.setTeacherYjfx(teacherYjfxlist.get(c)); is.setTeacherYjfx(seteacherList.get(c).getExpYjfx());
is.setTeacherPhone(teacherPhonelist.get(c)); is.setTeacherPhone(sysUserService.query().eq("id",seteacherList.get(c).getUserId()).one().getPhone());
instructorSheetService.save(is); instructorSheetService.save(is);
} }
@ -1217,8 +1215,8 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
tm.setEnrollCode(enrollCode); tm.setEnrollCode(enrollCode);
QueryWrapper<SysUser> qw1 = new QueryWrapper<>(); QueryWrapper<SysUser> qw1 = new QueryWrapper<>();
qw1.eq("work_no",teamworknolist.get(a)); qw1.eq("work_no",teamworknolist.get(a));
List<SysUser> listsys1 = sysUserService.list(qw1); SysUser listsys1 = sysUserService.getOne(qw1);
tm.setUserId(listsys1.get(a).getId()); tm.setUserId(listsys1.getId());
if (a==0) { if (a==0) {
tm.setCaptain("1"); tm.setCaptain("1");
} }
@ -1229,41 +1227,34 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
String[] teachertypes = list.get(k).getTeacherType().split("%"); String[] teachertypes = list.get(k).getTeacherType().split("%");
//创建指导老师姓名的成字符串数组 //创建指导老师姓名的成字符串数组
String[] teacherNames = list.get(k).getTeacherName().split("%"); String[] teacherNames = list.get(k).getTeacherName().split("%");
//创建指导老师学历的成字符串数组
String[] teacherXls = list.get(k).getTeacherXl().split("%");
//创建指导老师职称的成字符串数组
String[] teacherZcs = list.get(k).getTeacherZc().split("%");
//创建指导老师专业的成字符串数组
String[] teacherZys = list.get(k).getTeacherZy().split("%");
//创建指导老师研究方向的成字符串数组
String[] teacherYjfxs = list.get(k).getTeacherYjfx().split("%");
//创建指导老师手机号的成字符串数组
String[] teacherPhone = list.get(k).getTeacherPhone().split("%");
//开始将这些字符串转化成list //开始将这些字符串转化成list
List<String> teachertypelist = Arrays.asList(teachertypes); List<String> teachertypelist = Arrays.asList(teachertypes);
List<String> teacherNamelist = Arrays.asList(teacherNames); List<String> teacherNamelist = Arrays.asList(teacherNames);
List<String> teacherXllist = Arrays.asList(teacherXls); //创建指导老师工号的成字符串数组
List<String> teacherZclist = Arrays.asList(teacherZcs); String[] teacherXls1 = list.get(k).getTeacherUserworkon().split("%");
List<String> teacherZysList = Arrays.asList(teacherZys); List<String> teauserwork1 = Arrays.asList(teacherXls1);
List<String> teacherYjfxlist = Arrays.asList(teacherYjfxs); List<SysUser> userbyworkonList = sysUserService.query().in("work_no",teauserwork1).list();
List<String> teacherPhonelist = Arrays.asList(teacherPhone); List<String> UserIDS= userbyworkonList.stream()
.map(SysUser::getId) // 提取每个 SysUser 的 id
.collect(Collectors.toList()); // 收集结果到 List<String>
List<Seteacher> seteacherList =seteacherService.query().in("user_id",UserIDS).list();
for (int c =0;c<teachernumber;c++){ for (int c =0;c<teachernumber;c++){
InstructorSheet is = new InstructorSheet(); InstructorSheet is1 = new InstructorSheet();
is.setEnrollCode(enrollCode); is1.setEnrollCode(enrollCode);
is.setAnnualCompid(ndbsxmid); is1.setAnnualCompid(ndbsxmid);
is.setTeacherXl(teacherXllist.get(c)); is1.setTeacherXl(seteacherList.get(c).getExpTitle());
if (teachertypelist.get(c).equals("指导老师")){ if (teachertypelist.get(c).equals("指导老师")){
is.setTeacherType(1); is1.setTeacherType(1);
}else if (teachertypelist.get(c).equals("领队老师")){ }else if (teachertypelist.get(c).equals("领队老师")){
is.setTeacherType(2); is1.setTeacherType(2);
} }
is1.setTeacherName(teacherNamelist.get(c));
is.setTeacherName(teacherNamelist.get(c)); is1.setTeacherZc(seteacherList.get(c).getExpZc());
is.setTeacherZc(teacherZclist.get(c)); is1.setTeacherZy(seteacherList.get(c).getTeamajor());
is.setTeacherZy(teacherZysList.get(c)); is1.setTeacherYjfx(seteacherList.get(c).getExpYjfx());
is.setTeacherYjfx(teacherYjfxlist.get(c)); is1.setTeacherPhone(sysUserService.query().eq("id",seteacherList.get(c).getUserId()).one().getPhone());
is.setTeacherPhone(teacherPhonelist.get(c)); instructorSheetService.save(is1);
instructorSheetService.save(is);
} }

@ -41,33 +41,19 @@ public class AnnualCompPointMb implements Serializable {
private String studentcode; private String studentcode;
/**指导老师类型*/ /**指导老师类型*/
@Excel(name = "指导老师类型", width = 15, dicCode = "teacher_type") @Excel(name = "老师类型", width = 15, dicCode = "teacher_type")
@ApiModelProperty(value = "指导老师类型") @ApiModelProperty(value = "老师类型")
private java.lang.String teacherType; private java.lang.String teacherType;
/**指导老师姓名*/ /**指导老师姓名*/
@Excel(name = "指导老师姓名", width = 15) @Excel(name = "老师姓名", width = 15)
@ApiModelProperty(value = "指导老师姓名") @ApiModelProperty(value = "老师姓名")
private java.lang.String teacherName; private java.lang.String teacherName;
/**报名编号*/ /**报名编号*/
@ApiModelProperty(value = "报名编号") @ApiModelProperty(value = "报名编号")
private java.lang.String enrollCode; private java.lang.String enrollCode;
@Excel(name = "学历", width = 15) /**指导老师姓名*/
@ApiModelProperty(value = "学历") @Excel(name = "老师工号", width = 15)
private java.lang.String teacherXl; @ApiModelProperty(value = "老师工号")
private java.lang.String teacherUserworkon;
@Excel(name = "职称", width = 15)
@ApiModelProperty(value = "职称")
private java.lang.String teacherZc;
@Excel(name = "专业", width = 15)
@ApiModelProperty(value = "专业")
private java.lang.String teacherZy;
@Excel(name = "研究方向", width = 15)
@ApiModelProperty(value = "研究方向")
private java.lang.String teacherYjfx;
@Excel(name = "手机号", width = 15)
@ApiModelProperty(value = "手机号")
private java.lang.String teacherPhone;
} }

Loading…
Cancel
Save