Commit 916c2f5ab697b1ef3cd827122ec961c5a77551d0
1 parent
285967fb8f
Exists in
master
and in
1 other branch
导出excel修改格式
Showing 1 changed file with 6 additions and 6 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
View file @
916c2f5
... | ... | @@ -162,7 +162,7 @@ |
162 | 162 | header.put("deliverDoctor", "接生医生"); |
163 | 163 | header.put("phone", "联系方式"); |
164 | 164 | httpServletResponse.setContentType("application/force-download"); |
165 | - httpServletResponse.setHeader("Content-Disposition", "attachment;filename=" + new String(("分娩管理).xls").getBytes("UTF-8"), "ISO-8859-1")); | |
165 | + httpServletResponse.setHeader("Content-Disposition", "attachment;filename=" + new String(("分娩管理.xls").getBytes("UTF-8"), "ISO-8859-1")); | |
166 | 166 | ExcelUtil.toExcel(httpServletResponse.getOutputStream(), list, header); |
167 | 167 | } catch (Exception e) { |
168 | 168 | ExceptionUtils.catchException(e, "childbirthManagerExcel异常"); |
169 | 169 | |
170 | 170 | |
171 | 171 | |
... | ... | @@ -205,17 +205,17 @@ |
205 | 205 | for (NewBabyManagerQueryModel newBabyManagerQueryModel : newBabyManagerQueryModelList) { |
206 | 206 | Map<String, Object> map = BeanUtils.objectToObjectMap(newBabyManagerQueryModel); |
207 | 207 | Integer sex = newBabyManagerQueryModel.getSex(); |
208 | - if (sex == 0) { | |
208 | + if (new Integer(0).equals(sex)) { | |
209 | 209 | map.put("sex", "女"); |
210 | 210 | } |
211 | - if (sex == 1) { | |
211 | + if (new Integer(1).equals(sex)) { | |
212 | 212 | map.put("sex", "男"); |
213 | 213 | } |
214 | 214 | Integer highRisk = newBabyManagerQueryModel.getHighRisk(); |
215 | - if (highRisk == 0) { | |
215 | + if (new Integer(0).equals(highRisk)) { | |
216 | 216 | map.put("highRisk", "健康"); |
217 | 217 | } |
218 | - if (highRisk == 1) { | |
218 | + if (new Integer(1).equals(highRisk)) { | |
219 | 219 | map.put("highRisk", "高危"); |
220 | 220 | } |
221 | 221 | String dueType = newBabyManagerQueryModel.getDueType(); |
... | ... | @@ -244,7 +244,7 @@ |
244 | 244 | header.put("mphone", "联系方式"); |
245 | 245 | header.put("deliverDoctor", "接生医生"); |
246 | 246 | httpServletResponse.setContentType("application/force-download"); |
247 | - httpServletResponse.setHeader("Content-Disposition", "attachment;filename=" + new String(("新生儿管理).xls").getBytes("UTF-8"), "ISO-8859-1")); | |
247 | + httpServletResponse.setHeader("Content-Disposition", "attachment;filename=" + new String(("新生儿管理.xls").getBytes("UTF-8"), "ISO-8859-1")); | |
248 | 248 | ExcelUtil.toExcel(httpServletResponse.getOutputStream(), list, header); |
249 | 249 | } catch (Exception e) { |
250 | 250 | ExceptionUtils.catchException(e, "childbirthManagerExcel异常"); |