浏览代码

Merge branch 'dev-1.1.0' of https://172.16.32.165/hurugang/thmz_system into dev-1.1.0

hurugang 4 年之前
父节点
当前提交
df31df55a4

+ 7 - 1
src/main/java/cn/hnthyy/thmz/controller/mz/MzZdInstructionCodeController.java

@@ -67,8 +67,14 @@ public class MzZdInstructionCodeController {
                 resultMap.put("message", "查询嘱托失败,参数为空");
                 return resultMap;
             }
+            if(mzZdInstructionCodePageDto.getSearchText() != null){
+                String searchText = mzZdInstructionCodePageDto.getSearchText();
+                if(searchText.matches("[a-zA-Z]+")){
+                    mzZdInstructionCodePageDto.setSearchText(searchText.toUpperCase());
+                }
+            }
             List<MzZdInstructionCode> list = mzZdInstructionCodeService.queryMzZdInstructionPage(mzZdInstructionCodePageDto);
-            int total = mzZdInstructionCodeService.queryMzZdInstructionCount(mzZdInstructionCodePageDto.getMzZdInstructionCode());
+            int total = mzZdInstructionCodeService.queryMzZdInstructionCount(mzZdInstructionCodePageDto);
             resultMap.put("code", 0);
             resultMap.put("message", "查询嘱托成功");
             resultMap.put("data", list);

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzPharmacyMapper.java

@@ -717,7 +717,7 @@ public interface MzPharmacyMapper {
             "a.group_no ," +
             "#{confirmTime}," +
             "b.name ," +
-            "left(b.specification,16)specification ," +
+            "left(b.specification,8)specification ," +
             "#{confirmId}," +
             "#{confirmName}," +
             "#{doctorId}," +

+ 12 - 24
src/main/java/cn/hnthyy/thmz/mapper/his/zd/MzZdInstructionCodeMapper.java

@@ -33,17 +33,11 @@ public interface MzZdInstructionCodeMapper {
             "<when test='mzZdInstructionCode.code!=null'>",
             " and code = #{mzZdInstructionCode.code}",
             "</when>",
-            "<when test='mzZdInstructionCode.instructionText!=null'>",
-            " and instruction_text like '%${mzZdInstructionCode.instructionText}%'",
-            "</when>",
             "<when test='mzZdInstructionCode.delFlag!=null'>",
             " and del_flag = #{mzZdInstructionCode.delFlag}",
             "</when>",
-            "<when test='mzZdInstructionCode.pyCode!=null'>",
-            " and py_code = #{mzZdInstructionCode.pyCode}",
-            "</when>",
-            "<when test='mzZdInstructionCode.wbCode!=null'>",
-            " and d_code = #{mzZdInstructionCode.wbCode}",
+            "<when test='searchText!=null'>",
+            " and (py_code like '${searchText}%' or d_code like '${searchText}%' or instruction_text  like '%${searchText}%')",
             "</when>",
             "<when test='mzZdInstructionCode.instructionType!=null'>",
             " and instruction_type = #{mzZdInstructionCode.instructionType}",
@@ -56,31 +50,25 @@ public interface MzZdInstructionCodeMapper {
     /**
      * 统计嘱托数量
      *
-     * @param mzZdInstructionCode 嘱托查询条件
+     * @param mzZdInstructionCodePageDto 嘱托查询条件
      * @return
      */
     @Select({"<script>",
             "select count(1) from mz_zd_instruction_code where 1=1 ",
-            "<when test='code!=null'>",
-            " and code = #{code}",
-            "</when>",
-            "<when test='instructionText!=null'>",
-            " and instruction_text like '%${instructionText}%'",
-            "</when>",
-            "<when test='delFlag!=null'>",
-            " and del_flag = #{delFlag}",
+            "<when test='mzZdInstructionCode.code!=null'>",
+            " and code = #{mzZdInstructionCode.code}",
             "</when>",
-            "<when test='pyCode!=null'>",
-            " and py_code = #{pyCode}",
+            "<when test='mzZdInstructionCode.delFlag!=null'>",
+            " and del_flag = #{mzZdInstructionCode.delFlag}",
             "</when>",
-            "<when test='wbCode!=null'>",
-            " and d_code = #{wbCode}",
+            "<when test='mzZdInstructionCode.pyCode!=null'>",
+            " and (py_code like '${searchText}%' or d_code like '${searchText}%' or instruction_text  like '%${searchText}%')",
             "</when>",
-            "<when test='instructionType!=null'>",
-            " and instruction_type = #{instructionType}",
+            "<when test='mzZdInstructionCode.instructionType!=null'>",
+            " and instruction_type = #{mzZdInstructionCode.instructionType}",
             "</when>",
             "</script>"})
-    int selectMzZdInstructionCount(MzZdInstructionCode mzZdInstructionCode);
+    int selectMzZdInstructionCount(MzZdInstructionCodePageDto mzZdInstructionCodePageDto);
 
     /**
      * 修改嘱托

+ 2 - 0
src/main/java/cn/hnthyy/thmz/pageDto/MzZdInstructionCodePageDto.java

@@ -9,6 +9,8 @@ import lombok.Data;
 @Data
 public class MzZdInstructionCodePageDto {
     private MzZdInstructionCode mzZdInstructionCode;
+    //查询内容
+    private   String searchText;
     //默认页
     private   Integer pageIndex=0;
     //默认页面展示数

+ 2 - 2
src/main/java/cn/hnthyy/thmz/service/his/zd/MzZdInstructionCodeService.java

@@ -24,10 +24,10 @@ public interface MzZdInstructionCodeService {
     /**
      * 统计嘱托数量
      *
-     * @param mzZdInstructionCode 嘱托查询条件
+     * @param mzZdInstructionCodePageDto 嘱托查询条件
      * @return
      */
-    int queryMzZdInstructionCount(MzZdInstructionCode mzZdInstructionCode);
+    int queryMzZdInstructionCount(MzZdInstructionCodePageDto mzZdInstructionCodePageDto);
 
     /**
      * 修改嘱托

+ 2 - 2
src/main/java/cn/hnthyy/thmz/service/impl/his/zd/MzZdInstructionCodeServiceImpl.java

@@ -26,8 +26,8 @@ public class MzZdInstructionCodeServiceImpl implements MzZdInstructionCodeServic
     }
 
     @Override
-    public int queryMzZdInstructionCount(MzZdInstructionCode mzZdInstructionCode) {
-        return mzZdInstructionCodeMapper.selectMzZdInstructionCount(mzZdInstructionCode);
+    public int queryMzZdInstructionCount(MzZdInstructionCodePageDto mzZdInstructionCodePageDto) {
+        return mzZdInstructionCodeMapper.selectMzZdInstructionCount(mzZdInstructionCodePageDto);
     }
 
     @Override

+ 2 - 0
src/main/java/cn/hnthyy/thmz/vo/MzSendMedicineVo.java

@@ -109,4 +109,6 @@ public class MzSendMedicineVo implements Serializable {
     private String supplyCode;
     //频率
     private String frequency;
+    //毒麻标志:1:毒;2:麻;3:精神1;4:精神2
+    private String drugFlag;
 }

+ 15 - 0
src/main/resources/static/js/common/socket-com.js

@@ -114,6 +114,21 @@ function cellNumberMessage(data){
         dispenseListClear(data);
         currentListClear(data);
         pastListClear(data);
+        //生成语音
+        $.ajax({
+            type: "GET",
+            url: 'http://webhis.thyy.cn:8706/voice/textToSpeech?text='+"请"+data.name+"到四号窗口取药",
+            contentType: "application/json;charset=UTF-8",
+            dataType: "json",
+            headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+            success: function (res) {
+                if (res.code == 200) {
+                    //播放后台生成的叫号语音
+                    var mp3 = new Audio(res.data);
+                    mp3.play();
+                }
+            }
+        });
     } else if (data.type == 'FY') {//来自发药处理后的消息
         //将该用户叫号列表清除
         if(rightPerson != '' && rightPerson != null && rightPerson.patient_id == data.patient_id){

+ 2 - 4
src/main/resources/static/js/mz/instruction_code.js

@@ -254,12 +254,10 @@ function queryParams(params) {
     var temp = {   //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的
         pageSize: params.limit,   //页面大小
         pageIndex: params.offset / params.limit,  //页码
+        searchText: $("#searchText").val() == "" ? null : $("#searchText").val(),
         mzZdInstructionCode: {
             delFlag: $("#delFlagSearch").val() == "" ? null : $("#delFlagSearch").val(),
-            instructionType: $("#instructionTypeSearch").val() == "" ? null : $("#instructionTypeSearch").val(),
-            wbCode: $("#wbCodeSearch").val() == "" ? null : $("#wbCodeSearch").val(),
-            pyCode: $("#pyCodeSearch").val() == "" ? null : $("#pyCodeSearch").val(),
-            instructionText: $("#instructionTextSearch").val() == "" ? null : $("#instructionTextSearch").val()
+            instructionType: $("#instructionTypeSearch").val() == "" ? null : $("#instructionTypeSearch").val()
         }
     };
     return temp;

+ 9 - 10
src/main/resources/static/js/mz/west_pharmacy_dispensing.js

@@ -277,8 +277,8 @@ function prescriptionDetail(realNo, groupNo, orderNo, receiptNo, times, patientI
                 align: "center",
                 valign: 'middle',
             }
-            /* , {
-                 field: 'drug_flag',//毒麻标志:1:毒;2:麻;3:精神1;4:精神2
+            , {
+                 field: 'drugFlag',//毒麻标志:1:毒;2:麻;3:精神1;4:精神2
                  title: '<span style="color: red">毒麻</span>',
                  align: "center",
                  valign: 'middle',
@@ -295,7 +295,7 @@ function prescriptionDetail(realNo, groupNo, orderNo, receiptNo, times, patientI
                          return '<span style="color: red">-</span>'
                      }
                  }
-             }*/
+             }
             , {
                 field: 'stockAmount',
                 title: '当前库存',
@@ -356,8 +356,7 @@ function queryParams(params) {
             confirmFlag: $("#dispensingStatusSearch").val() == "" ? null : $("#dispensingStatusSearch").val(),
             payMark: 0, //已收费
             groupNo: 71, //门诊西药房
-            windowsNoYf: '04', //4号窗口
-            groupType: '1' //西药
+            windowsNoYf: '04' //4号窗口
         }
     };
     return temp;
@@ -428,11 +427,6 @@ function printPrescription(patientId, times, orderNo) {
                     }
                 }
                 var list = res.data.list;
-                /*if (list[0].drugFlag == 2 || list[0].drugFlag == 3) {
-                    $('#drugFlag').attr("value", "麻、精一");
-                } else if (list[0].drugFlag == 4) {
-                    $('#drugFlag').attr("value", "精二");
-                }else */
                 if (res.data.warnDeptName.indexOf("儿科") != -1) {
                     $('#drugFlag').attr("value", "儿科");
                     printIndex = ekCfPrintIndex;
@@ -443,6 +437,11 @@ function printPrescription(patientId, times, orderNo) {
                     $('#drugFlag').attr("value", "普通");
                     printIndex = mzCfPrintIndex;
                 }
+                if (list[0].drugFlag == 2 || list[0].drugFlag == 3) {
+                    $('#drugFlag').attr("value", "麻、精一");
+                } else if (list[0].drugFlag == 4) {
+                    $('#drugFlag').attr("value", "精二");
+                }
                 $('#priceTime').attr("value", format(list[0].priceTime, "yyyy-MM-dd HH:mm"));
                 $('#employeeName').attr("value", res.data.employeeName + "/" + res.data.employeeCode);
                 if (res.data.sex == 1) {

+ 7 - 5
src/main/resources/static/js/mz/west_pharmacy_send.js

@@ -768,12 +768,14 @@ function printInjectionOralMedicine(patientId, orderNo, realNo, times, receiptNo
                         $("#ypbq_sex").attr("value", getSex(drugs[0].sex));
                         $("#ypbq_age").attr("value", drugs[0].age);
                         $("#NO").attr("value", j + 1 + "/" + drugs.length);
-                        if((drugs[j].weight == null && drugs[j].volum == null) || (drugs[j].weight != null && drugs[j].volum != null)){
+                        if(drugs[j].drugUnitName == '粒' || drugs[j].drugUnitName == '片'|| drugs[j].drugUnitName == '支'){
+                            $("#ypbq_comm").attr("value", drugs[j].comm + ',每次' + drugs[j].drugQuan + drugs[j].drugUnitName);
+                        }else if((drugs[j].weight == null && drugs[j].volum == null) || (drugs[j].weight != null && drugs[j].volum != null)){
                             $("#ypbq_comm").attr("value", drugs[j].comm + ',每次' + drugs[j].drugQuan + drugs[j].drugUnitName);
                         }else{
                             let weight = (drugs[j].weight == '' || drugs[j].weight == null) ? drugs[j].volum : drugs[j].weight;
                             var drugQuan = (drugs[j].drugQuan / weight).toFixed(2);
-                            if(drugQuan == 0){
+                            if(drugQuan < 1){
                                 $("#ypbq_comm").attr("value", drugs[j].comm + ',每次' + drugs[j].drugQuan + drugs[j].drugUnitName);
                             }else{
                                 drugQuan = Math.round(drugQuan*100)/100;
@@ -1045,8 +1047,8 @@ function prescriptionDetail(realNo, groupNo, orderNo, receiptNo, times, patientI
                 align: "center",
                 valign: 'middle',
             }
-            /* , {
-                 field: 'drug_flag',//毒麻标志:1:毒;2:麻;3:精神1;4:精神2
+             , {
+                 field: 'drugFlag',//毒麻标志:1:毒;2:麻;3:精神1;4:精神2
                  title: '<span style="color: red">毒麻</span>',
                  align: "center",
                  valign: 'middle',
@@ -1063,7 +1065,7 @@ function prescriptionDetail(realNo, groupNo, orderNo, receiptNo, times, patientI
                          return '<span style="color: red">-</span>'
                      }
                  }
-             }*/
+             }
             , {
                 field: 'stockAmount',
                 title: '当前库存',

+ 2 - 14
src/main/resources/templates/mz/instruction_code.html

@@ -8,20 +8,10 @@
             <div class="panel-body">
                 <form id="formSearch" class="form-horizontal" autocomplete="off">
                     <div class="item form-group ">
-                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="pyCodeSearch">拼音码
-                        </label>
-                        <div class="col-md-1 col-sm-1 col-xs-12">
-                            <input id="pyCodeSearch" class="form-control optional" type="text">
-                        </div>
-                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="wbCodeSearch">五笔码
-                        </label>
-                        <div class="col-md-1 col-sm-1 col-xs-12">
-                            <input id="wbCodeSearch" class="form-control optional" type="text">
-                        </div>
-                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="instructionTextSearch">内容
+                        <label class="control-label col-md-1 col-sm-1 col-xs-12" for="searchText">搜索
                         </label>
                         <div class="col-md-2 col-sm-2 col-xs-12">
-                            <input id="instructionTextSearch" class="form-control optional" type="text">
+                            <input id="searchText" class="form-control optional" type="text" placeholder="拼音码|五笔码|内容">
                         </div>
                         <div class="col-md-2 col-sm-2 col-xs-12 item">
                             <label class="control-label col-md-4 col-sm-4 col-xs-12"
@@ -52,8 +42,6 @@
                         <button type="button" id="btn_reset" class="btn btn-primary"
                                 title="重置" onclick="resetSearch()"><i class="fa fa-rotate-left"></i>
                         </button>
-                    </div>
-                    <div class="item form-group ">
                         <button type="button" id="btn_add" class="btn btn-primary"
                                 title="添加嘱托"><i class="fa fa-plus"></i>
                         </button>