|
@@ -5,21 +5,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<mapper namespace="com.ruoyi.business.mapper.GztMapper">
|
|
<mapper namespace="com.ruoyi.business.mapper.GztMapper">
|
|
<select id="selectYljg" parameterType="String" resultType="java.util.Map">
|
|
<select id="selectYljg" parameterType="String" resultType="java.util.Map">
|
|
SELECT
|
|
SELECT
|
|
- (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 = '1') 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 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 state = '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 state = '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 count(*) from yljg_jcxx where (sczt = '01') and (create_qhjsc = #{unit} or create_qhjsc like CONCAT(#{unit}, ',', '%')) and jlrq is not null) as zs,
|
|
|
|
+ (select count(*) from yljg_jcxx where (sczt = '01') and (create_qhjsc = #{unit} or create_qhjsc like CONCAT(#{unit}, ',', '%')) and jlrq is not null and is_ba = '1') as bazs,
|
|
|
|
+ (select sum(cwzs) from yljg_jcxx where (sczt = '01') and (create_qhjsc = #{unit} or create_qhjsc like CONCAT(#{unit}, ',', '%'))) as cwzs,
|
|
|
|
+ (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_qhjsc = #{unit} or create_qhjsc like CONCAT(#{unit}, ',', '%')) and jlrq is not null)) as xssqfwlnrs,
|
|
|
|
+ (select count(*) from yljg_yg_jbxx yg where zzzt = '1' and state = '1' and jg_id in (select id from yljg_jcxx where (sczt = '01') and (create_qhjsc = #{unit} or create_qhjsc like CONCAT(#{unit}, ',', '%')) and jlrq is not null)) as cyry,
|
|
|
|
+ (select count(*) from yljg_yg_jbxx yg where zzzt = '1' and state = '1' and zylx = '01' and jg_id in (select id from yljg_jcxx where (sczt = '01') and (create_qhjsc = #{unit} or create_qhjsc like CONCAT(#{unit}, ',', '%')) and jlrq is not null)) as ylhly
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectYljgSq" parameterType="String" resultType="java.util.Map">
|
|
<select id="selectYljgSq" parameterType="String" resultType="java.util.Map">
|
|
SELECT
|
|
SELECT
|
|
- (select count(*) from yljgsq_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 total,
|
|
|
|
- (select sum(cwzs) from yljgsq_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 where jg_id in (select id from yljgsq_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 where zzzt = '1' and state = '1' and jg_id in (select id from yljgsq_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 where zzzt = '1' and state = '1' and zylx = '01' and jg_id in (select id from yljgsq_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 count(*) from yljgsq_jcxx where (sczt = '01') and (create_qhjsc = #{unit} or create_qhjsc like CONCAT(#{unit}, ',', '%')) and jlrq is not null) as total,
|
|
|
|
+ (select sum(cwzs) from yljgsq_jcxx where (sczt = '01') and (create_qhjsc = #{unit} or create_qhjsc like CONCAT(#{unit}, ',', '%')) and jlrq is not null) as cwzs,
|
|
|
|
+ (select count(*) from yljg_kh_jbxx where jg_id in (select id from yljgsq_jcxx where (sczt = '01') and (create_qhjsc = #{unit} or create_qhjsc like CONCAT(#{unit}, ',', '%')) and jlrq is not null)) as xssqfwlnrs,
|
|
|
|
+ (select count(*) from yljg_yg_jbxx where zzzt = '1' and state = '1' and jg_id in (select id from yljgsq_jcxx where (sczt = '01') and (create_qhjsc = #{unit} or create_qhjsc like CONCAT(#{unit}, ',', '%')) and jlrq is not null)) as cyry,
|
|
|
|
+ (select count(*) from yljg_yg_jbxx where zzzt = '1' and state = '1' and zylx = '01' and jg_id in (select id from yljgsq_jcxx where (sczt = '01') and (create_qhjsc = #{unit} or create_qhjsc like CONCAT(#{unit}, ',', '%')) and jlrq is not null)) as ylhly
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectWddb" parameterType="String" resultType="java.util.Map">
|
|
<select id="selectWddb" parameterType="String" resultType="java.util.Map">
|