cjl
2023-09-28 54596f54e147492009daa112ab89a6bcd7bf33a5
screen-api/src/main/resources/mapper/AllocationExtensionMapper.xml
@@ -25,8 +25,10 @@
    <select id="extOne" resultType="com.moral.api.pojo.ext.allocationextension.AllocationExtensionExt">
        SELECT
        <include refid="AllocationExtension_Column_List"/>
        <include refid="AllocationExtension_Column_List"/>,
        t1.allocation_num,t1.escalation_time,t1.unit_id,t1.pollute_type,t1.change_type,t1.change_day,t1.escalation_unit_id,t1.escalation_name
        FROM allocation_extension allocationextension
        left join allocation t1 on allocationextension.allocation_id = t1.allocation_id
        where allocationextension.id = #{id} and allocationextension.is_del = 0
    </select>
@@ -47,7 +49,7 @@
                and t1.pollute_type = #{allocation.polluteType}
            </if>
            <if test="allocation.state != null and allocation.state != 0">
                and t1.state = #{allocation.state}
                and allocationextension.state = #{allocation.state}
            </if>
            <if test="allocation.investigationType != null and allocation.investigationType != 0">
                and t1.investigation_type = #{allocation.investigationType}
@@ -62,6 +64,15 @@
            <if test="allocation.endTime != null and allocation.endTime !='' ">
                and date(t1.escalation_time) <![CDATA[<=]]>  #{allocation.endTime}
            </if>
            <if test="allocation.allocationNum != null and allocation.allocationNum !='' ">
                and allocation.allocation_num LIKE CONCAT('%',#{allocation.allocationNum},'%')
            </if>
            <if test="allocation.unitList != null and allocation.unitList.size !=0">
                and t1.unit_id in
                <foreach collection="allocation.unitList" item="id" index="index" open="(" close=")" separator=",">
                    #{id}
                </foreach>
            </if>
        </where>
        order by t1.escalation_time desc,t1.allocation_id desc