From b5b6b59de8f5349de1e36875582224f2712e0727 Mon Sep 17 00:00:00 2001 From: jinpengyong <jpy123456> Date: Tue, 14 Nov 2023 10:13:27 +0800 Subject: [PATCH] chore:补充提交 --- screen-api/src/main/resources/mapper/AllocationMapper.xml | 51 +++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 45 insertions(+), 6 deletions(-) diff --git a/screen-api/src/main/resources/mapper/AllocationMapper.xml b/screen-api/src/main/resources/mapper/AllocationMapper.xml index 7562062..098ebda 100644 --- a/screen-api/src/main/resources/mapper/AllocationMapper.xml +++ b/screen-api/src/main/resources/mapper/AllocationMapper.xml @@ -59,6 +59,7 @@ </where> </select> + <select id="extPage" resultType="com.moral.api.pojo.ext.allocation.AllocationPageExt"> SELECT <include refid="Allocation_Column_List"/>,t1.id as applyState @@ -66,14 +67,23 @@ 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} @@ -103,4 +113,33 @@ </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> -- Gitblit v1.8.0