From b9e51a927fa4f7ac754d22fe54eaf9a293960874 Mon Sep 17 00:00:00 2001 From: "jian.wang" <824612544@qq.com> Date: Sat, 29 Jun 2024 15:45:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E5=B9=BF=E6=80=BB?= =?UTF-8?q?=E8=A1=80=E9=80=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/emr/controller/FontController.java | 62 +++++++++++++++++++ src/main/resources/config/config.properties | 7 ++- src/main/webapp/WEB-INF/jspf/ztreeCommom.jsp | 2 +- .../commomSearch/commomListqf.jsp | 7 ++- .../recordManage/commomSearch/commomListqf.js | 21 ++++--- 5 files changed, 83 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/emr/controller/FontController.java b/src/main/java/com/emr/controller/FontController.java index 9171108..1eaafdb 100644 --- a/src/main/java/com/emr/controller/FontController.java +++ b/src/main/java/com/emr/controller/FontController.java @@ -1,5 +1,6 @@ package com.emr.controller; +import com.alibaba.fastjson.JSON; import com.emr.dao.Archive_DetailMapper; import com.emr.dao.Archive_MasterMapper; import com.emr.dao.CommomMapper; @@ -18,6 +19,7 @@ import com.emr.service.batchExport.BatchExportService; import com.emr.service.pushRcvBasic.PushRcvBasicService; import com.emr.service.recordType.EmrTypeService; import com.emr.service.tScanAssort.T_Scan_AssortService; +import com.emr.util.DateUtils; import com.emr.util.ExceptionPrintUtil; import com.emr.util.Jpg2PdfUtil; import com.emr.vo.*; @@ -31,6 +33,7 @@ import com.lowagie.text.Utilities; import com.lowagie.text.pdf.*; import com.lowagie.text.pdf.codec.TiffImage; import org.apache.commons.lang3.StringUtils; +import org.apache.cxf.endpoint.Client; import org.apache.shiro.util.CollectionUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -38,12 +41,14 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.util.Base64Utils; +import org.springframework.util.ObjectUtils; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*; import java.net.URL; +import java.text.SimpleDateFormat; import java.util.*; /** @@ -92,6 +97,9 @@ public class FontController { @Autowired private BatchExportService batchExportService; + @Value("${guangzong_token}") + private String guangzong_token; + /** * 2.1 * @@ -626,4 +634,58 @@ public class FontController { List list = tScanAssortService.getPatAssortListByPatientId(patientId); return Msg.successData(list); } + + /** + * 广总血透接口 + * @param // hemodialysisId 血透ID + * @return String + */ + @RequestMapping(value = "commomListqf", method = RequestMethod.POST) + public String commomListqf(Model model, HttpServletRequest request, @RequestParam("hemodialysisId") String hemodialysisId, @RequestParam("dataSource") String dataSource) { + String token = guangzong_token; + String userName = ObjectUtils.isEmpty(request.getParameter("userName")) ? "admin" : request.getParameter("userName"); + //创建连接工厂 + JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance(); + //创建客户端 + Object[] objects = new Object[0]; + Client client = null; + try { + client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl"); + //动态调用getInfosByUserId方法 + objects = client.invoke("getInfosByUserId", token, "emr_record"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if(null != client) { + client.destroy(); + } + } + Power_User powerUser = JSON.parseObject(objects[0].toString(), Power_User.class); + powerUser.setUserName(userName); + //设置进session + request.getSession().setAttribute("CURRENT_USER", powerUser); + + //查询表格配置表的数据,根据配置动态显示表格字段 + Map tableConfigMap = commomMapper.queryTableConfig(dataSource); + if(!ObjectUtils.isEmpty(tableConfigMap)){ + //血透ID 广总血透接口的参数 + model.addAttribute("hemodialysisId",hemodialysisId); + //获取数据来源 + model.addAttribute("dataSource",dataSource); + //获取需要查询字段 + model.addAttribute("tableQueryField",tableConfigMap.get("tableField")); + //显示查询字段,并转为驼峰格式 + model.addAttribute("tableField", ObjectUtils.isEmpty(tableConfigMap.get("tableField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("tableField").toString())); + //获取查询字段中文名称 + model.addAttribute("tableFieldName",tableConfigMap.get("tableFieldName")); + //获取排序字段,可点击表头列实现排序 + model.addAttribute("sortField",ObjectUtils.isEmpty(tableConfigMap.get("sortField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("sortField").toString())); + //获取默认排序字段 + request.getSession().setAttribute("defaultSortField",tableConfigMap.get("defaultSortField")); + //获取默认排序字段方式 + request.getSession().setAttribute("defaultSortFieldType",tableConfigMap.get("defaultSortFieldType")); + } + + return "recordManage/commomSearch/commomGuangListqf"; + } } diff --git a/src/main/resources/config/config.properties b/src/main/resources/config/config.properties index 93f3cea..842f62d 100644 --- a/src/main/resources/config/config.properties +++ b/src/main/resources/config/config.properties @@ -1,9 +1,9 @@ #power\u6743\u9650\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934 POWER_IP =localhost -POWER_URLHEAD = http://localhost:8081/power +POWER_URLHEAD = http://localhost:8080/power_admin_war_exploded POWER_JSPHEAD = localhost -POWER_JSP = http://localhost:8081/power +POWER_JSP = http://localhost:8080/power_admin_war_exploded #\u672C\u8EAB\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934 EMR_RECORD_JSP = http://localhost:8081/emr_record @@ -65,5 +65,8 @@ NEW_EMR_RECORD_JSP : http://localhost:8081/emr_record #\u8D39\u7528\u6E05\u5355\u751F\u6210\u7684\u76EE\u5F55 cost_pdf_path=D://cost// +# ??????token +guangzong_token=JxUAVD4BGlRGTVRFRU5BRk5FQFQ3JyBURkRGQA== + diff --git a/src/main/webapp/WEB-INF/jspf/ztreeCommom.jsp b/src/main/webapp/WEB-INF/jspf/ztreeCommom.jsp index 9f9b32c..5054e93 100644 --- a/src/main/webapp/WEB-INF/jspf/ztreeCommom.jsp +++ b/src/main/webapp/WEB-INF/jspf/ztreeCommom.jsp @@ -24,7 +24,7 @@ .zTreeDemo{ margin-left:10%; width:90%!important; - height: 100%!important; + height: 95%!important; overflow: auto!important; } diff --git a/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomListqf.jsp b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomListqf.jsp index 556e438..3925688 100644 --- a/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomListqf.jsp +++ b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomListqf.jsp @@ -241,6 +241,7 @@ +
@@ -782,11 +783,11 @@
- +
+ id="hemodialysis_id" maxlength="6" value="${hemodialysisId}">
@@ -1123,7 +1124,7 @@
- +
diff --git a/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js b/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js index f1448e6..498cf80 100644 --- a/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js +++ b/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js @@ -33,16 +33,17 @@ function initDatePicker() { } function initialization(){ initQueryCondition(); - $.ajax({ - type: 'get', - url: path + '/commom/getInitialization', - dataType: 'json', - success: function (data) { - if (data==1) { - freshTable() - } - } - }) + search() + // $.ajax({ + // type: 'get', + // url: path + '/commom/getInitialization', + // dataType: 'json', + // success: function (data) { + // if (data==1) { + // freshTable() + // } + // } + // }) } function initQueryCondition(){ var dataSource = $("#dataSource").val();