Merge remote-tracking branch 'origin/main'

main
王家东 12 months ago
commit 453d6e123d
  1. 6
      jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/DateUtils.java
  2. 171
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  3. 32
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java
  4. 31
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/bigScreen/service/CompSystemBigScreenServiceImpl.java
  5. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expscore/controller/ExpScoreController.java
  6. 9
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expscore/entity/ExpScore.java
  7. 33
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java
  8. 6
      jeecgboot-vue3-master/src/views/expscore/ExpScore.data.ts

@ -780,12 +780,12 @@ public class DateUtils extends PropertyEditorSupport {
* @author: z.h.c
* @date: 23/11/30 15:38
*/
public static List<Integer> getLast4Year() {
public static List<Integer> getLastxYear(int lastYear) {
Calendar calendar = Calendar.getInstance(); // 创建Calendar对象并初始化为当前时间
int currentYear = calendar.get(Calendar.YEAR);
List<Integer> years = new LinkedList<>();
years.add(currentYear);
for (int i = 0; i < 4; i++) {
for (int i = 0; i < lastYear-1; i++) {
calendar.add(Calendar.YEAR, -1); // 将日期向前移动一年
int previousYear = calendar.get(Calendar.YEAR); // 获取上一年的年份
years.add(previousYear);
@ -795,7 +795,7 @@ public class DateUtils extends PropertyEditorSupport {
public static void main(String[] args) {
List<Integer> last4Year = getLast4Year();
List<Integer> last4Year = getLastxYear(1);
last4Year.forEach(y->{
System.out.println(y);
});

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

@ -11,7 +11,9 @@ import org.jeecg.modules.demo.annual.entity.Annual;
import org.jeecg.modules.demo.annual.service.IAnnualService;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService;
import org.jeecg.modules.demo.annualScore.entity.PersonalCompScore;
import org.jeecg.modules.demo.annualScore.entity.PersonalCompTotalScore;
import org.jeecg.modules.demo.annualScore.service.IPersonalCompScoreService;
import org.jeecg.modules.demo.annualScore.service.IPersonalCompTotalScoreService;
import org.jeecg.modules.demo.annualcomp.entity.AnnualComp;
import org.jeecg.modules.demo.annualcomp.service.IAnnualCompService;
@ -75,6 +77,9 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
@Autowired
private IPersonalCompTotalScoreService iPersonalCompTotalScoreService;
@Autowired
private IPersonalCompScoreService iPersonalCompScoreService;
@Autowired
private IDepartAbilityEvaluationService iDepartAbilityEvaluationService;
@ -118,19 +123,19 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
compCounts.put("pointCount", pointCount);
//总报名数数
Long count = iAnnualCompetitionProjectRegistrationService.count();
//学生人数
Long personCount = iAnnualCompetitionProjectRegistrationService.count(new LambdaQueryWrapper<AnnualCompetitionProjectRegistration>()
.eq(AnnualCompetitionProjectRegistration::getEntryFormat, "0"));
//学生人数
compCounts.put("personCompCount", personCount);
//队伍数
Long teamCount = count - personCount;
//队伍数
compCounts.put("teamCompCount", teamCount);
resultMap.put("compCounts", compCounts);
List<DepartAbilityEvaluation> departAbilityEvaluations = iDepartAbilityEvaluationService.list();
resultMap.put("departAbilityEvaluation", departAbilityEvaluations);
List<Integer> years = DateUtils.getLast4Year();
List<Integer> years = DateUtils.getLastxYear(5);
List<Annual> annualList = iAnnualService.list(new LambdaQueryWrapper<Annual>().in(Annual::getAnnualName, years).orderByAsc(Annual::getAnnualName));
List<Last5YearDataVo> last5YearDataVos = new LinkedList<>();
Optional.ofNullable(annualList).orElse(new LinkedList<>()).stream().forEach(annual -> {
@ -182,8 +187,26 @@ public class CompSystemBigScreenServiceImpl implements CompSystemBigScreenServic
AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(award.getAnnualCompP());
award.setAnnualCompPname(annualCompPoint.getObjName());
});
studentInfoMap.put("awardList", awardPersions);
studentInfoMap.put("studentAwardList", awardPersions);
List<Map<String, Object>> last4YearData = new LinkedList<>();
List<Integer> years = DateUtils.getLastxYear(4);
List<Annual> annualList = iAnnualService.list(new LambdaQueryWrapper<Annual>().in(Annual::getAnnualName, years).orderByAsc(Annual::getAnnualName));
annualList.forEach(annual -> {
AtomicReference<BigDecimal> baseScore = new AtomicReference<>(BigDecimal.ZERO);
Map<String, Object> yearData = new LinkedHashMap<>();
yearData.put("year", annual.getAnnualName());
List<PersonalCompScore> compScoreList = iPersonalCompScoreService.list(new LambdaQueryWrapper<PersonalCompScore>()
.eq(PersonalCompScore::getWorkOn, person.getWorkOn())
.eq(PersonalCompScore::getAnnualId, annual.getId()));
if (!ObjectUtils.isEmpty(compScoreList)) {
double sum = compScoreList.stream().mapToDouble(PersonalCompScore::getScore).sum();
baseScore.getAndUpdate(val -> val.add(new BigDecimal(sum)));
}
yearData.put("score", baseScore);
last4YearData.add(yearData);
});
studentInfoMap.put("last4YearData", last4YearData);
studentInfoMap.put("workNo", person.getWorkOn());
studentInfoMap.put("name", sysUser.getRealname());
studentInfoMap.put("major", "软件工程");

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

@ -34,6 +34,12 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'upfilePersionId_dictText'
},
{
title: '作品文件',
align: "center",
dataIndex: 'file',
slots: { customRender: 'fileSlot' },
},
{
title: '成绩',
align: "center",

Loading…
Cancel
Save