|
|
|
@ -1741,7 +1741,7 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value="学生角色分析报告数据接口", notes="学生角色分析报告数据接口") |
|
|
|
|
@GetMapping(value = "/xsfxbg") |
|
|
|
|
public Result<?> xsfxbg( HttpServletRequest req,@RequestParam(name = "recreateFlag") boolean recreateFlag) { |
|
|
|
|
public Result<?> xsfxbg( HttpServletRequest req,@RequestParam(name = "recreateFlag") boolean recreateFlag,@RequestParam(name = "annualid") String annualid) { |
|
|
|
|
|
|
|
|
|
final String XSFXBG = "xsfxbg"; |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
@ -1762,6 +1762,22 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); |
|
|
|
|
queryWrapperbm.in("enroll_code",bmbhs); |
|
|
|
|
queryWrapperbm.eq("enroll_static", "2"); |
|
|
|
|
//年度id传过来后需要根据年度id查询有哪些年度比赛,根据年度比赛查询年度比赛项目,然后把得到的年度比赛项目id加到条件中
|
|
|
|
|
if(!annualid.equals("")){ |
|
|
|
|
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>(); |
|
|
|
|
queryWrapperAnnual.eq("annualid",annualid); |
|
|
|
|
List<AnnualComp> listac = annualCompService.list(queryWrapperAnnual); |
|
|
|
|
if(listac.size()>0){ |
|
|
|
|
List<String> tjndbsids = listac.stream().map(AnnualComp::getId).collect(Collectors.toList()); |
|
|
|
|
QueryWrapper<AnnualCompPoint> queryWrapperacpt = new QueryWrapper<>(); |
|
|
|
|
queryWrapperacpt.in("annual_comp_id",tjndbsids); |
|
|
|
|
List<AnnualCompPoint> listacpt = annualCompPointService.list(queryWrapperacpt); |
|
|
|
|
if(listacpt.size()>0){ |
|
|
|
|
List<String> tjndbsxmids = listacpt.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); |
|
|
|
|
queryWrapperbm.in("annual_compid",tjndbsxmids); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
List<AnnualCompetitionProjectRegistration> listbm = annualCompetitionProjectRegistrationService.list(queryWrapperbm); |
|
|
|
|
//参加比赛项目数量
|
|
|
|
|
map.put("cjbsxmsl",listbm.size()); |
|
|
|
@ -2019,7 +2035,7 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
if (hasKey) { |
|
|
|
|
return Result.OK(redisUtil.get(XSFXBG)); |
|
|
|
|
} else { |
|
|
|
|
return this.xsfxbg(req,true); |
|
|
|
|
return this.xsfxbg(req,true,annualid); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -2033,7 +2049,7 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value="组委会角色分析报告比赛数据接口", notes="组委会角色分析报告比赛数据接口") |
|
|
|
|
@GetMapping(value = "/zwhfxbg") |
|
|
|
|
public Result<?> zwhfxbg( HttpServletRequest req,@RequestParam(name = "recreateFlag") boolean recreateFlag) { |
|
|
|
|
public Result<?> zwhfxbg( HttpServletRequest req,@RequestParam(name = "recreateFlag") boolean recreateFlag,@RequestParam(name = "annualid") String annualid) { |
|
|
|
|
final String ZWHFXBG = "zwhfxbg"; |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
if (recreateFlag) { |
|
|
|
@ -2048,6 +2064,10 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList()); |
|
|
|
|
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>(); |
|
|
|
|
queryWrapperAnnual.in(ids.size() != 0, "compid", ids); |
|
|
|
|
//加上判断如果年度id传过来就加上条件
|
|
|
|
|
if(!annualid.equals("")){ |
|
|
|
|
queryWrapperAnnual.eq("annualid",annualid); |
|
|
|
|
} |
|
|
|
|
queryWrapperAnnual.orderByDesc("create_time"); |
|
|
|
|
List<AnnualComp> annualCompList = annualCompService.list(queryWrapperAnnual); |
|
|
|
|
if (annualCompList.size() > 0) { |
|
|
|
@ -2395,7 +2415,7 @@ public class AnnualCompetitionProjectRegistrationController { |
|
|
|
|
if (hasKey) { |
|
|
|
|
return Result.OK(redisUtil.get(ZWHFXBG)); |
|
|
|
|
} else { |
|
|
|
|
return this.zwhfxbg(req,true); |
|
|
|
|
return this.zwhfxbg(req,true,annualid); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|