forked from gzzfw/backEnd/gz-dyh

huangh
2024-09-26 229cdb3d5692219b8ddd3ebcf13873d3a0bc703a
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"/>
@@ -28,7 +29,7 @@
            <result property="auditTime" column="audit_time"/>
            <result property="auditResult" column="audit_result"/>
            <result property="auditResultName" column="audit_result_name"/>
            <result property="audit_content" column="audit__content"/>
            <result property="auditContent" column="audit_content"/>
            <result property="deleteStatus" column="delete_status"/>
            <result property="custId" column="cust_id"/>
            <result property="createTime" column="create_time"/>
@@ -48,6 +49,7 @@
        return_time,
        return_status,
        case_task_id,
        case_task_type,
        audit_unit_id,
        audit_unit_name,
        audit_user_id,
@@ -55,7 +57,7 @@
        audit_time,
        audit_result,
        audit_result_name,
        audit__content,
        audit_content,
        delete_status,
        cust_id,
        create_time,
@@ -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>
@@ -79,7 +82,7 @@
            <if test="entity.auditTime != null">audit_time = #{entity.auditTime},</if>
            <if test="entity.auditResult != null">audit_result = #{entity.auditResult},</if>
            <if test="entity.auditResultName != null">audit_result_name = #{entity.auditResultName},</if>
            <if test="entity.audit_content != null">audit__content = #{entity.audit_content},</if>
            <if test="entity.auditContent != null">audit_content = #{entity.auditContent},</if>
            <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
            <if test="entity.custId != null">cust_id = #{entity.custId},</if>
            <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
@@ -119,6 +122,9 @@
                <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}
                </if>
@@ -140,8 +146,8 @@
                <if test="terms.auditResultName != null and terms.auditResultName !=''">
                    and audit_result_name = #{terms.auditResultName}
                </if>
                <if test="terms.audit_content != null and terms.audit_content !=''">
                    and audit__content = #{terms.audit_content}
                <if test="terms.auditContent != null and terms.auditContent !=''">
                    and audit_content = #{terms.auditContent}
                </if>
                <if test="terms.deleteStatus = null and terms.deleteStatus =''">
                    and delete_status = 0
@@ -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 ">