Browse Source

Merge branch 'dev-1.1.4' into 'dev-1.1.4'

修复住院药单打印执行医嘱时间问题

See merge request lihong/thmz_system!49
huangshuhua 1 year ago
parent
commit
9e39eeccce

+ 5 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/MzBlRecordController.java

@@ -161,6 +161,11 @@ public class MzBlRecordController {
                 //}
                 if (mzBlRecord.getPatientId() != null && StringUtils.isNotBlank(mzBlRecord.getPatientId())) {
                     List<MzPatientMi> mzPatientMiList = mzPatientMiService.queryByCommonParams(mzBlRecord.getPatientId());
+                    if(mzBlRecord.getTimes() != null && mzBlRecord.getTimes() == -1){
+                        // 发药查询门诊历史病历需要根据病人id精确查找
+                        mzPatientMiList = mzPatientMiList.stream().filter(p -> p.getPatientId().equals(mzBlRecord.getPatientId())).collect(Collectors.toList());
+                        mzBlRecord.setTimes(null);
+                    }
                     if (mzPatientMiList != null && mzPatientMiList.size() > 0) {
                         List<String> patientIds = mzPatientMiList.stream().map(m -> m.getPatientId()).collect(Collectors.toList());
                         if (patientIds != null && patientIds.size() > 0) {

+ 1 - 0
src/main/resources/static/js/mz/west_pharmacy_send.js

@@ -1995,6 +1995,7 @@ function queryDataS(params) {
     var rePortRangeArr = getRePortRangeArr1();
     var temp = {   //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的
         patientId: coreId,
+        times: '-1', // 这里需要根据patientId精确查找病人的病历,而不是模糊查询
         beginTime: rePortRangeArr[0],
         endTime: rePortRangeArr[1],
         pageSize: params.limit,   //页面大小

+ 2 - 2
src/main/resources/static/js/yf/ward_prescription.js

@@ -1485,8 +1485,8 @@ function printDetailHtml(dataArr, flag) {
             $(".kfmxtd").show();
             $(".yjmxtd").hide();
             $(".gyfs").hide();
-            if (minOccTime == '' || minOccTime > data.occTime) {
-                minOccTime = data.occTime
+            if (minOccTime == '' || minOccTime > format(data.performanceTime, "yyyy-MM-dd HH:mm:ss")) {
+                minOccTime = format(data.performanceTime, "yyyy-MM-dd HH:mm:ss")
             }
             html += '<td class="xtd" style="text-align: center;">' + data.frequCode + '</td>';
             html += '<td class="xtd" style="text-align: center;">' + data.dose + '</td>';