Merge remote-tracking branch 'origin/main'

main
王家东 4 months ago
commit 6cf1fb6915
  1. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java
  2. 7
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java

@ -369,8 +369,8 @@ public class AnnualCompController extends JeecgController<AnnualComp, IAnnualCom
if (annualCompVo.getEndtime() != null) { if (annualCompVo.getEndtime() != null) {
end = annualCompVo.getEndtime().getTime(); end = annualCompVo.getEndtime().getTime();
} }
if (start < end) { if (start > end) {
Result.error("开始时间不能于结束时间"); return Result.error("开始时间不能于结束时间");
} }
String compname = annualCompVo.getCompname(); String compname = annualCompVo.getCompname();
String annualname = annualCompVo.getAnnualname(); String annualname = annualCompVo.getAnnualname();

@ -514,10 +514,14 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
QueryWrapper<AnnualCompAward> queryWrapperaca = QueryGenerator.initQueryWrapper(annualCompAward, request.getParameterMap()); QueryWrapper<AnnualCompAward> queryWrapperaca = QueryGenerator.initQueryWrapper(annualCompAward, request.getParameterMap());
queryWrapperaca.eq("annucompid",list.get(i).getAnnualCompP()); queryWrapperaca.eq("annucompid",list.get(i).getAnnualCompP());
List<AnnualCompAward> listaca = annualCompAwardService.list(queryWrapperaca); List<AnnualCompAward> listaca = annualCompAwardService.list(queryWrapperaca);
if(listaca.size()==0){
return Result.error("未设置年度比赛奖项");
}
TeamManagement teamManagement = new TeamManagement(); TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, request.getParameterMap()); QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, request.getParameterMap());
queryWrappertm.eq("enroll_code",list.get(i).getEnrollCode()); queryWrappertm.eq("enroll_code",list.get(i).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm); List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
try {
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());
list.get(i).setStudentorg(sysDepartService.queryDepartsByUsername(sysUser.getUsername()).get(0).getId()); list.get(i).setStudentorg(sysDepartService.queryDepartsByUsername(sysUser.getUsername()).get(0).getId());
@ -555,6 +559,9 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
return Result.error("文件导入失败:第"+(i+1)+"行奖项名称不存在"); return Result.error("文件导入失败:第"+(i+1)+"行奖项名称不存在");
} }
} }
}catch (Exception e){
return Result.error("年度比赛奖项设置中的奖项名称为空,请先设置对应等级的奖项名称");
}
} }
//update-begin-author:taoyan date:20190528 for:批量插入数据 //update-begin-author:taoyan date:20190528 for:批量插入数据
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();

Loading…
Cancel
Save