Commit cb46d55211d9466cddd62459b583a29730a4eb7a
1 parent
7c9c523c74
Exists in
master
and in
8 other branches
code update
Showing 2 changed files with 23 additions and 23 deletions
platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java
View file @
cb46d55
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 | |
35 | 35 | static WritableWorkbook to_wwb; // 创建可写入workbook对象 |
36 | 36 | |
37 | - public static OutputStream toExcel(OutputStream out, List<Map<String, Object>> data, Map<String, String> columName) | |
37 | + public static OutputStream toChanExcel(OutputStream out, List<Map<String, Object>> data, Map<String, String> columName) | |
38 | 38 | { |
39 | 39 | WritableWorkbook wwb; |
40 | 40 | try |
41 | 41 | |
42 | 42 | |
... | ... | @@ -57,19 +57,19 @@ |
57 | 57 | } |
58 | 58 | Iterator<String> ite = columName.keySet().iterator(); |
59 | 59 | int j = 0; |
60 | - String keyORvalue = ""; | |
61 | - String keyName = ""; | |
62 | - while (ite.hasNext()) | |
60 | + String keyName = ""; | |
61 | + while (ite.hasNext()) | |
62 | + { | |
63 | + if (j > 5 && j < 13) | |
63 | 64 | { |
64 | - keyName = ite.next(); | |
65 | - | |
66 | - keyName = columName.get(keyName); | |
67 | - ws.addCell(new Label(j, 0, keyName, wcf)); | |
68 | - | |
69 | - ws.addCell(new Label(j, 1 + 0, keyORvalue)); | |
70 | - j++; | |
65 | + continue; | |
71 | 66 | } |
72 | - ws.mergeCells(5, 1, 5, 1); | |
67 | + keyName = ite.next(); | |
68 | + keyName = columName.get(keyName); | |
69 | + ws.addCell(new Label(j, 0, keyName, wcf)); | |
70 | + j++; | |
71 | + } | |
72 | + ws.mergeCells(5, 0, 5, 0); | |
73 | 73 | |
74 | 74 | // // 填充数据的内容 |
75 | 75 | // Map<String, Object> map; |
... | ... | @@ -118,7 +118,7 @@ |
118 | 118 | } |
119 | 119 | |
120 | 120 | |
121 | - public static OutputStream toChanExcel(OutputStream out, List<Map<String, Object>> data, Map<String, String> columName) | |
121 | + public static OutputStream toExcel(OutputStream out, List<Map<String, Object>> data, Map<String, String> columName) | |
122 | 122 | { |
123 | 123 | WritableWorkbook wwb; |
124 | 124 | try |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
cb46d55
... | ... | @@ -1343,15 +1343,15 @@ |
1343 | 1343 | cnames.put("AGE", "年龄"); |
1344 | 1344 | cnames.put("NOW_WEEKS", "孕周"); |
1345 | 1345 | cnames.put("EDD_DATE", "预产期"); |
1346 | - cnames.put("TITLE", "母婴阻断项目检查结果"); | |
1347 | -// cnames.put("HBEAG", "乙肝表面抗原"); | |
1348 | -// cnames.put("HBSAB", "乙肝表面抗体"); | |
1349 | -// cnames.put("HBEAG", "乙肝e抗原"); | |
1350 | -// cnames.put("HBEAB", "乙肝e抗体"); | |
1351 | -// cnames.put("HBCAB", "乙肝核心抗体"); | |
1352 | -// cnames.put("SYPHILIS", "梅毒"); | |
1353 | -// cnames.put("HIV", "HIV"); | |
1354 | -// cnames.put("HCV", "丙肝"); | |
1346 | +// cnames.put("TITLE", "母婴阻断项目检查结果"); | |
1347 | + cnames.put("HBEAG", "乙肝表面抗原"); | |
1348 | + cnames.put("HBSAB", "乙肝表面抗体"); | |
1349 | + cnames.put("HBEAG", "乙肝e抗原"); | |
1350 | + cnames.put("HBEAB", "乙肝e抗体"); | |
1351 | + cnames.put("HBCAB", "乙肝核心抗体"); | |
1352 | + cnames.put("SYPHILIS", "梅毒"); | |
1353 | + cnames.put("HIV", "HIV"); | |
1354 | + cnames.put("HCV", "丙肝"); | |
1355 | 1355 | cnames.put("HIGH_RISK_GRADE", "高危等级"); |
1356 | 1356 | cnames.put("HIGH_RISK_FACTOR", "高危因素"); |
1357 | 1357 | cnames.put("NEXT_EXAMINE_DATE", "预约产检日期"); |
... | ... | @@ -1365,7 +1365,7 @@ |
1365 | 1365 | httpServletResponse.setContentType("application/octet-stream"); |
1366 | 1366 | httpServletResponse.setCharacterEncoding("UTF-8"); |
1367 | 1367 | httpServletResponse.setHeader("Content-Disposition", "attachment;fileName=datas.xls"); |
1368 | - ExcelUtil.toExcel(out,datas,cnames); | |
1368 | + ExcelUtil.toChanExcel(out, datas, cnames); | |
1369 | 1369 | }catch (Exception e) |
1370 | 1370 | { |
1371 | 1371 | logger.error(e +"",e); |