Browse Source

add:水闸统计

master_tdsql
“lyd” 2 months ago
parent
commit
7b1a2397b3
  1. 22
      shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfRecordMapper.java

22
shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfRecordMapper.java

@ -30,8 +30,9 @@ public interface DfRecordMapper extends BaseMapper<DfRecord> {
"select count(*) from bs_sgc_df_xsjhjlz where RECORD_ID " + "select count(*) from bs_sgc_df_xsjhjlz where RECORD_ID " +
"in ( "+ "in ( "+
"select jl.id from bs_sgc_df_xsjhjl as jl "+ "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 != \"\"'> "+ "<if test='dto.adcdQx != null and dto.adcdQx != \"\"'> "+
"left join att_dike_base base on base.dike_code=jl.dike_code and df.adcd like concat(#{dto.adcdQx}, '%') "+ " and df.adcd like concat(#{dto.adcdQx}, '%') "+
"</if> "+ "</if> "+
"group by jl.DIKE_CODE,jl.id "+ "group by jl.DIKE_CODE,jl.id "+
") "+ ") "+
@ -50,25 +51,26 @@ public interface DfRecordMapper extends BaseMapper<DfRecord> {
@Select("<script>" + @Select("<script>" +
"select adb.adcd,lz.problem,count(1) as count from bs_sgc_df_xsjhjlz as lz "+ "select adb.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 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 != \"\"'> "+ "<if test='dto.adcdQx != null and dto.adcdQx != \"\"'> "+
"left join att_dike_base base on base.dike_code=hj.dike_code and base.adcd like concat(#{dto.adcdQx}, '%') "+ "AND base.adcd like concat(#{dto.adcdQx}, '%') "+
"</if> "+ "</if> "+
"where 1=1 "+ "where 1=1 "+
"<if test='dto.patrolStart != null and dto.patrolEnd != \"\"'> "+ "<if test='dto.patrolStart != null and dto.patrolEnd != \"\"'> "+
"AND (DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+ "AND (DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+
"AND DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(#{dto.patrolEnd} , '%Y-%m-%d %H:%i:%s')) "+ "AND DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(#{dto.patrolEnd} , '%Y-%m-%d %H:%i:%s')) "+
"</if> " + "</if> " +
"<if test='dto.problem != null and dto.problem != \"\"'> " + "<if test='dto.problem != null and dto.problem != \"\"'> " +
"AND lz.status=#{dto.problem} "+ "AND lz.status=#{dto.problem} "+
"</if> " + "</if> " +
"group by adb.adcd ,lz.problem "+ "group by base.adcd ,lz.status "+
"</script>") "</script>")
List<DfYhHiddenDangerModel> yhNumberData(@Param("dto") DfYhHiddenDangerQueDto dto); List<DfYhHiddenDangerModel> yhNumberData(@Param("dto") DfYhHiddenDangerQueDto dto);
@Select("<script>" + @Select("<script>" +
"select adb.adcd,lz.handle_status,count(1) as count from bs_sgc_df_xsjhjlz as lz "+ "select base.adcd,lz.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 "+ "left join bs_sgc_df_xsjhjl hj on hj.id=lz.RECORD_ID "+
"<if test='dto.adcdQx != null and dto.adcdQx != \"\"'> "+ "<if test='dto.adcdQx != null and dto.adcdQx != \"\"'> "+
"left join att_dike_base base on base.dike_code=hj.dike_code and base.adcd like concat(#{dto.adcdQx}, '%') "+ "left join att_dike_base base on base.dike_code=hj.dike_code and base.adcd like concat(#{dto.adcdQx}, '%') "+
@ -78,13 +80,13 @@ public interface DfRecordMapper extends BaseMapper<DfRecord> {
"</if> " + "</if> " +
"where 1=1 "+ "where 1=1 "+
"<if test='dto.patrolStart != null and dto.patrolEnd != \"\"'> "+ "<if test='dto.patrolStart != null and dto.patrolEnd != \"\"'> "+
"AND (DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+ "AND (DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(#{dto.patrolStart} , '%Y-%m-%d %H:%i:%s') "+
"AND DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(#{dto.patrolEnd} , '%Y-%m-%d %H:%i:%s')) "+ "AND DATE_FORMAT(lz.create_time, '%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(#{dto.patrolEnd} , '%Y-%m-%d %H:%i:%s')) "+
"</if> " + "</if> " +
"<if test='dto.problem != null and dto.problem != \"\"'> "+ "<if test='dto.problem != null and dto.problem != \"\"'> "+
"AND lz.status=#{dto.problem} "+ "AND lz.status=#{dto.problem} "+
"</if> " + "</if> " +
"group by adb.adcd ,lz.handle_status "+ "group by base.adcd ,lz.handle_status "+
"</script>") "</script>")
List<DfYhHiddenDangerModel> clfNumberData(@Param("dto") DfYhHiddenDangerQueDto dto); List<DfYhHiddenDangerModel> clfNumberData(@Param("dto") DfYhHiddenDangerQueDto dto);

Loading…
Cancel
Save