jinpengyong
2023-09-08 acd8bc764569dcd6a89df4186537e210ffafb283
chore:测试提交
2 files modified
9 ■■■■■ changed files
screen-api/src/main/java/com/moral/api/controller/CruiserController.java 7 ●●●● patch | view | raw | blame | history
screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml 2 ●●● patch | view | raw | blame | history
screen-api/src/main/java/com/moral/api/controller/CruiserController.java
@@ -13,6 +13,7 @@
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.Rows;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
@@ -362,8 +363,10 @@
//        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("尘负荷监测报告" + params.get("time").toString() + ".docx", "utf-8"));
//        FileOutputStream fileOutputStream = new FileOutputStream("尘负荷监测报告" + params.get("time").toString() + ".docx");
//        compile.write(fileOutputStream);
        compile.writeToFile("G:\\home\\mon1\\" + "尘负荷监测报告"+params.get("time").toString()+".docx");
//        compile.write();
//        compile.writeToFile("G:\\hme\\mon1\\" + "尘负荷监测报告"+params.get("time").toString()+".docx");
//        FileOutputStream out = new FileOutputStream("尘负荷监测报告" + params.get("time").toString() + ".docx");
        compile.write(response.getOutputStream());
        compile.close();
//        return compile;
    }
screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml
@@ -76,6 +76,6 @@
        FROM `history_second_cruiser`
        WHERE mac = #{mac}
          AND `time` <![CDATA[>=]]> #{startTime}
          AND `time` <![CDATA[<=]]> #{endTtime}
          AND `time` <![CDATA[<=]]> #{endTime}
    </select>
</mapper>