|
|
@ -9,9 +9,19 @@ import java.io.UnsupportedEncodingException; |
|
|
|
import java.net.URLDecoder; |
|
|
|
import java.net.URLDecoder; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.shiro.SecurityUtils; |
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
|
|
|
|
import org.jeecg.common.system.vo.LoginUser; |
|
|
|
import org.jeecg.common.util.oConvertUtils; |
|
|
|
import org.jeecg.common.util.oConvertUtils; |
|
|
|
|
|
|
|
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; |
|
|
|
|
|
|
|
import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService; |
|
|
|
|
|
|
|
import org.jeecg.modules.demo.annualcomp.entity.AnnualComp; |
|
|
|
|
|
|
|
import org.jeecg.modules.demo.annualcomp.service.IAnnualCompService; |
|
|
|
|
|
|
|
import org.jeecg.modules.demo.annualcompgroup.entity.AnnualCompGroup; |
|
|
|
|
|
|
|
import org.jeecg.modules.demo.comp.entity.Comp; |
|
|
|
|
|
|
|
import org.jeecg.modules.demo.comp.service.ICompService; |
|
|
|
import org.jeecg.modules.demo.scoresta.entity.ScoreSta; |
|
|
|
import org.jeecg.modules.demo.scoresta.entity.ScoreSta; |
|
|
|
import org.jeecg.modules.demo.scoresta.service.IScoreStaService; |
|
|
|
import org.jeecg.modules.demo.scoresta.service.IScoreStaService; |
|
|
|
|
|
|
|
|
|
|
@ -50,6 +60,12 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
|
public class ScoreStaController extends JeecgController<ScoreSta, IScoreStaService> { |
|
|
|
public class ScoreStaController extends JeecgController<ScoreSta, IScoreStaService> { |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private IScoreStaService scoreStaService; |
|
|
|
private IScoreStaService scoreStaService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private ICompService compService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private IAnnualCompService annualCompService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private IAnnualCompPointService annualCompPointService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 分页列表查询 |
|
|
|
* 分页列表查询 |
|
|
@ -67,7 +83,29 @@ public class ScoreStaController extends JeecgController<ScoreSta, IScoreStaServi |
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
|
|
HttpServletRequest req) { |
|
|
|
HttpServletRequest req) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
|
|
|
Comp comp = new Comp(); |
|
|
|
|
|
|
|
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); |
|
|
|
|
|
|
|
queryWrappercomp.like("comp_admin",user.getUsername()); |
|
|
|
|
|
|
|
List<Comp> list = compService.list(queryWrappercomp); |
|
|
|
|
|
|
|
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapperAnnual.in(ids.size()!=0,"compid",ids); |
|
|
|
|
|
|
|
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual); |
|
|
|
|
|
|
|
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList()); |
|
|
|
QueryWrapper<ScoreSta> queryWrapper = QueryGenerator.initQueryWrapper(scoreSta, req.getParameterMap()); |
|
|
|
QueryWrapper<ScoreSta> queryWrapper = QueryGenerator.initQueryWrapper(scoreSta, req.getParameterMap()); |
|
|
|
|
|
|
|
queryWrapper.in(annualIds.size()!=0,"annal_comp",annualIds); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AnnualCompPoint annualCompPoint = new AnnualCompPoint(); |
|
|
|
|
|
|
|
QueryWrapper<AnnualCompPoint> queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); |
|
|
|
|
|
|
|
queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds); |
|
|
|
|
|
|
|
queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的
|
|
|
|
|
|
|
|
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp); |
|
|
|
|
|
|
|
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
queryWrapper.in(acpIds.size()!=0,"annual_compid",acpIds); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Page<ScoreSta> page = new Page<ScoreSta>(pageNo, pageSize); |
|
|
|
Page<ScoreSta> page = new Page<ScoreSta>(pageNo, pageSize); |
|
|
|
IPage<ScoreSta> pageList = scoreStaService.page(page, queryWrapper); |
|
|
|
IPage<ScoreSta> pageList = scoreStaService.page(page, queryWrapper); |
|
|
|
return Result.OK(pageList); |
|
|
|
return Result.OK(pageList); |
|
|
|