| | |
| | | public void loadDaily( @RequestBody Map<String,Object> params,HttpServletResponse response) throws IOException { |
| | | List<Integer> ids = (List<Integer>) params.get("ids"); |
| | | List<DailyVo> dailyVos = specialDeviceService.loadDaily(ids); |
| | | if (ObjectUtils.isEmpty(dailyVos)){ |
| | | throw new BusinessException("未找到走航信息"); |
| | | } |
| | | dailyDocx(dailyVos,response); |
| | | } |
| | | |
| | |
| | | }*/ |
| | | |
| | | |
| | | |
| | | String name = dailyVos.get(0).getName(); |
| | | String type = dailyVos.get(0).getType(); |
| | | map.put("code",builder); |
| | | map.put("time1",DateUtils.getCurCNDate()); |
| | | map.put("name",name); |
| | | map.put("type",type); |
| | | // map.put("pho",new PictureRenderData(100, 100, "G:\\home\\3d423e3cb05d7edc35c38e3173af2a0d.jpg")); |
| | | // map.put("pho1",new PictureRenderData(500, 500, path+"\\0a4ab467-304d-4871-948f-55aa7e820975.png")); |
| | | |
| | |
| | | put("time1",map.get("time1")); |
| | | // put("pho", map.get("pho")); |
| | | // put("pho1", map.get("pho1")); |
| | | put("name",map.get("name")); |
| | | put("type",map.get("type")); |
| | | put("detailList1", detailList1); |
| | | put("detailList2", detailList2); |
| | | put("detailList3", detailList3); |
| | |
| | | response.setContentType("multipart/form-data"); |
| | | // 设置文件名 |
| | | response.addHeader("Content-Disposition", "attachment;fileName=ce.docx" ); |
| | | // response.setHeader("Content-Disposition", "attachment; filename=\"" + name+type+"监测报告" + "\""); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | //保存到本地 |
| | | /* File file1 = new File("G:\\test\\test2.docx"); |