马宇豪
2023-08-25 aa2051a2327c079105110f5424f3a44ffaa0c7bb
src/main/resources/mybatis/doublePrevention/PreventRiskJobAndMeasureMapper.xml
@@ -26,6 +26,10 @@
        where job_id = #{jobId}
        limit 1
    </select>
    <select id="getJobAndMeasureListByJobId" resultMap="BaseResultMap">
        select * from prevent_risk_job_and_measure
        where job_id = #{jobId}
    </select>
<!--    int deleteJobAndMeasure(Long jobId);-->
    <delete id="deleteJobAndMeasure">
@@ -34,4 +38,33 @@
    </delete>
<!--    PreventRiskJobAndMeasure getJobAndMeasure(Long jobId);-->
<!--    List<PreventRiskJobAndMeasure> listReportWork();-->
    <select id="listReportWork" resultMap="BaseResultMap">
        select * from prevent_risk_job_and_measure
        where report_switch = 0 and (update_report_data_time > report_time or report_time is null)
    </select>
<!--    List<PreventRiskJobAndMeasure> getMeasureListByJobId(Long jobId);-->
    <select id="getMeasureListByJobId" resultMap="BaseResultMap">
        select * from prevent_risk_job_and_measure
        where job_id = #{jobId}
    </select>
<!--    int updateWorkReportStatus(HandlerReportParam handlerReportParam);-->
    <update id="updateWorkReportStatus">
        update prevent_risk_job_and_measure set
            report_status =  #{reportStatus},
            report_time = #{reportTime}
        where id = #{id}
    </update>
    <!--    List<PreventRiskJobAndMeasure> listReportWork();-->
    <select id="listReportWorkTest" resultMap="BaseResultMap">
        select * from prevent_risk_job_and_measure
<!--        where job_id in (43,47,50,53,56,59,63,65,68,71,75,77,81)-->
<!--        where job_id in (44,46,49,52,55,58,61,64,67,70,73,76,79)-->
        where job_id in (45,48,51,54,57,60,62,66,69,72,74,78,80)
    </select>
</mapper>