Selaa lähdekoodia

Merge branch 'dev-1.0.9' into dev-1.1.0

hurugang 4 vuotta sitten
vanhempi
commit
c3480e828b

+ 2 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/MzChargeDetailServiceImpl.java

@@ -1149,9 +1149,10 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
             //setMzReceiptSerial(opId, mzDepositFileVo.getPatientId(), times, windows, mzChargeDetails.get(0).getResponceType(), feeMap, now, serialNo, mzReceiptSerial, payWay, totalPayable, 1);
             MzPatientMi mzPatientMi = mzPatientMiService.queryByPatientId(mzDepositFileVo.getPatientId());
             mzDepositFileVo.setMzDepositFiles(newMzDepositFiles);
+            Integer refundTimes =mzDepositFileVo.getTimes();
             mzDepositFileVo.setTimes(times);
             getHadPayable(opId, mzDepositFileVo, windows, mzPatientMi, feeMap, now, serialNo, mzReceiptSerial, 1, receiptSerialFee);
-            getMzChargeDetailService().updateChargeFlag(opId, mzDepositFileVo.getPatientId(), times, mzChargeDetails.get(0).getName(), mzChargeDetails, now, serialNo, payWay, mzDepositFileVo.getTimes());
+            getMzChargeDetailService().updateChargeFlag(opId, mzDepositFileVo.getPatientId(), times, mzChargeDetails.get(0).getName(), mzChargeDetails, now, serialNo, payWay, refundTimes);
             getMzChargeDetailService().afterChargeFee(mzDepositFileVo.getPatientId(), times, fullNewMzDepositFiles, now, serialNo, mzReceiptSerial, totalPayable, receiptSerialFee);
             MzPatientMi updateMzPatientMi = new MzPatientMi();
             updateMzPatientMi.setPatientId(mzDepositFileVo.getPatientId());

+ 9 - 2
src/main/java/cn/hnthyy/thmz/service/impl/his/MzyReqrecServiceImpl.java

@@ -8,6 +8,7 @@ import cn.hnthyy.thmz.entity.thmz.*;
 import cn.hnthyy.thmz.enums.OrderStatusEnum;
 import cn.hnthyy.thmz.enums.YesNoEnum;
 import cn.hnthyy.thmz.mapper.his.*;
+import cn.hnthyy.thmz.mapper.thmz.ConfigMapper;
 import cn.hnthyy.thmz.mapper.thmz.ReceiptMapper;
 import cn.hnthyy.thmz.mapper.thmz.ReqrecRequestRelationMapper;
 import cn.hnthyy.thmz.mapper.thmz.WindowsMapper;
@@ -64,7 +65,9 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
     @SuppressWarnings("all")
     @Autowired
     private CovidPojoMapper covidPojoMapper;
-
+    @SuppressWarnings("all")
+    @Autowired
+    private ConfigMapper configMapper;
     @Autowired
     private MzyRequestService mzyRequestService;
     @Autowired
@@ -87,6 +90,7 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
     private HolidaysService holidaysService;
     @Autowired
     private HaiCiAdapterService haiCiAdapterService;
+
     //无需新冠调查的科室
     private List notCovid=Arrays.asList("1040200","1040000","1040100","1070000","1260000");
     @Value("${lxbdcwjUrl}")
@@ -477,7 +481,10 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
         }
         Calendar cal = Calendar.getInstance();
         cal.setTime(requestDayD);
-        if ((cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY && Constants.PM.equals(ampm)) || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
+        //设置了免费
+        Config config= configMapper.selectUserByKey("weekend_fee");
+        if ((config!=null && YesNoEnum.YES.code.toString().equals(config.getConfigValue()))
+                && ((cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY && Constants.PM.equals(ampm)) || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY)) {
             return true;
         }
         List<Holidays> holidaysList = holidaysService.queryHolidaysByDate(requestDayD);

+ 1 - 0
src/main/resources/static/css/switchery.min.css

@@ -0,0 +1 @@
+.switchery{background-color:#fff;border:1px solid #dfdfdf;border-radius:20px;cursor:pointer;display:inline-block;height:30px;position:relative;vertical-align:middle;width:50px;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;box-sizing:content-box;background-clip:content-box}.switchery>small{background:#fff;border-radius:100%;box-shadow:0 1px 3px rgba(0,0,0,0.4);height:30px;position:absolute;top:0;width:30px}.switchery-small{border-radius:20px;height:20px;width:33px}.switchery-small>small{height:20px;width:20px}.switchery-large{border-radius:40px;height:40px;width:66px}.switchery-large>small{height:40px;width:40px}

+ 74 - 0
src/main/resources/static/js/request-holidays-config.js

@@ -1,4 +1,5 @@
 //@ sourceURL=request-holidays-config.js
+var switchery;
 $(function () {
     $(".selectpicker").selectpicker({
         dropuAuto: false
@@ -144,14 +145,87 @@ $(function () {
         $("#editModal").modal();
         clearInput();
     });
+    //周末是否免费设置
+    $("#btn_weekend").click(function (t) {
+        $("#weekendModal").modal();
 
+        //查询已经设置好的结果,回显
+        $.ajax({
+            type: "GET",
+            url: '/thmz/getConfigByKey?key=weekend_fee',
+            dataType: "json",
+            headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+            success: function (res) {
+                if (res == '401' || res == 401) {
+                    window.location.href = '/thmz/login/view'
+                    return;
+                }
+                if(res.data.configValue=='0'){
+                    setSwitchery(false);
+                }else {
+                    setSwitchery(true);
+                }
+            }
+        });
+
+
+
+    });
 
     $("#saveEdit").click(function (t) {
         saveHolidays();
     });
+
+    var elem = document.querySelector('.js-switch');
+    //size 设置禁用可用按钮的大小、secondaryColor:设置右边的颜色为红色
+    switchery = new Switchery(elem,{
+        color: "#26B99A"
+    });
+
+
+
+    $('#saveWeekend').click(function () {
+        var weekendFee=$("input:checkbox:checked").val();
+        if(weekendFee=='on'){
+            weekendFee='1';
+        }else {
+            weekendFee='0';
+        }
+        //修改周末是否免费设置
+        $.ajax({
+            type: "POST",
+            contentType: "application/json;charset=UTF-8",
+            url: '/thmz/setConfig',
+            dataType: "json",
+            data: JSON.stringify({"configKey": "weekend_fee","configValue": weekendFee}),
+            headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+            success: function (res) {
+                if (res == '401' || res == 401) {
+                    window.location.href = '/thmz/login/view'
+                    return;
+                }
+                if (res.code == 0) {
+                    $("#weekendModal").modal('hide');
+                    successMesage(res);
+                } else {
+                    errorMesage(res);
+                }
+            }
+        });
+    });
+
 });
 
 
+/**
+ * 切换Switchery开关函数  switchElement Switchery对象,checkedBool 选中的状态
+ */
+function setSwitchery(checkedBool) {
+    if((checkedBool && !switchery.isChecked()) || (!checkedBool && switchery.isChecked())) {
+        switchery.setPosition(true);
+        switchery.handleOnchange(true);
+    }
+}
 
 
 /**

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
src/main/resources/static/js/switchery.min.js


+ 4 - 0
src/main/resources/templates/menu.html

@@ -27,6 +27,8 @@
     <link href="/thmz/css/pnotify/pnotify.css" rel="stylesheet">
     <link href="/thmz/css/pnotify/pnotify.buttons.css" rel="stylesheet">
     <link href="/thmz/css/pnotify/pnotify.nonblock.css" rel="stylesheet">
+    <!-- Switchery -->
+    <link href="/thmz/css/switchery.min.css" rel="stylesheet">
 </head>
 
 <body class="nav-md" style="background: #FFFFFF; color: #333333;">
@@ -299,5 +301,7 @@
 <script src="/thmz/js/pnotify/pnotify.js"></script>
 <script src="/thmz/js/pnotify/pnotify.buttons.js"></script>
 <script src="/thmz/js/pnotify/pnotify.nonblock.js"></script>
+<!-- Switchery -->
+<script src="/thmz/js/switchery.min.js"></script>
 </body>
 </html>

+ 32 - 0
src/main/resources/templates/request_holidays_config.html

@@ -12,6 +12,9 @@
                     <div class="form-group col-md-2 col-sm-2 col-xs-12"></div>
                     <div class="form-group col-md-10 col-sm-10 col-xs-12">
                         <div class="col-md-2 col-sm-2 col-xs-12" style="text-align:right;float: right;">
+                            <button type="button" style="margin-left:3px" id="btn_weekend" class="btn btn-primary"
+                                    title="周末自助挂号免费开放"><i class="fa fa-gear"></i>
+                            </button>
                             <button type="button" style="margin-left:3px" id="btn_add" class="btn btn-primary"
                                     title="新增节假日设置"><i class="fa fa-plus"></i>
                             </button>
@@ -89,3 +92,32 @@
 <!--新增或者编辑号表信息弹窗结尾-->
 
 
+
+<!--节假日弹窗开始-->
+<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-hidden="true" id="weekendModal">
+    <div class="modal-dialog modal-lg">
+        <div class="modal-content" style="width: 420px;margin-left: 250px;">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
+                </button>
+                <h4 class="modal-title">周末自助挂号免费</h4>
+            </div>
+            <div class="modal-body">
+                <form class="form-horizontal form-label-left" novalidate  autocomplete="off">
+                    <div class="item form-group">
+                        <label style="margin-left: 40px;">
+                            <input type="checkbox" class="js-switch" checked /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;周末是否免费
+                        </label>
+                    </div>
+                </form>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-primary" id="saveWeekend">保存</button>
+                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
+            </div>
+        </div>
+    </div>
+</div>
+<!--节假日弹窗结尾-->
+
+

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä