|
@@ -26,7 +26,8 @@ public interface QueRenYiZhuShouFeiDao {
|
|
|
|
|
|
@Select("<script>" +
|
|
|
"select " +
|
|
|
- "rtrim(a.inpatient_no) inpatient_no, a.admiss_times, bed_no =b.bed_no,rtrim(b.name) name, a.ward_code ,b.sex,b.admiss_date, " +
|
|
|
+ "rtrim(a.inpatient_no) inpatient_no, a.admiss_times, bed_no =b.bed_no," +
|
|
|
+ "case when b.name IS NULL then (select top(1) rtrim(name) name from zy_inactpatient where zy_inactpatient.inpatient_no = a.inpatient_no) else rtrim(b.name) end name, a.ward_code ,b.sex,b.admiss_date, " +
|
|
|
"ledger_sn = (select max(ledger_sn) from zy_ledger_file where zy_ledger_file.inpatient_no = b.inpatient_no " +
|
|
|
"and zy_ledger_file.admiss_times = b.admiss_times),b.total_charge, " +
|
|
|
"responce_type_name = (select rtrim(name) from zy_zd_responce_type where zy_zd_responce_type.code = b.responce_type), " +
|
|
@@ -184,21 +185,11 @@ public interface QueRenYiZhuShouFeiDao {
|
|
|
"left join zy_actpatient e on (a.inpatient_no = e.inpatient_no) " +
|
|
|
"left join zd_unit_code f on (a.ward_code = f.code) " +
|
|
|
"where a.charge_status <> '3' " +
|
|
|
- "<choose>" +
|
|
|
- "<when test=\"startTime != null and startTime != '' \">" +
|
|
|
- " and charge_date >= #{startTime} and charge_date <= #{endTime} " +
|
|
|
- "</when >" +
|
|
|
- "<otherwise>" +
|
|
|
" and convert(varchar(20),a.occ_time,23)<=convert(varchar(20),getdate(),23) " +
|
|
|
- "</otherwise>" +
|
|
|
- "</choose>" +
|
|
|
" and a.exec_unit in " +
|
|
|
"<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
" #{item} " +
|
|
|
"</foreach>" +
|
|
|
- "<if test=\"wardCode !=null and wardCode != '' \">" +
|
|
|
- " and a.ward_code = #{wardCode}" +
|
|
|
- "</if>" +
|
|
|
"<if test=\"yiQueFeiShuJu != null and yiQueFeiShuJu.size > 0 \">" +
|
|
|
" and a.inpatient_no in " +
|
|
|
"<foreach collection='yiQueFeiShuJu' item='item' index='index' open='(' close=')' separator=','>" +
|
|
@@ -208,11 +199,6 @@ public interface QueRenYiZhuShouFeiDao {
|
|
|
"order by a.ward_code" +
|
|
|
"</script>")
|
|
|
List<YzActOrder> huoQuLiShiQueFeiXinXi(
|
|
|
- @Param("startTime") String startTime,
|
|
|
- @Param("endTime") String endTime,
|
|
|
@Param("list") List<String> execUnitList,
|
|
|
- @Param("wardCode") String wardCode,
|
|
|
@Param("yiQueFeiShuJu") List<Patient> yiQueFeiShuJu);
|
|
|
-
|
|
|
-
|
|
|
}
|