forked from gzzfw/backEnd/gz-dyh

dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseReturnMapper.xml
@@ -21,6 +21,7 @@
            <result property="returnTime" column="return_time"/>
            <result property="returnStatus" column="return_status"/>
            <result property="caseTaskId" column="case_task_id"/>
            <result property="caseTaskType" column="case_task_type"/>
            <result property="auditUnitId" column="audit_unit_id"/>
            <result property="auditUnitName" column="audit_unit_name"/>
            <result property="auditUserId" column="audit_user_id"/>
@@ -48,6 +49,7 @@
        return_time,
        return_status,
        case_task_id,
        case_task_type,
        audit_unit_id,
        audit_unit_name,
        audit_user_id,
@@ -72,6 +74,7 @@
            <if test="entity.returnTime != null">return_time = #{entity.returnTime},</if>
            <if test="entity.returnStatus != null">return_status = #{entity.returnStatus},</if>
            <if test="entity.caseTaskId != null">case_task_id = #{entity.caseTaskId},</if>
            <if test="entity.caseTaskType != null">case_task_type = #{entity.caseTaskType},</if>
            <if test="entity.auditUnitId != null">audit_unit_id = #{entity.auditUnitId},</if>
            <if test="entity.auditUnitName != null">audit_unit_name = #{entity.auditUnitName},</if>
            <if test="entity.auditUserId != null">audit_user_id = #{entity.auditUserId},</if>
@@ -118,6 +121,9 @@
                </if>
                <if test="terms.caseTaskId != null and terms.caseTaskId !=''">
                    and case_task_id = #{terms.caseTaskId}
                </if>
                <if test="terms.caseTaskType != null and terms.caseTaskType !=''">
                    and case_task_type = #{terms.caseTaskType}
                </if>
                <if test="terms.auditUnitId != null and terms.auditUnitId !=''">
                    and audit_unit_id = #{terms.auditUnitId}
@@ -261,6 +267,8 @@
        <result property="backUnit" column="backUnit"/>
        <result property="reason" column="reason"/>
        <result property="opinion" column="opinion"/>
        <result property="auditTime" column="auditTime"/>
        <result property="auditResult" column="auditResult"/>
    </resultMap>
    <!--  首页-待审核统计  -->
@@ -278,15 +286,15 @@
            and DATE_FORMAT(t1.return_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd})
        </if>
        <if test="terms.partyName != null and terms.partyName !=''">
            and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%')
            and concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%')
        </if>
    </select>
    <!--  首页-待审核条件统计  -->
    <select id="pageMyTaskReturnReview" resultMap="MyTaskApplyReviewResult">
        SELECT t1.case_task_id as ownerId, t1.case_id as caseId,
        SELECT t1.case_task_id as ownerId, t1.case_id as caseId, t1.audit_time as auditTime, t1.audit_result_name as auditResult,
        t1.return_time as turnaroundTime, t1.return_unit_name as organizingUnit, t1.return_content as reason,
               t2.case_level as caseGrade, t2.canal_name as caseSource, t2.case_type_name as caseType,
               t2.case_level as caseGrade, t2.canal_name as caseSource, concat(t2.case_type_first_name, '/' ,t2.case_type_name) as caseType,
               concat(t2.plaintiffs, t2.pagents) as plaintiffs, concat(t2.defendants, t2.dagents) as defendants
        FROM
        dyh_case_return t1 left join dyh_case_info t2 on t1.case_id = t2.id
@@ -299,7 +307,7 @@
            and DATE_FORMAT(t1.return_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd})
        </if>
        <if test="terms.partyName != null and terms.partyName !=''">
            and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%')
            and concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%')
        </if>
        <if test="page.sort != null">
            <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">