|
@@ -63,7 +63,7 @@ public interface QueryDrugsAndProjectsDao {
|
|
|
"union all " +
|
|
|
"select a.charge_item_code chargeCode,b.name name,sum(a.quantity*drug_win) amount_of_money, " +
|
|
|
" sum(a.quantity*drug_win*unit_price) amountOfMoney, classCode=c.name,source='门诊' " +
|
|
|
- "from mz_charge_detail_b a , zd_charge_item b , zd_charge_class c " +
|
|
|
+ "from mz_charge_detail a , zd_charge_item b , zd_charge_class c " +
|
|
|
"where a.charge_item_code=b.code and b.class_code=c.code " +
|
|
|
"<if test=\"startTime!=null and startTime!=''\">" +
|
|
|
"and a.charge_date>=#{startTime} and a.charge_date<#{endTime} " +
|
|
@@ -133,7 +133,7 @@ public interface QueryDrugsAndProjectsDao {
|
|
|
" (select name from zd_unit_code where code = a.warn_dept) dept, " +
|
|
|
" (select name from zd_unit_code where code = a.exec_dept) exec_unit, " +
|
|
|
" yb_type = '自费',sum(a.quantity*a.drug_win) number,sum(a.quantity*drug_win*unit_price) amount_of_money,a.charge_item_code,source = '门诊' " +
|
|
|
- " from mz_charge_detail_b a,mz_patient_mi b " +
|
|
|
+ " from mz_charge_detail a,mz_patient_mi b " +
|
|
|
"where a.patient_id = b.patient_id " +
|
|
|
"and a.times = b.times " +
|
|
|
"and charge_item_code = #{chargeCode} " +
|
|
@@ -144,12 +144,11 @@ public interface QueryDrugsAndProjectsDao {
|
|
|
"group by charge_item_code,a.patient_id,a.times,b.name,social_no,phone_no,charge_date,exec_dept,a.warn_dept) temp GROUP BY " +
|
|
|
"patient,times,name,social_no,phone,admiss_date,dis_date,charge_date,dept,exec_unit,yb_type,amount_of_money,number,charge_code,source" +
|
|
|
"</script>")
|
|
|
- // 如果不希望显示 0 的话 就去掉 amount_of_money 和 number
|
|
|
List<QueryDrugsAndProjects> chaXunXiangMuHuoYaoPinJuTiXinXi(@Param("startTime") String startTime,
|
|
|
@Param("endTime") String endTime,
|
|
|
@Param("chargeCode") String chargeCode,
|
|
|
@Param("dept") String dept);
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 查询药品
|
|
|
*
|
|
@@ -182,7 +181,7 @@ public interface QueryDrugsAndProjectsDao {
|
|
|
"select a.charge_item_code chargeCode," +
|
|
|
"case a.serial when '01' then '药品(小)' when '99' then '药品(大)' end packageSpecification," +
|
|
|
"b.name name,sum(a.quantity*drug_win) number,sum(a.quantity*drug_win*unit_price) amountOfMoney,source='门诊',classCode=c.name " +
|
|
|
- "from mz_charge_detail_b a,yp_zd_dict b,yp_zd_drug_kind c " +
|
|
|
+ "from mz_charge_detail a,yp_zd_dict b,yp_zd_drug_kind c " +
|
|
|
"where " +
|
|
|
"1=1 " +
|
|
|
"<if test=\"startTime!='' and startTime!=null\">" +
|