Merge remote-tracking branch 'origin/main'

main
王家东 4 months ago
commit 2221d563a7
  1. 12
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  2. 14
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java

@ -958,8 +958,11 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
try { try {
List<AnnualCompPointMb> list = ExcelImportUtil.importExcel(file.getInputStream(), AnnualCompPointMb.class, params); List<AnnualCompPointMb> list = ExcelImportUtil.importExcel(file.getInputStream(), AnnualCompPointMb.class, params);
for (int i = 0 ; i < list.size();i++){ for (int i = 0 ; i < list.size();i++){
SysUser sysUser = sysUserService.getUserByName(list.get(i).getStudentcode()); QueryWrapper<SysUser> qw = new QueryWrapper<>();
if(sysUser==null){ qw.eq("work_no",list.get(i).getStudentcode());
List<SysUser> listsys = sysUserService.list(qw);
//SysUser sysUser = sysUserService.getUserByName(list.get(i).getStudentcode());
if(listsys.size()==0){
return Result.error("文件导入失败:第"+(i+1)+"行学生学号不存在"); return Result.error("文件导入失败:第"+(i+1)+"行学生学号不存在");
} }
} }
@ -979,7 +982,10 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
annualCompetitionProjectRegistrationService.save(ar); annualCompetitionProjectRegistrationService.save(ar);
TeamManagement tm = new TeamManagement(); TeamManagement tm = new TeamManagement();
tm.setEnrollCode(enrollCode); tm.setEnrollCode(enrollCode);
tm.setUserId(sysUserService.getUserByName(list.get(k).getStudentcode()).getId()); 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());
tm.setCaptain("0"); tm.setCaptain("0");
teamManagementService.save(tm); teamManagementService.save(tm);
} }

@ -120,7 +120,7 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
//学生(上传证书和查询)(根据学号查询筛选) //学生(上传证书和查询)(根据学号查询筛选)
Page<AwardPersion> page = new Page<AwardPersion>(pageNo, pageSize); Page<AwardPersion> page = new Page<AwardPersion>(pageNo, pageSize);
QueryWrapper<AwardPersion> queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap()); QueryWrapper<AwardPersion> queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap());
queryWrapper.eq("studentcode",user.getUsername()); queryWrapper.eq("studentcode",sysUserService.getById(user.getId()).getWorkNo());
IPage<AwardPersion> pageList = awardPersionService.page(page, queryWrapper); IPage<AwardPersion> pageList = awardPersionService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
}else if(sysRoleList.get(0).getId().equals("1693451972151386114")){ }else if(sysRoleList.get(0).getId().equals("1693451972151386114")){
@ -224,7 +224,7 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
for (int l = 0 ; l < listtm.size() ; l++){ for (int l = 0 ; l < listtm.size() ; l++){
SysUser sysUser = sysUserService.getById(listtm.get(l).getUserId()); SysUser sysUser = sysUserService.getById(listtm.get(l).getUserId());
awardPersion.setStudentname(sysUser.getRealname()); awardPersion.setStudentname(sysUser.getRealname());
awardPersion.setStudentcode(sysUser.getUsername()); awardPersion.setStudentcode(sysUser.getWorkNo());
awardPersion.setStudentorg(sysDepartService.queryDepartsByUsername(sysUser.getUsername()).get(0).getId()); awardPersion.setStudentorg(sysDepartService.queryDepartsByUsername(sysUser.getUsername()).get(0).getId());
awardPersionService.save(awardPersion); awardPersionService.save(awardPersion);
} }
@ -515,31 +515,31 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){ if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(1); list.get(i).setAwardsort(1);
list.get(i).setAwardid(listaca.get(0).getId()); list.get(i).setAwardid(listaca.get(0).getId());
list.get(i).setStudentcode(sysUser.getUsername()); list.get(i).setStudentcode(sysUser.getWorkNo());
list.get(i).setStudentname(sysUser.getRealname()); list.get(i).setStudentname(sysUser.getRealname());
listsave.add(list.get(i)); listsave.add(list.get(i));
}else if(listaca.get(0).getSecondPrize().equals(list.get(i).getAwardname())){ }else if(listaca.get(0).getSecondPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(2); list.get(i).setAwardsort(2);
list.get(i).setAwardid(listaca.get(0).getId()); list.get(i).setAwardid(listaca.get(0).getId());
list.get(i).setStudentcode(sysUser.getUsername()); list.get(i).setStudentcode(sysUser.getWorkNo());
list.get(i).setStudentname(sysUser.getRealname()); list.get(i).setStudentname(sysUser.getRealname());
listsave.add(list.get(i)); listsave.add(list.get(i));
}else if(listaca.get(0).getThirdPrize().equals(list.get(i).getAwardname())){ }else if(listaca.get(0).getThirdPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(3); list.get(i).setAwardsort(3);
list.get(i).setAwardid(listaca.get(0).getId()); list.get(i).setAwardid(listaca.get(0).getId());
list.get(i).setStudentcode(sysUser.getUsername()); list.get(i).setStudentcode(sysUser.getWorkNo());
list.get(i).setStudentname(sysUser.getRealname()); list.get(i).setStudentname(sysUser.getRealname());
listsave.add(list.get(i)); listsave.add(list.get(i));
}else if(listaca.get(0).getFourthPrize().equals(list.get(i).getAwardname())){ }else if(listaca.get(0).getFourthPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(4); list.get(i).setAwardsort(4);
list.get(i).setAwardid(listaca.get(0).getId()); list.get(i).setAwardid(listaca.get(0).getId());
list.get(i).setStudentcode(sysUser.getUsername()); list.get(i).setStudentcode(sysUser.getWorkNo());
list.get(i).setStudentname(sysUser.getRealname()); list.get(i).setStudentname(sysUser.getRealname());
listsave.add(list.get(i)); listsave.add(list.get(i));
}else if(listaca.get(0).getFifthPrize().equals(list.get(i).getAwardname())){ }else if(listaca.get(0).getFifthPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(5); list.get(i).setAwardsort(5);
list.get(i).setAwardid(listaca.get(0).getId()); list.get(i).setAwardid(listaca.get(0).getId());
list.get(i).setStudentcode(sysUser.getUsername()); list.get(i).setStudentcode(sysUser.getWorkNo());
list.get(i).setStudentname(sysUser.getRealname()); list.get(i).setStudentname(sysUser.getRealname());
listsave.add(list.get(i)); listsave.add(list.get(i));
}else { }else {

Loading…
Cancel
Save