|
|
@ -27,32 +27,63 @@ public interface DfRecordMapper extends BaseMapper<DfRecord> { |
|
|
|
Date getLastInsertTimeByDikeCode(@Param("dikeCode") String dikeCode); |
|
|
|
|
|
|
|
@Select("<script>" + |
|
|
|
"select count(*) from bs_sgc_df_xsjhjlz where RECORD_ID " + |
|
|
|
"in ( "+ |
|
|
|
"select jl.id from bs_sgc_df_xsjhjl as jl "+ |
|
|
|
"SELECT count(DISTINCT(jl.DIKE_CODE)) " + |
|
|
|
"FROM bs_sgc_df_xsjhjl as jl "+ |
|
|
|
"left join att_dike_base base on base.dike_code=jl.dike_code "+ |
|
|
|
"<if test='dto.adcdQx != null and dto.adcdQx != \"\"'> "+ |
|
|
|
" and base.adcd like concat(#{dto.adcdQx}, '%') "+ |
|
|
|
"</if> "+ |
|
|
|
"<if test='dto.handleStatus != null and dto.handleStatus != \"\"'> " + |
|
|
|
"where jl.handle_status=#{dto.handleStatus} "+ |
|
|
|
"</if> " + |
|
|
|
"group by jl.DIKE_CODE,jl.id "+ |
|
|
|
") "+ |
|
|
|
"WHERE jl.id IN ( "+ |
|
|
|
"SELECT RECORD_ID "+ |
|
|
|
"FROM bs_sgc_df_xsjhjlz "+ |
|
|
|
"<if test='dto.patrolStart != null and dto.patrolEnd != \"\"'> "+ |
|
|
|
"AND (DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+ |
|
|
|
"where (DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+ |
|
|
|
"AND DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{dto.patrolEnd} , '%Y-%m-%d %H:%i:%s')) "+ |
|
|
|
"</if> " + |
|
|
|
"<if test='dto.problem != null and dto.problem != \"\"'> " + |
|
|
|
"AND status=#{dto.problem} "+ |
|
|
|
"and base.adcd is not null "+ |
|
|
|
"group by RECORD_ID "+ |
|
|
|
") "+ |
|
|
|
"</script>") |
|
|
|
int paragraphCountNumber(@Param("dto") DfYhHiddenDangerQueDto dto); |
|
|
|
|
|
|
|
@Select("<script>" + |
|
|
|
"select count(1) from bs_sgc_df_xsjhjlz as lz "+ |
|
|
|
"left join bs_sgc_df_xsjhjl hj on hj.id=lz.RECORD_ID "+ |
|
|
|
"left join att_dike_base base on base.dike_code=hj.dike_code "+ |
|
|
|
"<if test='dto.adcdQx != null and dto.adcdQx != \"\"'> "+ |
|
|
|
"AND base.adcd like concat(#{dto.adcdQx}, '%') "+ |
|
|
|
"</if> "+ |
|
|
|
"where 1=1 "+ |
|
|
|
"<if test='dto.patrolStart != null and dto.patrolEnd != \"\"'> "+ |
|
|
|
"AND (DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+ |
|
|
|
"AND DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{dto.patrolEnd} , '%Y-%m-%d %H:%i:%s')) "+ |
|
|
|
"</if> " + |
|
|
|
"and base.adcd is not null "+ |
|
|
|
"and (lz.PROBLEM is null or lz.PROBLEM = '') "+ |
|
|
|
"</script>") |
|
|
|
int yhCountNumber(@Param("dto") DfYhHiddenDangerQueDto dto); |
|
|
|
|
|
|
|
@Select("<script>" + |
|
|
|
"select count(1) from bs_sgc_df_xsjhjlz as lz "+ |
|
|
|
"left join bs_sgc_df_xsjhjl hj on hj.id=lz.RECORD_ID "+ |
|
|
|
"left join att_dike_base base on base.dike_code=hj.dike_code "+ |
|
|
|
"<if test='dto.adcdQx != null and dto.adcdQx != \"\"'> "+ |
|
|
|
"AND base.adcd like concat(#{dto.adcdQx}, '%') "+ |
|
|
|
"</if> "+ |
|
|
|
"where 1=1 "+ |
|
|
|
"<if test='dto.patrolStart != null and dto.patrolEnd != \"\"'> "+ |
|
|
|
"AND (DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+ |
|
|
|
"AND DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{dto.patrolEnd} , '%Y-%m-%d %H:%i:%s')) "+ |
|
|
|
"</if> " + |
|
|
|
"and base.adcd is not null "+ |
|
|
|
"and (lz.HANDLE_TIME is null ) "+ |
|
|
|
"</script>") |
|
|
|
int dfNumber(@Param("dto") DfYhHiddenDangerQueDto dto); |
|
|
|
int clCountNumber(@Param("dto") DfYhHiddenDangerQueDto dto); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("<script>" + |
|
|
|
"select base.adcd,lz.status as problem,count(1) as count from bs_sgc_df_xsjhjlz as lz "+ |
|
|
|
"select base.adcd,'1' as problem,count(1) as count from bs_sgc_df_xsjhjlz as lz "+ |
|
|
|
"left join bs_sgc_df_xsjhjl hj on hj.id=lz.RECORD_ID "+ |
|
|
|
"left join att_dike_base base on base.dike_code=hj.dike_code "+ |
|
|
|
"<if test='dto.adcdQx != null and dto.adcdQx != \"\"'> "+ |
|
|
@ -63,35 +94,105 @@ public interface DfRecordMapper extends BaseMapper<DfRecord> { |
|
|
|
"AND (DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+ |
|
|
|
"AND DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{dto.patrolEnd} , '%Y-%m-%d %H:%i:%s')) "+ |
|
|
|
"</if> " + |
|
|
|
"<if test='dto.problem != null and dto.problem != \"\"'> " + |
|
|
|
"AND lz.status=#{dto.problem} "+ |
|
|
|
"</if> " + |
|
|
|
"group by base.adcd ,lz.status "+ |
|
|
|
"and base.adcd is not null "+ |
|
|
|
"and (lz.PROBLEM is null or lz.PROBLEM = '') "+ |
|
|
|
"group by base.adcd "+ |
|
|
|
"</script>") |
|
|
|
List<DfYhHiddenDangerModel> yhNumberData(@Param("dto") DfYhHiddenDangerQueDto dto); |
|
|
|
|
|
|
|
|
|
|
|
@Select("<script>" + |
|
|
|
"select base.adcd,hj.handle_status,count(1) as count from bs_sgc_df_xsjhjlz as lz "+ |
|
|
|
"select base.adcd,'1' as problem,count(1) as count from bs_sgc_df_xsjhjlz as lz "+ |
|
|
|
"left join bs_sgc_df_xsjhjl hj on hj.id=lz.RECORD_ID "+ |
|
|
|
"<if test='dto.handleStatus != null and dto.handleStatus != \"\"'> " + |
|
|
|
"AND hj.handle_status=#{dto.handleStatus} "+ |
|
|
|
"</if> " + |
|
|
|
"left join att_dike_base base on base.dike_code=hj.dike_code "+ |
|
|
|
"<if test='dto.adcdQx != null and dto.adcdQx != \"\"'> "+ |
|
|
|
" and base.adcd like concat(#{dto.adcdQx}, '%') "+ |
|
|
|
"AND base.adcd like concat(#{dto.adcdQx}, '%') "+ |
|
|
|
"</if> "+ |
|
|
|
"where 1=1 "+ |
|
|
|
"<if test='dto.patrolStart != null and dto.patrolEnd != \"\"'> "+ |
|
|
|
"AND (DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+ |
|
|
|
"AND DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{dto.patrolEnd} , '%Y-%m-%d %H:%i:%s')) "+ |
|
|
|
"</if> " + |
|
|
|
"<if test='dto.problem != null and dto.problem != \"\"'> "+ |
|
|
|
"AND lz.status=#{dto.problem} "+ |
|
|
|
"</if> " + |
|
|
|
"group by base.adcd ,hj.handle_status "+ |
|
|
|
"and base.adcd is not null "+ |
|
|
|
"and (lz.HANDLE_TIME is null ) "+ |
|
|
|
"group by base.adcd "+ |
|
|
|
"</script>") |
|
|
|
List<DfYhHiddenDangerModel> clfNumberData(@Param("dto") DfYhHiddenDangerQueDto dto); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @Select("<script>" +
|
|
|
|
// "select base.adcd,lz.status as problem,count(1) as count from bs_sgc_df_xsjhjlz as lz "+
|
|
|
|
// "left join bs_sgc_df_xsjhjl hj on hj.id=lz.RECORD_ID "+
|
|
|
|
// "left join att_dike_base base on base.dike_code=hj.dike_code "+
|
|
|
|
// "<if test='dto.adcdQx != null and dto.adcdQx != \"\"'> "+
|
|
|
|
// "AND base.adcd like concat(#{dto.adcdQx}, '%') "+
|
|
|
|
// "</if> "+
|
|
|
|
// "where 1=1 "+
|
|
|
|
// "<if test='dto.patrolStart != null and dto.patrolEnd != \"\"'> "+
|
|
|
|
// "AND (DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+
|
|
|
|
// "AND DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{dto.patrolEnd} , '%Y-%m-%d %H:%i:%s')) "+
|
|
|
|
// "</if> " +
|
|
|
|
// "<if test='dto.problem != null and dto.problem != \"\"'> " +
|
|
|
|
// "AND lz.status=#{dto.problem} "+
|
|
|
|
// "</if> " +
|
|
|
|
// "group by base.adcd ,lz.status "+
|
|
|
|
// "</script>")
|
|
|
|
// List<DfYhHiddenDangerModel> yhNumberData(@Param("dto") DfYhHiddenDangerQueDto dto);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @Select("<script>" +
|
|
|
|
// "select count(*) from bs_sgc_df_xsjhjlz where RECORD_ID " +
|
|
|
|
// "in ( "+
|
|
|
|
// "select jl.id from bs_sgc_df_xsjhjl as jl "+
|
|
|
|
// "left join att_dike_base base on base.dike_code=jl.dike_code "+
|
|
|
|
// "<if test='dto.adcdQx != null and dto.adcdQx != \"\"'> "+
|
|
|
|
// " and base.adcd like concat(#{dto.adcdQx}, '%') "+
|
|
|
|
// "</if> "+
|
|
|
|
// "<if test='dto.handleStatus != null and dto.handleStatus != \"\"'> " +
|
|
|
|
// "where jl.handle_status=#{dto.handleStatus} "+
|
|
|
|
// "</if> " +
|
|
|
|
// "group by jl.DIKE_CODE,jl.id "+
|
|
|
|
// ") "+
|
|
|
|
// "<if test='dto.patrolStart != null and dto.patrolEnd != \"\"'> "+
|
|
|
|
// "AND (DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+
|
|
|
|
// "AND DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{dto.patrolEnd} , '%Y-%m-%d %H:%i:%s')) "+
|
|
|
|
// "</if> " +
|
|
|
|
// "<if test='dto.problem != null and dto.problem != \"\"'> " +
|
|
|
|
// "AND status=#{dto.problem} "+
|
|
|
|
// "</if> " +
|
|
|
|
//
|
|
|
|
// "</script>")
|
|
|
|
// int countNumber(@Param("dto") DfYhHiddenDangerQueDto dto);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @Select("<script>" +
|
|
|
|
// "select base.adcd,hj.handle_status,count(1) as count from bs_sgc_df_xsjhjlz as lz "+
|
|
|
|
// "left join bs_sgc_df_xsjhjl hj on hj.id=lz.RECORD_ID "+
|
|
|
|
// "<if test='dto.handleStatus != null and dto.handleStatus != \"\"'> " +
|
|
|
|
// "AND hj.handle_status=#{dto.handleStatus} "+
|
|
|
|
// "</if> " +
|
|
|
|
// "left join att_dike_base base on base.dike_code=hj.dike_code "+
|
|
|
|
// "<if test='dto.adcdQx != null and dto.adcdQx != \"\"'> "+
|
|
|
|
// " and base.adcd like concat(#{dto.adcdQx}, '%') "+
|
|
|
|
// "</if>"+
|
|
|
|
// "where 1=1 "+
|
|
|
|
// "<if test='dto.patrolStart != null and dto.patrolEnd != \"\"'> "+
|
|
|
|
// "AND (DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+
|
|
|
|
// "AND DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{dto.patrolEnd} , '%Y-%m-%d %H:%i:%s')) "+
|
|
|
|
// "</if> " +
|
|
|
|
// "<if test='dto.problem != null and dto.problem != \"\"'> "+
|
|
|
|
// "AND lz.status=#{dto.problem} "+
|
|
|
|
// "</if> " +
|
|
|
|
// "group by base.adcd ,hj.handle_status "+
|
|
|
|
// "</script>")
|
|
|
|
// List<DfYhHiddenDangerModel> clfNumberData(@Param("dto") DfYhHiddenDangerQueDto dto);
|
|
|
|
|
|
|
|
@Select("<script>" + |
|
|
|
"SELECT " + |
|
|
|
"r.id, " + |
|
|
|