实时报表-流量统计菜单下新增统计菜单,对多个业务内容进行统计及业务之间的切换,以图表和列表的方式展示
This commit is contained in:
116
src/main/java/com/nis/domain/dashboard/ConfigStatistic.java
Normal file
116
src/main/java/com/nis/domain/dashboard/ConfigStatistic.java
Normal file
@@ -0,0 +1,116 @@
|
||||
package com.nis.domain.dashboard;
|
||||
|
||||
import com.nis.domain.report.BaseReport;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
public class ConfigStatistic extends BaseReport<ConfigStatistic>{
|
||||
private static final long serialVersionUID = 8905927100915123026L;
|
||||
|
||||
@ExcelField(title="cfg_id",sort=1)
|
||||
private String cfgId;
|
||||
@ExcelField(title="config_describe",sort=2)
|
||||
private String cfgDesc;
|
||||
private String serviceId;
|
||||
private String tableName;//表名
|
||||
private String beginDate;
|
||||
private String endDate;
|
||||
private String area;//区域
|
||||
private String operator;//运营商
|
||||
private String chartType;//图表类型
|
||||
|
||||
public String getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(String beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(String time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getCfgId() {
|
||||
return cfgId;
|
||||
}
|
||||
|
||||
public void setCfgId(String cfgId) {
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
|
||||
public String getCfgDesc() {
|
||||
return cfgDesc;
|
||||
}
|
||||
|
||||
public void setCfgDesc(String cfgDesc) {
|
||||
this.cfgDesc = cfgDesc;
|
||||
}
|
||||
|
||||
public String getServiceId() {
|
||||
return serviceId;
|
||||
}
|
||||
|
||||
public void setServiceId(String serviceId) {
|
||||
this.serviceId = serviceId;
|
||||
}
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public Long getSum() {
|
||||
return sum;
|
||||
}
|
||||
|
||||
public void setSum(Long sum) {
|
||||
this.sum = sum;
|
||||
}
|
||||
|
||||
public Integer getService() {
|
||||
return service;
|
||||
}
|
||||
|
||||
public void setService(Integer service) {
|
||||
this.service = service;
|
||||
}
|
||||
|
||||
public String getArea() {
|
||||
return area;
|
||||
}
|
||||
|
||||
public void setArea(String area) {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public String getOperator() {
|
||||
return operator;
|
||||
}
|
||||
|
||||
public void setOperator(String operator) {
|
||||
this.operator = operator;
|
||||
}
|
||||
|
||||
public String getChartType() {
|
||||
return chartType;
|
||||
}
|
||||
|
||||
public void setChartType(String chartType) {
|
||||
this.chartType = chartType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.nis.domain.dashboard.codedic;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class CodeDomainDic implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 8878203808371459079L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String websiteServiceId;
|
||||
|
||||
private String domain;
|
||||
|
||||
private String topicId;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private String creatorId;
|
||||
|
||||
private Integer isValid;
|
||||
|
||||
private String ican;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getWebsiteServiceId() {
|
||||
return websiteServiceId;
|
||||
}
|
||||
|
||||
public void setWebsiteServiceId(String websiteServiceId) {
|
||||
this.websiteServiceId = websiteServiceId;
|
||||
}
|
||||
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
public void setDomain(String domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
public String getTopicId() {
|
||||
return topicId;
|
||||
}
|
||||
|
||||
public void setTopicId(String topicId) {
|
||||
this.topicId = topicId;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getCreatorId() {
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorId(String creatorId) {
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Integer getIsValid() {
|
||||
return isValid;
|
||||
}
|
||||
|
||||
public void setIsValid(Integer isValid) {
|
||||
this.isValid = isValid;
|
||||
}
|
||||
|
||||
public String getIcan() {
|
||||
return ican;
|
||||
}
|
||||
|
||||
public void setIcan(String ican) {
|
||||
this.ican = ican;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
package com.nis.domain.report;
|
||||
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @ClassName: BaseReportLog.java
|
||||
@@ -25,6 +26,7 @@ public class BaseReport<T> extends BaseEntity<T>{
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -6190203013788730697L;
|
||||
@ExcelField(title="config_log_total",sort=3)
|
||||
protected Long sum;
|
||||
protected Integer service;
|
||||
protected String reportTime;
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.nis.domain.dashboard.SysIspInfo;
|
||||
import com.nis.domain.dashboard.codedic.CodeAppDic;
|
||||
import com.nis.domain.dashboard.codedic.CodeBehaviorTypeDic;
|
||||
import com.nis.domain.dashboard.codedic.CodeBrowserTypeDic;
|
||||
import com.nis.domain.dashboard.codedic.CodeDomainDic;
|
||||
import com.nis.domain.dashboard.codedic.CodeOsTypeDic;
|
||||
import com.nis.domain.dashboard.codedic.CodeProtocolTypeDic;
|
||||
import com.nis.domain.dashboard.codedic.CodeServiceTypeDic;
|
||||
@@ -14,6 +15,7 @@ import com.nis.domain.dashboard.codedic.CodeWebServiceDic;
|
||||
import com.nis.web.dao.dashboard.codedic.CodeAppDicDao;
|
||||
import com.nis.web.dao.dashboard.codedic.CodeBehaviorTypeDicDao;
|
||||
import com.nis.web.dao.dashboard.codedic.CodeBrowserTypeDicDao;
|
||||
import com.nis.web.dao.dashboard.codedic.CodeDomainDicDao;
|
||||
import com.nis.web.dao.dashboard.codedic.CodeOsTypeDicDao;
|
||||
import com.nis.web.dao.dashboard.codedic.CodeProtocolTypeDicDao;
|
||||
import com.nis.web.dao.dashboard.codedic.CodeResult;
|
||||
@@ -31,6 +33,7 @@ public class CodeDicUtils {
|
||||
private final static CodeServiceTypeDicDao codeServiceTypeDicDao = SpringContextHolder.getBean(CodeServiceTypeDicDao.class);
|
||||
private final static CodeWebServiceDicDao codeWebServiceDicDao = SpringContextHolder.getBean(CodeWebServiceDicDao.class);
|
||||
private final static CodeSysIspInfoDicDao codeSysIspInfoDicDao = SpringContextHolder.getBean(CodeSysIspInfoDicDao.class);
|
||||
private final static CodeDomainDicDao codeDomainDicDao = SpringContextHolder.getBean(CodeDomainDicDao.class);
|
||||
|
||||
|
||||
private static final String APP_CODE="appCode";
|
||||
@@ -42,6 +45,7 @@ public class CodeDicUtils {
|
||||
private static final String WEB_CODE="webCode";
|
||||
|
||||
private static final String ISP_CODE="ispCode";
|
||||
private static final String DOMAIN_CODE="domainCode";
|
||||
/**
|
||||
* 适用于大屏图表标签显示
|
||||
*/
|
||||
@@ -178,6 +182,23 @@ public class CodeDicUtils {
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}else if (name.equals(DOMAIN_CODE)) {
|
||||
// List<CodeWebServiceDic> codeDicList = (List<CodeWebServiceDic>) CacheUtils.get(WEB_CODE);
|
||||
// if(StringUtil.isEmpty(codeDicList)){
|
||||
// codeDicList = codeWebServiceDicDao.getCodeDicList();
|
||||
// CacheUtils.put(WEB_CODE, codeDicList);
|
||||
// }
|
||||
List<CodeDomainDic> codeDicList = codeDomainDicDao.getCodeDicList();
|
||||
if(codeDicList!=null&&codeDicList.size()>0){
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getDomain());
|
||||
codeResult.setCode(String.valueOf(codeDicList.get(i).getId()));
|
||||
|
||||
result.add(codeResult);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -795,4 +795,42 @@ public final class Constants {
|
||||
* 管理员用户预警查询服务配置总量接口
|
||||
*/
|
||||
public static final String CONFIG_BY_SERVICE = Configurations.getStringProperty("getConfigByService","");
|
||||
/**
|
||||
* 获取配置统计页面列表的配置总量接口
|
||||
*/
|
||||
public static final String NTC_PZ_COUNT_REPORT = Configurations.getStringProperty("ntcPzCountReport","");
|
||||
/**
|
||||
* 查询的是流量统计菜单-配置统计中BandWidth统计的数据接口
|
||||
*/
|
||||
public static final String TRAFFIC_BANDWIDTH_TRANS_THREE_NEW=Configurations.getStringProperty("trafficBandwidthTransThreeNew","trafficBandwidthTransThreeNew");
|
||||
/**
|
||||
* 查询的是流量统计菜单-配置统计中RulesType统计的数据接口
|
||||
*/
|
||||
public static final String NTC_ACTION_ENTRANCE_REPORT_NEW=Configurations.getStringProperty("ntcActionEntranceReportNew","ntcActionEntranceReportNew");
|
||||
/**
|
||||
* 查询的是流量统计菜单-配置统计中Protocol统计的数据接口
|
||||
*/
|
||||
public static final String TRAFFIC_PROTOCOL_STATISTIC_NEW=Configurations.getStringProperty("trafficProtocolStatisticNew","trafficProtocolStatisticNew");
|
||||
/**
|
||||
* 查询的是流量统计菜单-配置统计中APP统计的数据接口
|
||||
*/
|
||||
public static final String TRAFFIC_APP_STATISTIC_NEW=Configurations.getStringProperty("trafficAppStatisticNew","trafficAppStatisticNew");
|
||||
/**
|
||||
* 查询的是流量统计菜单-配置统计中Domains统计的数据接口
|
||||
*/
|
||||
public static final String TRAFFIC_DOMAIN_STATISTIC_NEW=Configurations.getStringProperty("trafficDomainStatisticNew","trafficDomainStatisticNew");
|
||||
/**
|
||||
* 查询的是流量统计菜单-配置统计中ClientIP统计的数据接口
|
||||
*/
|
||||
public static final String TRAFFIC_SOURCE_IP_STATISTIC_NEW=Configurations.getStringProperty("trafficSourceIPStatisticNew","trafficSourceIPStatisticNew");
|
||||
/**
|
||||
* 查询的是流量统计菜单-配置统计中ServerIP统计的数据接口
|
||||
*/
|
||||
public static final String TRAFFIC_DEST_IP_STATISTIC_NEW=Configurations.getStringProperty("trafficDestIPStatisticNew","trafficDestIPStatisticNew");
|
||||
/**
|
||||
* 查询的是流量统计菜单-配置统计中SubscriberID统计的数据接口
|
||||
*/
|
||||
public static final String TRAFFIC_SUBSCRIBER_ID_STATISTIC_NEW=Configurations.getStringProperty("trafficSubscriberIDStatisticNew","trafficSubscriberIDStatisticNew");
|
||||
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
package com.nis.web.dao.dashboard.codedic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.dashboard.codedic.CodeDomainDic;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface CodeDomainDicDao {
|
||||
List<CodeDomainDic> getCodeDicList();
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nis.web.dao.dashboard.codedic.CodeDomainDicDao">
|
||||
<resultMap id="BaseResultMap" type="com.nis.domain.dashboard.codedic.CodeDomainDic">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="website_service_id" jdbcType="VARCHAR" property="websiteServiceId" />
|
||||
<result column="domain" jdbcType="VARCHAR" property="domain" />
|
||||
<result column="topic_Id" jdbcType="VARCHAR" property="topicId" />
|
||||
<result column="creator_id" jdbcType="INTEGER" property="creatorId" />
|
||||
<result column="is_valid" jdbcType="INTEGER" property="isValid" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, website_service_id, domain, topic_Id, creator_id, is_valid
|
||||
</sql>
|
||||
<select id="getCodeDicList" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from website_domain_topic
|
||||
where is_valid=1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.nis.web.dao.dashboard.codedic;
|
||||
|
||||
import com.nis.domain.dashboard.ConfigStatistic;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface ConfigStatisticDao {
|
||||
|
||||
|
||||
String getCfgDescByCfgId(ConfigStatistic entity);
|
||||
|
||||
String getASNIPCfgDesc(String cfgId);
|
||||
|
||||
String getAPPIPCfgDesc(String cfgId);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nis.web.dao.dashboard.codedic.ConfigStatisticDao">
|
||||
<resultMap id="ConfigStatisticMap" type="com.nis.domain.dashboard.ConfigStatistic">
|
||||
<result column="service_id" property="serviceId" jdbcType="VARCHAR" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="compile_id" property="cfgId" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getCfgDescByCfgId" parameterType="com.nis.domain.dashboard.ConfigStatistic" resultType="java.lang.String">
|
||||
select cfg_desc from ${tableName}
|
||||
|
||||
<where>
|
||||
is_valid=1
|
||||
and service_id = #{serviceId}
|
||||
and compile_id= #{cfgId}
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询ASN IP 页面配置描述-->
|
||||
<select id="getASNIPCfgDesc" parameterType="java.lang.String" resultType="java.lang.Integer">
|
||||
select cfg_desc from asn_group_info
|
||||
|
||||
where is_valid=1
|
||||
and compile_id= #{cfgId}
|
||||
|
||||
</select>
|
||||
<!-- 查询APP IP 页面配置描述 -->
|
||||
<select id="getAPPIPCfgDesc" parameterType="java.lang.String" resultType="java.lang.Integer">
|
||||
|
||||
select cfg_desc from config_group_info
|
||||
|
||||
where is_issued=1
|
||||
and group_type=1
|
||||
and compile_id= #{cfgId}
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.nis.web.service.configuration.statistics;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.dashboard.ConfigStatistic;
|
||||
import com.nis.web.dao.dashboard.codedic.ConfigStatisticDao;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
@Service
|
||||
public class ConfigStatisticService extends BaseService{
|
||||
|
||||
@Autowired
|
||||
private ConfigStatisticDao configStatisticDao;
|
||||
|
||||
|
||||
public String getCfgDescByCfgId(ConfigStatistic entity){
|
||||
|
||||
String cfgDesc=configStatisticDao.getCfgDescByCfgId(entity);
|
||||
|
||||
return cfgDesc;
|
||||
}
|
||||
|
||||
public String getASNIPCfgDesc(String cfgId){
|
||||
|
||||
String cfgDesc=configStatisticDao.getASNIPCfgDesc(cfgId);
|
||||
|
||||
return cfgDesc;
|
||||
}
|
||||
|
||||
public String getAPPIPCfgDesc(String cfgId){
|
||||
|
||||
String cfgDesc=configStatisticDao.getAPPIPCfgDesc(cfgId);
|
||||
|
||||
return cfgDesc;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user