| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="platform.modules.government.dao.IndustrialLandDao">
- <select id="findByCondition" resultType="platform.modules.government.entity.IndustrialLand">
- select
- a.*
- from industrial_land a
- where a.del_flag = 0
- <if test="condition.pageType != null and condition.pageType == 'apply'">
- <if test="condition.userId != null and condition.userId != ''">
- and a.create_by = #{condition.userId}
- </if>
- </if>
- <if test="condition.street_id != null and condition.street_id != ''">
- and a.street_id = #{condition.street_id}
- </if>
- <if test="condition.status != null and condition.status != ''">
- and a.status = #{condition.status}
- </if>
- <if test="condition.investment_subject != null and condition.investment_subject != ''">
- and a.investment_subject like CONCAT ('%',#{condition.investment_subject},'%')
- </if>
- <if test="condition.legal_representative != null and condition.legal_representative != ''">
- and a.legal_representative like CONCAT ('%',#{condition.legal_representative},'%')
- </if>
- <if test="condition.contact != null and condition.contact != ''">
- and a.contact like CONCAT ('%',#{condition.contact},'%')
- </if>
- <!--待审核-->
- <if test="condition.pageType != null and condition.pageType == 'audit'">
- and a.id in (
- SELECT DISTINCT APPLY_ID FROM z_approval WHERE (NEXTCHECKER = #{condition.userId}
- or NEXTCHECKER LIKE CONCAT(#{condition.userId}, ',%')
- or NEXTCHECKER LIKE CONCAT(CONCAT('%,',#{condition.userId}), ',%'))
- and (
- id in
- (
- select temp.maxId from (select APPLY_ID,max(id) maxId
- from z_approval
- <if test="condition.type != null and condition.type != '' ">
- where type = #{condition.type}
- </if>
- and del_flag = 0
- AND IS_WITHDRAW IS NULL
- GROUP BY APPLY_ID
- ) temp )
- )
- )
- </if>
- <!--已审核-->
- <if test="condition.pageType != null and condition.pageType == 'done'">
- and a.id in (
- SELECT DISTINCT APPLY_ID FROM z_approval WHERE
- (
- (
- CHECKER = #{condition.userId}
- or
- CHECKER LIKE CONCAT(CONCAT(#{condition.userId},','), '%')
- or
- CHECKER LIKE CONCAT(CONCAT('%,',#{condition.userId}), ',%')
- )
- <if test=" condition.checker_ids!=null ">OR ( CHECKER in
- <foreach
- collection="condition.checker_ids" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- )
- </if>
- )
- AND IS_WITHDRAW IS NULL
- )
- </if>
- order by a.create_time DESC
- </select>
- </mapper>
|