Przeglądaj źródła

重复登录,本院记账重复退号优化

lihong 1 rok temu
rodzic
commit
9d12732e2f

+ 1 - 1
src/main/java/cn/hnthyy/thmz/common/Constants.java

@@ -29,7 +29,7 @@ public class Constants {
     /**
      * token最大有效时间 小时数
      */
-    public static final int JWT_TTL = 24;
+    public static final int JWT_TTL = 24*30;
 
     /**
      * 密码正则表达式 密码应该包含字母、数字和特殊符号,且长度在8位以上

+ 5 - 1
src/main/java/cn/hnthyy/thmz/controller/mz/MzReceiptSerialController.java

@@ -15,6 +15,7 @@ import cn.hnthyy.thmz.service.his.mz.*;
 import cn.hnthyy.thmz.service.his.zd.ZdChequeTypeService;
 import cn.hnthyy.thmz.vo.MzReceiptSerialVo;
 import cn.hnthyy.thmz.vo.UseReceioVo;
+import cn.hutool.core.convert.Convert;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -27,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
@@ -153,9 +155,11 @@ public class MzReceiptSerialController {
             BigDecimal totalPay = BigDecimal.ZERO;
             //所有付款方式总金额
             BigDecimal fullTotalPay = BigDecimal.ZERO;
+            List<ZdChequeType> chequeTypes = zdChequeTypeService.queryAllZdChequeType();
+            Map<String, Integer> printFlagMap = chequeTypes.stream().collect(Collectors.toMap(ZdChequeType::getCode, ZdChequeType::getPrintFlag));
             if (mzDepositFiles != null && mzDepositFiles.size() > 0) {
                 for (MzDepositFile mzDepositFile : mzDepositFiles) {
-                    if (!Constants.BYJZ.equals(mzDepositFile.getChequeType()) && !Constants.YBJZ.equals(mzDepositFile.getChequeType()) && !Constants.DJZ.equals(mzDepositFile.getChequeType())) {
+                    if (Convert.toInt(printFlagMap.get(mzDepositFile.getChequeType()),0) == 1) {
                         totalPay = totalPay.add(mzDepositFile.getAmount());
                     }
                     fullTotalPay=fullTotalPay.add(mzDepositFile.getAmount());

+ 4 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzyReqrecServiceImpl.java

@@ -786,6 +786,10 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
         if (!Constants.BYJZ.equals(dbMzyReqrec.getPaymode())) {
             throw new MzException("当前挂号记录非本院记账支付,无法进行退费重收操作!");
         }
+        MzyReqrec thMzyReqrec = mzyReqrecMapper.selectMzyReqrecBySerialNo(-serialNo);
+        if(thMzyReqrec != null){
+            throw new MzException("已经退费重收,请不要重复操作!");
+        }
         MzPatientMi mzPatientMi = mzPatientMiMapper.selectByPatientId(dbMzyReqrec.getPatientId());
         if (mzPatientMi == null) {
             throw new MzException("当前病人信息不存在");

+ 2 - 2
src/main/resources/static/js/common/notice-websocket.js

@@ -76,8 +76,8 @@ function initEventHandle() {
             //忽略心跳的信息,因为只要有消息进来,断线重连就会重置不会触发
         } else  if (event.data == "loginOut") {
             //超过一小时没有发送消息,系统默认登出
-            localStorage.removeItem("token");
-            window.location.href = '/thmz/login/view';
+            // localStorage.removeItem("token");
+            // window.location.href = '/thmz/login/view';
         } else {
             var data = JSON.parse(event.data);
             fitNoticeList(data);