| | |
| | | AND dam_id = #{vo.damId} |
| | | </select> |
| | | <select id="getAlarmDetailPage" resultType="cn.gistack.nky.vo.AlarmGetVO"> |
| | | SELECT * FROM NKY_ALARM_GET |
| | | SELECT |
| | | ID,DAM_ID,POINT_ID,TYPE, |
| | | ( |
| | | CASE |
| | | WHEN TYPE=1 THEN '渗压' |
| | | WHEN TYPE=2 THEN '渗流' |
| | | WHEN (TYPE=3 OR TYPE=4 OR TYPE=5) THEN '位移' |
| | | END) AS typeName, |
| | | "TIME","VALUE","DESC",CREATE_TIME,TASK_CATEGORY,"LEVEL",BAOJINGZHI,ORIGIN_ID,FORWARD,"REVERSE",RATIO,STATUS |
| | | |
| | | FROM YWXT.NKY_ALARM_GET |
| | | WHERE 1=1 |
| | | <if test="vo.startTime != null and vo.startTime != ''"> |
| | | AND DATE_FORMAT(time,'%Y-%m-%d') >= #{vo.startTime} |
| | |
| | | <if test="vo.status != null and vo.status !='' "> |
| | | AND status = #{vo.status} |
| | | </if> |
| | | <if test="vo.type != null and vo.type !='' "> |
| | | <if test="vo.type != null and vo.type !='' and vo.type == 1 "> |
| | | AND type = #{vo.type} |
| | | </if> |
| | | <if test="vo.type != null and vo.type !='' and vo.type == 2"> |
| | | AND type = #{vo.type} |
| | | </if> |
| | | <if test="vo.type != null and vo.type !='' and vo.type == 3"> |
| | | AND (type = '3' or type = '4' or type = '5') |
| | | </if> |
| | | <if test="vo.pointId != null and vo.pointId !='' "> |
| | | AND POINT_id = #{vo.pointId} |
| | | </if> |