分析报告加上年度条件,以及专家首页加上年度和层次

main
Gitea 3 months ago
parent c8d81da298
commit 8819bd3c33
  1. 16
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  2. 28
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java

@ -50,6 +50,7 @@ import org.jeecg.modules.demo.expert.entity.Expert;
import org.jeecg.modules.demo.expert.service.IExpertService;
import org.jeecg.modules.demo.expscore.entity.ExpScore;
import org.jeecg.modules.demo.expscore.service.IExpScoreService;
import org.jeecg.modules.demo.projectlevel.service.IProjectlevelService;
import org.jeecg.modules.demo.score_management.entity.ScoreManagement;
import org.jeecg.modules.demo.scorepersion.entity.ScorePersion;
import org.jeecg.modules.demo.scorepersion.service.IScorePersionService;
@ -139,6 +140,9 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
@Autowired
private IInstructorSheetService instructorSheetService;
@Autowired
private IProjectlevelService projectlevelService;
/**
* 分页列表查询
@ -1415,6 +1419,9 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
mapall1.put("xh",p+1);
mapall1.put("ndbs",annualCompService.getById(listacp.get(p).getAnnualCompId()).getName());
mapall1.put("ndbsxm",listacp.get(p).getObjName());
//加上年度和层次
mapall1.put("nd",annualService.getById(annualCompService.getById(listacp.get(p).getAnnualCompId()).getAnnualid()).getAnnualName());
mapall1.put("cc",projectlevelService.getById(listacp.get(p).getObjLevel()).getName());
jxzListMap.add(mapall1);
}
}else{
@ -1423,6 +1430,9 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
mapall2.put("xh",o+1);
mapall2.put("ndbs",annualCompService.getById(listacp.get(o).getAnnualCompId()).getName());
mapall2.put("ndbsxm",listacp.get(o).getObjName());
//加上年度和层次
mapall2.put("nd",annualService.getById(annualCompService.getById(listacp.get(o).getAnnualCompId()).getAnnualid()).getAnnualName());
mapall2.put("cc",projectlevelService.getById(listacp.get(o).getObjLevel()).getName());
jxzListMap.add(mapall2);
}
}
@ -1440,6 +1450,9 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
mapall3.put("xh",q+1);
mapall3.put("ndbs",annualCompService.getById(listacpls.get(q).getAnnualCompId()).getName());
mapall3.put("ndbsxm",listacpls.get(q).getObjName());
//加上年度和层次
mapall3.put("nd",annualService.getById(annualCompService.getById(listacpls.get(q).getAnnualCompId()).getAnnualid()).getAnnualName());
mapall3.put("cc",projectlevelService.getById(listacpls.get(q).getObjLevel()).getName());
lsListMap.add(mapall3);
}
}else{
@ -1448,6 +1461,9 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
mapall4.put("xh",w+1);
mapall4.put("ndbs",annualCompService.getById(listacpls.get(w).getAnnualCompId()).getName());
mapall4.put("ndbsxm",listacpls.get(w).getObjName());
//加上年度和层次
mapall4.put("nd",annualService.getById(annualCompService.getById(listacpls.get(w).getAnnualCompId()).getAnnualid()).getAnnualName());
mapall4.put("cc",projectlevelService.getById(listacpls.get(w).getObjLevel()).getName());
lsListMap.add(mapall4);
}
}

@ -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);
}
}
}

Loading…
Cancel
Save