| | |
| | | LEFT JOIN SJZT_MD."att_cd_base" acb ON acb."res_cd" = NAG.DAM_ID AND NAG.POINT_ID = acb."cd" |
| | | WHERE 1=1 |
| | | <if test="vo.startTime != null and vo.startTime != ''"> |
| | | AND DATE_FORMAT(time,'%Y-%m-%d') >= #{vo.startTime} |
| | | AND DATE_FORMAT(NAG.time,'%Y-%m-%d') >= #{vo.startTime} |
| | | </if> |
| | | <if test="vo.endTime != null and vo.endTime !='' "> |
| | | AND DATE_FORMAT(time,'%Y-%m-%d') <= #{vo.endTime} |
| | | AND DATE_FORMAT(NAG.time,'%Y-%m-%d') <= #{vo.endTime} |
| | | </if> |
| | | <if test="vo.level != null and vo.level !='' "> |
| | | AND level = #{vo.level} |
| | | AND NAG.level = #{vo.level} |
| | | </if> |
| | | <if test="vo.status != null and vo.status !='' "> |
| | | AND status = #{vo.status} |
| | | AND NAG.status = #{vo.status} |
| | | </if> |
| | | <if test="vo.type != null and vo.type !='' and vo.type == 1 "> |
| | | AND type = #{vo.type} |
| | | AND NAG.type = #{vo.type} |
| | | </if> |
| | | <if test="vo.type != null and vo.type !='' and vo.type == 2"> |
| | | AND type = #{vo.type} |
| | | AND NAG.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') |
| | | AND (NAG.type = '3' or NAG.type = '4' orNAG. type = '5') |
| | | </if> |
| | | <if test="vo.pointId != null and vo.pointId !='' "> |
| | | AND POINT_id = #{vo.pointId} |
| | | AND NAG.POINT_id = #{vo.pointId} |
| | | </if> |
| | | AND dam_id = #{vo.damId} |
| | | <if test="vo.cdName != null and vo.cdName !=''"> |
| | | AND acb."cd_name" LIKE CONCAT('%',#{vo.cdName},'%') |
| | | </if> |
| | | AND NAG.dam_id = #{vo.damId} |
| | | </select> |
| | | </mapper> |