| | |
| | | </if> |
| | | ORDER BY sdr.create_time DESC |
| | | </select> |
| | | <select id="getDayList" resultType="cn.gistack.sm.jcsb.vo.DbReportVO"> |
| | | |
| | | SELECT |
| | | SDR.ID,SDR.RESERVOIR_NAME, |
| | | SDR.RESERVOIR_ID, |
| | | SDR.TYPE, |
| | | SDR.STATION_ID,acb.stationName, |
| | | DATE_FORMAT(sdr.record_time,'%Y-%m-%d') AS record_time, |
| | | SDR.VAL,SDR.DE_VAL,SDR.DN_VAL,SDR.DU_VAL |
| | | FROM SM_DB_REPORT SDR |
| | | LEFT JOIN SJZT_MD."att_cd_base" acb ON acb."res_cd" = sdr.reservoir_id and acb."cd" = SDR.station_id |
| | | WHERE SDR.IS_DELETED = 0 |
| | | <if test="vo.type != null and vo.type != ''"> |
| | | AND SDR.TYPE = #{vo.type} |
| | | </if> |
| | | <if test="db.startTime !=null and db.startTime !=''"> |
| | | AND DATE_FORMAT(sdr.record_time,'%Y-%m-%d') >= #{db.startTime} |
| | | </if> |
| | | <if test="db.endTime !=null and db.endTime !=''"> |
| | | AND DATE_FORMAT(sdr.record_time,'%Y-%m-%d') <= #{db.endTime} |
| | | </if> |
| | | <if test="vo.ch != null and vo.ch != ''"> |
| | | AND acb."ch" = #{vo.ch} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | <select id="getRecordTimeData" resultType="cn.gistack.sm.jcsb.entity.DbReport"> |
| | | |
| | | SELECT * FROM SM_DB_REPORT |
| | | WHERE |
| | | is_deleted = 0 |
| | | AND RESERVOIR_ID = #{entity.reservoirId} |
| | | AND type = #{entity.type} |
| | | AND station_id = #{entity.stationId} |
| | | AND DATE_FORMAT(record_time,'%Y-%m-%d') = DATE_FORMAT(#{entity.recordTime},'%Y-%m-%d') |
| | | |
| | | </select> |
| | | </mapper> |