linwe
2024-09-03 764d883b5ea3bdc06abbec548b6df0511e567978
src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcCallEventTwoMapper.xml
@@ -8,7 +8,7 @@
    <select id="selectECallEventTwoPage" resultMap="eCallEventTwoResultMap">
        select * from jczz_e_call_event_two
        select jecet.* from jczz_e_call_event_two jecet
        <where>
            <if test="eCallEventTwo.orderId != null "> and order_id = #{eCallEventTwo.orderId}</if>
            <if test="eCallEventTwo.orderCode != null  and eCallEventTwo.orderCode != ''"> and order_code like concat('%',#{eCallEventTwo.orderCode},'%') </if>
@@ -44,16 +44,85 @@
            <if test="eCallEventTwo.directFeed != null  and eCallEventTwo.directFeed != ''"> and direct_feed = #{eCallEventTwo.directFeed}</if>
            <if test="eCallEventTwo.directFeedHandler != null  and eCallEventTwo.directFeedHandler != ''"> and direct_feed_handler = #{eCallEventTwo.directFeedHandler}</if>
            <if test="eCallEventTwo.directFeedTime != null "> and direct_feed_time = #{eCallEventTwo.directFeedTime}</if>
            <if test="eCallEventTwo.images != null  and eCallEventTwo.images != ''"> and images = #{eCallEventTwo.images}</if>
            <if test="eCallEventTwo.status != null  and eCallEventTwo.status != ''"> and status = #{eCallEventTwo.status}</if>
            <if test="eCallEventTwo.tagApply != null  and eCallEventTwo.tagApply != ''"> and tag_apply = #{eCallEventTwo.tagApply}</if>
            <if test="eCallEventTwo.tagDelay != null  and eCallEventTwo.tagDelay != ''"> and tag_delay = #{eCallEventTwo.tagDelay}</if>
            <if test="eCallEventTwo.tagDoing != null  and eCallEventTwo.tagDoing != ''"> and tag_doing = #{eCallEventTwo.tagDoing}</if>
            <if test="eCallEventTwo.tagResp != null  and eCallEventTwo.tagResp != ''"> and tag_resp = #{eCallEventTwo.tagResp}</if>
            <if test="eCallEventTwo.tagDone != null  and eCallEventTwo.tagDone != ''"> and tag_done = #{eCallEventTwo.tagDone}</if>
            <if test="eCallEventTwo.tagCheck != null  and eCallEventTwo.tagCheck != ''"> and tag_check = #{eCallEventTwo.tagCheck}</if>
            <if test="eCallEventTwo.tagChkTel != null  and eCallEventTwo.tagChkTel != ''"> and tag_chk_tel = #{eCallEventTwo.tagChkTel}</if>
            <if test="eCallEventTwo.tagRedo != null  and eCallEventTwo.tagRedo != ''"> and tag_redo = #{eCallEventTwo.tagRedo}</if>
            <if test="eCallEventTwo.images != null  and eCallEventTwo.images != ''">and images =
                #{eCallEventTwo.images}
            </if>
            <if test="eCallEventTwo.status != null  and eCallEventTwo.status != ''">and status =
                #{eCallEventTwo.status}
            </if>
            <if test="eCallEventTwo.tagApply != null  and eCallEventTwo.tagApply != ''">and tag_apply =
                #{eCallEventTwo.tagApply}
            </if>
            <if test="eCallEventTwo.tagDelay != null  and eCallEventTwo.tagDelay != ''">and tag_delay =
                #{eCallEventTwo.tagDelay}
            </if>
            <if test="eCallEventTwo.tagDoing != null  and eCallEventTwo.tagDoing != ''">and tag_doing =
                #{eCallEventTwo.tagDoing}
            </if>
            <if test="eCallEventTwo.tagResp != null  and eCallEventTwo.tagResp != ''">and tag_resp =
                #{eCallEventTwo.tagResp}
            </if>
            <if test="eCallEventTwo.tagDone != null  and eCallEventTwo.tagDone != ''">and tag_done =
                #{eCallEventTwo.tagDone}
            </if>
            <if test="eCallEventTwo.tagCheck != null  and eCallEventTwo.tagCheck != ''">and tag_check =
                #{eCallEventTwo.tagCheck}
            </if>
            <if test="eCallEventTwo.tagChkTel != null  and eCallEventTwo.tagChkTel != ''">and tag_chk_tel =
                #{eCallEventTwo.tagChkTel}
            </if>
            <if test="eCallEventTwo.tagRedo != null  and eCallEventTwo.tagRedo != ''">and tag_redo =
                #{eCallEventTwo.tagRedo}
            </if>
            <if test="isAdministrator==2">
                <choose>
                    <when test="eCallEventTwo.roleName != null and eCallEventTwo.roleName != ''">
                        <if test="eCallEventTwo.roleName=='wgy'">
                            <choose>
                                <when test="gridCodeList !=null and gridCodeList.size()>0">
                                    and jecet.grid_code in
                                    <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and jecet.grid_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                        <if test="eCallEventTwo.roleName=='mj'">
                            <choose>
                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                    and jecet.jw_grid_code in
                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")"
                                             separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and jecet.jw_grid_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                    </when>
                    <otherwise>
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and
                                (
                                jecet.grid_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                                )
                            </when>
                            <otherwise>
                                and  ( jecet.grid_code in ('')  )
                            </otherwise>
                        </choose>
                    </otherwise>
                </choose>
            </if>
        </where>
        order by order_id desc
    </select>