|
|
@ -683,7 +683,7 @@ public class ExcelService implements IExcelService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public String competeAllCount(CompeteDto.CompeteTime params) throws IOException { |
|
|
|
public String competeAllCount(CompeteDto.CompeteTime params) throws Exception { |
|
|
|
List<TableVo.CompeteAllCount1> competeAllCountList = competeAllCountList1(params.getCompeteTimeId()); |
|
|
|
return getExcelFilePathForCompeteAllCount(competeAllCountList); |
|
|
|
} |
|
|
@ -814,7 +814,7 @@ public class ExcelService implements IExcelService { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String getExcelFilePathForCompeteAllCount(List<TableVo.CompeteAllCount1> arrayList) throws IOException { |
|
|
|
private String getExcelFilePathForCompeteAllCount(List<TableVo.CompeteAllCount1> arrayList) throws Exception { |
|
|
|
//创建excle表格对象
|
|
|
|
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>(); |
|
|
|
//创建行对象
|
|
|
@ -866,6 +866,96 @@ public class ExcelService implements IExcelService { |
|
|
|
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); |
|
|
|
} |
|
|
|
} |
|
|
|
//生成excel表格对象,并将数据放入
|
|
|
|
Workbook wbs = PoiUtil.exportWB("比赛报名汇总表", list, workbook); |
|
|
|