| | |
| | | @Select("\n" + |
| | | "SELECT aa.bg_type, aa.dw_name,aa.batch,aa.dept,sum(aa.people_count) people_count,sum(aa.yj_count) yj_count,(sum(aa.people_count)-sum(aa.yj_count))wj_count FROM (\n" + |
| | | "\n" + |
| | | "SELECT '团体' bg_type, a.company dw_name,COUNT(DISTINCT a.team_no) batch,a.department dept,COUNT(*) people_count, 0 yj_count,0 wj_count FROM tj_reservation a WHERE a.deleted=0 AND a.grouping_id IN (\n" + |
| | | "SELECT '团体' bg_type, r.cn_name dw_name,COUNT(DISTINCT a.team_no) batch,a.department dept,COUNT(*) people_count, 0 yj_count,0 wj_count FROM tj_reservation a " + |
| | | "LEFT JOIN dict_comp r ON a.company_id=r.drug_manufacturer_id" + |
| | | " WHERE a.deleted=0 AND a.grouping_id IN (\n" + |
| | | "\n" + |
| | | " SELECT b.id FROM tj_dw_grouping b WHERE b.deleted=0 AND b.dw_dept_id=#{dwDeptId}\n" + |
| | | "\t \n" + |