广州市综治平台后端
zhouxiantao
9 days ago 93430938a25ab3d4e218a2198ae1b24a516f6382
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseSuperviseMapper.xml
@@ -318,9 +318,17 @@
        <if test="terms.type != 3">
            and t1.quilt_unit_id = #{terms.quiltUnitId}
            and t1.sup_status = #{terms.supStatus}
            <if test="terms.handleTimeStart != null and terms.handleTimeStart !='' and terms.handleTimeEnd != null and terms.handleTimeEnd !=''">
                and (DATE_FORMAT(t1.reply_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.handleTimeStart}
                and DATE_FORMAT(t1.reply_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.handleTimeEnd})
            </if>
        </if>
        <if test="terms.type == 3">
            and t1.sup_unit_id = #{terms.supUnitId}
            <if test="terms.handleTimeStart != null and terms.handleTimeStart !='' and terms.handleTimeEnd != null and terms.handleTimeEnd !=''">
                and (DATE_FORMAT(t1.sup_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.handleTimeStart}
                and DATE_FORMAT(t1.sup_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.handleTimeEnd})
            </if>
        </if>
        <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''">
            and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart}
@@ -328,6 +336,27 @@
        </if>
        <if test="terms.partyName != null and terms.partyName !=''">
            and (concat_ws('', ifnull(t2.plaintiffs, ''), ifnull(t2.pagents, ''), ifnull(t2.defendants, ''), ifnull(t2.dagents, '')) like concat('%', #{terms.partyName}, '%') or t2.case_ref like concat('%', #{terms.partyName}, '%'))
        </if>
        <if test="terms.caseType != null and terms.caseType !=''">
            and t2.case_type = #{terms.caseType}
        </if>
        <if test="terms.plaintiffs != null and terms.plaintiffs !=''">
            and t2.plaintiffs like concat('%', #{terms.plaintiffs}, '%')
        </if>
        <if test="terms.defendants != null and terms.defendants !=''">
            and t2.defendants like concat('%', #{terms.defendants}, '%')
        </if>
        <if test="terms.canal != null and terms.canal !=''">
            and t2.canal = #{terms.canal}
        </if>
        <if test="terms.caseStatus != null and terms.caseStatus !=''">
            and t2.status = #{terms.caseStatus}
        </if>
        <if test="terms.caseLevel != null and terms.caseLevel !=''">
            and t2.case_level = #{terms.caseLevel}
        </if>
        <if test="terms.mediResult != null and terms.mediResult !=''">
            and t3.medi_result = #{terms.mediResult}
        </if>
    </select>
@@ -346,9 +375,17 @@
        <if test="terms.type != 3">
            and t1.quilt_unit_id = #{terms.quiltUnitId}
            and t1.sup_status = #{terms.supStatus}
            <if test="terms.handleTimeStart != null and terms.handleTimeStart !='' and terms.handleTimeEnd != null and terms.handleTimeEnd !=''">
                and (DATE_FORMAT(t1.reply_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.handleTimeStart}
                and DATE_FORMAT(t1.reply_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.handleTimeEnd})
            </if>
        </if>
        <if test="terms.type == 3">
            and t1.sup_unit_id = #{terms.supUnitId}
            <if test="terms.handleTimeStart != null and terms.handleTimeStart !='' and terms.handleTimeEnd != null and terms.handleTimeEnd !=''">
                and (DATE_FORMAT(t1.sup_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.handleTimeStart}
                and DATE_FORMAT(t1.sup_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.handleTimeEnd})
            </if>
        </if>
        <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''">
            and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart}
@@ -357,6 +394,27 @@
        <if test="terms.partyName != null and terms.partyName !=''">
            and (concat_ws('', ifnull(t2.plaintiffs, ''), ifnull(t2.pagents, ''), ifnull(t2.defendants, ''), ifnull(t2.dagents, '')) like concat('%', #{terms.partyName}, '%') or t2.case_ref like concat('%', #{terms.partyName}, '%'))
        </if>
        <if test="terms.caseType != null and terms.caseType !=''">
            and t2.case_type = #{terms.caseType}
        </if>
        <if test="terms.plaintiffs != null and terms.plaintiffs !=''">
            and t2.plaintiffs like concat('%', #{terms.plaintiffs}, '%')
        </if>
        <if test="terms.defendants != null and terms.defendants !=''">
            and t2.defendants like concat('%', #{terms.defendants}, '%')
        </if>
        <if test="terms.canal != null and terms.canal !=''">
            and t2.canal = #{terms.canal}
        </if>
        <if test="terms.caseStatus != null and terms.caseStatus !=''">
            and t2.status = #{terms.caseStatus}
        </if>
        <if test="terms.caseLevel != null and terms.caseLevel !=''">
            and t2.case_level = #{terms.caseLevel}
        </if>
        <if test="terms.mediResult != null and terms.mediResult !=''">
            and t3.medi_result = #{terms.mediResult}
        </if>
        <if test="page.sort != null">
            <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
                isnull(${s.property}), ${s.property} ${s.direction}