Commit 32faad49 authored by liuna's avatar liuna

2018年2月2日 --智能分析平台

--实体厅流量监测:页面性能调整
parent cb34f901
This diff is collapsed.
...@@ -10,15 +10,20 @@ import java.util.List; ...@@ -10,15 +10,20 @@ import java.util.List;
public interface FlowAccountDao extends PagingAndSortingRepository<FlowAccount,Long>,JpaSpecificationExecutor<FlowAccount> { public interface FlowAccountDao extends PagingAndSortingRepository<FlowAccount,Long>,JpaSpecificationExecutor<FlowAccount> {
//坐席分析前TOP10 //坐席分析前TOP10
@Query(value="SELECT ACCOUNT,TRANS_CNT,TRANS_AVAIL_CNT,TRANS_TIME_AVG FROM (SELECT ACCOUNT,TRANS_CNT,TRANS_AVAIL_CNT,TRANS_TIME_AVG,RANK()OVER(ORDER BY STATS_TIME DESC) AS RANK FROM CCOLAP.app_sm_db_account_kpi_250_t)A WHERE RANK=1 ORDER BY TRANS_CNT DESC LIMIT 10", nativeQuery=true) @Query(value="SELECT ACCOUNT,TRANS_CNT,TRANS_AVAIL_CNT,TRANS_TIME_AVG FROM (" +
"SELECT ACCOUNT,TRANS_CNT,TRANS_AVAIL_CNT,TRANS_TIME_AVG,RANK()OVER(ORDER BY STATS_TIME DESC) AS RANK FROM" +
" CCOLAP.app_sm_db_account_kpi_250_t where stats_time >=trunc(sysdate))A WHERE RANK=1 ORDER BY TRANS_CNT DESC LIMIT 10", nativeQuery=true)
List<Object[]> seatAnalysisTop(); List<Object[]> seatAnalysisTop();
//坐席分析后TOP10 //坐席分析后TOP10
@Query(value="SELECT ACCOUNT,TRANS_CNT,TRANS_AVAIL_CNT,TRANS_TIME_AVG FROM (SELECT ACCOUNT,TRANS_CNT,TRANS_AVAIL_CNT,TRANS_TIME_AVG,RANK()OVER(ORDER BY STATS_TIME DESC) AS RANK FROM CCOLAP.app_sm_db_account_kpi_250_t)A WHERE RANK=1 ORDER BY TRANS_CNT LIMIT 10", nativeQuery=true) @Query(value="SELECT ACCOUNT,TRANS_CNT,TRANS_AVAIL_CNT,TRANS_TIME_AVG FROM (" +
"SELECT ACCOUNT,TRANS_CNT,TRANS_AVAIL_CNT,TRANS_TIME_AVG,RANK()OVER(ORDER BY STATS_TIME DESC) AS RANK FROM " +
"CCOLAP.app_sm_db_account_kpi_250_t where stats_time >=trunc(sysdate))A WHERE RANK=1 ORDER BY TRANS_CNT LIMIT 10", nativeQuery=true)
List<Object[]> seatAnalysisLast(); List<Object[]> seatAnalysisLast();
//坐席*接待客户分析实时(TIME1_MOBILE_CNT:无法使用客户数 TIME2_MOBILE_CNT:可容忍客户数 TIME3_MOBILE_CNT:不满意客户数) //坐席*接待客户分析实时(TIME1_MOBILE_CNT:无法使用客户数 TIME2_MOBILE_CNT:可容忍客户数 TIME3_MOBILE_CNT:不满意客户数)
@Query(value="select STATS_TIME,sum(TIME1_MOBILE_CNT) as TIME1_MOBILE_CNT,sum(TIME2_MOBILE_CNT) as TIME2_MOBILE_CNT,sum(TIME3_MOBILE_CNT) as TIME3_MOBILE_CNT from ccolap.app_sm_db_account_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24 group by STATS_TIME order by STATS_TIME", nativeQuery=true) @Query(value="select STATS_TIME,sum(TIME1_MOBILE_CNT) as TIME1_MOBILE_CNT,sum(TIME2_MOBILE_CNT) as TIME2_MOBILE_CNT," +
"sum(TIME3_MOBILE_CNT) as TIME3_MOBILE_CNT from ccolap.app_sm_db_account_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24 group by STATS_TIME order by STATS_TIME", nativeQuery=true)
List<Object[]> seatsReceptionUser(); List<Object[]> seatsReceptionUser();
//坐席*接待客户分析当月1号到当前时间(TIME1_MOBILE_CNT:无法使用客户数 TIME2_MOBILE_CNT:可容忍客户数 TIME3_MOBILE_CNT:不满意客户数) //坐席*接待客户分析当月1号到当前时间(TIME1_MOBILE_CNT:无法使用客户数 TIME2_MOBILE_CNT:可容忍客户数 TIME3_MOBILE_CNT:不满意客户数)
......
...@@ -18,10 +18,10 @@ public interface FlowBrowserDao extends PagingAndSortingRepository<FlowBrowser,L ...@@ -18,10 +18,10 @@ public interface FlowBrowserDao extends PagingAndSortingRepository<FlowBrowser,L
List<Object[]> clientCompatibilityMonth(); List<Object[]> clientCompatibilityMonth();
//服务器相关情况分析:HTTP状态码分析(数据中没有'代码号'字段)实时 //服务器相关情况分析:HTTP状态码分析(数据中没有'代码号'字段)实时
@Query(value="select SERVER_IP,SOTHER_CNT from (select SERVER_IP,SOTHER_CNT,rank()over(order by STATS_TIME desc) as rank from ccolap.app_sm_db_server_kpi_t where STATS_TIME>=trunc(sysdate))a where rank=1 order by SOTHER_CNT desc limit 10", nativeQuery=true) @Query(value="select SERVER_IP,tot,thot,fof,blank from ccolap.f3_tmp", nativeQuery=true)
List<Object[]> httpInformation(); List<Object[]> httpInformation();
//服务器相关情况分析:HTTP状态码分析(数据中没有'代码号'字段)当月1号到当前时间 //服务器相关情况分析:HTTP状态码分析(数据中没有'代码号'字段)当月1号到当前时间
@Query(value="select SERVER_IP,sum(SOTHER_CNT) as SOTHER_CNT from ccolap.app_sm_db_server_kpi_t where STATS_TIME>=trunc(sysdate,'mm') group by SERVER_IP order by SOTHER_CNT desc limit 10", nativeQuery=true) @Query(value="select SERVER_IP,tot,thot,fof,blank from ccolap.f3_old_tmp", nativeQuery=true)
List<Object[]> httpInformationMonth(); List<Object[]> httpInformationMonth();
} }
...@@ -22,29 +22,61 @@ public interface FlowClientDao extends PagingAndSortingRepository<FlowClient,Lon ...@@ -22,29 +22,61 @@ public interface FlowClientDao extends PagingAndSortingRepository<FlowClient,Lon
List<Object[]> ipBusiness(); List<Object[]> ipBusiness();
//用户IP业务分布:TOP10当月1号到当前时间 //用户IP业务分布:TOP10当月1号到当前时间
@Query(value="SELECT CNT1,\n" + @Query(value="SELECT CNT1," +
"CNT2,\n" + "CNT2," +
"CNT3,\n" + "CNT3," +
"CNT4,\n" + "CNT4," +
"CNT5,\n" + "CNT5," +
"CNT6,\n" + "CNT6," +
"CNT7,\n" + "CNT7," +
"CNT8,\n" + "CNT8," +
"CNT9,\n" + "CNT9," +
"CNT10,\n" + "CNT10," +
"CLIENT_IP,\n" + "CLIENT_IP," +
"CNT FROM ccolap.YONGHU_OLD_TMP ORDER BY CNT DESC", nativeQuery=true) "CNT FROM ccolap.YONGHU_OLD_TMP ORDER BY CNT DESC", nativeQuery=true)
List<Object[]> ipBusinessMonth(); List<Object[]> ipBusinessMonth();
// //用户IP趋势分析:确定ip:
// @Query(value="SELECT CLIENT_IP from (SELECT CLIENT_IP,sum(TRANS_CNT) as CNT FROM ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24 group by CLIENT_IP ORDER BY CNT DESC LIMIT 6)a", nativeQuery=true)
// List<String> findIp();
//
// //用户IP趋势分析:趋势图实时
// @Query(value="select sum(TRANS_CNT) as CNT,CLIENT_IP,STATS_TIME as time from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24 and CLIENT_IP =(?1) group by CLIENT_IP,STATS_TIME order by STATS_TIME", nativeQuery=true)
// List<Object[]> ipTrend(String ipList);
//
// //用户IP趋势分析:趋势图当月1号到当前时间
// @Query(value="select sum(TRANS_CNT) as CNT,CLIENT_IP,trunc(STATS_TIME,'dd') as time from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate,'mm') and CLIENT_IP=(?1) group by CLIENT_IP,time order by time", nativeQuery=true)
// List<Object[]> ipTrendMonth(String ipList);
//用户IP趋势分析:确定ip: //用户IP趋势分析:确定ip:
@Query(value="SELECT CLIENT_IP from (SELECT CLIENT_IP,sum(TRANS_CNT) as CNT FROM ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24 group by CLIENT_IP ORDER BY CNT DESC LIMIT 6)a", nativeQuery=true) @Query(value="SELECT CLIENT_IP from (SELECT CLIENT_IP,sum(TRANS_CNT) as CNT FROM ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24 group by CLIENT_IP ORDER BY CNT DESC LIMIT 6)a", nativeQuery=true)
List<String> findIp(); List<String> findIp();
//用户IP趋势分析:趋势图实时 //用户IP趋势分析:趋势图实时
@Query(value="select sum(TRANS_CNT) as CNT,CLIENT_IP,STATS_TIME as time from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24 and CLIENT_IP =(?1) group by CLIENT_IP,STATS_TIME order by STATS_TIME", nativeQuery=true) @Query(value=" select sum(TRANS_CNT) as CNT,CLIENT_IP,STATS_TIME as time " +
List<Object[]> ipTrend(String ipList); " from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=now()-34/24" +
" and STATS_TIME<now()-4/24 and CLIENT_IP in (SELECT CLIENT_IP from (SELECT CLIENT_IP,sum(TRANS_CNT) as CNT FROM" +
" ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24" +
" group by CLIENT_IP ORDER BY CNT DESC LIMIT 10)a) group by CLIENT_IP,STATS_TIME order by CLIENT_IP", nativeQuery=true)
List<Object[]> ipTrend();
//用户IP趋势分析:趋势图当月1号到当前时间 //用户IP趋势分析:趋势图当月1号到当前时间
@Query(value="select sum(TRANS_CNT) as CNT,CLIENT_IP,trunc(STATS_TIME,'dd') as time from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate,'mm') and CLIENT_IP=(?1) group by CLIENT_IP,time order by time", nativeQuery=true) @Query(value="select sum(TRANS_CNT) as CNT,CLIENT_IP,trunc(STATS_TIME,'dd') as time from ccolap.app_sm_db_client_kpi_250_t " +
List<Object[]> ipTrendMonth(String ipList); " where STATS_TIME>=trunc(sysdate,'mm') and CLIENT_IP in ((SELECT CLIENT_IP from (SELECT CLIENT_IP,sum(TRANS_CNT) as CNT FROM " +
" ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24 " +
" group by CLIENT_IP ORDER BY CNT DESC LIMIT 10)a)) group by CLIENT_IP,time order by CLIENT_IP", nativeQuery=true)
List<Object[]> ipTrendMonth();
} }
// select sum(TRANS_CNT) as CNT,CLIENT_IP,STATS_TIME as time
// from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=now()-34/24
// and STATS_TIME<now()-4/24 and CLIENT_IP in (SELECT CLIENT_IP from (SELECT CLIENT_IP,sum(TRANS_CNT) as CNT FROM
// ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24
// group by CLIENT_IP ORDER BY CNT DESC LIMIT 6)a) group by CLIENT_IP,STATS_TIME order by CLIENT_IP
//
// SELECT CLIENT_IP from (SELECT CLIENT_IP,sum(TRANS_CNT) as CNT FROM
// ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24
// group by CLIENT_IP ORDER BY CNT DESC LIMIT 6)a
\ No newline at end of file
...@@ -18,10 +18,10 @@ public interface FlowHallBusinessDao extends PagingAndSortingRepository<FlowHall ...@@ -18,10 +18,10 @@ public interface FlowHallBusinessDao extends PagingAndSortingRepository<FlowHall
List<String> hallMonth(); List<String> hallMonth();
// 实时 // 实时
@Query(value="select sum(TRANS_CNT) as TRANS_CNT,HALL,STATS_TIME from ccolap.app_sm_db_hall_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24 and hall =(?1) group by HALL,STATS_TIME order by STATS_TIME;", nativeQuery=true) @Query(value="select sum(TRANS_CNT) as TRANS_CNT,HALL,STATS_TIME from ccolap.app_sm_db_hall_kpi_250_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24 and hall in (select hall from (select sum(trans_cnt) as cnt,HALL from ccolap.app_sm_db_hall_kpi_250_t where STATS_TIME>=now()-34/24 group by HALL order by cnt desc limit 5)a) group by HALL,STATS_TIME order by HALL;", nativeQuery=true)
List<Object[]> businessOffice(String hall); List<Object[]> businessOffice();
//营业厅业务量分析当月1号到当前时间 //营业厅业务量分析当月1号到当前时间
@Query(value="select sum(TRANS_CNT) as TRANS_CNT,HALL,TRUNC(STATS_TIME) as STATS_TIME from ccolap.app_sm_db_hall_kpi_250_t where STATS_TIME>=trunc(sysdate,'mm') and HALL =(?1) group by trunc(STATS_TIME),HALL order by STATS_TIME;", nativeQuery=true) @Query(value="select sum(TRANS_CNT) as TRANS_CNT,HALL,TRUNC(STATS_TIME) as STATS_TIME from ccolap.app_sm_db_hall_kpi_250_t where STATS_TIME>=trunc(sysdate,'mm') and HALL in (select hall from (select sum(trans_cnt) as cnt,HALL from ccolap.app_sm_db_hall_kpi_250_t where STATS_TIME>=trunc(sysdate,'mm') group by HALL order by cnt desc limit 5)a) group by trunc(STATS_TIME),HALL order by HALL;", nativeQuery=true)
List<Object[]> businessOfficeMonth(String hall); List<Object[]> businessOfficeMonth();
} }
...@@ -10,7 +10,9 @@ import java.util.List; ...@@ -10,7 +10,9 @@ import java.util.List;
public interface FlowMonitorCatonDao extends PagingAndSortingRepository<FlowMonitorCator,Long>,JpaSpecificationExecutor<FlowMonitorCator> { public interface FlowMonitorCatonDao extends PagingAndSortingRepository<FlowMonitorCator,Long>,JpaSpecificationExecutor<FlowMonitorCator> {
//营业厅卡顿及业务量分析营业厅卡顿用户数实时(ACTIVE_ACCOUNT_CNT:全部活跃用户数 TIME1_ACCOUNT_CNT:无法使用坐席数 TIME2_ACCOUNT_CNT:可容忍坐席数 TIME3_ACCOUNT_CNT:不满意坐席数) //营业厅卡顿及业务量分析营业厅卡顿用户数实时(ACTIVE_ACCOUNT_CNT:全部活跃用户数 TIME1_ACCOUNT_CNT:无法使用坐席数 TIME2_ACCOUNT_CNT:可容忍坐席数 TIME3_ACCOUNT_CNT:不满意坐席数)
@Query(value="select STATS_TIME, sum(TIME1_ACCOUNT_CNT) as TIME1_ACCOUNT_CNT,sum(TIME2_ACCOUNT_CNT) as TIME2_ACCOUNT_CNT,sum(TIME3_ACCOUNT_CNT) as TIME3_ACCOUNT_CNT from ccolap.app_sm_db_province_kpi_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24 group by STATS_TIME order by STATS_TIME", nativeQuery=true) @Query(value="select STATS_TIME, sum(TIME1_ACCOUNT_CNT) as TIME1_ACCOUNT_CNT,sum(TIME2_ACCOUNT_CNT) as TIME2_ACCOUNT_CNT," +
"sum(TIME3_ACCOUNT_CNT) as TIME3_ACCOUNT_CNT from " +
"ccolap.app_sm_db_province_kpi_t where STATS_TIME>=now()-34/24 and STATS_TIME<now()-4/24 group by STATS_TIME order by STATS_TIME", nativeQuery=true)
List<Object[]> catonUser(); List<Object[]> catonUser();
//营业厅卡顿及业务量分析营业厅卡顿用户数当月1号到当前时间 //营业厅卡顿及业务量分析营业厅卡顿用户数当月1号到当前时间
......
...@@ -18,39 +18,39 @@ public interface FlowMonitorDao extends PagingAndSortingRepository<FlowMonitor,L ...@@ -18,39 +18,39 @@ public interface FlowMonitorDao extends PagingAndSortingRepository<FlowMonitor,L
List<Object[]> seatsActivenessMonth(); List<Object[]> seatsActivenessMonth();
//地市性能稳定率分析实时(Q1:最小值,Q2:下四分位数,Q3:中位数,Q4:上四分位数,Q5:最大值,L1:下边缘值,L5:上边缘值) //地市性能稳定率分析实时(Q1:最小值,Q2:下四分位数,Q3:中位数,Q4:上四分位数,Q5:最大值,L1:下边缘值,L5:上边缘值)
@Query(value="SELECT A.CITY,L1,Q2,Q3,Q4,L5,PERCENT FROM\n" + @Query(value="SELECT A.CITY,L1,Q2,Q3,Q4,L5,PERCENT FROM " +
"(select distinct\n" + " (select distinct" +
"Q4+1.5*(Q4-Q2) AS L5,--上边缘值\n" + " Q4+1.5*(Q4-Q2) AS L5," +
"Q2-1.5*(Q4-Q2) AS L1,--下边缘值\n" + " Q2-1.5*(Q4-Q2) AS L1," +
"Q2,Q3,Q4,CITY from(SELECT \n" + " Q2,Q3,Q4,CITY from(SELECT " +
"PERCENTILE_CONT(0) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q1,--最小值\n" + " PERCENTILE_CONT(0) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q1," +
"PERCENTILE_CONT(.25) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q2,--下四分位数\n" + " PERCENTILE_CONT(.25) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q2," +
"PERCENTILE_CONT(.5) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q3,--中位数\n" + " PERCENTILE_CONT(.5) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q3," +
"PERCENTILE_CONT(.75) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q4,--上四分位数\n" + " PERCENTILE_CONT(.75) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q4," +
"PERCENTILE_CONT(1) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q5,--最大值\n" + " PERCENTILE_CONT(1) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q5," +
"CITY from (select TIME_AVG,CITY from\n" + " CITY from (select TIME_AVG,CITY from" +
"(select TIME_AVG,CITY,rank()over(order by STATS_TIME desc) as rank\n" + " (select TIME_AVG,CITY,rank()over(order by STATS_TIME desc) as rank " +
"from ccolap.app_sm_db_city_kpi_t )a where rank=1)a)b)A,\n" + " from ccolap.app_sm_db_city_kpi_t where stats_time >=trunc(sysdate))a where rank=1)a)b)A," +
"(select cast (round(sum(TIMEOUT_CNT)/sum(TRANS_CNT)*100,2) as numeric (18,2)) as percent,CITY from\n" + " (select cast (round(sum(TIMEOUT_CNT)/sum(TRANS_CNT)*100,2) as numeric (18,2)) as percent,CITY from" +
"(select TRANS_CNT,TIMEOUT_CNT,CITY,rank()over(order by STATS_TIME desc) as rank\n" + " (select TRANS_CNT,TIMEOUT_CNT,CITY,rank()over(order by STATS_TIME desc) as rank " +
"from ccolap.app_sm_db_city_kpi_t )a where rank=1 group by CITY)B WHERE A.CITY=B.CITY ORDER BY PERCENT DESC", nativeQuery=true) " from ccolap.app_sm_db_city_kpi_t )a where rank=1 group by CITY)B WHERE A.CITY=B.CITY ORDER BY PERCENT DESC", nativeQuery=true)
List<Object[]> performanceStability(); List<Object[]> performanceStability();
//地市性能稳定率分析当月1号到当前时间(Q1:最小值,Q2:下四分位数,Q3:中位数,Q4:上四分位数,Q5:最大值,L1:下边缘值,L5:上边缘值) //地市性能稳定率分析当月1号到当前时间(Q1:最小值,Q2:下四分位数,Q3:中位数,Q4:上四分位数,Q5:最大值,L1:下边缘值,L5:上边缘值)
@Query(value="SELECT A.CITY,L1,Q2,Q3,Q4,L5,PERCENT FROM\n" + @Query(value="SELECT A.CITY,L1,Q2,Q3,Q4,L5,PERCENT FROM\n" +
"(select distinct\n" + " (select distinct\n" +
"Q4+1.5*(Q4-Q2) AS L5,--上边缘值\n" + " Q4+1.5*(Q4-Q2) AS L5,--上边缘值\n" +
"Q2-1.5*(Q4-Q2) AS L1,--下边缘值\n" + " Q2-1.5*(Q4-Q2) AS L1,--下边缘值\n" +
"Q2,Q3,Q4,CITY from(SELECT \n" + " Q2,Q3,Q4,CITY from(SELECT \n" +
"PERCENTILE_CONT(0) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q1,--最小值\n" + " PERCENTILE_CONT(0) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q1,--最小值\n" +
"PERCENTILE_CONT(.25) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q2,--下四分位数\n" + " PERCENTILE_CONT(.25) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q2,--下四分位数\n" +
"PERCENTILE_CONT(.5) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q3,--中位数\n" + " PERCENTILE_CONT(.5) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q3,--中位数\n" +
"PERCENTILE_CONT(.75) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q4,--上四分位数\n" + " PERCENTILE_CONT(.75) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q4,--上四分位数\n" +
"PERCENTILE_CONT(1) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q5,--最大值\n" + " PERCENTILE_CONT(1) WITHIN GROUP (ORDER BY TIME_AVG) over (PARTITION BY CITY) AS Q5,--最大值\n" +
"CITY from (select TIME_AVG,CITY from\n" + " CITY from (select TIME_AVG,CITY from\n" +
"ccolap.app_sm_db_city_kpi_t where STATS_TIME>=trunc(sysdate,'mm'))a)b)A,\n" + " ccolap.app_sm_db_city_kpi_t where STATS_TIME>=trunc(sysdate,'mm'))a)b)A,\n" +
"(select cast (round(sum(TIMEOUT_CNT)/sum(TRANS_CNT)*100,2) as numeric (18,2)) as percent,CITY \n" + " (select cast (round(sum(TIMEOUT_CNT)/sum(TRANS_CNT)*100,2) as numeric (18,2)) as percent,CITY \n" +
"from ccolap.app_sm_db_city_kpi_t where STATS_TIME>=trunc(sysdate,'mm') group by CITY)B WHERE A.CITY=B.CITY ORDER BY PERCENT DESC", nativeQuery=true) " from ccolap.app_sm_db_city_kpi_t where STATS_TIME>=trunc(sysdate,'mm') group by CITY)B WHERE A.CITY=B.CITY ORDER BY PERCENT DESC", nativeQuery=true)
List<Object[]> performanceStabilityMonth(); List<Object[]> performanceStabilityMonth();
} }
...@@ -5,6 +5,8 @@ import com.hp.cmsz.entity.Province; ...@@ -5,6 +5,8 @@ import com.hp.cmsz.entity.Province;
import com.hp.cmsz.repository.*; import com.hp.cmsz.repository.*;
import com.hp.cmsz.service.CmszOperationLogService; import com.hp.cmsz.service.CmszOperationLogService;
import com.hp.cmsz.web.PageURLController; import com.hp.cmsz.web.PageURLController;
import org.apache.poi.ss.formula.functions.T;
import org.apache.poi.util.ArrayUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -145,30 +147,63 @@ public class FlowMonitorController { ...@@ -145,30 +147,63 @@ public class FlowMonitorController {
@RequestMapping(value = "/businessOffice",method = RequestMethod.GET) @RequestMapping(value = "/businessOffice",method = RequestMethod.GET)
@ResponseBody @ResponseBody
public List<List<Object[]>> findBusinessOffice(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException { public List<List<Object[]>> findBusinessOffice(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> businessOfficeList = new ArrayList<Object[]>(); // List<Object[]> businessOfficeList = new ArrayList<Object[]>();
List<List<Object[]>> list = new ArrayList<List<Object[]>>(); // List<List<Object[]>> list = new ArrayList<List<Object[]>>();
List<String> hallList = new ArrayList<String>(); // List<String> hallList = new ArrayList<String>();
hallList = flowHallBusinessDao.hall(); // hallList = flowHallBusinessDao.hall();
for(String hall : hallList){ // for(String hall : hallList){
businessOfficeList = flowHallBusinessDao.businessOffice(hall); //// businessOfficeList = flowHallBusinessDao.businessOffice(hall);
list.add(businessOfficeList); // list.add(businessOfficeList);
// }
List<Object[]> ipList = flowHallBusinessDao.businessOffice();
String tmp = (String) ipList.get(0)[1];
List<List<Object[]>> result= new ArrayList<List<Object[]>>();
result.add(new ArrayList<Object[]>());
int k=0;
for(int i=0;i<ipList.size();i++){
if(tmp.equals(ipList.get(i)[1])){
result.get(k).add(ipList.get(i));
}else{
result.add(new ArrayList<Object[]>());
k++;
tmp = (String) ipList.get(i)[1];
result.get(k).add(ipList.get(i));
} }
return list; }
return result;
} }
//营业厅业务量分析当月 //营业厅业务量分析当月
@RequestMapping(value = "/businessOfficeMonth",method = RequestMethod.GET) @RequestMapping(value = "/businessOfficeMonth",method = RequestMethod.GET)
@ResponseBody @ResponseBody
public List<List<Object[]>> findBusinessOfficeMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException { public List<List<Object[]>> findBusinessOfficeMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> businessOfficeMonthList = new ArrayList<Object[]>(); // List<Object[]> businessOfficeMonthList = new ArrayList<Object[]>();
List<String> hallList = new ArrayList<String>(); // List<String> hallList = new ArrayList<String>();
List<List<Object[]>> list = new ArrayList<List<Object[]>>(); // List<List<Object[]>> list = new ArrayList<List<Object[]>>();
hallList = flowHallBusinessDao.hallMonth(); // hallList = flowHallBusinessDao.hallMonth();
for(String hall : hallList) { // for(String hall : hallList) {
businessOfficeMonthList = flowHallBusinessDao.businessOfficeMonth(hall); // businessOfficeMonthList = flowHallBusinessDao.businessOfficeMonth(hall);
list.add(businessOfficeMonthList); // list.add(businessOfficeMonthList);
// }
List<Object[]> ipList = flowHallBusinessDao.businessOffice();
String tmp = (String) ipList.get(0)[1];
List<List<Object[]>> result= new ArrayList<List<Object[]>>();
result.add(new ArrayList<Object[]>());
int k=0;
for(int i=0;i<ipList.size();i++){
if(tmp.equals(ipList.get(i)[1])){
result.get(k).add(ipList.get(i));
}else{
result.add(new ArrayList<Object[]>());
k++;
tmp = (String) ipList.get(i)[1];
result.get(k).add(ipList.get(i));
}
} }
return list; return result;
} }
//坐席*接待客户分析 //坐席*接待客户分析
...@@ -229,32 +264,45 @@ public class FlowMonitorController { ...@@ -229,32 +264,45 @@ public class FlowMonitorController {
@RequestMapping(value = "/ipTrend",method = RequestMethod.GET) @RequestMapping(value = "/ipTrend",method = RequestMethod.GET)
@ResponseBody @ResponseBody
public List<List<Object[]>> findIpTrend(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException { public List<List<Object[]>> findIpTrend(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<String> ipList = new ArrayList<String>();
List<List<Object[]>> list = new ArrayList<List<Object[]>>();
ipList = flowClientDao.findIp(); List<Object[]> ipList = flowClientDao.ipTrend();
String tmp = (String) ipList.get(0)[1];
for(String ip : ipList){ List<List<Object[]>> result= new ArrayList<List<Object[]>>();
System.out.println("123"); result.add(new ArrayList<Object[]>());
List<Object[]> ipTrendList = flowClientDao.ipTrend(ip); int k=0;
list.add(ipTrendList); for(int i=0;i<ipList.size();i++){
if(tmp.equals(ipList.get(i)[1])){
result.get(k).add(ipList.get(i));
}else{
result.add(new ArrayList<Object[]>());
k++;
tmp = (String) ipList.get(i)[1];
result.get(k).add(ipList.get(i));
}
} }
return list; return result;
} }
//用户IP趋势图当月 //用户IP趋势图当月
@RequestMapping(value = "/ipTrendMonth",method = RequestMethod.GET) @RequestMapping(value = "/ipTrendMonth",method = RequestMethod.GET)
@ResponseBody @ResponseBody
public List<List<Object[]>> findIpTrendMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException { public List<List<Object[]>> findIpTrendMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<String> ipList = new ArrayList<String>(); List<Object[]> ipList = flowClientDao.ipTrend();
List<List<Object[]>> list = new ArrayList<List<Object[]>>(); String tmp = (String) ipList.get(0)[1];
List<Object[]> ipTrendMonthList = new ArrayList<Object[]>(); List<List<Object[]>> result= new ArrayList<List<Object[]>>();
ipList = flowClientDao.findIp(); result.add(new ArrayList<Object[]>());
for(String ip : ipList){ int k=0;
ipTrendMonthList = flowClientDao.ipTrendMonth(ip); for(int i=0;i<ipList.size();i++){
list.add(ipTrendMonthList); if(tmp.equals(ipList.get(i)[1])){
} result.get(k).add(ipList.get(i));
return list; }else{
result.add(new ArrayList<Object[]>());
k++;
tmp = (String) ipList.get(i)[1];
result.get(k).add(ipList.get(i));
}
}
return result;
} }
//服务器实例分析: //服务器实例分析:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment