|
|
@@ -92,7 +92,7 @@ public interface SiMzDao {
|
|
|
"chargeFee=(select cast(sum(isnull(unit_price,0.01)*isnull(drug_win,1)*isnull(quantity,1)) as decimal(16,2))), " +
|
|
|
"status=(select count(1) from t_mt_receipt d where d.patient_id=a.patient_id and d.times=a.times and d.receipt_no=a.receipt_no) " +
|
|
|
"from mz_charge_detail a where a.patient_id=#{patNo} and a.charge_date>=#{start} and a.charge_date<=#{end} " +
|
|
|
- "and pay_mark=0 and confirm_flag!=4 group by patient_id, times, charge_date,receipt_no order by times")
|
|
|
+ "and pay_mark=0 and confirm_flag!=4 and isnull(cash_id,'')!='99998' group by patient_id, times, charge_date,receipt_no order by times")
|
|
|
List<MzDepositFile> selectMzDepositFiles(@Param("patNo") String patNo, @Param("start") String start, @Param("end") String end);
|
|
|
|
|
|
@Select("select patient_id,times,receipt_no,order_no,item_no,charge_item_code, " +
|
|
|
@@ -107,7 +107,8 @@ public interface SiMzDao {
|
|
|
"(select national_code from zd_charge_item a where a.code=charge_item_code) else " +
|
|
|
"(select max(national_code) from yp_zd_dict a where a.code=charge_item_code) end) " +
|
|
|
"from mz_charge_detail where patient_id=#{patNo} and times=#{times} and " +
|
|
|
- "receipt_no=#{receipt} and pay_mark=0 and confirm_flag!=4 and bill_item_code!='TC' and charge_item_code!='BILL99'")
|
|
|
+ "receipt_no=#{receipt} and pay_mark=0 and confirm_flag!=4 and bill_item_code!='TC' " +
|
|
|
+ "and charge_item_code!='BILL99' and isnull(cash_id,'')!='99998'")
|
|
|
List<MzReceipt> selectMzCharge(@Param("patNo") String patNo, @Param("times") int times, @Param("receipt") int receipt);
|
|
|
|
|
|
@Select("select max(national_code) from ${table} where code=#{code}")
|