Browse Source

记账收费优化

hurugang 5 years ago
parent
commit
ba9f987071

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

@@ -415,7 +415,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         //如果有欠费记账的收费,新增退费重收记录
 //        List<MzChargeDetail> newMzChargeDetailList = getMzChargeDetails(opId, mzDepositFileVo, now, serialNo);
 //        getMzChargeDetailService().saveMzChargeDetail(newMzChargeDetailList);
-        List<MzDepositFile> newMzDepositFileList = getMzDepositFiles(mzDepositFileVo, now, serialNo);
+        List<MzDepositFile> newMzDepositFileList = getMzDepositFiles(mzDepositFileVo, now, serialNo,opId);
         if(newMzDepositFileList.size()>0 && mzDepositFileMapper.selectBySameParams(newMzDepositFileList.get(0))>0){
             throw new MzException("当前病人本次处方已经成功缴费,无需重复缴费");
         }
@@ -1335,6 +1335,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                         newMzReceiptSerial.setChargeDate(now);
                         newMzReceiptSerial.setSerialNo(serialNo);
                         newMzReceiptSerial.setOperatorId(opId);
+                        newMzReceiptSerial.setPayId(opId);
                         newMzReceiptSerial.setReceiptSn(serialNo);
                         newMzReceiptSerial.setReceiptBill("");
                         newMzReceiptSerial.setChequeType(mzDepositFileVo.getMzDepositFiles().get(0).getChequeType());
@@ -1371,6 +1372,8 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                     j.setDcountDate(null);
                     j.setChargeDcountNo(YesNoEnum.NO.code);
                     j.setChargeDcountDate(null);
+                    j.setOperatorId(opId);
+                    j.setPayId(opId);
                     newList.add(j);
                 }
             });
@@ -1386,7 +1389,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
      * @param serialNo
      * @return
      */
-    private List<MzDepositFile> getMzDepositFiles(MzDepositFileVo mzDepositFileVo, Date now, int serialNo) {
+    private List<MzDepositFile> getMzDepositFiles(MzDepositFileVo mzDepositFileVo, Date now, int serialNo,String opId) {
         List<MzDepositFile> newList = new ArrayList<>();
         List<MzDepositFile> mzDepositFiles = mzDepositFileMapper.selectMzDepositFileByTimes(mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes(), mzDepositFileVo.getReceiptNo());
         if (mzDepositFiles != null && mzDepositFiles.size() > 0) {
@@ -1401,6 +1404,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                         newMzDepositFile.setSerialNo(serialNo);
                         newMzDepositFile.setReceiptSn(serialNo);
                         newMzDepositFile.setChequeType(mzDepositFileVo.getMzDepositFiles().get(0).getChequeType());
+                        newMzDepositFile.setOpId(opId);
                         newList.add(newMzDepositFile);
                     }
                     j.setReceiptNo(0 - j.getReceiptNo());
@@ -1409,6 +1413,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                     j.setSerialNo(0 - j.getSerialNo());
                     j.setPayMark(PayMarkEnum.RETURN_PREMIUM.code);
                     j.setChargeDate(now);
+                    j.setOpId(opId);
+                    j.setChargeDate(null);
+                    j.setChequeNo(YesNoEnum.NO.code.toString());
                     newList.add(j);
                 }
             });

+ 12 - 1
src/main/resources/static/js/registration.js

@@ -171,6 +171,17 @@ $(function () {
      * 保存挂号信息
      */
     $("#saveConfirmFee").on("click", function (t) {
+        var cash=$("#cash").val();
+        if(cash==null || cash ==""){
+            new PNotify({
+                title: '错误提示',
+                text: "金额不能为空!",
+                type: 'error',
+                hide: false,
+                styling: 'bootstrap3'
+            });
+            return;
+        }
         var patientId = $("#patientId").val();
         if (patientId == null || patientId == "") {
             savePatient(true);
@@ -1642,7 +1653,7 @@ function prn1Print(patientId, times) {
     setPrint();
     var height ="93.0mm";
     if(countReceiot%2==0){
-        height ="93.1mm";
+        height ="93.2mm";
     }
     $.ajax({
         type: "GET",

+ 1 - 1
src/main/resources/static/js/registration_list.js

@@ -2021,7 +2021,7 @@ function prn1Print(patientId, times) {
     setPrint();
     var height ="93.0mm";
     if(countReceiot%2==0){
-        height ="93.1mm";
+        height ="93.2mm";
     }
     $.ajax({
         type: "GET",

+ 1 - 1
src/main/resources/static/js/toll_administration.js

@@ -1361,7 +1361,7 @@ function printCommon(url, patientId, times) {
     setPrint();
     var height = "93.0mm";
     if (countReceiot % 2 == 0) {
-        height = "93.1mm";
+        height = "93.2mm";
     }
     $.ajax({
         type: "GET",