Quellcode durchsuchen

優化門診收費數據隔離

hurugang vor 3 Jahren
Ursprung
Commit
4dda3afe1d

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzDepositFileMapper.java

@@ -275,7 +275,7 @@ public interface MzDepositFileMapper {
      * @param times
      * @return
      */
-    @Select("select count(1) from mz_deposit_file where patient_id =#{patientId} and times=#{times} and pay_mark =0")
+    @Select("select count(1) from mz_deposit_file where patient_id =#{patientId} and times=#{times} and pay_mark =0 and cheque_type=2 ")
     int countYbZf(@Param(value = "patientId") String patientId, @Param("times") Integer times);
 
 

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

@@ -306,7 +306,13 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
             returnMzChargeDetail.setNotDiscountAmount(returnMzChargeDetail.getNotDiscountAmount().add((md.getOrigPrice() == null ? BigDecimal.ZERO : md.getOrigPrice()).multiply(BigDecimal.valueOf(md.getQuantity() == null ? 1D : md.getQuantity())).multiply(BigDecimal.valueOf(md.getDrugWin() == null ? 1D : md.getDrugWin()))));
         }
         returnMzChargeDetail.setDiscountAmount(returnMzChargeDetail.getNotDiscountAmount().subtract(returnMzChargeDetail.getAmount()).setScale(1, BigDecimal.ROUND_HALF_UP));
-        mzChargeDetail.setCountYbZf(mzDepositFileMapper.countYbZf(mzChargeDetail.getPatientId(), mzChargeDetail.getTimes()));
+        Map<String, Object> insuinfoMap = tsmzService.queryInsuinfo(Constants.BRZZJF_CODE, mzChargeDetail.getPatientId());
+        if (insuinfoMap != null && insuinfoMap.size() > 0) {
+            if(Integer.valueOf(0).equals(insuinfoMap.get("code"))){
+                returnMzChargeDetail.setCountYbZf(1);
+            }
+        }
+
         return returnMzChargeDetail;
     }
 

+ 4 - 2
src/main/resources/static/js/mz/toll_administration.js

@@ -407,8 +407,10 @@ function initFeeTable() {
                     str += '<button type="button" class="registration-no-color-foot-button" title="诊断查询" onclick="diagnoseQuery(\'' + row.patientId + '\',' + row.times + ')"><i class="fa fa-search-minus"></i></button>';
                     var payMarkGroup = getIndex("pay_mark_group");
                     if (payMarkGroup == 0) {
-                        str += '<button type="button" class="registration-no-color-foot-button"title="医保读卡" onclick="mztczfSiReadCardTypeModel()"><i class="fa fa-newspaper-o"></i></button>';
-                        str += '<button type="button" class="registration-no-color-foot-button"title="医保结算" onclick="directRegistration(\'' + row.patientId + '\',' + row.times + ')"><i class="fa fa-credit-card"></i></button>';
+                        if (row.countYbZf > 0) {
+                            str += '<button type="button" class="registration-no-color-foot-button"title="医保读卡" onclick="mztczfSiReadCardTypeModel()"><i class="fa fa-newspaper-o"></i></button>';
+                            str += '<button type="button" class="registration-no-color-foot-button"title="医保结算" onclick="directRegistration(\'' + row.patientId + '\',' + row.times + ')"><i class="fa fa-credit-card"></i></button>';
+                        }
                         str += '<button type="button" class="registration-no-color-foot-button"title="确认收费" onclick="tipHaveTally(' + row.amount + ',\'' + row.patientId + '\',' + row.times + ',\'' + row.name + '\',' + row.receiptNo + ')"><i class="fa fa-rmb"></i></button>';
                         return str;
                     }