|
|
|
@ -14,6 +14,7 @@ import org.jeecg.common.api.vo.Result; |
|
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
|
import org.jeecg.common.system.vo.LoginUser; |
|
|
|
|
import org.jeecg.common.util.RedisUtil; |
|
|
|
|
import org.jeecg.common.util.oConvertUtils; |
|
|
|
|
import org.jeecg.modules.demo.annual.service.IAnnualService; |
|
|
|
|
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; |
|
|
|
@ -96,6 +97,8 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
private IAwardPersionService awardPersionService; |
|
|
|
|
@Autowired |
|
|
|
|
private IPersonalCompScoreService personalCompScoreService; |
|
|
|
|
@Autowired |
|
|
|
|
private RedisUtil redisUtil; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -1215,14 +1218,17 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value="组委会角色首页比赛数据接口", notes="组委会角色首页比赛数据接口") |
|
|
|
|
@GetMapping(value = "/zwhsybsjs") |
|
|
|
|
public Result<?> zwhsybsjs( HttpServletRequest req) { |
|
|
|
|
public Result<?> zwhsybsjs( HttpServletRequest req,@RequestParam(name = "recreateFlag") boolean recreateFlag) { |
|
|
|
|
final String ZWHSYBSJS = "zwhsybsjs"; |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
if (recreateFlag) { |
|
|
|
|
//获取当前登录用户 最新的年度比赛记录
|
|
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
Comp comp = new Comp(); |
|
|
|
|
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); |
|
|
|
|
queryWrappercomp.eq("comp_admin", user.getUsername()); |
|
|
|
|
List<Comp> list = compService.list(queryWrappercomp); |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
if (list.size() > 0) { |
|
|
|
|
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList()); |
|
|
|
|
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>(); |
|
|
|
@ -1443,8 +1449,16 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
redisUtil.set(ZWHSYBSJS, map); |
|
|
|
|
return Result.OK(map); |
|
|
|
|
}else { |
|
|
|
|
boolean hasKey = redisUtil.hasKey(ZWHSYBSJS); |
|
|
|
|
if (hasKey) { |
|
|
|
|
return Result.OK(redisUtil.get(ZWHSYBSJS)); |
|
|
|
|
} else { |
|
|
|
|
return this.zwhsybsjs(req,true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1456,7 +1470,11 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value="学生角色首页比赛数据接口", notes="学生角色首页比赛数据接口") |
|
|
|
|
@GetMapping(value = "/xssybsjs") |
|
|
|
|
public Result<?> xssybsjs( HttpServletRequest req) { |
|
|
|
|
public Result<?> xssybsjs( HttpServletRequest req,@RequestParam(name = "recreateFlag") boolean recreateFlag) { |
|
|
|
|
|
|
|
|
|
final String XSSYBSJS = "xssybsjs"; |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
if (recreateFlag) { |
|
|
|
|
//获取当前登录用户
|
|
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
String wonk = sysUserService.getById(user.getId()).getWorkNo(); |
|
|
|
@ -1464,7 +1482,7 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); |
|
|
|
|
queryWrappertm.eq("user_id",user.getId()); |
|
|
|
|
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm); |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
if(listtm.size()!=0){ |
|
|
|
|
//学生参加比赛的所有报名编号
|
|
|
|
|
List<String> bmbhs = listtm.stream().map(TeamManagement::getEnrollCode).collect(Collectors.toList()); |
|
|
|
@ -1702,8 +1720,17 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
map.put("allApList",allApListMap); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
redisUtil.set(XSSYBSJS, map); |
|
|
|
|
|
|
|
|
|
return Result.OK(map); |
|
|
|
|
}else { |
|
|
|
|
boolean hasKey = redisUtil.hasKey(XSSYBSJS); |
|
|
|
|
if (hasKey) { |
|
|
|
|
return Result.OK(redisUtil.get(XSSYBSJS)); |
|
|
|
|
} else { |
|
|
|
|
return this.xssybsjs(req,true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -1714,7 +1741,11 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value="学生角色分析报告数据接口", notes="学生角色分析报告数据接口") |
|
|
|
|
@GetMapping(value = "/xsfxbg") |
|
|
|
|
public Result<?> xsfxbg( HttpServletRequest req) { |
|
|
|
|
public Result<?> xsfxbg( HttpServletRequest req,@RequestParam(name = "recreateFlag") boolean recreateFlag) { |
|
|
|
|
|
|
|
|
|
final String XSFXBG = "xsfxbg"; |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
if (recreateFlag) { |
|
|
|
|
//获取当前登录用户
|
|
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
String wonk = sysUserService.getById(user.getId()).getWorkNo(); |
|
|
|
@ -1722,7 +1753,7 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap()); |
|
|
|
|
queryWrappertm.eq("user_id",user.getId()); |
|
|
|
|
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm); |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
if(listtm.size()!=0){ |
|
|
|
|
//学生参加比赛的所有报名编号
|
|
|
|
|
List<String> bmbhs = listtm.stream().map(TeamManagement::getEnrollCode).collect(Collectors.toList()); |
|
|
|
@ -1981,8 +2012,16 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
map.put("allApList",allApListMap); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redisUtil.set(XSFXBG, map); |
|
|
|
|
return Result.OK(map); |
|
|
|
|
}else { |
|
|
|
|
boolean hasKey = redisUtil.hasKey(XSFXBG); |
|
|
|
|
if (hasKey) { |
|
|
|
|
return Result.OK(redisUtil.get(XSFXBG)); |
|
|
|
|
} else { |
|
|
|
|
return this.xsfxbg(req,true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1994,14 +2033,17 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value="组委会角色分析报告比赛数据接口", notes="组委会角色分析报告比赛数据接口") |
|
|
|
|
@GetMapping(value = "/zwhfxbg") |
|
|
|
|
public Result<?> zwhfxbg( HttpServletRequest req) { |
|
|
|
|
public Result<?> zwhfxbg( HttpServletRequest req,@RequestParam(name = "recreateFlag") boolean recreateFlag) { |
|
|
|
|
final String ZWHFXBG = "zwhfxbg"; |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
if (recreateFlag) { |
|
|
|
|
//获取当前登录用户 最新的年度比赛记录
|
|
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
Comp comp = new Comp(); |
|
|
|
|
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); |
|
|
|
|
queryWrappercomp.eq("comp_admin", user.getUsername()); |
|
|
|
|
List<Comp> list = compService.list(queryWrappercomp); |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
if (list.size() > 0) { |
|
|
|
|
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList()); |
|
|
|
|
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>(); |
|
|
|
@ -2345,7 +2387,17 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
redisUtil.set(ZWHFXBG, map); |
|
|
|
|
return Result.OK(map); |
|
|
|
|
|
|
|
|
|
}else { |
|
|
|
|
boolean hasKey = redisUtil.hasKey(ZWHFXBG); |
|
|
|
|
if (hasKey) { |
|
|
|
|
return Result.OK(redisUtil.get(ZWHFXBG)); |
|
|
|
|
} else { |
|
|
|
|
return this.zwhfxbg(req,true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|