Gitea 4 months ago
parent 7470c338f8
commit b029ba9777
  1. 14
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java

@ -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