This commit is contained in:
linfso 2024-05-11 13:57:57 +08:00
parent af27c7be1e
commit 183fa7de10
2 changed files with 27 additions and 4 deletions

View File

@ -58,8 +58,19 @@
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
<!-- <if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>-->
<!-- <if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>-->
<if test="createSite != null and createSite != ''">
<!-- 包含子网点 -->
AND use_site_code in (
SELECT t1.site_code FROM (
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
#{createSite} ) pd
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
)
</if>
</where>
order by create_time desc
</select>

View File

@ -59,8 +59,20 @@
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
<!-- <if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>-->
<!-- <if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>-->
<if test="createSite != null and createSite != ''">
<!-- 包含子网点 -->
AND use_site_code in (
SELECT t1.site_code FROM (
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
#{createSite} ) pd
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
)
</if>
</where>
order by create_time desc
</select>