From 07358d523509d1ee87a5b672caf51ba45d2a6db5 Mon Sep 17 00:00:00 2001 From: zengwh <81383286@qq.com> Date: Tue, 13 Oct 2020 14:17:51 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=EF=BC=9A?= =?UTF-8?q?=E7=97=85=E6=A1=88=E6=8F=90=E4=BA=A4=E6=8A=A5=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E7=97=85=E6=A1=88=E6=8F=90=E4=BA=A4=E6=98=8E=E7=BB=86=202.?= =?UTF-8?q?=E5=87=BA=E9=99=A2=EF=BC=8C=E5=9C=A8=E9=99=A2=E4=B8=BB=E7=AE=A1?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E6=90=9C=E7=B4=A2=E5=A1=AB=E5=86=99=E6=A1=86?= =?UTF-8?q?=EF=BC=88=E9=9C=80=E6=94=B9=E5=8A=A8=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=B8=BA=E6=89=80=E5=9C=A8=E7=A7=91=E5=AE=A4=E5=86=85=E4=B8=BB?= =?UTF-8?q?=E7=AE=A1=E5=8C=BB=E7=94=9F=E4=B8=8B=E6=8B=89=E6=A1=86=E5=8F=AF?= =?UTF-8?q?=E9=80=89=EF=BC=89=203.=E6=8A=A4=E7=90=86=E6=96=87=E4=B9=A6?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=8F=96=E6=B6=88=E5=B7=A5=E5=8F=B7=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/emr/controller/FontController.java | 8 +-- .../controller/beHospitaledController.java | 11 ++-- .../com/emr/dao/Archive_MasterMapper.java | 2 + .../emr/service/Archive_MasterService.java | 2 + .../ipml/Archive_MasterServiceImpl.java | 54 +++++++++++++------ .../mapper/ArchiveOtherExtMapper.xml | 2 +- .../resources/mapper/Archive_MasterMapper.xml | 30 +++++++---- src/main/webapp/WEB-INF/jspf/comm.jspf | 4 +- .../views/beHospitaledDir/beHospList.jsp | 10 ++-- .../WEB-INF/views/faultDir/faultList.jsp | 2 +- .../views/inHospitalDir/inHositalList.jsp | 10 ++-- src/main/webapp/WEB-INF/views/index.jsp | 2 +- .../views/lastVerifyDir/lastVerifyList.jsp | 4 +- .../medicalRecallDir/medicalRecallList.jsp | 2 +- .../WEB-INF/views/record/signedRecord.jsp | 2 +- .../WEB-INF/views/record/submitRecord.jsp | 4 +- .../unfileMedicalDir/unfileMedicalList.jsp | 4 +- .../bootstrap-select/defaults-zh_CN.js.map | 1 + .../bootstrap-select/defaults-zh_CN.min.js | 8 +++ .../webapp/static/js/beHospList/beHospList.js | 10 ++-- src/main/webapp/static/js/comm.js | 35 +++++++++++- .../webapp/static/js/faultList/faultList.js | 3 +- .../js/hospitalCommom/hospitalCommom.js | 53 ++++++++++++++---- .../webapp/static/js/inHospList/inHospList.js | 31 +++-------- .../js/lastVerifyList/lastVerifyList.js | 2 + .../js/medicalRecallList/medicalRecallList.js | 1 + .../js/unfileMedicalList/unfileMedicalList.js | 2 + 27 files changed, 206 insertions(+), 93 deletions(-) create mode 100644 src/main/webapp/static/bootstrap-3.3.7/plugins/bootstrap-select/defaults-zh_CN.js.map create mode 100644 src/main/webapp/static/bootstrap-3.3.7/plugins/bootstrap-select/defaults-zh_CN.min.js diff --git a/src/main/java/com/emr/controller/FontController.java b/src/main/java/com/emr/controller/FontController.java index 22381b2..bacec30 100644 --- a/src/main/java/com/emr/controller/FontController.java +++ b/src/main/java/com/emr/controller/FontController.java @@ -77,10 +77,10 @@ public class FontController { * */ @RequestMapping("showRecordByPatientId") public String showRecordByPatientId(String userName, String assortIds, String patientId, Model model){ - //判断各参数 + /* //判断各参数 if(StringUtils.isBlank(userName)){ return retrunErrorPage(model,"工号不能为空!"); - } + }*/ if(StringUtils.isBlank(assortIds)){ return retrunErrorPage(model,"病案分类Id不能为空!"); } @@ -90,10 +90,10 @@ public class FontController { List list = new ArrayList<>(); //判断工号是否存在 try { - String checkUserName = checkUserName(userName); + /* String checkUserName = checkUserName(userName); if(StringUtils.isNotBlank(checkUserName)){ return retrunErrorPage(model,checkUserName); - } + }*/ //判断分类id是否存在,协商assortIds = "00000000"为查询全部 if(!allAddortIds.equals(assortIds)) { String checkAssortIds = checkAssortIds(assortIds); diff --git a/src/main/java/com/emr/controller/beHospitaledController.java b/src/main/java/com/emr/controller/beHospitaledController.java index 9254654..1214b35 100644 --- a/src/main/java/com/emr/controller/beHospitaledController.java +++ b/src/main/java/com/emr/controller/beHospitaledController.java @@ -13,13 +13,11 @@ import com.emr.entity.Archive_Master_Vo; import com.emr.entity.OffsetLimitPage; import com.emr.service.Archive_MasterService; import com.emr.service.ipml.ArchiveFlowInfoService; -import com.emr.service.ipml.StatisticsService; import com.emr.util.ExceptionPrintUtil; import com.emr.util.ExportExcelUtil; import com.emr.util.Msg; import com.emr.util.OracleConnect; import com.emr.vo.ArchiveFlowInfoVo; -import com.emr.vo.User; import org.apache.commons.lang3.StringUtils; import org.apache.cxf.endpoint.Client; import org.apache.shiro.SecurityUtils; @@ -49,8 +47,6 @@ public class beHospitaledController { private ArchiveFlowRoleMapper flowRoleMapper; @Autowired private ArchiveFlowInfoService flowInfoService; - @Autowired - private StatisticsService statisticsService; @RequestMapping(value = "/beHosps") public String inHospitals(){ return "beHospitaledDir/beHospList"; @@ -245,6 +241,13 @@ public class beHospitaledController { model.addAttribute("list",list); return "beHospitaledDir/timeLine"; } + + @RequestMapping("loadDoctorInCharge") + @ResponseBody + private Msg loadDoctorInCharge(String deptName) throws Exception{ + List list = archiveMasterService.loadDoctorInCharge(deptName); + return Msg.success().add("list",list); + } } diff --git a/src/main/java/com/emr/dao/Archive_MasterMapper.java b/src/main/java/com/emr/dao/Archive_MasterMapper.java index 9eb2b72..1cbe6a8 100644 --- a/src/main/java/com/emr/dao/Archive_MasterMapper.java +++ b/src/main/java/com/emr/dao/Archive_MasterMapper.java @@ -49,4 +49,6 @@ public interface Archive_MasterMapper { int updateLockInfoByMasterId(@Param("masterIds")String masterIds,@Param("lockinfo")String lockinfo); List selectDaysByMasterIds(List list); + + List loadDoctorInCharge(@Param("deptName") String deptName); } \ No newline at end of file diff --git a/src/main/java/com/emr/service/Archive_MasterService.java b/src/main/java/com/emr/service/Archive_MasterService.java index 3a1e566..299b3ee 100644 --- a/src/main/java/com/emr/service/Archive_MasterService.java +++ b/src/main/java/com/emr/service/Archive_MasterService.java @@ -114,6 +114,8 @@ public interface Archive_MasterService { Msg getRole(); List selectLastVerifyList(Archive_Master_Vo archiveMasterVo); + + List loadDoctorInCharge(String deptName); } diff --git a/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java b/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java index 939d4ff..fe70a0d 100644 --- a/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java +++ b/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java @@ -203,7 +203,13 @@ public class Archive_MasterServiceImpl implements Archive_MasterService { if(null != list && !list.isEmpty()){ //记帐号集合 StringBuilder patientIdStr = new StringBuilder(); + //查询科室集合 + Emr_Dictionary dictionary = new Emr_Dictionary(); + dictionary.setTypecode("dept_code"); + List dictionaries = dictionaryMapper.dicByTypeCode(dictionary); for (Archive_Master_Vo masterVo : list) { + //科室名称编码转名称 + DeptNameCode2Name(dictionaries, masterVo); //状态均为护士长已质控,取出一个对象,转换中文状态 Integer status = Integer.valueOf(masterVo.getArchivestate()); if(status.equals(EnumVerify.DocState.HeadNurseCheck.getCode())){ @@ -211,6 +217,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService { }else if(status.equals(EnumVerify.DocState.CallBacked.getCode())){ masterVo.setStatus(EnumVerify.DocState.CallBacked.getName()); } + //科室转换 //组织记帐号集合 if(StringUtils.isNotBlank(masterVo.getPatientId())) { if (StringUtils.isNotBlank(patientIdStr)) { @@ -264,6 +271,11 @@ public class Archive_MasterServiceImpl implements Archive_MasterService { return list; } + @Override + public List loadDoctorInCharge(String deptName) { + return archiveMasterMapper.loadDoctorInCharge(deptName); + } + /** * 已归档 * 病案终审退回页面 @@ -327,22 +339,8 @@ public class Archive_MasterServiceImpl implements Archive_MasterService { //查询出院天数 List selectDays = archiveMasterMapper.selectDaysByMasterIds(list); for (Archive_Master_Vo vo:list) { - if(!CollectionUtils.isEmpty(dictionaries)) { - //在院科室 - String deptAdmissionTo = vo.getDeptAdmissionTo(); - //出院科室 - String deptName = vo.getDeptName(); - //住院科室 - for (Emr_Dictionary dictionaryTemp : dictionaries) { - String name = dictionaryTemp.getName(); - if (StringUtils.isNotBlank(deptAdmissionTo) && deptAdmissionTo.equals(dictionaryTemp.getCode())) { - vo.setDeptAdmissionTo(name); - } - if (StringUtils.isNotBlank(deptName) && deptName.equals(dictionaryTemp.getCode())) { - vo.setDeptName(name); - } - } - } + //科室名称编码转名称 + DeptNameCode2Name(dictionaries, vo); //赋值出院天数 if(!CollectionUtils.isEmpty(selectDays)){ for(Archive_Master_Vo days : selectDays){ @@ -356,6 +354,30 @@ public class Archive_MasterServiceImpl implements Archive_MasterService { } } + /** + * 科室名称编码转名称 + * @param dictionaries 科室字典列表 + * @param vo 患者记录对象 + */ + private void DeptNameCode2Name(List dictionaries, Archive_Master_Vo vo) { + if(!CollectionUtils.isEmpty(dictionaries)) { + //在院科室 + String deptAdmissionTo = vo.getDeptAdmissionTo(); + //出院科室 + String deptName = vo.getDeptName(); + //住院科室 + for (Emr_Dictionary dictionaryTemp : dictionaries) { + String name = dictionaryTemp.getName(); + if (StringUtils.isNotBlank(deptAdmissionTo) && deptAdmissionTo.equals(dictionaryTemp.getCode())) { + vo.setDeptAdmissionTo(name); + } + if (StringUtils.isNotBlank(deptName) && deptName.equals(dictionaryTemp.getCode())) { + vo.setDeptName(name); + } + } + } + } + //验证字符串是否是数字 public static boolean isNumeric(String str){ for (int i = 0; i < str.length(); i++){ diff --git a/src/main/resources/mapper/ArchiveOtherExtMapper.xml b/src/main/resources/mapper/ArchiveOtherExtMapper.xml index 77035cd..c559cb3 100644 --- a/src/main/resources/mapper/ArchiveOtherExtMapper.xml +++ b/src/main/resources/mapper/ArchiveOtherExtMapper.xml @@ -514,7 +514,7 @@ update archive_other_ext - set statusFlag = 0 + set statusFlag = 0,T2 = '1801-02-03' ID in (${ids}) diff --git a/src/main/resources/mapper/Archive_MasterMapper.xml b/src/main/resources/mapper/Archive_MasterMapper.xml index 594527e..6b34c71 100644 --- a/src/main/resources/mapper/Archive_MasterMapper.xml +++ b/src/main/resources/mapper/Archive_MasterMapper.xml @@ -165,8 +165,8 @@ and m.LockInfo = #{lockinfo,jdbcType=NVARCHAR} - - and m.DOCTOR_IN_CHARGE LIKE '%'+#{doctorInCharge,jdbcType=NVARCHAR}+'%' + + and m.DOCTOR_IN_CHARGE in (${doctorInCharge}) and m.DISCHARGE_DISPOSITION = #{dischargeDisposition,jdbcType=NVARCHAR} @@ -208,7 +208,7 @@ - and m.DOCTOR_IN_CHARGE LIKE '%'+#{doctorInCharge,jdbcType=NVARCHAR}+'%' + and m.DOCTOR_IN_CHARGE in (${doctorInCharge}) @@ -434,8 +434,8 @@ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jspf/comm.jspf b/src/main/webapp/WEB-INF/jspf/comm.jspf index a4cdfec..79a0111 100644 --- a/src/main/webapp/WEB-INF/jspf/comm.jspf +++ b/src/main/webapp/WEB-INF/jspf/comm.jspf @@ -38,6 +38,7 @@ + <%--导入导出--%> @@ -56,4 +57,5 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/beHospitaledDir/beHospList.jsp b/src/main/webapp/WEB-INF/views/beHospitaledDir/beHospList.jsp index d238284..53298f8 100644 --- a/src/main/webapp/WEB-INF/views/beHospitaledDir/beHospList.jsp +++ b/src/main/webapp/WEB-INF/views/beHospitaledDir/beHospList.jsp @@ -132,8 +132,10 @@
- +
@@ -750,7 +752,7 @@
- - + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/faultDir/faultList.jsp b/src/main/webapp/WEB-INF/views/faultDir/faultList.jsp index 9430571..c9c52ee 100644 --- a/src/main/webapp/WEB-INF/views/faultDir/faultList.jsp +++ b/src/main/webapp/WEB-INF/views/faultDir/faultList.jsp @@ -141,7 +141,7 @@ - + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/inHospitalDir/inHositalList.jsp b/src/main/webapp/WEB-INF/views/inHospitalDir/inHositalList.jsp index 2108d76..3454a8e 100644 --- a/src/main/webapp/WEB-INF/views/inHospitalDir/inHositalList.jsp +++ b/src/main/webapp/WEB-INF/views/inHospitalDir/inHositalList.jsp @@ -116,8 +116,10 @@
- +
@@ -446,7 +448,7 @@ - + - + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/index.jsp b/src/main/webapp/WEB-INF/views/index.jsp index ed5950a..1e9123c 100644 --- a/src/main/webapp/WEB-INF/views/index.jsp +++ b/src/main/webapp/WEB-INF/views/index.jsp @@ -132,7 +132,7 @@ } } } - localStorage.setItem("depts",depts); + localStorage.setItem($("#userId").val()+"_depts",depts); for (var i = 0; i < list.length; i++) { if (list[0].deptId == list[i].deptId) { if (list[i].methodParent != 0 && (list[i].menuUrl == "#" || list[i].menuUrl == "" || list[i].menuUrl == null)) { diff --git a/src/main/webapp/WEB-INF/views/lastVerifyDir/lastVerifyList.jsp b/src/main/webapp/WEB-INF/views/lastVerifyDir/lastVerifyList.jsp index 3269397..04137ab 100644 --- a/src/main/webapp/WEB-INF/views/lastVerifyDir/lastVerifyList.jsp +++ b/src/main/webapp/WEB-INF/views/lastVerifyDir/lastVerifyList.jsp @@ -646,8 +646,8 @@
- - + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/medicalRecallDir/medicalRecallList.jsp b/src/main/webapp/WEB-INF/views/medicalRecallDir/medicalRecallList.jsp index c2265aa..feba2a7 100644 --- a/src/main/webapp/WEB-INF/views/medicalRecallDir/medicalRecallList.jsp +++ b/src/main/webapp/WEB-INF/views/medicalRecallDir/medicalRecallList.jsp @@ -238,5 +238,5 @@ - + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/record/signedRecord.jsp b/src/main/webapp/WEB-INF/views/record/signedRecord.jsp index e9c7097..c988d44 100644 --- a/src/main/webapp/WEB-INF/views/record/signedRecord.jsp +++ b/src/main/webapp/WEB-INF/views/record/signedRecord.jsp @@ -50,7 +50,7 @@
-
+
diff --git a/src/main/webapp/WEB-INF/views/record/submitRecord.jsp b/src/main/webapp/WEB-INF/views/record/submitRecord.jsp index 6fca718..8924636 100644 --- a/src/main/webapp/WEB-INF/views/record/submitRecord.jsp +++ b/src/main/webapp/WEB-INF/views/record/submitRecord.jsp @@ -97,7 +97,7 @@
- +
@@ -137,7 +137,7 @@
-
+

出院病人 0 个, 其中已提交病历 0 个, 总体提交率 0% ; diff --git a/src/main/webapp/WEB-INF/views/unfileMedicalDir/unfileMedicalList.jsp b/src/main/webapp/WEB-INF/views/unfileMedicalDir/unfileMedicalList.jsp index ff08502..53e1fe4 100644 --- a/src/main/webapp/WEB-INF/views/unfileMedicalDir/unfileMedicalList.jsp +++ b/src/main/webapp/WEB-INF/views/unfileMedicalDir/unfileMedicalList.jsp @@ -592,7 +592,7 @@ - - + + \ No newline at end of file diff --git a/src/main/webapp/static/bootstrap-3.3.7/plugins/bootstrap-select/defaults-zh_CN.js.map b/src/main/webapp/static/bootstrap-3.3.7/plugins/bootstrap-select/defaults-zh_CN.js.map new file mode 100644 index 0000000..2843576 --- /dev/null +++ b/src/main/webapp/static/bootstrap-3.3.7/plugins/bootstrap-select/defaults-zh_CN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../../js/i18n/defaults-zh_CN.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAChB,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AACjC,IAAI,gBAAgB,CAAC,CAAC,UAAU,CAAC;AACjC,IAAI,eAAe,CAAC,CAAC,UAAU,CAAC;AAChC,IAAI,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACtC,IAAI,cAAc,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;AAC9D,IAAI,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC7B,IAAI,aAAa,CAAC,CAAC,KAAK,CAAC;AACzB,IAAI,eAAe,CAAC,CAAC,MAAM,CAAC;AAC5B,EAAE,EAAE,CAAC;AACL,GAAG,MAAM,EAAE,CAAC","file":"defaults-zh_CN.js","sourcesContent":["(function ($) {\r\n $.fn.selectpicker.defaults = {\r\n noneSelectedText: '没有选中任何项',\r\n noneResultsText: '没有找到匹配项',\r\n countSelectedText: '选中{1}中的{0}项',\r\n maxOptionsText: ['超出限制 (最多选择{n}项)', '组选择超出限制(最多选择{n}组)'],\r\n multipleSeparator: ', ',\r\n selectAllText: '全选',\r\n deselectAllText: '取消全选'\r\n };\r\n})(jQuery);\r\n"]} \ No newline at end of file diff --git a/src/main/webapp/static/bootstrap-3.3.7/plugins/bootstrap-select/defaults-zh_CN.min.js b/src/main/webapp/static/bootstrap-3.3.7/plugins/bootstrap-select/defaults-zh_CN.min.js new file mode 100644 index 0000000..2006cae --- /dev/null +++ b/src/main/webapp/static/bootstrap-3.3.7/plugins/bootstrap-select/defaults-zh_CN.min.js @@ -0,0 +1,8 @@ +/*! + * Bootstrap-select v1.13.9 (https://developer.snapappointments.com/bootstrap-select) + * + * Copyright 2012-2019 SnapAppointments, LLC + * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) + */ + +!function(e,t){void 0===e&&void 0!==window&&(e=window),"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(e.jQuery)}(this,function(e){e.fn.selectpicker.defaults={noneSelectedText:"\u6ca1\u6709\u9009\u4e2d\u4efb\u4f55\u9879",noneResultsText:"\u6ca1\u6709\u627e\u5230\u5339\u914d\u9879",countSelectedText:"\u9009\u4e2d{1}\u4e2d\u7684{0}\u9879",maxOptionsText:["\u8d85\u51fa\u9650\u5236 (\u6700\u591a\u9009\u62e9{n}\u9879)","\u7ec4\u9009\u62e9\u8d85\u51fa\u9650\u5236(\u6700\u591a\u9009\u62e9{n}\u7ec4)"],multipleSeparator:", ",selectAllText:"\u5168\u9009",deselectAllText:"\u53d6\u6d88\u5168\u9009"}}); \ 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 cf753c5..ffd6d50 100644 --- a/src/main/webapp/static/js/beHospList/beHospList.js +++ b/src/main/webapp/static/js/beHospList/beHospList.js @@ -63,7 +63,7 @@ function initTable() { startDateTo: $("#startDateTo").val(), endDateTo: $("#endDateTo").val(), deptName: getDeptNameForQuery(), - doctorInCharge:$("#doctorInCharge").val(), + doctorInCharge:getSelecteds('doctorInCharge'), isSearch:$("#isSearch").val(), status:$("#currentRoleIds").val(), role:$("#currentRole").val(), @@ -703,6 +703,10 @@ $("#infoId").change(function(){ }) $(function () { + //加载主管医生列表 + loadDoctorInCharge(); + //加载权限科室 + getPowerDept(); //赋值审核角色 getChecker(); //加载当前角色 @@ -754,11 +758,11 @@ $(function () { //导出excel功能 $("#excelBtn").click(function () { - var doctorInCharge = $("#doctorInCharge").val(); + var doctorInCharge = getSelecteds("doctorInCharge"); var inpNo = $("#inpNo").val(); var visitId = $("#visitId").val(); var name = $("#name").val(); - var deptName = $("#deptName").val(); + var deptName = getDeptNameForQuery(); var startDateTo = $("#startDateTo").val(); var endDateTo = $("#endDateTo").val(); var isSearch = $("#isSearch").val(); diff --git a/src/main/webapp/static/js/comm.js b/src/main/webapp/static/js/comm.js index 8d74b6f..dc9b605 100644 --- a/src/main/webapp/static/js/comm.js +++ b/src/main/webapp/static/js/comm.js @@ -14,7 +14,31 @@ function setFormToken(){ }) } //加载科室 +//flag=1显示全部科室 flag=2显示过滤科室 function getDept() { + //获取科室列表 + $.ajax({ + url: path+"/inHosp/getDept", + type: "POST", + data: {effective: 1, typecode: "dept_code"}, + success: function (result) { + if (result != null) { + var html = ''; + for (var i = 0; i < result.length; i++) { + var name = result[i].name; + var py = makePy(name); + var pingyin = ConvertPinyin(name); + html += ''; + } + $("#deptName").append(html); + $("#deptAdmissionTo").append(html); + } + $(".selectpicker").selectpicker('refresh'); // + } + }); +} +//加载权限科室 +function getPowerDept() { //获取科室列表 $.ajax({ url: path+"/inHosp/getDept", @@ -44,10 +68,19 @@ function getDept() { $("#deptName").append(html); $("#deptAdmissionTo").append(html); } - $(".selectpicker").selectpicker('refresh'); // + $(".selectpicker").selectpicker('refresh'); } }); } +//列表根据科室查询逻辑方法 +function getDeptNameForQuery(){ + var deptAdmissionTo = localStorage.getItem($("#userId").val()+"_depts"); + var deptName = $("#deptName").val(); + if(deptName.length > 0){ + deptAdmissionTo = deptName.toString(); + } + return deptAdmissionTo; +} //键盘回车查询 $(document).keyup(function(event){ if(event.keyCode ==13){ diff --git a/src/main/webapp/static/js/faultList/faultList.js b/src/main/webapp/static/js/faultList/faultList.js index 42995ca..c039858 100644 --- a/src/main/webapp/static/js/faultList/faultList.js +++ b/src/main/webapp/static/js/faultList/faultList.js @@ -233,7 +233,8 @@ function initTable() { } $(function () { - getDept(); + //加载权限科室 + getPowerDept(); var url = window.location.href; var index = url.substring(url.lastIndexOf('?') + 1).replace("num=", ""); if (index != null && index != "" && index.indexOf("excel") != -1) { diff --git a/src/main/webapp/static/js/hospitalCommom/hospitalCommom.js b/src/main/webapp/static/js/hospitalCommom/hospitalCommom.js index b2a3610..450c1f4 100644 --- a/src/main/webapp/static/js/hospitalCommom/hospitalCommom.js +++ b/src/main/webapp/static/js/hospitalCommom/hospitalCommom.js @@ -1,12 +1,3 @@ -//列表根据科室查询逻辑方法 -function getDeptNameForQuery(){ - var deptAdmissionTo = localStorage.getItem("depts"); - var deptName = $("#deptName").val(); - if(deptName.length > 0){ - deptAdmissionTo = deptName.toString(); - } - return deptAdmissionTo; -} //校验完整性 function checkSuccessMethod(masterId){ var returnStr = ''; @@ -23,7 +14,48 @@ function checkSuccessMethod(masterId){ }); return returnStr; } - +//加载科室内主管医生列表 +function loadDoctorInCharge(){ + var deptName = getDeptNameForQuery(); + $.ajax({ + type:'get', + url:path+'/beHosp/loadDoctorInCharge', + data:{deptName:deptName}, + success:function(data){ + $("#doctorInCharge").empty(); + if(data.code == 100){ + var html = ''; + var list = data.extend.list; + if(list != null && list != ''){ + for (var i = 0; i < list.length; i++) { + var name = list[i].doctorInCharge; + var py = makePy(name); + var pingyin = ConvertPinyin(name); + html += ''; + } + } + $("#doctorInCharge").append(html); + } + $(".selectpicker").selectpicker('refresh'); + } + }) +} +//根据多选下拉框id获取多选下拉框选中的值 +function getSelecteds(id){ + var arr = $("#"+id).val(); + var values = ''; + if(arr != undefined && arr.length > 0){ + for (var i = 0; i < arr.length; i++) { + if(arr[i] != ''){ + if(values != ''){ + values += ','; + } + values += "'" + arr[i] + "'"; + } + } + } + return values; +} //退回按钮 function returnInfo(status,targetCode,id){ //重新生成formToken @@ -176,7 +208,6 @@ var files = new Array(); var id = 0; //图片处理相关代码 $(function () { - getDept(); initTable(); }); diff --git a/src/main/webapp/static/js/inHospList/inHospList.js b/src/main/webapp/static/js/inHospList/inHospList.js index cf2948f..22e9204 100644 --- a/src/main/webapp/static/js/inHospList/inHospList.js +++ b/src/main/webapp/static/js/inHospList/inHospList.js @@ -3,6 +3,10 @@ var tipLoad = 1; //定义表格内容最大高度 var maxHeight = 0; $(function () { + //加载主管医生列表 + loadDoctorInCharge(); + //加载权限科室 + getPowerDept(); getChecker(); var url = window.location.href; var index = url.substring(url.lastIndexOf('?') + 1).replace("num=", ""); @@ -111,7 +115,7 @@ function initTable() { startDateTo: $("#startDateTo").val(), endDateTo: $("#endDateTo").val(), deptAdmissionTo: getDeptNameForQuery(), - doctorInCharge: $("#doctorInCharge").val(), + doctorInCharge: getSelecteds('doctorInCharge'), isSearch: $("#isSearch").val() }; return temp; @@ -274,33 +278,13 @@ function initTable() { //导出excel功能 $("#excelBtn").click(function () { - var doctorInCharge = $("#doctorInCharge").val(); + var doctorInCharge = getSelecteds("doctorInCharge"); var inpNo = $("#inpNo").val(); var visitId = $("#visitId").val(); var name = $("#name").val(); var startDateTo = $("#startDateTo").val(); var endDateTo = $("#endDateTo").val(); - var url = window.location.href; - var deptAdmissionTo = url.substring(url.lastIndexOf('&') + 1).replace("depts=", ""); - var len = ($("#deptName").val()).length; - if (len > 0) { - var deptName = $("#deptName").val(); - if (deptName.indexOf("") != -1) { - if (deptAdmissionTo != null && deptAdmissionTo != '') { - deptAdmissionTo += "," + $("#deptAdmissionTo").val(); - } else if ($("#deptAdmissionTo").val() != null && $("#deptAdmissionTo").val() != '') { - deptAdmissionTo = $("#deptAdmissionTo").val(); - } - } else { - deptAdmissionTo = $("#deptName").val().toString(); - } - } else { - if (deptAdmissionTo != null && deptAdmissionTo != '') { - deptAdmissionTo += "," + $("#deptAdmissionTo").val(); - } else if ($("#deptAdmissionTo").val() != null && $("#deptAdmissionTo").val() != '') { - deptAdmissionTo = $("#deptAdmissionTo").val(); - } - } + var deptAdmissionTo = getDeptNameForQuery(); var isSearch = $("#isSearch").val(); var url = path+"/inHosp/exportExcel"; post(url, { @@ -309,7 +293,6 @@ $("#excelBtn").click(function () { "visitId": visitId, "name": name, "deptAdmissionTo": deptAdmissionTo, - "deptName": deptName, "startDateTo": startDateTo, "endDateTo": endDateTo, "isSearch": isSearch diff --git a/src/main/webapp/static/js/lastVerifyList/lastVerifyList.js b/src/main/webapp/static/js/lastVerifyList/lastVerifyList.js index df4ce4c..b376521 100644 --- a/src/main/webapp/static/js/lastVerifyList/lastVerifyList.js +++ b/src/main/webapp/static/js/lastVerifyList/lastVerifyList.js @@ -550,6 +550,8 @@ $("#getRecallBtn").on('click', function () { }); $(function () { + //加载科室 + getDept(); $(".modal-dialog").draggable();//为模态对话框添加拖拽 //日期控件 var url = window.location.href; diff --git a/src/main/webapp/static/js/medicalRecallList/medicalRecallList.js b/src/main/webapp/static/js/medicalRecallList/medicalRecallList.js index 65e60c5..2dded6a 100644 --- a/src/main/webapp/static/js/medicalRecallList/medicalRecallList.js +++ b/src/main/webapp/static/js/medicalRecallList/medicalRecallList.js @@ -2,6 +2,7 @@ var tipLoad = 1; //定义表格内容最大高度 var maxHeight = 0; $(function () { + //加载科室 getDept(); var url = window.location.href; var index = url.substring(url.lastIndexOf('?') + 1).replace("num=", ""); diff --git a/src/main/webapp/static/js/unfileMedicalList/unfileMedicalList.js b/src/main/webapp/static/js/unfileMedicalList/unfileMedicalList.js index 99f1374..f4da043 100644 --- a/src/main/webapp/static/js/unfileMedicalList/unfileMedicalList.js +++ b/src/main/webapp/static/js/unfileMedicalList/unfileMedicalList.js @@ -2,6 +2,8 @@ var tipLoad = 1; //定义表格内容最大高度 var maxHeight = 0; $(function () { + //加载科室 + getDept(); getChecker(); var url = window.location.href; var index = url.substring(url.lastIndexOf('?') + 1).replace("num=", "");