Commit 8f10cdec authored by liuna's avatar liuna

2018年1月26日 --智能分析平台

--实体厅流量监测页面
parent 5c7fe802
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.hp.cmsz.entity;
import org.apache.commons.net.ntp.TimeStamp;
import javax.persistence.*;
import java.io.Serializable;
/**
* app_sm_db_account_kpi_250_t表对应的实体类
*
* @author Liu Na
*
*/
@Entity
@Table(name = "app_sm_db_account_kpi_250_t",schema = "CCOLAP")
public class FlowAccount implements Serializable {
private Long batchId;
private TimeStamp statsTime;
private String account;
private Long transCnt;
private Long transAvailCnt;
private Long transTimeAvg;
private Long time1MobileCnt;
private Long time2MobileCnt;
private Long time3MobileCnt;
private Long statsPeriod;
private TimeStamp crtTime;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getBatchId() {
return batchId;
}
public void setBatchId(Long batchId) {
this.batchId = batchId;
}
public TimeStamp getStatsTime() {
return statsTime;
}
public void setStatsTime(TimeStamp statsTime) {
this.statsTime = statsTime;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public Long getTransCnt() {
return transCnt;
}
public void setTransCnt(Long transCnt) {
this.transCnt = transCnt;
}
public Long getTransAvailCnt() {
return transAvailCnt;
}
public void setTransAvailCnt(Long transAvailCnt) {
this.transAvailCnt = transAvailCnt;
}
public Long getTransTimeAvg() {
return transTimeAvg;
}
public void setTransTimeAvg(Long transTimeAvg) {
this.transTimeAvg = transTimeAvg;
}
public Long getTime1MobileCnt() {
return time1MobileCnt;
}
public void setTime1MobileCnt(Long time1MobileCnt) {
this.time1MobileCnt = time1MobileCnt;
}
public Long getTime2MobileCnt() {
return time2MobileCnt;
}
public void setTime2MobileCnt(Long time2MobileCnt) {
this.time2MobileCnt = time2MobileCnt;
}
public Long getTime3MobileCnt() {
return time3MobileCnt;
}
public void setTime3MobileCnt(Long time3MobileCnt) {
this.time3MobileCnt = time3MobileCnt;
}
public Long getStatsPeriod() {
return statsPeriod;
}
public void setStatsPeriod(Long statsPeriod) {
this.statsPeriod = statsPeriod;
}
public TimeStamp getCrtTime() {
return crtTime;
}
public void setCrtTime(TimeStamp crtTime) {
this.crtTime = crtTime;
}
}
package com.hp.cmsz.entity;
import org.apache.commons.net.ntp.TimeStamp;
import javax.persistence.*;
import java.io.Serializable;
/**
* app_sm_db_browser_kpi_t表对应的实体类
*
* @author Liu Na
*
*/
@Entity
@Table(name = "app_sm_db_browser_kpi_t",schema = "CCOLAP")
public class FlowBrowser implements Serializable {
private Long batchId;
private TimeStamp statsTime;
private String province;
private String browser;
private Long activeAccountCnt;
private Long transCnt;
private Long transAvg;
private Long transAvail;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getBatchId() {
return batchId;
}
public void setBatchId(Long batchId) {
this.batchId = batchId;
}
public TimeStamp getStatsTime() {
return statsTime;
}
public void setStatsTime(TimeStamp statsTime) {
this.statsTime = statsTime;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getBrowser() {
return browser;
}
public void setBrowser(String browser) {
this.browser = browser;
}
public Long getActiveAccountCnt() {
return activeAccountCnt;
}
public void setActiveAccountCnt(Long activeAccountCnt) {
this.activeAccountCnt = activeAccountCnt;
}
public Long getTransCnt() {
return transCnt;
}
public void setTransCnt(Long transCnt) {
this.transCnt = transCnt;
}
public Long getTransAvg() {
return transAvg;
}
public void setTransAvg(Long transAvg) {
this.transAvg = transAvg;
}
public Long getTransAvail() {
return transAvail;
}
public void setTransAvail(Long transAvail) {
this.transAvail = transAvail;
}
}
package com.hp.cmsz.entity;
import org.apache.commons.net.ntp.TimeStamp;
import javax.persistence.*;
import java.io.Serializable;
/**
* app_sm_db_client_kpi_250_t表对应的实体类
*
* @author Liu Na
*
*/
@Entity
@Table(name = "app_sm_db_client_kpi_250_t",schema = "CCOLAP")
public class FlowClient implements Serializable {
private Long batchId;
private TimeStamp statsTime;
private String clientIp;
private String transName;
private Long transCnt;
private Long transAvailCnt;
private Long transTimeSum;
private Long mobileCnt;
private Long statsPeriod;
private TimeStamp crtTime;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getBatchId() {
return batchId;
}
public void setBatchId(Long batchId) {
this.batchId = batchId;
}
public TimeStamp getStatsTime() {
return statsTime;
}
public void setStatsTime(TimeStamp statsTime) {
this.statsTime = statsTime;
}
public String getClientIp() {
return clientIp;
}
public void setClientIp(String clientIp) {
this.clientIp = clientIp;
}
public String getTransName() {
return transName;
}
public void setTransName(String transName) {
this.transName = transName;
}
public Long getTransCnt() {
return transCnt;
}
public void setTransCnt(Long transCnt) {
this.transCnt = transCnt;
}
public Long getTransAvailCnt() {
return transAvailCnt;
}
public void setTransAvailCnt(Long transAvailCnt) {
this.transAvailCnt = transAvailCnt;
}
public Long getTransTimeSum() {
return transTimeSum;
}
public void setTransTimeSum(Long transTimeSum) {
this.transTimeSum = transTimeSum;
}
public Long getMobileCnt() {
return mobileCnt;
}
public void setMobileCnt(Long mobileCnt) {
this.mobileCnt = mobileCnt;
}
public Long getStatsPeriod() {
return statsPeriod;
}
public void setStatsPeriod(Long statsPeriod) {
this.statsPeriod = statsPeriod;
}
public TimeStamp getCrtTime() {
return crtTime;
}
public void setCrtTime(TimeStamp crtTime) {
this.crtTime = crtTime;
}
}
package com.hp.cmsz.entity;
import org.apache.commons.net.ntp.TimeStamp;
import javax.persistence.*;
import java.io.Serializable;
/**
* app_sm_db_hall_kpi_250_t表对应的实体类
*
* @author Liu Na
*
*/
@Entity
@Table(name = "app_sm_db_hall_kpi_250_t",schema = "ccolap")
public class FlowHallBusiness implements Serializable {
private Long batchId;
private TimeStamp statsTime;
private String city;
private String district;
private String hall;
private Long transCnt;
private Long timeAvg;
private Long statsPeriod;
private TimeStamp crtTime;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getBatchId() {
return batchId;
}
public void setBatchId(Long batchId) {
this.batchId = batchId;
}
public TimeStamp getStatsTime() {
return statsTime;
}
public void setStatsTime(TimeStamp statsTime) {
this.statsTime = statsTime;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getDistrict() {
return district;
}
public void setDistrict(String district) {
this.district = district;
}
public String getHall() {
return hall;
}
public void setHall(String hall) {
this.hall = hall;
}
public Long getTransCnt() {
return transCnt;
}
public void setTransCnt(Long transCnt) {
this.transCnt = transCnt;
}
public Long getTimeAvg() {
return timeAvg;
}
public void setTimeAvg(Long timeAvg) {
this.timeAvg = timeAvg;
}
public Long getStatsPeriod() {
return statsPeriod;
}
public void setStatsPeriod(Long statsPeriod) {
this.statsPeriod = statsPeriod;
}
public TimeStamp getCrtTime() {
return crtTime;
}
public void setCrtTime(TimeStamp crtTime) {
this.crtTime = crtTime;
}
}
......@@ -2,8 +2,7 @@ package com.hp.cmsz.entity;
import org.apache.commons.net.ntp.TimeStamp;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.*;
import java.io.Serializable;
/**
......@@ -12,8 +11,8 @@ import java.io.Serializable;
* @author Liu Na
*
*/
//@Entity
//@Table(name = "APP_SM_DB_CITY_KPI_T",schema = "ccolap")
@Entity
@Table(name = "APP_SM_DB_CITY_KPI_T",schema = "CCOLAP")
public class FlowMonitor implements Serializable {
private Long batchId;
......@@ -24,4 +23,88 @@ public class FlowMonitor implements Serializable {
private Long transCnt;
private Long timeAvg;
private Long timeoutCnt;
private Long statsPeriod;
private TimeStamp crtTime;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getBatchId() {
return batchId;
}
public void setBatchId(Long batchId) {
this.batchId = batchId;
}
public TimeStamp getStatsTime() {
return statsTime;
}
public void setStatsTime(TimeStamp statsTime) {
this.statsTime = statsTime;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public Long getActiveAccountCnt() {
return activeAccountCnt;
}
public void setActiveAccountCnt(Long activeAccountCnt) {
this.activeAccountCnt = activeAccountCnt;
}
public Long getTransCnt() {
return transCnt;
}
public void setTransCnt(Long transCnt) {
this.transCnt = transCnt;
}
public Long getTimeAvg() {
return timeAvg;
}
public void setTimeAvg(Long timeAvg) {
this.timeAvg = timeAvg;
}
public Long getTimeoutCnt() {
return timeoutCnt;
}
public void setTimeoutCnt(Long timeoutCnt) {
this.timeoutCnt = timeoutCnt;
}
public Long getStatsPeriod() {
return statsPeriod;
}
public void setStatsPeriod(Long statsPeriod) {
this.statsPeriod = statsPeriod;
}
public TimeStamp getCrtTime() {
return crtTime;
}
public void setCrtTime(TimeStamp crtTime) {
this.crtTime = crtTime;
}
}
package com.hp.cmsz.entity;
import org.apache.commons.net.ntp.TimeStamp;
import javax.persistence.*;
import java.io.Serializable;
/**
* app_sm_db_province_kpi_t表对应的实体类
*
* @author Liu Na
*
*/
@Entity
@Table(name = "app_sm_db_province_kpi_t",schema = "ccolap")
public class FlowMonitorCator implements Serializable {
private Long batchId;
private TimeStamp statsTime;
private String province;
private Long activeAccountCnt;
private Long time1AccountCnt;//无法使用坐席数
private Long time2AccountCnt;//可容忍坐席数
private Long time3AccountCnt;//不满意坐席数
private Long statsPeriod;
private TimeStamp crtTime;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getBatchId() {
return batchId;
}
public void setBatchId(Long batchId) {
this.batchId = batchId;
}
public TimeStamp getStatsTime() {
return statsTime;
}
public void setStatsTime(TimeStamp statsTime) {
this.statsTime = statsTime;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public Long getActiveAccountCnt() {
return activeAccountCnt;
}
public void setActiveAccountCnt(Long activeAccountCnt) {
this.activeAccountCnt = activeAccountCnt;
}
public Long getTime1AccountCnt() {
return time1AccountCnt;
}
public void setTime1AccountCnt(Long time1AccountCnt) {
this.time1AccountCnt = time1AccountCnt;
}
public Long getTime2AccountCnt() {
return time2AccountCnt;
}
public void setTime2AccountCnt(Long time2AccountCnt) {
this.time2AccountCnt = time2AccountCnt;
}
public Long getTime3AccountCnt() {
return time3AccountCnt;
}
public void setTime3AccountCnt(Long time3AccountCnt) {
this.time3AccountCnt = time3AccountCnt;
}
public Long getStatsPeriod() {
return statsPeriod;
}
public void setStatsPeriod(Long statsPeriod) {
this.statsPeriod = statsPeriod;
}
public TimeStamp getCrtTime() {
return crtTime;
}
public void setCrtTime(TimeStamp crtTime) {
this.crtTime = crtTime;
}
}
package com.hp.cmsz.entity;
import org.apache.commons.net.ntp.TimeStamp;
import javax.persistence.*;
import java.io.Serializable;
/**
* ccolap.app_sm_db_server_kpi_t表对应的实体类
*
* @author Liu Na
*
*/
@Entity
@Table(name = "app_sm_db_server_kpi_t",schema = "CCOLAP")
public class FlowServer implements Serializable {
private Long batchId;
private TimeStamp statsTime;
private String province;
private String serverIp;
private Long activeAccountCnt;
private Long transCnt;
private Long transAvg;
private Long transAvail;
private Long s10xCnt;
private Long s20xCnt;
private Long s30xCnt;
private Long s40xCnt;
private Long s50xCnt;
private Long sotherCnt;
private Long statsPeriod;
private TimeStamp crtTime;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getBatchId() {
return batchId;
}
public void setBatchId(Long batchId) {
this.batchId = batchId;
}
public TimeStamp getStatsTime() {
return statsTime;
}
public void setStatsTime(TimeStamp statsTime) {
this.statsTime = statsTime;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getServerIp() {
return serverIp;
}
public void setServerIp(String serverIp) {
this.serverIp = serverIp;
}
public Long getActiveAccountCnt() {
return activeAccountCnt;
}
public void setActiveAccountCnt(Long activeAccountCnt) {
this.activeAccountCnt = activeAccountCnt;
}
public Long getTransCnt() {
return transCnt;
}
public void setTransCnt(Long transCnt) {
this.transCnt = transCnt;
}
public Long getTransAvg() {
return transAvg;
}
public void setTransAvg(Long transAvg) {
this.transAvg = transAvg;
}
public Long getTransAvail() {
return transAvail;
}
public void setTransAvail(Long transAvail) {
this.transAvail = transAvail;
}
public Long getS10xCnt() {
return s10xCnt;
}
public void setS10xCnt(Long s10xCnt) {
this.s10xCnt = s10xCnt;
}
public Long getS20xCnt() {
return s20xCnt;
}
public void setS20xCnt(Long s20xCnt) {
this.s20xCnt = s20xCnt;
}
public Long getS30xCnt() {
return s30xCnt;
}
public void setS30xCnt(Long s30xCnt) {
this.s30xCnt = s30xCnt;
}
public Long getS40xCnt() {
return s40xCnt;
}
public void setS40xCnt(Long s40xCnt) {
this.s40xCnt = s40xCnt;
}
public Long getS50xCnt() {
return s50xCnt;
}
public void setS50xCnt(Long s50xCnt) {
this.s50xCnt = s50xCnt;
}
public Long getSotherCnt() {
return sotherCnt;
}
public void setSotherCnt(Long sotherCnt) {
this.sotherCnt = sotherCnt;
}
public Long getStatsPeriod() {
return statsPeriod;
}
public void setStatsPeriod(Long statsPeriod) {
this.statsPeriod = statsPeriod;
}
public TimeStamp getCrtTime() {
return crtTime;
}
public void setCrtTime(TimeStamp crtTime) {
this.crtTime = crtTime;
}
}
package com.hp.cmsz.repository;
import com.hp.cmsz.entity.FlowAccount;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface FlowAccountDao extends PagingAndSortingRepository<FlowAccount,Long>,JpaSpecificationExecutor<FlowAccount> {
//坐席分析前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)
List<Object[]> seatAnalysisTop();
//坐席分析后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)
List<Object[]> seatAnalysisLast();
//坐席*接待客户分析实时(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)
List<Object[]> seatsReceptionUser();
//坐席*接待客户分析当月1号到当前时间(TIME1_MOBILE_CNT:无法使用客户数 TIME2_MOBILE_CNT:可容忍客户数 TIME3_MOBILE_CNT:不满意客户数)
@Query(value="select trunc(STATS_TIME) as 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>=trunc(sysdate,'mm') group by trunc(STATS_TIME) order by STATS_TIME", nativeQuery=true)
List<Object[]> seatsReceptionUserMonth();
}
package com.hp.cmsz.repository;
import com.hp.cmsz.entity.FlowBrowser;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface FlowBrowserDao extends PagingAndSortingRepository<FlowBrowser,Long>,JpaSpecificationExecutor<FlowBrowser> {
//服务器相关情况分析:客户端兼容性分析实时
@Query(value="select BROWSER,ACTIVE_ACCOUNT_CNT,TRANS_CNT,TRANS_AVAIL from (select BROWSER,ACTIVE_ACCOUNT_CNT,TRANS_CNT,TRANS_AVAIL*100 as TRANS_AVAIL,rank()over(order by STATS_TIME desc) as rank from ccolap.app_sm_db_browser_kpi_t where STATS_TIME>=trunc(sysdate))a where rank=1 order by TRANS_AVAIL desc limit 10", nativeQuery=true)
List<Object[]> clientCompatibility();
//服务器相关情况分析:客户端兼容性分析当月1号到当前时间
@Query(value="select BROWSER,sum(ACTIVE_ACCOUNT_CNT) as ACTIVE_ACCOUNT_CNT,sum(TRANS_CNT) as TRANS_CNT,round(avg(TRANS_AVAIL*100),2) as TRANS_AVAIL from ccolap.app_sm_db_browser_kpi_t where STATS_TIME>=trunc(sysdate,'mm') group by BROWSER order by TRANS_AVAIL desc limit 10", nativeQuery=true)
List<Object[]> clientCompatibilityMonth();
//服务器相关情况分析: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)
List<Object[]> httpInformation();
//服务器相关情况分析: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)
List<Object[]> httpInformationMonth();
}
package com.hp.cmsz.repository;
import com.hp.cmsz.entity.FlowClient;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface FlowClientDao extends PagingAndSortingRepository<FlowClient,Long>,JpaSpecificationExecutor<FlowClient> {
//用户IP分析:TOP10实时
@Query(value="select CLIENT_IP,TRANS_CNT,MOBILE_CNT,cast (round(TRANS_AVAIL_CNT/TRANS_CNT*100,2) as numeric (18,2)) as RATE,cast (TRANS_TIME_SUM/TRANS_CNT as numeric (18,2))as TIME_AVG from (select CLIENT_IP,TRANS_CNT,MOBILE_CNT,TRANS_AVAIL_CNT,TRANS_TIME_SUM,rank()over(order by STATS_TIME desc) as rank from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate))a where rank =1 order by TRANS_CNT desc limit 10", nativeQuery=true)
List<Object[]> userIp();
//用户IP分析:TOP10当月1号到当前时间
@Query(value="select CLIENT_IP,TRANS_CNT,MOBILE_CNT,cast (round(TRANS_AVAIL_CNT/TRANS_CNT*100,2) as numeric (18,2)) as RATE,cast (TRANS_TIME_SUM/TRANS_CNT as numeric (18,2))as TIME_AVG from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate,'mm') order by TRANS_CNT desc limit 10", nativeQuery=true)
List<Object[]> userIpMonth();
//用户IP业务分布:TOP10实时
@Query(value="SELECT \n" +
"sum(decode(TRANS_NAME_NEW,'宽带开户',cnt1,0)) as CNT1," +
"sum(decode(TRANS_NAME_NEW,'资料变更',cnt1,0)) as CNT2," +
"sum(decode(TRANS_NAME_NEW,'产品变更',cnt1,0)) as CNT3," +
"sum(decode(TRANS_NAME_NEW,'套餐变更',cnt1,0)) as CNT4," +
"sum(decode(TRANS_NAME_NEW,'综合账单查询',cnt1,0)) as CNT5," +
"sum(decode(TRANS_NAME_NEW,'充值缴费',cnt1,0)) as CNT6," +
"sum(decode(TRANS_NAME_NEW,'资金变化查询',cnt1,0)) as CNT7," +
"sum(decode(TRANS_NAME_NEW,'详单查询',cnt1,0)) as CNT8," +
"sum(decode(TRANS_NAME_NEW,'积分查询',cnt1,0)) as CNT9," +
"sum(decode(TRANS_NAME_NEW,'其他',cnt1,0)) as CNT10," +
"CLIENT_IP,CNT from" +
" (SELECT A.CLIENT_IP,TRANS_NAME_NEW,cnt1,cnt FROM " +
"(SELECT CLIENT_IP,TRANS_NAME_NEW,sum(TRANS_CNT) as cnt1 FROM " +
"(select CLIENT_IP,TRANS_CNT,TRANS_NAME_NEW," +
"rank()over(order by STATS_TIME desc) as rank from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate))a " +
"WHERE rank=1 group by CLIENT_IP,TRANS_NAME_NEW)A," +
"(SELECT CLIENT_IP,sum(TRANS_CNT) as CNT FROM " +
"(select CLIENT_IP,TRANS_CNT," +
"rank()over(order by STATS_TIME desc) as rank from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate))a " +
"WHERE rank=1 group by CLIENT_IP ORDER BY CNT DESC LIMIT 10)B WHERE A.CLIENT_IP=B.CLIENT_IP)A group by CLIENT_IP,CNT ORDER BY CNT DESC", nativeQuery=true)
List<Object[]> ipBusiness();
//用户IP业务分布:TOP10当月1号到当前时间
@Query(value="SELECT \n" +
"sum(decode(TRANS_NAME_NEW,'宽带开户',cnt1,0)) as CNT1," +
"sum(decode(TRANS_NAME_NEW,'资料变更',cnt1,0)) as CNT2," +
"sum(decode(TRANS_NAME_NEW,'产品变更',cnt1,0)) as CNT3," +
"sum(decode(TRANS_NAME_NEW,'套餐变更',cnt1,0)) as CNT4," +
"sum(decode(TRANS_NAME_NEW,'综合账单查询',cnt1,0)) as CNT5," +
"sum(decode(TRANS_NAME_NEW,'充值缴费',cnt1,0)) as CNT6," +
"sum(decode(TRANS_NAME_NEW,'资金变化查询',cnt1,0)) as CNT7," +
"sum(decode(TRANS_NAME_NEW,'详单查询',cnt1,0)) as CNT8," +
"sum(decode(TRANS_NAME_NEW,'积分查询',cnt1,0)) as CNT9," +
"sum(decode(TRANS_NAME_NEW,'其他',cnt1,0)) as CNT10," +
"CLIENT_IP,CNT from" +
" (SELECT A.CLIENT_IP,TRANS_NAME_NEW,cnt1,cnt FROM " +
"(SELECT CLIENT_IP,TRANS_NAME_NEW,sum(TRANS_CNT) as cnt1 FROM " +
"ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate,'mm') " +
"group by CLIENT_IP,TRANS_NAME_NEW)A," +
"(SELECT CLIENT_IP,sum(TRANS_CNT) as CNT FROM " +
"(select CLIENT_IP,TRANS_CNT," +
"rank()over(order by STATS_TIME desc) as rank from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate))a " +
"WHERE rank=1 group by CLIENT_IP ORDER BY CNT DESC LIMIT 10)B WHERE A.CLIENT_IP=B.CLIENT_IP)A group by CLIENT_IP,CNT ORDER BY CNT DESC", nativeQuery=true)
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);
}
package com.hp.cmsz.repository;
import com.hp.cmsz.entity.FlowHallBusiness;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface FlowHallBusinessDao extends PagingAndSortingRepository<FlowHallBusiness,Long>,JpaSpecificationExecutor<FlowHallBusiness> {
//营业厅业务量分析查找营业厅
@Query(value="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", nativeQuery=true)
List<String> hall();
//营业厅业务量分析查找营业厅当月
@Query(value="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", nativeQuery=true)
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)
List<Object[]> businessOffice(String hall);
//营业厅业务量分析当月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)
List<Object[]> businessOfficeMonth(String hall);
}
package com.hp.cmsz.repository;
import com.hp.cmsz.entity.FlowMonitorCator;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface FlowMonitorCatonDao extends PagingAndSortingRepository<FlowMonitorCator,Long>,JpaSpecificationExecutor<FlowMonitorCator> {
//营业厅卡顿及业务量分析营业厅卡顿用户数实时(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)
List<Object[]> catonUser();
//营业厅卡顿及业务量分析营业厅卡顿用户数当月1号到当前时间
@Query(value="select trunc(STATS_TIME) as 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>=trunc(sysdate,'mm') group by trunc(STATS_TIME) order by STATS_TIME", nativeQuery=true)
List<Object[]> catonUserMonth();
}
package com.hp.cmsz.repository;
import com.hp.cmsz.entity.FlowMonitor;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface FlowMonitorDao extends PagingAndSortingRepository<FlowMonitor,Long>,JpaSpecificationExecutor<FlowMonitor> {
//地市坐席活跃度分析实时
@Query(value="select CITY,cast (round(sum(ACTIVE_ACCOUNT_CNT)/sum(TRANS_CNT)*100,2) as numeric (18,2)) as percent from (select TRANS_CNT,ACTIVE_ACCOUNT_CNT,CITY,rank()over(order by STATS_TIME desc) as rank from ccolap.app_sm_db_city_kpi_t where STATS_TIME>=trunc(sysdate))a where rank=1 group by CITY order by percent desc", nativeQuery=true)
List<Object[]> seatsActiveness();
//地市坐席活跃度分析当月1号到当前时间
@Query(value="select CITY,cast (round(sum(ACTIVE_ACCOUNT_CNT)/sum(TRANS_CNT)*100,2) as numeric (18,2)) as percent from ccolap.app_sm_db_city_kpi_t where STATS_TIME>=trunc(sysdate,'mm') group by CITY order by percent desc", nativeQuery=true)
List<Object[]> seatsActivenessMonth();
//地市性能稳定率分析实时(Q1:最小值,Q2:下四分位数,Q3:中位数,Q4:上四分位数,Q5:最大值,L1:下边缘值,L5:上边缘值)
@Query(value="SELECT A.CITY,L1,Q2,Q3,Q4,L5,PERCENT FROM\n" +
"(select distinct\n" +
"Q4+1.5*(Q4-Q2) AS L5,--上边缘值\n" +
"Q2-1.5*(Q4-Q2) AS L1,--下边缘值\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(.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(.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" +
"CITY from (select TIME_AVG,CITY from\n" +
"(select TIME_AVG,CITY,rank()over(order by STATS_TIME desc) as rank\n" +
"from ccolap.app_sm_db_city_kpi_t )a where rank=1)a)b)A,\n" +
"(select cast (round(sum(TIMEOUT_CNT)/sum(TRANS_CNT)*100,2) as numeric (18,2)) as percent,CITY from\n" +
"(select TRANS_CNT,TIMEOUT_CNT,CITY,rank()over(order by STATS_TIME desc) as rank\n" +
"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();
//地市性能稳定率分析当月1号到当前时间(Q1:最小值,Q2:下四分位数,Q3:中位数,Q4:上四分位数,Q5:最大值,L1:下边缘值,L5:上边缘值)
@Query(value="SELECT A.CITY,L1,Q2,Q3,Q4,L5,PERCENT FROM\n" +
"(select distinct\n" +
"Q4+1.5*(Q4-Q2) AS L5,--上边缘值\n" +
"Q2-1.5*(Q4-Q2) AS L1,--下边缘值\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(.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(.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" +
"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" +
"(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)
List<Object[]> performanceStabilityMonth();
}
package com.hp.cmsz.repository;
import com.hp.cmsz.entity.FlowServer;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface FlowServerDao extends PagingAndSortingRepository<FlowServer,Long>,JpaSpecificationExecutor<FlowServer> {
//服务器相关情况分析:服务器实例分析实时
@Query(value = "select SERVER_IP,TRANS_AVAIL,TRANS_AVG,TRANS_CNT,ACTIVE_ACCOUNT_CNT from (select SERVER_IP,TRANS_AVAIL*100 as TRANS_AVAIL,TRANS_AVG,TRANS_CNT,ACTIVE_ACCOUNT_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 TRANS_AVAIL desc limit 10", nativeQuery = true)
List<Object[]> serverExample();
//服务器相关情况分析:服务器实例分析当月1号到当前时间
@Query(value = "select SERVER_IP,round(avg(TRANS_AVAIL*100),2) as TRANS_AVAIL,round(avg(TRANS_AVG),2) as TRANS_AVG,sum(TRANS_CNT) as TRANS_CNT,sum(ACTIVE_ACCOUNT_CNT) as ACTIVE_ACCOUNT_CNT from ccolap.app_sm_db_server_kpi_t where STATS_TIME>=trunc(sysdate,'mm') group by SERVER_IP order by TRANS_AVAIL desc limit 10", nativeQuery = true)
List<Object[]> serverExampleMonth();
}
......@@ -2,13 +2,22 @@ package com.hp.cmsz.web.monitoroperation;
import com.google.gson.Gson;
import com.hp.cmsz.entity.Province;
import com.hp.cmsz.repository.ProvinceDao;
import com.hp.cmsz.repository.*;
import com.hp.cmsz.service.CmszOperationLogService;
import com.hp.cmsz.web.PageURLController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -25,6 +34,30 @@ public class FlowMonitorController {
@Autowired
private ProvinceDao provinceDao;
@Autowired
private FlowMonitorDao flowMonitorDao;
@Autowired
private FlowMonitorCatonDao flowMonitorCatonDao;
@Autowired
private FlowHallBusinessDao flowHallBusinessDao;
@Autowired
private FlowAccountDao flowAccountDao;
@Autowired
private FlowClientDao flowClientDao;
@Autowired
private FlowServerDao flowServerDao;
@Autowired
private FlowBrowserDao flowBrowserDao;
@Autowired
private CmszOperationLogService cmszOperationLogService;
@RequestMapping(method = RequestMethod.GET)
public String FlowMonitor(Map model) {
......@@ -35,4 +68,247 @@ public class FlowMonitorController {
model.put("provinceList", provinceList);
return PageURLController.FlowMonitor;
}
//地市坐席活跃度分析
@RequestMapping(value = "/seatsActiveness",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findSeatsActiveness(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> seatsActivenessList = new ArrayList<Object[]>();
seatsActivenessList = flowMonitorDao.seatsActiveness();
return seatsActivenessList;
}
//地市坐席活跃度分析当月
@RequestMapping(value = "/seatsActivenessMonth",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findSeatsActivenessMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> seatsActivenessMonthList = new ArrayList<Object[]>();
seatsActivenessMonthList = flowMonitorDao.seatsActivenessMonth();
return seatsActivenessMonthList;
}
//地市性能稳定率分析
@RequestMapping(value = "/performanceStability",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findPerformanceStability(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> performanceStabilityList = new ArrayList<Object[]>();
performanceStabilityList = flowMonitorDao.performanceStability();
return performanceStabilityList;
}
//地市性能稳定率分析当月
@RequestMapping(value = "/performanceStabilityMonth",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findPerformanceStabilityMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> performanceStabilityMonthList = new ArrayList<Object[]>();
performanceStabilityMonthList = flowMonitorDao.performanceStabilityMonth();
return performanceStabilityMonthList;
}
//营业厅卡顿用户数
@RequestMapping(value = "/catonUser",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findCatonUser(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> catonUserList = new ArrayList<Object[]>();
catonUserList = flowMonitorCatonDao.catonUser();
return catonUserList;
}
//营业厅卡顿用户数当月
@RequestMapping(value = "/catonUserMonth",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findCatonUserMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> catonUserMonthList = new ArrayList<Object[]>();
catonUserMonthList = flowMonitorCatonDao.catonUserMonth();
return catonUserMonthList;
}
//坐席分析前top10
@RequestMapping(value = "/seatAnalysisTop",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findBusinessPerformanceTop(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> seatAnalysisTopList = new ArrayList<Object[]>();
seatAnalysisTopList = flowAccountDao.seatAnalysisTop();
return seatAnalysisTopList;
}
//坐席分析后top10
@RequestMapping(value = "/seatAnalysisLast",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findBusinessPerformanceLast(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> seatAnalysisLastList = new ArrayList<Object[]>();
seatAnalysisLastList = flowAccountDao.seatAnalysisLast();
return seatAnalysisLastList;
}
//营业厅业务量分析
@RequestMapping(value = "/businessOffice",method = RequestMethod.GET)
@ResponseBody
public List<List<Object[]>> findBusinessOffice(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> businessOfficeList = new ArrayList<Object[]>();
List<List<Object[]>> list = new ArrayList<List<Object[]>>();
List<String> hallList = new ArrayList<String>();
hallList = flowHallBusinessDao.hall();
for(String hall : hallList){
businessOfficeList = flowHallBusinessDao.businessOffice(hall);
list.add(businessOfficeList);
}
return list;
}
//营业厅业务量分析当月
@RequestMapping(value = "/businessOfficeMonth",method = RequestMethod.GET)
@ResponseBody
public List<List<Object[]>> findBusinessOfficeMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> businessOfficeMonthList = new ArrayList<Object[]>();
List<String> hallList = new ArrayList<String>();
List<List<Object[]>> list = new ArrayList<List<Object[]>>();
hallList = flowHallBusinessDao.hallMonth();
for(String hall : hallList) {
businessOfficeMonthList = flowHallBusinessDao.businessOfficeMonth(hall);
list.add(businessOfficeMonthList);
}
return list;
}
//坐席*接待客户分析
@RequestMapping(value = "/seatsReceptionUser",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findSeatsReceptionUser(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> seatsReceptionUserList = new ArrayList<Object[]>();
seatsReceptionUserList = flowAccountDao.seatsReceptionUser();
return seatsReceptionUserList;
}
//坐席*接待客户分析当月
@RequestMapping(value = "/seatsReceptionUserMonth",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findSeatsReceptionUserMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> seatsReceptionUserMonthList = new ArrayList<Object[]>();
seatsReceptionUserMonthList = flowAccountDao.seatsReceptionUserMonth();
return seatsReceptionUserMonthList;
}
//用户IP分析:TOP10
@RequestMapping(value = "/userIp",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findUserIp(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> userIpList = new ArrayList<Object[]>();
userIpList = flowClientDao.userIp();
return userIpList;
}
//用户IP分析:TOP10当月
@RequestMapping(value = "/userIpMonth",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findUserIpMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> userIpMonthList = new ArrayList<Object[]>();
userIpMonthList = flowClientDao.userIpMonth();
return userIpMonthList;
}
//用户IP业务分布:TOP10
@RequestMapping(value = "/ipBusiness",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findIpBusiness(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> ipBusinessList = new ArrayList<Object[]>();
ipBusinessList = flowClientDao.ipBusiness();
return ipBusinessList;
}
//用户IP业务分布:TOP10当月
@RequestMapping(value = "/ipBusinessMonth",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findIpBusinessMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> ipBusinessMonthList = new ArrayList<Object[]>();
ipBusinessMonthList = flowClientDao.ipBusinessMonth();
return ipBusinessMonthList;
}
//用户IP趋势图
@RequestMapping(value = "/ipTrend",method = RequestMethod.GET)
@ResponseBody
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();
for(String ip : ipList){
System.out.println("123");
List<Object[]> ipTrendList = flowClientDao.ipTrend(ip);
list.add(ipTrendList);
}
return list;
}
//用户IP趋势图当月
@RequestMapping(value = "/ipTrendMonth",method = RequestMethod.GET)
@ResponseBody
public List<List<Object[]>> findIpTrendMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<String> ipList = new ArrayList<String>();
List<List<Object[]>> list = new ArrayList<List<Object[]>>();
List<Object[]> ipTrendMonthList = new ArrayList<Object[]>();
ipList = flowClientDao.findIp();
for(String ip : ipList){
ipTrendMonthList = flowClientDao.ipTrendMonth(ip);
list.add(ipTrendMonthList);
}
return list;
}
//服务器实例分析:
@RequestMapping(value = "/serverExample",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findServerExample(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> serverExampleList = new ArrayList<Object[]>();
serverExampleList = flowServerDao.serverExample();
return serverExampleList;
}
//服务器实例分析当月:
@RequestMapping(value = "/serverExampleMonth",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findServerExampleMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> serverExampleMonthList = new ArrayList<Object[]>();
serverExampleMonthList = flowServerDao.serverExampleMonth();
return serverExampleMonthList;
}
//客户端兼容性分析:
@RequestMapping(value = "/clientCompatibility",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findClientCompatibility(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> clientCompatibilityList = new ArrayList<Object[]>();
clientCompatibilityList = flowBrowserDao.clientCompatibility();
return clientCompatibilityList;
}
//客户端兼容性分析当月:
@RequestMapping(value = "/clientCompatibilityMonth",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findClientCompatibilityMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> clientCompatibilityMonthList = new ArrayList<Object[]>();
clientCompatibilityMonthList = flowBrowserDao.clientCompatibilityMonth();
return clientCompatibilityMonthList;
}
//HTTP状态码分析:
@RequestMapping(value = "/httpInformation",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findHttpInformation(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> httpInformationList = new ArrayList<Object[]>();
httpInformationList = flowBrowserDao.httpInformation();
return httpInformationList;
}
//HTTP状态码分析当月:
@RequestMapping(value = "/httpInformationMonth",method = RequestMethod.GET)
@ResponseBody
public List<Object[]> findHttpInformationMonth(HttpServletRequest request, HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
List<Object[]> httpInformationMonthList = new ArrayList<Object[]>();
httpInformationMonthList = flowBrowserDao.httpInformationMonth();
return httpInformationMonthList;
}
}
......@@ -114,7 +114,7 @@
<ul class="dropdown-menu">
<li><a href="${ctx}/MonitorOperation/RegularityAnalysis">数据特征探查</a></li>
<li><a href="${ctx}/MonitorOperation/KeyLinkProcessAnalysis">业务环节分析</a></li>
<%--<li><a href="${ctx}/MonitorOperation/FlowMonitor">实体厅流量监测分析</a></li>--%>
<li><a href="${ctx}/MonitorOperation/FlowMonitor">实体厅流量监测分析</a></li>
</ul>
</li>
</shiro:hasPermission>
......
......@@ -11,6 +11,14 @@
.divTitle{
color:#333333;background-color: #f5f5f5;border-color: #dddddd;font-size: 14px;border-top: 1px solid #dddddd;padding:10px 0 10px 10px;font-weight: bold;
}
.chartTable thead{
color:rgb(23,138,234);
}
.chartTable th,td{
text-align:center;
border-bottom: 1px solid #e3e3e3;
border-right:1px solid #e3e3e3;
}
</style>
</head>
<body>
......@@ -78,11 +86,12 @@
<div class="row" id="row">
<div class="panel panel-default" style="width: 1080px">
<div class="panel-heading ">
<span id="provinceChange">河南</span>省各地市业务量占比
<div class="panel-heading " style="height: 50px">
<div style="display: inline"><span id="provinceChange">江苏</span>省各地市业务量占比</div>
<a href="javascript:void(0)" onclick="seatsActiveness()" style="margin-left: 800px;display: inline;">实时</a><a href="javascript:void(0)" onclick="seatsActivenessMonth()" style="margin-left: 10px">当月</a>
</div>
<div class="panel-body" style="width: 1060px">
<div id="seatsActiveness"></div>
<div id="seatsActiveness" style="height: 350px;width: 1060px;"></div>
</div>
</div>
......@@ -90,9 +99,10 @@
<div class="panel panel-default" style="width: 1080px">
<div class="panel-heading ">
地市性能稳定性
<a href="javascript:void(0)" onclick="performanceStability()" style="margin-left: 850px;display: inline;">实时</a><a href="javascript:void(0)" onclick="performanceStabilityMonth()" style="margin-left: 10px">当月</a>
</div>
<div class="panel-body" style="width: 1060px">
<div id="performanceStability"></div>
<div id="performanceStability" style="height: 350px;width: 1060px;"></div>
</div>
</div>
......@@ -100,38 +110,42 @@
<div class="panel panel-default" style="width: 1080px">
<div class="panel-body" style="width: 1060px">
<div id="card1" style="width: 530px">
<div id="caton1" style="width: 500px;height:350px;margin:10px;float:left;">
<div class="divTitle">
营业厅卡顿用户数
<a href="javascript:void(0)" onclick="catonUser();" style="margin-left: 300px;display: inline;">实时</a><a href="javascript:void(0)" onclick="catonUserMonth();" style="margin-left: 10px">当月</a>
</div>
<div id="cardUser">
<div id="catonUser" style="width: 500px;height:300px;">
</div>
</div>
<div id="card2" style="width: 530px">
<div class="divTitle">
各地市业务性能情况
<div id="caton2" style="width: 500px;height:350px;margin:10px;float: left;">
<div class="divTitle" style="width: 500px;">
坐席分析
<a href="javascript:void(0)" onclick="seatAnalysisTop();" style="margin-left: 270px;display: inline;">前TOP10</a><a href="javascript:void(0)" onclick="seatAnalysisLast();" style="margin-left: 10px">后TOP10</a>
</div>
<div id="businessPerformance">
<div id="seatAnalysis" style="width: 500px;height:300px;">
</div>
</div>
<div id="card3" style="width: 530px">
<div id="caton3" style="width: 500px;height:350px;margin:10px;float: left;">
<div class="divTitle">
营业厅业务量
<a href="javascript:void(0)" onclick="businessOffice();" style="margin-left: 310px;display: inline;">实时</a><a href="javascript:void(0)" onclick="businessOfficeMonth();" style="margin-left: 10px">当月</a>
</div>
<div id="businessOffice">
<div id="businessOffice" style="width: 500px;height:300px;">
</div>
</div>
<div id="card4" style="width: 530px">
<div class="divTitle">
<div id="caton4" style="width: 500px;height:350px;margin:10px;float: left;">
<div class="divTitle" style="width: 500px;">
坐席×接待客户分析
<a href="javascript:void(0)" onclick="seatsReceptionUser();" style="margin-left: 280px;display: inline;">实时</a><a href="javascript:void(0)" onclick="seatsReceptionUserMonth();" style="margin-left: 10px">当月</a>
</div>
<div id="seatsReceptionUser">
<div id="seatsReceptionUser" style="width: 500px;height:300px;">
</div>
</div>
......@@ -140,57 +154,84 @@
</div>
<div class="panel panel-default" style="width: 1080px">
<div class="panel-body" style="width: 1060px">
<div class="panel-body" style="width: 1060px;height:630px;">
<div id="user1" style="width: 530px">
<div class="divTitle">
<div style="width: 500px;height:630px;margin:10px;float: left;">
<div id="user1" style="width: 500px;height:250px;float: left;">
<div class="divTitle" style="width:500px;">
用户IP分析(TOP10)
<a href="javascript:void(0)" onclick="userIp();" style="margin-left: 270px;display: inline;">实时</a><a href="javascript:void(0)" onclick="userIpMonth();" style="margin-left: 10px">当月</a>
</div>
<div id="userIp">
<table id="userIpTable" class="chartTable">
<thead>
<tr><th style="width: 120px;">用户IP</th><th style="width: 100px;">业务量</th><th style="width: 100px;">用户数</th><th style="width: 80px;">可用性</th><th style="width: 100px;">均时长</th>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div id="user2" style="width: 530px">
<div class="divTitle">
<div id="user2" style="width: 500px;height:350px;margin:10px;float: left;">
<div class="divTitle" style="width:500px;">
用户IP业务分布(TOP10)
<a href="javascript:void(0)" onclick="ipBusiness();" style="margin-left: 250px;display: inline;">实时</a><a href="javascript:void(0)" onclick="ipBusinessMonth();" style="margin-left: 10px">当月</a>
</div>
<div id="ipBusiness">
<div id="ipBusiness" style="width:500px;height:300px;">
</div>
</div>
</div>
<div id="user3" style="width: 530px">
<div class="divTitle">
<div id="user3" style="width: 500px;height:580px;margin:10px;float: left;">
<div class="divTitle" style="width:500px;">
用户IP趋势分析(TOP10)
<a href="javascript:void(0)" onclick="ipTrend();" style="margin-left: 250px;display: inline;">实时</a><a href="javascript:void(0)" onclick="ipTrendMonth();" style="margin-left: 10px">当月</a>
</div>
<div id="ipTrend">
<div id="ipTrend" style="width:500px;height:570px;">
</div>
</div>
</div>
</div>
<div class="panel panel-default" style="width: 1080px">
<div class="panel panel-default" style="width: 1080px;height:550px;">
<div class="panel-body" style="width: 1060px">
<div id="server1" style="width: 530px">
<div id="server1" style="width: 500px;height:530px;margin:10px;float: left;">
<div class="divTitle">
服务器实例分析
<a href="javascript:void(0)" onclick="serverExample();" style="margin-left: 295px;display: inline;">实时</a><a href="javascript:void(0)" onclick="serverExampleMonth();" style="margin-left: 10px">当月</a>
</div>
<div id="serverExample">
<table id="serverExampleTable" class="chartTable" style="height: 470px">
<thead>
<tr><th style="width: 120px;height: 30px;">服务器实例</th><th style="width: 100px;">可用性</th><th style="width: 100px;">性能</th><th style="width: 100px;">业务量</th><th style="width: 80px;">用户数</th>
</thead>
<tbody id="addServerExample"></tbody>
</table>
</div>
</div>
<div id="server2" style="width: 530px">
<div class="divTitle">
<div id="server2" style="width: 500px;height:530px;margin:10px;float: left;">
<div class="divTitle" >
客户端兼容性分析
<a href="javascript:void(0)" onclick="clientCompatibility();" style="margin-left: 290px;display: inline;">实时</a><a href="javascript:void(0)" onclick="clientCompatibilityMonth();" style="margin-left: 10px">当月</a>
</div>
<div id="clientCompatibility">
<div id="browserInformation">
<div id="clientCompatibility" style="width: 500px;height:500px;float: left;">
<div id="browserInformation" style="width: 500px;height:200px;margin:10px;">
<table id="browserInformationTable" class="chartTable">
<thead>
<tr><th style="width: 120px;">浏览器信息</th><th style="width: 120px;">用户数</th><th style="width: 120px;">业务量</th><th style="width: 120px;">可用性</th>
</thead>
<tbody id="addBrowserInformation"></tbody>
</table>
</div>
<div id="httpInformation">
<div id="httpInformation" style="width: 500px;height:240px;float: left;">
<div class="divTitle">
HTTP状态码分析
<a href="javascript:void(0)" onclick="httpInformation();" style="margin-left: 290px;display: inline;">实时</a><a href="javascript:void(0)" onclick="httpInformationMonth();" style="margin-left: 10px">当月</a>
</div>
<div id="httpState" style="width: 500px;height:220px;float: left;">
</div>
</div>
</div>
......@@ -211,6 +252,1298 @@
</div>
</div>
</div>
<script type="text/javascript" src="${ctx}/static/js/echarts.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
timer();
});
function load() {
seatsActiveness();
performanceStability();
catonUser();
seatAnalysisTop();
businessOffice();
seatsReceptionUser();
userIp();
ipBusiness();
ipTrend();
serverExample();
clientCompatibility();
httpInformation();
}
function timer() {
var interval = window.setInterval(load(),300000);
}
//格式化日期
function Format(){
this.jsjava_class="jsjava.text.Format";
}
function DateFormat(){
this.jsjava_class="jsjava.text.DateFormat";
}
DateFormat.prototype=new Format();
DateFormat.prototype.constructor=DateFormat;
DateFormat.zh_cn_month2=["01","02","03","04","05","06","07","08","09","10","11","12"];
DateFormat.zh_cn_month3=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708",];
DateFormat.zh_cn_month4=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708",];
DateFormat.en_us_month4=["Janu","Febr","Marc","Apri","May","Juhn","July","Augu","Sept","Octo","Nove","Dece"];
DateFormat.en_us_month3=["Jan","Feb","Mar","Apr","May","Juh","Jul","Aug","Sep","Oct","Nov","Dec"];
DateFormat.en_us_month2=["01","02","03","04","05","06","07","08","09","10","11","12"];
DateFormat.zh_cn_week=["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"];
DateFormat.zh_cn_am="\u4e0b\u5348";
DateFormat.zh_cn_pm="\u4e0a\u5348";
DateFormat.language=(navigator.userLanguage==undefined?navigator.language:navigator.userLanguage).replace("-","_").toLowerCase();
DateFormat.prototype.format=function(date){
var year4=date.getFullYear();
var year2=year4.toString().substring(2);
var pattern=this.pattern;
pattern=pattern.replace(/yyyy/,year4);
pattern=pattern.replace(/yy/,year2);
var month=date.getMonth();
pattern=pattern.replace(/MMMM/,eval("DateFormat."+DateFormat.language+"_month4[month]"));
pattern=pattern.replace(/MMM/,eval("DateFormat."+DateFormat.language+"_month3[month]"));
pattern=pattern.replace(/MM/,eval("DateFormat."+DateFormat.language+"_month2[month]"));
var dayOfMonth=date.getDate();
var dayOfMonth2=dayOfMonth;
var dayOfMonthLength=dayOfMonth.toString().length;
if(dayOfMonthLength==1){
dayOfMonth2="0"+dayOfMonth;
}
pattern=pattern.replace(/dd/,dayOfMonth2);
pattern=pattern.replace(/d/,dayOfMonth);
var hours=date.getHours();
var hours2=hours;
var hoursLength=hours.toString().length;
if(hoursLength==1){
hours2="0"+hours;
}
pattern=pattern.replace(/HH/,hours2);
pattern=pattern.replace(/H/,hours);
var minutes=date.getMinutes();
var minutes2=minutes;
var minutesLength=minutes.toString().length;
if(minutesLength==1){
minutes2="0"+minutes;
}
pattern=pattern.replace(/mm/,minutes2);
pattern=pattern.replace(/m/,minutes);
var seconds=date.getSeconds();
var seconds2=seconds;
var secondsLength=seconds.toString().length;
if(secondsLength==1){
seconds2="0"+seconds;
}
pattern=pattern.replace(/ss/,seconds2);
pattern=pattern.replace(/s/,seconds);
var milliSeconds=date.getMilliseconds();
pattern=pattern.replace(/S+/,milliSeconds);
var day=date.getDay();
// pattern=pattern.replace(/E+/,eval("DateFormat."+DateFormat.language+"_week[day]"));
if(hours>12){
pattern=pattern.replace(/a+/,eval("DateFormat."+DateFormat.language+"_am"));
}else{
pattern=pattern.replace(/a+/,eval("DateFormat."+DateFormat.language+"_pm"));
}
var kHours=hours;
if(kHours==0){
kHours=24;
}
var kHours2=kHours;
var kHoursLength=kHours.toString().length;
if(kHoursLength==1){
kHours2="0"+kHours;
}
pattern=pattern.replace(/kk/,kHours2);
pattern=pattern.replace(/k/,kHours);
var KHours=hours;
if(hours>11){
KHours=hours-12;
}
var KHours2=KHours;
var KHoursLength=KHours.toString().length;
if(KHoursLength==1){
KHours2="0"+KHours;
}
pattern=pattern.replace(/KK/,KHours2);
pattern=pattern.replace(/K/,KHours);
var hHours=KHours;
if(hHours==0){
hHours=12;
}
var hHours2=hHours;
var hHoursLength=hHours.toString().length;
if(KHoursLength==1){
hHours2="0"+hHours;
}
pattern=pattern.replace(/hh/,hHours2);
pattern=pattern.replace(/h/,hHours);
return pattern;
};
function SimpleDateFormat(){
this.jsjava_class="jsjava.text.SimpleDateFormat";
}
SimpleDateFormat.prototype=new DateFormat();
SimpleDateFormat.prototype.constructor=SimpleDateFormat;
SimpleDateFormat.prototype.applyPattern=function(pattern){
this.pattern=pattern;
};
var df=new SimpleDateFormat();
df.applyPattern("yyyy-MM-dd HH:mm:ss");
function seatsActivenessChart(city,cityValue) {
var myChart = echarts.init(document.getElementById('seatsActiveness'));
var option = {
title:{
text:null,
subtext:null
},
grid:{
x:50,
y:0,
x2:0,
y2:20,
},
xAxis:[
{
type:'value',
show:false,
}
],
yAxis:[
{
type:'category',
data:city
}
],
series:[
{
type:'bar',
data:cityValue,
itemStyle: {
normal: {
color:'#7ecbf2',
label: {
show: true,
position: [950,0],
formatter:'{c}%',
textStyle:{
color:'black'
}
}
}
}
}
],
}
myChart.setOption(option);
}
function performanceStabilityChart(city,boxValue,percent) {
var myChart = echarts.init(document.getElementById('performanceStability'));
var option = {
title:{
text:null,
subtext:null
},
legend: {
data: ['line', 'line2', 'line3']
},
grid:{
x:50,
y:0,
x2:0,
y2:20,
},
tooltip: {
trigger: 'item',
},
xAxis: {
type: 'value',
show:false,
},
yAxis: {
type: 'category',
data: city,
boundaryGap: true,
splitArea: {
show: false
},
splitLine: {
show: false
}
},
series: [
{
type: 'boxplot',
data: boxValue,
tooltip: {
formatter: function (param) {
return [
'下边缘值: ' + param.data[1],
'下四分位数: ' + param.data[2],
'中位数: ' + param.data[3],
'上四位数: ' + param.data[4],
'上边缘值: ' + param.data[5]
].join('<br/>')
}
}
},
{
type:'bar',
show:false,
data:percent,
itemStyle: {
normal: {
color:'#7ecbf2',
label: {
show: true,
position: [950,0],
formatter:'{c}%',
textStyle:{
color:'black'
}
}
}
}
}
],
}
myChart.setOption(option);
}
function catonUserChart(time,time1Account,time2Account,time3Account) {
var myChart = echarts.init(document.getElementById('catonUser'));
var option = {
title:{
text:null,
subtext:null
},
tooltip: {
trigger: 'axis',
},
grid:{
x:60,
y:20,
x2:40,
y2:40,
},
legend: {
data:['无法使用','可容忍','不满意']
},
xAxis:[
{
type:'category',
data:time,
splitLine:{
show:false
},
}
],
yAxis:[
{
type:'value',
splitLine:{
show:false
}
}
],
series:[
{
name:'无法使用',
type:'line',
data:time1Account,
smooth: true
},
{
name:'可容忍',
type:'line',
data:time2Account,
smooth: true
},
{
name:'不满意',
type:'line',
data:time3Account,
smooth: true
}
],
}
myChart.setOption(option);
}
function seatAnalysisChart(account,transCnt,transAvail,transTime) {
var myChart = echarts.init(document.getElementById('seatAnalysis'));
var option = {
title:{
text:null,
subtext:null
},
tooltip : {
trigger: 'axis'
},
legend: {
data:['业务量','成功量','均时长']
},
xAxis : [
{
type : 'category',
splitLine:{
show:false
},
data : ['坐\n席\n一','坐\n席\n二','坐\n席\n三','坐\n席\n四','坐\n席\n五','坐\n席\n六','坐\n席\n七','坐\n席\n八','坐\n席\n九','坐\n席\n十']
}
],
yAxis : [
{
type : 'value',
splitLine:{
show:false
},
},
{
type : 'value',
splitLine:{
show:false
},
}
],
series : [
{
name:'业务量',
type:'bar',
data:transCnt
},
{
name:'成功量',
type:'bar',
data:transAvail
},
{
name:'均时长',
type:'line',
yAxisIndex: 1,
data:transTime
}
]
}
myChart.setOption(option);
}
function businessOfficeChart(hallList,dataList,time){
var myChart = echarts.init(document.getElementById('businessOffice'));
var option = {
title:{
text:null,
subtext:null
},
tooltip : {
trigger: 'axis'
},
legend: {
data:['营业厅1','营业厅2','营业厅3','营业厅4','营业厅5']
},
xAxis:[
{
type: 'category',
data: time,
splitLine: {
show: false
},
}
],
yAxis:[
{
type:'value',
splitLine:{
show:false
}
}
],
series:[
{
name:'营业厅1',
type:'line',
data:dataList[0],
smooth: true
},
{
name:'营业厅2',
type:'line',
data:dataList[1],
smooth: true
},
{
name:'营业厅3',
type:'line',
data:dataList[2],
smooth: true
},
{
name:'营业厅4',
type:'line',
data:dataList[3],
smooth: true
},
{
name:'营业厅5',
type:'line',
data:dataList[4],
smooth: true
}
],
}
myChart.setOption(option);
}
function seatsReceptionUserChart(time,time1Account,time2Account,time3Account){
var myChart = echarts.init(document.getElementById('seatsReceptionUser'));
var option = {
title:{
text:null,
subtext:null
},
tooltip: {
trigger: 'axis',
},
grid:{
x:40,
x2:40,
},
legend: {
data:['无法使用','可容忍','不满意']
},
xAxis:[
{
type: 'category',
data: time,
splitLine: {
show: false
}
}
],
yAxis:[
{
type:'value',
splitLine:{
show:false
}
}
],
series:[
{
name:'无法使用',
type:'line',
itemStyle: {
normal: {
areaStyle: {
type: 'default'
}
}
},
data:time1Account,
smooth: true
},
{
name:'可容忍',
type:'line',
itemStyle: {
normal: {
areaStyle: {
type: 'default'
}
}
},
data:time2Account,
smooth: true
},
{
name:'不满意',
type:'line',
itemStyle: {
normal: {
areaStyle: {
type: 'default'
}
}
},
data:time3Account,
smooth: true
}
],
}
myChart.setOption(option);
}
function ipBusinessChart(cnt1,cnt2,cnt3,cnt4,cnt5,cnt6,cnt7,cnt8,cnt9,cnt10,clientIp,cnt){
var myChart = echarts.init(document.getElementById('ipBusiness'));
var option = {
title: {
text: null,
subtext: null
},
tooltip : {
trigger: 'axis',
},
grid:{
x:100,
x2:20
},
legend: {
data:['宽带开户', '资料变更','产品变更','套餐变更','综合账单查询','充值缴费','资金变化查询','详单查询','积分查询','其他']
},
xAxis : [
{
type : 'value',
splitLine:{
show:false
},
}
],
yAxis : [
{
type : 'category',
data : clientIp,
splitLine:{
show:false
},
}
],
series : [
{
name:'宽带开户',
type:'bar',
stack: '总量',
data:cnt1
},
{
name:'资料变更',
type:'bar',
stack: '总量',
data:cnt2
},
{
name:'产品变更',
type:'bar',
stack: '总量',
data:cnt3
},
{
name:'套餐变更',
type:'bar',
stack: '总量',
data:cnt4
},
{
name:'综合账单查询',
type:'bar',
stack: '总量',
data:cnt5
},
{
name:'充值缴费',
type:'bar',
stack: '总量',
data:cnt6
},
{
name:'资金变化查询',
type:'bar',
stack: '总量',
data:cnt7
},
{
name:'详单查询',
type:'bar',
stack: '总量',
data:cnt8
},
{
name:'积分查询',
type:'bar',
stack: '总量',
data:cnt9
},
{
name:'其他',
type:'bar',
stack: '总量',
data:cnt10
}
]
}
myChart.setOption(option);
}
function httpInformationChart(serverIp,sotherCnt){
var myChart = echarts.init(document.getElementById('httpState'));
var option = {
title: {
text: null,
subtext: null
},
tooltip : {
trigger: 'axis',
},
grid:{
x2:60
},
legend: {
data:['200', '302','404','空白']
},
xAxis : [
{
type : 'category',
data : serverIp,
splitLine:{
show:false
},
}
],
yAxis : [
{
type : 'value',
splitLine:{
show:false
},
}
],
series : [
{
name:'200',
type:'bar',
stack: '总量',
data:sotherCnt
},
{
name:'302',
type:'bar',
stack: '总量',
data:sotherCnt
},
{
name:'404',
type:'bar',
stack: '总量',
data:sotherCnt
},
{
name:'空白',
type:'bar',
stack: '总量',
data:sotherCnt
},
],
}
myChart.setOption(option);
}
function ipTrendChart(time,dataList,ipList) {
var myChart = echarts.init(document.getElementById('ipTrend'));
var option = {
title:{
text:null,
subtext:null
},
tooltip : {
trigger: 'axis'
},
legend: {
data:ipList,
},
xAxis:[
{
type: 'category',
data: time,
splitLine: {
show: false
},
}
],
yAxis:[
{
type:'value',
splitLine:{
show:false
}
}
],
series:[
{
name:ipList[0],
type:'line',
data:dataList[0],
smooth: true
},
{
name:ipList[1],
type:'line',
data:dataList[1],
smooth: true
},
{
name:ipList[2],
type:'line',
data:dataList[2],
smooth: true
},
{
name:ipList[3],
type:'line',
data:dataList[3],
smooth: true
},
{
name:ipList[4],
type:'line',
data:dataList[4],
smooth: true
},
{
name:ipList[5],
type:'line',
data:dataList[5],
smooth: true
}
],
}
myChart.setOption(option);
}
function seatsActiveness() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatsActiveness",
async: false,
success: function(data){
var city = new Array();
var cityValue = new Array();
for(var i=0; i<data.length; i++){
city.push(data[i][0]);
cityValue.push(data[i][1]);
}
city.reverse();
cityValue.reverse();
seatsActivenessChart(city,cityValue);
}
});
}
function seatsActivenessMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatsActivenessMonth",
async: false,
success: function(data){
var city = new Array();
var cityValue = new Array();
for(var i=0; i<data.length; i++){
city.push(data[i][0]);
cityValue.push(data[i][1]);
}
city.reverse();
cityValue.reverse();
seatsActivenessChart(city,cityValue);
}
});
}
function performanceStability() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/performanceStability",
async: false,
success: function(data){
var city = new Array();
var boxValue = [];
var percent = new Array();
for(var i=0; i<data.length; i++){
city.push(data[i][0]);
percent.push(data[i][6]);
boxValue.push([data[i][1],data[i][2],data[i][3],data[i][4],data[i][5]]);
}
city.reverse();
percent.reverse();
boxValue.reverse();
performanceStabilityChart(city,boxValue,percent);
}
});
}
function performanceStabilityMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/performanceStabilityMonth",
async: false,
success: function(data){
var city = new Array();
var boxValue = [];
var percent = new Array();
for(var i=0; i<data.length; i++){
city.push(data[i][0]);
percent.push(data[i][6]);
boxValue.push([data[i][1],data[i][2],data[i][3],data[i][4],data[i][5]]);
}
city.reverse();
percent.reverse();
boxValue.reverse();
performanceStabilityChart(city,boxValue,percent);
}
});
}
function catonUser() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/catonUser",
async: false,
success: function(data){
var time = new Array();
var time1Account = new Array();
var time2Account = new Array();
var time3Account = new Array();
for(var i=0; i<data.length; i++){
time.push(df.format(new Date(data[i][0])));
time1Account.push(data[i][1]);
time2Account.push(data[i][2]);
time3Account.push(data[i][3]);
}
catonUserChart(time,time1Account,time2Account,time3Account);
}
});
}
function catonUserMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/catonUserMonth",
async: false,
success: function(data){
var time = new Array();
var time1Account = new Array();
var time2Account = new Array();
var time3Account = new Array();
for(var i=0; i<data.length; i++){
time.push(df.format(new Date(data[i][0])));
time1Account.push(data[i][1]);
time2Account.push(data[i][2]);
time3Account.push(data[i][3]);
}
catonUserChart(time,time1Account,time2Account,time3Account);
}
});
}
function seatAnalysisTop() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatAnalysisTop",
async: false,
success: function(data){
var account = new Array();
var transCnt = new Array();
var transAvail = new Array();
var transTime = new Array();
for(var i=0; i<data.length; i++){
account.push(data[i][0]);
transCnt.push(data[i][1]);
transAvail.push(data[i][2]);
transTime.push(data[i][3]);
}
seatAnalysisChart(account,transCnt,transAvail,transTime);
}
});
}
function seatAnalysisLast() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatAnalysisLast",
async: false,
success: function(data){
var account = new Array();
var transCnt = new Array();
var transAvail = new Array();
var transTime = new Array();
for(var i=0; i<data.length; i++){
account.push(data[i][0]);
transCnt.push(data[i][1]);
transAvail.push(data[i][2]);
transTime.push(data[i][3]);
}
seatAnalysisChart(account,transCnt,transAvail,transTime);
}
});
}
function businessOffice() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/businessOffice",
async: false,
success: function(data){
var hallList = [];
var time=[];
var dataList=[];
data.forEach(function(t,i){
if(i===0){
t.forEach(function(t1){
time.push(df.format(new Date(t1[2])))
})
}
dataList.push([])
t.forEach(function(t1,j){
if(j===0){
hallList.push(t1[1])
}
dataList[i].push(t1[0])
})
})
businessOfficeChart(hallList,dataList,time);
}
});
}
function businessOfficeMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/businessOfficeMonth",
async: false,
success: function(data){
var hallList = [];
var time=[];
var dataList=[];
data.forEach(function(t,i){
if(i===0){
t.forEach(function(t1){
time.push(df.format(new Date(t1[2])))
})
}
dataList.push([])
t.forEach(function(t1,j){
if(j===0){
hallList.push(t1[1])
}
dataList[i].push(t1[0])
})
})
businessOfficeChart(hallList,dataList,time);
}
});
}
function seatsReceptionUser() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatsReceptionUser",
async: false,
success: function(data){
var time = new Array();
var time1Account = new Array();
var time2Account = new Array();
var time3Account = new Array();
for(var i=0; i<data.length; i++){
time.push(df.format(new Date(data[i][0])));
time1Account.push(data[i][1]);
time2Account.push(data[i][2]);
time3Account.push(data[i][3]);
}
seatsReceptionUserChart(time,time1Account,time2Account,time3Account);
}
});
}
function seatsReceptionUserMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/seatsReceptionUserMonth",
async: false,
success: function(data){
var time = new Array();
var time1Account = new Array();
var time2Account = new Array();
var time3Account = new Array();
for(var i=0; i<data.length; i++){
time.push(df.format(new Date(data[i][0])));
time1Account.push(data[i][1]);
time2Account.push(data[i][2]);
time3Account.push(data[i][3]);
}
seatsReceptionUserChart(time,time1Account,time2Account,time3Account);
}
});
}
function userIp() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/userIp",
async: false,
success: function(data){
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>'+'<td>'+t[4]+'</td>');
tbody.append(tr);
});
$('#userIpTable tbody').replaceWith(tbody);
}
});
}
function userIpMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/userIpMonth",
async: false,
success: function(data){
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>'+'<td>'+t[4]+'</td>');
tbody.append(tr);
});
$('#userIpTable tbody').replaceWith(tbody);
}
});
}
function ipBusiness() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/ipBusiness",
async: false,
success: function(data){
var cnt1 = new Array();
var cnt2 = new Array();
var cnt3 = new Array();
var cnt4 = new Array();
var cnt5 = new Array();
var cnt6 = new Array();
var cnt7 = new Array();
var cnt8 = new Array();
var cnt9 = new Array();
var cnt10 = new Array();
var clientIp = new Array();
var cnt = new Array();
for(var i=0; i<data.length; i++){
cnt1.push(data[i][0]);
cnt2.push(data[i][1]);
cnt3.push(data[i][2]);
cnt4.push(data[i][3]);
cnt5.push(data[i][4]);
cnt6.push(data[i][5]);
cnt7.push(data[i][6]);
cnt8.push(data[i][7]);
cnt9.push(data[i][8]);
cnt10.push(data[i][9]);
clientIp.push(data[i][10]);
cnt.push(data[i][11]);
}
ipBusinessChart(cnt1,cnt2,cnt3,cnt4,cnt5,cnt6,cnt7,cnt8,cnt9,cnt10,clientIp,cnt);
}
});
}
function ipBusinessMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/ipBusinessMonth",
async: false,
success: function(data){
var cnt1 = new Array();
var cnt2 = new Array();
var cnt3 = new Array();
var cnt4 = new Array();
var cnt5 = new Array();
var cnt6 = new Array();
var cnt7 = new Array();
var cnt8 = new Array();
var cnt9 = new Array();
var cnt10 = new Array();
var clientIp = new Array();
var cnt = new Array();
for(var i=0; i<data.length; i++){
cnt1.push(data[i][0]);
cnt2.push(data[i][1]);
cnt3.push(data[i][2]);
cnt4.push(data[i][3]);
cnt5.push(data[i][4]);
cnt6.push(data[i][5]);
cnt7.push(data[i][6]);
cnt8.push(data[i][7]);
cnt9.push(data[i][8]);
cnt10.push(data[i][9]);
clientIp.push(data[i][10]);
cnt.push(data[i][11]);
}
ipBusinessChart(cnt1,cnt2,cnt3,cnt4,cnt5,cnt6,cnt7,cnt8,cnt9,cnt10,clientIp,cnt);
}
});
}
function ipTrend() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/ipTrend",
async: false,
success: function(data){
var dataList=[];
var time=[];
var ipList=[];
data.forEach(function(t,i){
if(i===0){
t.forEach(function(t1){
time.push(df.format(new Date(t1[2])))
})
}
dataList.push([])
t.forEach(function(t1,j){
if(j===0){
ipList.push(t1[1])
}
dataList[i].push(t1[0])
})
})
ipTrendChart(time,dataList,ipList);
}
});
}
function ipTrendMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/ipTrendMonth",
async: false,
success: function(data){
var dataList=[];
var time=[];
var ipList=[];
data.forEach(function(t,i){
if(i===0){
t.forEach(function(t1){
time.push(df.format(new Date(t1[2])))
})
}
dataList.push([])
t.forEach(function(t1,j){
if(j===0){
ipList.push(t1[1])
}
dataList[i].push(t1[0])
})
});
ipTrendChart(time,dataList,ipList);
}
});
}
function serverExample() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/serverExample",
async: false,
success: function(data){
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>'+'<td>'+t[4]+'</td>');
tbody.append(tr);
});
$('#serverExampleTable tbody').replaceWith(tbody);
}
});
}
function serverExampleMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/serverExampleMonth",
async: false,
success: function(data){
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>'+'<td>'+t[4]+'</td>');
tbody.append(tr);
});
$('#serverExampleTable tbody').replaceWith(tbody);
}
});
}
function clientCompatibility() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/clientCompatibility",
async: false,
success: function(data){
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>');
tbody.append(tr);
});
$('#browserInformationTable tbody').replaceWith(tbody);
}
});
}
function clientCompatibilityMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/clientCompatibilityMonth",
async: false,
success: function(data){
var tbody=$('<tbody></tbody>');
data.forEach(function(t) {
var tr = $('<tr></tr>');
tr.append('<td>'+t[0]+'</td>'+'<td>'+t[1]+'</td>'+'<td>'+t[2]+'</td>'+'<td>'+t[3]+'</td>');
tbody.append(tr);
});
$('#browserInformationTable tbody').replaceWith(tbody);
}
});
}
function httpInformation() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/httpInformation",
async: false,
success: function(data){
var serverIp = new Array();
var sotherCnt = new Array();
for(var i=0; i<data.length; i++){
serverIp.push(data[i][0]);
sotherCnt.push(data[i][1]);
}
httpInformationChart(serverIp,sotherCnt)
}
});
}
function httpInformationMonth() {
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/MonitorOperation/FlowMonitor/httpInformationMonth",
async: false,
success: function(data){
var serverIp = new Array();
var sotherCnt = new Array();
for(var i=0; i<data.length; i++){
serverIp.push(data[i][0]);
sotherCnt.push(data[i][1]);
}
httpInformationChart(serverIp,sotherCnt)
}
});
}
</script>
</body>
</html>
</html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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