main
Gitea 12 months ago
parent 35a6aa9998
commit 20c51f1ca5
  1. 171
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  2. 32
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java
  3. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expscore/controller/ExpScoreController.java
  4. 9
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expscore/entity/ExpScore.java
  5. 33
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java

@ -557,22 +557,25 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
String name1 = list.get(i).getFirstPrize();
String num1 = list.get(i).getFirstNum();
for(int j = 0 ; j < Integer.valueOf(num1);j++){
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
awardPersion1.setAnnualCompP(listsp.get(j).getAnnualCompP());
awardPersion1.setEnrollCode(listsp.get(j).getEnrollCode());
awardPersion1.setAwardname(name1);
awardPersion1.setAwardsort(1);
awardPersion1.setAwardid(list.get(i).getId());
TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap());
queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
awardPersion.setStudentname(sysUser.getRealname());
awardPersion.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
if(j<listsp.size()){
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
awardPersion1.setAnnualCompP(listsp.get(j).getAnnualCompP());
awardPersion1.setEnrollCode(listsp.get(j).getEnrollCode());
awardPersion1.setAwardname(name1);
awardPersion1.setAwardsort(1);
awardPersion1.setAwardid(list.get(i).getId());
TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap());
queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
awardPersion1.setStudentname(sysUser.getRealname());
awardPersion1.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
}
}
}
if(list.get(i).getIsSecondPrize().equals("Y")){
@ -580,22 +583,24 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
String num1 = list.get(i).getFirstNum();
String num2 = list.get(i).getSecondNum();
for(int j = Integer.valueOf(num1) ; j < (Integer.valueOf(num1)+Integer.valueOf(num2));j++){
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
awardPersion1.setAnnualCompP(listsp.get(j).getAnnualCompP());
awardPersion1.setEnrollCode(listsp.get(j).getEnrollCode());
awardPersion1.setAwardname(name2);
awardPersion1.setAwardsort(2);
awardPersion1.setAwardid(list.get(i).getId());
TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap());
queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
awardPersion.setStudentname(sysUser.getRealname());
awardPersion.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
if(j<listsp.size()) {
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
awardPersion1.setAnnualCompP(listsp.get(j).getAnnualCompP());
awardPersion1.setEnrollCode(listsp.get(j).getEnrollCode());
awardPersion1.setAwardname(name2);
awardPersion1.setAwardsort(2);
awardPersion1.setAwardid(list.get(i).getId());
TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap());
queryWrappertm.eq("enroll_code", listsp.get(j).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
awardPersion1.setStudentname(sysUser.getRealname());
awardPersion1.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
}
}
}
if(list.get(i).getIsThirdPrize().equals("Y")){
@ -604,22 +609,24 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
String num1 = list.get(i).getFirstNum();
String num2 = list.get(i).getSecondNum();
for(int j = (Integer.valueOf(num1)+Integer.valueOf(num2)) ; j < (Integer.valueOf(num1)+Integer.valueOf(num2)+Integer.valueOf(num3));j++){
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
awardPersion1.setAnnualCompP(listsp.get(j).getAnnualCompP());
awardPersion1.setEnrollCode(listsp.get(j).getEnrollCode());
awardPersion1.setAwardname(name3);
awardPersion1.setAwardsort(3);
awardPersion1.setAwardid(list.get(i).getId());
TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap());
queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
awardPersion.setStudentname(sysUser.getRealname());
awardPersion.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
if(j<listsp.size()) {
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
awardPersion1.setAnnualCompP(listsp.get(j).getAnnualCompP());
awardPersion1.setEnrollCode(listsp.get(j).getEnrollCode());
awardPersion1.setAwardname(name3);
awardPersion1.setAwardsort(3);
awardPersion1.setAwardid(list.get(i).getId());
TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap());
queryWrappertm.eq("enroll_code", listsp.get(j).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
awardPersion1.setStudentname(sysUser.getRealname());
awardPersion1.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
}
}
}
if(list.get(i).getIsFourthPrize().equals("Y")){
@ -629,22 +636,24 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
String num1 = list.get(i).getFirstNum();
String num2 = list.get(i).getSecondNum();
for(int j = (Integer.valueOf(num1)+Integer.valueOf(num2)+Integer.valueOf(num3)) ; j < (Integer.valueOf(num1)+Integer.valueOf(num2)+Integer.valueOf(num3)+Integer.valueOf(num4));j++){
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
awardPersion1.setAnnualCompP(listsp.get(j).getAnnualCompP());
awardPersion1.setEnrollCode(listsp.get(j).getEnrollCode());
awardPersion1.setAwardname(name4);
awardPersion1.setAwardsort(4);
awardPersion1.setAwardid(list.get(i).getId());
TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap());
queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
awardPersion.setStudentname(sysUser.getRealname());
awardPersion.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
if(j<listsp.size()) {
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
awardPersion1.setAnnualCompP(listsp.get(j).getAnnualCompP());
awardPersion1.setEnrollCode(listsp.get(j).getEnrollCode());
awardPersion1.setAwardname(name4);
awardPersion1.setAwardsort(4);
awardPersion1.setAwardid(list.get(i).getId());
TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap());
queryWrappertm.eq("enroll_code", listsp.get(j).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
awardPersion1.setStudentname(sysUser.getRealname());
awardPersion1.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
}
}
}
if(list.get(i).getIsFifthPrize().equals("Y")){
@ -655,22 +664,24 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
String num1 = list.get(i).getFirstNum();
String num2 = list.get(i).getSecondNum();
for(int j = (Integer.valueOf(num1)+Integer.valueOf(num2)+Integer.valueOf(num3)+Integer.valueOf(num4)) ; j < (Integer.valueOf(num1)+Integer.valueOf(num2)+Integer.valueOf(num3)+Integer.valueOf(num4)+Integer.valueOf(num5));j++){
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
awardPersion1.setAnnualCompP(listsp.get(j).getAnnualCompP());
awardPersion1.setEnrollCode(listsp.get(j).getEnrollCode());
awardPersion1.setAwardname(name5);
awardPersion1.setAwardsort(5);
awardPersion1.setAwardid(list.get(i).getId());
TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap());
queryWrappertm.eq("enroll_code",listsp.get(j).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
awardPersion.setStudentname(sysUser.getRealname());
awardPersion.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
if(j<listsp.size()) {
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
awardPersion1.setAnnualCompP(listsp.get(j).getAnnualCompP());
awardPersion1.setEnrollCode(listsp.get(j).getEnrollCode());
awardPersion1.setAwardname(name5);
awardPersion1.setAwardsort(5);
awardPersion1.setAwardid(list.get(i).getId());
TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap());
queryWrappertm.eq("enroll_code", listsp.get(j).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
awardPersion1.setStudentname(sysUser.getRealname());
awardPersion1.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
}
}
}
annualCompPoint.setIsPj(1);

@ -15,6 +15,10 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
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.annualcompgroup.service.IAnnualCompGroupService;
@ -23,6 +27,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersion;
import org.jeecg.modules.demo.comp.entity.Comp;
import org.jeecg.modules.demo.comp.service.ICompService;
import org.jeecg.modules.demo.scoresta.entity.ScoreSta;
@ -64,6 +69,12 @@ public class AnnualCompGroupController extends JeecgController<AnnualCompGroup,
@Autowired
private IScoreStaService scoreStaService;
@Autowired
private IAnnualCompService annualCompService;
@Autowired
private IAnnualCompPointService annualCompPointService;
/**
* 分页列表查询
@ -81,7 +92,28 @@ public class AnnualCompGroupController extends JeecgController<AnnualCompGroup,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
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<AnnualCompGroup> queryWrapper = QueryGenerator.initQueryWrapper(annualCompGroup, 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,"ann_comp_p",acpIds);
Page<AnnualCompGroup> page = new Page<AnnualCompGroup>(pageNo, pageSize);
IPage<AnnualCompGroup> pageList = annualCompGroupService.page(page, queryWrapper);
return Result.OK(pageList);

@ -144,6 +144,10 @@ public class ExpScoreController extends JeecgController<ExpScore, IExpScoreServi
queryWrapper.eq("topid",annComGroTop.getTopid());
Page<ExpScore> page = new Page<ExpScore>(pageNo, pageSize);
IPage<ExpScore> pageList = expScoreService.page(page, queryWrapper);
for (int k = 0 ; k < pageList.getRecords().size();k++){
pageList.getRecords().get(k).setFile(upfilePersionService.getById(pageList.getRecords().get(k).getUpfilePersionId()).getUrl());
}
return Result.OK(pageList);
}

@ -4,10 +4,8 @@ import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
@ -84,6 +82,9 @@ public class ExpScore implements Serializable {
@Dict(dictTable = "upfile_persion", dicText = "topic_name", dicCode = "id")
@ApiModelProperty(value = "作品")
private java.lang.String upfilePersionId;
/**作品文件*/
@TableField(exist = false)
private java.lang.String file;
/**评分标准id*/
@Excel(name = "评分标准id", width = 15)
@ApiModelProperty(value = "评分标准id")

@ -21,12 +21,17 @@ import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.JeecgBaseConfig;
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.annualcompaward.entity.AnnualCompAward;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.entity.AnnualCompetitionProjectRegistration;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.IAnnualCompetitionProjectRegistrationService;
import org.jeecg.modules.demo.annualcompgroup.entity.AnnualCompGroup;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersion;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersionMb;
import org.jeecg.modules.demo.awardpersion.service.IAwardPersionService;
import org.jeecg.modules.demo.comp.entity.Comp;
import org.jeecg.modules.demo.comp.service.ICompService;
import org.jeecg.modules.demo.scorepersion.entity.ScorePersion;
import org.jeecg.modules.demo.scorepersion.entity.ScorePersionMb;
import org.jeecg.modules.demo.scorepersion.service.IScorePersionService;
@ -72,6 +77,13 @@ public class ScorePersionController extends JeecgController<ScorePersion, IScore
private IAnnualCompetitionProjectRegistrationService annualCompetitionProjectRegistrationService;
@Autowired
private IAnnualCompPointService annualCompPointService;
@Autowired
private IAnnualCompService annualCompService;
@Autowired
private ICompService compService;
@Resource
private JeecgBaseConfig jeecgBaseConfig;
/**
@ -90,7 +102,28 @@ public class ScorePersionController extends JeecgController<ScorePersion, IScore
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
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<ScorePersion> queryWrapper = QueryGenerator.initQueryWrapper(scorePersion, req.getParameterMap());
queryWrapper.in(annualIds.size()!=0,"annual_compid",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_comp_p",acpIds);
Page<ScorePersion> page = new Page<ScorePersion>(pageNo, pageSize);
IPage<ScorePersion> pageList = scorePersionService.page(page, queryWrapper);
return Result.OK(pageList);

Loading…
Cancel
Save