Browse Source

Merge remote-tracking branch 'upstream/dev-1.1.4' into dev-1.1.4

hsh 1 year ago
parent
commit
fe1d5f46e3

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

@@ -341,6 +341,11 @@ public class Constants {
      */
     public static final String EMERGENCY_WARD_CODE = "1070000";
 
+    /**
+     * 国际门诊科编码
+     */
+    public static final String GJMZ_CODE = "1060000";
+
     /**
      * 医学检验科编码
      */

+ 2 - 2
src/main/java/cn/hnthyy/thmz/controller/mz/MzChargeDetailController.java

@@ -589,7 +589,7 @@ public class MzChargeDetailController {
                 }
             }
             if (oriMzChargeDetail.getAmount() != null) {
-                oriMzChargeDetail.setAmount(oriMzChargeDetail.getAmount().setScale(1, BigDecimal.ROUND_HALF_UP));
+                oriMzChargeDetail.setAmount(oriMzChargeDetail.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP));
             }
             BigDecimal oriAmount = BigDecimal.ZERO;
             if (oriMzChargeDetail != null) {
@@ -623,7 +623,7 @@ public class MzChargeDetailController {
             }
             MzChargeDetail returnMzChargeDetail = getMzChargeDetail(mzDepositFileVo.getPatientId(), mzChargeDetails.get(0).getTimes(), mzChargeDetails);
             returnMzChargeDetail.setOriAmount(oriAmount);
-            returnMzChargeDetail.setRefundFee(oriAmount.subtract(returnMzChargeDetail.getAmount()).setScale(1, BigDecimal.ROUND_HALF_UP));
+            returnMzChargeDetail.setRefundFee(oriAmount.subtract(returnMzChargeDetail.getAmount()).setScale(2, BigDecimal.ROUND_HALF_UP));
             List<MzChargeDetail> realMzChargeDetails = Arrays.asList(returnMzChargeDetail);
             pageViewVo.setTotal(realMzChargeDetails.size());
             mzChargeDetailService.formatMzChargeDetail(realMzChargeDetails);

+ 2 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/zy/ZyLedgerFileMapper.java

@@ -153,7 +153,8 @@ public interface ZyLedgerFileMapper {
      * @param ledgerSn
      * @return
      */
-    @Select("select account_date , cash_date , settle , last_balance , deposit , total_charge,ybjzje=total_charge - ( deposit - settle ),zfje=( deposit - settle ) from zy_ledger_file where inpatient_no =#{inpatientNo} AND admiss_times =#{admissTimes} AND ledger_sn =#{ledgerSn} ")
+    @Select("select account_date , cash_date , settle , last_balance , deposit , total_charge,ybjzje=fund_pay_sumamt,acct_pay, " +
+            "zfje=last_balance from zy_ledger_file where inpatient_no =#{inpatientNo} AND admiss_times =#{admissTimes} AND ledger_sn =#{ledgerSn} ")
     Map<String,Object> selectTellerInfo(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("ledgerSn") Integer ledgerSn);
 
     /**

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

@@ -2700,7 +2700,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
             throw new MzException(payInfo.getErrorMessage());
         }
         if (payInfo.getFundPay() == null || payInfo.getFundPay().compareTo(BigDecimal.ZERO) <= 0) {
-            throw new MzException("门诊统筹金额为空,无需进行补录操作!");
+            payInfo.setFundPay(BigDecimal.ZERO);
         }
         BigDecimal totalAmount = mzChargeDetailMapper.selectSumAmount(patientId, times, receiptNo);
         if (totalAmount == null) {

+ 21 - 8
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzyReqrecServiceImpl.java

@@ -119,8 +119,8 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
     private MzVisitTableService mzVisitTableService;
     @Autowired
     private MzPatientMiService mzPatientMiService;
-//    @Autowired
-//    private HaiCiAdapterService haiCiAdapterService;
+    @Autowired
+    private HaiCiAdapterService haiCiAdapterService;
 
     //无需新冠调查的科室
     private List notCovid = Arrays.asList("1040200", "1040000", "1040100", "1070000", "1260000");
@@ -288,6 +288,10 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
             //发送预约挂号未缴费的信息,推送缴费链接
             orderStatusChangeService.orderStatusChange(mzyReqrec.getPatientId() + "_" + times + "," + OrderStatusEnum.REGISTRATION_UN_PAY.code);
         }
+        //挂国际门诊1060000,调通知接口
+        if(Constants.GJMZ_CODE.equals(mzyReqrec.getUnitCode())){
+            haiCiAdapterService.notify(String.valueOf(serialNo),99);
+        }
         return 1;
     }
 
@@ -632,6 +636,8 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
             if (Constants.BRZZJF_CODE.equals(opId) && StringUtils.isNotBlank(dbMzyReqrec.getReceiptBill())) {
                 throw new MzException("您操作的挂号记录已打发票,请前往收费窗口进行退费!");
             }
+            //查询是否有退号记录了,防止插入重复数据
+            MzyReqrec thMzyReqrec = mzyReqrecMapper.selectMzyReqrecBySerialNo(-dbMzyReqrec.getSerialNo());
             ReqrecRequestRelation reqrecRequestRelation = reqrecRequestRelationMapper.selectReqrecRequestRelation(dbMzyReqrec.getSerialNo());
             if (reqrecRequestRelation != null && reqrecRequestRelation.getRequestId() != null) {
                 String requestHour = DateUtil.fomart(dbMzyReqrec.getRequestDay(), "HH");
@@ -682,11 +688,16 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
                 }else if ("17".equals(requestHour)) {
                         apTime = "p7";
                 }
-                mzyRequestMapper.updateLeftNumById(reqrecRequestRelation.getRequestId(), apTime);
-                MzyRequest dbMzyRequest = mzyRequestMapper.selectMzyRequestById(reqrecRequestRelation.getRequestId());
-                if (dbMzyRequest != null) {
-                    Integer leftNum = mzyRequestService.getApLeftNum(dbMzyRequest);
-                    mzyRequestMapper.setLeftNum(dbMzyRequest.getId(), leftNum);
+                if(thMzyReqrec == null) {
+                    if( !Constants.AM.equals(dbMzyReqrec.getAmpm().trim()) && !Constants.PM.equals(dbMzyReqrec.getAmpm().trim())){
+                        apTime = null;
+                    }
+                    mzyRequestMapper.updateLeftNumById(reqrecRequestRelation.getRequestId(), apTime);
+                    MzyRequest dbMzyRequest = mzyRequestMapper.selectMzyRequestById(reqrecRequestRelation.getRequestId());
+                    if (dbMzyRequest != null) {
+                        Integer leftNum = mzyRequestService.getApLeftNum(dbMzyRequest);
+                        mzyRequestMapper.setLeftNum(dbMzyRequest.getId(), leftNum);
+                    }
                 }
             }
             dbMzyReqrec.setTimes(-dbMzyReqrec.getTimes());
@@ -704,7 +715,9 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
             if (!(Arrays.asList(Constants.BRZZJF_CODE, Constants.HLWYY_CODE).contains(opId) || (YesNoEnum.YES.code.equals(mzyReqrec.getRefundType()) && Arrays.asList(Constants.BYJZ, Constants.YLK, Constants.JHZF).contains(dbMzyReqrec.getPaymode())))) {
                 dbMzyReqrec.setPaymode(Constants.CASH);
             }
-            mzyReqrecMapper.insertMzyReqrec(dbMzyReqrec);
+            if(thMzyReqrec == null){
+                mzyReqrecMapper.insertMzyReqrec(dbMzyReqrec);
+            }
             reqrecRequestRelationMapper.selectReqrecRequestRelation(dbMzyReqrec.getSerialNo());
             Clinic clinic = new Clinic();
             clinic.setPatientId(mzyReqrec.getPatientId());

+ 3 - 0
src/main/resources/static/js/zy/actpatient.js

@@ -985,6 +985,7 @@ function teller(inpatientNo, admissTimes) {
                     $("#amountMoneyRefund").text(res.data.total_charge == null ? 0.00 : res.data.total_charge.toFixed(2));
                     $("#depositRefund").text(res.data.deposit == null ? 0.00 : res.data.deposit.toFixed(2));
                     $("#ybjzjeRefund").text(res.data.ybjzje == null ? 0.00 : res.data.ybjzje.toFixed(2));
+                    $("#acctPayRefund").text(res.data.acct_pay == null ? 0.00 : res.data.acct_pay.toFixed(2));
                     $("#settleRefund").text(res.data.settle == null ? 0.00 : res.data.settle.toFixed(2));
                     var refundList = res.refundList;
                     if (refundList != null && refundList.length > 0) {
@@ -1014,6 +1015,7 @@ function teller(inpatientNo, admissTimes) {
                     $("#amountMoneyConfirm").text(res.data.total_charge == null ? 0.00 : res.data.total_charge.toFixed(2));
                     $("#depositConfirm").text(res.data.deposit == null ? 0.00 : res.data.deposit.toFixed(2));
                     $("#ybjzjeConfirm").text(res.data.ybjzje == null ? 0.00 : res.data.ybjzje.toFixed(2));
+                    $("#acctPayConfirm").text(res.data.acct_pay == null ? 0.00 : res.data.acct_pay.toFixed(2));
                     $("#settleConfirm").text(res.data.settle == null ? 0.00 : Math.abs(res.data.settle.toFixed(2)));
                     $("#cash").val(res.data.settle == null ? 0.00 : Math.abs(res.data.settle.toFixed(2)));
                 }
@@ -1345,6 +1347,7 @@ function saveTeller(settleType, refundType) {
                 return;
             }
             if (res.code == 0 || res.code == -2) {
+                console.log('打印发票')
                 prn1PrintHand(inpatientNo, admissTimes, null);
                 successMesage(res);
                 $("#confirmFeeModal").modal("hide");

+ 16 - 2
src/main/resources/templates/zy/actpatient.html

@@ -306,10 +306,17 @@
                         </div>
                         <div class="col-md-12 col-sm-12 col-xs-12">
                             <div class="col-md-6 col-sm-6 col-xs-12">
-                                <div class="total"> 医保记账
+                                <div class="total"> 医保报销
                                     <span class="amountMoney" id="ybjzjeConfirm">0.00</span><span>元</span>
                                 </div>
                             </div>
+                            <div class="col-md-6 col-sm-6 col-xs-12">
+                                <div class="total"><span id="acctName">个账支付:</span>
+                                    <span class="amountMoney" id="acctPayConfirm">0.00</span><span>元</span>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="col-md-12 col-sm-12 col-xs-12">
                             <div class="col-md-6 col-sm-6 col-xs-12">
                                 <div class="total"><span id="settleName">补交金额:</span>
                                     <span class="amountMoney" id="settleConfirm">0.00</span><span>元</span>
@@ -406,10 +413,17 @@
                         </div>
                         <div class="col-md-12 col-sm-12 col-xs-12">
                             <div class="col-md-6 col-sm-6 col-xs-12">
-                                <div class="total"> 医保记账
+                                <div class="total"> 医保报销
                                     <span class="amountMoney" id="ybjzjeRefund">0.00</span><span>元</span>
                                 </div>
                             </div>
+                            <div class="col-md-6 col-sm-6 col-xs-12">
+                                <div class="total"> 个账支付:
+                                    <span class="amountMoney" id="acctPayRefund">0.00</span><span>元</span>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="col-md-12 col-sm-12 col-xs-12">
                             <div class="col-md-6 col-sm-6 col-xs-12">
                                 <div class="total">退款金额:
                                     <span class="amountMoney" id="settleRefund">0.00</span><span>元</span>