xieb
2024-05-16 a2b2529b009e2c410cf8d8f778de068317ffcb1f
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/word/controller/DownTemplateController.java
@@ -4,6 +4,7 @@
import cn.gistack.sm.sjztmd.util.MyDateUtils;
import cn.gistack.sm.sjztmd.word.service.ISjztmdService;
import cn.gistack.sm.sjztmd.word.util.BriefReportUtil;
import cn.gistack.sm.sjztmd.word.util.ExcelUtil;
import cn.gistack.sm.sjztmd.word.util.WordUtil;
import cn.gistack.sm.sjztmd.word.vo.*;
@@ -11,6 +12,7 @@
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@@ -43,6 +45,13 @@
   private final ISjztmdService sjztmdService;
   @GetMapping(value = "/getBriefReport")
   public R getBriefReport() {
      //获取总览、大中库、明细数据
      List<TotalInfo> totalList = sjztmdService.getTotalInfo("");
      return R.data(BriefReportUtil.formatTotalInfo(totalList));
   }
   @GetMapping("/download/{resGuid}")
   public ResponseEntity genera(HttpServletResponse response, @PathVariable String resGuid) throws Exception {
      HashMap<String,Object> obj = sjztmdService.getTbWordVO(resGuid);
@@ -65,8 +74,8 @@
   @GetMapping("/download/overFloodInfo")
   public ResponseEntity overFloodInfo(String isShow) throws Exception{
      String time = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
      String fileName =  time+ "全省水库防汛情况.docx";
      String time = new SimpleDateFormat("yyyy-MM-dd HH").format(new Date());
      String fileName =  time+ "时报汛文件.docx";
      String fileNameURL = URLEncoder.encode(fileName, "UTF-8");
      //获取总览、大中库、明细数据
      List<TotalInfo> totalList = sjztmdService.getTotalInfo(isShow);