双重预防项目-国泰新华二开定制版
heheng
2 天以前 8e3dd5851dcedef5b21858dc1cfd5d11f1965ce6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
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 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>