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 {
List<AnnualCompPointMb> list = ExcelImportUtil.importExcel(file.getInputStream(), AnnualCompPointMb.class, params);
for (int i = 0 ; i < list.size();i++){
SysUser sysUser = sysUserService.getUserByName(list.get(i).getStudentcode());
if(sysUser==null){
QueryWrapper<SysUser> qw = new QueryWrapper<>();
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)+"行学生学号不存在");
}
}
@ -979,7 +982,10 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
annualCompetitionProjectRegistrationService.save(ar);
TeamManagement tm = new TeamManagement();
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");
teamManagementService.save(tm);
}

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

Loading…
Cancel
Save