| | |
| | | <result property="desinfo" column="desinfo"/> |
| | | <result property="type" column="type"/> |
| | | <result property="toUser" column="to_user"/> |
| | | <result property="reportUser" column="reportUser"/> |
| | | <result property="toImages" column="to_images" typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/> |
| | | <result property="toDesinfo" column="to_desinfo"/> |
| | | <result property="status" column="status"/> |
| | |
| | | <result property="isDeleted" column="is_deleted"/> |
| | | <result property="reservoirId" column="reservoir_id"/> |
| | | <result property="reservoirName" column="reservoirName"/> |
| | | <result property="toUserName" column="toUserName"/> |
| | | </resultMap> |
| | | |
| | | <select id="getAll" resultMap="vo"> |
| | | SELECT SDR.*,arb."name" reservoirName FROM SM_DANGER_REPORT SDR |
| | | SELECT SDR.*,arb."name" reservoirName FROM SM_DANGER_REPORT SDR |
| | | LEFT JOIN "SJZT_MD"."att_res_base" arb ON arb."guid" = SDR.RESERVOIR_ID |
| | | WHERE SDR.IS_DELETED = 0 |
| | | <if test="dangerReport.toUser !=null and dangerReport.toUser !=''"> |
| | |
| | | AND SDR.status = #{dangerReport.status} |
| | | </if> |
| | | </select> |
| | | <select id="selectRecordPage" resultMap="vo"> |
| | | SELECT R.*, |
| | | arb."name" AS reservoirName, |
| | | U.REAL_NAME AS toUserName, |
| | | U2.REAL_NAME AS reportUser FROM SM_DANGER_REPORT R |
| | | LEFT JOIN BLADE_USER U ON U.ID = R.TO_USER |
| | | LEFT JOIN BLADE_USER U2 ON U2.ID = R.CREATE_USER |
| | | LEFT JOIN SJZT_MD."att_res_base" arb ON arb."guid" = R.RESERVOIR_ID |
| | | WHERE R.IS_DELETED = 0 |
| | | <if test="dangerReportVO.reservoirName != null and dangerReportVO.reservoirName !=''"> |
| | | AND arb."name" LIKE CONCAT('%',#{dangerReportVO.reservoirName},'%') |
| | | </if> |
| | | <if test="dangerReportVO.toUser != null and dangerReportVO.toUser !=''"> |
| | | AND r.to_user = #{dangerReportVO.toUser} |
| | | </if> |
| | | <if test="dangerReportVO.status != null and dangerReportVO.status !=''"> |
| | | AND r.status = #{dangerReportVO.status} |
| | | </if> |
| | | </select> |
| | | </mapper> |