jinpengyong
2024-03-15 c9f757b9cbfcea425179eca92d310319c1aac8b6
screen-api/src/main/java/com/moral/api/controller/CruiserController.java
@@ -164,6 +164,9 @@
    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);
    }
@@ -509,9 +512,12 @@
            }*/
            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"));
@@ -523,6 +529,8 @@
                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);
@@ -547,6 +555,7 @@
            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");