main
Gitea 12 months ago
parent 35a6aa9998
commit 20c51f1ca5
  1. 31
      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,6 +557,7 @@ 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++){
if(j<listsp.size()){
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
@ -570,16 +571,19 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
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());
awardPersion1.setStudentname(sysUser.getRealname());
awardPersion1.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
}
}
}
if(list.get(i).getIsSecondPrize().equals("Y")){
String name2 = list.get(i).getSecondPrize();
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++){
if(j<listsp.size()) {
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
@ -593,17 +597,19 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
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());
awardPersion1.setStudentname(sysUser.getRealname());
awardPersion1.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
}
}
}
if(list.get(i).getIsThirdPrize().equals("Y")){
String name3 = list.get(i).getThirdPrize();
String num3 = list.get(i).getThirdNum();
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++){
if(j<listsp.size()) {
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
@ -617,11 +623,12 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
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());
awardPersion1.setStudentname(sysUser.getRealname());
awardPersion1.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
}
}
}
if(list.get(i).getIsFourthPrize().equals("Y")){
String name4 = list.get(i).getFourthPrize();
String num4 = list.get(i).getFourthNum();
@ -629,6 +636,7 @@ 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++){
if(j<listsp.size()) {
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
@ -642,11 +650,12 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
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());
awardPersion1.setStudentname(sysUser.getRealname());
awardPersion1.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
}
}
}
if(list.get(i).getIsFifthPrize().equals("Y")){
String name5 = list.get(i).getFifthPrize();
String num5 = list.get(i).getFifthNum();
@ -655,6 +664,7 @@ 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++){
if(j<listsp.size()) {
AwardPersion awardPersion1 = new AwardPersion();
awardPersion1.setAnnualid(listsp.get(j).getAnnualid());
awardPersion1.setAnnalComp(listsp.get(j).getAnnualCompid());
@ -668,11 +678,12 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
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());
awardPersion1.setStudentname(sysUser.getRealname());
awardPersion1.setStudentcode(sysUser.getUsername());
awardPersionService.save(awardPersion1);
}
}
}
annualCompPoint.setIsPj(1);
annualCompPointService.updateById(annualCompPoint);
}

@ -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