diff --git a/src/main/java/com/emr/controller/FontController.java b/src/main/java/com/emr/controller/FontController.java index 1eaafdb..9f1c300 100644 --- a/src/main/java/com/emr/controller/FontController.java +++ b/src/main/java/com/emr/controller/FontController.java @@ -1,6 +1,7 @@ package com.emr.controller; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.emr.dao.Archive_DetailMapper; import com.emr.dao.Archive_MasterMapper; import com.emr.dao.CommomMapper; @@ -21,6 +22,7 @@ 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.HttpClientUtils; import com.emr.util.Jpg2PdfUtil; import com.emr.vo.*; import com.emr.vo.FontVo.*; @@ -34,6 +36,9 @@ 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.SecurityUtils; +import org.apache.shiro.authc.UsernamePasswordToken; +import org.apache.shiro.subject.Subject; import org.apache.shiro.util.CollectionUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -97,9 +102,6 @@ public class FontController { @Autowired private BatchExportService batchExportService; - @Value("${guangzong_token}") - private String guangzong_token; - /** * 2.1 * @@ -640,10 +642,55 @@ public class FontController { * @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; + @RequestMapping(value = "commomListqf", method = RequestMethod.GET) + public String commomListqf(Model model, HttpServletRequest request, + @RequestParam("dataSource") String dataSource, + @RequestParam(value="hemodialysisId",required = false) String hemodialysisId, + @RequestParam(value="admissId",required = false) String admissId, + @RequestParam(value="outpatientNo",required = false) String outpatientNo) { + String userName = ObjectUtils.isEmpty(request.getParameter("userName")) ? "admin" : request.getParameter("userName"); + Map params = new HashMap<>(); + params.put("userName", userName); + params.put("userPwd", "123456"); + String result = HttpClientUtils.doPost(POWER_URLHEAD + "/login", params); + JSONObject jsonObject = JSONObject.parseObject(result); + String token = jsonObject.getString("token"); + if(!ObjectUtils.isEmpty(token)){ + this.getUserInfo(request, token, userName); + //查询表格配置表的数据,根据配置动态显示表格字段 + Map tableConfigMap = commomMapper.queryTableConfig(dataSource); + if(!ObjectUtils.isEmpty(tableConfigMap)){ + //血透ID 广总血透接口的参数 + model.addAttribute("hemodialysisId",hemodialysisId); + //住院号 + model.addAttribute("admissId",admissId); + //门诊号 + model.addAttribute("outpatientNo",outpatientNo); + //获取数据来源 + 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/commomListqf"; + }else{ + model.addAttribute("msg", "模拟登录失败"); + return "font/msg"; + } + } + + public void getUserInfo(HttpServletRequest request, String token, String userName){ //创建连接工厂 JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance(); //创建客户端 @@ -660,32 +707,19 @@ public class FontController { 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")); - } + request.getSession().setAttribute("power_menus", powerUser.getMenus()); + request.getSession().setAttribute("token", token); - return "recordManage/commomSearch/commomGuangListqf"; + //验证shiro(有shiro才此操作) + UsernamePasswordToken userToken = new UsernamePasswordToken(userName, "123456"); + Subject subject = SecurityUtils.getSubject(); + subject.login(userToken); } } diff --git a/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomGuangListqf.jsp b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomGuangListqf.jsp deleted file mode 100644 index ccbe32e..0000000 --- a/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomGuangListqf.jsp +++ /dev/null @@ -1,1196 +0,0 @@ -<%@ page import="com.emr.entity.Power_User" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ page contentType="text/html;charset=UTF-8" language="java" %> - -<%@ include file="/WEB-INF/jspf/common.jspf" %> -<%@ include file="/WEB-INF/jspf/boostrapSelect.jspf" %> -<%@ include file="/WEB-INF/jspf/importPackageJsp.jspf" %> - - - - - 血透查询 - - - - - - - - - - - - -
- - -
-
- - 血透查询 - -
-
- -
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
- - -<%-- value="盘号,病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,入院日期,出院日期,出院科室,联系地址,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,其他诊断,病理诊断,损伤中毒,是否有手术,病案备注">--%> - - -<%-- value="commomtable.ph,commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.home_addr,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.other_diag_name,commomtable.pathology_name,commomtable.poisoning_name,commomtable.is_oper,memo,commomtable.file_source">--%> - - -<%-- value="ph,inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,admissDate,disDate,disDept,homeAddr,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,otherDiagName,pathologyName,poisoningName,isOper,memo">--%> - - - - - - - - - - -
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
- - <%-- - <%-- class="glyphicon glyphicon-question-sign" rel="drevil"--%> - <%-- data-container="body" data-toggle="popover" data-placement="bottom"--%> - <%-- data-content="精准查询,病案号要求8位">--%> - <%-- --%> -
-
- - -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
- 至 -
-
-
- -
-
-
-
-
-
- -
-
- -
-
-
- 至 -
-
-
- -
-
-
-
-
-
- -
-
- -
- - -
-
-
-
-
-
-
-
- -
-
- -
- - -
-
-
-
-
-
-
-
- -
-
- -
-
-
- 至 -
-
-
- -
-
-
-
-
-
- -
-
- -
- - -
-
-
-
-
-
-
-
- -
-
- -
- - -
-
-
-
-
-
-
-
- -
-
- -
-
-
- 至 -
-
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
- 至 -
-
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
- -
-
-
- -
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
- 至 -
-
-
- -
-
-
-
-
-
- -
-
- -
-
-
- -
-
-
- -
-
- -
-
-
- 至 -
-
-
- -
-
-
- -
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
- -
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
-
- 至 -
-
-
- -
-
-
- -
-
-
- -
-
- -
-
-
-
-
-
-
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
- -
-
- - - - - - - -
- - - - - - - - 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 3925688..36496e9 100644 --- a/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomListqf.jsp +++ b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/commomListqf.jsp @@ -9,7 +9,7 @@ - 常用查询 + 血透查询 @@ -176,7 +176,7 @@
- 常用查询 + 血透查询
@@ -226,13 +226,13 @@ -<%-- value="盘号,病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,入院日期,出院日期,出院科室,联系地址,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,其他诊断,病理诊断,损伤中毒,是否有手术,病案备注">--%> + <%-- value="盘号,病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,入院日期,出院日期,出院科室,联系地址,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,其他诊断,病理诊断,损伤中毒,是否有手术,病案备注">--%> -<%-- value="commomtable.ph,commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.home_addr,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.other_diag_name,commomtable.pathology_name,commomtable.poisoning_name,commomtable.is_oper,memo,commomtable.file_source">--%> + <%-- value="commomtable.ph,commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.home_addr,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.other_diag_name,commomtable.pathology_name,commomtable.poisoning_name,commomtable.is_oper,memo,commomtable.file_source">--%> -<%-- value="ph,inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,admissDate,disDate,disDept,homeAddr,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,otherDiagName,pathologyName,poisoningName,isOper,memo">--%> + <%-- value="ph,inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,admissDate,disDate,disDept,homeAddr,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,otherDiagName,pathologyName,poisoningName,isOper,memo">--%> @@ -312,7 +312,7 @@
- +
+ id="hemodialysis_id" maxlength="6"> +
+
+
+
+
+
+ +
+
+
diff --git a/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js b/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js index 498cf80..f8b9a70 100644 --- a/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js +++ b/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js @@ -74,7 +74,7 @@ function initQueryCondition(){ $(".col-sm-4.hideDiv").css('display','none');//查询条件框 $(".form-group.hideDiv").css('display','none');//修改信息框 - $("#nameDiv,#idCardDiv,#hemodialysisIdDiv,#hemodialysisDateDiv").css('display',''); + $("#nameDiv,#admissIdDiv,#outpatientNoDiv,#idCardDiv,#hemodialysisIdDiv,#hemodialysisDateDiv").css('display',''); $("#nameEditDiv,#hemodialysisIdEditDiv,#hemodialysisDateEditDiv").css('display',''); } else if(dataSource == '5'){ //放疗 @@ -732,6 +732,11 @@ function getSql() { name = 'radiotherapy_no'; whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND "; } + //门诊号 + if(!isEmpty($("#outpatient_no").val())){ + name = 'outpatient_no'; + whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND "; + } if (whereNames != ' where ') { whereNames = whereNames.substring(0, whereNames.length - 4);