|
@ -14,11 +14,13 @@ import com.ccsens.mt.bean.vo.TableVo; |
|
|
import com.ccsens.mt.persist.dao.*; |
|
|
import com.ccsens.mt.persist.dao.*; |
|
|
import com.ccsens.mt.persist.mapper.*; |
|
|
import com.ccsens.mt.persist.mapper.*; |
|
|
import com.ccsens.mt.util.Constant; |
|
|
import com.ccsens.mt.util.Constant; |
|
|
|
|
|
import com.ccsens.util.CodeEnum; |
|
|
import com.ccsens.util.PoiUtil; |
|
|
import com.ccsens.util.PoiUtil; |
|
|
import com.ccsens.util.PropUtil; |
|
|
import com.ccsens.util.PropUtil; |
|
|
import com.ccsens.util.WebConstant; |
|
|
import com.ccsens.util.WebConstant; |
|
|
|
|
|
|
|
|
import com.ccsens.util.bean.dto.QueryDto; |
|
|
import com.ccsens.util.bean.dto.QueryDto; |
|
|
|
|
|
import com.ccsens.util.exception.BaseException; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
@ -1332,17 +1334,18 @@ public class ExcelService implements IExcelService { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public String patternExpTable(ScoreDto.ShowResultW param) { |
|
|
public String patternExpTable(ScoreDto.ShowResultW param) { |
|
|
List<CompeteVo.TotalScoreDisplay> totalScoreDisplays = competeService.showResultPage(param); |
|
|
//List<CompeteVo.TotalScoreDisplay> totalScoreDisplays = competeService.showResultPage(param);
|
|
|
|
|
|
List<CompeteVo.TotalScoreDisplay> totalScoreDisplays = competeScoreDao.queryVarietyScore(param.getProjectId()); |
|
|
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>(); |
|
|
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>(); |
|
|
List<PoiUtil.PoiUtilCell> zero=new ArrayList<>(); |
|
|
List<PoiUtil.PoiUtilCell> zero=new ArrayList<>(); |
|
|
PoiUtil.PoiUtilCell zeroOne=new PoiUtil.PoiUtilCell("比赛成绩公示(花样赛)", 14, 1); |
|
|
PoiUtil.PoiUtilCell zeroOne=new PoiUtil.PoiUtilCell("比赛成绩公示(花样赛)", 14, 1); |
|
|
zero.add(zeroOne); |
|
|
zero.add(zeroOne); |
|
|
list.add(zero); |
|
|
list.add(zero); |
|
|
List<PoiUtil.PoiUtilCell> one=new ArrayList<>(); |
|
|
List<PoiUtil.PoiUtilCell> one=new ArrayList<>(); |
|
|
PoiUtil.PoiUtilCell oneOne=new PoiUtil.PoiUtilCell("参赛单位", 1, 1); |
|
|
PoiUtil.PoiUtilCell oneOne=new PoiUtil.PoiUtilCell("参赛单位", 1, 2); |
|
|
PoiUtil.PoiUtilCell oneTwo=new PoiUtil.PoiUtilCell("参赛队员", 1, 1); |
|
|
PoiUtil.PoiUtilCell oneTwo=new PoiUtil.PoiUtilCell("参赛队员", 1, 2); |
|
|
PoiUtil.PoiUtilCell oneThree=new PoiUtil.PoiUtilCell("创意编排分", 3, 1); |
|
|
PoiUtil.PoiUtilCell oneThree=new PoiUtil.PoiUtilCell("创意编排分", 3, 1); |
|
|
PoiUtil.PoiUtilCell oneFour=new PoiUtil.PoiUtilCell("创意最后得分", 1, 1); |
|
|
PoiUtil.PoiUtilCell oneFour=new PoiUtil.PoiUtilCell("创意最后得分", 1, 2); |
|
|
PoiUtil.PoiUtilCell oneFive=new PoiUtil.PoiUtilCell("完成质量分", 3, 1); |
|
|
PoiUtil.PoiUtilCell oneFive=new PoiUtil.PoiUtilCell("完成质量分", 3, 1); |
|
|
PoiUtil.PoiUtilCell oneSix=new PoiUtil.PoiUtilCell("完成最后得分", 1, 2); |
|
|
PoiUtil.PoiUtilCell oneSix=new PoiUtil.PoiUtilCell("完成最后得分", 1, 2); |
|
|
PoiUtil.PoiUtilCell oneSeven=new PoiUtil.PoiUtilCell("主裁判扣分", 1, 2); |
|
|
PoiUtil.PoiUtilCell oneSeven=new PoiUtil.PoiUtilCell("主裁判扣分", 1, 2); |
|
@ -1352,8 +1355,13 @@ public class ExcelService implements IExcelService { |
|
|
one.add(oneOne); |
|
|
one.add(oneOne); |
|
|
one.add(oneTwo); |
|
|
one.add(oneTwo); |
|
|
one.add(oneThree); |
|
|
one.add(oneThree); |
|
|
|
|
|
one.add(new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL) ); |
|
|
|
|
|
one.add(new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL) ); |
|
|
one.add(oneFour); |
|
|
one.add(oneFour); |
|
|
|
|
|
|
|
|
one.add(oneFive); |
|
|
one.add(oneFive); |
|
|
|
|
|
one.add(new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL) ); |
|
|
|
|
|
one.add(new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL) ); |
|
|
one.add(oneSix); |
|
|
one.add(oneSix); |
|
|
one.add(oneSeven); |
|
|
one.add(oneSeven); |
|
|
one.add(oneEight); |
|
|
one.add(oneEight); |
|
@ -1361,8 +1369,8 @@ public class ExcelService implements IExcelService { |
|
|
one.add(oneTen); |
|
|
one.add(oneTen); |
|
|
list.add(one); |
|
|
list.add(one); |
|
|
List<PoiUtil.PoiUtilCell> two = new ArrayList<>(); |
|
|
List<PoiUtil.PoiUtilCell> two = new ArrayList<>(); |
|
|
PoiUtil.PoiUtilCell twoOne = new PoiUtil.PoiUtilCell(); |
|
|
PoiUtil.PoiUtilCell twoOne = new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL); |
|
|
PoiUtil.PoiUtilCell twoTwo = new PoiUtil.PoiUtilCell(); |
|
|
PoiUtil.PoiUtilCell twoTwo = new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL); |
|
|
PoiUtil.PoiUtilCell twoThree = new PoiUtil.PoiUtilCell("1", 1, 1); |
|
|
PoiUtil.PoiUtilCell twoThree = new PoiUtil.PoiUtilCell("1", 1, 1); |
|
|
PoiUtil.PoiUtilCell twoFour = new PoiUtil.PoiUtilCell("2", 1, 1); |
|
|
PoiUtil.PoiUtilCell twoFour = new PoiUtil.PoiUtilCell("2", 1, 1); |
|
|
PoiUtil.PoiUtilCell twoFive = new PoiUtil.PoiUtilCell("3", 1, 1); |
|
|
PoiUtil.PoiUtilCell twoFive = new PoiUtil.PoiUtilCell("3", 1, 1); |
|
@ -1386,7 +1394,7 @@ public class ExcelService implements IExcelService { |
|
|
PoiUtil.PoiUtilCell threeTwo = new PoiUtil.PoiUtilCell(mes.getPeopleName(), 1, 1); |
|
|
PoiUtil.PoiUtilCell threeTwo = new PoiUtil.PoiUtilCell(mes.getPeopleName(), 1, 1); |
|
|
three.add(threeOne); |
|
|
three.add(threeOne); |
|
|
three.add(threeTwo); |
|
|
three.add(threeTwo); |
|
|
if(mes.getRemark()==(byte)0){ |
|
|
if(true){ |
|
|
PoiUtil.PoiUtilCell threeThree=new PoiUtil.PoiUtilCell(StringUtil.valueOf(mes.getReferee1()),1,1); |
|
|
PoiUtil.PoiUtilCell threeThree=new PoiUtil.PoiUtilCell(StringUtil.valueOf(mes.getReferee1()),1,1); |
|
|
PoiUtil.PoiUtilCell threeFive=new PoiUtil.PoiUtilCell(StringUtil.valueOf(mes.getReferee2()),1,1); |
|
|
PoiUtil.PoiUtilCell threeFive=new PoiUtil.PoiUtilCell(StringUtil.valueOf(mes.getReferee2()),1,1); |
|
|
PoiUtil.PoiUtilCell threeSix=new PoiUtil.PoiUtilCell(StringUtil.valueOf(mes.getReferee3()),1,1); |
|
|
PoiUtil.PoiUtilCell threeSix=new PoiUtil.PoiUtilCell(StringUtil.valueOf(mes.getReferee3()),1,1); |
|
@ -1491,16 +1499,23 @@ public class ExcelService implements IExcelService { |
|
|
public String countExpTable(ScoreDto.ShowResult param) { |
|
|
public String countExpTable(ScoreDto.ShowResult param) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<ScoreVo.CountScoreCurrentSite> countScoreCurrentSiteList = new ArrayList<>(); |
|
|
log.info("计数赛成绩公示:{}", param); |
|
|
CompeteProject competeProject = competeProjectMapper.selectByPrimaryKey(param.getProjectId()); |
|
|
CompeteProject project = competeProjectMapper.selectByPrimaryKey(param.getProjectId()); |
|
|
if(ObjectUtil.isNotNull(competeProject)) { |
|
|
log.info("查询{}项目的成绩:", project); |
|
|
if(competeProject.getTeam() == 0) { |
|
|
if (project == null) { |
|
|
countScoreCurrentSiteList = competeScoreDao.queryCountScoreAll(param.getProjectId()); |
|
|
throw new BaseException(CodeEnum.PARAM_ERROR); |
|
|
}else { |
|
|
|
|
|
countScoreCurrentSiteList = competeScoreDao.queryCountScoreAllByTeam(param.getProjectId()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
List<ScoreVo.CountScoreCurrentSite> countScoreCurrentSites = countScoreCurrentSiteList; |
|
|
|
|
|
|
|
|
// PageHelper.startPage(param.getPage(), param.getSize());
|
|
|
|
|
|
List<ScoreVo.CountScorePublicity> countScoreCurrentSiteList; |
|
|
|
|
|
if (project.getTeam() == Constant.Compete.TEAM_YES) { |
|
|
|
|
|
// 团体赛
|
|
|
|
|
|
countScoreCurrentSiteList = competeScoreDao.queryCountScoreTeam(param.getProjectId()); |
|
|
|
|
|
} else { |
|
|
|
|
|
// 个人赛
|
|
|
|
|
|
countScoreCurrentSiteList = competeScoreDao.queryCountScorePerson(param.getProjectId()); |
|
|
|
|
|
} |
|
|
|
|
|
List<ScoreVo.CountScorePublicity> countScoreCurrentSites = countScoreCurrentSiteList; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>(); |
|
|
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>(); |
|
@ -1519,9 +1534,13 @@ public class ExcelService implements IExcelService { |
|
|
PoiUtil.PoiUtilCell oneEight=new PoiUtil.PoiUtilCell("名词", 1, 2); |
|
|
PoiUtil.PoiUtilCell oneEight=new PoiUtil.PoiUtilCell("名词", 1, 2); |
|
|
PoiUtil.PoiUtilCell oneNine=new PoiUtil.PoiUtilCell("备注", 1, 2); |
|
|
PoiUtil.PoiUtilCell oneNine=new PoiUtil.PoiUtilCell("备注", 1, 2); |
|
|
one.add(oneOne); |
|
|
one.add(oneOne); |
|
|
|
|
|
|
|
|
one.add(oneTwo); |
|
|
one.add(oneTwo); |
|
|
|
|
|
|
|
|
one.add(oneThree); |
|
|
one.add(oneThree); |
|
|
|
|
|
|
|
|
one.add(oneFour); |
|
|
one.add(oneFour); |
|
|
|
|
|
one.add(new PoiUtil.PoiUtilCell()); |
|
|
one.add(oneFive); |
|
|
one.add(oneFive); |
|
|
one.add(oneSix); |
|
|
one.add(oneSix); |
|
|
one.add(oneSeven); |
|
|
one.add(oneSeven); |
|
|