Browse Source

院内统计查看详情中看到申请科室和执行科室

xiaochan 4 năm trước cách đây
mục cha
commit
36e679fe5f

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>9.9.4</version>
+    <version>9.9.5</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 9 - 5
src/main/java/thyyxxk/webserver/dao/his/querydata/QueryDrugsAndProjectsDao.java

@@ -93,6 +93,7 @@ public interface QueryDrugsAndProjectsDao {
             "SELECT " +
             "    rtrim(a.inpatient_no) patient,a.admiss_times times,rtrim(b.name) name,b.social_no social_no,b.employer_tel phone,c.admiss_date,c.dis_date,a.charge_date charge_date, " +
             "    (select name from zd_unit_code where code=c.small_dept) dept, " +
+            "(select name from zd_unit_code where code= a.exec_unit) exec_unit, " +
             "    (select name from zy_zd_responce_type where code=c.responce_type) yb_type, " +
             "    sum(a.charge_amount) number,sum(a.charge_fee) amount_of_money,charge_code_mx charge_code,source='住院' " +
             "FROM zy_detail_charge a,a_patient_mi b,zy_inactpatient c " +
@@ -101,11 +102,12 @@ public interface QueryDrugsAndProjectsDao {
             "  and a.inpatient_no=c.inpatient_no " +
             "  and a.admiss_times=c.admiss_times " +
             "  and charge_date >= #{startTime} and charge_date <= #{endTime} " +
-            "group by charge_code_mx,a.inpatient_no,a.admiss_times,b.name,b.social_no,b.employer_tel,c.admiss_date,c.dis_date,c.small_dept,c.responce_type,a.charge_date " +
+            "group by charge_code_mx,a.inpatient_no,a.admiss_times,b.name,b.social_no,b.employer_tel,c.admiss_date,c.dis_date,c.small_dept,a.exec_unit,c.responce_type,a.charge_date " +
             "union all " +
             "SELECT " +
             "   rtrim(a.inpatient_no) patient,a.admiss_times times,rtrim(b.name) name ,b.social_no social_no,b.employer_tel phone,c.admiss_date,c.dis_date,a.charge_date, " +
             "    (select name from zd_unit_code where code=c.small_dept) dept, " +
+            "(select name from zd_unit_code where code= a.exec_unit) exec_unit, " +
             "    (select name from zy_zd_responce_type where code=c.responce_type) yb_type, " +
             "    sum(a.charge_amount) number,sum(a.charge_fee) amount_of_money,charge_code_mx charge_code,source = '住院' " +
             "FROM zy_detail_charge a,a_patient_mi b,zy_actpatient c " +
@@ -114,17 +116,19 @@ public interface QueryDrugsAndProjectsDao {
             "  and a.inpatient_no=c.inpatient_no " +
             "  and a.admiss_times=c.admiss_times " +
             "  and charge_date >= #{startTime} and charge_date <= #{endTime} " +
-            "group by charge_code_mx,a.inpatient_no,a.admiss_times,b.name,b.social_no,b.employer_tel,c.admiss_date,c.dis_date,c.small_dept,c.responce_type,a.charge_date " +
+            "group by charge_code_mx,a.inpatient_no,a.admiss_times,b.name,b.social_no,b.employer_tel,c.admiss_date,c.dis_date,c.small_dept,a.exec_unit,c.responce_type,a.charge_date " +
             "union all " +
-            "    select rtrim(a.patient_id) patient,a.times times,rtrim(b.name) name ,b.social_no social_no,b.phone_no phone,a.charge_date admiss_date,dis_date = null,a.charge_date charge_date, " +
-            "    (select name from zd_unit_code where code = a.exec_dept) dept, " +
+            "    select rtrim(a.patient_id) patient,a.times times,rtrim(b.name) name ,b.social_no social_no,b.phone_no phone," +
+            "a.charge_date admiss_date,dis_date = null,a.charge_date charge_date, " +
+            "    (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 " +
             "where a.patient_id = b.patient_id " +
             "and a.times = b.times " +
             "and charge_item_code = #{chargeCode} " +
             "and charge_date >= #{startTime} and charge_date <= #{endTime} " +
-            "group by  charge_item_code,a.patient_id,a.times,b.name,social_no,phone_no,charge_date,exec_dept) temp")
+            "group by  charge_item_code,a.patient_id,a.times,b.name,social_no,phone_no,charge_date,exec_dept,a.warn_dept) temp")
     List<QueryDrugsAndProjects> chaXunXiangMuHuoYaoPinJuTiXinXi(@Param("startTime") String startTime,
                                                                 @Param("endTime") String endTime,
                                                                 @Param("chargeCode") String chargeCode);

+ 5 - 0
src/main/java/thyyxxk/webserver/entity/querydata/QueryDrugsAndProjects.java

@@ -139,5 +139,10 @@ public class QueryDrugsAndProjects {
 
     private String disDiagComment;
 
+    /**
+     * 执行科室
+     */
+    private String execUnit;
+
 
 }