| | |
| | | <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.ID, |
| | | R.create_time, |
| | | R.ENCDATA, |
| | | R.SM4IV, |
| | | R.KEYINDEXS FROM SM_DANGER_REPORT R |
| | | WHERE R.IS_DELETED = 0 |
| | | <if test="dangerReportVO.reservoirName != null and dangerReportVO.reservoirName !=''"> |
| | | AND r.reservoir_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> |
| | | <if test="dangerReportVO.createUser != null and dangerReportVO.createUser !=''"> |
| | | AND (r.create_user = #{dangerReportVO.createUser} OR r.to_user = #{dangerReportVO.createUser}) |
| | | </if> |
| | | ORDER BY R.UPDATE_TIME DESC |
| | | </select> |
| | | |
| | | <select id="getStatistics" resultType="cn.gistack.sm.jcsb.vo.StatisticsVO"> |
| | | SELECT * FROM |
| | | (SELECT COUNT(1)AS patrolCount FROM SM_PATROL_TASK WHERE PROJECT_ID =#{resGuid} AND state = 3 AND IS_DELETED = 0)p, |
| | | (SELECT COUNT(1)AS dangerCount FROM SM_DANGER_REPORT WHERE RESERVOIR_ID = #{resGuid} AND IS_DELETED = 0)SDR |
| | | </select> |
| | | </mapper> |