|
@@ -883,6 +883,21 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
|
|
|
@Param("ledger") Integer ledger,
|
|
|
@Param("detailSn") Integer detailSn);
|
|
|
|
|
|
+ @Select("<script>" +
|
|
|
+ "select code from yp_zd_dict where code in " +
|
|
|
+ "<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
+ " #{item}" +
|
|
|
+ "</foreach> " +
|
|
|
+ " and serial = '01' and isnull(del_flag,0) = 1 " +
|
|
|
+ "union all " +
|
|
|
+ "select code from zd_charge_item where code in " +
|
|
|
+ "<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
+ " #{item}" +
|
|
|
+ "</foreach> " +
|
|
|
+ " and isnull(del_flag,0) = 1" +
|
|
|
+ "</script>")
|
|
|
+ List<String> chaXunFeiYongShiFouTingYong(List<String> bianMa);
|
|
|
+
|
|
|
|
|
|
@Delete("delete zy_detail_charge where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledger} " +
|
|
|
"and detail_sn = #{detailSn} and order_no <> 6 and trans_flag_yb <> 2")
|
|
@@ -898,6 +913,17 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
|
|
|
@Param("ledger") Integer ledger,
|
|
|
@Param("detailSn") Integer detailSn);
|
|
|
|
|
|
+ @Select("select isnull(sum(charge_fee),0) from zy_detail_charge\n" +
|
|
|
+ "where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledger} and trans_flag_yb=2")
|
|
|
+ BigDecimal zhenFuXingDiFeiYong(@Param("inpatientNo") String inpatientNo,
|
|
|
+ @Param("admissTimes") Integer admissTimes,
|
|
|
+ @Param("ledger") Integer ledger);
|
|
|
+
|
|
|
+ @Update("update zy_detail_charge set trans_flag_yb = 0 where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledger} and trans_flag_yb = 2")
|
|
|
+ void chongXingZhengFuXiangDi(@Param("inpatientNo") String inpatientNo,
|
|
|
+ @Param("admissTimes") Integer admissTimes,
|
|
|
+ @Param("ledger") Integer ledger);
|
|
|
+
|
|
|
|
|
|
@Select("select b.code from zy_detail_charge a, yp_zd_dict b " +
|
|
|
"where order_no <> 6 and trans_flag_yb not in (1,2) and charge_code like 'BILL%' " +
|
|
@@ -1007,7 +1033,7 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
|
|
|
@Param("riQiPaiXu") String riQiPaiXu);
|
|
|
|
|
|
@Select("<script>" +
|
|
|
- "select * from zy_detail_charge\n" +
|
|
|
+ "select * from zy_detail_charge " +
|
|
|
"where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} and infant_flag = #{infantFlag} and detail_sn in " +
|
|
|
"<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
"#{item}" +
|
|
@@ -1021,7 +1047,7 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
|
|
|
@Param("list") int[] detailSnList);
|
|
|
|
|
|
|
|
|
- @Select("select inpatient_no,admiss_times,ledger_sn,detail_sn,charge_fee,charge_amount,ori_detail_sn,trans_flag_yb,exec_unit from zy_detail_charge\n" +
|
|
|
+ @Select("select inpatient_no,admiss_times,ledger_sn,detail_sn,charge_fee,charge_amount,ori_detail_sn,trans_flag_yb,exec_unit from zy_detail_charge " +
|
|
|
"where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} and detail_sn = #{detailSn} " +
|
|
|
"and infant_flag = #{infantFlag} and charge_fee < 0 and charge_amount < 0 ")
|
|
|
ZyDetailCharge piPeiXinXiFuShu(@Param("inpatientNo") String inpatientNo,
|