From 53d149f491dba554ee035599059a1bf65ea92df2 Mon Sep 17 00:00:00 2001 From: zhaowenxuan <chacca165@163.com> Date: 星期三, 12 二月 2025 17:36:13 +0800 Subject: [PATCH] 增加手动同步lis接口 --- ltkj-admin/src/main/java/com/ltkj/web/jmreport/JimuController.java | 72 ++++++++++++++++++++++++++++++++++- 1 files changed, 69 insertions(+), 3 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/jmreport/JimuController.java b/ltkj-admin/src/main/java/com/ltkj/web/jmreport/JimuController.java index 4aefafa..855ac1d 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/jmreport/JimuController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/jmreport/JimuController.java @@ -1,12 +1,27 @@ package com.ltkj.web.jmreport; +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; +import com.ltkj.common.core.domain.AjaxResult; +import com.ltkj.hosp.mapper.TestMapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; import org.omg.CORBA.Environment; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Properties; + +import static jdk.nashorn.internal.runtime.regexp.joni.Config.log; /** * @Company: 瑗垮畨璺嘲绉戞妧鏈夐檺鍏徃 @@ -15,12 +30,54 @@ */ @RestController @RequestMapping("/report/jmreport") +@Api(tags = "PC绔� 绉湪鎶ヨ〃鎺ュ彛闆�") +@Slf4j public class JimuController { - @Value("${jimu.path}") - private String value; +// @Value("${jimu.path}") + private static String value; + + + private static String CONFIG_PATH; + + @Autowired + private TestMapper testMapper; + + @Value ("${config.properties}") + public void setConfigPath(String path) { + CONFIG_PATH = path; + try { + FileInputStream inputStream = new FileInputStream(CONFIG_PATH); + Properties props = new Properties(); + props.load(inputStream); + value= props.getProperty("jmurl"); + } catch (IOException throwables) { + throwables.printStackTrace(); + } + } + +// static { +// Properties props = new Properties(); +// try { +// // 浠庢枃浠朵腑璇诲彇閰嶇疆淇℃伅 +// FileInputStream fis = null; +// try { +// fis = new FileInputStream("D:\\ltkjprojectconf\\sfconfig.properties"); +// } catch (FileNotFoundException e) { +// e.printStackTrace(); +// } +// props.load(fis); +// fis.close(); +// // 鑾峰彇灞炴�у�煎苟璧嬪�� +// } catch (Exception e) { +// log.info("鏁版嵁搴撹繛鎺ュけ璐� 璇疯仈绯荤鐞嗗憳锛�"); +// e.printStackTrace(); +// } +// value= props.getProperty("jmurl"); +// } @GetMapping("/index") - @PreAuthorize("@ss.hasPermi('report:jmreport:index')") + @ApiOperation(value = "index") +// @PreAuthorize("@ss.hasPermi('report:jmreport:index')") public String index(){ return value+"/jmreport/list"; } @@ -32,12 +89,14 @@ // } @GetMapping("/view") + @ApiOperation(value = "view") //@PreAuthorize("@ss.hasPermi('report:jimu:view')") public String view(){ return value+"/jmreport/view"; } @GetMapping("/exportPdf") + @ApiOperation(value = "exportPdf") public String exportPdf(){ return value+"/jmreport/exportPdfStream"; } @@ -48,4 +107,11 @@ // public int view(){ // return 1; // } + + @GetMapping("/getBingZhong") + public String getBingZhongInfo(@RequestParam("start") String start, @RequestParam("end") String end){ + JSONObject object = JSONUtil.createObj(); + object.putOpt("data",testMapper.getBingZhongInfo(start,end)); + return JSONUtil.toJsonStr(object); + } } -- Gitblit v1.8.0