双重预防项目-国泰新华二开定制版
heheng
3 天以前 8e3dd5851dcedef5b21858dc1cfd5d11f1965ce6
src/main/resources/mybatis/doublePrevention/PreventCJReportCheckRecordFromTaskMapper.xml
@@ -1,80 +1,120 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.ruoyi.doublePrevention.repository.PreventCJReportCheckRecordFromTaskRepository">
    <resultMap id="BaseResultMap" type="com.ruoyi.doublePrevention.entity.CJReport.PreventCJReportCheckRecordFromTask">
        <id column="index_id"  property="indexId"/>
        <result column="id" property="id"/>
        <result column="company_code" property="companyCode"/>
        <result column="deleted" property="deleted"/>
        <result column="create_date" property="createDate"/>
        <result column="create_by" property="createBy"/>
        <result column="update_date" property="updateDate"/>
        <result column="update_by" property="updateBy"/>
        <result column="report_status" property="reportStatus"/>
        <result column="report_time" property="reportTime"/>
        <result column="data_source" property="dataSource"/>
        <result column="check_task_id" property="checkTaskId"/>
        <result column="check_status" property="checkStatus"/>
        <result column="check_time" property="checkTime"/>
        <result column="create_by_mobile" property="createByMobile"/>
        <result column="update_by_mobile" property="updateByMobile"/>
        <result column="task_id" property="taskId"/>
        <result column="mobile_code" property="mobileCode"/>
        <result column="defend" property="defend"/>
    </resultMap>
    <!--IPage<PreventReportCheckRecordFromTask> getReportTaskFromWorkPage(Page<Object> objectPage, PreventReportCheckRecordFromTaskReqDTO queryReqDTO);-->
    <select id="getReportTaskFromWorkPage" resultMap="BaseResultMap">
        select * from prevent_cj_report_check_record_from_task
        order by create_by desc
    </select>
    <!--List<PreventReportCheckRecordFromTask> listReportTaskRecordDate();-->
    <select id="listReportTaskRecordDate" resultMap="BaseResultMap">
        select * from prevent_cj_report_check_record_from_task
        where report_status = 1
        limit 200
    </select>
    <!--int updateTaskReportStatus(HandlerReportParam handlerReportParam);-->
    <update id="updateTaskReportStatus">
        update prevent_cj_report_check_record_from_task set
            report_status =  #{reportStatus},
            report_time = #{reportTime}
        where task_id = #{id}
    </update>
    <!--int updateCJReportStatusById(HandlerCJReportParam handlerCJReportParam);-->
    <update id="updateCJReportStatusById">
        update prevent_cj_report_check_record_from_task set
        report_status =  #{reportStatus},
        report_time = #{reportTime}
        where id = #{id}
    </update>
<!--    int insertRecord(PreventCJReportCheckRecordFromTask recordFromTasks);-->
    <insert id="insertRecord">
        insert into prevent_cj_report_check_record_from_task
        values(null, #{id}, #{companyCode}, #{deleted}, #{createDate}, #{createBy}, #{updateDate}, #{updateBy}
        , #{checkTaskId}, #{checkStatus}, #{checkTime}, #{createByMobile}, #{updateByMobile}
        , #{reportStatus}, #{reportTime}, #{dataSource}, #{taskId}
        , #{mobileCode}, #{defend})
    </insert>
    <insert id="insertRecordList">
        insert into prevent_cj_report_check_record_from_task
            (index_id, id, company_code, deleted, create_date, create_by, update_date, update_by,
             report_status, report_time,data_source, check_task_id, check_status, check_time,
             create_by_mobile, update_by_mobile, task_id, mobile_code, defend)
        values
        <foreach collection="list" item="record" separator=",">
            (null, #{record.id}, #{record.companyCode}, #{record.deleted}, #{record.createDate}, #{record.createBy}, #{record.updateDate},#{record.updateBy},
            #{record.reportStatus}, #{record.reportTime}, #{record.dataSource}, #{record.checkTaskId}, #{record.checkStatus}, #{record.checkTime},
            #{record.createByMobile}, #{record.updateByMobile}, #{record.taskId}, #{record.mobileCode}, #{record.defend})
        </foreach>
    </insert>
</mapper>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.ruoyi.doublePrevention.repository.PreventCJReportCheckRecordFromTaskRepository">
    <resultMap id="BaseResultMap" type="com.ruoyi.doublePrevention.entity.CJReport.PreventCJReportCheckRecordFromTask">
        <id column="index_id"  property="indexId"/>
        <result column="id" property="id"/>
        <result column="company_code" property="companyCode"/>
        <result column="deleted" property="deleted"/>
        <result column="create_date" property="createDate"/>
        <result column="create_by" property="createBy"/>
        <result column="update_date" property="updateDate"/>
        <result column="update_by" property="updateBy"/>
        <result column="report_status" property="reportStatus"/>
        <result column="report_time" property="reportTime"/>
        <result column="data_source" property="dataSource"/>
        <result column="check_task_id" property="checkTaskId"/>
        <result column="check_status" property="checkStatus"/>
        <result column="check_time" property="checkTime"/>
        <result column="create_by_mobile" property="createByMobile"/>
        <result column="update_by_mobile" property="updateByMobile"/>
        <result column="task_id" property="taskId"/>
        <result column="mobile_code" property="mobileCode"/>
        <result column="defend" property="defend"/>
    </resultMap>
    <!--IPage<PreventReportCheckRecordFromTask> getReportTaskFromWorkPage(Page<Object> objectPage, PreventReportCheckRecordFromTaskReqDTO queryReqDTO);-->
    <select id="getReportTaskFromWorkPage" resultMap="BaseResultMap">
        select * from prevent_cj_report_check_record_from_task
        order by create_by desc
    </select>
    <!--List<PreventReportCheckRecordFromTask> listReportTaskRecordDate();-->
    <select id="listReportTaskRecordDate" resultMap="BaseResultMap">
        select * from prevent_cj_report_check_record_from_task
        where report_status = 1
        limit 60
    </select>
    <!--int updateTaskReportStatus(HandlerReportParam handlerReportParam);-->
    <update id="updateTaskReportStatus">
        update prevent_cj_report_check_record_from_task set
            report_status =  #{reportStatus},
            report_time = #{reportTime}
        where task_id = #{id}
    </update>
    <!--int updateCJReportStatusById(HandlerCJReportParam handlerCJReportParam);-->
    <update id="updateCJReportStatusById">
        update prevent_cj_report_check_record_from_task set
        report_status =  #{reportStatus},
        report_time = #{reportTime}
        where id = #{id}
    </update>
    <select id="listReportTaskRecordDateHuaiDong" resultMap="BaseResultMap">
        select * from prevent_cj_report_check_record_from_task
        where zhun_report_status = 1 and deleted = 0
            limit 50
<!--  and create_date &gt;= '2025-06-15 00:00:00' and create_date &lt;= '2025-06-16 23:59:59'-->
    </select>
    <update id="updateHDReportStatusById">
        update prevent_cj_report_check_record_from_task set
                                                            zhun_report_status =  #{zhunReportStatus},
                                                            zhun_report_time = #{zhunReportTime}
        where id = #{id}
    </update>
<!--    int insertRecord(PreventCJReportCheckRecordFromTask recordFromTasks);-->
    <insert id="insertRecord">
        insert into prevent_cj_report_check_record_from_task
        values(null, #{id}, #{companyCode}, #{deleted}, #{createDate}, #{createBy}, #{updateDate}, #{updateBy}
        , #{checkTaskId}, #{checkStatus}, #{checkTime}, #{createByMobile}, #{updateByMobile}
        , #{reportStatus}, #{reportTime}, #{dataSource}, #{taskId}
        , #{mobileCode}, #{defend})
    </insert>
    <insert id="insertRecordList">
        insert into prevent_cj_report_check_record_from_task
            (index_id, id, company_code, deleted, create_date, create_by, update_date, update_by,
             report_status, report_time,data_source, check_task_id, check_status, check_time,
             create_by_mobile, update_by_mobile, task_id, mobile_code, defend, zhun_report_status, zhun_report_time)
        values
        <foreach collection="list" item="record" separator=",">
            (null, #{record.id}, #{record.companyCode}, #{record.deleted}, #{record.createDate}, #{record.createBy}, #{record.updateDate},#{record.updateBy},
            #{record.reportStatus}, null, #{record.dataSource}, #{record.checkTaskId}, #{record.checkStatus}, #{record.checkTime},
            #{record.createByMobile}, #{record.updateByMobile}, #{record.taskId}, #{record.mobileCode}, #{record.defend}, #{record.zhunReportStatus}, null)
        </foreach>
    </insert>
<!--    int updateCJReportStatusBatchById(List<PreventCJReportCheckRecordFromTask> cjRecordFromTasks);-->
    <update id="updateCJReportStatusBatchById">
        update prevent_cj_report_check_record_from_task
        <set>
            <if test="report_status != null ">
                report_status = #{reportStatus},
            </if>
            <if test="report_time != null ">
                report_time= #{reportTime},
            </if>
        </set>
        where id = #{id}
    </update>
    <update id="updateTaskReportStatusForRePushV1">
        update prevent_cj_report_check_record_from_task set id=concat(substring(id,1,length(id)-4),'ccab'),report_status=1
        where check_time &gt;= #{startTime} and check_time &lt;= #{endTime}
    </update>
    <update id="updateTaskReportStatusForRePushV2">
        update prevent_cj_report_check_record_from_task set id=concat(substring(id,1,length(id)-4),'ccab'),report_status=1
        where check_time &gt; #{startTime} and check_time &lt;= #{endTime}
    </update>
</mapper>