Browse Source

优化医生报表

hurugang 3 years ago
parent
commit
0bb6fc25ff

+ 22 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/ChargeFeeVoController.java

@@ -59,6 +59,8 @@ public class ChargeFeeVoController {
     private FileUploadService fileUploadService;
     @Autowired
     private MzZyReqService mzZyReqService;
+    @Autowired
+    private MzZdCommonService mzZdCommonService;
 
     /**
      * 查询日结列表收费清单 未结账
@@ -1348,6 +1350,7 @@ public class ChargeFeeVoController {
                     Employee employee=employeeService.queryByUserCode((String) map.get("doctor_code"));
                     if(employee!=null){
                         map.put("doctor_name",employee.getEmployeeName());
+                        map.put("codeRs",employee.getCodeRs());
                     }
                 }
                 for (Map<String, Object> map : zyList) {
@@ -1362,6 +1365,7 @@ public class ChargeFeeVoController {
                         Employee employee=employeeService.queryByUserCode((String) map.get("doctor_code"));
                         if(employee!=null){
                             map.put("doctor_name",employee.getEmployeeName());
+                            map.put("codeRs",employee.getCodeRs());
                         }
                     }
                 }
@@ -1371,6 +1375,7 @@ public class ChargeFeeVoController {
                     Employee employee=employeeService.queryByUserCode((String) map.get("doctor_code"));
                     if(employee!=null){
                         map.put("doctor_name",employee.getEmployeeName());
+                        map.put("codeRs",employee.getCodeRs());
                     }
                 }
             }
@@ -1428,6 +1433,11 @@ public class ChargeFeeVoController {
             }
             List<MzZyReq> mzList = mzZyReqService.queryMzZyReqs(beginDate, endDate, doctorCode, warnDept);
             if(mzList!=null && mzList.size()>0){
+                List<CodeNameEntity> admissStatuses=mzZdCommonService.queryAdmissStatus();
+                Map<String,String> admissStatusMap = null;
+                if(admissStatuses!=null && admissStatuses.size()>0){
+                    admissStatusMap=admissStatuses.stream().collect(Collectors.toMap(CodeNameEntity::getCode,CodeNameEntity::getName));
+                }
                 for(MzZyReq mzZyReq:mzList){
                     if(StringUtils.isNotBlank(mzZyReq.getDeptCode())){
                         mzZyReq.setDeptCode(zdUnitCodeService.queryDeptNameByIdInCache(mzZyReq.getDeptCode()));
@@ -1435,6 +1445,18 @@ public class ChargeFeeVoController {
                     if(StringUtils.isNotBlank(mzZyReq.getReqWard())){
                         mzZyReq.setReqWard(zdUnitCodeService.queryDeptNameByIdInCache(mzZyReq.getReqWard()));
                     }
+                    if(StringUtils.isNotBlank(mzZyReq.getDoctorCode())){
+                        Employee employee= employeeService.queryByUserCode(mzZyReq.getDoctorCode());
+                        if(employee!=null){
+                            mzZyReq.setDoctorCode(employee.getEmployeeName());
+                        }
+                    }
+                    if(StringUtils.isNotBlank(mzZyReq.getAdmissStatus()) && admissStatusMap!=null){
+                        mzZyReq.setAdmissStatus(admissStatusMap.get(mzZyReq.getAdmissStatus()));
+                    }
+                    if(StringUtils.isNotBlank(mzZyReq.getReqStatus())){
+                        mzZyReq.setReqStatus(YesNoEnum.YES.code.toString().equals(mzZyReq.getReqStatus())?"入院":"申请");
+                    }
                 }
             }
             resultMap.put("code", 0);

+ 17 - 2
src/main/resources/static/js/mz/depart_workload_statistics.js

@@ -1,4 +1,4 @@
-//@ sourceURL=doctor_workload_statistics.js
+//@ sourceURL=depart_workload_statistics.js
 $(function () {
     init_daterangepicker();
     initFeeTable();
@@ -116,6 +116,16 @@ function initWorkloadStatistics() {
                 title: '日期',
                 align: "center",
                 valign: 'middle'
+            } ,{
+                field: 'doctor_name',
+                title: '医生',
+                align: "center",
+                valign: 'middle'
+            } ,{
+                field: 'codeRs',
+                title: '医生工号',
+                align: "center",
+                valign: 'middle'
             }, {
                 field: 'patient_num',
                 title: '接诊人次',
@@ -236,7 +246,12 @@ function initMzZyReqs() {
                 formatter: function (value, row, index) {
                     return format(value, "yyyy-MM-dd HH:mm:ss");
                 }
-            }, {
+            },{
+                field: 'doctorCode',
+                title: '医生',
+                align: "center",
+                valign: 'middle'
+            } , {
                 field: 'patientId',
                 title: '门诊ID',
                 align: "center",

+ 16 - 1
src/main/resources/static/js/mz/doctor_workload_statistics.js

@@ -116,6 +116,16 @@ function initWorkloadStatistics() {
                 title: '日期',
                 align: "center",
                 valign: 'middle'
+            },{
+                field: 'doctor_name',
+                title: '医生',
+                align: "center",
+                valign: 'middle'
+            } ,{
+                field: 'codeRs',
+                title: '医生工号',
+                align: "center",
+                valign: 'middle'
             }, {
                 field: 'patient_num',
                 title: '接诊人次',
@@ -236,7 +246,12 @@ function initMzZyReqs() {
                 formatter: function (value, row, index) {
                     return format(value, "yyyy-MM-dd HH:mm:ss");
                 }
-            }, {
+            },{
+                field: 'doctorCode',
+                title: '医生',
+                align: "center",
+                valign: 'middle'
+            } , {
                 field: 'patientId',
                 title: '门诊ID',
                 align: "center",

+ 1 - 1
src/main/resources/templates/mz/depart_workload_statistics.html

@@ -4,7 +4,7 @@
 <link rel="stylesheet" href="/thmz/css/toll_administration.css">
 <script src="/thmz/js/dependent/daterangepicker.js"></script>
 <script src="/thmz/js/excel/table2excel.js"></script>
-<script src="/thmz/js/mz/doctor_workload_statistics.js"></script>
+<script src="/thmz/js/mz/depart_workload_statistics.js"></script>
 <title>医生工作量统计</title>
 <div class="row" style="height: calc(100% - 60px);overflow-y: auto;">
     <div class="col-md-12 col-sm-12 col-xs-12">