diff --git a/src/main/java/com/emr/controller/StatisticsController.java b/src/main/java/com/emr/controller/StatisticsController.java index 7b0281d..78d19e4 100644 --- a/src/main/java/com/emr/controller/StatisticsController.java +++ b/src/main/java/com/emr/controller/StatisticsController.java @@ -203,21 +203,31 @@ public class StatisticsController { //复印记录报表 @RequestMapping("getPrintCount") @ResponseBody - public OffsetLimitPage getPrintCount(Integer offset, Integer limit, TUuPrintSearch search){ + public OffsetLimitPage getPrintCount(Integer offset, Integer limit, TUuPrintSearch search,Integer isSearch){ if(null != offset && null != limit){ PageHelper.offsetPage(offset, limit); } + judgeIsSearch(search, isSearch); List list = statisticsService.getPrintCount(search); return new OffsetLimitPage((Page)list); } + //判断初始化查询是否按时间条件查询 + private void judgeIsSearch(TUuPrintSearch search, Integer isSearch) { + if (isSearch == 0) { + search.setStartDate(null); + search.setEndDate(null); + } + } + //复印记录明细 @RequestMapping("getPrintInfo") @ResponseBody - public OffsetLimitPage getPrintInfo(Integer offset, Integer limit,TUuPrintSearch search){ + public OffsetLimitPage getPrintInfo(Integer offset, Integer limit,TUuPrintSearch search,Integer isSearch){ if(null != offset && null != limit){ PageHelper.offsetPage(offset, limit); } + judgeIsSearch(search, isSearch); List list = statisticsService.getPrintInfo(search); return new OffsetLimitPage((Page)list); } @@ -225,10 +235,11 @@ public class StatisticsController { //扫描记录报表 @RequestMapping("getScanCount") @ResponseBody - public OffsetLimitPage getScanCount(Integer offset, Integer limit,TUuPrintSearch search){ + public OffsetLimitPage getScanCount(Integer offset, Integer limit,TUuPrintSearch search,Integer isSearch){ if(null != offset && null != limit){ PageHelper.offsetPage(offset, limit); } + judgeIsSearch(search, isSearch); List list = statisticsService.getScanCount(search); return new OffsetLimitPage((Page)list); } @@ -236,10 +247,11 @@ public class StatisticsController { //扫描记录明细 @RequestMapping("getScanInfo") @ResponseBody - public OffsetLimitPage getScanInfo(Integer offset, Integer limit,TUuPrintSearch search){ + public OffsetLimitPage getScanInfo(Integer offset, Integer limit,TUuPrintSearch search,Integer isSearch){ if(null != offset && null != limit){ PageHelper.offsetPage(offset, limit); } + judgeIsSearch(search, isSearch); List list = statisticsService.getScanInfo(search); return new OffsetLimitPage((Page)list); } @@ -247,7 +259,8 @@ public class StatisticsController { //导出复印记录报表 @RequestMapping("exportExcelPrintCount") @ResponseBody - public void exportExcelPrintCount(HttpServletResponse response,TUuPrintSearch search) throws Exception{ + public void exportExcelPrintCount(HttpServletResponse response,TUuPrintSearch search,Integer isSearch) throws Exception{ + judgeIsSearch(search, isSearch); //全部明细 String tableThNames = "记账号,住院号,住院次数,患者,复印日期,操作人,复印次数"; String fieldCns = "patientId,inpNo,visitId,hzname,printTime,cpyuser,printCount"; @@ -263,7 +276,8 @@ public class StatisticsController { //导出复印记录明细 @RequestMapping("exportExcelPrintInfo") @ResponseBody - public void exportExcelPrintInfo(HttpServletResponse response,TUuPrintSearch search) throws Exception{ + public void exportExcelPrintInfo(HttpServletResponse response,TUuPrintSearch search,Integer isSearch) throws Exception{ + judgeIsSearch(search, isSearch); //全部明细 String tableThNames = "记账号,住院号,住院次数,患者姓名,性别,入院时间,出院时间,出院科室,主管医生,复印内容,操作人,复印日期,修改标志"; String fieldCns = "patientId,inpNo,visitId,hzname,sex,admissionDateTime,dischargeDateTime,name,doctorInCharge,filetitle,cpyuser,printTime,flagCn"; @@ -279,7 +293,8 @@ public class StatisticsController { //导出扫描记录报表 @RequestMapping("exportExcelScanCount") @ResponseBody - public void exportExcelScanCount(HttpServletResponse response,TUuPrintSearch search) throws Exception{ + public void exportExcelScanCount(HttpServletResponse response,TUuPrintSearch search,Integer isSearch) throws Exception{ + judgeIsSearch(search, isSearch); //全部明细 String tableThNames = "扫描人,扫描日期,扫描次数"; String fieldCns = "uuname,uploaddatetime,scanCount"; @@ -295,7 +310,8 @@ public class StatisticsController { //导出扫描记录明细 @RequestMapping("exportExcelScanInfo") @ResponseBody - public void exportExcelScanInfo(HttpServletResponse response,TUuPrintSearch search) throws Exception{ + public void exportExcelScanInfo(HttpServletResponse response,TUuPrintSearch search,Integer isSearch) throws Exception{ + judgeIsSearch(search, isSearch); //全部明细 String tableThNames = "记账号,住院号,住院次数,患者姓名,性别,入院时间,出院时间,出院科室,主管医生,扫描人,扫描时间"; String fieldCns = "patientId,inpNo,visitId,hzname,sex,admissionDateTime,dischargeDateTime,doctorDept,doctorInCharge,uuname,uploaddatetime"; diff --git a/src/main/java/com/emr/controller/WebServiceLoad.java b/src/main/java/com/emr/controller/WebServiceLoad.java new file mode 100644 index 0000000..e2b8c1b --- /dev/null +++ b/src/main/java/com/emr/controller/WebServiceLoad.java @@ -0,0 +1,40 @@ +package com.emr.controller; + +import com.emr.util.PropertiesUtils; +import org.apache.cxf.endpoint.Client; +import org.springframework.stereotype.Component; + +import javax.annotation.PostConstruct; + +/** + * @ProjectName:预加载一次webService + * @Description: + * @Param 传输参数 + * @Return + * @Author: 曾文和 + * @CreateDate: 2020/7/7 16:34 + * @UpdateUser: 曾文和 + * @UpdateDate: 2020/7/7 16:34 + * @UpdateRemark: 更新说明 + * @Version: 1.0 + */ +@Component +public class WebServiceLoad { + @PostConstruct + public void contextInitialized() { + new Thread(() -> { + String token = "11"; + String POWER_URLHEAD = PropertiesUtils.getProperty("POWER_JSP"); + //创建连接工厂 + JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance(); + //创建客户端 + Client client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl"); + try { + //动态调用getInfosByUserId方法 + Object[] objects = client.invoke("getInfosByUserId", token, "emr_medical_record"); + } catch (Exception e) { + e.printStackTrace(); + } + }).start(); + } +} diff --git a/src/main/java/com/emr/util/PropertiesUtils.java b/src/main/java/com/emr/util/PropertiesUtils.java new file mode 100644 index 0000000..4c61ed0 --- /dev/null +++ b/src/main/java/com/emr/util/PropertiesUtils.java @@ -0,0 +1,36 @@ +package com.emr.util; + + +import java.io.*; +import java.util.Properties; + +public class PropertiesUtils { + private static String fileName = "\\config\\jdbc.properties"; + private static Properties props; + + synchronized static private void loadProps(){ + if (props==null) { + props = new Properties(); + ClassLoader loader = Thread.currentThread().getContextClassLoader(); + try { + props.load(loader.getResourceAsStream(fileName)); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + public static String getProperty(String key){ + if(null == props) { + loadProps(); + } + return props.getProperty(key); + } + + public static String getProperty(String key, String defaultValue) { + if (null == props) { + loadProps(); + } + return props.getProperty(key, defaultValue); + } +} diff --git a/src/main/resources/mapper/Archive_MasterMapper.xml b/src/main/resources/mapper/Archive_MasterMapper.xml index 53e060d..bd293d2 100644 --- a/src/main/resources/mapper/Archive_MasterMapper.xml +++ b/src/main/resources/mapper/Archive_MasterMapper.xml @@ -103,7 +103,7 @@ on m.dept_name=f.code where 1=1 and YEAR(m.discharge_date_time) = '1801' - and m.dept_admission_to in + and m.dept_name in #{item} diff --git a/src/main/webapp/WEB-INF/views/beHospitaledDir/beHospList.jsp b/src/main/webapp/WEB-INF/views/beHospitaledDir/beHospList.jsp index 6900813..bf41283 100644 --- a/src/main/webapp/WEB-INF/views/beHospitaledDir/beHospList.jsp +++ b/src/main/webapp/WEB-INF/views/beHospitaledDir/beHospList.jsp @@ -207,7 +207,7 @@
- - +
diff --git a/src/main/webapp/WEB-INF/views/statistics/printCount.jsp b/src/main/webapp/WEB-INF/views/statistics/printCount.jsp index 86ffbe2..a2ca32b 100644 --- a/src/main/webapp/WEB-INF/views/statistics/printCount.jsp +++ b/src/main/webapp/WEB-INF/views/statistics/printCount.jsp @@ -29,6 +29,8 @@ + +
diff --git a/src/main/webapp/WEB-INF/views/statistics/printInfo.jsp b/src/main/webapp/WEB-INF/views/statistics/printInfo.jsp index 14afbf8..58138a9 100644 --- a/src/main/webapp/WEB-INF/views/statistics/printInfo.jsp +++ b/src/main/webapp/WEB-INF/views/statistics/printInfo.jsp @@ -29,6 +29,8 @@ + +
diff --git a/src/main/webapp/WEB-INF/views/statistics/scanCount.jsp b/src/main/webapp/WEB-INF/views/statistics/scanCount.jsp index ac7a231..4267d88 100644 --- a/src/main/webapp/WEB-INF/views/statistics/scanCount.jsp +++ b/src/main/webapp/WEB-INF/views/statistics/scanCount.jsp @@ -29,6 +29,8 @@ + +
diff --git a/src/main/webapp/WEB-INF/views/statistics/scanInfo.jsp b/src/main/webapp/WEB-INF/views/statistics/scanInfo.jsp index cb22628..7ed5ee4 100644 --- a/src/main/webapp/WEB-INF/views/statistics/scanInfo.jsp +++ b/src/main/webapp/WEB-INF/views/statistics/scanInfo.jsp @@ -29,6 +29,8 @@ + +
@@ -68,7 +70,7 @@
- + \ No newline at end of file diff --git a/src/main/webapp/static/js/beHospList/beHospList.js b/src/main/webapp/static/js/beHospList/beHospList.js index a0230ce..55dd161 100644 --- a/src/main/webapp/static/js/beHospList/beHospList.js +++ b/src/main/webapp/static/js/beHospList/beHospList.js @@ -70,7 +70,7 @@ function initTable() { archivestate: "" + $("#archivestate1").val(), //deptName: "" + $("#deptName").val(), startDateTo: $("#startDateTo").val(), - endDateTo: $("#endDateTo").val(), + endDateTo: $("#endDateTo1").val(), deptName: deptName.toString(), doctorInCharge:$("#doctorInCharge").val(), isSearch:$("#isSearch").val(), @@ -434,7 +434,7 @@ $("#excelBtn").click(function () { var name = $("#name").val(); var deptName = $("#deptName").val(); var startDateTo = $("#startDateTo").val(); - var endDateTo = $("#endDateTo").val(); + var endDateTo = $("#endDateTo1").val(); var isSearch = $("#isSearch").val(); var archivestate = $("#archivestate1").val(); var status = $("#currentRoleIds").val(); diff --git a/src/main/webapp/static/js/hospitalLoadPdf/loadPdf.js b/src/main/webapp/static/js/hospitalLoadPdf/loadPdf.js index caf17d7..253706c 100644 --- a/src/main/webapp/static/js/hospitalLoadPdf/loadPdf.js +++ b/src/main/webapp/static/js/hospitalLoadPdf/loadPdf.js @@ -4,8 +4,11 @@ $(function(){ $("#startDateTo").val(getPreMonthToday()); //结束时间为今天 $("#endDateTo").val(getNowDay()); + //结束时间为前天 + $("#endDateTo1").val(getBeforeYesterDay()); initDateInput('startDate','endDate'); initDateInput('startDateTo','endDateTo'); + initDateInput('startDateTo','endDateTo1'); }) //未终审页面、在院浏览、出院浏览查看病历时按审核角色查询分类,主要查询checker=2护士的只查看护理记录单和体温表 function getChecker(){ @@ -62,6 +65,16 @@ function getNowDay(){ return year+'-'+mon+'-'+date; } +//获取当前前两天的信息 +function getBeforeYesterDay(){ + var time=(new Date).getTime()-24*60*60*1000*2; + var yesterday=new Date(time); + var month=yesterday.getMonth(); + var day=yesterday.getDate(); + yesterday=yesterday.getFullYear() + "-" + (yesterday.getMonth()> 9 ? (yesterday.getMonth() + 1) : "0" + (yesterday.getMonth() + 1)) + "-" +(yesterday.getDate()> 9 ? (yesterday.getDate()) : "0" + (yesterday.getDate())); + return yesterday; +} + //获取当前日期的前一个月日期 function getPreMonthToday(){ var currentYear = new Date().getFullYear(); diff --git a/src/main/webapp/static/js/showRecord/showRecordIframe.js b/src/main/webapp/static/js/showRecord/showRecordIframe.js index 6f24002..b21ddbe 100644 --- a/src/main/webapp/static/js/showRecord/showRecordIframe.js +++ b/src/main/webapp/static/js/showRecord/showRecordIframe.js @@ -19,7 +19,8 @@ var menu = { enable:true }, callback: { //回调函数 - onCheck: onCheck } + onCheck: onCheck, + onClick:onClick} }, loadMenuTree:function(){ $.ajax({ @@ -58,23 +59,34 @@ $().ready(function(data){ onloadPdf(); }); -//树选中事件 -function onCheck(e, treeId, treeNode) { - var treeObj=$.fn.zTree.getZTreeObj("ztree"); - nodes=treeObj.getCheckedNodes(true); +//获取获取树选中节点,赋值隐藏域并加载pdf +function onPdfLoadByselected() { + var treeObj = $.fn.zTree.getZTreeObj("ztree"); + nodes = treeObj.getCheckedNodes(true); var detailIds = ''; for (var i = 0; i < nodes.length; i++) { - if(nodes[i].level == 2){ - if(i != (nodes.length-1)){ - detailIds += "'"+nodes[i].selfId+"',"; - }else{ - detailIds += "'"+nodes[i].selfId+"'"; + if (nodes[i].level == 2) { + if (i != (nodes.length - 1)) { + detailIds += "'" + nodes[i].selfId + "',"; + } else { + detailIds += "'" + nodes[i].selfId + "'"; } } } $("#detailIds").val(detailIds); //加载pdf onloadPdf(); +} + +//树选中事件 +function onCheck(e, treeId, treeNode) { + onPdfLoadByselected(); +}; +//树点击事件 +function onClick(e, treeId, treeNode) { + //点击后选中 + zTree.checkNode(treeNode,!treeNode.checked, true); + onPdfLoadByselected(); }; //加载pdfan按钮功能 function onloadPdf(){ diff --git a/src/main/webapp/static/js/statistics/printCount.js b/src/main/webapp/static/js/statistics/printCount.js index eba97c9..9e11e69 100644 --- a/src/main/webapp/static/js/statistics/printCount.js +++ b/src/main/webapp/static/js/statistics/printCount.js @@ -56,7 +56,8 @@ function initTable() { offset: offset, //页码 startDate: $("#startTime1").val(), endDate: $("#endTime1").val(), - name:$("#name").val() + name:$("#name").val(), + isSearch:$("#isSearch").val() }; return temp; }, @@ -146,6 +147,7 @@ $("#excelBtn").click(function () { "startDate": $("#startTime1").val(), "endDate": $("#endTime1").val(), "name":$("#name").val(), + "isSearch":$("#isSearch").val(), "sql":sql }); }); \ No newline at end of file diff --git a/src/main/webapp/static/js/statistics/printInfo.js b/src/main/webapp/static/js/statistics/printInfo.js index e975f8e..3337713 100644 --- a/src/main/webapp/static/js/statistics/printInfo.js +++ b/src/main/webapp/static/js/statistics/printInfo.js @@ -56,7 +56,8 @@ function initTable() { offset: offset, //页码 startDate: $("#startTime1").val(), endDate: $("#endTime1").val(), - name:$("#name").val() + name:$("#name").val(), + isSearch:$("#isSearch").val() }; return temp; }, @@ -182,6 +183,7 @@ $("#excelBtn").click(function () { "startDate": $("#startTime1").val(), "endDate": $("#endTime1").val(), "name":$("#name").val(), + "isSearch":$("#isSearch").val(), "sql":sql }); }); \ No newline at end of file diff --git a/src/main/webapp/static/js/statistics/scanCount.js b/src/main/webapp/static/js/statistics/scanCount.js index 82490ff..831380b 100644 --- a/src/main/webapp/static/js/statistics/scanCount.js +++ b/src/main/webapp/static/js/statistics/scanCount.js @@ -56,7 +56,8 @@ function initTable() { offset: offset, //页码 startDate: $("#startTime1").val(), endDate: $("#endTime1").val(), - name:$("#name").val() + name:$("#name").val(), + isSearch:$("#isSearch").val() }; return temp; }, @@ -128,6 +129,7 @@ $("#excelBtn").click(function () { "startDate": $("#startTime1").val(), "endDate": $("#endTime1").val(), "name":$("#name").val(), + "isSearch":$("#isSearch").val(), "sql":sql }); }); \ No newline at end of file diff --git a/src/main/webapp/static/js/statistics/scanInfo.js b/src/main/webapp/static/js/statistics/scanInfo.js index 01356d8..224cfd1 100644 --- a/src/main/webapp/static/js/statistics/scanInfo.js +++ b/src/main/webapp/static/js/statistics/scanInfo.js @@ -56,7 +56,8 @@ function initTable() { offset: offset, //页码 startDate: $("#startTime1").val(), endDate: $("#endTime1").val(), - name:$("#name").val() + name:$("#name").val(), + isSearch:$("#isSearch").val(), }; return temp; }, @@ -170,6 +171,7 @@ $("#excelBtn").click(function () { "startDate": $("#startTime1").val(), "endDate": $("#endTime1").val(), "name":$("#name").val(), + "isSearch":$("#isSearch").val(), "sql":sql }); }); \ No newline at end of file diff --git a/src/main/webapp/static/js/statistics/statisticsCommom.js b/src/main/webapp/static/js/statistics/statisticsCommom.js index 0c592ee..94d79da 100644 --- a/src/main/webapp/static/js/statistics/statisticsCommom.js +++ b/src/main/webapp/static/js/statistics/statisticsCommom.js @@ -1,5 +1,4 @@ $(function () { - initTable(); //加载时间 initDateInput(1); initDateInput(2); @@ -9,6 +8,7 @@ $(function () { //结束时间为今天 $("#endTime1").val(getNowDay()); $("#endTime2").val(getNowDay()); + initTable(); }) function initDateInput(idVal){