@ -59,7 +59,7 @@ public interface DfSuperviseProblemMapper extends BaseMapper<DfSuperviseProblem>
LEFT_OUTER_JOIN("bs_sgc_df_jdjcbfxmnr nr on wt.project_item_id = nr.id");
LEFT_OUTER_JOIN("bs_sgc_df_jdjcrw rw on wt.TASK_ID = rw.id");
LEFT_OUTER_JOIN("(SELECT DISTINCT xx.ID,xx.DIKE_CODE AS dikeCode,xx.DIKE_NAME AS dikeName,xx.adcd,gl.engineering_management_unit as engineeringManagementUnit\n"+
"\tFROM bs_sgc_df_jbxx xx LEFT OUTER JOIN bs_sgc_df_gcgl gl ON xx.dike_code = gl.dike_code \n"+
"\tFROM bs_sgc_df_gcda xx LEFT OUTER JOIN bs_sgc_df_gcgl gl ON xx.dike_code = gl.dike_code \n"+
"\tWHERE xx.EXPR_DATE IS NULL AND gl.EXPR_DATE IS NULL) xx ON rw.dike_code = xx.dike_code");
WHERE("1=1");
WHERE("wt.status is not null");
@ -112,14 +112,18 @@ public interface DfSuperviseProblemMapper extends BaseMapper<DfSuperviseProblem>
"sum(IF(wt.level='0', 1, 0)) as same,sum(IF(wt.level='1', 1, 0)) as heavy,sum(IF(wt.level='2', 1, 0)) as serious ");
FROM("bs_sgc_df_jdjcgcwt wt");
LEFT_OUTER_JOIN("bs_sgc_df_jdjcrw rw on wt.TASK_ID = rw.id");
LEFT_OUTER_JOIN("bs_sgc_df_jbxx xx on xx.dike_code = rw.dike_code");
LEFT_OUTER_JOIN("bs_sgc_df_gcda xx on xx.dike_code = rw.dike_code");
LEFT_OUTER_JOIN("bs_sgc_df_gcgl gl on xx.dike_code = gl.dike_code");
WHERE("xx.EXPR_DATE IS NULL AND gl.EXPR_DATE IS NULL");
SELECT("rw.id, rw.name, rw.CREATE_TIME as createTime,rw.weather,rw.inspectors,gl.ENGINEERING_MANAGEMENT_UNIT as engineeringManagementUnit, "+
SELECT("rw.id, rw.name, rw.CREATE_TIME as createTime,rw.weather,rw.inspectors,xx.DIKE_NAME as dikeName,gl.ENGINEERING_MANAGEMENT_UNIT as engineeringManagementUnit, "+
"xx.DIKE_NAME as dikeName, xx.DIKE_CODE as dikeCode, xx.DIKE_TYPE as dikeType");
FROM("bs_sgc_df_jdjcrw rw");
LEFT_OUTER_JOIN("bs_sgc_df_gcda xx ON xx.dike_code = rw.dike_code");
@ -25,8 +25,8 @@ public interface DfSuperviseWayProjectItemMapper extends BaseMapper<DfSuperviseW
*/
@Select("<script>"+
"SELECT xm.name as projectName, nr.project_id as projectId, nr.id, nr.content, nr.same_grade as sameGrade, nr.heavy_grade as heavyGrade, nr.serious_grade as seriousGrade "+
"FROM bs_sgc_df_jdjcbfxm xm "+
"LEFT JOIN bs_sgc_df_jdjcbfxmnr nr ON xm.id = nr.project_id"+
"FROM bs_sgc_df_jdjcbfxmnr nr "+
"LEFT JOIN bs_sgc_df_jdjcbfxm xm ON xm.id = nr.project_id "+
"WHERE 1=1 "+
"<if test='dto.projectId != null and dto.projectId != \"\"'>"+
"AND xm.id = #{dto.projectId} "+
@ -34,6 +34,9 @@ public interface DfSuperviseWayProjectItemMapper extends BaseMapper<DfSuperviseW
"<if test='dto.id != null and dto.id != \"\"'>"+
"AND nr.id = #{dto.id} "+
"</if>"+
"<if test='dto.content != null and dto.content != \"\"'>"+
"AND nr.content like concat('%', #{dto.content}, '%') "+