@Query(value="SELECT ASSOCIATION_ID AS associationId ,D.PROVINCE_ID as provinceId,ASSOCIATION_TYPE AS associationType ,"+
"ASSOCIATION_DESC AS associationDesc,d.PROVINCE_NAME AS provinceName,WARNING_BEGIN_TIME AS warningBeginTime,"+
...
...
@@ -46,8 +47,8 @@ public interface DimAssociationAnaInfoDao extends JpaSpecificationExecutor<DimAs
"TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') AS WARNING_END_TIME FROM CCOLAP.DIM_ASSOCIATION_ANALYSIS_INFO_T A INNER JOIN CCOLAP.DIM_KPI_ASSOCIATION_RELATED_INFO_T B ON A.ASSOCIATION_ID=B.ASSOCIATION_ID"+
" INNER JOIN CCOLAP.DIM_PROVINCE_INFO_T C ON C.PROVINCE_ID= A.PROVINCE_ID) D LEFT JOIN CCOLAP.xcd_warning_detail_info_v E ON D.PROVINCE_ID=E.PROVINCE_ID AND D.KPI_ID =E.KPI_ID WHERE "+
"OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') "+
"GROUP BY ASSOCIATION_ID,D.PROVINCE_ID,ASSOCIATION_TYPE ,ASSOCIATION_DESC,d.PROVINCE_NAME,WARNING_BEGIN_TIME,WARNING_END_TIME",nativeQuery=true)
@Query(value="SELECT ASSOCIATION_ID AS associationId ,D.PROVINCE_ID as provinceId,ASSOCIATION_TYPE AS associationType ,"+
"ASSOCIATION_DESC AS associationDesc,d.PROVINCE_NAME AS provinceName,WARNING_BEGIN_TIME AS warningBeginTime,"+
...
...
@@ -56,88 +57,44 @@ public interface DimAssociationAnaInfoDao extends JpaSpecificationExecutor<DimAs
"TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') AS WARNING_END_TIME FROM CCOLAP.DIM_ASSOCIATION_ANALYSIS_INFO_T A INNER JOIN CCOLAP.DIM_KPI_ASSOCIATION_RELATED_INFO_T B ON A.ASSOCIATION_ID=B.ASSOCIATION_ID"+
" INNER JOIN CCOLAP.DIM_PROVINCE_INFO_T C ON C.PROVINCE_ID= A.PROVINCE_ID) D LEFT JOIN CCOLAP.xcd_warning_detail_info_v E ON D.PROVINCE_ID=E.PROVINCE_ID AND D.KPI_ID =E.KPI_ID WHERE "+
"OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') "+
"GROUP BY ASSOCIATION_ID,D.PROVINCE_ID,ASSOCIATION_TYPE ,ASSOCIATION_DESC,d.PROVINCE_NAME,WARNING_BEGIN_TIME,WARNING_END_TIME",nativeQuery=true)
/*@Query(value = "SELECT ASSOCIATION_ID AS associationId ,D.PROVINCE_ID as provinceId,ASSOCIATION_TYPE AS associationType ," +
"ASSOCIATION_DESC AS associationDesc,PROVINCE_NAME AS provinceName,WARNING_BEGIN_TIME AS warningBeginTime," +
"WARNING_END_TIME as warningEndTime,COUNT(E.KPI_ID)AS warningNum FROM " +
"( SELECT A.ASSOCIATION_ID,A.PROVINCE_ID,A.ASSOCIATION_DESC,A.ASSOCIATION_TYPE,B.KPI_ID,C.PROVINCE_NAME,TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') AS WARNING_BEGIN_TIME, " +
"TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') AS WARNING_END_TIME FROM CCOLAP.DIM_ASSOCIATION_ANALYSIS_INFO_T A INNER JOIN CCOLAP.DIM_KPI_ASSOCIATION_RELATED_INFO_T B ON A.ASSOCIATION_ID=B.ASSOCIATION_ID" +
" INNER JOIN CCOLAP.DIM_PROVINCE_INFO_T C ON C.PROVINCE_ID= A.PROVINCE_ID) D LEFT JOIN CCOLAP.GJFX_WARNING_INFO_T E ON D.PROVINCE_ID=E.PROVINCE_ID AND D.KPI_ID =E.KPI_ID AND WARNING_ID LIKE 'J%' WHERE " +
"OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') " +
"AND A.ASSOCIATION_TYPE = ?3 "+
"AND D.PROVINCE_ID in (?4)"+
"GROUP BY ASSOCIATION_ID,D.PROVINCE_ID,ASSOCIATION_TYPE ,ASSOCIATION_DESC,PROVINCE_NAME,WARNING_BEGIN_TIME,WARNING_END_TIME",nativeQuery = true)*/
" TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') AS WARNING_END_TIME"+
" FROM CCOLAP.DIM_ASSOCIATION_ANALYSIS_INFO_T A INNER JOIN DIM_KPI_ASSOCIATION_RELATED_INFO_T B"+
" ON A.ASSOCIATION_ID=B.ASSOCIATION_ID INNER JOIN DIM_PROVINCE_INFO_T C ON C.PROVINCE_ID= A.PROVINCE_ID) D"+
" FROM CCOLAP.DIM_ASSOCIATION_ANALYSIS_INFO_T A INNER JOIN DIM_KPI_ASSOCIATION_RELATED_INFO_T B"+
" ON A.ASSOCIATION_ID=B.ASSOCIATION_ID INNER JOIN DIM_PROVINCE_INFO_T C ON C.PROVINCE_ID= A.PROVINCE_ID) D"+
" LEFT JOIN GJFX_WARNING_INFO_T E"+
" ON D.PROVINCE_ID = E.PROVINCE_ID AND D.KPI_ID =E.KPI_ID AND WARNING_ID LIKE 'J%'"+
" and OCCUR_TIME >= TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS')"+
" AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') WHERE ASSOCIATION_TYPE = ?3 and D.PROVINCE_ID in (?4) GROUP BY ASSOCIATION_ID,D.PROVINCE_ID, ASSOCIATION_TYPE ,ASSOCIATION_DESC,PROVINCE_NAME, WARNING_BEGIN_TIME, WARNING_END_TIME"
// " TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') AS WARNING_END_TIME" +
// " FROM CCOLAP.DIM_ASSOCIATION_ANALYSIS_INFO_T A INNER JOIN DIM_KPI_ASSOCIATION_RELATED_INFO_T B"+
// " ON A.ASSOCIATION_ID=B.ASSOCIATION_ID INNER JOIN DIM_PROVINCE_INFO_T C ON C.PROVINCE_ID= A.PROVINCE_ID) D"+
// " LEFT JOIN GJFX_WARNING_INFO_T E" +
// " ON D.PROVINCE_ID = E.PROVINCE_ID AND D.KPI_ID =E.KPI_ID AND WARNING_ID LIKE 'J%'" +
// " and OCCUR_TIME >= TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS')" +
// " AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') WHERE ASSOCIATION_TYPE = ?3 and D.PROVINCE_ID in (?4) GROUP BY ASSOCIATION_ID,D.PROVINCE_ID, ASSOCIATION_TYPE ,ASSOCIATION_DESC,PROVINCE_NAME, WARNING_BEGIN_TIME, WARNING_END_TIME"
// ,nativeQuery = true)
// public Object[] findAssociateDiagosisDetailByAssociationId(Long associationId);
@Query(value="SELECT ASSOCIATION_ID, PROVINCE_ID, ASSOCIATION_TYPE , ASSOCIATION_DESC, PROVINCE_NAME, WARNING_BEGIN_TIME, WARNING_END_TIME, KPI_CODE, KPI_NAME, KPI_ID, KPI_WEIGHT, WARNING_NUM, CASE WHEN INFLUENCE_LEVEL>0.8 THEN '高' WHEN INFLUENCE_LEVEL>0.5 AND INFLUENCE_LEVEL<0.5 THEN '中' ELSE '低' END AS INFLUENCE_LEVEL FROM ( SELECT ASSOCIATION_ID, D.PROVINCE_ID, ASSOCIATION_TYPE, ASSOCIATION_DESC, d.PROVINCE_NAME, WARNING_BEGIN_TIME, WARNING_END_TIME, D.KPI_CODE,D.KPI_NAME, D.KPI_ID, KPI_WEIGHT,COUNT(E.KPI_ID)AS WARNING_NUM, KPI_WEIGHT* COUNT(E.KPI_ID) AS INFLUENCE_LEVEL FROM ( SELECT A.ASSOCIATION_ID,A.PROVINCE_ID,A.ASSOCIATION_DESC,A.ASSOCIATION_TYPE, B.KPI_ID, D.KPI_CODE, D.KPI_NAME, B.KPI_WEIGHT, C.PROVINCE_NAME, TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') AS WARNING_BEGIN_TIME, TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') AS WARNING_END_TIME FROM CCOLAP.DIM_ASSOCIATION_ANALYSIS_INFO_T A INNER JOIN CCOLAP.DIM_KPI_ASSOCIATION_RELATED_INFO_T B ON A.ASSOCIATION_ID=B.ASSOCIATION_ID INNER JOIN CCOLAP.DIM_PROVINCE_INFO_T C ON C.PROVINCE_ID= A.PROVINCE_ID INNER JOIN CCOLAP.DIM_KPI_INFO_T D ON B.KPI_ID=D.KPI_ID) D LEFT JOIN CCOLAP.xcd_warning_detail_info_v E ON D.PROVINCE_ID=E.PROVINCE_ID AND D.KPI_ID =E.KPI_ID AND OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') WHERE ASSOCIATION_ID= ?3 GROUP BY ASSOCIATION_ID, D.PROVINCE_ID, ASSOCIATION_TYPE , ASSOCIATION_DESC, d.PROVINCE_NAME, WARNING_BEGIN_TIME, WARNING_END_TIME, D.KPI_CODE, D.KPI_NAME,D.KPI_ID,KPI_WEIGHT)G"
,nativeQuery=true)
@Query(value="SELECT ASSOCIATION_ID, PROVINCE_ID, ASSOCIATION_TYPE , ASSOCIATION_DESC, PROVINCE_NAME, WARNING_BEGIN_TIME, WARNING_END_TIME, KPI_CODE, KPI_NAME, KPI_ID, KPI_WEIGHT, WARNING_NUM, CASE WHEN INFLUENCE_LEVEL>0.8 THEN '高' WHEN INFLUENCE_LEVEL>0.5 AND INFLUENCE_LEVEL<0.5 THEN '中' ELSE '低' END AS INFLUENCE_LEVEL FROM ( SELECT ASSOCIATION_ID, D.PROVINCE_ID, ASSOCIATION_TYPE, ASSOCIATION_DESC, PROVINCE_NAME, WARNING_BEGIN_TIME, WARNING_END_TIME, D.KPI_CODE,D.KPI_NAME, D.KPI_ID, KPI_WEIGHT,COUNT(E.KPI_ID)AS WARNING_NUM, KPI_WEIGHT* COUNT(E.KPI_ID) AS INFLUENCE_LEVEL FROM ( SELECT A.ASSOCIATION_ID,A.PROVINCE_ID,A.ASSOCIATION_DESC,A.ASSOCIATION_TYPE, B.KPI_ID, D.KPI_CODE, D.KPI_NAME, B.KPI_WEIGHT, C.PROVINCE_NAME, TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') AS WARNING_BEGIN_TIME, TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') AS WARNING_END_TIME FROM CCOLAP.DIM_ASSOCIATION_ANALYSIS_INFO_T A INNER JOIN CCOLAP.DIM_KPI_ASSOCIATION_RELATED_INFO_T B ON A.ASSOCIATION_ID=B.ASSOCIATION_ID INNER JOIN CCOLAP.DIM_PROVINCE_INFO_T C ON C.PROVINCE_ID= A.PROVINCE_ID INNER JOIN CCOLAP.DIM_KPI_INFO_T D ON B.KPI_ID=D.KPI_ID) D LEFT JOIN CCOLAP.GJFX_WARNING_INFO_T E ON D.PROVINCE_ID=E.PROVINCE_ID AND D.KPI_ID =E.KPI_ID AND WARNING_ID LIKE 'J%' WHERE OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') AND ASSOCIATION_ID= ?3 GROUP BY ASSOCIATION_ID, D.PROVINCE_ID, ASSOCIATION_TYPE , ASSOCIATION_DESC, PROVINCE_NAME, WARNING_BEGIN_TIME, WARNING_END_TIME, D.KPI_CODE, D.KPI_NAME,D.KPI_ID,KPI_WEIGHT)G"
// @Query("with d as (SELECT d.kpi_id,d.kpi_code,d.kpi_name,e.warning_id from( SELECT A.ASSOCIATION_ID,A.PROVINCE_ID,A.ASSOCIATION_DESC,A.ASSOCIATION_TYPE,B.KPI_ID,D.KPI_CODE,D.KPI_NAME,B.KPI_WEIGHT,C.PROVINCE_NAME,TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') AS WARNING_BEGIN_TIME,TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') AS WARNING_END_TIME FROM CCOLAP.DIM_ASSOCIATION_ANALYSIS_INFO_T A INNER JOIN CCOLAP.DIM_KPI_ASSOCIATION_RELATED_INFO_T B ON A.ASSOCIATION_ID=B.ASSOCIATION_ID INNER JOIN CCOLAP.DIM_PROVINCE_INFO_T C ON C.PROVINCE_ID= A.PROVINCE_ID INNER JOIN CCOLAP.DIM_KPI_INFO_T D ON B.KPI_ID=D.KPI_ID) D LEFT JOIN CCOLAP.GJFX_WARNING_INFO_T E ON D.PROVINCE_ID=E.PROVINCE_ID AND D.KPI_ID =E.KPI_ID AND WARNING_ID LIKE 'J%' WHERE OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') AND ASSOCIATION_ID=?3) select to_char(kpi_id)as kpi_id,kpi_name ,'normal'as ponit_type from d union all select warning_id as kpi_id,'告警点' as kpi_name ,'small'as ponit_type from d where warning_id is not null union all select ?3 as kpi_id,'关联规则' as kpi_name ,'big'as ponit_type from dual")
@Query("from XcdWarningInfoView where occurTime between TIMESTAMPADD(M,-1,GETDATE()) AND GETDATE() order by occurTime desc, warningSourceId asc, dataSourceId asc, channelId asc, provinceId asc, kpiId asc")
List<XcdWarningInfoView>findAllOrderByTime();
//从首页跳转过来的页面
@Query("from XcdWarningInfoView where warningStatus ='0' order by occurTime desc, warningSourceId asc, dataSourceId asc, channelId asc, provinceId asc, kpiId asc")
@Query("select provinceName from XcdWarningInfoView where warningId=?1")
StringfindProvinceByWarningId(Stringwarningid);
//协查单分析页面的折线图默认页面,最近一个月的
@Query(value="SELECT TO_CHAR(DATE_VALUE,'yyyy-mm-dd') AS CATEGORY, COUNT(working_order_id) AS COUNT FROM (SELECT DATE_VALUE FROM dim_date_info_t WHERE DATE_VALUE BETWEEN TIMESTAMPADD(M,-1,date(GETDATE())) AND GETDATE())A left join ( SELECT event_happen_time, working_order_id FROM XCD_WORKING_ORDER_INFO_T WHERE data_Source_Id IS NOT NULL AND provider_Id IS NOT NULL AND channel_Id IS NOT NULL AND prov_code IS NOT NULL)B ON A.DATE_VALUE=CAST(B.event_happen_time AS DATE)GROUP BY CATEGORY ORDER BY CATEGORY",nativeQuery=true)//change by eric 2014-08-13 22:07 外连接了日期
List<Object[]>findXcdAnalysis();
//协查单分析页面的折线,当告警来源和告警级别都全选,不关联协查单查找
@Query(value=" select to_char(DATE_VALUE,'yyyy-mm-dd') as CATEGORY,count(working_order_id) as COUNT from(SELECT DATE_VALUE FROM dim_date_info_t WHERE DATE_VALUE between ?4 and ?5 )A left join (select event_happen_time,working_order_id from XCD_WORKING_ORDER_INFO_T where prov_code in(select PROVINCE_CODE from DIM_PROVINCE_INFO_T where PROVINCE_ID in(?1)) and channel_id in(?2) and data_source_id in (?3) and provider_id in(?6))B ON A.DATE_VALUE=CAST(B.event_happen_time AS DATE) group by CATEGORY order by CATEGORY",nativeQuery=true)//change by eric 2014-08-13 22:07 外连接了日期
@Query(value="SELECT TO_CHAR(DATE_VALUE,'yyyy-mm-dd') AS CATEGORY,COUNT(working_order_id) AS COUNT FROM(SELECT DATE_VALUE FROM dim_date_info_t WHERE DATE_VALUE between ?6 and ?7 )A left join (SELECT event_happen_time, working_order_id FROM XCD_WORKING_ORDER_INFO_T WHERE working_order_id in(select RELEVANT_WORKING_ORDER_ID from GJFX_WARNING_INFO_T where WARNING_SOURCE_ID in(?1) and IMPORTANCE_LEVEL_ID in(?2)) and prov_code IN ( SELECT PROVINCE_CODE FROM DIM_PROVINCE_INFO_T WHERE PROVINCE_ID IN(?3)) AND channel_id IN(?4) AND data_source_id IN (?5) and provider_id in(?8))B ON A.DATE_VALUE=CAST(B.event_happen_time AS DATE) GROUP BY CATEGORY ORDER BY CATEGORY",nativeQuery=true)//change by eric 2014-08-13 22:07 外连接了日期
@Query(value="SELECT TO_CHAR(DATE_VALUE,'yyyy-mm-dd') AS CATEGORY,COUNT(working_order_id) AS COUNT FROM (SELECT DATE_VALUE FROM dim_date_info_t WHERE DATE_VALUE between ?4 and ?5 )A left join(SELECT event_happen_time, working_order_id FROM XCD_WORKING_ORDER_INFO_T s WHERE not exists(select 1 from GJFX_WARNING_INFO_T where RELEVANT_WORKING_ORDER_ID = s.WORKING_ORDER_ID) and prov_code IN ( SELECT PROVINCE_CODE FROM DIM_PROVINCE_INFO_T WHERE PROVINCE_ID IN(?1)) AND channel_id IN(?2) AND data_source_id IN (?3) and provider_id in(?6))B ON A.DATE_VALUE=CAST(B.event_happen_time AS DATE) GROUP BY CATEGORY ORDER BY CATEGORY",nativeQuery=true)//change by eric 2014-08-13 22:07 外连接了日期
@Query(value="select infov from XcdWarningInfoView infov where infov.kpiId = :kpiId and infov.provinceId = :provinceId and infov.occurTime >= :occurTime and infov.occurTime <= :closeTime")
@Query("from XcdWarningInfoView where occurTime between TIMESTAMPADD(M,-1,GETDATE()) AND GETDATE() order by occurTime desc, warningSourceId asc, dataSourceId asc, channelId asc, provinceId asc, kpiId asc")
List<XcdWarningInfoView>findAllOrderByTime();
//从首页跳转过来的页面
@Query("from XcdWarningInfoView where warningStatus ='0' order by occurTime desc, warningSourceId asc, dataSourceId asc, channelId asc, provinceId asc, kpiId asc")
@Query("select provinceName from XcdWarningInfoView where warningId=?1")
StringfindProvinceByWarningId(Stringwarningid);
//协查单分析页面的折线图默认页面,最近一个月的
@Query(value="SELECT TO_CHAR(DATE_VALUE,'yyyy-mm-dd') AS CATEGORY, COUNT(working_order_id) AS COUNT FROM (SELECT DATE_VALUE FROM dim_date_info_t WHERE DATE_VALUE BETWEEN TIMESTAMPADD(M,-1,date(GETDATE())) AND GETDATE())A left join ( SELECT event_happen_time, working_order_id FROM XCD_WORKING_ORDER_INFO_T WHERE data_Source_Id IS NOT NULL AND provider_Id IS NOT NULL AND channel_Id IS NOT NULL AND prov_code IS NOT NULL)B ON A.DATE_VALUE=CAST(B.event_happen_time AS DATE)GROUP BY CATEGORY ORDER BY CATEGORY",nativeQuery=true)
//change by eric 2014-08-13 22:07 外连接了日期
List<Object[]>findXcdAnalysis();
//协查单分析页面的折线,当告警来源和告警级别都全选,不关联协查单查找
@Query(value=" select to_char(DATE_VALUE,'yyyy-mm-dd') as CATEGORY,count(working_order_id) as COUNT from(SELECT DATE_VALUE FROM dim_date_info_t WHERE DATE_VALUE between ?4 and ?5 )A left join (select event_happen_time,working_order_id from XCD_WORKING_ORDER_INFO_T where prov_code in(select PROVINCE_CODE from DIM_PROVINCE_INFO_T where PROVINCE_ID in(?1)) and channel_id in(?2) and data_source_id in (?3) and provider_id in(?6))B ON A.DATE_VALUE=CAST(B.event_happen_time AS DATE) group by CATEGORY order by CATEGORY",nativeQuery=true)
@Query(value="SELECT TO_CHAR(DATE_VALUE,'yyyy-mm-dd') AS CATEGORY,COUNT(working_order_id) AS COUNT FROM(SELECT DATE_VALUE FROM dim_date_info_t WHERE DATE_VALUE between ?6 and ?7 )A left join (SELECT event_happen_time, working_order_id FROM XCD_WORKING_ORDER_INFO_T WHERE working_order_id in(select RELEVANT_WORKING_ORDER_ID from GJFX_WARNING_INFO_T where WARNING_SOURCE_ID in(?1) and IMPORTANCE_LEVEL_ID in(?2)) and prov_code IN ( SELECT PROVINCE_CODE FROM DIM_PROVINCE_INFO_T WHERE PROVINCE_ID IN(?3)) AND channel_id IN(?4) AND data_source_id IN (?5) and provider_id in(?8))B ON A.DATE_VALUE=CAST(B.event_happen_time AS DATE) GROUP BY CATEGORY ORDER BY CATEGORY",nativeQuery=true)
@Query(value="SELECT TO_CHAR(DATE_VALUE,'yyyy-mm-dd') AS CATEGORY,COUNT(working_order_id) AS COUNT FROM (SELECT DATE_VALUE FROM dim_date_info_t WHERE DATE_VALUE between ?4 and ?5 )A left join(SELECT event_happen_time, working_order_id FROM XCD_WORKING_ORDER_INFO_T s WHERE not exists(select 1 from GJFX_WARNING_INFO_T where RELEVANT_WORKING_ORDER_ID = s.WORKING_ORDER_ID) and prov_code IN ( SELECT PROVINCE_CODE FROM DIM_PROVINCE_INFO_T WHERE PROVINCE_ID IN(?1)) AND channel_id IN(?2) AND data_source_id IN (?3) and provider_id in(?6))B ON A.DATE_VALUE=CAST(B.event_happen_time AS DATE) GROUP BY CATEGORY ORDER BY CATEGORY",nativeQuery=true)
@Query(value="select infov from XcdWarningInfoView infov where infov.kpiId = :kpiId and infov.provinceId = :provinceId and infov.occurTime >= :occurTime and infov.occurTime <= :closeTime")