| | |
| | | <?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.PreventCJReportRiskAnaUnitRepository">
|
| | |
|
| | | <resultMap id="BaseResultMap" type="com.ruoyi.doublePrevention.entity.CJReport.PreventCJReportRiskAnaUnit">
|
| | | <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="risk_unit_name" property="riskUnitName"/>
|
| | | <result column="hazard_code" property="hazardCode"/>
|
| | | <result column="hazard_dep" property="hazardDep"/>
|
| | | <result column="hazard_liable_person" property="hazardLiablePerson"/>
|
| | | <result column="risk_unit_id" property="riskUnitId"/>
|
| | | </resultMap>
|
| | |
|
| | | <!--IPage<PreventRiskAnaUnit> getReportRiskUnitPage(Page<Object> page, PreReportRiskUnitQueryReqDTO queryReqDTO);-->
|
| | | <select id="getReportRiskUnitPage" resultMap="BaseResultMap">
|
| | | select * from
|
| | | prevent_cj_report_risk_ana_unit
|
| | | <where>
|
| | | 1 = 1
|
| | | <if test="queryReqDTO.riskUnitName != null">
|
| | | and liable_person_id = #{queryReqDTO.riskUnitName}
|
| | | </if>
|
| | | <if test="queryReqDTO.hazardDep != null">
|
| | | and liable_dep_id = #{queryReqDTO.hazardDep}
|
| | | </if>
|
| | | <if test="queryReqDTO.hazardLiablePerson != null">
|
| | | and risk_unit_name = #{queryReqDTO.hazardLiablePerson}
|
| | | </if>
|
| | | </where>
|
| | | </select>
|
| | |
|
| | | <!--List<PreventReportRiskAnaUnit> listReportUnitDate();-->
|
| | | <select id="listReportUnitDate" resultMap="BaseResultMap">
|
| | | select * from prevent_cj_report_risk_ana_unit
|
| | | where report_status = 1
|
| | | limit 200
|
| | | </select>
|
| | |
|
| | | <!--int updateReportStatus();-->
|
| | | <update id="updateReportStatus">
|
| | | update prevent_cj_report_risk_ana_unit set
|
| | | report_status = #{reportStatus},
|
| | | report_time = #{reportTime}
|
| | | where risk_unit_id = #{id}
|
| | | </update>
|
| | |
|
| | | <!--int updateCJReportStatusById(HandlerCJReportParam handlerCJReportParam);-->
|
| | | <update id="updateCJReportStatusById">
|
| | | update prevent_cj_report_risk_ana_unit set
|
| | | report_status = #{reportStatus},
|
| | | report_time = #{reportTime}
|
| | | where id = #{id}
|
| | | </update>
|
| | |
|
| | | <!-- int insertUnitList(PreventCJReportRiskAnaUnit unit);-->
|
| | | <insert id="insertUnitList">
|
| | | insert into prevent_cj_report_risk_ana_unit
|
| | | values(null, #{id}, #{companyCode}, #{deleted}, #{createDate}, #{createBy}, #{updateDate}, #{updateBy}
|
| | | , #{riskUnitName}, #{hazardCode}, #{hazardDep}, #{hazardLiablePerson}
|
| | | , #{reportStatus}, #{reportTime}, #{dataSource}, #{riskUnitId})
|
| | | </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.PreventCJReportRiskAnaUnitRepository"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.doublePrevention.entity.CJReport.PreventCJReportRiskAnaUnit"> |
| | | <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="risk_unit_name" property="riskUnitName"/> |
| | | <result column="hazard_code" property="hazardCode"/> |
| | | <result column="hazard_dep" property="hazardDep"/> |
| | | <result column="hazard_liable_person" property="hazardLiablePerson"/> |
| | | <result column="risk_unit_id" property="riskUnitId"/> |
| | | </resultMap> |
| | | |
| | | <!--IPage<PreventRiskAnaUnit> getReportRiskUnitPage(Page<Object> page, PreReportRiskUnitQueryReqDTO queryReqDTO);--> |
| | | <select id="getReportRiskUnitPage" resultMap="BaseResultMap"> |
| | | select * from |
| | | prevent_cj_report_risk_ana_unit |
| | | <where> |
| | | 1 = 1 |
| | | <if test="queryReqDTO.riskUnitName != null"> |
| | | and liable_person_id = #{queryReqDTO.riskUnitName} |
| | | </if> |
| | | <if test="queryReqDTO.hazardDep != null"> |
| | | and liable_dep_id = #{queryReqDTO.hazardDep} |
| | | </if> |
| | | <if test="queryReqDTO.hazardLiablePerson != null"> |
| | | and risk_unit_name = #{queryReqDTO.hazardLiablePerson} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--List<PreventReportRiskAnaUnit> listReportUnitDate();--> |
| | | <select id="listReportUnitDate" resultMap="BaseResultMap"> |
| | | select * from prevent_cj_report_risk_ana_unit |
| | | where report_status = 1 |
| | | limit 200 |
| | | </select> |
| | | |
| | | <!--int updateReportStatus();--> |
| | | <update id="updateReportStatus"> |
| | | update prevent_cj_report_risk_ana_unit set |
| | | report_status = #{reportStatus}, |
| | | report_time = #{reportTime} |
| | | where risk_unit_id = #{id} |
| | | </update> |
| | | |
| | | <!--int updateCJReportStatusById(HandlerCJReportParam handlerCJReportParam);--> |
| | | <update id="updateCJReportStatusById"> |
| | | update prevent_cj_report_risk_ana_unit set |
| | | report_status = #{reportStatus}, |
| | | report_time = #{reportTime} |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <!-- int insertUnitList(PreventCJReportRiskAnaUnit unit);--> |
| | | <insert id="insertUnitList"> |
| | | insert into prevent_cj_report_risk_ana_unit |
| | | values(null, #{id}, #{companyCode}, #{deleted}, #{createDate}, #{createBy}, #{updateDate}, #{updateBy} |
| | | , #{riskUnitName}, #{hazardCode}, #{hazardDep}, #{hazardLiablePerson} |
| | | , #{reportStatus}, #{reportTime}, #{dataSource}, #{riskUnitId}) |
| | | </insert> |
| | | |
| | | </mapper> |