Browse Source

全文检索优化

xiaoqiao 3 months ago
parent
commit
11687a6b71

+ 7 - 6
src/main/java/com/bowintek/smartsearch/controller/WellInfoController.java

@@ -191,21 +191,22 @@ public class WellInfoController {
     public BaseResponse getOrgProjectList(@RequestBody WellInfoParams params) {
         return RespGenerstor.success(wellInfoService.selectOrgProjectList(params.getOrgList(), params.getUnitList()));
     }
+
     @PostMapping("/getoilWaterDailyList")
     public BaseResponse getoilWaterDailyList(@RequestBody JSONObject reqMap) {
-        List<String> commonWellNameList =reqMap.getJSONArray("commonWellNameList").toJavaList(String.class);
+        List<String> commonWellNameList = reqMap.getJSONArray("commonWellNameList").toJavaList(String.class);
         return RespGenerstor.success(wellInfoService.selectoilWaterDailyList(commonWellNameList));
     }
 
     @GetMapping("/downFile")
-    public void downFile(HttpServletResponse response, Integer isShow, String filePath, String fileName) throws IOException {
+    public void downFile(HttpServletResponse response, Integer isShow, String filePath, String fileName) throws Exception {
         Map<String, String> getParams = new HashMap<>();
         getParams.put("fileName", fileName);
         getParams.put("filePath", filePath);
-        String watermarkText = accountService.getUserByUserID(accountService.getLoginUserID()).getName() +" "+ dateUtils.dateToStr(new Date());
+        String watermarkText = accountService.getUserByUserID(accountService.getLoginUserID()).getName() + " " + dateUtils.dateToStr(new Date());
         getParams.put("isShow", "0");//(isShow != null && 1 == isShow) ? "1":"0");
         getParams.put("watermarkText", watermarkText);
-        System.out.println("downFile getParams:"+getParams);
+        System.out.println("downFile getParams:" + getParams);
 
         String reData = remoteHelper.getJson(getParams, appConfig.hdfshelperurl + "read", "UTF-8");
         byte[] bytes = Base64.getMimeDecoder().decode(reData);
@@ -231,12 +232,13 @@ public class WellInfoController {
             os.flush();
             os.close();
         }
+        log.info("下载完成~~~~");
     }
 
     @GetMapping("/downFileImage")
     public BaseResponse<String> downFileImage(String fileName) throws IOException {
         Map<String, String> getParams = new HashMap<>();
-        getParams.put("fileName", fileName+".png");
+        getParams.put("fileName", fileName + ".png");
         getParams.put("filePath", "/user/ktkf/a1/sjh/JSJGSYT");
 
         String reData = remoteHelper.getJson(getParams, appConfig.hdfshelperurl + "readImage", "UTF-8");
@@ -268,7 +270,6 @@ public class WellInfoController {
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
-                ;
             }
         }
         return bytes;