|
@@ -1,5 +1,6 @@
|
|
|
package com.hb.proj.analysis.controller;
|
|
|
|
|
|
+import java.io.File;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import com.hb.proj.allconfig.AccessToken;
|
|
|
+import com.hb.proj.allconfig.BusinessException;
|
|
|
import com.hb.proj.allconfig.SysLog;
|
|
|
import com.hb.proj.analysis.service.IPRService;
|
|
|
import com.hb.proj.analysis.service.ProduceParamCalculator;
|
|
@@ -22,11 +24,15 @@ import com.hb.proj.model.WellAnalysisParamPO;
|
|
|
import com.hb.proj.model.WellMeasurePO;
|
|
|
import com.hb.proj.model.WellMeasureVO;
|
|
|
import com.hb.proj.model.WellPumpPO;
|
|
|
+import com.hb.proj.model.WellQualityRptVO;
|
|
|
+import com.hb.proj.utils.DownloadUtils;
|
|
|
import com.hb.proj.utils.RespVO;
|
|
|
import com.hb.proj.utils.RespVOBuilder;
|
|
|
import com.hb.xframework.dao.util.PageModel;
|
|
|
import com.hb.xframework.util.MapUtils;
|
|
|
|
|
|
+import jakarta.servlet.http.HttpServletRequest;
|
|
|
+import jakarta.servlet.http.HttpServletResponse;
|
|
|
import jakarta.validation.Valid;
|
|
|
import jakarta.validation.constraints.NotBlank;
|
|
|
import jakarta.validation.constraints.NotNull;
|
|
@@ -46,6 +52,25 @@ public class ProduceParamController {
|
|
|
private IPRService iprService;
|
|
|
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 下载测量数据导入模板
|
|
|
+ * @param request
|
|
|
+ * @param response
|
|
|
+ */
|
|
|
+ @RequestMapping("/downloadMeasureXlsTmp")
|
|
|
+ public void download(HttpServletRequest request,HttpServletResponse response) {
|
|
|
+ String basePath=request.getSession().getServletContext().getRealPath("");
|
|
|
+ File downloadFile=new File(basePath+File.separator+"download/tmp/measure.xls");
|
|
|
+ if(!downloadFile.exists()) {
|
|
|
+ throw new BusinessException("文件不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ String displayName="计量数据导入模板";
|
|
|
+
|
|
|
+ DownloadUtils.download(downloadFile, displayName,response);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 分页查询测量数据(附加的独立测量数据管理页面)
|
|
|
*/
|