Ver código fonte

task-5154 设施环境控制总览,无需处理的数据,还是显示待监测
解决方案:将已完成和无需处理设置为done其他设置为todo返回

xiexh 9 meses atrás
pai
commit
cf1d8a1eb7

+ 4 - 2
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/business/service/impl/FacilityEnvironmentServiceImpl.java

@@ -24,7 +24,8 @@ public class FacilityEnvironmentServiceImpl implements FacilityEnvironmentServic
     private ICommonDao<?> commonDao;
     @Override
     public List<Map<String, Object>> getDailySummary(String buMen) {
-        String fetchSqlForAllPOS =  "SELECT jian_ce_zhou_qi_,facs_type,pos.name_,COUNT(shi_fou_guo_shen_<>'已完成'  OR NULL ) AS todo,COUNT(shi_fou_guo_shen_='已完成'  OR NULL) AS done ,MAX(facs.pagePath) AS pagePath" +
+        String fetchSqlForAllPOS =  "SELECT jian_ce_zhou_qi_,facs_type,pos.name_, COUNT(not(shi_fou_guo_shen_ = '已完成' or shi_fou_guo_shen_ = '无需处理') OR NULL ) AS todo," +
+                "   COUNT((shi_fou_guo_shen_ = '已完成' OR shi_fou_guo_shen_ = '无需处理' )OR NULL ) AS done ,MAX(facs.pagePath) AS pagePath" +
                 "   FROM v_facs_summary_daily, ibps_party_position pos,(SELECT DISTINCT pagePath,`type` FROM v_facs WHERE pagePath <>'') facs" +
                 "   WHERE di_dian_='%s' AND bian_zhi_bu_men_=pos.id_ AND facs_type = facs.type" +
                 "   GROUP BY jian_ce_zhou_qi_,facs_type,bian_zhi_bu_men_ ORDER BY facs_type;";
@@ -79,7 +80,8 @@ public class FacilityEnvironmentServiceImpl implements FacilityEnvironmentServic
             }
             buMen += StringPool.COMMA + joiner.toString();
         }
-        String fetchSql =  "SELECT jian_ce_zhou_qi_,facs_type,pos.name_,COUNT(shi_fou_guo_shen_<>'已完成'  OR NULL ) AS todo,COUNT(shi_fou_guo_shen_='已完成'  OR NULL) AS done ,MAX(facs.pagePath) AS pagePath" +
+        String fetchSql =  "SELECT jian_ce_zhou_qi_,facs_type,pos.name_,COUNT(NOT( shi_fou_guo_shen_ = '已完成' OR shi_fou_guo_shen_ = '无需处理' ) OR NULL ) AS todo," +
+                "   COUNT((shi_fou_guo_shen_ = '已完成' OR shi_fou_guo_shen_ = '无需处理' ) OR NULL ) AS done ,MAX(facs.pagePath) AS pagePath" +
                 "   FROM v_facs_summary_daily, ibps_party_position pos,(SELECT DISTINCT pagePath,`type` FROM v_facs WHERE pagePath <>'') facs" +
                 "   WHERE FIND_IN_SET(bian_zhi_bu_men_,'%s') AND bian_zhi_bu_men_=pos.id_ AND facs_type = facs.type" +
                 "   GROUP BY jian_ce_zhou_qi_,facs_type,bian_zhi_bu_men_ ORDER BY facs_type;";