|
@@ -540,19 +540,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectBusinessYljgKhJbxxList" parameterType="YljgKhJbxx" resultMap="YljgKhJbxxResult">
|
|
|
- <include refid="selectBusinessYljgKhJbxxVo"/>
|
|
|
+ select id, xb, xm, zjlx, zjhm, mz, gj, hjlb, hyzk, xjdxzqy, xjd, nlpg, ryzt from yljg_kh_jbxx FORCE INDEX (idx_rzjg)
|
|
|
<where>
|
|
|
- a.status = '0'
|
|
|
- and a.is_rz = '1'
|
|
|
- and a.create_user_type = '01'
|
|
|
- <if test="xm != null and xm != ''"> and a.xm like concat('%', #{xm}, '%')</if>
|
|
|
- <if test="zjhm != null and zjhm != ''"> and a.zjhm like concat('%', #{zjhm}, '%')</if>
|
|
|
- <if test="jgmc != null and jgmc != ''"> and b.jgmc like concat('%', #{jgmc}, '%')</if>
|
|
|
- <if test="nlpg != null and nlpg != ''"> and a.nlpg = #{nlpg}</if>
|
|
|
- <if test="xjdxzqy != null and xjdxzqy != ''"> and a.xjdxzqy = #{xjdxzqy}</if>
|
|
|
+ is_rz = '1'
|
|
|
+ AND create_user_type = '01'
|
|
|
+ <if test="xm != null and xm != ''"> and xm like concat('%', #{xm}, '%')</if>
|
|
|
+ <if test="zjhm != null and zjhm != ''"> and zjhm = #{zjhm}</if>
|
|
|
<if test="xjdxzqy != null and xjdxzqy != ''"> and xjdxzqy in (select code from sys_dept_jl where code = #{xjdxzqy} or find_in_set(#{xjdxzqy}, ancestors)) </if>
|
|
|
- <if test="isCj != null and isCj != ''"> and a.is_cj = #{isCj}</if>
|
|
|
- <if test="xzqhId != null and xzqhId != ''"> and (b.szxzqh IN ( SELECT code FROM v_filter_xzqh WHERE code = #{xzqhId} or find_in_set( #{xzqhId} , ancestors ) ))</if>
|
|
|
+ <if test="jgId != null and jgId != ''"> and jg_id = #{jgId}</if>
|
|
|
+ <if test="(jgmc != null and jgmc != '') and (xzqhId != null and xzqhId != '')">
|
|
|
+ AND jg_id IN (select id from yljg_jcxx where sczt = '01' and ssxzqh IN (
|
|
|
+ SELECT
|
|
|
+ code
|
|
|
+ FROM
|
|
|
+ sys_dept_jl
|
|
|
+ WHERE
|
|
|
+ code = #{xzqhId}
|
|
|
+ OR find_in_set(#{xzqhId}, ancestors)
|
|
|
+ ) and jgmc like concat('%', #{jgmc}, '%'))
|
|
|
+ </if>
|
|
|
+ <if test="(jgmc != null and jgmc != '') and (xzqhId == null or xzqhId == '')"> AND jg_id IN (select id from yljg_jcxx where sczt = '01' and jgmc like concat('%', #{jgmc}, '%'))</if>
|
|
|
+ <if test="(jgmc == null or jgmc == '') and (xzqhId != null and xzqhId != '')"> AND jg_id IN (select id from yljg_jcxx where sczt = '01' and ssxzqh IN (
|
|
|
+ SELECT
|
|
|
+ code
|
|
|
+ FROM
|
|
|
+ sys_dept_jl
|
|
|
+ WHERE
|
|
|
+ code = #{xzqhId}
|
|
|
+ OR find_in_set(#{xzqhId}, ancestors)
|
|
|
+ ))</if>
|
|
|
+ <if test="nlpg != null and nlpg != ''"> and nlpg = #{nlpg}</if>
|
|
|
+ <if test='isPresent == "1"'> AND jg_id IN (select id from yljg_jcxx where sczt = '01' and ssxzqh = #{xzqhId})</if>
|
|
|
+ <if test="isCj != null and isCj != ''"> and is_cj = #{isCj}</if>
|
|
|
+ <if test='isGbmb == "01"'> and jg_id in (select id from yljg_jcxx where sczt = '01' and dwxz in ('30','31','32','33','40','41','42','43')) </if>
|
|
|
+ <if test='isGbmb == "00"'> and jg_id in (select id from yljg_jcxx where sczt = '01' and dwxz in ('10','20','21','22','23')) </if>
|
|
|
+ <if test="isGbmy != null and isGbmy != ''"> and jg_id in (select id from yljg_jcxx where sczt = '01' and is_gbmy = #{isGbmy})</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -564,18 +586,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectBusinessYljgKhJbxxSqList" parameterType="YljgKhJbxx" resultMap="YljgKhJbxxResult">
|
|
|
- <include refid="selectBusinessYljgKhJbxxSqVo"/>
|
|
|
+ select id, xb, xm, zjlx, zjhm, mz, gj, hjlb, hyzk, xjdxzqy, xjd, nlpg, ryzt from yljg_kh_jbxx FORCE INDEX (idx_sqfw)
|
|
|
<where>
|
|
|
- a.status = '0'
|
|
|
- and a.create_user_type = '02'
|
|
|
- <if test="xm != null and xm != ''"> and a.xm like concat('%', #{xm}, '%')</if>
|
|
|
- <if test="zjhm != null and zjhm != ''"> and a.zjhm like concat('%', #{zjhm}, '%')</if>
|
|
|
- <if test="jgmc != null and jgmc != ''"> and b.jgmc like concat('%', #{jgmc}, '%')</if>
|
|
|
- <if test="xjdxzqy != null and xjdxzqy != ''"> and a.xjdxzqy = #{xjdxzqy}</if>
|
|
|
+ create_user_type = '02'
|
|
|
+ <if test="xm != null and xm != ''"> and xm like concat('%', #{xm}, '%')</if>
|
|
|
+ <if test="zjhm != null and zjhm != ''"> and zjhm = #{zjhm}</if>
|
|
|
<if test="xjdxzqy != null and xjdxzqy != ''"> and xjdxzqy in (select code from sys_dept_jl where code = #{xjdxzqy} or find_in_set(#{xjdxzqy}, ancestors)) </if>
|
|
|
- <if test="nlpg != null and nlpg != ''"> and a.nlpg = #{nlpg}</if>
|
|
|
- <if test="isCj != null and isCj != ''"> and a.is_cj = #{isCj}</if>
|
|
|
- <if test="xzqhId != null and xzqhId != ''"> and (b.szxzqh IN ( SELECT code FROM v_filter_xzqh WHERE code = #{xzqhId} or find_in_set( #{xzqhId} , ancestors ) ))</if>
|
|
|
+ <if test="(jgmc != null and jgmc != '') and (xzqhId != null and xzqhId != '')">
|
|
|
+ AND jg_id IN (select id from yljgsq_jcxx where sczt = '01' and ssxzqh IN (
|
|
|
+ SELECT
|
|
|
+ code
|
|
|
+ FROM
|
|
|
+ sys_dept_jl
|
|
|
+ WHERE
|
|
|
+ code = #{xzqhId}
|
|
|
+ OR find_in_set(#{xzqhId}, ancestors)
|
|
|
+ ) and jgmc like concat('%', #{jgmc}, '%'))
|
|
|
+ </if>
|
|
|
+ <if test="(jgmc != null and jgmc != '') and (xzqhId == null or xzqhId == '')"> AND jg_id IN (select id from yljgsq_jcxx where sczt = '01' and jgmc like concat('%', #{jgmc}, '%'))</if>
|
|
|
+ <if test="(jgmc == null or jgmc == '') and (xzqhId != null and xzqhId != '')"> AND jg_id IN (select id from yljgsq_jcxx where sczt = '01' and ssxzqh IN (
|
|
|
+ SELECT
|
|
|
+ code
|
|
|
+ FROM
|
|
|
+ sys_dept_jl
|
|
|
+ WHERE
|
|
|
+ code = #{xzqhId}
|
|
|
+ OR find_in_set(#{xzqhId}, ancestors)
|
|
|
+ ))</if>
|
|
|
+ <if test="nlpg != null and nlpg != ''"> and nlpg = #{nlpg}</if>
|
|
|
+ <if test='isPresent == "1"'> AND jg_id IN (select id from yljgsq_jcxx where sczt = '01' and ssxzqh = #{xzqhId})</if>
|
|
|
+ <if test="isCj != null and isCj != ''"> and is_cj = #{isCj}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -669,7 +709,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND create_user_type = '01'
|
|
|
<if test="xm != null and xm != ''"> and xm like concat('%', #{xm}, '%')</if>
|
|
|
<if test="zjhm != null and zjhm != ''"> and zjhm = #{zjhm}</if>
|
|
|
- <if test="xjdxzqy != null and xjdxzqy != ''"> and xjdxzqy = #{xjdxzqy}</if>
|
|
|
<if test="xjdxzqy != null and xjdxzqy != ''"> and xjdxzqy in (select code from sys_dept_jl where code = #{xjdxzqy} or find_in_set(#{xjdxzqy}, ancestors)) </if>
|
|
|
<if test="jgId != null and jgId != ''"> and jg_id = #{jgId}</if>
|
|
|
<if test="(jgmc != null and jgmc != '') and (xzqhId != null and xzqhId != '')">
|
|
@@ -711,7 +750,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
create_user_type = '02'
|
|
|
<if test="xm != null and xm != ''"> and xm like concat('%', #{xm}, '%')</if>
|
|
|
<if test="zjhm != null and zjhm != ''"> and zjhm = #{zjhm}</if>
|
|
|
- <if test="xjdxzqy != null and xjdxzqy != ''"> and xjdxzqy = #{xjdxzqy}</if>
|
|
|
<if test="xjdxzqy != null and xjdxzqy != ''"> and xjdxzqy in (select code from sys_dept_jl where code = #{xjdxzqy} or find_in_set(#{xjdxzqy}, ancestors)) </if>
|
|
|
<if test="(jgmc != null and jgmc != '') and (xzqhId != null and xzqhId != '')">
|
|
|
AND jg_id IN (select id from yljgsq_jcxx where sczt = '01' and ssxzqh IN (
|
|
@@ -750,7 +788,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND create_user_type = '01'
|
|
|
<if test="xm != null and xm != ''"> and xm like concat('%', #{xm}, '%')</if>
|
|
|
<if test="zjhm != null and zjhm != ''"> and zjhm = #{zjhm}</if>
|
|
|
- <if test="xjdxzqy != null and xjdxzqy != ''"> and xjdxzqy = #{xjdxzqy}</if>
|
|
|
<if test="xjdxzqy != null and xjdxzqy != ''"> and xjdxzqy in (select code from sys_dept_jl where code = #{xjdxzqy} or find_in_set(#{xjdxzqy}, ancestors)) </if>
|
|
|
<if test="jgId != null and jgId != ''"> and jg_id = #{jgId}</if>
|
|
|
<if test="(jgmc != null and jgmc != '') and (xzqhId != null and xzqhId != '')">
|
|
@@ -793,7 +830,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
create_user_type = '02'
|
|
|
<if test="xm != null and xm != ''"> and xm like concat('%', #{xm}, '%')</if>
|
|
|
<if test="zjhm != null and zjhm != ''"> and zjhm = #{zjhm}</if>
|
|
|
- <if test="xjdxzqy != null and xjdxzqy != ''"> and xjdxzqy = #{xjdxzqy}</if>
|
|
|
<if test="xjdxzqy != null and xjdxzqy != ''"> and xjdxzqy in (select code from sys_dept_jl where code = #{xjdxzqy} or find_in_set(#{xjdxzqy}, ancestors)) </if>
|
|
|
<if test="(jgmc != null and jgmc != '') and (xzqhId != null and xzqhId != '')">
|
|
|
AND jg_id IN (select id from yljgsq_jcxx where sczt = '01' and ssxzqh IN (
|