Forráskód Böngészése

解决门诊本院记账退费重收后退费问题

hurugang 2 éve
szülő
commit
f12624e0d4

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

@@ -353,7 +353,7 @@ public interface MzChargeDetailMapper {
      * @param chargeItemCode
      * @return
      */
-    @Select("select * from mz_charge_detail WITH(NOLOCK) where patient_id =#{patientId,jdbcType=CHAR} and times =#{times,jdbcType=INTEGER} and charge_item_code=#{chargeItemCode,jdbcType=CHAR} and item_no=#{itemNo} and order_no =#{orderNo} and quantity>0")
+    @Select("select * from mz_charge_detail WITH(NOLOCK) where patient_id =#{patientId,jdbcType=CHAR} and times =#{times,jdbcType=INTEGER} and charge_item_code=#{chargeItemCode,jdbcType=CHAR} and item_no=#{itemNo} and order_no =#{orderNo} and quantity>0 and pay_mark=0 ")
     List<MzChargeDetail> selectMzChargeDetailByChargeItemCode(@Param("patientId") String patientId, @Param("times") Integer times, @Param("chargeItemCode") String chargeItemCode, @Param("orderNo") Integer orderNo, @Param("itemNo") Integer itemNo);
 
     /**

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

@@ -3291,6 +3291,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                         continue;
                     }
                     for (MzChargeDetail mzChargeDetail : mzChargeDetails) {
+                        //剩余数量
                         Integer syCount = BigDecimal.valueOf(mzChargeDetail.getQuantity()).subtract(mzChargeDetail.getDecAmount() == null ? BigDecimal.ZERO : mzChargeDetail.getDecAmount()).intValue();
                         //皮试药特别逻辑
                         if (Constants.XYF.equals(mzChargeDetail.getBillItemCode())) {