浏览代码

评价器收费金额展示页面

hurugang 3 年之前
父节点
当前提交
915ce55b7b

+ 9 - 0
src/main/java/cn/hnthyy/thmz/controller/NavigationController.java

@@ -1075,6 +1075,15 @@ public class NavigationController {
         return "mz/client_evaluate";
     }
 
+    /**
+     * 评价价格页面
+     *
+     * @return
+     */
+    @RequestMapping("/client-price")
+    public String clientPrice() {
+        return "mz/client_price";
+    }
 
     /**
      * 核酸检查申请列表

+ 10 - 10
src/main/java/cn/hnthyy/thmz/controller/mz/MzPharmacyController.java

@@ -905,37 +905,37 @@ public class MzPharmacyController {
     /**
      * 叫号语音生成
      *
-     * @param name
+     * @param message
      * @return
      */
     @UserLoginToken
     @RequestMapping(value = "/callNumberAudio", method = {RequestMethod.GET})
-    public Map<String, Object> callNumberAudio(@RequestParam("name") String name,@RequestParam("winNo") String winNo) {
+    public Map<String, Object> callNumberAudio(@RequestParam("message") String message) {
         Map<String, Object> resultMap = new HashMap<>();
         try {
-            if (name == null) {
+            if (StringUtils.isBlank(message)) {
                 resultMap.put("code", -1);
-                resultMap.put("message", "叫号语音生成失败,病人姓名为空");
+                resultMap.put("message", "语音生成失败,语音内容为空");
                 return resultMap;
             }
-            String res = mzPharmacyService.callNumberAudio("请"+name+"到"+winNo+"号窗口取药");
+            String res = mzPharmacyService.callNumberAudio(message);
             JSONObject resObj=new JSONObject(res);
             Integer code = (Integer)resObj.get("code");
             if(code != 200){
-                log.error("叫号语音生成失败,接口错误信息:{}", resObj.get("message").toString());
+                log.error("语音生成失败,接口错误信息:{}", resObj.get("message").toString());
                 resultMap.put("code", -1);
-                resultMap.put("message", "叫号语音生成失败");
+                resultMap.put("message", "语音生成失败");
                 return resultMap;
             }
             resultMap.put("code", 0);
             resultMap.put("data", resObj.get("data").toString());
-            resultMap.put("message", "叫号语音生成成功");
+            resultMap.put("message", "语音生成成功");
             return resultMap;
         } catch (Exception e) {
             e.printStackTrace();
-            log.error("叫号语音生成失败,错误信息{}", e);
+            log.error("语音生成失败,错误信息{}", e);
             resultMap.put("code", -1);
-            resultMap.put("message", "叫号语音生成失败");
+            resultMap.put("message", "语音生成失败");
             return resultMap;
         }
     }

+ 3 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzPharmacyServiceImpl.java

@@ -24,6 +24,7 @@ import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.net.URLEncoder;
 import java.util.*;
 @Slf4j
 @Service
@@ -286,7 +287,8 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
     public String callNumberAudio(String text) {
         String res="";
         try {
-            res = HttpUtil.sendHttpGet(audioServiceUrl+"?text="+text, "utf-8");
+            String encode = URLEncoder.encode(text, "UTF-8");
+            res = HttpUtil.sendHttpGet(audioServiceUrl+"?text="+encode, "utf-8");
         } catch (Exception e) {
             e.printStackTrace();
             log.info("语音生成失败,内容:{}", text);

+ 1 - 1
src/main/resources/application-dev.yml

@@ -135,6 +135,6 @@ callBackYJYYUrl: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxbd
 notifyServiceUrl: "http://172.16.30.26:8706/triage/notify"
 
 #语音生成接口地址
-audioServiceUrl: "http://172.16.30.26:8706/voice/textToSpeech"
+audioServiceUrl: "http://webhis.thyy.cn:8706/voice/textToSpeech"
 #化验结果接口
 soap_url: "http://172.16.32.178:622/pushservice.asmx?wsdl"

+ 4 - 4
src/main/resources/static/js/common/pad-util.js

@@ -48,10 +48,10 @@ function postCMD(cmd,UserID,UserPsw,ItemName,Coast,Pay,Change,GuestName,Msg,Self
  * 推送价格信息
  * @param data 应收金额
  * @Pay Pay 实收金额
- * @param changeAmount
- * @param message
- * @param patientId
- * @param name
+ * @param changeAmount  找零金额
+ * @param message 语音消息
+ * @param patientId 门诊病人id
+ * @param name 病人姓名
  */
 function sendPeiceMessage(data,pay,changeAmount,message,patientId,name) {
     $.ajax({

+ 2 - 1
src/main/resources/static/js/common/socket-com.js

@@ -154,9 +154,10 @@ function cellNumberMessage(data){
 
 function call(data) {
     //生成语音
+    var message="请"+data.name+"到"+winNo+"号窗口取药";
     $.ajax({
         type: "GET",
-        url: '/thmz/callNumberAudio?name='+data.name+'&winNo='+winNo,
+        url: '/thmz/callNumberAudio?message='+message,
         contentType: "application/json;charset=UTF-8",
         dataType: "json",
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},

+ 23 - 0
src/main/resources/static/js/mz/client_price.js

@@ -0,0 +1,23 @@
+//@ sourceURL=client_price.js
+$(function (){
+    imgFun("/thmz/download-client-profile", "headImage");
+
+    //生成语音
+    var message="刘阳女士,您好!您本次就诊,应付金额为580.00元, 实际支付金额为600.00元,应找零金额为20.00元。";
+    $.ajax({
+        type: "GET",
+        url: '/thmz/callNumberAudio?message='+message,
+        contentType: "application/json;charset=UTF-8",
+        dataType: "json",
+        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+        success: function (res) {
+            if (res.code == 0) {
+                //播放后台生成的叫号语音
+                var mp3 = new Audio(res.data);
+                mp3.play();
+            }
+        }
+    });
+});
+
+

+ 4 - 4
src/main/resources/static/js/mz/pharmacy-cell-number.js

@@ -27,8 +27,8 @@ $(function () {
     clearInterval(getTableDateInterval);
     openSocket("JH");
     this.onkeydown = function (e) { // 监听键盘事件
-        let theEvent = window.event || e;
-        let code = theEvent.keyCode || theEvent.which;
+        var theEvent = window.event || e;
+        var code = theEvent.keyCode || theEvent.which;
         if(code == 122){//捕捉F11键盘动作
             e.preventDefault();  //阻止F11默认动作
             fullScreen();
@@ -202,7 +202,7 @@ function getTableDate() {
                 tempCurrentList = [];
                 /*tempDispenseList = [];*/
                 var list = result.currentList;
-                for (let i = 0; i < list.length; i++) {
+                for (var i = 0; i < list.length; i++) {
                     var current = list[i];
                     if (current.confirm_flag == 0 || current.confirm_flag == 2) {//已缴费待发药
                         currentList[currentList.length] = current;
@@ -279,7 +279,7 @@ function refeshTable() {
  * 清空过号重复病人数据
  */
 function pastListClear(data) {
-    for (let i = 0; i < pastList.length; i++) {
+    for (var i = 0; i < pastList.length; i++) {
         if (pastList[i].patient_id == data.patient_id) {
             pastList.splice(i, 1);
             break;

+ 85 - 0
src/main/resources/templates/mz/client_price.html

@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+
+<head>
+    <script th:replace="common/head::static"></script>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <title>泰和云HIS</title>
+    <!-- CSS -->
+    <!--<link rel="stylesheet" th:href="@{~/css/roboto.css}"/>-->
+    <link rel="stylesheet" href="/thmz/css/font-awesome/css/font-awesome.min.css">
+    <link rel="stylesheet" href="/thmz/css/form-elements.css">
+    <link rel="stylesheet" href="/thmz/css/font-awesome/css/style.css">
+    <link rel="shortcut icon" type="image/x-icon" href="/thmz/images/hospital.png"/>
+    <!-- Favicon and touch icons -->
+    <!--    <link rel="shortcut icon" type="image/x-icon" href="@{~/ico/favicon.png">-->
+    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/thmz/ico/apple-touch-icon-144-precomposed.png">
+    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/thmz/ico/apple-touch-icon-114-precomposed.png">
+    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/thmz/ico/apple-touch-icon-72-precomposed.png">
+    <link rel="apple-touch-icon-precomposed" href="/thmz/ico/apple-touch-icon-57-precomposed.png">
+    <script src="/thmz/js/dependent/jquery.backstretch.min.js"></script>
+    <script src="/thmz/js/common/file.js"></script>
+    <script src="/thmz/js/mz/client_price.js"></script>
+    <title>评价价格页面</title>
+    <style>
+        body, html {
+            margin: 0;
+            height: 100%;
+        }
+
+        .gao2 {
+            height: 50px;
+            background: #5C70B5;
+            line-height: 50px;
+            color: white;
+            font-family: SimSun;
+            font-weight: 600;
+            font-size: 30px;
+            border-radius: 3px;
+        }
+
+        .gao100 {
+            height: calc(100% - 50px);
+            background: #EBEBE4;
+        }</style>
+</head>
+<body>
+<div class="col-sm-12 col-sm-12 col-xs-12 gao2">
+    <div class="col-sm-8 col-sm-8 col-xs-12" style="text-align: left;letter-spacing: 30px;">
+        <img src="../../thmz/images/taihe-logo3.png"
+             style="height: 50px;width:50px;float: left;margin-left: 20px;border-radius: 25px;">
+        <span style="margin-left: 30px;">湖南泰和医院</span></div>
+    <div class="col-sm-4 col-sm-4 col-xs-12" style="text-align: right;"><i class="fa fa-clock-o">&nbsp;&nbsp;</i><span
+            id="dateNow">2022-04-13</span></div>
+</div>
+<div class="col-sm-12 col-sm-12 col-xs-12 gao100">
+    <div class="col-sm-3 col-sm-3 col-xs-12" style="height: 100%;background: white;">
+        <img id="headImage" style="margin-top: 10px;width: 80%;">
+        <div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-user">&nbsp;&nbsp;姓名:</i><span
+                id="name">胡如刚</span></div>
+        <div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-user-md">&nbsp;&nbsp;岗位:</i><span
+                id="role">管理员</span></div>
+        <div style="margin-top: 30px;font-size: 35px;color: black;text-align: left;"><i class="fa fa-bookmark-o">&nbsp;&nbsp;<span
+                style="margin-left: 2px;">工号:</span></i><span id="userCode">3210</span></div>
+    </div>
+    <div class="col-sm-9 col-sm-9 col-xs-12" style="height: 100%;padding-right: 0px;">
+        <div style="height: 100%;">
+            <div style="height: calc(100% - 90px);padding-top: 10px;background: white;">
+                <div style="height: 30px;background-color: #C4E0F6;width: calc(100% - 10px);margin-left: 5px;border-radius: 5px;color: black;">
+                    缴费详情
+                </div>
+                <div style="padding-top: 60px;font-size: 50px;line-height: 120px;text-indent: 2.8cm;text-align: left;padding-left: 10px;padding-right: 10px;">
+                    <span id="pName">刘阳</span><span id="pGender">女士</span>,您好!您本次就诊,应付金额为<span id="needPay" style="border-bottom: black 2px solid;color: black;font-weight: 400;">580.00</span>元,
+                    实际支付金额为<span id="pay" style="border-bottom: black 2px solid;color: black;font-weight: 400;">600.00</span>元,应找零金额为<span id="changeAmount" style="border-bottom: black 2px solid;color: black;font-weight: 400;">20.00</span>元。
+                </div>
+            </div>
+            <div style="height: 80px;background-color: #6EC1AD;font-size: 40px;line-height: 80px;border-radius: 5px;margin-top: 10px;">
+                16:21 星期四
+            </div>
+        </div>
+    </div>
+</div>
+</body>
+</html>