|
@@ -110,16 +110,6 @@ public interface PublicDao {
|
|
|
"bed_no,total_charge,balance from zy_actpatient a where inpatient_no = #{inpatientNo} ")
|
|
|
ZyActpatient getHuanZheJiBenXinXi(@Param("inpatientNo") String inpatientNo);
|
|
|
|
|
|
- /**
|
|
|
- * 只用当前在院的次数就可以了
|
|
|
- *
|
|
|
- * @param inpatientNo 住院号
|
|
|
- * @return 返回信息
|
|
|
- */
|
|
|
- @Select("select max(admiss_times) from zy_actpatient where inpatient_no = #{inpatientNo} ")
|
|
|
- Integer getAdmissTimes(@Param("inpatientNo") String inpatientNo);
|
|
|
-
|
|
|
-
|
|
|
@Select("select ori_detail_sn,sum(charge_fee) charge_fee,sum(charge_amount) charge_amount " +
|
|
|
"from zy_detail_charge a " +
|
|
|
"where inpatient_no=#{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} and order_no <> 6 and trans_flag_yb <> 2 " +
|
|
@@ -153,21 +143,30 @@ public interface PublicDao {
|
|
|
@Param("ledgerSn") Integer ledgerSn,
|
|
|
@Param("list") List<Integer> oriDetailSn);
|
|
|
|
|
|
- @Update("update zy_detail_charge set ori_detail_sn = null where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} " +
|
|
|
- "and charge_fee > 0 and charge_amount > 0 and ori_detail_sn = -1 " +
|
|
|
- "and detail_sn not in (select ori_detail_sn from zy_detail_charge where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} and ori_detail_sn is not null " +
|
|
|
- " and charge_amount < 0 and charge_fee < 0)")
|
|
|
- void jiuZhengZhenShuLiuShui(@Param("inpatientNo") String inpatientNo,
|
|
|
- @Param("admissTimes") Integer admissTimes,
|
|
|
- @Param("ledgerSn") Integer ledgerSn);
|
|
|
-
|
|
|
- @Update("update zy_detail_charge set ori_detail_sn = -1 where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} and detail_sn in ( " +
|
|
|
- " select ori_detail_sn from zy_detail_charge where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} and ori_detail_sn is not null and ori_detail_sn <> -1 and charge_fee < 0 and charge_amount < 0 " +
|
|
|
- " ) and charge_amount > 0 and charge_fee > 0")
|
|
|
- void genXinYuanTuiFeiLiuShui(@Param("inpatientNo") String inpatientNo,
|
|
|
+ @Select("select detail_sn from zy_detail_charge where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn}" +
|
|
|
+ " and ori_detail_sn = -1 and charge_amount > 0")
|
|
|
+ List<Integer> zhenShuLiuShui(@Param("inpatientNo") String inpatientNo,
|
|
|
@Param("admissTimes") Integer admissTimes,
|
|
|
@Param("ledgerSn") Integer ledgerSn);
|
|
|
|
|
|
+ @Select("select ori_detail_sn from zy_detail_charge where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn}" +
|
|
|
+ " and ori_detail_sn > 0 and charge_amount < 0 group by ori_detail_sn")
|
|
|
+ List<Integer> fuShuLiuShui(@Param("inpatientNo") String inpatientNo,
|
|
|
+ @Param("admissTimes") Integer admissTimes,
|
|
|
+ @Param("ledgerSn") Integer ledgerSn);
|
|
|
+
|
|
|
+ @Update("<script>" +
|
|
|
+ "update zy_detail_charge set ori_detail_sn = null where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} " +
|
|
|
+ "and detail_sn in " +
|
|
|
+ "<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
+ "#{item}" +
|
|
|
+ "</foreach>" +
|
|
|
+ "</script>")
|
|
|
+ void genXingWeiKongLiuShui(@Param("inpatientNo") String inpatientNo,
|
|
|
+ @Param("admissTimes") Integer admissTimes,
|
|
|
+ @Param("ledgerSn") Integer ledgerSn,
|
|
|
+ @Param("detailSn") List<Integer> detailSn);
|
|
|
+
|
|
|
@Select("select top(1) code,dept_code,name,code_rs from a_employee_mi where (code = #{code} or code_rs = #{code}) and isnull(del_flag,0) = 0 ")
|
|
|
UserInfo huoQuYuanGongXinXi(String code);
|
|
|
|