Commit 6b190f48 by 熊付

【去掉冗余代码】

1 parent 5c63a76b
......@@ -706,72 +706,6 @@ public class ContractServiceImpl implements ContractService {
e.printStackTrace();
}
}
/* private void dynamicHeader( List<ExportModel> list) {
try {
List<ExcelExportEntity> colList = new ArrayList<ExcelExportEntity>();
ExcelExportEntity colEntity = new ExcelExportEntity("合同编号", "contract_unid");
colList.add(colEntity);
colEntity = new ExcelExportEntity("供应商", "supplier");
colEntity.setNeedMerge(true);
colList.add(colEntity);
ExcelExportEntity deliColGroup = new ExcelExportEntity("得力", "deli");
List<ExcelExportEntity> deliColList = new ArrayList<ExcelExportEntity>();
deliColList.add(new ExcelExportEntity("市场价", "orgPrice"));
deliColList.add(new ExcelExportEntity("专区价", "salePrice"));
deliColGroup.setList(deliColList);
colList.add(deliColGroup);
ExcelExportEntity jdColGroup = new ExcelExportEntity("京东", "jd");
List<ExcelExportEntity> jdColList = new ArrayList<ExcelExportEntity>();
jdColList.add(new ExcelExportEntity("市场价", "orgPrice"));
jdColList.add(new ExcelExportEntity("专区价", "salePrice"));
jdColGroup.setList(jdColList);
colList.add(jdColGroup);
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
for (int i = 0; i < 10; i++) {
Map<String, Object> valMap = new HashMap<String, Object>();
valMap.put("title", "名称." + i);
valMap.put("supplier", "供应商." + i);
List<Map<String, Object>> deliDetailList = new ArrayList<Map<String, Object>>();
for (int j = 0; j < 3; j++) {
Map<String, Object> deliValMap = new HashMap<String, Object>();
deliValMap.put("orgPrice", "得力.市场价." + j);
deliValMap.put("salePrice", "得力.专区价." + j);
deliDetailList.add(deliValMap);
}
valMap.put("deli", deliDetailList);
List<Map<String, Object>> jdDetailList = new ArrayList<Map<String, Object>>();
for (int j = 0; j < 2; j++) {
Map<String, Object> jdValMap = new HashMap<String, Object>();
jdValMap.put("orgPrice", "京东.市场价." + j);
jdValMap.put("salePrice", "京东.专区价." + j);
jdDetailList.add(jdValMap);
}
valMap.put("jd", jdDetailList);
list.add(valMap);
}
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams("价格分析表", "数据"), colList,
list);
FileOutputStream fos = new FileOutputStream("D:/价格分析表.tt.xls");
workbook.write(fos);
fos.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}*/
@Override
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!