|
@@ -9,7 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
(select count(*) from yljg_jcxx where (sczt = '01') and (create_unit IN (SELECT dept_id FROM sys_dept WHERE dept_id = #{unit} OR find_in_set(#{unit}, ancestors)))) as zs,
|
|
|
(select count(*) from yljg_jcxx where (sczt = '01') and (create_unit IN (SELECT dept_id FROM sys_dept WHERE dept_id = #{unit} OR find_in_set(#{unit}, ancestors))) and is_ba = #{unit}) as bazs,
|
|
|
(select sum(cwzs) from yljg_jcxx where (sczt = '01') and (create_unit IN (SELECT dept_id FROM sys_dept WHERE dept_id = #{unit} OR find_in_set(#{unit}, ancestors)))) as cwzs,
|
|
|
- (select count(*) from yljg_kh_jbxx kh where jg_id in (select id from yljg_jcxx where (sczt = '01') and (create_unit IN (SELECT dept_id FROM sys_dept WHERE dept_id = #{unit} OR find_in_set(#{unit}, ancestors))))) as xssqfwlnrs,
|
|
|
+ (select count(*) from yljg_kh_jbxx kh where is_rz = '1' and jg_id in (select id from yljg_jcxx where (sczt = '01') and (create_unit IN (SELECT dept_id FROM sys_dept WHERE dept_id = #{unit} OR find_in_set(#{unit}, ancestors))))) as xssqfwlnrs,
|
|
|
(select count(*) from yljg_yg_jbxx yg where zzzt = '1' and jg_id in (select id from yljg_jcxx where (sczt = '01') and (create_unit IN (SELECT dept_id FROM sys_dept WHERE dept_id = #{unit} OR find_in_set(#{unit}, ancestors))))) as cyry,
|
|
|
(select count(*) from yljg_yg_jbxx yg where zzzt = '1' and zylx = '01' and jg_id in (select id from yljg_jcxx where (sczt = '01') and (create_unit IN (SELECT dept_id FROM sys_dept WHERE dept_id = #{unit} OR find_in_set(#{unit}, ancestors))))) as ylhly
|
|
|
</select>
|