团队赛队员位次比值配置

main
zhc077 3 months ago
parent 576f2cdf28
commit b44d708635
  1. 8
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java
  2. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageService.java
  3. 23
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java

@ -48,15 +48,15 @@ public class UserHomePageController {
@AutoLog(value = "学校管理员-分析报告")
@ApiOperation(value = "河南机电-学校综合报告", notes = "河南机电-学校综合报告")
@GetMapping(value = "/report4School")
public Result report4School(String annualId, boolean recreateFlag) {
Object result = homePageService.report4School(annualId,recreateFlag);
public Result report4School(String annualid, boolean recreateFlag) {
Object result = homePageService.report4School(annualid,recreateFlag);
return Result.ok(result);
}
@AutoLog(value = "部门管理员-分析报告")
@ApiOperation(value = "河南机电-部门综合报告", notes = "河南机电-部门综合报告")
@GetMapping(value = "/report4Depart")
public Result report4Depart(String annualId,String orgCode, boolean recreateFlag) {
return Result.ok(homePageService.report4Depart(annualId,orgCode, recreateFlag));
public Result report4Depart(String annualid,String orgCode, boolean recreateFlag) {
return Result.ok(homePageService.report4Depart(annualid,orgCode, recreateFlag));
}
}

@ -8,7 +8,7 @@ public interface UserHomePageService {
Map<String, Object> homePage4School();
Object report4School(String annualId,boolean recreateFlag);
Object report4School(String year,boolean recreateFlag);
Object report4Depart(String annualId,String orgCode, boolean recreateFlag);
Object report4Depart(String year,String orgCode, boolean recreateFlag);
}

@ -374,6 +374,10 @@ public class UserHomePageServiceImpl implements UserHomePageService {
}
final String REPORT4SCHOOL = "report4School-" + currentYear;
Map<String, Object> resultMap = new LinkedHashMap<>();
boolean hasKey = redisUtil.hasKey(REPORT4SCHOOL);
if (hasKey && !recreateFlag) {
return redisUtil.get(REPORT4SCHOOL);
}
if (recreateFlag) {
//年度
Annual annual = iAnnualService.getOne(new LambdaQueryWrapper<Annual>().eq(Annual::getAnnualName, currentYear + ""));
@ -593,15 +597,15 @@ public class UserHomePageServiceImpl implements UserHomePageService {
scoreList4Point.stream().sorted(Comparator.comparing(HomePageCompVo::getTotalScore)).collect(Collectors.toList());
resultMap.put("比赛学生积分况分析", scoreList4Point);
redisUtil.set(REPORT4SCHOOL, resultMap);
return resultMap;
} else {
}/* else {
boolean hasKey = redisUtil.hasKey(REPORT4SCHOOL);
if (hasKey) {
return redisUtil.get(REPORT4SCHOOL);
} else {
return this.report4School(annualId, true);
}
}
}*/
return resultMap;
}
private List<AnnualCompPoint> convertPoint4Depart(SysDepart depart) {
@ -631,6 +635,10 @@ public class UserHomePageServiceImpl implements UserHomePageService {
currentYear = DateUtils.getCurrentYear() + "";
}
final String REPORT4DEPART = "report4Depart-" + currentYear;
boolean hasKey = redisUtil.hasKey(REPORT4DEPART);
if (hasKey && !recreateFlag) {
return redisUtil.get(REPORT4DEPART);
}
if (recreateFlag) {
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode, orgCode));
if (ObjectUtil.isNull(sysDepart)) {
@ -821,15 +829,8 @@ public class UserHomePageServiceImpl implements UserHomePageService {
}
canSaiList.add(departMap);
redisUtil.set(REPORT4DEPART, resultMap);
return resultMap;
} else {
boolean hasKey = redisUtil.hasKey(REPORT4DEPART);
if (hasKey) {
return redisUtil.get(REPORT4DEPART);
} else {
return this.report4Depart(annualId, orgCode, true);
}
}
return resultMap;
}
Map<String, Object> convertProjectLevel(List<AnnualCompPoint> annualCompPointList) {

Loading…
Cancel
Save