报名导入完成

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.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<AnnualCompPoint,
private ITeamManagementService teamManagementService;
@Autowired
private IAnnualService annualService;
@Autowired
private ISeteacherService seteacherService;
@Autowired
private ITongfenCompService tongfenCompService;
@ -1124,8 +1128,8 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
tm.setEnrollCode(enrollCode);
QueryWrapper<SysUser> qw1 = new QueryWrapper<>();
qw1.eq("work_no", list.get(k).getStudentcode());
List<SysUser> 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<AnnualCompPoint,
String[] teachertypes = list.get(k).getTeacherType().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("%");
//创建指导老师工号的成字符串数组
String[] teacherXls = list.get(k).getTeacherUserworkon().split("%");
//开始将这些字符串转化成list
List<String> teachertypelist = Arrays.asList(teachertypes);
List<String> teacherNamelist = Arrays.asList(teacherNames);
List<String> teacherXllist = Arrays.asList(teacherXls);
List<String> teacherZclist = Arrays.asList(teacherZcs);
List<String> teacherZysList = Arrays.asList(teacherZys);
List<String> teacherYjfxlist = Arrays.asList(teacherYjfxs);
List<String> teacherPhonelist = Arrays.asList(teacherPhone);
List<String> teauserwork = Arrays.asList(teacherXls);
List<SysUser> userbyworkonList = sysUserService.query().eq("work_no",teauserwork).list();
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++){
InstructorSheet is = new InstructorSheet();
is.setEnrollCode(enrollCode);
is.setAnnualCompid(ndbsxmid);
is.setTeacherXl(teacherXllist.get(c));
is.setTeacherXl(seteacherList.get(c).getExpTitle());
if (teachertypelist.get(c).equals("指导老师")){
is.setTeacherType(1);
}else if (teachertypelist.get(c).equals("领队老师")){
is.setTeacherType(2);
}
is.setTeacherName(teacherNamelist.get(c));
is.setTeacherZc(teacherZclist.get(c));
is.setTeacherZy(teacherZysList.get(c));
is.setTeacherYjfx(teacherYjfxlist.get(c));
is.setTeacherPhone(teacherPhonelist.get(c));
is.setTeacherZc(seteacherList.get(c).getExpZc());
is.setTeacherZy(seteacherList.get(c).getTeamajor());
is.setTeacherYjfx(seteacherList.get(c).getExpYjfx());
is.setTeacherPhone(sysUserService.query().eq("id",seteacherList.get(c).getUserId()).one().getPhone());
instructorSheetService.save(is);
}
@ -1217,8 +1215,8 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
tm.setEnrollCode(enrollCode);
QueryWrapper<SysUser> qw1 = new QueryWrapper<>();
qw1.eq("work_no",teamworknolist.get(a));
List<SysUser> 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<AnnualCompPoint,
String[] teachertypes = list.get(k).getTeacherType().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<String> teachertypelist = Arrays.asList(teachertypes);
List<String> teacherNamelist = Arrays.asList(teacherNames);
List<String> teacherXllist = Arrays.asList(teacherXls);
List<String> teacherZclist = Arrays.asList(teacherZcs);
List<String> teacherZysList = Arrays.asList(teacherZys);
List<String> teacherYjfxlist = Arrays.asList(teacherYjfxs);
List<String> teacherPhonelist = Arrays.asList(teacherPhone);
//创建指导老师工号的成字符串数组
String[] teacherXls1 = list.get(k).getTeacherUserworkon().split("%");
List<String> teauserwork1 = Arrays.asList(teacherXls1);
List<SysUser> userbyworkonList = sysUserService.query().in("work_no",teauserwork1).list();
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++){
InstructorSheet is = new InstructorSheet();
is.setEnrollCode(enrollCode);
is.setAnnualCompid(ndbsxmid);
is.setTeacherXl(teacherXllist.get(c));
InstructorSheet is1 = new InstructorSheet();
is1.setEnrollCode(enrollCode);
is1.setAnnualCompid(ndbsxmid);
is1.setTeacherXl(seteacherList.get(c).getExpTitle());
if (teachertypelist.get(c).equals("指导老师")){
is.setTeacherType(1);
is1.setTeacherType(1);
}else if (teachertypelist.get(c).equals("领队老师")){
is.setTeacherType(2);
}
is.setTeacherName(teacherNamelist.get(c));
is.setTeacherZc(teacherZclist.get(c));
is.setTeacherZy(teacherZysList.get(c));
is.setTeacherYjfx(teacherYjfxlist.get(c));
is.setTeacherPhone(teacherPhonelist.get(c));
instructorSheetService.save(is);
is1.setTeacherType(2);
}
is1.setTeacherName(teacherNamelist.get(c));
is1.setTeacherZc(seteacherList.get(c).getExpZc());
is1.setTeacherZy(seteacherList.get(c).getTeamajor());
is1.setTeacherYjfx(seteacherList.get(c).getExpYjfx());
is1.setTeacherPhone(sysUserService.query().eq("id",seteacherList.get(c).getUserId()).one().getPhone());
instructorSheetService.save(is1);
}

@ -41,33 +41,19 @@ public class AnnualCompPointMb implements Serializable {
private String studentcode;
/**指导老师类型*/
@Excel(name = "指导老师类型", width = 15, dicCode = "teacher_type")
@ApiModelProperty(value = "指导老师类型")
@Excel(name = "老师类型", width = 15, dicCode = "teacher_type")
@ApiModelProperty(value = "老师类型")
private java.lang.String teacherType;
/**指导老师姓名*/
@Excel(name = "指导老师姓名", width = 15)
@ApiModelProperty(value = "指导老师姓名")
@Excel(name = "老师姓名", width = 15)
@ApiModelProperty(value = "老师姓名")
private java.lang.String teacherName;
/**报名编号*/
@ApiModelProperty(value = "报名编号")
private java.lang.String enrollCode;
@Excel(name = "学历", width = 15)
@ApiModelProperty(value = "学历")
private java.lang.String teacherXl;
@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;
/**指导老师姓名*/
@Excel(name = "老师工号", width = 15)
@ApiModelProperty(value = "老师工号")
private java.lang.String teacherUserworkon;
}

Loading…
Cancel
Save