|
|
@ -78,7 +78,7 @@ public class ExcelService implements IExcelService { |
|
|
|
@Override |
|
|
|
public String dasaiduiwuxinxiWPS(QueryDto<CompeteDto.CompeteTime> params) { |
|
|
|
|
|
|
|
List<CompeteVo.MesBiao> mesBiaos = competeScoreDao.selCanSaiDuiWuMes(); |
|
|
|
List<CompeteVo.MesBiao> mesBiaos = competeScoreDao.selCanSaiDuiWuMes(params.getParam().getCompeteTimeId()); |
|
|
|
|
|
|
|
List<List<PoiUtil.PoiUtilCell>> biao = new ArrayList<>(); |
|
|
|
//先把联系人的都添加进去
|
|
|
@ -168,8 +168,8 @@ public class ExcelService implements IExcelService { |
|
|
|
@Override |
|
|
|
public String iTeamListService(QueryDto<CompeteDto.CompeteTime> params) { |
|
|
|
|
|
|
|
List<CompeteVo.DaiBiaoDUi> daiBiaoDUis0 = competeScoreDao.selAllDaiBiaoDui((byte) 0); |
|
|
|
List<CompeteVo.DaiBiaoDUi> daiBiaoDUis1 = competeScoreDao.selAllDaiBiaoDui((byte) 1); |
|
|
|
List<CompeteVo.DaiBiaoDUi> daiBiaoDUis0 = competeScoreDao.selAllDaiBiaoDui((byte) 0,params.getParam().getCompeteTimeId()); |
|
|
|
List<CompeteVo.DaiBiaoDUi> daiBiaoDUis1 = competeScoreDao.selAllDaiBiaoDui((byte) 1,params.getParam().getCompeteTimeId()); |
|
|
|
|
|
|
|
//查出所有的单位的id
|
|
|
|
List<CompeteCompany> competeCompanyList= competeCompanyDao.selectByCompeteTimeId(params.getParam().getCompeteTimeId()); |
|
|
@ -756,24 +756,24 @@ public class ExcelService implements IExcelService { |
|
|
|
//创建行对象
|
|
|
|
List<PoiUtil.PoiUtilCell> title = new ArrayList<>(); |
|
|
|
//给首行单元格赋值
|
|
|
|
title.add(new PoiUtil.PoiUtilCell("序号")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("参赛项目")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("小学男子组")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("小学女子组")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("小学混合组")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("中学男子组")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("中学女子组")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("中学混合组")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("高职院校男子组")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("高职院校女子组")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("高职院校混合组")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("本科院校男子组")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("本科院校女子组")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("本科院校混合组")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("俱乐部男子组(14岁及以下)")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("俱乐部女子组(14岁及以下)")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("俱乐部混合组(14岁及以下)")); |
|
|
|
title.add(new PoiUtil.PoiUtilCell("合计")); |
|
|
|
// title.add(new PoiUtil.PoiUtilCell("序号"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("参赛项目"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("小学男子组"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("小学女子组"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("小学混合组"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("中学男子组"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("中学女子组"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("中学混合组"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("高职院校男子组"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("高职院校女子组"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("高职院校混合组"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("本科院校男子组"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("本科院校女子组"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("本科院校混合组"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("俱乐部男子组(14岁及以下)"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("俱乐部女子组(14岁及以下)"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("俱乐部混合组(14岁及以下)"));
|
|
|
|
// title.add(new PoiUtil.PoiUtilCell("合计"));
|
|
|
|
list.add(title); |
|
|
|
//创建整个excel表格对象
|
|
|
|
Workbook workbook = new XSSFWorkbook(); |
|
|
@ -797,120 +797,120 @@ public class ExcelService implements IExcelService { |
|
|
|
} |
|
|
|
PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell(); |
|
|
|
poiUtilCell.setValue(""); |
|
|
|
poiUtilCell.setFunction("sum(C"+a+":Q"+a+")"); |
|
|
|
// poiUtilCell.setFunction("sum(C"+a+":Q"+a+")");
|
|
|
|
cells.add(poiUtilCell); |
|
|
|
list.add(cells); |
|
|
|
i++; |
|
|
|
a++; |
|
|
|
if (competeAllCount.getProjectId()==2017){ |
|
|
|
cells = new ArrayList<>(); |
|
|
|
PoiUtil.PoiUtilCell poiUtilCel = new PoiUtil.PoiUtilCell(); |
|
|
|
poiUtilCel.setValue("--"); |
|
|
|
cells.add(poiUtilCel); |
|
|
|
PoiUtil.PoiUtilCell poiUtilCel1 = new PoiUtil.PoiUtilCell(); |
|
|
|
poiUtilCel1.setValue("合计"); |
|
|
|
cells.add(poiUtilCel1); |
|
|
|
for (int j = 3; j <19 ; j++) { |
|
|
|
PoiUtil.PoiUtilCell poiUtilCel2 = new PoiUtil.PoiUtilCell(); |
|
|
|
if (j==3){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(C2:C8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} |
|
|
|
if (j==4){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(D2:D8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} |
|
|
|
if (j==5){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(E2:E8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} |
|
|
|
if (j==6){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(F2:F8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} if (j==7){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(G2:G8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} if (j==8){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(H2:H8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} if (j==9){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(I2:I8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} if (j==10){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(J2:J8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} if (j==11){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(K2:K8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} |
|
|
|
if (j==12){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(L2:L8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} |
|
|
|
if (j==13){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(M2:N8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} |
|
|
|
if (j==14){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(N2:N8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} |
|
|
|
if (j==15){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(O2:O8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} |
|
|
|
if (j==16){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(P2:P8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} |
|
|
|
if (j==17){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(Q2:Q8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} |
|
|
|
if (j==18){ |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(R2:R8)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
} |
|
|
|
// String T1 = PoiUtil.toRadix(j);
|
|
|
|
// poiUtilCel2.setFunction("sum(c"+2+":c"+8+")");
|
|
|
|
} |
|
|
|
list.add(cells); |
|
|
|
} |
|
|
|
|
|
|
|
if (competeAllCount.getProjectId()==2026){ |
|
|
|
cells = new ArrayList<>(); |
|
|
|
PoiUtil.PoiUtilCell poiUtilCel = new PoiUtil.PoiUtilCell(); |
|
|
|
poiUtilCel.setValue("--"); |
|
|
|
cells.add(poiUtilCel); |
|
|
|
PoiUtil.PoiUtilCell poiUtilCel1 = new PoiUtil.PoiUtilCell(); |
|
|
|
poiUtilCel1.setValue("合计"); |
|
|
|
cells.add(poiUtilCel1); |
|
|
|
PoiUtil.PoiUtilCell poiUtilCel2 = new PoiUtil.PoiUtilCell(3 + "", 15, 1, 300, 18); |
|
|
|
poiUtilCel2.setValue(""); |
|
|
|
poiUtilCel2.setFunction("sum(C10:C18)"); |
|
|
|
cells.add(poiUtilCel2); |
|
|
|
PoiUtil.PoiUtilCell poiUtilCel3 = new PoiUtil.PoiUtilCell(); |
|
|
|
poiUtilCel3.setValue(""); |
|
|
|
poiUtilCel3.setFunction("sum(R2:C19)"); |
|
|
|
cells.add(poiUtilCel3); |
|
|
|
list.add(cells); |
|
|
|
} |
|
|
|
// if (competeAllCount.getProjectId()==2017){
|
|
|
|
// cells = new ArrayList<>();
|
|
|
|
// PoiUtil.PoiUtilCell poiUtilCel = new PoiUtil.PoiUtilCell();
|
|
|
|
// poiUtilCel.setValue("--");
|
|
|
|
// cells.add(poiUtilCel);
|
|
|
|
// PoiUtil.PoiUtilCell poiUtilCel1 = new PoiUtil.PoiUtilCell();
|
|
|
|
// poiUtilCel1.setValue("合计");
|
|
|
|
// cells.add(poiUtilCel1);
|
|
|
|
// for (int j = 3; j <19 ; j++) {
|
|
|
|
// PoiUtil.PoiUtilCell poiUtilCel2 = new PoiUtil.PoiUtilCell();
|
|
|
|
// if (j==3){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(C2:C8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// }
|
|
|
|
// if (j==4){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(D2:D8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// }
|
|
|
|
// if (j==5){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(E2:E8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// }
|
|
|
|
// if (j==6){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(F2:F8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// } if (j==7){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(G2:G8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// } if (j==8){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(H2:H8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// } if (j==9){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(I2:I8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// } if (j==10){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(J2:J8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// } if (j==11){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(K2:K8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// }
|
|
|
|
// if (j==12){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(L2:L8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// }
|
|
|
|
// if (j==13){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(M2:N8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// }
|
|
|
|
// if (j==14){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(N2:N8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// }
|
|
|
|
// if (j==15){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(O2:O8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// }
|
|
|
|
// if (j==16){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(P2:P8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// }
|
|
|
|
// if (j==17){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(Q2:Q8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// }
|
|
|
|
// if (j==18){
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(R2:R8)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// }
|
|
|
|
//// String T1 = PoiUtil.toRadix(j);
|
|
|
|
//// poiUtilCel2.setFunction("sum(c"+2+":c"+8+")");
|
|
|
|
// }
|
|
|
|
// list.add(cells);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// if (competeAllCount.getProjectId()==2026){
|
|
|
|
// cells = new ArrayList<>();
|
|
|
|
// PoiUtil.PoiUtilCell poiUtilCel = new PoiUtil.PoiUtilCell();
|
|
|
|
// poiUtilCel.setValue("--");
|
|
|
|
// cells.add(poiUtilCel);
|
|
|
|
// PoiUtil.PoiUtilCell poiUtilCel1 = new PoiUtil.PoiUtilCell();
|
|
|
|
// poiUtilCel1.setValue("合计");
|
|
|
|
// cells.add(poiUtilCel1);
|
|
|
|
// PoiUtil.PoiUtilCell poiUtilCel2 = new PoiUtil.PoiUtilCell(3 + "", 15, 1, 300, 18);
|
|
|
|
// poiUtilCel2.setValue("");
|
|
|
|
// poiUtilCel2.setFunction("sum(C10:C18)");
|
|
|
|
// cells.add(poiUtilCel2);
|
|
|
|
// PoiUtil.PoiUtilCell poiUtilCel3 = new PoiUtil.PoiUtilCell();
|
|
|
|
// poiUtilCel3.setValue("");
|
|
|
|
// poiUtilCel3.setFunction("sum(R2:C19)");
|
|
|
|
// cells.add(poiUtilCel3);
|
|
|
|
// list.add(cells);
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|