| | |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="extPage" resultType="com.moral.api.pojo.ext.allocation.AllocationPageExt"> |
| | | SELECT |
| | | <include refid="Allocation_Column_List"/>,t1.id as applyState |
| | |
| | | left join allocation_extension t1 on t1.allocation_id = allocation.allocation_id and t1.is_del =0 and t1.is_invalid = 0 and t1.state = 30 |
| | | <where> |
| | | 1 = 1 and allocation.is_del = 0 |
| | | <if test="allocation.unitId != null"> |
| | | and allocation.unit_id = #{allocation.unitId} |
| | | <if test="allocation.unitId != null and allocation.unitId.size != 0"> |
| | | and allocation.unit_id in |
| | | <foreach collection="allocation.unitId" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="allocation.polluteType != null and allocation.polluteType != 0"> |
| | | and allocation.pollute_type = #{allocation.polluteType} |
| | | <if test="allocation.polluteType != null and allocation.polluteType.size != 0"> |
| | | and allocation.pollute_type in |
| | | <foreach collection="allocation.polluteType" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="allocation.state != null and allocation.state != 0"> |
| | | and allocation.state = #{allocation.state} |
| | | <if test="allocation.state != null and allocation.state.size != 0"> |
| | | and allocation.state in |
| | | <foreach collection="allocation.state" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="allocation.investigationType != null and allocation.investigationType != 0"> |
| | | and allocation.investigation_type = #{allocation.investigationType} |
| | |
| | | </where> |
| | | order by allocation.escalation_time desc,allocation.allocation_id desc |
| | | </select> |
| | | |
| | | <select id="extAppPage" resultType="com.moral.api.pojo.ext.allocation.AllocationPageExt"> |
| | | SELECT |
| | | <include refid="Allocation_Column_List"/> |
| | | FROM allocation allocation |
| | | <where> |
| | | 1 = 1 and allocation.is_del = 0 |
| | | <if test="allocation.startTime != null and allocation.startTime != '' "> |
| | | and date(allocation.escalation_time) <![CDATA[>=]]> #{allocation.startTime} |
| | | </if> |
| | | <if test="allocation.endTime != null and allocation.endTime !='' "> |
| | | and date(allocation.escalation_time) <![CDATA[<=]]> #{allocation.endTime} |
| | | </if> |
| | | <if test="allocation.stateList != null and allocation.stateList.size !=0"> |
| | | and allocation.state in |
| | | <foreach collection="allocation.stateList" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | |
| | | </if> |
| | | <if test="allocation.unitList != null and allocation.unitList.size !=0"> |
| | | and allocation.unit_id in |
| | | <foreach collection="allocation.unitList" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | order by allocation.escalation_time desc,allocation.allocation_id desc |
| | | </select> |
| | | </mapper> |