@ -26,7 +26,7 @@ public interface DfDangerousTaskItemRelMapper extends BaseMapper<DfDangerousTask
@Select("<script>"+
"SELECT xm.name as projectName, nr.project_id as projectId, nr.content, "+
"wt.id, wt.task_id as taskId, wt.PROJECT_ITEM_ID as projectItemId, wt.level "+
"wt.id, wt.task_id as taskId, wt.PROJECT_ITEM_ID as projectItemId, wt.level, wt.PROBLEM_DESCRIBE as problemDescribe, wt.SITE_SITUATION_RECORDS as siteSituationRecords "+
"FROM bs_sgc_df_bxgcglxm wt "+
"LEFT JOIN bs_sgc_df_bxgcxm xm on wt.project_id = xm.id "+
"LEFT JOIN bs_sgc_df_bxgcxmnr nr on wt.project_item_id = nr.id "+
"SELECT sum(IF(wt.status is not null, 1, 0)) as problemDispose,sum(IF(wt.status='0', 1, 0)) as distributeCount,sum(IF(wt.status='1', 1, 0)) as handleCount,"+
"sum(IF(wt.status='2', 1, 0)) as confirmCount,sum(IF(wt.status='3', 1, 0)) as finishCount,sum(IF(wt.level is not null, 1, 0)) as problemTotal,"+
"sum(IF(wt.level='1', 1, 0)) as same,sum(IF(wt.level='2', 1, 0)) as heavy,sum(IF(wt.level='3', 1, 0)) as serious "+
"FROM bs_sgc_df_jdjcgcwt wt "+
"LEFT JOIN bs_sgc_df_jdjcrw rw on wt.TASK_ID = rw.id "+
"LEFT JOIN bs_sgc_df_gcda xx on xx.dike_code = rw.dike_code "+
"<if test='dto.adcdStart != null and dto.adcdStart != \"\"'>"+
"LEFT JOIN sys_xzqh xzqh on xzqh.xzqhdm=#{dto.adcdStart} "+
"</if>"+
"WHERE xx.EXPR_DATE IS NULL "+
"<if test='dto.dikeType != null and dto.dikeType != \"\"'>"+
SELECT("sum(IF(wt.status is not null, 1, 0)) as problemDispose,sum(IF(wt.status='0', 1, 0)) as distributeCount,sum(IF(wt.status='1', 1, 0)) as handleCount,"+
"sum(IF(wt.status='2', 1, 0)) as confirmCount,sum(IF(wt.status='3', 1, 0)) as finishCount,sum(IF(wt.level is not null, 1, 0)) as problemTotal,"+
"sum(IF(wt.level='1', 1, 0)) as same,sum(IF(wt.level='2', 1, 0)) as heavy,sum(IF(wt.level='3', 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_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 xm.name as projectName, nr.project_id as projectId, nr.content, "+
"wt.id, wt.task_id as taskId, wt.PROJECT_ITEM_ID as projectItemId, wt.level, wt.status, wt.HANDLE_RECORD as handleRecord, wt.HANDLE_SITUATION_RECORDS as handleSituationRecords, wt.HANDLE_UID as handleUid, "+
"wt.HANDLE_NAME as handleName, wt.HANDLE_TIME as handleTime, wt.CONFIRM_UID as confirmUid, wt.CONFIRM_NAME as confirmName, wt.CONFIRM_TIME as confirmTime "+
"wt.HANDLE_NAME as handleName, wt.HANDLE_TIME as handleTime, wt.CONFIRM_UID as confirmUid, wt.CONFIRM_NAME as confirmName, wt.CONFIRM_TIME as confirmTime, wt.PROBLEM_DESCRIBE as problemDescribe, wt.SITE_SITUATION_RECORDS as siteSituationRecords "+
"FROM bs_sgc_df_jdjcgcwt wt "+
"LEFT JOIN bs_sgc_df_jdjcbfxm xm on wt.project_id = xm.id "+
"LEFT JOIN bs_sgc_df_jdjcbfxmnr nr on wt.project_item_id = nr.id "+
@ -26,7 +26,7 @@ public interface SzDangerousTaskItemRelMapper extends BaseMapper<SzDangerousTask
@Select("<script>"+
"SELECT xm.name as projectName, nr.project_id as projectId, nr.content, "+
"wt.id, wt.task_id as taskId, wt.PROJECT_ITEM_ID as projectItemId, wt.level "+
"wt.id, wt.task_id as taskId, wt.PROJECT_ITEM_ID as projectItemId, wt.level, wt.PROBLEM_DESCRIBE as problemDescribe, wt.SITE_SITUATION_RECORDS as siteSituationRecords "+
"FROM bs_sgc_sz_bxgcglxm wt "+
"LEFT JOIN bs_sgc_sz_bxgcxm xm on wt.project_id = xm.id "+
"LEFT JOIN bs_sgc_sz_bxgcxmnr nr on wt.project_item_id = nr.id "+
"SELECT sum(IF(wt.status is not null, 1, 0)) as problemDispose,sum(IF(wt.status='0', 1, 0)) as distributeCount,sum(IF(wt.status='1', 1, 0)) as handleCount,"+
"sum(IF(wt.status='2', 1, 0)) as confirmCount,sum(IF(wt.status='3', 1, 0)) as finishCount,sum(IF(wt.level is not null, 1, 0)) as problemTotal,"+
"sum(IF(wt.level='1', 1, 0)) as same,sum(IF(wt.level='2', 1, 0)) as heavy,sum(IF(wt.level='3', 1, 0)) as serious "+
"FROM bs_sgc_sz_jdjcgcwt wt "+
"LEFT JOIN bs_sgc_sz_jdjcrw rw on wt.TASK_ID = rw.id "+
"LEFT JOIN bs_sgc_sz_jbxx xx on xx.WAGA_CODE = rw.WAGA_CODE "+
"<if test='dto.adcd != null and dto.adcd != \"\"'>"+
"LEFT JOIN sys_xzqh xzqh on xzqh.xzqhdm=#{dto.adcd} "+
"</if>"+
"WHERE xx.EXPR_DATE IS NULL "+
"<if test='dto.wagaType != null and dto.wagaType != \"\"'>"+
SELECT("sum(IF(wt.status is not null, 1, 0)) as problemDispose,sum(IF(wt.status='0', 1, 0)) as distributeCount,sum(IF(wt.status='1', 1, 0)) as handleCount,"+
"sum(IF(wt.status='2', 1, 0)) as confirmCount,sum(IF(wt.status='3', 1, 0)) as finishCount,sum(IF(wt.level is not null, 1, 0)) as problemTotal,"+
"sum(IF(wt.level='1', 1, 0)) as same,sum(IF(wt.level='2', 1, 0)) as heavy,sum(IF(wt.level='3', 1, 0)) as serious ");
FROM("bs_sgc_sz_jdjcgcwt wt");
LEFT_OUTER_JOIN("bs_sgc_sz_jdjcrw rw on wt.TASK_ID = rw.id");
LEFT_OUTER_JOIN("bs_sgc_sz_jbxx xx on xx.WAGA_CODE = rw.WAGA_CODE");
LEFT_OUTER_JOIN("bs_sgc_sz_gcgl gl on xx.WAGA_CODE = gl.WAGA_CODE");
WHERE("xx.EXPR_DATE IS NULL AND gl.EXPR_DATE IS NULL");
"SELECT xm.name as projectName, nr.project_id as projectId, nr.content, "+
"wt.id, wt.task_id as taskId, wt.PROJECT_ITEM_ID as projectItemId, wt.level, wt.status, wt.HANDLE_RECORD as handleRecord, wt.HANDLE_SITUATION_RECORDS as handleSituationRecords, wt.HANDLE_UID as handleUid, "+
"wt.HANDLE_NAME as handleName, wt.HANDLE_TIME as handleTime, wt.CONFIRM_UID as confirmUid, wt.CONFIRM_NAME as confirmName, wt.CONFIRM_TIME as confirmTime "+
"wt.HANDLE_NAME as handleName, wt.HANDLE_TIME as handleTime, wt.CONFIRM_UID as confirmUid, wt.CONFIRM_NAME as confirmName, wt.CONFIRM_TIME as confirmTime, wt.PROBLEM_DESCRIBE as problemDescribe, wt.SITE_SITUATION_RECORDS as siteSituationRecords "+
"FROM bs_sgc_sz_jdjcgcwt wt "+
"LEFT JOIN bs_sgc_sz_jdjcbfxm xm on wt.project_id = xm.id "+
"LEFT JOIN bs_sgc_sz_jdjcbfxmnr nr on wt.project_item_id = nr.id "+