Merge branch 'develop' of http://10.0.6.99/common/maat_service.git into develop
This commit is contained in:
@@ -1,231 +0,0 @@
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfDjLogStatistics;
|
||||
import com.nis.domain.restful.DfDjPzLogStatistics;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.redis.RedisDao;
|
||||
import com.nis.util.redis.SaveRedisThread;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.DfdjLogStatService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @ClassName: LogStatisticsController
|
||||
* @Description: 封堵/监测日志统计查询服务
|
||||
* @author (zbc)
|
||||
* @date 2016年11月14日 下午4:00:00
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public class DfDjLogStatController extends BaseRestController {
|
||||
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
protected String logSource="0";
|
||||
|
||||
@Autowired
|
||||
protected DfdjLogStatService logStatService;
|
||||
@Autowired
|
||||
protected RedisDao redisDao;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
|
||||
/*@RequestMapping(value="/dfLogStatistics", method = RequestMethod.GET)
|
||||
@ApiOperation(value="封堵日志总量统计查询" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfLogStatistics(
|
||||
@RequestParam(value = "searchStatActiveSys", required = false, defaultValue = "2") String searchStatActiveSys,
|
||||
@RequestParam(value = "searchService", required = true) String searchService,
|
||||
DfDjLogStatistics logStatistics, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
if(!"4".equals(searchStatActiveSys) ) {
|
||||
searchStatActiveSys="2";
|
||||
logStatistics.setSearchStatActiveSys(searchStatActiveSys);
|
||||
}
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
|
||||
DfDjLogStatistics entity = null;
|
||||
try{
|
||||
logStatService.queryConditionCheck(thread,start,logStatistics, DfDjLogStatistics.class, null);
|
||||
|
||||
entity = logStatService.findDfLogStatistics(logStatistics);
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"封堵日志总量统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchStatActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "封堵日志总量统计检索成功",
|
||||
entity, searchStatActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value="/dfPzLogStatistics", method = RequestMethod.GET)
|
||||
@ApiOperation(value="封堵配置日志总量统计查询" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfPzLogStatistics(
|
||||
@RequestParam(value = "searchStatActiveSys", required = false, defaultValue = "2") String searchStatActiveSys,
|
||||
@RequestParam(value = "searchService", required = true) String searchService,
|
||||
Page<DfDjPzLogStatistics> page, DfDjPzLogStatistics logStatistics,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
if(!"4".equals(searchStatActiveSys) ) {
|
||||
searchStatActiveSys="2";
|
||||
logStatistics.setSearchStatActiveSys(searchStatActiveSys);
|
||||
}
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
|
||||
Page<DfDjPzLogStatistics> logPage = null;
|
||||
boolean keyExists = false;
|
||||
String key = "";
|
||||
|
||||
try {
|
||||
logStatService.queryConditionCheck(thread,start,logStatistics, DfDjPzLogStatistics.class, page);
|
||||
|
||||
if (Constants.IS_OPEN_REDIS) {
|
||||
// 根据查询条件获取key
|
||||
key = logStatService.getJedisKey(request, true);
|
||||
// 判断key是否存在
|
||||
keyExists = redisDao.exists(key);
|
||||
}
|
||||
// 存在则直接从redis中查询
|
||||
if (keyExists) {
|
||||
logPage = (Page<DfDjPzLogStatistics>) JsonMapper.fromJsonString(redisDao.getString(key), Page.class);
|
||||
} else {
|
||||
// 不存在则查询数据库并保存查询结果到redis中
|
||||
logPage = logStatService.findDfPzLogStatistics(
|
||||
new Page<DfDjPzLogStatistics>(request, response, DfDjPzLogStatistics.class), logStatistics);
|
||||
|
||||
if (Constants.IS_OPEN_REDIS)
|
||||
new SaveRedisThread(key, logPage, Constants.ORACLE_EXPIRE).start();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"封堵配置日志总量统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchStatActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "封堵配置日志总量统计检索成功",
|
||||
logPage, searchStatActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value="/djLogStatistics", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测日志总量统计查询" , httpMethod = "GET", notes="get log list")
|
||||
public Map djLogStatistics(
|
||||
@RequestParam(value = "searchStatActiveSys", required = false, defaultValue = "2") String searchStatActiveSys,
|
||||
@RequestParam(value = "searchService", required = true) String searchService,
|
||||
DfDjLogStatistics logStatistics, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
if(!"4".equals(searchStatActiveSys) ) {
|
||||
searchStatActiveSys="2";
|
||||
logStatistics.setSearchStatActiveSys(searchStatActiveSys);
|
||||
}
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
|
||||
DfDjLogStatistics entity = null;
|
||||
try{
|
||||
logStatService.queryConditionCheck(thread,start,logStatistics, DfDjLogStatistics.class, null);
|
||||
|
||||
entity = logStatService.findDjLogStatistics(logStatistics);
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"监测日志总量统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchStatActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测日志总量统计检索成功",
|
||||
entity, searchStatActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value="/djPzLogStatistics", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测配置日志总量统计查询" , httpMethod = "GET", notes="get log list")
|
||||
public Map djPzLogStatistics(
|
||||
@RequestParam(value = "searchStatActiveSys", required = false, defaultValue = "2") String searchStatActiveSys,
|
||||
@RequestParam(value = "searchService", required = true) String searchService,
|
||||
Page<DfDjPzLogStatistics> page, DfDjPzLogStatistics logStatistics,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
if(!"4".equals(searchStatActiveSys) ) {
|
||||
searchStatActiveSys="2";
|
||||
logStatistics.setSearchStatActiveSys(searchStatActiveSys);
|
||||
}
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
|
||||
Page<DfDjPzLogStatistics> logPage = null;
|
||||
boolean keyExists = false;
|
||||
String key = "";
|
||||
|
||||
try {
|
||||
logStatService.queryConditionCheck(thread,start,logStatistics, DfDjPzLogStatistics.class, page);
|
||||
|
||||
if (Constants.IS_OPEN_REDIS) {
|
||||
// 根据查询条件获取key
|
||||
key = logStatService.getJedisKey(request, true);
|
||||
// 判断key是否存在
|
||||
keyExists = redisDao.exists(key);
|
||||
}
|
||||
// 存在则直接从redis中查询
|
||||
if (keyExists) {
|
||||
logPage = (Page<DfDjPzLogStatistics>) JsonMapper.fromJsonString(redisDao.getString(key), Page.class);
|
||||
} else {
|
||||
// 不存在则查询数据库并保存查询结果到redis中
|
||||
logPage = logStatService.findDjPzLogStatistics(
|
||||
new Page<DfDjPzLogStatistics>(request, response, DfDjPzLogStatistics.class), logStatistics);
|
||||
|
||||
if (Constants.IS_OPEN_REDIS)
|
||||
new SaveRedisThread(key, logPage, Constants.ORACLE_EXPIRE).start();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"监测配置日志总量统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchStatActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测配置日志总量统计检索成功",
|
||||
logPage, searchStatActiveSys, logSource);
|
||||
}*/
|
||||
}
|
||||
@@ -1,753 +0,0 @@
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfJitAffairDestReport;
|
||||
import com.nis.domain.restful.DfJitAffairSrcReport;
|
||||
import com.nis.domain.restful.DfJitFlDestReport;
|
||||
import com.nis.domain.restful.DfJitFlSrcReport;
|
||||
import com.nis.domain.restful.DfJitGuaranteeDestReport;
|
||||
import com.nis.domain.restful.DfJitGuaranteeSrcReport;
|
||||
import com.nis.domain.restful.DfJitIdDestReport;
|
||||
import com.nis.domain.restful.DfJitIdSrcReport;
|
||||
import com.nis.domain.restful.DfJitMissionDestReport;
|
||||
import com.nis.domain.restful.DfJitMissionSrcReport;
|
||||
import com.nis.domain.restful.DfJitTagDestReport;
|
||||
import com.nis.domain.restful.DfJitTagSrcReport;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.DfJitLogSearchService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DfJitLogSearchController
|
||||
* @Description: 管控日志实时统计查询服务
|
||||
* @author (rkg)
|
||||
* @date 2016年9月13日上午10:32:21
|
||||
* @version V1.0
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
public class DfJitLogSearchController extends BaseRestController {
|
||||
private final Logger logger1 = Logger.getLogger(this.getClass());
|
||||
protected String logSource="0";
|
||||
@Autowired
|
||||
private DfJitLogSearchService dfJitLogSearchService;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
@RequestMapping(value = "/dfJitFlSrcReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控分类性质源IP实时统计", httpMethod = "GET", notes = "管控分类性质源IP实时统计列表")
|
||||
public Map dfJitFlSrcReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DfJitFlSrcReport dfJitFlSrcReportSources, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys)) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfJitFlSrcReport> dfJitFlSrcReportSourcesPage = null;
|
||||
try {
|
||||
// 公共请求参数校验
|
||||
dfJitLogSearchService.queryDfJitFlCheck(thread, start, dfJitFlSrcReportSources.getSearchFl(),
|
||||
dfJitFlSrcReportSources.getSearchXz());
|
||||
dfJitLogSearchService.queryConditionCheck(thread, start, dfJitFlSrcReportSources, DfJitFlSrcReport.class,
|
||||
page);
|
||||
|
||||
dfJitFlSrcReportSourcesPage = dfJitLogSearchService.findDfJitFlSrcReport(
|
||||
new Page<DfJitFlSrcReport>(request, response, DfJitFlSrcReport.class), dfJitFlSrcReportSources);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控分类性质源IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控分类性质源IP实时统计检索成功",
|
||||
dfJitFlSrcReportSourcesPage, searchActiveSys,logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfJitFlDestReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控分类性质目的IP实时统计服务", httpMethod = "GET", notes = "管控分类性质目的IP实时统计列表")
|
||||
public Map dfJitFlDestReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DfJitFlDestReport dfJitFlDestReport, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys)) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfJitFlDestReport> reporPage = null;
|
||||
try {
|
||||
// 公共请求参数校验
|
||||
dfJitLogSearchService.queryDfJitFlCheck(thread, start, dfJitFlDestReport.getSearchFl(),
|
||||
dfJitFlDestReport.getSearchXz());
|
||||
dfJitLogSearchService.queryConditionCheck(thread, start, dfJitFlDestReport, DfJitFlDestReport.class, page);
|
||||
|
||||
reporPage = dfJitLogSearchService.findDfJitFlDestReport(
|
||||
new Page<DfJitFlDestReport>(request, response, DfJitFlDestReport.class), dfJitFlDestReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控分类性质目的IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控分类性质目的IP实时统计检索成功",
|
||||
reporPage, searchActiveSys,logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfJitAffairSrcReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控事件子话题源IP实时统计服务", httpMethod = "GET", notes = "管控事件子话题源IP实时统计列表")
|
||||
public Map dfJitAffairSrcReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DfJitAffairSrcReport dfJitAffairSrcReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys)) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(dfJitAffairSrcReport.getSearchAffair())) {
|
||||
Integer.parseInt(dfJitAffairSrcReport.getSearchAffair());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchAffair参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchAffair参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
try {
|
||||
if (!StringUtil.isBlank(dfJitAffairSrcReport.getSearchTopic())) {
|
||||
Integer.parseInt(dfJitAffairSrcReport.getSearchTopic());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchTopic参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchTopic参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
Page<DfJitAffairSrcReport> reporPage = null;
|
||||
try {
|
||||
|
||||
dfJitLogSearchService.queryConditionCheck(thread, start, dfJitAffairSrcReport, DfJitAffairSrcReport.class,
|
||||
page);
|
||||
|
||||
reporPage = dfJitLogSearchService.findDfJitAffairSrcReport(
|
||||
new Page<DfJitAffairSrcReport>(request, response, DfJitAffairSrcReport.class),
|
||||
dfJitAffairSrcReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控事件子话题源IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控事件子话题源IP实时统计检索成功",
|
||||
reporPage, searchActiveSys,logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfJitAffairDestReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控事件子话题目的IP实时统计服务", httpMethod = "GET", notes = "管控事件子话题目的IP实时统计列表")
|
||||
public Map dfJitAffairDestReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DfJitAffairDestReport dfJitAffairDestReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys)) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(dfJitAffairDestReport.getSearchAffair())) {
|
||||
Integer.parseInt(dfJitAffairDestReport.getSearchAffair());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchAffair参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchAffair参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
try {
|
||||
if (!StringUtil.isBlank(dfJitAffairDestReport.getSearchTopic())) {
|
||||
Integer.parseInt(dfJitAffairDestReport.getSearchTopic());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchTopic参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchTopic参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
Page<DfJitAffairDestReport> reporPage = null;
|
||||
try {
|
||||
dfJitLogSearchService.queryConditionCheck(thread, start, dfJitAffairDestReport, DfJitAffairDestReport.class,
|
||||
page);
|
||||
|
||||
reporPage = dfJitLogSearchService.findDfJitAffairDestReport(
|
||||
new Page<DfJitAffairDestReport>(request, response, DfJitAffairDestReport.class),
|
||||
dfJitAffairDestReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控事件子话题目的IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控事件子话题目的IP实时统计检索成功",
|
||||
reporPage, searchActiveSys,logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfJitMissionSrcReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控任务源IP实时统计服务", httpMethod = "GET", notes = "管控任务源IP实时统计列表")
|
||||
public Map dfJitMissionSrcReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DfJitMissionSrcReport dfJitMissionSrcReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys)) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(dfJitMissionSrcReport.getSearchMission())) {
|
||||
Integer.parseInt(dfJitMissionSrcReport.getSearchMission());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchMission参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchMission参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DfJitMissionSrcReport> reporPage = null;
|
||||
try {
|
||||
dfJitLogSearchService.queryConditionCheck(thread, start, dfJitMissionSrcReport, DfJitMissionSrcReport.class,
|
||||
page);
|
||||
|
||||
reporPage = dfJitLogSearchService.findDfJitMissionSrcReport(
|
||||
new Page<DfJitMissionSrcReport>(request, response, DfJitMissionSrcReport.class),
|
||||
dfJitMissionSrcReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控任务源IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控任务源IP实时统计检索成功",
|
||||
reporPage, searchActiveSys,logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfJitMissionDestReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控任务目的IP实时统计服务", httpMethod = "GET", notes = "管控任务目的IP实时统计列表")
|
||||
public Map dfJitMissionDestReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DfJitMissionDestReport dfJitMissionDestReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys)) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(dfJitMissionDestReport.getSearchMission())) {
|
||||
Integer.parseInt(dfJitMissionDestReport.getSearchMission());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchMission参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchMission参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DfJitMissionDestReport> reporPage = null;
|
||||
try {
|
||||
dfJitLogSearchService.queryConditionCheck(thread, start, dfJitMissionDestReport,
|
||||
DfJitMissionDestReport.class, page);
|
||||
reporPage = dfJitLogSearchService.findDfJitMissionDestReport(
|
||||
new Page<DfJitMissionDestReport>(request, response, DfJitMissionDestReport.class),
|
||||
dfJitMissionDestReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控任务目的IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控任务目的IP实时统计检索成功",
|
||||
reporPage, searchActiveSys,logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfJitGuaranteeSrcReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控保障期源IP实时统计服务", httpMethod = "GET", notes = "管控保障期源IP实时统计列表")
|
||||
public Map dfJitGuaranteeSrcReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DfJitGuaranteeSrcReport dfJitGuaranteeSrcReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys)) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(dfJitGuaranteeSrcReport.getSearchGuarantee())) {
|
||||
Integer.parseInt(dfJitGuaranteeSrcReport.getSearchGuarantee());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchGuarantee参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchGuarantee参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DfJitGuaranteeSrcReport> reporPage = null;
|
||||
try {
|
||||
dfJitLogSearchService.queryConditionCheck(thread, start, dfJitGuaranteeSrcReport,
|
||||
DfJitGuaranteeSrcReport.class, page);
|
||||
reporPage = dfJitLogSearchService.findDfJitGuaranteeSrcReport(
|
||||
new Page<DfJitGuaranteeSrcReport>(request, response, DfJitGuaranteeSrcReport.class),
|
||||
dfJitGuaranteeSrcReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控保障期源IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控保障期源IP实时统计检索成功",
|
||||
reporPage, searchActiveSys,logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfJitGuaranteeDestReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控保障期目的IP实时统计服务", httpMethod = "GET", notes = "管控保障期目的IP实时统计列表")
|
||||
public Map dfJitGuaranteeDestReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DfJitGuaranteeDestReport dfJitGuaranteeDestReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys)) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(dfJitGuaranteeDestReport.getSearchGuarantee())) {
|
||||
Integer.parseInt(dfJitGuaranteeDestReport.getSearchGuarantee());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchGuarantee参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchGuarantee参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DfJitGuaranteeDestReport> reporPage = null;
|
||||
try {
|
||||
dfJitLogSearchService.queryConditionCheck(thread, start, dfJitGuaranteeDestReport,
|
||||
DfJitGuaranteeDestReport.class, page);
|
||||
reporPage = dfJitLogSearchService.findDfJitGuaranteeDestReport(
|
||||
new Page<DfJitGuaranteeDestReport>(request, response, DfJitGuaranteeDestReport.class),
|
||||
dfJitGuaranteeDestReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控保障期目的IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控保障期目的IP实时统计检索成功",
|
||||
reporPage, searchActiveSys,logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfJitTagSrcReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控标签源IP实时统计服务", httpMethod = "GET", notes = "管控标签源IP实时统计列表")
|
||||
public Map dfJitTagSrcReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DfJitTagSrcReport dfJitTagSrcReport, HttpServletRequest request, HttpServletResponse response) {
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys)) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
if (null != dfJitTagSrcReport.getSearchTag() && !dfJitTagSrcReport.getSearchTag().equals("")) {
|
||||
String[] tagArr = dfJitTagSrcReport.getSearchTag().split(",");
|
||||
List<String> tagList = new ArrayList<String>();
|
||||
for (int i = 0; i < tagArr.length; i++) {
|
||||
if (!tagArr[i].equals("")) {
|
||||
try {
|
||||
Integer.parseInt(tagArr[i]);
|
||||
tagList.add(tagArr[i]);
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread,
|
||||
System.currentTimeMillis() - start, "searchTag参数格式错误",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchTag参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
}
|
||||
}
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (String str : tagList) {
|
||||
sb.append(str + ",");
|
||||
}
|
||||
String tag = sb.substring(0, sb.length() - 1);
|
||||
dfJitTagSrcReport.setSearchTag(tag);
|
||||
}
|
||||
|
||||
Page<DfJitTagSrcReport> reporPage = null;
|
||||
try {
|
||||
dfJitLogSearchService.queryConditionCheck(thread, start, dfJitTagSrcReport, DfJitTagSrcReport.class, page);
|
||||
reporPage = dfJitLogSearchService.findDfJitTagSrcReport(
|
||||
new Page<DfJitTagSrcReport>(request, response, DfJitTagSrcReport.class), dfJitTagSrcReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控标签源IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控标签源IP实时统计检索成功",
|
||||
reporPage, searchActiveSys,logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfJitTagDestReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控标签目的IP实时统计服务", httpMethod = "GET", notes = "管控标签目的IP实时统计列表")
|
||||
public Map dfJitTagDestReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DfJitTagDestReport dfJitTagDestReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys)) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
if (null != dfJitTagDestReport.getSearchTag() && !dfJitTagDestReport.getSearchTag().equals("")) {
|
||||
String[] tagArr = dfJitTagDestReport.getSearchTag().split(",");
|
||||
List<String> tagList = new ArrayList<String>();
|
||||
for (int i = 0; i < tagArr.length; i++) {
|
||||
if (!tagArr[i].equals("")) {
|
||||
try {
|
||||
Integer.parseInt(tagArr[i]);
|
||||
tagList.add(tagArr[i]);
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread,
|
||||
System.currentTimeMillis() - start, "searchTag参数格式错误",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchTag参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
}
|
||||
}
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (String str : tagList) {
|
||||
sb.append(str + ",");
|
||||
}
|
||||
String tag = sb.substring(0, sb.length() - 1);
|
||||
dfJitTagDestReport.setSearchTag(tag);
|
||||
}
|
||||
|
||||
Page<DfJitTagDestReport> reporPage = null;
|
||||
try {
|
||||
dfJitLogSearchService.queryConditionCheck(thread, start, dfJitTagDestReport, DfJitTagDestReport.class,
|
||||
page);
|
||||
reporPage = dfJitLogSearchService.findDfJitTagDestReport(
|
||||
new Page<DfJitTagDestReport>(request, response, DfJitTagDestReport.class), dfJitTagDestReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控标签目的IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控标签目的IP实时统计检索成功",
|
||||
reporPage, searchActiveSys,logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfJitIdSrcReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控规则源IP实时统计服务", httpMethod = "GET", notes = "管控规则源IP实时统计列表")
|
||||
public Map dfJitIdSrcReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DfJitIdSrcReport dfJitIdSrcReport, HttpServletRequest request, HttpServletResponse response) {
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys)) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(dfJitIdSrcReport.getSearchId())) {
|
||||
Integer.parseInt(dfJitIdSrcReport.getSearchId());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchId参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DfJitIdSrcReport> reporPage = null;
|
||||
try {
|
||||
dfJitLogSearchService.queryConditionCheck(thread, start, dfJitIdSrcReport, DfJitIdSrcReport.class, page);
|
||||
reporPage = dfJitLogSearchService.findDfJitIdSrcReport(
|
||||
new Page<DfJitIdSrcReport>(request, response, DfJitIdSrcReport.class), dfJitIdSrcReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控规则源IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控规则源IP实时统计检索成功",
|
||||
reporPage, searchActiveSys,logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfJitIdDestReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控规则目的IP实时统计服务", httpMethod = "GET", notes = "管控规则目的IP实时统计列表")
|
||||
public Map dfJitIdDestReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DfJitIdDestReport dfJitIdDestReport, HttpServletRequest request, HttpServletResponse response) {
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys)) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(dfJitIdDestReport.getSearchId())) {
|
||||
Integer.parseInt(dfJitIdDestReport.getSearchId());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchId参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DfJitIdDestReport> reporPage = null;
|
||||
try {
|
||||
dfJitLogSearchService.queryConditionCheck(thread, start, dfJitIdDestReport, DfJitIdDestReport.class, page);
|
||||
reporPage = dfJitLogSearchService.findDfJitIdDestReport(
|
||||
new Page<DfJitIdDestReport>(request, response, DfJitIdDestReport.class), dfJitIdDestReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控规则目的IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控规则目的IP实时统计检索成功",
|
||||
reporPage, searchActiveSys,logSource);
|
||||
}
|
||||
}
|
||||
@@ -1,215 +0,0 @@
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.DfReportEntity;
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfLwhhAttrReport;
|
||||
import com.nis.domain.restful.DfLwhhTagReport;
|
||||
import com.nis.domain.restful.DfSrcIpAttrReport;
|
||||
import com.nis.domain.restful.DfSrcIpTagReport;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.DfMultiDimensionalReportService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DfMultiDimensionalReportController
|
||||
* @Description: TODO(df多维实时统计)
|
||||
* @author (DDM)
|
||||
* @date 2017年8月4日下午2:53:01
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
public class DfMultiDimensionalReportController extends BaseRestController {
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
|
||||
protected String activeSys = Constants.ACTIVESYS_ALL;
|
||||
protected String logSource = "0";
|
||||
@Autowired
|
||||
protected DfMultiDimensionalReportService dfMultiDimensionalReportService;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
|
||||
@RequestMapping(value = "dfLwhhAttrReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "来文函号、性质多维实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfServiceReportSources(Page page, DfLwhhAttrReport dfLwhhAttrReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfLwhhAttrReport> lwhhAttrReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfLwhhAttrReport);
|
||||
// 校验
|
||||
dfMultiDimensionalReportService.queryConditionCheck(thread, start, dfLwhhAttrReport, DfLwhhAttrReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
lwhhAttrReportPage = dfMultiDimensionalReportService.findDfLwhhAttrReportPage(
|
||||
new Page<DfLwhhAttrReport>(request, response, DfLwhhAttrReport.class), dfLwhhAttrReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "来文函号、性质多维实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "来文函号、性质多维实时统计成功",
|
||||
lwhhAttrReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "dfLwhhTagReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "来文函号、标签多维实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfServiceReportSources(Page page, DfLwhhTagReport dfLwhhTagReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfLwhhTagReport> lwhhTagReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfLwhhTagReport);
|
||||
// 校验
|
||||
dfMultiDimensionalReportService.queryConditionCheck(thread, start, dfLwhhTagReport, DfLwhhTagReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
lwhhTagReportPage = dfMultiDimensionalReportService.findDfLwhhTagReportPage(
|
||||
new Page<DfLwhhTagReport>(request, response, DfLwhhTagReport.class), dfLwhhTagReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "来文函号、标签多维实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "来文函号、标签多维实时统计成功",
|
||||
lwhhTagReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "dfSrcIpAttrReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "来文函号、性质多维实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfServiceReportSources(Page page, DfSrcIpAttrReport dfSrcIpAttrReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfSrcIpAttrReport> srcIpAttrReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfSrcIpAttrReport);
|
||||
// 校验
|
||||
dfMultiDimensionalReportService.queryConditionCheck(thread, start, dfSrcIpAttrReport, DfSrcIpAttrReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
srcIpAttrReportPage = dfMultiDimensionalReportService.findDfSrcIpAttrReportPage(
|
||||
new Page<DfSrcIpAttrReport>(request, response, DfSrcIpAttrReport.class), dfSrcIpAttrReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "境内源ip、性质多维实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "境内源ip、性质多维实时统计成功",
|
||||
srcIpAttrReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "dfSrcIpTagReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "来文函号、标签多维实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfServiceReportSources(Page page, DfSrcIpTagReport dfSrcIpTagReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfSrcIpTagReport> srcIpTagReportPage = null;
|
||||
try {
|
||||
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfSrcIpTagReport);
|
||||
|
||||
// 校验
|
||||
dfMultiDimensionalReportService.queryConditionCheck(thread, start, dfSrcIpTagReport, DfSrcIpTagReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
srcIpTagReportPage = dfMultiDimensionalReportService.findDfSrcIpTagReportPage(
|
||||
new Page<DfSrcIpTagReport>(request, response, DfSrcIpTagReport.class), dfSrcIpTagReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "境内源ip、标签多维实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "境内源ip、标签多维实时统计成功",
|
||||
srcIpTagReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @Title: resetTime
|
||||
* @Description: (实时统计默认查询本地一个小时的数据)
|
||||
* @param @param entity
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public void resetTime(DfReportEntity<?> entity) throws Exception {
|
||||
Map<String, String> map = DateUtils.getLocalTime(entity.getSearchReportStartTime(),
|
||||
entity.getSearchReportEndTime(), Constants.REPORT_LOCAL_TIME,"report");
|
||||
entity.setSearchReportStartTime(map.get("startTime"));
|
||||
entity.setSearchReportEndTime(map.get("endTime"));
|
||||
}
|
||||
}
|
||||
@@ -1,333 +0,0 @@
|
||||
/**
|
||||
* @Title: DfStatLogController.java
|
||||
* @Package com.nis.web.controller
|
||||
* @Description: TODO(用一句话描述该文件做什么)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 下午1:22:15
|
||||
* @version V1.0
|
||||
*/
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.StatLogEntity;
|
||||
import com.nis.domain.restful.DfLwhhAttrDaily;
|
||||
import com.nis.domain.restful.DfLwhhAttrMonth;
|
||||
import com.nis.domain.restful.DfLwhhTagDaily;
|
||||
import com.nis.domain.restful.DfLwhhTagMonth;
|
||||
import com.nis.domain.restful.DfSrcIpAttrDaily;
|
||||
import com.nis.domain.restful.DfSrcIpAttrMonth;
|
||||
import com.nis.domain.restful.DfSrcIpTagDaily;
|
||||
import com.nis.domain.restful.DfSrcIpTagMonth;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.redis.RedisDao;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.DfMultiDimensionalStatLogService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @ClassName: DfStatLogController
|
||||
* @Description: TODO(这里用一句话描述这个类的作用)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 下午1:22:15
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public class DfMultiDimensionalStatLogController extends BaseRestController{
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
protected String logSource="0";
|
||||
protected String activeSys=Constants.ACTIVESYS_ALL;
|
||||
|
||||
@Autowired
|
||||
protected DfMultiDimensionalStatLogService dfMultiDimensionalStatLogService;
|
||||
@Autowired
|
||||
protected RedisDao redisDao;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value="dfLwhhAttrDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="封堵来文函号-性质多维日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfLwhhAttrDailySources(
|
||||
Page page,DfLwhhAttrDaily dfLwhhAttrDaily, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfLwhhAttrDaily> dfLwhhAttrDailyPage =null;
|
||||
try {
|
||||
resetTime(dfLwhhAttrDaily, "daily");
|
||||
|
||||
dfMultiDimensionalStatLogService.queryConditionCheck(thread,start,dfLwhhAttrDaily, DfLwhhAttrDaily.class, page);
|
||||
|
||||
dfLwhhAttrDailyPage = dfMultiDimensionalStatLogService.dfLwhhAttrDaily(new Page<DfLwhhAttrDaily>(request, response,DfLwhhAttrDaily.class), dfLwhhAttrDaily);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"封堵来文函号-性质多维日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "封堵来文函号-标签多维日报表检索成功",dfLwhhAttrDailyPage,activeSys,logSource);
|
||||
}
|
||||
@RequestMapping(value="dfLwhhAttrMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="封堵来文函号-性质多维月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfLwhhAttrMonthSources(
|
||||
Page page,DfLwhhAttrMonth dfLwhhAttrMonth, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfLwhhAttrMonth> dfLwhhAttrMonthPage =null;
|
||||
try {
|
||||
resetTime(dfLwhhAttrMonth, "month");
|
||||
|
||||
|
||||
//查询条件校验
|
||||
dfMultiDimensionalStatLogService.queryConditionCheck(thread,start,dfLwhhAttrMonth, DfLwhhAttrMonth.class, page);
|
||||
|
||||
dfLwhhAttrMonthPage = dfMultiDimensionalStatLogService.dfLwhhAttrMonth(new Page<DfLwhhAttrMonth>(request, response,DfLwhhAttrMonth.class), dfLwhhAttrMonth);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"封堵来文函号-性质多维月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "封堵来文函号-性质多维月报表检索成功",dfLwhhAttrMonthPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value="dfLwhhTagDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="封堵来文函号-标签多维日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfLwhhTagDailySources(
|
||||
Page page,DfLwhhTagDaily dfLwhhTagDaily, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfLwhhTagDaily> dfLwhhTagDailyPage =null;
|
||||
try {
|
||||
resetTime(dfLwhhTagDaily, "daily");
|
||||
|
||||
dfMultiDimensionalStatLogService.queryConditionCheck(thread,start,dfLwhhTagDaily, DfLwhhTagDaily.class, page);
|
||||
|
||||
dfLwhhTagDailyPage = dfMultiDimensionalStatLogService.dfLwhhTagDaily(new Page<DfLwhhTagDaily>(request, response,DfLwhhTagDaily.class), dfLwhhTagDaily);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"封堵来文函号-标签多维日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "封堵来文函号-标签多维日报表检索成功",dfLwhhTagDailyPage,activeSys,logSource);
|
||||
}
|
||||
@RequestMapping(value="dfLwhhTagMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="封堵来文函号-标签多维月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfLwhhTagMonthSources(
|
||||
Page page,DfLwhhTagMonth dfLwhhTagMonth, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfLwhhTagMonth> dfLwhhTagMonthPage =null;
|
||||
try {
|
||||
resetTime(dfLwhhTagMonth, "month");
|
||||
|
||||
|
||||
//查询条件校验
|
||||
dfMultiDimensionalStatLogService.queryConditionCheck(thread,start,dfLwhhTagMonth, DfLwhhTagMonth.class, page);
|
||||
|
||||
dfLwhhTagMonthPage = dfMultiDimensionalStatLogService.dfLwhhTagMonth(new Page<DfLwhhTagMonth>(request, response,DfLwhhTagMonth.class), dfLwhhTagMonth);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"封堵来文函号-标签多维月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "封堵来文函号-标签多维月报表检索成功",dfLwhhTagMonthPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value="dfSrcIpAttrDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="封堵省-性质多维日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfSrcIpAttrDailySources(
|
||||
Page page,DfSrcIpAttrDaily dfSrcIpAttrDaily, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfSrcIpAttrDaily> dfSrcIpAttrDailyPage =null;
|
||||
try {
|
||||
resetTime(dfSrcIpAttrDaily, "daily");
|
||||
|
||||
dfMultiDimensionalStatLogService.queryConditionCheck(thread,start,dfSrcIpAttrDaily, DfSrcIpAttrDaily.class, page);
|
||||
|
||||
dfSrcIpAttrDailyPage = dfMultiDimensionalStatLogService.dfSrcIpAttrDaily(new Page<DfSrcIpAttrDaily>(request, response,DfSrcIpAttrDaily.class), dfSrcIpAttrDaily);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"封堵省-性质多维日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "封堵省-标签多维日报表检索成功",dfSrcIpAttrDailyPage,activeSys,logSource);
|
||||
}
|
||||
@RequestMapping(value="dfSrcIpAttrMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="封堵省-性质多维月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfSrcIpAttrMonthSources(
|
||||
Page page,DfSrcIpAttrMonth dfSrcIpAttrMonth, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfSrcIpAttrMonth> dfSrcIpAttrMonthPage =null;
|
||||
try {
|
||||
resetTime(dfSrcIpAttrMonth, "month");
|
||||
|
||||
|
||||
//查询条件校验
|
||||
dfMultiDimensionalStatLogService.queryConditionCheck(thread,start,dfSrcIpAttrMonth, DfSrcIpAttrMonth.class, page);
|
||||
|
||||
dfSrcIpAttrMonthPage = dfMultiDimensionalStatLogService.dfSrcIpAttrMonth(new Page<DfSrcIpAttrMonth>(request, response,DfSrcIpAttrMonth.class), dfSrcIpAttrMonth);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"封堵省-性质多维月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "封堵省-性质多维月报表检索成功",dfSrcIpAttrMonthPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value="dfSrcIpTagDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="封堵省-标签多维日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfSrcIpTagDailySources(
|
||||
Page page,DfSrcIpTagDaily dfSrcIpTagDaily, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfSrcIpTagDaily> dfSrcIpTagDailyPage =null;
|
||||
try {
|
||||
resetTime(dfSrcIpTagDaily, "daily");
|
||||
|
||||
dfMultiDimensionalStatLogService.queryConditionCheck(thread,start,dfSrcIpTagDaily, DfSrcIpTagDaily.class, page);
|
||||
|
||||
dfSrcIpTagDailyPage = dfMultiDimensionalStatLogService.dfSrcIpTagDaily(new Page<DfSrcIpTagDaily>(request, response,DfSrcIpTagDaily.class), dfSrcIpTagDaily);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"封堵省-标签多维日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "封堵省-标签多维日报表检索成功",dfSrcIpTagDailyPage,activeSys,logSource);
|
||||
}
|
||||
@RequestMapping(value="dfSrcIpTagMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="封堵省-标签多维月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfSrcIpTagMonthSources(
|
||||
Page page,DfSrcIpTagMonth dfSrcIpTagMonth, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfSrcIpTagMonth> dfSrcIpTagMonthPage =null;
|
||||
try {
|
||||
resetTime(dfSrcIpTagMonth, "month");
|
||||
|
||||
|
||||
//查询条件校验
|
||||
dfMultiDimensionalStatLogService.queryConditionCheck(thread,start,dfSrcIpTagMonth, DfSrcIpTagMonth.class, page);
|
||||
|
||||
dfSrcIpTagMonthPage = dfMultiDimensionalStatLogService.dfSrcIpTagMonth(new Page<DfSrcIpTagMonth>(request, response,DfSrcIpTagMonth.class), dfSrcIpTagMonth);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"封堵省-标签多维月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "封堵省-标签多维月报表检索成功",dfSrcIpTagMonthPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @Title: resetTime
|
||||
* @Description: (日报表默认查询本地前一天的数据)
|
||||
* @param @param entity
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public void resetTime(StatLogEntity<?> entity,String type) throws Exception{
|
||||
Map<String, String> map = DateUtils.getLocalTime(entity.getSearchStatStartTime(),
|
||||
entity.getSearchStatEndTime(), Constants.REPORT_LOCAL_TIME,type);
|
||||
entity.setSearchStatStartTime(map.get("startTime"));
|
||||
entity.setSearchStatEndTime(map.get("endTime"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,636 +0,0 @@
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.DfReportEntity;
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfAttrTypeReport;
|
||||
import com.nis.domain.restful.DfDestIpCountryReport;
|
||||
import com.nis.domain.restful.DfDestIpReport;
|
||||
import com.nis.domain.restful.DfEntranceReport;
|
||||
import com.nis.domain.restful.DfLwhhReport;
|
||||
import com.nis.domain.restful.DfPzReport;
|
||||
import com.nis.domain.restful.DfPzReportStat;
|
||||
import com.nis.domain.restful.DfServiceReport;
|
||||
import com.nis.domain.restful.DfSrcIpDomeSticReport;
|
||||
import com.nis.domain.restful.DfSrcIpReport;
|
||||
import com.nis.domain.restful.DfTagReport;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.DfReportService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
/**
|
||||
* @ClassName: DfReportController
|
||||
* @Description: TODO(一句话描述这个类)
|
||||
* @author (DDM)
|
||||
* @date 2016年10月31日上午11:56:50
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
public class DfReportController extends BaseRestController {
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
|
||||
protected String activeSys = Constants.ACTIVESYS_ALL;
|
||||
protected String logSource = "0";
|
||||
@Autowired
|
||||
protected DfReportService dfReportService;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
@RequestMapping(value = "dfPzReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控配置实时统计服务", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfPzReportSources(Page page, DfPzReport dfPzReport, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfPzReport> pzReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfPzReport);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfPzReport, DfPzReport.class, page);
|
||||
|
||||
// 查询数据库
|
||||
pzReportPage = dfReportService.findDfPzReportPage(new Page<DfPzReport>(request, response, DfPzReport.class),
|
||||
dfPzReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控配置实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控配置实时统计成功",
|
||||
pzReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置统计[小时]
|
||||
*
|
||||
* @param page
|
||||
* @param dfPzReport
|
||||
* @param model
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "dfPzStatSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控各配置量统计服务[小时]", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfPzStatSources(Page page, DfPzReportStat dfPzReportStat, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if (!Constants.ACTIVESYS_A.equals(dfPzReportStat.getSearchStatActiveSys())
|
||||
&& !Constants.ACTIVESYS_C.equals(dfPzReportStat.getSearchStatActiveSys())
|
||||
&& !Constants.ACTIVESYS_AB.equals(dfPzReportStat.getSearchStatActiveSys())
|
||||
) {
|
||||
dfPzReportStat.setSearchStatActiveSys(Constants.ACTIVESYS_B);
|
||||
}
|
||||
activeSys = dfPzReportStat.getSearchStatActiveSys();
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfPzReportStat> pzReportPage = null;
|
||||
try {
|
||||
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfPzReportStat);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfPzReportStat, DfPzReportStat.class, page);
|
||||
|
||||
// 查询数据库
|
||||
pzReportPage = dfReportService.findDfPzReportStatPage(
|
||||
new Page<DfPzReportStat>(request, response, DfPzReportStat.class), dfPzReportStat);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控各配置量统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控各配置量统计成功",
|
||||
pzReportPage, activeSys, logSource);
|
||||
}
|
||||
/**
|
||||
* 配置统计[分钟]
|
||||
*
|
||||
* @param page
|
||||
* @param dfPzReport
|
||||
* @param model
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "dfPzStatMinutesSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控各配置量统计服务[分钟]", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfPzStatMinutesSources(Page page, DfPzReportStat dfPzReportStat, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if (!Constants.ACTIVESYS_A.equals(dfPzReportStat.getSearchStatActiveSys())
|
||||
&& !Constants.ACTIVESYS_C.equals(dfPzReportStat.getSearchStatActiveSys())
|
||||
&& !Constants.ACTIVESYS_AB.equals(dfPzReportStat.getSearchStatActiveSys())
|
||||
) {
|
||||
dfPzReportStat.setSearchStatActiveSys(Constants.ACTIVESYS_B);
|
||||
}
|
||||
activeSys = dfPzReportStat.getSearchStatActiveSys();
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfPzReportStat> pzReportPage = null;
|
||||
try {
|
||||
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfPzReportStat);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfPzReportStat, DfPzReportStat.class, page);
|
||||
|
||||
// 查询数据库
|
||||
pzReportPage = dfReportService.findDfPzReportStatMinutesPage(
|
||||
new Page<DfPzReportStat>(request, response, DfPzReportStat.class), dfPzReportStat);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控各配置量统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控各配置量统计成功",
|
||||
pzReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置统计
|
||||
*
|
||||
* @param page
|
||||
* @param dfPzReport
|
||||
* @param model
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "dfPzSumStatSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控配置总量统计服务", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfPzSumStatSources(Page page, DfPzReportStat dfPzReportStat, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if (!Constants.ACTIVESYS_A.equals(dfPzReportStat.getSearchStatActiveSys())
|
||||
&& !Constants.ACTIVESYS_C.equals(dfPzReportStat.getSearchStatActiveSys())
|
||||
) {
|
||||
dfPzReportStat.setSearchStatActiveSys(Constants.ACTIVESYS_B);
|
||||
}
|
||||
activeSys = dfPzReportStat.getSearchStatActiveSys();
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
JSONObject json = new JSONObject();
|
||||
try {
|
||||
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfPzReportStat);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfPzReportStat, DfPzReportStat.class,page);
|
||||
|
||||
// 查询数据库
|
||||
Long sum = dfReportService.findDfPzReportSumStat(
|
||||
new Page<DfPzReportStat>(request, response, DfPzReportStat.class), dfPzReportStat);
|
||||
if (sum == null)
|
||||
sum = 0l;
|
||||
json.put("sum", sum);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控配置总量统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控配置总量统计成功", json,
|
||||
activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "dfServiceReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控业务类型实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfServiceReportSources(Page page, DfServiceReport dfServiceReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfServiceReport> serviceReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfServiceReport);
|
||||
|
||||
// 校验
|
||||
dfReportService.queryConditionCheck(thread, start, dfServiceReport, DfServiceReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
serviceReportPage = dfReportService.findDfServiceReportPage(
|
||||
new Page<DfServiceReport>(request, response, DfServiceReport.class), dfServiceReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控业务类型实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控业务类型实时统计成功",
|
||||
serviceReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "dfTagReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控标签实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfTagReportSources(Page page, DfTagReport dfTagReport, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfTagReport> tagReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfTagReport);
|
||||
|
||||
// 校验
|
||||
dfReportService.queryConditionCheck(thread, start, dfTagReport, DfTagReport.class, page);
|
||||
// 查询数据库
|
||||
tagReportPage = dfReportService
|
||||
.findDfTagReportPage(new Page<DfTagReport>(request, response, DfTagReport.class), dfTagReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控标签实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控标签实时统计成功",
|
||||
tagReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfSrcIpDomesticReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控境内源IP实时统计服务", httpMethod = "GET", notes = "管控境内源IP实时统计列表")
|
||||
public Map dfSrcIpDomesticReportSources(Page page, DfSrcIpReport dfSrcIpDomesticReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfSrcIpReport> reporPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfSrcIpDomesticReport);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfSrcIpDomesticReport, DfSrcIpReport.class, page);
|
||||
|
||||
reporPage = dfReportService.findDfSrcIpReport(
|
||||
new Page<DfSrcIpReport>(request, response, DfSrcIpReport.class), dfSrcIpDomesticReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控境内源IP实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控境内源IP实时统计检索成功",
|
||||
reporPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/dfDestIpCountryReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控各国家目的IP实时统计服务", httpMethod = "GET", notes = "管控各国家目的IP实时统计列表")
|
||||
public Map dfDestIpCountryReportSources(Page page, DfDestIpReport dfDestIpReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfDestIpReport> reporPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfDestIpReport);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfDestIpReport, DfDestIpReport.class, page);
|
||||
|
||||
reporPage = dfReportService.findDfDestIpReport(
|
||||
new Page<DfDestIpReport>(request, response, DfDestIpReport.class), dfDestIpReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控各国家目的IP实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控各国家目的IP实时统计检索成功",
|
||||
reporPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "dfPzPrivServiceSumSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控配置总量实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfPzPrivServiceSumSources(Page page, DfPzReport dfPzReport, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DfPzReport> pzReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfPzReport);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfPzReport, DfPzReport.class, page);
|
||||
|
||||
// 查询数据库
|
||||
pzReportPage = dfReportService.findDfPriTagReport(new Page<DfPzReport>(request, response, DfPzReport.class),
|
||||
dfPzReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控配置总量实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控配置总量实时统计成功",
|
||||
pzReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "dfAttrTypeReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控性质(带私有标签)实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfAttrTypeReportSources(Page page, DfAttrTypeReport dfAttrTypeReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DfAttrTypeReport> attrTypeReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfAttrTypeReport);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfAttrTypeReport, DfPzReport.class, page);
|
||||
// 查询数据库
|
||||
attrTypeReportPage = dfReportService.findAttrTypeReport(
|
||||
new Page<DfAttrTypeReport>(request, response, DfAttrTypeReport.class), dfAttrTypeReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控性质(带私有标签)实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控性质(带私有标签)实时统计成功",
|
||||
attrTypeReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "dfSrcIpDomesticPrivServiceReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控境内源IP(带私有标签)实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfSrcIpDomesticPrivServiceReportSources(Page page, DfSrcIpDomeSticReport dfSrcIpDomeSticReport,
|
||||
Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DfSrcIpDomeSticReport> srcIpDomeSticReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfSrcIpDomeSticReport);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfSrcIpDomeSticReport, DfSrcIpDomeSticReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
srcIpDomeSticReportPage = dfReportService.findSrcIpDomeSticReport(
|
||||
new Page<DfSrcIpDomeSticReport>(request, response, DfSrcIpDomeSticReport.class),
|
||||
dfSrcIpDomeSticReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控境内源IP(带私有标签)实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控境内源IP(带私有标签)实时统计成功",
|
||||
srcIpDomeSticReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "dfDestIpCountryPrivServiceReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控境内目的IP(带私有标签)实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfDestIpCountryPrivServiceReportSources(Page page, DfDestIpCountryReport dfDestIpCountryReport,
|
||||
Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DfDestIpCountryReport> dfDestIpCountryReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfDestIpCountryReport);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfDestIpCountryReport, DfDestIpCountryReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
dfDestIpCountryReportPage = dfReportService.findDestIpCountryReport(
|
||||
new Page<DfDestIpCountryReport>(request, response, DfDestIpCountryReport.class),
|
||||
dfDestIpCountryReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控境内目的IP(带私有标签)实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控境内目的IP(带私有标签)实时统计成功",
|
||||
dfDestIpCountryReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "dfEntranceReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控局点(带私有标签)实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfEntranceReportSources(Page page, DfEntranceReport dfEntranceReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DfEntranceReport> dfEntranceReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfEntranceReport);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfEntranceReport, DfEntranceReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
dfEntranceReportPage = dfReportService.findDfEntranceReport(
|
||||
new Page<DfEntranceReport>(request, response, DfEntranceReport.class), dfEntranceReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控局点(带私有标签)实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控局点(带私有标签)实时统计成功",
|
||||
dfEntranceReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "dfLwhhReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控来文函号(带私有标签)实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfLwhhReportSources(Page page, DfLwhhReport dfLwhhReport, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DfLwhhReport> dfLwhhReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfLwhhReport);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfLwhhReport, DfLwhhReport.class, page);
|
||||
// 查询数据库
|
||||
dfLwhhReportPage = dfReportService
|
||||
.findDfLwhhReport(new Page<DfLwhhReport>(request, response, DfLwhhReport.class), dfLwhhReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控来文函号(带私有标签)实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控来文函号(带私有标签)实时统计成功",
|
||||
dfLwhhReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "dfTagPrivServiceReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "管控标签(带私有标签)实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfTagPrivServiceReportSources(Page page, DfTagReport dfTagReport, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DfTagReport> dfTagReportPage = null;
|
||||
try {
|
||||
|
||||
//设置本地默认查询时间
|
||||
resetTime(dfTagReport);
|
||||
|
||||
dfReportService.queryConditionCheck(thread, start, dfTagReport, DfTagReport.class, page);
|
||||
// 查询数据库
|
||||
dfTagReportPage = dfReportService
|
||||
.findDfTagReportPage(new Page<DfTagReport>(request, response, DfTagReport.class), dfTagReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "管控标签(带私有标签)实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "管控标签(带私有标签)实时统计成功",
|
||||
dfTagReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @Title: resetTime
|
||||
* @Description: (实时统计默认查询本地一个小时的数据)
|
||||
* @param @param entity
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public void resetTime(DfReportEntity<?> entity) throws Exception {
|
||||
Map<String, String> map = DateUtils.getLocalTime(entity.getSearchReportStartTime(),
|
||||
entity.getSearchReportEndTime(), Constants.REPORT_LOCAL_TIME,"report");
|
||||
entity.setSearchReportStartTime(map.get("startTime"));
|
||||
entity.setSearchReportEndTime(map.get("endTime"));
|
||||
}
|
||||
}
|
||||
@@ -1,792 +0,0 @@
|
||||
/**
|
||||
* @Title: DfStatLogController.java
|
||||
* @Package com.nis.web.controller
|
||||
* @Description: TODO(用一句话描述该文件做什么)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 下午1:22:15
|
||||
* @version V1.0
|
||||
*/
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.DfReportEntity;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.StatLogEntity;
|
||||
import com.nis.domain.restful.DfAttrStatLogDaily;
|
||||
import com.nis.domain.restful.DfAttrStatLogMonth;
|
||||
import com.nis.domain.restful.DfDestIpCounrtyStatLogDaily;
|
||||
import com.nis.domain.restful.DfDestIpCounrtyStatLogMonth;
|
||||
import com.nis.domain.restful.DfEntrStatLogDaily;
|
||||
import com.nis.domain.restful.DfEntrStatLogMonth;
|
||||
import com.nis.domain.restful.DfLwhhStatLogDaily;
|
||||
import com.nis.domain.restful.DfLwhhStatLogMonth;
|
||||
import com.nis.domain.restful.DfSrcIpDomesticStatLogDaily;
|
||||
import com.nis.domain.restful.DfSrcIpDomesticStatLogMonth;
|
||||
import com.nis.domain.restful.DfStatLogDaily;
|
||||
import com.nis.domain.restful.DfStatLogMonth;
|
||||
import com.nis.domain.restful.DfTagStatLogDaily;
|
||||
import com.nis.domain.restful.DfTagStatLogMonth;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.redis.RedisDao;
|
||||
import com.nis.util.redis.SaveRedisThread;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.DfStatLogService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @ClassName: DfStatLogController
|
||||
* @Description: TODO(这里用一句话描述这个类的作用)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 下午1:22:15
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public class DfStatLogController extends BaseRestController{
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
protected String logSource="0";
|
||||
protected String activeSys=Constants.ACTIVESYS_ALL;
|
||||
|
||||
@Autowired
|
||||
protected DfStatLogService dfStatLogService;
|
||||
@Autowired
|
||||
protected RedisDao redisDao;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
@RequestMapping(value="dfStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="封堵日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfStatLogDailySources(
|
||||
Page page,DfStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
if (!StringUtil.isBlank(dailyLog.getSearchConfigId())) {
|
||||
Long.parseLong(dailyLog.getSearchConfigId());
|
||||
}
|
||||
|
||||
dfStatLogService.queryConditionCheck(thread,start,dailyLog, DfStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = dfStatLogService.dfStatLogDaily(new Page<DfStatLogDaily>(request, response,DfStatLogDaily.class), dailyLog);
|
||||
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchConfigId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"封堵日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "封堵日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
@RequestMapping(value="dfStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="封堵日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfStatLogMonthSources(
|
||||
Page page,DfStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
|
||||
if (!StringUtil.isBlank(monthLog.getSearchConfigId())) {
|
||||
Long.parseLong(monthLog.getSearchConfigId());
|
||||
}
|
||||
|
||||
//查询条件校验
|
||||
dfStatLogService.queryConditionCheck(thread,start,monthLog, DfStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = dfStatLogService.dfStatLogMonth(new Page<DfStatLogMonth>(request, response,DfStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchConfigId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"封堵日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "封堵日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签日报表
|
||||
*
|
||||
* @Title: dfTagStatLogDailySources
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="dfTagStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="标签封堵日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfTagStatLogDailySources(
|
||||
Page page,DfTagStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
//查询条件校验
|
||||
Page<DfTagStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
if (!StringUtil.isBlank(dailyLog.getSearchTag())) {
|
||||
Integer.parseInt(dailyLog.getSearchTag());
|
||||
}
|
||||
|
||||
dfStatLogService.queryConditionCheck(thread,start,dailyLog, DfTagStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = dfStatLogService.dfTagStatLogDaily(new Page<DfTagStatLogDaily>(request, response,DfTagStatLogDaily.class), dailyLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchTag参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"标签封堵日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "标签封堵日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* 标签月报表
|
||||
*
|
||||
* @Title: dfTagStatLogDailySources
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="dfTagStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="标签封堵日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfTagStatLogMonthSources(
|
||||
Page page,DfTagStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfTagStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
|
||||
if (!StringUtil.isBlank(monthLog.getSearchTag())) {
|
||||
Integer.parseInt(monthLog.getSearchTag());
|
||||
}
|
||||
|
||||
//查询条件校验
|
||||
dfStatLogService.queryConditionCheck(thread,start,monthLog, DfTagStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = dfStatLogService.dfTagStatLogMonth(new Page<DfTagStatLogMonth>(request, response,DfTagStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchTag参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"标签封堵日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "标签封堵日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: dfTagStatLogDailySources
|
||||
* @Description: (性质日报表)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="dfAttrStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="性质封堵日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfAttrStatLogDailySources(
|
||||
Page page,DfAttrStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfAttrStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
if (!StringUtil.isBlank(dailyLog.getSearchAttrType())) {
|
||||
Integer.parseInt(dailyLog.getSearchAttrType());
|
||||
}
|
||||
|
||||
dfStatLogService.queryConditionCheck(thread,start,dailyLog, DfAttrStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = dfStatLogService.dfAttrStatLogDaily(new Page<DfAttrStatLogDaily>(request, response,DfAttrStatLogDaily.class), dailyLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchAttrType参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"性质封堵日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "性质封堵日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* @Title: dfAttrStatLogDailySources
|
||||
* @Description: (性质月报表)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="dfAttrStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="性质封堵日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfAttrStatLogMonthSources(
|
||||
Page page,DfAttrStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfAttrStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
|
||||
if (!StringUtil.isBlank(monthLog.getSearchAttrType())) {
|
||||
Integer.parseInt(monthLog.getSearchAttrType());
|
||||
}
|
||||
|
||||
//查询条件校验
|
||||
dfStatLogService.queryConditionCheck(thread,start,monthLog, DfAttrStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = dfStatLogService.dfAttrStatLogMonth(new Page<DfAttrStatLogMonth>(request, response,DfAttrStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchAttrType参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"性质封堵日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "性质封堵日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: dfEntrStatLogDailySources
|
||||
* @Description: (局点日报表)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="dfEntrStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="局点封堵日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfEntrStatLogDailySources(
|
||||
Page page,DfEntrStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfEntrStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
if (!StringUtil.isBlank(dailyLog.getSearchEntranceId())) {
|
||||
Integer.parseInt(dailyLog.getSearchEntranceId());
|
||||
}
|
||||
|
||||
dfStatLogService.queryConditionCheck(thread,start,dailyLog, DfEntrStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = dfStatLogService.dfEntrStatLogDaily(new Page<DfEntrStatLogDaily>(request, response,DfEntrStatLogDaily.class), dailyLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchEntranceId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"局点封堵日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "局点封堵日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* @Title: dfEntrStatLogDailySources
|
||||
* @Description: (局点月报表)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="dfEntrStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="局点封堵日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfEntrStatLogMonthSources(
|
||||
Page page,DfEntrStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfEntrStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
|
||||
if (!StringUtil.isBlank(monthLog.getSearchEntranceId())) {
|
||||
Integer.parseInt(monthLog.getSearchEntranceId());
|
||||
}
|
||||
//查询条件校验
|
||||
dfStatLogService.queryConditionCheck(thread,start,monthLog, DfEntrStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = dfStatLogService.dfEntrStatLogMonth(new Page<DfEntrStatLogMonth>(request, response,DfEntrStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchEntranceId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"局点封堵日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "局点封堵日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* @Title: dfLwhhStatLogDailySources
|
||||
* @Description: (局点日报表)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="dfLwhhStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="来文函号封堵日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfLwhhStatLogDailySources(
|
||||
Page page,DfLwhhStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
//查询条件校验
|
||||
Page<DfLwhhStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
if (!StringUtil.isBlank(dailyLog.getSearchLwhh())) {
|
||||
Integer.parseInt(dailyLog.getSearchLwhh());
|
||||
}
|
||||
|
||||
dfStatLogService.queryConditionCheck(thread,start,dailyLog, DfLwhhStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = dfStatLogService.dfLwhhStatLogDaily(new Page<DfLwhhStatLogDaily>(request, response,DfLwhhStatLogDaily.class), dailyLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchLwhh参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"来文函号封堵日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "来文函号封堵日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* @Title: dfLwhhStatLogDailySources
|
||||
* @Description: (局点月报表)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="dfLwhhStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="来文函号封堵日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfLwhhStatLogMonthSources(
|
||||
Page page,DfLwhhStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfLwhhStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
|
||||
if (!StringUtil.isBlank(monthLog.getSearchLwhh())) {
|
||||
Integer.parseInt(monthLog.getSearchLwhh());
|
||||
}
|
||||
//查询条件校验
|
||||
dfStatLogService.queryConditionCheck(thread,start,monthLog, DfLwhhStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = dfStatLogService.dfLwhhStatLogMonth(new Page<DfLwhhStatLogMonth>(request, response,DfLwhhStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchLwhh参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"来文函号封堵日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "来文函号封堵日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 境内源IP日报表
|
||||
*
|
||||
* @Title: dfSrcIpDomesticStatLogDailySources
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="dfSrcIpDomesticStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="境内源IP封堵日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfSrcIpDomesticStatLogDailySources(
|
||||
Page page,DfSrcIpDomesticStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfSrcIpDomesticStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
dfStatLogService.queryConditionCheck(thread,start,dailyLog, DfSrcIpDomesticStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = dfStatLogService.dfSrcIpDomesticStatLogDaily(new Page<DfSrcIpDomesticStatLogDaily>(request, response,DfSrcIpDomesticStatLogDaily.class), dailyLog);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"境内源IP封堵日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "境内源IP封堵日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* 境内源IP月报表
|
||||
*
|
||||
* @Title: dfSrcIpDomesticStatLogMonthSources
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="dfSrcIpDomesticStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="境内源IP封堵日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfSrcIpDomesticStatLogMonthSources(
|
||||
Page page,DfSrcIpDomesticStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfSrcIpDomesticStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
//查询条件校验
|
||||
dfStatLogService.queryConditionCheck(thread,start,monthLog, DfSrcIpDomesticStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = dfStatLogService.dfSrcIpDomesticStatLogMonth(new Page<DfSrcIpDomesticStatLogMonth>(request, response,DfSrcIpDomesticStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"境内源IP封堵日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "境内源IP封堵日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* 国家目的IP日报表
|
||||
*
|
||||
* @Title: dfDestIpCounrtyStatLogDailySources
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="dfDestIpCountryStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="国家目的IP封堵日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfDestIpCounrtyStatLogDailySources(
|
||||
Page page,DfDestIpCounrtyStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfDestIpCounrtyStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
dfStatLogService.queryConditionCheck(thread,start,dailyLog, DfDestIpCounrtyStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = dfStatLogService.dfDestIpCounrtyStatLogDaily(new Page<DfDestIpCounrtyStatLogDaily>(request, response,DfDestIpCounrtyStatLogDaily.class), dailyLog);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"国家目的IP封堵日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "国家目的IP封堵日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* 国家目的IP月报表
|
||||
*
|
||||
* @Title: dfDestIpCounrtyStatLogMonthSources
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="dfDestIpCountryStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="国家目的IP封堵日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map dfDestIpCounrtyStatLogMonthSources(
|
||||
Page page,DfDestIpCounrtyStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DfDestIpCounrtyStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
//查询条件校验
|
||||
dfStatLogService.queryConditionCheck(thread,start,monthLog, DfDestIpCounrtyStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = dfStatLogService.dfDestIpCounrtyStatLogMonth(new Page<DfDestIpCounrtyStatLogMonth>(request, response,DfDestIpCounrtyStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"国家目的IP封堵日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "国家目的IP封堵日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @Title: resetTime
|
||||
* @Description: (日报表默认查询本地前一天的数据)
|
||||
* @param @param entity
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public void resetTime(StatLogEntity<?> entity,String type) throws Exception{
|
||||
Map<String, String> map = DateUtils.getLocalTime(entity.getSearchStatStartTime(),
|
||||
entity.getSearchStatEndTime(), Constants.REPORT_LOCAL_TIME,type);
|
||||
entity.setSearchStatStartTime(map.get("startTime"));
|
||||
entity.setSearchStatEndTime(map.get("endTime"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,921 +0,0 @@
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DjCkStatLog;
|
||||
import com.nis.domain.restful.DjJitAffairDestReport;
|
||||
import com.nis.domain.restful.DjJitAffairSrcReport;
|
||||
import com.nis.domain.restful.DjJitFlDestReport;
|
||||
import com.nis.domain.restful.DjJitFlSrcReport;
|
||||
import com.nis.domain.restful.DjJitGuaranteeDestReport;
|
||||
import com.nis.domain.restful.DjJitGuaranteeSrcReport;
|
||||
import com.nis.domain.restful.DjJitIdDestReport;
|
||||
import com.nis.domain.restful.DjJitIdSrcReport;
|
||||
import com.nis.domain.restful.DjJitMissionDestReport;
|
||||
import com.nis.domain.restful.DjJitMissionSrcReport;
|
||||
import com.nis.domain.restful.DjJitTagDestReport;
|
||||
import com.nis.domain.restful.DjJitTagSrcReport;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.DjJitLogSearchService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DjJitLogSearchController
|
||||
* @Description: 监测日志实时统计查询服务
|
||||
* @author (rkg)
|
||||
* @date 2016年9月13日上午10:32:21
|
||||
* @version V1.0
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
public class DjJitLogSearchController extends BaseRestController {
|
||||
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
private final Logger logger1 = Logger.getLogger(this.getClass());
|
||||
protected String logSource = "0";
|
||||
@Autowired
|
||||
private DjJitLogSearchService djJitLogSearchService;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
@RequestMapping(value = "/djJitFlSrcReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测分类性质源IP实时统计", httpMethod = "GET", notes = "监测分类性质源IP实时统计列表")
|
||||
public Map djJitFlSrcReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjJitFlSrcReport djJitFlSrcReportSources, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DjJitFlSrcReport> djJitFlSrcReportSourcesPage = null;
|
||||
try {
|
||||
// 公共请求参数校验
|
||||
djJitLogSearchService.queryDjJitFlCheck(thread, start, djJitFlSrcReportSources.getSearchFl(),
|
||||
djJitFlSrcReportSources.getSearchXz());
|
||||
djJitLogSearchService.queryConditionCheck(thread, start, djJitFlSrcReportSources, DjJitFlSrcReport.class,
|
||||
page);
|
||||
djJitFlSrcReportSourcesPage = djJitLogSearchService.findDjJitFlSrcReport(
|
||||
new Page<DjJitFlSrcReport>(request, response, DjJitFlSrcReport.class), djJitFlSrcReportSources);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测分类性质源IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测分类性质源IP实时统计检索成功",
|
||||
djJitFlSrcReportSourcesPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/djJitFlDestReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测分类性质目的IP实时统计服务", httpMethod = "GET", notes = "监测分类性质目的IP实时统计列表")
|
||||
public Map djJitFlDestReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjJitFlDestReport djJitFlDestReport, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DjJitFlDestReport> reporPage = null;
|
||||
try {
|
||||
// 公共请求参数校验
|
||||
djJitLogSearchService.queryDjJitFlCheck(thread, start, djJitFlDestReport.getSearchFl(),
|
||||
djJitFlDestReport.getSearchXz());
|
||||
djJitLogSearchService.queryConditionCheck(thread, start, djJitFlDestReport, DjJitFlDestReport.class, page);
|
||||
reporPage = djJitLogSearchService.findDjJitFlDestReport(
|
||||
new Page<DjJitFlDestReport>(request, response, DjJitFlDestReport.class), djJitFlDestReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测分类性质目的IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测分类性质目的IP实时统计检索成功",
|
||||
reporPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/djJitAffairSrcReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测事件子话题源IP实时统计服务", httpMethod = "GET", notes = "监测事件子话题源IP实时统计列表")
|
||||
public Map djJitAffairSrcReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjJitAffairSrcReport djJitAffairSrcReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(djJitAffairSrcReport.getSearchAffair())) {
|
||||
Integer.parseInt(djJitAffairSrcReport.getSearchAffair());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchAffair参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchAffair参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
try {
|
||||
if (!StringUtil.isBlank(djJitAffairSrcReport.getSearchTopic())) {
|
||||
Integer.parseInt(djJitAffairSrcReport.getSearchTopic());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchTopic参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchTopic参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DjJitAffairSrcReport> reporPage = null;
|
||||
try {
|
||||
djJitLogSearchService.queryConditionCheck(thread, start, djJitAffairSrcReport, DjJitAffairSrcReport.class,
|
||||
page);
|
||||
reporPage = djJitLogSearchService.findDjJitAffairSrcReport(
|
||||
new Page<DjJitAffairSrcReport>(request, response, DjJitAffairSrcReport.class),
|
||||
djJitAffairSrcReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测事件子话题源IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测事件子话题源IP实时统计检索成功",
|
||||
reporPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/djJitAffairDestReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测事件子话题目的IP实时统计服务", httpMethod = "GET", notes = "监测事件子话题目的IP实时统计列表")
|
||||
public Map djJitAffairDestReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjJitAffairDestReport djJitAffairDestReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(djJitAffairDestReport.getSearchAffair())) {
|
||||
Integer.parseInt(djJitAffairDestReport.getSearchAffair());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchAffair参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchAffair参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
try {
|
||||
if (!StringUtil.isBlank(djJitAffairDestReport.getSearchTopic())) {
|
||||
Integer.parseInt(djJitAffairDestReport.getSearchTopic());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchTopic参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchTopic参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
Page<DjJitAffairDestReport> reporPage = null;
|
||||
try {
|
||||
djJitLogSearchService.queryConditionCheck(thread, start, djJitAffairDestReport, DjJitAffairDestReport.class,
|
||||
page);
|
||||
reporPage = djJitLogSearchService.findDjJitAffairDestReport(
|
||||
new Page<DjJitAffairDestReport>(request, response, DjJitAffairDestReport.class),
|
||||
djJitAffairDestReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测事件子话题目的IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测事件子话题目的IP实时统计检索成功",
|
||||
reporPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/djJitMissionSrcReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测任务源IP实时统计服务", httpMethod = "GET", notes = "监测任务源IP实时统计列表")
|
||||
public Map djJitMissionSrcReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjJitMissionSrcReport djJitMissionSrcReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(djJitMissionSrcReport.getSearchMission())) {
|
||||
Integer.parseInt(djJitMissionSrcReport.getSearchMission());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchMission参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchMission参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DjJitMissionSrcReport> reporPage = null;
|
||||
try {
|
||||
djJitLogSearchService.queryConditionCheck(thread, start, djJitMissionSrcReport, DjJitMissionSrcReport.class,
|
||||
page);
|
||||
reporPage = djJitLogSearchService.findDjJitMissionSrcReport(
|
||||
new Page<DjJitMissionSrcReport>(request, response, DjJitMissionSrcReport.class),
|
||||
djJitMissionSrcReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测任务源IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测任务源IP实时统计检索成功",
|
||||
reporPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/djJitMissionDestReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测任务目的IP实时统计服务", httpMethod = "GET", notes = "监测任务目的IP实时统计列表")
|
||||
public Map djJitMissionDestReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjJitMissionDestReport djJitMissionDestReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(djJitMissionDestReport.getSearchMission())) {
|
||||
Integer.parseInt(djJitMissionDestReport.getSearchMission());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchMission参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchMission参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DjJitMissionDestReport> reporPage = null;
|
||||
try {
|
||||
djJitLogSearchService.queryConditionCheck(thread, start, djJitMissionDestReport,
|
||||
DjJitMissionDestReport.class, page);
|
||||
reporPage = djJitLogSearchService.findDjJitMissionDestReport(
|
||||
new Page<DjJitMissionDestReport>(request, response, DjJitMissionDestReport.class),
|
||||
djJitMissionDestReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测任务目的IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测任务目的IP实时统计检索成功",
|
||||
reporPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/djJitGuaranteeSrcReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测保障期源IP实时统计服务", httpMethod = "GET", notes = "监测保障期源IP实时统计列表")
|
||||
public Map djJitGuaranteeSrcReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjJitGuaranteeSrcReport djJitGuaranteeSrcReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(djJitGuaranteeSrcReport.getSearchGuarantee())) {
|
||||
Integer.parseInt(djJitGuaranteeSrcReport.getSearchGuarantee());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchGuarantee参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchGuarantee参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DjJitGuaranteeSrcReport> reporPage = null;
|
||||
try {
|
||||
djJitLogSearchService.queryConditionCheck(thread, start, djJitGuaranteeSrcReport,
|
||||
DjJitGuaranteeSrcReport.class, page);
|
||||
reporPage = djJitLogSearchService.findDjJitGuaranteeSrcReport(
|
||||
new Page<DjJitGuaranteeSrcReport>(request, response, DjJitGuaranteeSrcReport.class),
|
||||
djJitGuaranteeSrcReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测保障期源IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测保障期源IP实时统计检索成功",
|
||||
reporPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/djJitGuaranteeDestReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测保障期目的IP实时统计服务", httpMethod = "GET", notes = "监测保障期目的IP实时统计列表")
|
||||
public Map djJitGuaranteeDestReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjJitGuaranteeDestReport djJitGuaranteeDestReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(djJitGuaranteeDestReport.getSearchGuarantee())) {
|
||||
Integer.parseInt(djJitGuaranteeDestReport.getSearchGuarantee());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchGuarantee参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchGuarantee参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DjJitGuaranteeDestReport> reporPage = null;
|
||||
try {
|
||||
djJitLogSearchService.queryConditionCheck(thread, start, djJitGuaranteeDestReport,
|
||||
DjJitGuaranteeDestReport.class, page);
|
||||
reporPage = djJitLogSearchService.findDjJitGuaranteeDestReport(
|
||||
new Page<DjJitGuaranteeDestReport>(request, response, DjJitGuaranteeDestReport.class),
|
||||
djJitGuaranteeDestReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测保障期目的IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测保障期目的IP实时统计检索成功",
|
||||
reporPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/djJitTagSrcReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测标签源IP实时统计服务", httpMethod = "GET", notes = "监测标签源IP实时统计列表")
|
||||
public Map djJitTagSrcReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjJitTagSrcReport djJitTagSrcReport, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
if (null != djJitTagSrcReport.getSearchTag() && !djJitTagSrcReport.getSearchTag().equals("")) {
|
||||
String[] tagArr = djJitTagSrcReport.getSearchTag().split(",");
|
||||
List<String> tagList = new ArrayList<String>();
|
||||
for (int i = 0; i < tagArr.length; i++) {
|
||||
if (!tagArr[i].equals("")) {
|
||||
try {
|
||||
Integer.parseInt(tagArr[i]);
|
||||
tagList.add(tagArr[i]);
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread,
|
||||
System.currentTimeMillis() - start, "searchTag参数格式错误",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchTag参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
}
|
||||
}
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (String str : tagList) {
|
||||
sb.append(str + ",");
|
||||
}
|
||||
String tag = sb.substring(0, sb.length() - 1);
|
||||
djJitTagSrcReport.setSearchTag(tag);
|
||||
}
|
||||
|
||||
Page<DjJitTagSrcReport> reporPage = null;
|
||||
try {
|
||||
djJitLogSearchService.queryConditionCheck(thread, start, djJitTagSrcReport, DjJitTagSrcReport.class, page);
|
||||
reporPage = djJitLogSearchService.findDjJitTagSrcReport(
|
||||
new Page<DjJitTagSrcReport>(request, response, DjJitTagSrcReport.class), djJitTagSrcReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测标签源IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测标签源IP实时统计检索成功",
|
||||
reporPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/djJitTagDestReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测标签目的IP实时统计服务", httpMethod = "GET", notes = "监测标签目的IP实时统计列表")
|
||||
public Map djJitTagDestReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjJitTagDestReport djJitTagDestReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
if (null != djJitTagDestReport.getSearchTag() && !djJitTagDestReport.getSearchTag().equals("")) {
|
||||
String[] tagArr = djJitTagDestReport.getSearchTag().split(",");
|
||||
List<String> tagList = new ArrayList<String>();
|
||||
for (int i = 0; i < tagArr.length; i++) {
|
||||
if (!tagArr[i].equals("")) {
|
||||
try {
|
||||
Integer.parseInt(tagArr[i]);
|
||||
tagList.add(tagArr[i]);
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread,
|
||||
System.currentTimeMillis() - start, "searchTag参数格式错误",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchTag参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
}
|
||||
}
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (String str : tagList) {
|
||||
sb.append(str + ",");
|
||||
}
|
||||
String tag = sb.substring(0, sb.length() - 1);
|
||||
djJitTagDestReport.setSearchTag(tag);
|
||||
}
|
||||
Page<DjJitTagDestReport> reporPage = null;
|
||||
try {
|
||||
djJitLogSearchService.queryConditionCheck(thread, start, djJitTagDestReport, DjJitTagDestReport.class,
|
||||
page);
|
||||
reporPage = djJitLogSearchService.findDjJitTagDestReport(
|
||||
new Page<DjJitTagDestReport>(request, response, DjJitTagDestReport.class), djJitTagDestReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测标签目的IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测标签目的IP实时统计检索成功",
|
||||
reporPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/djJitIdSrcReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测规则源IP实时统计服务", httpMethod = "GET", notes = "监测规则源IP实时统计列表")
|
||||
public Map djJitIdSrcReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjJitIdSrcReport djJitIdSrcReport, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(djJitIdSrcReport.getSearchId())) {
|
||||
Integer.parseInt(djJitIdSrcReport.getSearchId());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchId参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DjJitIdSrcReport> reporPage = null;
|
||||
try {
|
||||
djJitLogSearchService.queryConditionCheck(thread, start, djJitIdSrcReport, DjJitIdSrcReport.class, page);
|
||||
reporPage = djJitLogSearchService.findDjJitIdSrcReport(
|
||||
new Page<DjJitIdSrcReport>(request, response, DjJitIdSrcReport.class), djJitIdSrcReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测规则源IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测规则源IP实时统计检索成功",
|
||||
reporPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/djJitIdDestReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测规则目的IP实时统计服务", httpMethod = "GET", notes = "监测规则目的IP实时统计列表")
|
||||
public Map djJitIdDestReportSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjJitIdDestReport djJitIdDestReport, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(djJitIdDestReport.getSearchId())) {
|
||||
Integer.parseInt(djJitIdDestReport.getSearchId());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchId参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DjJitIdDestReport> reporPage = null;
|
||||
try {
|
||||
djJitLogSearchService.queryConditionCheck(thread, start, djJitIdDestReport, DjJitIdDestReport.class, page);
|
||||
reporPage = djJitLogSearchService.findDjJitIdDestReport(
|
||||
new Page<DjJitIdDestReport>(request, response, DjJitIdDestReport.class), djJitIdDestReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测规则目的IP实时统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测规则目的IP实时统计检索成功",
|
||||
reporPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/djCkStatLogSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测日志国际出入口统计服务", httpMethod = "GET", notes = "监测日志国际出入口统计列表")
|
||||
public Map djCkStatLogSources(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
Page page, DjCkStatLog djCkStatLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
// 公共请求参数校验
|
||||
try {
|
||||
if (!StringUtil.isBlank(djCkStatLog.getSearchCfgId())) {
|
||||
Long.parseLong(djCkStatLog.getSearchCfgId());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchCfgId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchId参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
try {
|
||||
if (!StringUtil.isBlank(djCkStatLog.getSearchGjCkId())) {
|
||||
Long.parseLong(djCkStatLog.getSearchGjCkId());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchGjCkId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchGjCkId参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
try {
|
||||
if (!StringUtil.isBlank(djCkStatLog.getSearchActiveSys())) {
|
||||
Integer.parseInt(djCkStatLog.getSearchActiveSys());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchActiveSys参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchGjCkId参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
try {
|
||||
if (!StringUtil.isBlank(djCkStatLog.getSearchCapStartTime())) {
|
||||
sdf.parse(djCkStatLog.getSearchCapStartTime());
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchCapStartTime参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchCapStartTime参数格式格式");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
try {
|
||||
if (!StringUtil.isBlank(djCkStatLog.getSearchCapEndTime())) {
|
||||
sdf.parse(djCkStatLog.getSearchCapEndTime());
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchCapEndTime参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchCapEndTime参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
try {
|
||||
if (!StringUtil.isBlank(djCkStatLog.getSearchService())) {
|
||||
Integer.parseInt(djCkStatLog.getSearchService());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
RestServiceException restError = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"searchService参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restError.setActiveSys(searchActiveSys);
|
||||
restError.setLogSource(logSource);
|
||||
throw restError;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "searchService参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
try {
|
||||
djJitLogSearchService.checkCloumnIsExist(thread, start, DjCkStatLog.class, page);
|
||||
} catch (RestServiceException e) {
|
||||
logger1.error(e);
|
||||
e.setActiveSys(searchActiveSys);
|
||||
e.setLogSource(logSource);
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "请求参数错误");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
Page<DjCkStatLog> reporPage = null;
|
||||
try {
|
||||
reporPage = djJitLogSearchService
|
||||
.findDjCkStatLog(new Page<DjCkStatLog>(request, response, DjCkStatLog.class), djCkStatLog);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger1.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测日志国际出入口统计检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测日志国际出入口统计检索成功",
|
||||
reporPage, searchActiveSys, logSource);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,215 +0,0 @@
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.DfReportEntity;
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DjLwhhAttrReport;
|
||||
import com.nis.domain.restful.DjLwhhTagReport;
|
||||
import com.nis.domain.restful.DjSrcIpAttrReport;
|
||||
import com.nis.domain.restful.DjSrcIpTagReport;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.DjMultiDimensionalReportService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DjMultiDimensionalReportController
|
||||
* @Description: TODO(dj多维实时统计)
|
||||
* @author (DDM)
|
||||
* @date 2017年8月4日下午2:53:01
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
public class DjMultiDimensionalReportController extends BaseRestController {
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
|
||||
protected String activeSys = Constants.ACTIVESYS_ALL;
|
||||
protected String logSource = "0";
|
||||
@Autowired
|
||||
protected DjMultiDimensionalReportService djMultiDimensionalReportService;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
|
||||
@RequestMapping(value = "djLwhhAttrReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "来文函号、性质多维实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map djServiceReportSources(Page page, DjLwhhAttrReport djLwhhAttrReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DjLwhhAttrReport> lwhhAttrReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djLwhhAttrReport);
|
||||
// 校验
|
||||
djMultiDimensionalReportService.queryConditionCheck(thread, start, djLwhhAttrReport, DjLwhhAttrReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
lwhhAttrReportPage = djMultiDimensionalReportService.findDjLwhhAttrReportPage(
|
||||
new Page<DjLwhhAttrReport>(request, response, DjLwhhAttrReport.class), djLwhhAttrReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "来文函号、性质多维实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "来文函号、性质多维实时统计成功",
|
||||
lwhhAttrReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "djLwhhTagReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "来文函号、标签多维实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map djServiceReportSources(Page page, DjLwhhTagReport djLwhhTagReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DjLwhhTagReport> lwhhTagReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djLwhhTagReport);
|
||||
// 校验
|
||||
djMultiDimensionalReportService.queryConditionCheck(thread, start, djLwhhTagReport, DjLwhhTagReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
lwhhTagReportPage = djMultiDimensionalReportService.findDjLwhhTagReportPage(
|
||||
new Page<DjLwhhTagReport>(request, response, DjLwhhTagReport.class), djLwhhTagReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "来文函号、标签多维实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "来文函号、标签多维实时统计成功",
|
||||
lwhhTagReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "djSrcIpAttrReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "来文函号、性质多维实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map djServiceReportSources(Page page, DjSrcIpAttrReport djSrcIpAttrReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DjSrcIpAttrReport> srcIpAttrReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djSrcIpAttrReport);
|
||||
|
||||
// 校验
|
||||
djMultiDimensionalReportService.queryConditionCheck(thread, start, djSrcIpAttrReport, DjSrcIpAttrReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
srcIpAttrReportPage = djMultiDimensionalReportService.findDjSrcIpAttrReportPage(
|
||||
new Page<DjSrcIpAttrReport>(request, response, DjSrcIpAttrReport.class), djSrcIpAttrReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "境内源ip、性质多维实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "境内源ip、性质多维实时统计成功",
|
||||
srcIpAttrReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "djSrcIpTagReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "来文函号、标签多维实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map djServiceReportSources(Page page, DjSrcIpTagReport djSrcIpTagReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DjSrcIpTagReport> srcIpTagReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djSrcIpTagReport);
|
||||
// 校验
|
||||
djMultiDimensionalReportService.queryConditionCheck(thread, start, djSrcIpTagReport, DjSrcIpTagReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
srcIpTagReportPage = djMultiDimensionalReportService.findDjSrcIpTagReportPage(
|
||||
new Page<DjSrcIpTagReport>(request, response, DjSrcIpTagReport.class), djSrcIpTagReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "境内源ip、标签多维实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "境内源ip、标签多维实时统计成功",
|
||||
srcIpTagReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @Title: resetTime
|
||||
* @Description: (实时统计默认查询本地一个小时的数据)
|
||||
* @param @param entity
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public void resetTime(DfReportEntity<?> entity) throws Exception {
|
||||
Map<String, String> map = DateUtils.getLocalTime(entity.getSearchReportStartTime(),
|
||||
entity.getSearchReportEndTime(), Constants.REPORT_LOCAL_TIME,"report");
|
||||
entity.setSearchReportStartTime(map.get("startTime"));
|
||||
entity.setSearchReportEndTime(map.get("endTime"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,333 +0,0 @@
|
||||
/**
|
||||
* @Title: DjStatLogController.java
|
||||
* @Package com.nis.web.controller
|
||||
* @Description: TODO(用一句话描述该文件做什么)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 下午1:22:15
|
||||
* @version V1.0
|
||||
*/
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.StatLogEntity;
|
||||
import com.nis.domain.restful.DjLwhhAttrDaily;
|
||||
import com.nis.domain.restful.DjLwhhAttrMonth;
|
||||
import com.nis.domain.restful.DjLwhhTagDaily;
|
||||
import com.nis.domain.restful.DjLwhhTagMonth;
|
||||
import com.nis.domain.restful.DjSrcIpAttrDaily;
|
||||
import com.nis.domain.restful.DjSrcIpAttrMonth;
|
||||
import com.nis.domain.restful.DjSrcIpTagDaily;
|
||||
import com.nis.domain.restful.DjSrcIpTagMonth;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.redis.RedisDao;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.DjMultiDimensionalStatLogService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @ClassName: DjStatLogController
|
||||
* @Description: TODO(这里用一句话描述这个类的作用)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 下午1:22:15
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public class DjMultiDimensionalStatLogController extends BaseRestController{
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
protected String logSource="0";
|
||||
protected String activeSys=Constants.ACTIVESYS_ALL;
|
||||
|
||||
@Autowired
|
||||
protected DjMultiDimensionalStatLogService djMultiDimensionalStatLogService;
|
||||
@Autowired
|
||||
protected RedisDao redisDao;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value="djLwhhAttrDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测来文函号-性质多维日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djLwhhAttrDailySources(
|
||||
Page page,DjLwhhAttrDaily djLwhhAttrDaily, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjLwhhAttrDaily> djLwhhAttrDailyPage =null;
|
||||
try {
|
||||
resetTime(djLwhhAttrDaily, "daily");
|
||||
|
||||
djMultiDimensionalStatLogService.queryConditionCheck(thread,start,djLwhhAttrDaily, DjLwhhAttrDaily.class, page);
|
||||
|
||||
djLwhhAttrDailyPage = djMultiDimensionalStatLogService.djLwhhAttrDaily(new Page<DjLwhhAttrDaily>(request, response,DjLwhhAttrDaily.class), djLwhhAttrDaily);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"监测来文函号-性质多维日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "监测来文函号-标签多维日报表检索成功",djLwhhAttrDailyPage,activeSys,logSource);
|
||||
}
|
||||
@RequestMapping(value="djLwhhAttrMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测来文函号-性质多维月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djLwhhAttrMonthSources(
|
||||
Page page,DjLwhhAttrMonth djLwhhAttrMonth, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjLwhhAttrMonth> djLwhhAttrMonthPage =null;
|
||||
try {
|
||||
resetTime(djLwhhAttrMonth, "month");
|
||||
|
||||
|
||||
//查询条件校验
|
||||
djMultiDimensionalStatLogService.queryConditionCheck(thread,start,djLwhhAttrMonth, DjLwhhAttrMonth.class, page);
|
||||
|
||||
djLwhhAttrMonthPage = djMultiDimensionalStatLogService.djLwhhAttrMonth(new Page<DjLwhhAttrMonth>(request, response,DjLwhhAttrMonth.class), djLwhhAttrMonth);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"监测来文函号-性质多维月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "监测来文函号-性质多维月报表检索成功",djLwhhAttrMonthPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value="djLwhhTagDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测来文函号-标签多维日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djLwhhTagDailySources(
|
||||
Page page,DjLwhhTagDaily djLwhhTagDaily, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjLwhhTagDaily> djLwhhTagDailyPage =null;
|
||||
try {
|
||||
resetTime(djLwhhTagDaily, "daily");
|
||||
|
||||
djMultiDimensionalStatLogService.queryConditionCheck(thread,start,djLwhhTagDaily, DjLwhhTagDaily.class, page);
|
||||
|
||||
djLwhhTagDailyPage = djMultiDimensionalStatLogService.djLwhhTagDaily(new Page<DjLwhhTagDaily>(request, response,DjLwhhTagDaily.class), djLwhhTagDaily);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"监测来文函号-标签多维日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "监测来文函号-标签多维日报表检索成功",djLwhhTagDailyPage,activeSys,logSource);
|
||||
}
|
||||
@RequestMapping(value="djLwhhTagMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测来文函号-标签多维月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djLwhhTagMonthSources(
|
||||
Page page,DjLwhhTagMonth djLwhhTagMonth, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjLwhhTagMonth> djLwhhTagMonthPage =null;
|
||||
try {
|
||||
resetTime(djLwhhTagMonth, "month");
|
||||
|
||||
|
||||
//查询条件校验
|
||||
djMultiDimensionalStatLogService.queryConditionCheck(thread,start,djLwhhTagMonth, DjLwhhTagMonth.class, page);
|
||||
|
||||
djLwhhTagMonthPage = djMultiDimensionalStatLogService.djLwhhTagMonth(new Page<DjLwhhTagMonth>(request, response,DjLwhhTagMonth.class), djLwhhTagMonth);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"监测来文函号-标签多维月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "监测来文函号-标签多维月报表检索成功",djLwhhTagMonthPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value="djSrcIpAttrDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测省-性质多维日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djSrcIpAttrDailySources(
|
||||
Page page,DjSrcIpAttrDaily djSrcIpAttrDaily, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjSrcIpAttrDaily> djSrcIpAttrDailyPage =null;
|
||||
try {
|
||||
resetTime(djSrcIpAttrDaily, "daily");
|
||||
|
||||
djMultiDimensionalStatLogService.queryConditionCheck(thread,start,djSrcIpAttrDaily, DjSrcIpAttrDaily.class, page);
|
||||
|
||||
djSrcIpAttrDailyPage = djMultiDimensionalStatLogService.djSrcIpAttrDaily(new Page<DjSrcIpAttrDaily>(request, response,DjSrcIpAttrDaily.class), djSrcIpAttrDaily);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"监测省-性质多维日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "监测省-标签多维日报表检索成功",djSrcIpAttrDailyPage,activeSys,logSource);
|
||||
}
|
||||
@RequestMapping(value="djSrcIpAttrMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测省-性质多维月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djSrcIpAttrMonthSources(
|
||||
Page page,DjSrcIpAttrMonth djSrcIpAttrMonth, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjSrcIpAttrMonth> djSrcIpAttrMonthPage =null;
|
||||
try {
|
||||
resetTime(djSrcIpAttrMonth, "month");
|
||||
|
||||
|
||||
//查询条件校验
|
||||
djMultiDimensionalStatLogService.queryConditionCheck(thread,start,djSrcIpAttrMonth, DjSrcIpAttrMonth.class, page);
|
||||
|
||||
djSrcIpAttrMonthPage = djMultiDimensionalStatLogService.djSrcIpAttrMonth(new Page<DjSrcIpAttrMonth>(request, response,DjSrcIpAttrMonth.class), djSrcIpAttrMonth);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"监测省-性质多维月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "监测省-性质多维月报表检索成功",djSrcIpAttrMonthPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value="djSrcIpTagDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测省-标签多维日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djSrcIpTagDailySources(
|
||||
Page page,DjSrcIpTagDaily djSrcIpTagDaily, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjSrcIpTagDaily> djSrcIpTagDailyPage =null;
|
||||
try {
|
||||
resetTime(djSrcIpTagDaily, "daily");
|
||||
|
||||
djMultiDimensionalStatLogService.queryConditionCheck(thread,start,djSrcIpTagDaily, DjSrcIpTagDaily.class, page);
|
||||
|
||||
djSrcIpTagDailyPage = djMultiDimensionalStatLogService.djSrcIpTagDaily(new Page<DjSrcIpTagDaily>(request, response,DjSrcIpTagDaily.class), djSrcIpTagDaily);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"监测省-标签多维日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "监测省-标签多维日报表检索成功",djSrcIpTagDailyPage,activeSys,logSource);
|
||||
}
|
||||
@RequestMapping(value="djSrcIpTagMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测省-标签多维月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djSrcIpTagMonthSources(
|
||||
Page page,DjSrcIpTagMonth djSrcIpTagMonth, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjSrcIpTagMonth> djSrcIpTagMonthPage =null;
|
||||
try {
|
||||
resetTime(djSrcIpTagMonth, "month");
|
||||
|
||||
|
||||
//查询条件校验
|
||||
djMultiDimensionalStatLogService.queryConditionCheck(thread,start,djSrcIpTagMonth, DjSrcIpTagMonth.class, page);
|
||||
|
||||
djSrcIpTagMonthPage = djMultiDimensionalStatLogService.djSrcIpTagMonth(new Page<DjSrcIpTagMonth>(request, response,DjSrcIpTagMonth.class), djSrcIpTagMonth);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"监测省-标签多维月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "监测省-标签多维月报表检索成功",djSrcIpTagMonthPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @Title: resetTime
|
||||
* @Description: (日报表默认查询本地前一天的数据)
|
||||
* @param @param entity
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public void resetTime(StatLogEntity<?> entity,String type) throws Exception{
|
||||
Map<String, String> map = DateUtils.getLocalTime(entity.getSearchStatStartTime(),
|
||||
entity.getSearchStatEndTime(), Constants.REPORT_LOCAL_TIME,type);
|
||||
entity.setSearchStatStartTime(map.get("startTime"));
|
||||
entity.setSearchStatEndTime(map.get("endTime"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,487 +0,0 @@
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.DfReportEntity;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DjAttrTypeReport;
|
||||
import com.nis.domain.restful.DjDestIpCountryReport;
|
||||
import com.nis.domain.restful.DjEntranceReport;
|
||||
import com.nis.domain.restful.DjLwhhReport;
|
||||
import com.nis.domain.restful.DjPzReport;
|
||||
import com.nis.domain.restful.DjSrcIpDomeSticReport;
|
||||
import com.nis.domain.restful.DjTagReport;
|
||||
import com.nis.domain.restful.DjPzReportStat;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.DjReportService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
/**
|
||||
* @ClassName: DjReportController
|
||||
* @Description: 监测日志实时统计查询服务
|
||||
* @author (ZBC)
|
||||
* @date 2016年11月22日下午06:00:00
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
public class DjReportController extends BaseRestController {
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
|
||||
protected String activeSys = Constants.ACTIVESYS_ALL;
|
||||
protected String logSource = "0";
|
||||
|
||||
@Autowired
|
||||
protected DjReportService djReportService;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
@RequestMapping(value = "djPzReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测配置实时统计服务", httpMethod = "GET", notes = "get log list")
|
||||
public Map djPzReportSources(Page page, DjPzReport djPzReport, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DjPzReport> pzReportPage = null;
|
||||
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djPzReport);
|
||||
|
||||
djReportService.queryConditionCheck(thread, start, djPzReport, DjPzReport.class, page);
|
||||
// 查询数据库
|
||||
pzReportPage = djReportService.findDjPzReportPage(new Page<DjPzReport>(request, response, DjPzReport.class),
|
||||
djPzReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测配置实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测配置实时统计成功",
|
||||
pzReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置统计【小时】
|
||||
*
|
||||
* @param page
|
||||
* @param djPzReport
|
||||
* @param model
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "djPzStatSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测各配置量统计服务[小时]", httpMethod = "GET", notes = "get log list")
|
||||
public Map djPzStatSources(Page page, DjPzReportStat djPzReportStat, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if (!Constants.ACTIVESYS_A.equals(djPzReportStat.getSearchStatActiveSys())
|
||||
&& !Constants.ACTIVESYS_C.equals(djPzReportStat.getSearchStatActiveSys())
|
||||
&& !Constants.ACTIVESYS_AB.equals(djPzReportStat.getSearchStatActiveSys())) {
|
||||
djPzReportStat.setSearchStatActiveSys(Constants.ACTIVESYS_B);
|
||||
}
|
||||
activeSys = djPzReportStat.getSearchStatActiveSys();
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DjPzReportStat> pzReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djPzReportStat);
|
||||
|
||||
djReportService.queryConditionCheck(thread, start, djPzReportStat, DjPzReportStat.class, page);
|
||||
|
||||
// 查询数据库
|
||||
pzReportPage = djReportService.findDjPzReportStatPage(
|
||||
new Page<DjPzReportStat>(request, response, DjPzReportStat.class), djPzReportStat);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测各配置量统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测各配置量统计成功",
|
||||
pzReportPage, activeSys, logSource);
|
||||
}
|
||||
/**
|
||||
* 配置统计【分钟】
|
||||
*
|
||||
* @param page
|
||||
* @param djPzReport
|
||||
* @param model
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "djPzStatMinutesSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测各配置量统计服务[分钟]", httpMethod = "GET", notes = "get log list")
|
||||
public Map djPzStatMinutesSources(Page page, DjPzReportStat djPzReportStat, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
if (!Constants.ACTIVESYS_A.equals(djPzReportStat.getSearchStatActiveSys())
|
||||
&& !Constants.ACTIVESYS_C.equals(djPzReportStat.getSearchStatActiveSys())
|
||||
&& !Constants.ACTIVESYS_AB.equals(djPzReportStat.getSearchStatActiveSys())) {
|
||||
djPzReportStat.setSearchStatActiveSys(Constants.ACTIVESYS_B);
|
||||
}
|
||||
activeSys = djPzReportStat.getSearchStatActiveSys();
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
|
||||
Page<DjPzReportStat> pzReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djPzReportStat);
|
||||
|
||||
djReportService.queryConditionCheck(thread, start, djPzReportStat, DjPzReportStat.class, page);
|
||||
|
||||
// 查询数据库
|
||||
pzReportPage = djReportService.findDjPzReportStatMinutesPage(
|
||||
new Page<DjPzReportStat>(request, response, DjPzReportStat.class), djPzReportStat);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测各配置量统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测各配置量统计成功",
|
||||
pzReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置统计
|
||||
*
|
||||
* @param page
|
||||
* @param djPzReport
|
||||
* @param model
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "djPzSumStatSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测配置总量统计服务", httpMethod = "GET", notes = "get log list")
|
||||
public Map djPzSumStatSources(Page page, DjPzReportStat djPzReportStat, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
|
||||
if (!Constants.ACTIVESYS_A.equals(djPzReportStat.getSearchStatActiveSys())
|
||||
&& !Constants.ACTIVESYS_C.equals(djPzReportStat.getSearchStatActiveSys())
|
||||
) {
|
||||
djPzReportStat.setSearchStatActiveSys(Constants.ACTIVESYS_B);
|
||||
}
|
||||
activeSys = djPzReportStat.getSearchStatActiveSys();
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
JSONObject json = new JSONObject();
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djPzReportStat);
|
||||
|
||||
djReportService.queryConditionCheck(thread, start, djPzReportStat, DjPzReportStat.class,
|
||||
page);
|
||||
|
||||
// 查询数据库
|
||||
Long sum = djReportService.findDjPzReportSumStat(
|
||||
new Page<DjPzReportStat>(request, response, DjPzReportStat.class), djPzReportStat);
|
||||
if (sum == null)
|
||||
sum = 0l;
|
||||
json.put("sum", sum);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测配置总量统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测配置总量统计成功", json,
|
||||
activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "djPzPrivServiceReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测配置(带私有标签)统计服务", httpMethod = "GET", notes = "get log list")
|
||||
public Map djPzPrivServiceReportSources(Page page, DjPzReport djPzReport, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DjPzReport> djPzReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djPzReport);
|
||||
|
||||
djReportService.queryConditionCheck(thread, start, djPzReport, DjPzReport.class, page);
|
||||
// 查询数据库
|
||||
djPzReportPage = djReportService
|
||||
.findDjPzPrivPage(new Page<DjPzReport>(request, response, DjPzReport.class), djPzReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测配置(带私有标签)统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测配置(带私有标签)统计成功",
|
||||
djPzReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "djAttrTypeReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测性质(带私有标签)实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map djAttrTypeReportSources(Page page, DjAttrTypeReport djAttrTypeReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DjAttrTypeReport> attrTypeReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djAttrTypeReport);
|
||||
|
||||
djReportService.queryConditionCheck(thread, start, djAttrTypeReport, DjPzReport.class, page);
|
||||
// 查询数据库
|
||||
attrTypeReportPage = djReportService.findAttrTypeReport(
|
||||
new Page<DjAttrTypeReport>(request, response, DjAttrTypeReport.class), djAttrTypeReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测性质(带私有标签)实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测性质(带私有标签)实时统计成功",
|
||||
attrTypeReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "djSrcIpDomesticPrivServiceReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测境内源IP(带私有标签)实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map djSrcIpDomesticPrivServiceReportSources(Page page, DjSrcIpDomeSticReport djSrcIpDomeSticReport,
|
||||
Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DjSrcIpDomeSticReport> srcIpDomeSticReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djSrcIpDomeSticReport);
|
||||
|
||||
djReportService.queryConditionCheck(thread, start, djSrcIpDomeSticReport, DjSrcIpDomeSticReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
srcIpDomeSticReportPage = djReportService.findSrcIpDomeSticReport(
|
||||
new Page<DjSrcIpDomeSticReport>(request, response, DjSrcIpDomeSticReport.class),
|
||||
djSrcIpDomeSticReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测境内源IP(带私有标签)实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测境内源IP(带私有标签)实时统计成功",
|
||||
srcIpDomeSticReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "djDestIpCountryPrivServiceReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测境内目的IP(带私有标签)实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map djDestIpCountryPrivServiceReportSources(Page page, DjDestIpCountryReport djDestIpCountryReport,
|
||||
Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DjDestIpCountryReport> djDestIpCountryReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djDestIpCountryReport);
|
||||
|
||||
djReportService.queryConditionCheck(thread, start, djDestIpCountryReport, DjDestIpCountryReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
djDestIpCountryReportPage = djReportService.findDestIpCountryReport(
|
||||
new Page<DjDestIpCountryReport>(request, response, DjDestIpCountryReport.class),
|
||||
djDestIpCountryReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测境内目的IP(带私有标签)实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测境内目的IP(带私有标签)实时统计成功",
|
||||
djDestIpCountryReportPage, activeSys, logSource);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "djEntranceReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测局点(带私有标签)实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map djEntranceReportSources(Page page, DjEntranceReport djEntranceReport, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DjEntranceReport> djEntranceReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djEntranceReport);
|
||||
|
||||
djReportService.queryConditionCheck(thread, start, djEntranceReport, DjEntranceReport.class,
|
||||
page);
|
||||
// 查询数据库
|
||||
djEntranceReportPage = djReportService.findDjEntranceReport(
|
||||
new Page<DjEntranceReport>(request, response, DjEntranceReport.class), djEntranceReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测局点(带私有标签)实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测局点(带私有标签)实时统计成功",
|
||||
djEntranceReportPage, activeSys, logSource);
|
||||
}
|
||||
@RequestMapping(value = "djLwhhReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测来文函号(带私有标签)实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map djLwhhReportSources(Page page, DjLwhhReport djLwhhReport, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DjLwhhReport> djLwhhReportPage = null;
|
||||
try {
|
||||
//设置本地默认查询时间
|
||||
resetTime(djLwhhReport);
|
||||
|
||||
djReportService.queryConditionCheck(thread, start, djLwhhReport, DjLwhhReport.class, page);
|
||||
// 查询数据库
|
||||
djLwhhReportPage = djReportService
|
||||
.findDjLwhhReport(new Page<DjLwhhReport>(request, response, DjLwhhReport.class), djLwhhReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测来文函号(带私有标签)实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测来文函号(带私有标签)实时统计成功",
|
||||
djLwhhReportPage, activeSys, logSource);
|
||||
}
|
||||
@RequestMapping(value = "djTagPrivServiceReportSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "监测标签(带私有标签)实时统计", httpMethod = "GET", notes = "get log list")
|
||||
public Map djTagPrivServiceReportSources(Page page, DjTagReport djTagReport, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
null);
|
||||
Page<DjTagReport> djTagReportPage = null;
|
||||
try {
|
||||
|
||||
//设置本地默认查询时间
|
||||
resetTime(djTagReport);
|
||||
|
||||
djReportService.queryConditionCheck(thread, start, djTagReport, DjTagReport.class, page);
|
||||
// 查询数据库
|
||||
djTagReportPage = djReportService
|
||||
.findDjTagReportPage(new Page<DjTagReport>(request, response, DjTagReport.class), djTagReport);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.debug(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测标签(带私有标签)实时统计失败");
|
||||
}
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "监测标签(带私有标签)实时统计成功",
|
||||
djTagReportPage, activeSys, logSource);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @Title: resetTime
|
||||
* @Description: (实时统计默认查询本地一个小时的数据)
|
||||
* @param @param entity
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public void resetTime(DfReportEntity<?> entity) throws Exception {
|
||||
Map<String, String> map = DateUtils.getLocalTime(entity.getSearchReportStartTime(),
|
||||
entity.getSearchReportEndTime(), Constants.REPORT_LOCAL_TIME,"report");
|
||||
entity.setSearchReportStartTime(map.get("startTime"));
|
||||
entity.setSearchReportEndTime(map.get("endTime"));
|
||||
}
|
||||
}
|
||||
@@ -1,791 +0,0 @@
|
||||
/**
|
||||
* @Title: DjStatLogController.java
|
||||
* @Package com.nis.web.controller
|
||||
* @Description: TODO(用一句话描述该文件做什么)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 下午1:22:15
|
||||
* @version V1.0
|
||||
*/
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.StatLogEntity;
|
||||
import com.nis.domain.restful.DjAttrStatLogDaily;
|
||||
import com.nis.domain.restful.DjAttrStatLogMonth;
|
||||
import com.nis.domain.restful.DjDestIpCounrtyStatLogDaily;
|
||||
import com.nis.domain.restful.DjDestIpCounrtyStatLogMonth;
|
||||
import com.nis.domain.restful.DjEntrStatLogDaily;
|
||||
import com.nis.domain.restful.DjEntrStatLogMonth;
|
||||
import com.nis.domain.restful.DjLwhhStatLogDaily;
|
||||
import com.nis.domain.restful.DjLwhhStatLogMonth;
|
||||
import com.nis.domain.restful.DjSrcIpDomesticStatLogDaily;
|
||||
import com.nis.domain.restful.DjSrcIpDomesticStatLogMonth;
|
||||
import com.nis.domain.restful.DjStatLogDaily;
|
||||
import com.nis.domain.restful.DjStatLogMonth;
|
||||
import com.nis.domain.restful.DjTagStatLogDaily;
|
||||
import com.nis.domain.restful.DjTagStatLogMonth;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.redis.RedisDao;
|
||||
import com.nis.util.redis.SaveRedisThread;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.DjStatLogService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @ClassName: DjStatLogController
|
||||
* @Description: TODO(这里用一句话描述这个类的作用)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 下午1:22:15
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public class DjStatLogController extends BaseRestController{
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
protected String logSource="0";
|
||||
protected String activeSys=Constants.ACTIVESYS_ALL;
|
||||
|
||||
@Autowired
|
||||
protected DjStatLogService djStatLogService;
|
||||
@Autowired
|
||||
protected RedisDao redisDao;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
@RequestMapping(value="djStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djStatLogDailySources(
|
||||
Page page,DjStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
if (!StringUtil.isBlank(dailyLog.getSearchConfigId())) {
|
||||
Long.parseLong(dailyLog.getSearchConfigId());
|
||||
}
|
||||
|
||||
djStatLogService.queryConditionCheck(thread,start,dailyLog, DjStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = djStatLogService.djStatLogDaily(new Page<DjStatLogDaily>(request, response,DjStatLogDaily.class), dailyLog);
|
||||
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchConfigId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"监测日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "监测日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
@RequestMapping(value="djStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djStatLogMonthSources(
|
||||
Page page,DjStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
|
||||
if (!StringUtil.isBlank(monthLog.getSearchConfigId())) {
|
||||
Long.parseLong(monthLog.getSearchConfigId());
|
||||
}
|
||||
|
||||
//查询条件校验
|
||||
djStatLogService.queryConditionCheck(thread,start,monthLog, DjStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = djStatLogService.djStatLogMonth(new Page<DjStatLogMonth>(request, response,DjStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchConfigId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"监测日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "监测日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签日报表
|
||||
*
|
||||
* @Title: djTagStatLogDailySources
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="djTagStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="标签监测日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djTagStatLogDailySources(
|
||||
Page page,DjTagStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
//查询条件校验
|
||||
Page<DjTagStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
if (!StringUtil.isBlank(dailyLog.getSearchTag())) {
|
||||
Integer.parseInt(dailyLog.getSearchTag());
|
||||
}
|
||||
|
||||
djStatLogService.queryConditionCheck(thread,start,dailyLog, DjTagStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = djStatLogService.djTagStatLogDaily(new Page<DjTagStatLogDaily>(request, response,DjTagStatLogDaily.class), dailyLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchTag参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"标签监测日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "标签监测日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* 标签月报表
|
||||
*
|
||||
* @Title: djTagStatLogDailySources
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="djTagStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="标签监测日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djTagStatLogMonthSources(
|
||||
Page page,DjTagStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjTagStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
|
||||
if (!StringUtil.isBlank(monthLog.getSearchTag())) {
|
||||
Integer.parseInt(monthLog.getSearchTag());
|
||||
}
|
||||
|
||||
//查询条件校验
|
||||
djStatLogService.queryConditionCheck(thread,start,monthLog, DjTagStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = djStatLogService.djTagStatLogMonth(new Page<DjTagStatLogMonth>(request, response,DjTagStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchTag参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"标签监测日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "标签监测日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: djTagStatLogDailySources
|
||||
* @Description: (性质日报表)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="djAttrStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="性质监测日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djAttrStatLogDailySources(
|
||||
Page page,DjAttrStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjAttrStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
if (!StringUtil.isBlank(dailyLog.getSearchAttrType())) {
|
||||
Integer.parseInt(dailyLog.getSearchAttrType());
|
||||
}
|
||||
|
||||
djStatLogService.queryConditionCheck(thread,start,dailyLog, DjAttrStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = djStatLogService.djAttrStatLogDaily(new Page<DjAttrStatLogDaily>(request, response,DjAttrStatLogDaily.class), dailyLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchAttrType参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"性质监测日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "性质监测日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* @Title: djAttrStatLogDailySources
|
||||
* @Description: (性质月报表)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="djAttrStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="性质监测日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djAttrStatLogMonthSources(
|
||||
Page page,DjAttrStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjAttrStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
|
||||
if (!StringUtil.isBlank(monthLog.getSearchAttrType())) {
|
||||
Integer.parseInt(monthLog.getSearchAttrType());
|
||||
}
|
||||
|
||||
//查询条件校验
|
||||
djStatLogService.queryConditionCheck(thread,start,monthLog, DjAttrStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = djStatLogService.djAttrStatLogMonth(new Page<DjAttrStatLogMonth>(request, response,DjAttrStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchAttrType参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"性质监测日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "性质监测日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: djEntrStatLogDailySources
|
||||
* @Description: (局点日报表)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="djEntrStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="局点监测日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djEntrStatLogDailySources(
|
||||
Page page,DjEntrStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjEntrStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
if (!StringUtil.isBlank(dailyLog.getSearchEntranceId())) {
|
||||
Integer.parseInt(dailyLog.getSearchEntranceId());
|
||||
}
|
||||
|
||||
djStatLogService.queryConditionCheck(thread,start,dailyLog, DjEntrStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = djStatLogService.djEntrStatLogDaily(new Page<DjEntrStatLogDaily>(request, response,DjEntrStatLogDaily.class), dailyLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchEntranceId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"局点监测日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "局点监测日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* @Title: djEntrStatLogDailySources
|
||||
* @Description: (局点月报表)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="djEntrStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="局点监测日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djEntrStatLogMonthSources(
|
||||
Page page,DjEntrStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjEntrStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
|
||||
if (!StringUtil.isBlank(monthLog.getSearchEntranceId())) {
|
||||
Integer.parseInt(monthLog.getSearchEntranceId());
|
||||
}
|
||||
//查询条件校验
|
||||
djStatLogService.queryConditionCheck(thread,start,monthLog, DjEntrStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = djStatLogService.djEntrStatLogMonth(new Page<DjEntrStatLogMonth>(request, response,DjEntrStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchEntranceId参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"局点监测日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "局点监测日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* @Title: djLwhhStatLogDailySources
|
||||
* @Description: (局点日报表)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="djLwhhStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="来文函号监测日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djLwhhStatLogDailySources(
|
||||
Page page,DjLwhhStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
//查询条件校验
|
||||
Page<DjLwhhStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
if (!StringUtil.isBlank(dailyLog.getSearchLwhh())) {
|
||||
Integer.parseInt(dailyLog.getSearchLwhh());
|
||||
}
|
||||
|
||||
djStatLogService.queryConditionCheck(thread,start,dailyLog, DjLwhhStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = djStatLogService.djLwhhStatLogDaily(new Page<DjLwhhStatLogDaily>(request, response,DjLwhhStatLogDaily.class), dailyLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchLwhh参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"来文函号监测日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "来文函号监测日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* @Title: djLwhhStatLogDailySources
|
||||
* @Description: (局点月报表)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="djLwhhStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="来文函号监测日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djLwhhStatLogMonthSources(
|
||||
Page page,DjLwhhStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjLwhhStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
|
||||
if (!StringUtil.isBlank(monthLog.getSearchLwhh())) {
|
||||
Integer.parseInt(monthLog.getSearchLwhh());
|
||||
}
|
||||
//查询条件校验
|
||||
djStatLogService.queryConditionCheck(thread,start,monthLog, DjLwhhStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = djStatLogService.djLwhhStatLogMonth(new Page<DjLwhhStatLogMonth>(request, response,DjLwhhStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
RestServiceException restE = new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"SearchLwhh参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
restE.setActiveSys(activeSys);
|
||||
restE.setLogSource(logSource);
|
||||
throw restE;
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"来文函号监测日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "来文函号监测日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 境内源IP日报表
|
||||
*
|
||||
* @Title: djSrcIpDomesticStatLogDailySources
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="djSrcIpDomesticStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="境内源IP监测日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djSrcIpDomesticStatLogDailySources(
|
||||
Page page,DjSrcIpDomesticStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjSrcIpDomesticStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
djStatLogService.queryConditionCheck(thread,start,dailyLog, DjSrcIpDomesticStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = djStatLogService.djSrcIpDomesticStatLogDaily(new Page<DjSrcIpDomesticStatLogDaily>(request, response,DjSrcIpDomesticStatLogDaily.class), dailyLog);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"境内源IP监测日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "境内源IP监测日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* 境内源IP月报表
|
||||
*
|
||||
* @Title: djSrcIpDomesticStatLogMonthSources
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="djSrcIpDomesticStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="境内源IP监测日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djSrcIpDomesticStatLogMonthSources(
|
||||
Page page,DjSrcIpDomesticStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjSrcIpDomesticStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
//查询条件校验
|
||||
djStatLogService.queryConditionCheck(thread,start,monthLog, DjSrcIpDomesticStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = djStatLogService.djSrcIpDomesticStatLogMonth(new Page<DjSrcIpDomesticStatLogMonth>(request, response,DjSrcIpDomesticStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"境内源IP监测日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "境内源IP监测日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* 国家目的IP日报表
|
||||
*
|
||||
* @Title: djDestIpCounrtyStatLogDailySources
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="djDestIpCountryStatLogDailySources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="国家目的IP监测日志配置日报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djDestIpCounrtyStatLogDailySources(
|
||||
Page page,DjDestIpCounrtyStatLogDaily dailyLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjDestIpCounrtyStatLogDaily> dailyLogPage =null;
|
||||
try {
|
||||
resetTime(dailyLog, "daily");
|
||||
|
||||
djStatLogService.queryConditionCheck(thread,start,dailyLog, DjDestIpCounrtyStatLogDaily.class, page);
|
||||
|
||||
dailyLogPage = djStatLogService.djDestIpCounrtyStatLogDaily(new Page<DjDestIpCounrtyStatLogDaily>(request, response,DjDestIpCounrtyStatLogDaily.class), dailyLog);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"国家目的IP监测日志配置日报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "国家目的IP监测日志配置日报表检索成功",dailyLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
* 国家目的IP月报表
|
||||
*
|
||||
* @Title: djDestIpCounrtyStatLogMonthSources
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param page
|
||||
* @param @param dailyLog
|
||||
* @param @param request
|
||||
* @param @param response
|
||||
* @param @return
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
@RequestMapping(value="djDestIpCountryStatLogMonthSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="国家目的IP监测日志配置月报表" , httpMethod = "GET", notes="get log list")
|
||||
public Map djDestIpCounrtyStatLogMonthSources(
|
||||
Page page,DjDestIpCounrtyStatLogMonth monthLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
Page<DjDestIpCounrtyStatLogMonth> monthLogPage =null;
|
||||
try {
|
||||
resetTime(monthLog, "month");
|
||||
//查询条件校验
|
||||
djStatLogService.queryConditionCheck(thread,start,monthLog, DjDestIpCounrtyStatLogMonth.class, page);
|
||||
|
||||
monthLogPage = djStatLogService.djDestIpCounrtyStatLogMonth(new Page<DjDestIpCounrtyStatLogMonth>(request, response,DjDestIpCounrtyStatLogMonth.class), monthLog);
|
||||
|
||||
}catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(!(e instanceof RestServiceException)){
|
||||
e=new RestServiceException(thread,System.currentTimeMillis()-start,"国家目的IP监测日志配置月报表检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(activeSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "国家目的IP监测日志配置月报表检索成功",monthLogPage,activeSys,logSource);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @Title: resetTime
|
||||
* @Description: (日报表默认查询本地前一天的数据)
|
||||
* @param @param entity
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public void resetTime(StatLogEntity<?> entity,String type) throws Exception{
|
||||
Map<String, String> map = DateUtils.getLocalTime(entity.getSearchStatStartTime(),
|
||||
entity.getSearchStatEndTime(), Constants.REPORT_LOCAL_TIME,type);
|
||||
entity.setSearchStatStartTime(map.get("startTime"));
|
||||
entity.setSearchStatEndTime(map.get("endTime"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.datanucleus.util.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfDjNestLog;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.redis.RedisDao;
|
||||
import com.nis.util.redis.SaveRedisThread;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.DfDjNestLogService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: dfDjNestLogController
|
||||
* @Description: 嵌套日志查询服务
|
||||
* @author (zbc)
|
||||
* @date 2016年11月11日 下午4:40:00
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public class dfDjNestLogController extends BaseRestController {
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
protected DfDjNestLogService dfDjNestLogService;
|
||||
@Autowired
|
||||
protected RedisDao redisDao;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
|
||||
protected String logSource = "0";
|
||||
|
||||
|
||||
@RequestMapping(value = "/dfDjNestLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "嵌套日志分页获取", httpMethod = "GET", notes = "get log list")
|
||||
public Map dfDjNestLogList(
|
||||
@RequestParam(value = "searchActiveSys", required = false, defaultValue = Constants.ACTIVESYS_B) String searchActiveSys,
|
||||
@RequestParam(value = "searchLayerId", required = true) String searchLayerId,
|
||||
Page page, DfDjNestLog dfDjNestLog, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys) && !Constants.ACTIVESYS_C.equals(searchActiveSys))searchActiveSys=Constants.ACTIVESYS_B;
|
||||
if(StringUtils.notEmpty(searchLayerId)) {
|
||||
dfDjNestLog.setSearchLayerId(searchLayerId);
|
||||
}
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
boolean keyExists = false;
|
||||
String key = "";
|
||||
Page<DfDjNestLog> dfDjNestLogPage = null;
|
||||
|
||||
try {
|
||||
// 请求参数校验
|
||||
dfDjNestLogService.queryConditionCheck(thread, start, dfDjNestLog, DfDjNestLog.class, page);
|
||||
|
||||
if (Constants.IS_OPEN_REDIS) {
|
||||
// 根据查询条件获取key
|
||||
key = dfDjNestLogService.getJedisKey(request, true);
|
||||
// 判断key是否存在
|
||||
keyExists = redisDao.exists(key);
|
||||
}
|
||||
// 存在则直接从redis中查询
|
||||
if (keyExists) {
|
||||
dfDjNestLogPage = (Page<DfDjNestLog>) JsonMapper.fromJsonString(redisDao.getString(key), Page.class);
|
||||
} else {
|
||||
// 不存在则查询数据库并保存查询结果到redis中
|
||||
dfDjNestLogPage = dfDjNestLogService
|
||||
.findDfDjNestLogPage(new Page<DfDjNestLog>(request, response, DfDjNestLog.class), dfDjNestLog);
|
||||
|
||||
if (Constants.IS_OPEN_REDIS)
|
||||
new SaveRedisThread(key, dfDjNestLogPage, Constants.ORACLE_EXPIRE).start();
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "嵌套日志检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "嵌套日志检索成功",
|
||||
dfDjNestLogPage, searchActiveSys, logSource);
|
||||
}
|
||||
}
|
||||
@@ -1,204 +0,0 @@
|
||||
/**
|
||||
*@Title: JkDmbCkController.java
|
||||
*@Package com.nis.web.controller.restful
|
||||
*@Description TODO
|
||||
*@author wx
|
||||
*@date 2016年9月7日 下午3:58:16
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.web.controller.restful.jk;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.restful.jk.JkDmbCk;
|
||||
import com.nis.domain.restful.jk.JkDmbCkSource;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.OracleErrorCodeUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.jk.JkDmbCkService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @ClassName: JkDmbCkController.java
|
||||
* @Description: TODO
|
||||
* @author (wx)
|
||||
* @date 2016年9月7日 下午3:58:16
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/jk/v1")
|
||||
public class JkDmbCkController extends BaseRestController {
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
@Autowired
|
||||
protected JkDmbCkService jkDmbCkService;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
/**
|
||||
* saveDmbCkBatch(多条新增)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param JkDmbCkSource
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping(value = "/dmbCkSources", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "保存因特网国际出入口", httpMethod = "POST", notes = "保存因特网国际出入口")
|
||||
public Map saveDmbCkBatch(@RequestBody JkDmbCkSource dmbCkSource, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_POST,request, dmbCkSource);
|
||||
super.checkOpAction(thread,System.currentTimeMillis()-start, dmbCkSource.getOpAction(), Constants.OPACTION_POST);
|
||||
try{
|
||||
checkData(thread,start,dmbCkSource,Constants.OPACTION_POST);
|
||||
jkDmbCkService.saveDmbCkBatch(dmbCkSource.getDmbCkList());
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"保存因特网国际出入口失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"保存因特网国际出入口成功",dmbCkSource.getDmbCkList());
|
||||
}
|
||||
/**
|
||||
*
|
||||
* updateDmbCkBatch(多条更新)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param JkDmbCkSource
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping(value = "/dmbCkSources", method = RequestMethod.PUT)
|
||||
@ApiOperation(value = "更新因特网国际出入口", httpMethod = "PUT", notes = "更新因特网国际出入口")
|
||||
public Map updateDmbCkBatch(@RequestBody JkDmbCkSource dmbCkSource, HttpServletRequest request, HttpServletResponse response){
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_PUT,request, dmbCkSource);
|
||||
super.checkOpAction(thread,System.currentTimeMillis()-start,dmbCkSource.getOpAction(), Constants.OPACTION_PUT);
|
||||
try{
|
||||
checkData(thread,start,dmbCkSource,Constants.OPACTION_PUT);
|
||||
jkDmbCkService.updateDmbCkBatch(dmbCkSource.getDmbCkList());
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"更新因特网国际出入口失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"更新因特网国际出入口成功",dmbCkSource.getDmbCkList());
|
||||
}
|
||||
/**
|
||||
*
|
||||
* deleteDmbCk(单条删除)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param id
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
// @RequestMapping(value = "/dmbCkSources/{id}", method = RequestMethod.DELETE)
|
||||
// @ApiOperation(value = "删除因特网国际出入口", httpMethod = "DELETE", notes = "删除因特网国际出入口")
|
||||
public Map deleteDmbCk(@PathVariable("id") long id, HttpServletRequest request, HttpServletResponse response){
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_DELETE,request, id);
|
||||
try{
|
||||
jkDmbCkService.removeDmbCk(id);
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"删除因特网国际出入口失败", RestBusinessCode.unknow_error.getValue());
|
||||
|
||||
}
|
||||
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"删除成功",id);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* deleteDmbCk(多条删除)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param JkDmbCkSource
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
// @RequestMapping(value = "/dmbCkSources", method = RequestMethod.DELETE)
|
||||
// @ApiOperation(value = "删除因特网国际出入口", httpMethod = "DELETE", notes = "删除因特网国际出入口")
|
||||
public Map deleteDmbCk(@RequestBody JkDmbCkSource dmbCkSource, HttpServletRequest request, HttpServletResponse response){
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_DELETE,request, dmbCkSource);
|
||||
super.checkOpAction(thread,System.currentTimeMillis()-start,dmbCkSource.getOpAction(), Constants.OPACTION_DELETE);
|
||||
try{
|
||||
jkDmbCkService.removeDmbCkBatch(dmbCkSource.getDmbCkList());
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e);
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"删除因特网国际出入口失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"批量删除成功",dmbCkSource.getDmbCkList());
|
||||
}
|
||||
private void checkData(SaveRequestLogThread thread,long start,JkDmbCkSource dmbCkSource,int opAction){
|
||||
if(dmbCkSource.getDmbCkList().size()==0){
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"因特网国际出入口不能为空", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
for(JkDmbCk e:dmbCkSource.getDmbCkList()){
|
||||
if(opAction==Constants.OPACTION_POST&&e!=null&&e.getSfSx()!=Long.valueOf(Constants.YES)){
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"只能新增有效数据", RestBusinessCode.wrong_range.getValue());
|
||||
}else if(opAction==Constants.OPACTION_PUT&&e!=null&&e.getSfSx()!=Long.valueOf(Constants.NO)){
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"只允许将有效数据更改为无效数据", RestBusinessCode.wrong_range.getValue());
|
||||
}
|
||||
if(opAction==Constants.OPACTION_POST){
|
||||
e.setSxFw("0");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
package com.nis.web.controller.restful.jk;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.restful.jk.JkFdZb;
|
||||
import com.nis.domain.restful.jk.JkFdZbSource;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.OracleErrorCodeUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.jk.JkFdZbService;
|
||||
import com.wordnik.swagger.annotations.Api;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName: JkFdZbController
|
||||
* @Description: 静态控管封堵/解封
|
||||
* @author (DDM)
|
||||
* @date 2016年10月20日 上午10:20:33
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/jk/v1")
|
||||
@Api(value = "JkFdZbController", description = "静态控管封堵/解封")
|
||||
public class JkFdZbController extends BaseRestController {
|
||||
Logger logger = LoggerFactory.getLogger(JkFdZbController.class);
|
||||
SimpleDateFormat ymdhms=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@Autowired
|
||||
ServicesRequestLogService servicesRequestLogService;
|
||||
@Autowired
|
||||
protected JkFdZbService jkFdZbService;
|
||||
|
||||
/**
|
||||
* saveJkFdZbBatch(多条新增)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param JkFdZbSource
|
||||
* @param request
|
||||
* @param response
|
||||
* @return Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping(value = "/jkFdZbSources", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "静态控管封堵", httpMethod = "POST", notes = "save provider info")
|
||||
public Map saveJkFdZbBatch(@RequestBody JkFdZbSource jkFdZbSource, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_POST,request, jkFdZbSource);
|
||||
super.checkOpAction(thread,System.currentTimeMillis()-start, jkFdZbSource.getOpAction(), Constants.OPACTION_POST);
|
||||
validJkFdZb(thread,System.currentTimeMillis()-start,jkFdZbSource.getJkFdZbList(),Constants.OPACTION_POST);
|
||||
try{
|
||||
Date date=new Date();
|
||||
if(jkFdZbSource.getJkFdZbList() != null && jkFdZbSource.getJkFdZbList().size() >0){
|
||||
for (JkFdZb jkFdZb : jkFdZbSource.getJkFdZbList()) {
|
||||
jkFdZb.setLastUpdate(date);
|
||||
}
|
||||
}
|
||||
jkFdZbService.saveJkFdZbBatch(jkFdZbSource.getJkFdZbList());
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage()+"\r\n"+e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"静态控管封堵失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"静态控管封堵成功",jkFdZbSource.getJkFdZbList());
|
||||
}
|
||||
/**
|
||||
*
|
||||
* updateJkFdZbBatch(多条更新)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param JkFdZbSource
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping(value = "/jkFdZbSources", method = RequestMethod.PUT)
|
||||
@ApiOperation(value = "静态控管解封", httpMethod = "PUT", notes = "update provider info")
|
||||
public Map updateJkFdZbBatch(@RequestBody JkFdZbSource jkFdZbSource, HttpServletRequest request, HttpServletResponse response){
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_PUT,request, jkFdZbSource);
|
||||
super.checkOpAction(thread,System.currentTimeMillis()-start,jkFdZbSource.getOpAction(), Constants.OPACTION_PUT);
|
||||
|
||||
validJkFdZb(thread,System.currentTimeMillis()-start,jkFdZbSource.getJkFdZbList(),Constants.OPACTION_PUT);
|
||||
|
||||
try{
|
||||
Date date=new Date();
|
||||
if(jkFdZbSource.getJkFdZbList() != null && jkFdZbSource.getJkFdZbList().size() >0){
|
||||
for (JkFdZb jkFdZb : jkFdZbSource.getJkFdZbList()) {
|
||||
jkFdZb.setLastUpdate(date);
|
||||
}
|
||||
}
|
||||
jkFdZbService.updateJkFdZbBatch(jkFdZbSource.getJkFdZbList());
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage()+"\r\n"+e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"静态控管解封失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"静态控管解封成功",jkFdZbSource.getJkFdZbList());
|
||||
}
|
||||
/**
|
||||
* 校验是否存在无效数据
|
||||
*
|
||||
* @Title: validJkFdZb
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param thread
|
||||
* @param @param start
|
||||
* @param @param jkFdZbList
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public void validJkFdZb(SaveRequestLogThread thread,long start, List<JkFdZb> jkFdZbList,int opAction){
|
||||
String errorInfo = "";
|
||||
|
||||
if (jkFdZbList.size() <= 0) {
|
||||
errorInfo = "静控封堵记录不能为空";
|
||||
thread.setExceptionInfo(errorInfo);
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,errorInfo, RestBusinessCode.missing_args.getValue());
|
||||
}else{
|
||||
for (JkFdZb jkFdZb : jkFdZbList) {
|
||||
if(opAction==Constants.OPACTION_POST&&jkFdZb != null && jkFdZb.getSfFd() !=Long.valueOf(Constants.YES)){
|
||||
errorInfo = "只能新增有效数据";
|
||||
thread.setExceptionInfo(errorInfo);
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,errorInfo, RestBusinessCode.wrong_range.getValue());
|
||||
|
||||
}else if(opAction==Constants.OPACTION_PUT && jkFdZb != null && jkFdZb.getSfFd() !=Long.valueOf(Constants.NO)){
|
||||
errorInfo = "只允许将有效数据更改为无效数据";
|
||||
thread.setExceptionInfo(errorInfo);
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,errorInfo, RestBusinessCode.wrong_range.getValue());
|
||||
|
||||
}
|
||||
if(!"".equals(errorInfo)){
|
||||
break;
|
||||
}
|
||||
if(opAction==Constants.OPACTION_POST){
|
||||
jkFdZb.setSxFw("0");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
/**
|
||||
*@Title: JkFfjInfoController.java
|
||||
*@Package com.nis.web.controller.restful
|
||||
*@Description TODO
|
||||
*@author (zbc)
|
||||
*@date 2016年10月19日 下午20:04:16
|
||||
*@version V1.0
|
||||
*/
|
||||
package com.nis.web.controller.restful.jk;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.restful.jk.JkFfjInfo;
|
||||
import com.nis.domain.restful.jk.JkFfjInfoSource;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.OracleErrorCodeUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.jk.JkFfjInfoService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @ClassName: JkFfjInfoController.java
|
||||
* @Description: TODO
|
||||
* @author (zbc)
|
||||
* @date 2016年10月19日 下午20:04:16
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/jk/v1")
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class JkFfjInfoController extends BaseRestController {
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
@Autowired
|
||||
protected JkFfjInfoService jkFfjService;
|
||||
|
||||
|
||||
@RequestMapping(value = "/jkFfjSources", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "保存静态控管分发机信息", httpMethod = "POST", notes = "save server info")
|
||||
public Map saveJkFfjInfoBatch(@RequestBody JkFfjInfoSource jkFfjSource, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_POST, request, jkFfjSource);
|
||||
super.checkOpAction(thread, System.currentTimeMillis() - start, jkFfjSource.getOpAction(), Constants.OPACTION_POST);
|
||||
validJkFdZb(thread,System.currentTimeMillis()-start,jkFfjSource.getJkffjList(),Constants.OPACTION_POST);
|
||||
try {
|
||||
jkFfjService.saveJkFfjBatch(jkFfjSource.getJkffjList());
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage()+"\r\n"+e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"保存静态控管分发机信息失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"保存静态控管分发机信息成功",jkFfjSource.getJkffjList());
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/jkFfjSources", method = RequestMethod.PUT)
|
||||
@ApiOperation(value = "更新静态控管分发机信息", httpMethod = "PUT", notes = "update server info")
|
||||
public Map updateJkFfjInfoBatch(@RequestBody JkFfjInfoSource jkFfjSource, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_PUT, request, jkFfjSource);
|
||||
super.checkOpAction(thread, System.currentTimeMillis() - start, jkFfjSource.getOpAction(), Constants.OPACTION_PUT);
|
||||
validJkFdZb(thread,System.currentTimeMillis()-start,jkFfjSource.getJkffjList(),Constants.OPACTION_PUT);
|
||||
try {
|
||||
jkFfjService.updateJkFfjBatch(jkFfjSource.getJkffjList());
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage()+"\r\n"+e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info = OracleErrorCodeUtil.getOraCode(e);
|
||||
if (!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread, System.currentTimeMillis() - start, info);
|
||||
else
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "更新静态控管分发机信息失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"更新静态控管分发机信息成功",jkFfjSource.getJkffjList());
|
||||
}
|
||||
|
||||
private void validJkFdZb(SaveRequestLogThread thread, long start, List<JkFfjInfo> jkffjList, int opAction) {
|
||||
String errorInfo = "";
|
||||
|
||||
if (jkffjList.size() <= 0) {
|
||||
errorInfo = "静控分发机记录不能为空";
|
||||
thread.setExceptionInfo(errorInfo);
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,errorInfo, RestBusinessCode.missing_args.getValue());
|
||||
}else{
|
||||
for (JkFfjInfo JkFfj : jkffjList) {
|
||||
if(opAction==Constants.OPACTION_POST&&JkFfj != null && JkFfj.getSfSx() !=Long.valueOf(Constants.YES)){
|
||||
errorInfo = "只能新增有效数据";
|
||||
thread.setExceptionInfo(errorInfo);
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,errorInfo, RestBusinessCode.wrong_range.getValue());
|
||||
|
||||
}else if(opAction==Constants.OPACTION_PUT&&JkFfj != null && JkFfj.getSfSx() !=Long.valueOf(Constants.NO)){
|
||||
errorInfo = "只允许将有效数据更改为无效数据";
|
||||
thread.setExceptionInfo(errorInfo);
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,errorInfo, RestBusinessCode.wrong_range.getValue());
|
||||
|
||||
}
|
||||
if(!"".equals(errorInfo)){
|
||||
break;
|
||||
}
|
||||
if(opAction==Constants.OPACTION_POST){
|
||||
JkFfj.setSxFw("0");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
/**
|
||||
*@Title: JkFwqInfoController.java
|
||||
*@Package com.nis.web.controller.restful
|
||||
*@Description TODO
|
||||
*@author (zbc)
|
||||
*@date 2016年10月19日 下午20:04:16
|
||||
*@version V1.0
|
||||
*/
|
||||
package com.nis.web.controller.restful.jk;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.restful.jk.JkFfjInfo;
|
||||
import com.nis.domain.restful.jk.JkFfjInfoSource;
|
||||
import com.nis.domain.restful.jk.JkFwqInfo;
|
||||
import com.nis.domain.restful.jk.JkFwqInfoSource;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.OracleErrorCodeUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.jk.JkFwqInfoService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @ClassName: JkFwqInfoController.java
|
||||
* @Description: TODO
|
||||
* @author (zbc)
|
||||
* @date 2016年10月19日 下午20:04:16
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/jk/v1")
|
||||
public class JkFwqInfoController extends BaseRestController {
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
protected JkFwqInfoService jkFwqInfoService;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
|
||||
@RequestMapping(value = "/jkFwqSources", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "保存静态控管服务器信息", httpMethod = "POST", notes = "save server info")
|
||||
public Map saveJkFfjInfoBatch(@RequestBody JkFwqInfoSource jkFwqSource, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_POST, request, jkFwqSource);
|
||||
super.checkOpAction(thread, System.currentTimeMillis() - start, jkFwqSource.getOpAction(), Constants.OPACTION_POST);
|
||||
validJkFdZb(thread,System.currentTimeMillis()-start,jkFwqSource.getJkFwqInfoList(),Constants.OPACTION_POST);
|
||||
try {
|
||||
jkFwqInfoService.savejkFwqInfoBatch(jkFwqSource.getJkFwqInfoList());
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage()+"\r\n"+e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"保存静态控管服务器信息失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"保存静态控管服务器信息成功",jkFwqSource.getJkFwqInfoList());
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/jkFwqSources", method = RequestMethod.PUT)
|
||||
@ApiOperation(value = "更新静态控管服务器信息", httpMethod = "PUT", notes = "update server info")
|
||||
public Map updateJkFfjInfoBatch(@RequestBody JkFwqInfoSource jkFwqSource, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_PUT, request, jkFwqSource);
|
||||
super.checkOpAction(thread, System.currentTimeMillis() - start, jkFwqSource.getOpAction(), Constants.OPACTION_PUT);
|
||||
validJkFdZb(thread,System.currentTimeMillis()-start,jkFwqSource.getJkFwqInfoList(),Constants.OPACTION_PUT);
|
||||
try {
|
||||
jkFwqInfoService.updatejkFwqInfoBatch(jkFwqSource.getJkFwqInfoList());
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage()+"\r\n"+e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info = OracleErrorCodeUtil.getOraCode(e);
|
||||
if (!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread, System.currentTimeMillis() - start, info);
|
||||
else
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "更新静态控管服务器信息失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"更新静态控管服务器信息成功",jkFwqSource.getJkFwqInfoList());
|
||||
}
|
||||
|
||||
private void validJkFdZb(SaveRequestLogThread thread, long start, List<JkFwqInfo> jkFwqList, int opAction) {
|
||||
String errorInfo = "";
|
||||
|
||||
if (jkFwqList.size() <= 0) {
|
||||
errorInfo = "静态控管服务器信息不能为空";
|
||||
thread.setExceptionInfo(errorInfo);
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,errorInfo, RestBusinessCode.missing_args.getValue());
|
||||
}else{
|
||||
for (JkFwqInfo jkFwq : jkFwqList) {
|
||||
if(opAction==Constants.OPACTION_POST&&jkFwq != null && jkFwq.getSfSx()!=Long.valueOf(Constants.YES)){
|
||||
errorInfo = "只能新增有效数据";
|
||||
thread.setExceptionInfo(errorInfo);
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,errorInfo, RestBusinessCode.wrong_range.getValue());
|
||||
|
||||
}else if(opAction==Constants.OPACTION_PUT&&jkFwq != null && jkFwq.getSfSx() !=Long.valueOf(Constants.NO)){
|
||||
errorInfo = "只允许将有效数据更改为无效数据";
|
||||
thread.setExceptionInfo(errorInfo);
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,errorInfo, RestBusinessCode.wrong_range.getValue());
|
||||
|
||||
}
|
||||
if(!"".equals(errorInfo)){
|
||||
break;
|
||||
}
|
||||
if(opAction==Constants.OPACTION_POST){
|
||||
jkFwq.setSxFw("0");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,199 +0,0 @@
|
||||
/**
|
||||
*@Title: JkLyqController.java
|
||||
*@Package com.nis.web.controller.restful
|
||||
*@Description TODO
|
||||
*@author wx
|
||||
*@date 2016年9月7日 下午3:58:16
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.web.controller.restful.jk;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.restful.jk.JkLyq;
|
||||
import com.nis.domain.restful.jk.JkLyqSource;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.OracleErrorCodeUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.jk.JkLyqService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @ClassName: JkLyqController.java
|
||||
* @Description: TODO
|
||||
* @author (wx)
|
||||
* @date 2016年9月7日 下午3:58:16
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/jk/v1")
|
||||
public class JkLyqController extends BaseRestController {
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
@Autowired
|
||||
protected JkLyqService jkLyqService;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
/**
|
||||
* saveJkLyqBatch(多条新增)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param JkLyqSource
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping(value = "/jkLyqSources", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "保存静态控管路由器", httpMethod = "POST", notes = "保存静态控管路由器")
|
||||
public Map saveJkLyqBatch(@RequestBody JkLyqSource jkLyqSource, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_POST,request, jkLyqSource);
|
||||
super.checkOpAction(thread,System.currentTimeMillis()-start, jkLyqSource.getOpAction(), Constants.OPACTION_POST);
|
||||
try{
|
||||
checKData(thread,start,jkLyqSource,Constants.OPACTION_POST);
|
||||
jkLyqService.saveJkLyqBatch(jkLyqSource.getJkLyqList());
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage()+"\r\n"+e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"保存静态控管路由器失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"保存静态控管路由器成功",jkLyqSource.getJkLyqList());
|
||||
}
|
||||
/**
|
||||
*
|
||||
* updateJkLyqBatch(多条更新)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param JkLyqSource
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping(value = "/jkLyqSources", method = RequestMethod.PUT)
|
||||
@ApiOperation(value = "更新静态控管路由器", httpMethod = "PUT", notes = "更新静态控管路由器")
|
||||
public Map updateJkLyqBatch(@RequestBody JkLyqSource jkLyqSource, HttpServletRequest request, HttpServletResponse response){
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_PUT,request, jkLyqSource);
|
||||
super.checkOpAction(thread,System.currentTimeMillis()-start,jkLyqSource.getOpAction(), Constants.OPACTION_PUT);
|
||||
try{
|
||||
checKData(thread,start,jkLyqSource,Constants.OPACTION_PUT);
|
||||
jkLyqService.updateJkLyqBatch(jkLyqSource.getJkLyqList());
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage()+"\r\n"+e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"更新静态控管路由器失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"更新静态控管路由器成功",jkLyqSource.getJkLyqList());
|
||||
}
|
||||
/**
|
||||
*
|
||||
* deleteJkLyq(单条删除)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param id
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
// @RequestMapping(value = "/jkLyqSources/{id}", method = RequestMethod.DELETE)
|
||||
// @ApiOperation(value = "删除静态控管路由器", httpMethod = "DELETE", notes = "删除静态控管路由器")
|
||||
public Map deleteJkLyq(@PathVariable("id") long id, HttpServletRequest request, HttpServletResponse response){
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_DELETE,request, id);
|
||||
try{
|
||||
jkLyqService.removeJkLyq(id);
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"删除静态控管路由器失败", RestBusinessCode.unknow_error.getValue());
|
||||
|
||||
}
|
||||
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"删除成功",id);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* deleteJkLyq(多条删除)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param JkLyqSource
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
// @RequestMapping(value = "/jkLyqSources", method = RequestMethod.DELETE)
|
||||
// @ApiOperation(value = "删除静态控管路由器", httpMethod = "DELETE", notes = "删除静态控管路由器")
|
||||
public Map deleteJkLyq(@RequestBody JkLyqSource jkLyqSource, HttpServletRequest request, HttpServletResponse response){
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_DELETE,request, jkLyqSource);
|
||||
super.checkOpAction(thread,System.currentTimeMillis()-start,jkLyqSource.getOpAction(), Constants.OPACTION_DELETE);
|
||||
try{
|
||||
jkLyqService.removeJkLyqBatch(jkLyqSource.getJkLyqList());
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"删除静态控管路由器失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"批量删除成功",jkLyqSource.getJkLyqList());
|
||||
}
|
||||
private void checKData(SaveRequestLogThread thread,long start,JkLyqSource jkLyqSource,int opAction){
|
||||
if(jkLyqSource.getJkLyqList().size()==0){
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"静态控管路由器不能为空", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
for(JkLyq entity:jkLyqSource.getJkLyqList()){
|
||||
if(opAction==Constants.OPACTION_POST&&entity!=null&&entity.getSfSx()!=Long.valueOf(Constants.YES)){
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"只能新增有效数据", RestBusinessCode.wrong_range.getValue());
|
||||
}else if(opAction==Constants.OPACTION_PUT&&entity!=null&&entity.getSfSx()!=Long.valueOf(Constants.NO)){
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"只允许将有效数据更改为无效数据", RestBusinessCode.wrong_range.getValue());
|
||||
}
|
||||
if(opAction==Constants.OPACTION_POST){
|
||||
entity.setSxFw("0");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,6 @@
|
||||
<if test="sourceName != null and sourceName =='CONFIG_COMPILE'">
|
||||
SEQ_COMPILEID.nextval
|
||||
</if>
|
||||
<if test="sourceName != null and sourceName =='CONFIG_GROUP_ID'">
|
||||
SEQ_CONFIG_GROUP.nextval
|
||||
</if>
|
||||
<if test="sourceName != null and sourceName =='CONFIG_GROUP'">
|
||||
SEQ_GROUPID.nextval
|
||||
</if>
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.restful.DfDjLogStatistics;
|
||||
import com.nis.domain.restful.DfDjPzLogStatistics;
|
||||
|
||||
/**
|
||||
* @ClassName: DfDjLogStatDao
|
||||
* @Description: TODO(这里用一句话描述这个类的作用)
|
||||
* @author (zbc)
|
||||
* @date 2016年11月14日 下午4:00:00
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface DfDjLogStatDao {
|
||||
|
||||
List<DfDjLogStatistics> findDfLogStatistics(DfDjLogStatistics entity);
|
||||
|
||||
List<DfDjPzLogStatistics> findDfPzLogStatistics(DfDjPzLogStatistics entity);
|
||||
|
||||
List<DfDjLogStatistics> findDjLogStatistics(DfDjLogStatistics entity);
|
||||
|
||||
List<DfDjPzLogStatistics> findDjPzLogStatistics(DfDjPzLogStatistics entity);
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
<?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.DfDjLogStatDao">
|
||||
|
||||
<!-- DfDjLogStatistics -->
|
||||
<sql id="DfDjLogStatPorperty">SUM</sql>
|
||||
|
||||
<resultMap id="DfDjLogStatisticsMap" type="com.nis.domain.restful.DfDjLogStatistics">
|
||||
<result column="sum" jdbcType="BIGINT" property="sum" />
|
||||
</resultMap>
|
||||
|
||||
<select id="findDfLogStatistics" parameterType="com.nis.domain.restful.DfDjLogStatistics"
|
||||
resultMap="DfDjLogStatisticsMap">
|
||||
SELECT
|
||||
<include refid="DfDjLogStatPorperty"/>
|
||||
FROM (SELECT nvl(sum(SUM), 0) SUM
|
||||
FROM DF_STAT_LOG_DAILY t
|
||||
<where>
|
||||
<if test="searchStatActiveSys != null and searchStatActiveSys !=''">
|
||||
AND active_sys=#{searchStatActiveSys}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND service=#{searchService}
|
||||
</if>
|
||||
<if test="searchConfigId != null and searchConfigId !=''">
|
||||
AND config_id in (${searchConfigId})
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
) DF_STAT_LOG_DAILY
|
||||
</select>
|
||||
|
||||
<select id="findDjLogStatistics" parameterType="com.nis.domain.restful.DfDjLogStatistics"
|
||||
resultMap="DfDjLogStatisticsMap">
|
||||
SELECT
|
||||
<include refid="DfDjLogStatPorperty"/>
|
||||
FROM (SELECT nvl(sum(SUM), 0) SUM
|
||||
FROM DJ_STAT_LOG_DAILY t
|
||||
<where>
|
||||
<if test="searchStatActiveSys != null and searchStatActiveSys !=''">
|
||||
AND active_sys=#{searchStatActiveSys}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND service=#{searchService}
|
||||
</if>
|
||||
<if test="searchConfigId != null and searchConfigId !=''">
|
||||
AND config_id in (${searchConfigId})
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
) DJ_STAT_LOG_DAILY
|
||||
</select>
|
||||
|
||||
|
||||
<!-- DfDjPzLogStatistics -->
|
||||
<sql id="DfDjPzLogStatPorperty">CONFIG_ID, SERVICE, STAT_TIME, SUM</sql>
|
||||
|
||||
<resultMap id="DfDjPzLogStatisticsMap" type="com.nis.domain.restful.DfDjPzLogStatistics">
|
||||
<result column="config_id" jdbcType="BIGINT" property="configId" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="sum" jdbcType="BIGINT" property="sum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
|
||||
<select id="findDfPzLogStatistics" parameterType="com.nis.domain.restful.DfDjPzLogStatistics"
|
||||
resultMap="DfDjPzLogStatisticsMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfDjPzLogStatPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT CONFIG_ID, SERVICE, STAT_TIME, sum(SUM) SUM
|
||||
FROM DF_STAT_LOG_DAILY t
|
||||
<where>
|
||||
<if test="searchStatActiveSys != null and searchStatActiveSys !=''">
|
||||
AND active_sys=#{searchStatActiveSys}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND service=#{searchService}
|
||||
</if>
|
||||
<if test="searchConfigId != null and searchConfigId !=''">
|
||||
AND config_id in(${searchConfigId})
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY CONFIG_ID, SERVICE, STAT_TIME) DF_STAT_LOG_DAILY
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="findDjPzLogStatistics" parameterType="com.nis.domain.restful.DfDjPzLogStatistics"
|
||||
resultMap="DfDjPzLogStatisticsMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfDjPzLogStatPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT CONFIG_ID, SERVICE, STAT_TIME, sum(SUM) SUM
|
||||
FROM DJ_STAT_LOG_DAILY t
|
||||
<where>
|
||||
<if test="searchStatActiveSys != null and searchStatActiveSys !=''">
|
||||
AND active_sys=#{searchStatActiveSys}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND service=#{searchService}
|
||||
</if>
|
||||
<if test="searchConfigId != null and searchConfigId !=''">
|
||||
AND config_id in(${searchConfigId})
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY CONFIG_ID, SERVICE, STAT_TIME) DJ_STAT_LOG_DAILY
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.restful.DfDjNestLog;
|
||||
|
||||
@MyBatisDao
|
||||
public interface DfDjNestLogDao extends CrudDao<Serializable> {
|
||||
|
||||
List<DfDjNestLog> findDfDjNestLogPage(DfDjNestLog entity);
|
||||
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
<?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.DfDjNestLogDao">
|
||||
<!-- OVER_INFO_LOG -->
|
||||
<sql id="dfDjNestLogProperty">
|
||||
LAYER_ID,FOUND_TIME,RECV_TIME,LAYER_CNT,NEST_PROTOCOL,NEST_SERVER_IP,
|
||||
NEST_CLIENT_IP,NEST_SERVER_PORT,NEST_CLIENT_PORT,OVER_ID
|
||||
</sql>
|
||||
|
||||
<resultMap id="DfDjNestLogMap" type="com.nis.domain.restful.DfDjNestLog">
|
||||
<result column="layer_id" jdbcType="VARCHAR" property="layerId" />
|
||||
<result column="found_time" jdbcType="TIMESTAMP" property="foundTime" />
|
||||
<result column="recv_time" jdbcType="TIMESTAMP" property="recvTime" />
|
||||
<result column="layer_cnt" jdbcType="INTEGER" property="layerCnt" />
|
||||
<result column="nest_protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
||||
<result column="nest_server_ip" jdbcType="VARCHAR" property="nestServerIp" />
|
||||
<result column="nest_client_ip" jdbcType="VARCHAR" property="nestClientIp" />
|
||||
<result column="nest_server_port" jdbcType="INTEGER" property="nestServerPort" />
|
||||
<result column="nest_client_port" jdbcType="INTEGER" property="nestClientPort" />
|
||||
<result column="over_id" jdbcType="VARCHAR" property="overId" />
|
||||
</resultMap>
|
||||
|
||||
<select id="findDfDjNestLogPage" parameterType="com.nis.domain.restful.DfDjNestLog"
|
||||
resultMap="DfDjNestLogMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="dfDjNestLogProperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM OVER_INFO_LOG t
|
||||
CONNECT BY t.layer_id = prior t.over_id
|
||||
START WITH t.layer_id = #{searchLayerId}
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,45 +0,0 @@
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.restful.DfJitAffairDestReport;
|
||||
import com.nis.domain.restful.DfJitAffairSrcReport;
|
||||
import com.nis.domain.restful.DfJitFlDestReport;
|
||||
import com.nis.domain.restful.DfJitFlSrcReport;
|
||||
import com.nis.domain.restful.DfJitGuaranteeDestReport;
|
||||
import com.nis.domain.restful.DfJitGuaranteeSrcReport;
|
||||
import com.nis.domain.restful.DfJitIdDestReport;
|
||||
import com.nis.domain.restful.DfJitIdSrcReport;
|
||||
import com.nis.domain.restful.DfJitMissionDestReport;
|
||||
import com.nis.domain.restful.DfJitMissionSrcReport;
|
||||
import com.nis.domain.restful.DfJitTagDestReport;
|
||||
import com.nis.domain.restful.DfJitTagSrcReport;
|
||||
|
||||
@MyBatisDao
|
||||
public interface DfJitLogSearchDao {
|
||||
|
||||
List<DfJitFlSrcReport> findDfJitFlSrcReport(DfJitFlSrcReport dfJitFlSrcReportSources);
|
||||
|
||||
List<DfJitFlDestReport> findDfJitFlDestReport(DfJitFlDestReport dfJitFlDestReport);
|
||||
|
||||
List<DfJitAffairSrcReport> findDfJitAffairSrcReport(DfJitAffairSrcReport dfJitAffairSrcReport);
|
||||
|
||||
List<DfJitAffairDestReport> findDfJitAffairDestReport(DfJitAffairDestReport dfJitAffairDestReport);
|
||||
|
||||
List<DfJitMissionSrcReport> findDfJitMissionSrcReport(DfJitMissionSrcReport dfJitMissionSrcReport);
|
||||
|
||||
List<DfJitMissionDestReport> findDfJitMissionDestReport(DfJitMissionDestReport dfJitMissionDestReport);
|
||||
|
||||
List<DfJitGuaranteeSrcReport> findDfJitGuaranteeSrcReport(DfJitGuaranteeSrcReport dfJitGuaranteeSrcReport);
|
||||
|
||||
List<DfJitGuaranteeDestReport> findDfJitGuaranteeDestReport(DfJitGuaranteeDestReport dfJitGuaranteeDestReport);
|
||||
|
||||
List<DfJitTagSrcReport> findDfJitTagSrcReport(DfJitTagSrcReport dfJitTagSrcReport);
|
||||
|
||||
List<DfJitTagDestReport> findDfJitTagDestReport(DfJitTagDestReport dfJitTagDestReport);
|
||||
|
||||
List<DfJitIdSrcReport> findDfJitIdSrcReport(DfJitIdSrcReport dfJitIdSrcReport);
|
||||
|
||||
List<DfJitIdDestReport> findDfJitIdDestReport(DfJitIdDestReport dfJitIdDestReport);
|
||||
|
||||
}
|
||||
@@ -1,692 +0,0 @@
|
||||
<?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.DfJitLogSearchDao">
|
||||
<resultMap id="DfJitFlSrcReportMap" type="com.nis.domain.restful.DfJitFlSrcReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="FL" jdbcType="INTEGER" property="fl" />
|
||||
<result column="XZ" jdbcType="INTEGER" property="xz" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<sql id="DfJitFlSrcReport_Column_List">
|
||||
STAT_ID, FL, XZ, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
|
||||
SRC_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDfJitFlSrcReport" parameterType="com.nis.domain.restful.DfJitFlSrcReport"
|
||||
resultMap="DfJitFlSrcReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfJitFlSrcReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DF_JIT_FL_SRC_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchFl != null and searchFl !=''">
|
||||
AND FL = #{searchFl}
|
||||
</if>
|
||||
<if test="searchXz != null and searchXz !=''">
|
||||
AND XZ = #{searchXz}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DfJitFlDestReportMap" type="com.nis.domain.restful.DfJitFlDestReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="FL" jdbcType="INTEGER" property="fl" />
|
||||
<result column="XZ" jdbcType="INTEGER" property="xz" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<sql id="DfJitFlDestReport_Column_List">
|
||||
STAT_ID, FL, XZ, REPORT_TIME, DEST_COUNTRY, DEST_PROVINCE,
|
||||
DEST_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDfJitFlDestReport" parameterType="com.nis.domain.restful.DfJitFlDestReport"
|
||||
resultMap="DfJitFlDestReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfJitFlDestReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DF_JIT_FL_Dest_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchFl != null and searchFl !=''">
|
||||
AND FL = #{searchFl}
|
||||
</if>
|
||||
<if test="searchXz != null and searchXz !=''">
|
||||
AND XZ = #{searchXz}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="DfJitAffairSrcReportMap" type="com.nis.domain.restful.DfJitAffairSrcReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="Affair" jdbcType="INTEGER" property="affair" />
|
||||
<result column="topic" jdbcType="INTEGER" property="topic" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DfJitAffairSrcReport_Column_List">
|
||||
STAT_ID, Affair,topic, REPORT_TIME, SRC_COUNTRY,
|
||||
SRC_PROVINCE,
|
||||
SRC_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDfJitAffairSrcReport" parameterType="com.nis.domain.restful.DfJitAffairSrcReport"
|
||||
resultMap="DfJitAffairSrcReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfJitAffairSrcReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DF_JIT_AFFAIR_SRC_REPORT
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchAffair != null and searchAffair !=''">
|
||||
AND Affair = #{searchAffair}
|
||||
</if>
|
||||
<if test="searchTopic != null and searchTopic !=''">
|
||||
AND topic = #{searchTopic}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DfJitAffairDestReportMap" type="com.nis.domain.restful.DfJitAffairDestReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="Affair" jdbcType="INTEGER" property="affair" />
|
||||
<result column="topic" jdbcType="INTEGER" property="topic" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DfJitAffairDestReport_Column_List">
|
||||
STAT_ID, Affair,topic, REPORT_TIME, DEST_COUNTRY,
|
||||
DEST_PROVINCE,
|
||||
DEST_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDfJitAffairDestReport" parameterType="com.nis.domain.restful.DfJitAffairDestReport"
|
||||
resultMap="DfJitAffairDestReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfJitAffairDestReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DF_JIT_AFFAIR_DEST_REPORT
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchAffair != null and searchAffair !=''">
|
||||
AND Affair = #{searchAffair}
|
||||
</if>
|
||||
<if test="searchTopic != null and searchTopic !=''">
|
||||
AND topic = #{searchTopic}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DfJitMissionSrcReportMap" type="com.nis.domain.restful.DfJitMissionSrcReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="mission" jdbcType="INTEGER" property="mission" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DfJitMissionSrcReport_Column_List">
|
||||
STAT_ID, mission, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
|
||||
SRC_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDfJitMissionSrcReport" parameterType="com.nis.domain.restful.DfJitMissionSrcReport"
|
||||
resultMap="DfJitMissionSrcReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfJitMissionSrcReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DF_JIT_MISSION_SRC_REPORT
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchMission != null and searchMission !=''">
|
||||
AND mission = #{searchMission}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DfJitMissionDestReportMap" type="com.nis.domain.restful.DfJitMissionDestReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="mission" jdbcType="INTEGER" property="mission" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DfJitMissionDestReport_Column_List">
|
||||
STAT_ID, mission, REPORT_TIME, DEST_COUNTRY, DEST_PROVINCE,
|
||||
DEST_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDfJitMissionDestReport" parameterType="com.nis.domain.restful.DfJitMissionDestReport"
|
||||
resultMap="DfJitMissionDestReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfJitMissionDestReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DF_JIT_MISSION_DEST_REPORT
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchMission != null and searchMission !=''">
|
||||
AND mission = #{searchMission}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DfJitGuaranteeSrcReportMap"
|
||||
type="com.nis.domain.restful.DfJitGuaranteeSrcReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="guarantee" jdbcType="INTEGER" property="guarantee" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DfJitGuaranteeSrcReport_Column_List">
|
||||
STAT_ID, guarantee, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
|
||||
SRC_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDfJitGuaranteeSrcReport" parameterType="com.nis.domain.restful.DfJitGuaranteeSrcReport"
|
||||
resultMap="DfJitGuaranteeSrcReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfJitGuaranteeSrcReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DF_JIT_GUARANTEE_SRC_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchGuarantee != null and searchGuarantee !=''">
|
||||
AND guarantee = #{searchGuarantee}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DfJitGuaranteeDestReportMap"
|
||||
type="com.nis.domain.restful.DfJitGuaranteeDestReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="guarantee" jdbcType="INTEGER" property="guarantee" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DfJitGuaranteeDestReport_Column_List">
|
||||
STAT_ID, guarantee, REPORT_TIME, DEST_COUNTRY,
|
||||
DEST_PROVINCE,
|
||||
DEST_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDfJitGuaranteeDestReport" parameterType="com.nis.domain.restful.DfJitGuaranteeDestReport"
|
||||
resultMap="DfJitGuaranteeDestReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfJitGuaranteeDestReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DF_JIT_GUARANTEE_DEST_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchGuarantee != null and searchGuarantee !=''">
|
||||
AND guarantee = #{searchGuarantee}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="DfJitTagSrcReportMap" type="com.nis.domain.restful.DfJitTagSrcReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="tag" jdbcType="INTEGER" property="tag" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DfJitTagSrcReport_Column_List">
|
||||
STAT_ID, tag, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
|
||||
SRC_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDfJitTagSrcReport" parameterType="com.nis.domain.restful.DfJitTagSrcReport"
|
||||
resultMap="DfJitTagSrcReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfJitTagSrcReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DF_JIT_TAG_SRC_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND tag in(${searchTag})
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DfJitTagDestReportMap" type="com.nis.domain.restful.DfJitTagDestReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="tag" jdbcType="INTEGER" property="tag" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DfJitTagDestReport_Column_List">
|
||||
STAT_ID, tag, REPORT_TIME, DEST_COUNTRY,
|
||||
DEST_PROVINCE,
|
||||
DEST_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDfJitTagDestReport" parameterType="com.nis.domain.restful.DfJitTagDestReport"
|
||||
resultMap="DfJitTagDestReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfJitTagDestReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DF_JIT_TAG_DEST_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND tag in(${searchTag})
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="DfJitIdSrcReportMap" type="com.nis.domain.restful.DfJitIdSrcReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DfJitIdSrcReport_Column_List">
|
||||
STAT_ID, id, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
|
||||
SRC_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDfJitIdSrcReport" parameterType="com.nis.domain.restful.DfJitIdSrcReport"
|
||||
resultMap="DfJitIdSrcReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfJitIdSrcReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DF_JIT_ID_SRC_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchId != null and searchId !=''">
|
||||
AND id = #{searchId}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DfJitIdDestReportMap" type="com.nis.domain.restful.DfJitIdDestReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DfJitIdDestReport_Column_List">
|
||||
STAT_ID, id, REPORT_TIME, DEST_COUNTRY,
|
||||
DEST_PROVINCE,
|
||||
DEST_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDfJitIdDestReport" parameterType="com.nis.domain.restful.DfJitIdDestReport"
|
||||
resultMap="DfJitIdDestReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DfJitIdDestReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DF_JIT_ID_DEST_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchId != null and searchId !=''">
|
||||
AND id = #{searchId}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.DfReportEntity;
|
||||
import com.nis.domain.restful.DfAttrTypeReport;
|
||||
import com.nis.domain.restful.DfDestIpCountryReport;
|
||||
import com.nis.domain.restful.DfDestIpReport;
|
||||
import com.nis.domain.restful.DfEntranceReport;
|
||||
import com.nis.domain.restful.DfLwhhAttrReport;
|
||||
import com.nis.domain.restful.DfLwhhReport;
|
||||
import com.nis.domain.restful.DfLwhhTagReport;
|
||||
import com.nis.domain.restful.DfPzReport;
|
||||
import com.nis.domain.restful.DfPzReportStat;
|
||||
import com.nis.domain.restful.DfServiceReport;
|
||||
import com.nis.domain.restful.DfSrcIpAttrReport;
|
||||
import com.nis.domain.restful.DfSrcIpDomeSticReport;
|
||||
import com.nis.domain.restful.DfSrcIpReport;
|
||||
import com.nis.domain.restful.DfSrcIpTagReport;
|
||||
import com.nis.domain.restful.DfTagReport;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DfMultiDimensionnalReportDao
|
||||
* @Description: TODO(一句话描述这个类)
|
||||
* @author (DDM)
|
||||
* @date 2017年8月4日下午4:46:31
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface DfMultiDimensionalReportDao extends CrudDao<DfReportEntity> {
|
||||
|
||||
List<DfLwhhAttrReport> findDfLwhhAttrReport(DfLwhhAttrReport pz);
|
||||
|
||||
List<DfLwhhTagReport> findDfLwhhTagReportPage(DfLwhhTagReport pz);
|
||||
|
||||
List<DfSrcIpAttrReport> findDfSrcIpAttrReportPage(DfSrcIpAttrReport pz);
|
||||
|
||||
List<DfSrcIpTagReport> findDfSrcIpTagReportPage(DfSrcIpTagReport pz);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,230 +0,0 @@
|
||||
<?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.DfMultiDimensionalReportDao">
|
||||
<!-- 所有实时统计report表的公共属性 -->
|
||||
<sql id="commonPorperty">
|
||||
ASUM,BSUM,REPORT_TIME,SERVICE
|
||||
</sql>
|
||||
<resultMap id="DfLwhhAttrReportMap" type="com.nis.domain.restful.DfLwhhAttrReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="LWHH" jdbcType="BIGINT" property="lwhh" />
|
||||
<result column="ATTR_TYPE" jdbcType="BIGINT" property="attrType" />
|
||||
<result column="SERVICE" jdbcType="BIGINT" property="service" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="findDfLwhhAttrReport" parameterType="com.nis.domain.restful.DfLwhhAttrReport"
|
||||
resultMap="DfLwhhAttrReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty" />,LWHH,ATTR_TYPE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE,
|
||||
pz.LWHH,
|
||||
pz.ATTR_TYPE
|
||||
FROM DF_LWHH_TYPE_REPORT PZ
|
||||
GROUP BY PZ.LWHH,PZ.ATTR_TYPE, PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DF_LWHH_TYPE_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND LWHH =#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DfLwhhTagReportMap" type="com.nis.domain.restful.DfLwhhTagReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="LWHH" jdbcType="BIGINT" property="lwhh" />
|
||||
<result column="TAG" jdbcType="BIGINT" property="tag" />
|
||||
<result column="SERVICE" jdbcType="BIGINT" property="service" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="findDfLwhhTagReportPage" parameterType="com.nis.domain.restful.DfLwhhTagReport"
|
||||
resultMap="DfLwhhTagReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty" />,LWHH,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE,
|
||||
pz.LWHH,
|
||||
pz.TAG
|
||||
FROM DF_LWHH_TAG_REPORT PZ
|
||||
GROUP BY PZ.LWHH,PZ.TAG, PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DF_LWHH_TAG_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND TAG in (${searchTag})
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND LWHH =#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DfSrcIpTagReportMap" type="com.nis.domain.restful.DfSrcIpTagReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="TAG" jdbcType="BIGINT" property="tag" />
|
||||
<result column="SERVICE" jdbcType="BIGINT" property="service" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="findDfSrcIpTagReportPage" parameterType="com.nis.domain.restful.DfSrcIpTagReport"
|
||||
resultMap="DfSrcIpTagReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty" />,SRC_PROVINCE,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE,
|
||||
pz.SRC_PROVINCE,
|
||||
pz.TAG
|
||||
FROM DF_SRCIP_DOMESTIC_TAG_REPORT PZ
|
||||
GROUP BY PZ.SRC_PROVINCE,PZ.TAG, PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DF_SRCIP_DOMESTIC_TAG_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND TAG in (${searchTag})
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DfSrcIpAttrReportMap" type="com.nis.domain.restful.DfSrcIpAttrReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="ATTR_TYPE" jdbcType="BIGINT" property="attrType" />
|
||||
<result column="SERVICE" jdbcType="BIGINT" property="service" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="findDfSrcIpAttrReportPage" parameterType="com.nis.domain.restful.DfSrcIpAttrReport"
|
||||
resultMap="DfSrcIpAttrReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty" />,SRC_PROVINCE,ATTR_TYPE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE,
|
||||
pz.SRC_PROVINCE,
|
||||
pz.ATTR_TYPE
|
||||
FROM DF_SRCIP_DOMESTIC_TYPE_REPORT PZ
|
||||
GROUP BY PZ.SRC_PROVINCE,PZ.ATTR_TYPE, PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DF_SRCIP_DOMESTIC_TYPE_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.nis.domain.restful.DfLwhhAttrDaily;
|
||||
import com.nis.domain.restful.DfLwhhAttrMonth;
|
||||
import com.nis.domain.restful.DfLwhhTagDaily;
|
||||
import com.nis.domain.restful.DfLwhhTagMonth;
|
||||
import com.nis.domain.restful.DfSrcIpAttrDaily;
|
||||
import com.nis.domain.restful.DfSrcIpAttrMonth;
|
||||
import com.nis.domain.restful.DfSrcIpTagDaily;
|
||||
import com.nis.domain.restful.DfSrcIpTagMonth;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DfMultiDimensionnalReportDao
|
||||
* @Description: TODO(一句话描述这个类)
|
||||
* @author (DDM)
|
||||
* @date 2017年8月4日下午4:46:31
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface DfMultiDimensionalStatLogDao extends CrudDao<LogEntity> {
|
||||
|
||||
List<DfLwhhAttrDaily> dfLwhhAttrDaily(DfLwhhAttrDaily pz);
|
||||
List<DfLwhhAttrMonth> dfLwhhAttrMonth(DfLwhhAttrMonth pz);
|
||||
|
||||
List<DfLwhhTagDaily> dfLwhhTagDaily(DfLwhhTagDaily pz);
|
||||
List<DfLwhhTagMonth> dfLwhhTagMonth(DfLwhhTagMonth pz);
|
||||
|
||||
List<DfSrcIpAttrDaily> dfSrcIpAttrDaily(DfSrcIpAttrDaily pz);
|
||||
List<DfSrcIpAttrMonth> dfSrcIpAttrMonth(DfSrcIpAttrMonth pz);
|
||||
|
||||
List<DfSrcIpTagDaily> dfSrcIpTagDaily(DfSrcIpTagDaily pz);
|
||||
List<DfSrcIpTagMonth> dfSrcIpTagMonth(DfSrcIpTagMonth pz);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,475 +0,0 @@
|
||||
<?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.DfMultiDimensionalStatLogDao">
|
||||
<!-- 配置报表的公共属性 -->
|
||||
<sql id="commonPorperty">
|
||||
ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
|
||||
<resultMap id="DfLwhhAttrDailyMap" type="com.nis.domain.restful.DfLwhhAttrDaily">
|
||||
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
|
||||
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="dfLwhhAttrDaily" parameterType="com.nis.domain.restful.DfLwhhAttrDaily" resultMap="DfLwhhAttrDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,LWHH,ATTR_TYPE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select LWHH,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select LWHH,ATTR_TYPE,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_LWHH_TYPE_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND LWHH =#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by LWHH,ATTR_TYPE,service,stat_time
|
||||
|
||||
) DF_LWHH_TYPE_STAT_LOG_DAILY
|
||||
GROUP BY LWHH,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DfLwhhAttrMonthMap" type="com.nis.domain.restful.DfLwhhAttrMonth">
|
||||
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
|
||||
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="dfLwhhAttrMonth" parameterType="com.nis.domain.restful.DfLwhhAttrMonth" resultMap="DfLwhhAttrMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,LWHH,ATTR_TYPE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select LWHH,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select LWHH,ATTR_TYPE,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_LWHH_TYPE_STAT_LOG_MONTH
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND LWHH =#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by LWHH,ATTR_TYPE,service,stat_time
|
||||
|
||||
) DF_LWHH_TYPE_STAT_LOG_MONTH
|
||||
GROUP BY LWHH,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DfLwhhTagDailyMap" type="com.nis.domain.restful.DfLwhhTagDaily">
|
||||
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
|
||||
<result column="TAG" jdbcType="BIGINT" property="tag" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="dfLwhhTagDaily" parameterType="com.nis.domain.restful.DfLwhhTagDaily" resultMap="DfLwhhTagDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,LWHH,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select LWHH,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select LWHH,TAG,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_LWHH_TAG_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND TAG IN (${searchTag})
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND LWHH =#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by LWHH,TAG,service,stat_time
|
||||
|
||||
) DF_LWHH_TAG_STAT_LOG_DAILY
|
||||
GROUP BY LWHH,TAG,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DfLwhhTagMonthMap" type="com.nis.domain.restful.DfLwhhTagMonth">
|
||||
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
|
||||
<result column="TAG" jdbcType="BIGINT" property="tag" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="dfLwhhTagMonth" parameterType="com.nis.domain.restful.DfLwhhTagMonth" resultMap="DfLwhhTagMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,LWHH,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select LWHH,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select LWHH,TAG,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_LWHH_TAG_STAT_LOG_MONTH
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND TAG IN (${searchTag})
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND LWHH =#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by LWHH,TAG,service,stat_time
|
||||
|
||||
) DF_LWHH_TAG_STAT_LOG_MONTH
|
||||
GROUP BY LWHH,TAG,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DfSrcIpAttrDailyMap" type="com.nis.domain.restful.DfSrcIpAttrDaily">
|
||||
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="dfSrcIpAttrDaily" parameterType="com.nis.domain.restful.DfSrcIpAttrDaily" resultMap="DfSrcIpAttrDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,SRC_PROVINCE,ATTR_TYPE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select SRC_PROVINCE,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select SRC_PROVINCE,ATTR_TYPE,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_SRCIP_TYPE_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by SRC_PROVINCE,ATTR_TYPE,service,stat_time
|
||||
|
||||
) DF_SRCIP_TYPE_STAT_LOG_DAILY
|
||||
GROUP BY SRC_PROVINCE,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DfSrcIpAttrMonthMap" type="com.nis.domain.restful.DfSrcIpAttrMonth">
|
||||
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="dfSrcIpAttrMonth" parameterType="com.nis.domain.restful.DfSrcIpAttrMonth" resultMap="DfSrcIpAttrMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,SRC_PROVINCE,ATTR_TYPE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select SRC_PROVINCE,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select SRC_PROVINCE,ATTR_TYPE,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_SRCIP_TYPE_STAT_LOG_MONTH
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by SRC_PROVINCE,ATTR_TYPE,service,stat_time
|
||||
|
||||
) DF_SRCIP_TYPE_STAT_LOG_MONTH
|
||||
GROUP BY SRC_PROVINCE,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DfSrcIpTagDailyMap" type="com.nis.domain.restful.DfSrcIpTagDaily">
|
||||
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="TAG" jdbcType="BIGINT" property="tag" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="dfSrcIpTagDaily" parameterType="com.nis.domain.restful.DfSrcIpTagDaily" resultMap="DfSrcIpTagDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,SRC_PROVINCE,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select SRC_PROVINCE,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select SRC_PROVINCE,TAG,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_SRCIP_TAG_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND TAG IN (${searchTag})
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by SRC_PROVINCE,TAG,service,stat_time
|
||||
|
||||
) DF_SRCIP_TAG_STAT_LOG_DAILY
|
||||
GROUP BY SRC_PROVINCE,TAG,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DfSrcIpTagMonthMap" type="com.nis.domain.restful.DfSrcIpTagMonth">
|
||||
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="TAG" jdbcType="BIGINT" property="tag" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="dfSrcIpTagMonth" parameterType="com.nis.domain.restful.DfSrcIpTagMonth" resultMap="DfSrcIpTagMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,SRC_PROVINCE,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select SRC_PROVINCE,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select SRC_PROVINCE,TAG,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_SRCIP_TAG_STAT_LOG_MONTH
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND TAG IN (${searchTag})
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by SRC_PROVINCE,TAG,service,stat_time
|
||||
|
||||
) DF_SRCIP_TAG_STAT_LOG_MONTH
|
||||
GROUP BY SRC_PROVINCE,TAG,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.DfReportEntity;
|
||||
import com.nis.domain.restful.DfAttrTypeReport;
|
||||
import com.nis.domain.restful.DfDestIpCountryReport;
|
||||
import com.nis.domain.restful.DfDestIpReport;
|
||||
import com.nis.domain.restful.DfEntranceReport;
|
||||
import com.nis.domain.restful.DfLwhhReport;
|
||||
import com.nis.domain.restful.DfPzReport;
|
||||
import com.nis.domain.restful.DfPzReportStat;
|
||||
import com.nis.domain.restful.DfServiceReport;
|
||||
import com.nis.domain.restful.DfSrcIpDomeSticReport;
|
||||
import com.nis.domain.restful.DfSrcIpReport;
|
||||
import com.nis.domain.restful.DfTagReport;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DfReportDao
|
||||
* @Description: TODO(一句话描述这个类)
|
||||
* @author (DDM)
|
||||
* @date 2016年10月31日上午11:51:26
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface DfReportDao extends CrudDao<DfReportEntity> {
|
||||
List<DfPzReport> findDfPzReport(DfPzReport pz);
|
||||
|
||||
List<DfAttrTypeReport> findAttrTypeReport(DfAttrTypeReport pz);
|
||||
|
||||
List<DfSrcIpDomeSticReport> findSrcIpDomeSticReport(DfSrcIpDomeSticReport pz);
|
||||
|
||||
List<DfDestIpCountryReport> findDestIpCountryReport(DfDestIpCountryReport pz);
|
||||
|
||||
List<DfEntranceReport> findDfEntranceReport(DfEntranceReport pz);
|
||||
|
||||
List<DfLwhhReport> findDfLwhhReport(DfLwhhReport pz);
|
||||
|
||||
List<DfTagReport> findDfTagReportPage(DfTagReport pz);
|
||||
|
||||
List<DfPzReport> findDfPriTagReport(DfPzReport pz);
|
||||
|
||||
List<DfPzReportStat> findDfPzReportStat(DfPzReportStat pz);
|
||||
|
||||
List<DfPzReportStat> findDfPzReportStatMinutes(DfPzReportStat pz);
|
||||
|
||||
Long findDfPzReportSum(DfPzReportStat pz);
|
||||
|
||||
List<DfSrcIpReport> findDfSrcIpReport(DfSrcIpReport entity);
|
||||
|
||||
List<DfDestIpReport> findDfDestIpReport(DfDestIpReport entity);
|
||||
|
||||
List<DfServiceReport> findDfServiceReport(DfServiceReport pz);
|
||||
|
||||
List<DfTagReport> findDfTagReport(DfTagReport pz);
|
||||
|
||||
}
|
||||
@@ -1,824 +0,0 @@
|
||||
<?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.DfReportDao">
|
||||
<!-- 所有实时统计report表的公共属性 -->
|
||||
<sql id="commonPorperty">
|
||||
ASUM,BSUM,REPORT_TIME
|
||||
</sql>
|
||||
<sql id="commonABPorperty">
|
||||
ASUM,BSUM,ABSUM,REPORT_TIME
|
||||
</sql>
|
||||
<resultMap id="DfPzReportMap" type="com.nis.domain.restful.DfPzReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="ABSUM" jdbcType="BIGINT" property="absum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="CFG_ID" jdbcType="BIGINT" property="cfgId" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<resultMap id="DfPzReportStatMap" type="com.nis.domain.restful.DfPzReportStat">
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="CFG_ID" jdbcType="BIGINT" property="configId" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="DfAttrTypeReportMap" type="com.nis.domain.restful.DfAttrTypeReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="ABSUM" jdbcType="BIGINT" property="absum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="ATTR_TYPE" jdbcType="INTEGER" property="attrType" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<resultMap id="DfSrcIpDomeSticReportMap" type="com.nis.domain.restful.DfSrcIpDomeSticReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="srcCity" />
|
||||
</resultMap>
|
||||
<resultMap id="DfDestIpCountryReportMap" type="com.nis.domain.restful.DfDestIpCountryReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="destCountry" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<!-- DfPzReport日志查询 -->
|
||||
<sql id="dfPzReportPorperty">
|
||||
,CFG_ID,SERVICE
|
||||
</sql>
|
||||
|
||||
<select id="findDfPzReport" parameterType="com.nis.domain.restful.DfPzReport"
|
||||
resultMap="DfPzReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty" />
|
||||
<include refid="dfPzReportPorperty" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.CFG_ID,
|
||||
PZ.SERVICE
|
||||
FROM DF_PZ_REPORT PZ
|
||||
GROUP BY
|
||||
PZ.CFG_ID,
|
||||
PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DF_PZ_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchCfgId != null and searchCfgId !=''">
|
||||
AND CFG_ID =#{searchCfgId}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="findAttrTypeReport" parameterType="com.nis.domain.restful.DfAttrTypeReport"
|
||||
resultMap="DfAttrTypeReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,absum,REPORT_TIME,ATTR_TYPE,SERVICE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (
|
||||
SELECT attr_type,REPORT_TIME, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select attr_type, asum, bsum, absum, REPORT_TIME,service
|
||||
from (select attr_type,
|
||||
REPORT_TIME,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.REPORT_TIME,
|
||||
pz.cfg_id,
|
||||
pz.attr_type,pz.service
|
||||
FROM df_pz_attr_report PZ
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.cfg_id, pz.attr_type, PZ.REPORT_TIME,pz.service)) a)
|
||||
group by attr_type, REPORT_TIME,service
|
||||
) df_pz_attr_report
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="findSrcIpDomeSticReport" parameterType="com.nis.domain.restful.DfSrcIpDomeSticReport"
|
||||
resultMap="DfSrcIpDomeSticReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,REPORT_TIME,SERVICE,SRC_PROVINCE,SRC_CITY
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE,
|
||||
pz.SRC_PROVINCE,pz.SRC_CITY
|
||||
FROM
|
||||
DF_SRCIP_DOMESTIC_REPORT PZ
|
||||
GROUP BY PZ.SRC_PROVINCE,pz.SRC_CITY,
|
||||
PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DF_SRCIP_DOMESTIC_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchSrcCity != null and searchSrcCity !=''">
|
||||
AND SRC_CITY =#{searchSrcCity}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="findDestIpCountryReport" parameterType="com.nis.domain.restful.DfDestIpCountryReport"
|
||||
resultMap="DfDestIpCountryReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,REPORT_TIME,DEST_COUNTRY,SERVICE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE,
|
||||
pz.DEST_COUNTRY
|
||||
FROM DF_DESTIP_COUNTRY_REPORT
|
||||
PZ
|
||||
GROUP BY PZ.DEST_COUNTRY, PZ.SERVICE, PZ.REPORT_TIME
|
||||
)
|
||||
DF_DESTIP_COUNTRY_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchDestCountry != null and searchDestCountry !=''">
|
||||
AND DEST_COUNTRY =#{searchDestCountry}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="findDfPriTagReport" parameterType="com.nis.domain.restful.DfPzReport"
|
||||
resultMap="DfPzReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,ABSUM,SERVICE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 OR PZ.CFG_ID IN (SELECT DISTINCT CFG_ID
|
||||
FROM
|
||||
DF_PZ_REPORT T WHERE T.ACTIVE_SYS = 2 AND T.CFG_ID NOT IN
|
||||
(SELECT
|
||||
CFG_ID FROM DF_PZ_REPORT B WHERE B.ACTIVE_SYS = 4)) THEN
|
||||
SUM ELSE 0
|
||||
END) ABSUM,
|
||||
PZ.SERVICE
|
||||
FROM DF_PZ_REPORT PZ
|
||||
GROUP BY PZ.SERVICE
|
||||
)
|
||||
DF_PZ_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="findDfPzReportStat" parameterType="com.nis.domain.restful.DfPzReportStat"
|
||||
resultMap="DfPzReportStatMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
CFG_ID,SERVICE,SUM
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (
|
||||
<choose>
|
||||
<when test="searchStatActiveSys == 6 ">
|
||||
SELECT CFG_ID,SERVICE, DECODE(ASUM,0,BSUM,ASUM) SUM FROM (
|
||||
SELECT config_id CFG_ID, SERVICE,
|
||||
SUM(CASE WHEN ACTIVE_SYS=4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN ACTIVE_SYS=2 THEN SUM ELSE 0 END) BSUM
|
||||
FROM df_stat_log_hour
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND stat_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND stat_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null ">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY config_id,SERVICE
|
||||
) REPORT
|
||||
</when>
|
||||
<otherwise>
|
||||
SELECT
|
||||
config_id cfg_id,SERVICE,SUM(sum) SUM
|
||||
FROM df_stat_log_hour
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND stat_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND stat_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null ">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
AND active_sys=#{searchStatActiveSys}
|
||||
</where>
|
||||
GROUP BY config_id,SERVICE
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findDfPzReportStatMinutes" parameterType="com.nis.domain.restful.DfPzReportStat"
|
||||
resultMap="DfPzReportStatMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
CFG_ID,SERVICE,SUM
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (
|
||||
<choose>
|
||||
<when test="searchStatActiveSys == 6 ">
|
||||
SELECT CFG_ID,SERVICE, DECODE(ASUM,0,BSUM,ASUM) SUM FROM (
|
||||
SELECT CFG_ID, SERVICE,
|
||||
SUM(CASE WHEN ACTIVE_SYS=4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN ACTIVE_SYS=2 THEN SUM ELSE 0 END) BSUM
|
||||
FROM DF_PZ_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null ">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY CFG_ID,SERVICE
|
||||
) REPORT
|
||||
</when>
|
||||
<otherwise>
|
||||
SELECT
|
||||
CFG_ID,SERVICE,SUM(sum) SUM
|
||||
FROM DF_PZ_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null ">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
AND active_sys=#{searchStatActiveSys}
|
||||
</where>
|
||||
GROUP BY CFG_ID,SERVICE
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="findDfPzReportSum" parameterType="com.nis.domain.restful.DfPzReportStat"
|
||||
resultType="java.lang.Long">
|
||||
SELECT
|
||||
SUM(sum) SUM
|
||||
FROM DF_PZ_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null ">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
AND active_sys=#{searchStatActiveSys}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<resultMap id="DfServiceReportMap" type="com.nis.domain.restful.DfServiceReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="CSUM" jdbcType="BIGINT" property="csum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="serviceType" />
|
||||
</resultMap>
|
||||
<!-- DfServiceReport日志查询 -->
|
||||
<sql id="dfServiceReportPorperty">
|
||||
,service
|
||||
</sql>
|
||||
<select id="findDfServiceReport" parameterType="com.nis.domain.restful.DfServiceReport"
|
||||
resultMap="DfServiceReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty" />
|
||||
<include refid="dfServiceReportPorperty" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 1 THEN SUM ELSE 0 END) CSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE
|
||||
FROM DF_SERVICE_REPORT PZ
|
||||
GROUP BY PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DF_SERVICE_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DfTagReportMap" type="com.nis.domain.restful.DfTagReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="ABSUM" jdbcType="BIGINT" property="absum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="TAG" jdbcType="INTEGER" property="tag" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<!-- DfTagReport日志查询 -->
|
||||
<sql id="dfTagReportPorperty">
|
||||
,tag
|
||||
</sql>
|
||||
<select id="findDfTagReportPage" parameterType="com.nis.domain.restful.DfTagReport"
|
||||
resultMap="DfTagReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
tag,REPORT_TIME, asum, bsum,absum,service
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (
|
||||
SELECT tag,REPORT_TIME, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select tag, asum, bsum, absum, REPORT_TIME,service
|
||||
from (select tag,
|
||||
REPORT_TIME,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.REPORT_TIME,
|
||||
pz.cfg_id,
|
||||
pz.tag,pz.service
|
||||
FROM df_pz_tag_report PZ
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND tag in(${searchTag})
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND service=#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.cfg_id, pz.tag, PZ.REPORT_TIME,pz.service)) a)
|
||||
group by tag, REPORT_TIME,service
|
||||
)
|
||||
DF_TAG_REPORT
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="findDfTagReport" parameterType="com.nis.domain.restful.DfTagReport"
|
||||
resultMap="DfTagReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
tag,REPORT_TIME, asum, bsum,absum,service
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (
|
||||
SELECT tag,REPORT_TIME, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select tag, asum, bsum, absum, REPORT_TIME,service
|
||||
from (select tag,
|
||||
REPORT_TIME,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.REPORT_TIME,
|
||||
pz.cfg_id,
|
||||
pz.tag,pz.service
|
||||
FROM df_pz_tag_report PZ
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND tag in(${searchTag})
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND service=#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.cfg_id, pz.tag, PZ.REPORT_TIME,pz.service)) a)
|
||||
group by tag, REPORT_TIME,service
|
||||
)
|
||||
DF_TAG_REPORT
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DfLwhhReportMap" type="com.nis.domain.restful.DfLwhhReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="lwhh" jdbcType="INTEGER" property="lwhh" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<select id="findDfLwhhReport" parameterType="com.nis.domain.restful.DfLwhhReport"
|
||||
resultMap="DfLwhhReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,REPORT_TIME,SERVICE,LWHH
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.lwhh,pz.service
|
||||
FROM DF_LWHH_REPORT PZ
|
||||
GROUP BY
|
||||
PZ.lwhh,pz.service, PZ.REPORT_TIME
|
||||
)
|
||||
DF_LWHH_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND service=#{searchService}
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND lwhh=#{searchLwhh}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DfEntranceReportMap" type="com.nis.domain.restful.DfEntranceReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="ENTRANCE_ID" jdbcType="INTEGER" property="entraceId" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<select id="findDfEntranceReport" parameterType="com.nis.domain.restful.DfEntranceReport"
|
||||
resultMap="DfEntranceReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,REPORT_TIME,SERVICE,ENTRANCE_ID
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.ENTRANCE_ID,pz.service
|
||||
FROM DF_ENTRANCE_REPORT PZ
|
||||
GROUP BY
|
||||
PZ.ENTRANCE_ID,pz.service, PZ.REPORT_TIME
|
||||
)
|
||||
DF_LWHH_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND service=#{searchService}
|
||||
</if>
|
||||
<if test="searchEntraceId != null and searchEntraceId !=''">
|
||||
AND ENTRANCE_ID=#{searchEntraceId}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<!-- DF_SRCIP_DOMESTIC_REPORT -->
|
||||
<sql id="dfSrcIpPorperty">
|
||||
,SRC_PROVINCE,SRC_CITY
|
||||
</sql>
|
||||
<resultMap id="DfSrcIpReportMap" type="com.nis.domain.restful.DfSrcIpReport">
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="csum" jdbcType="BIGINT" property="csum" />
|
||||
<result column="report_time" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="src_city" jdbcType="VARCHAR" property="srcCity" />
|
||||
</resultMap>
|
||||
<select id="findDfSrcIpReport" parameterType="com.nis.domain.restful.DfSrcIpReport"
|
||||
resultMap="DfSrcIpReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty" />
|
||||
<include refid="dfSrcIpPorperty" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN t.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN t.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
SUM(CASE WHEN
|
||||
t.ACTIVE_SYS = 1 THEN SUM ELSE 0 END) CSUM,
|
||||
t.SRC_PROVINCE,
|
||||
t.SRC_CITY
|
||||
,
|
||||
t.REPORT_TIME
|
||||
FROM DF_SRCIP_DOMESTIC_REPORT t
|
||||
GROUP BY t.SRC_PROVINCE,
|
||||
t.SRC_CITY, t.REPORT_TIME
|
||||
) DF_SRCIP_DOMESTIC_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<!-- DF_DESTIP_COUNTRY_REPORT -->
|
||||
<sql id="dfDestIpPorperty">
|
||||
,DEST_COUNTRY
|
||||
</sql>
|
||||
<resultMap id="DfDestIpReportMap" type="com.nis.domain.restful.DfDestIpReport">
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="csum" jdbcType="BIGINT" property="csum" />
|
||||
<result column="report_time" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="dest_country" jdbcType="VARCHAR" property="destCountry" />
|
||||
</resultMap>
|
||||
<select id="findDfDestIpReport" parameterType="com.nis.domain.restful.DfDestIpReport"
|
||||
resultMap="DfDestIpReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty" />
|
||||
<include refid="dfDestIpPorperty" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN t.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN t.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
SUM(CASE WHEN
|
||||
t.ACTIVE_SYS = 1 THEN SUM ELSE 0 END) CSUM,
|
||||
t.DEST_COUNTRY
|
||||
,
|
||||
t.REPORT_TIME
|
||||
FROM DF_DESTIP_COUNTRY_REPORT t
|
||||
GROUP BY t.DEST_COUNTRY,
|
||||
t.REPORT_TIME
|
||||
) DF_DESTIP_COUNTRY_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,54 +0,0 @@
|
||||
/**
|
||||
* @Title: DfStatLogDao.java
|
||||
* @Package com.nis.web.dao
|
||||
* @Description: TODO(用一句话描述该文件做什么)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 上午11:21:31
|
||||
* @version V1.0
|
||||
*/
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.nis.domain.restful.DfAttrStatLogDaily;
|
||||
import com.nis.domain.restful.DfAttrStatLogMonth;
|
||||
import com.nis.domain.restful.DfDestIpCounrtyStatLogDaily;
|
||||
import com.nis.domain.restful.DfDestIpCounrtyStatLogMonth;
|
||||
import com.nis.domain.restful.DfEntrStatLogDaily;
|
||||
import com.nis.domain.restful.DfEntrStatLogMonth;
|
||||
import com.nis.domain.restful.DfLwhhStatLogDaily;
|
||||
import com.nis.domain.restful.DfLwhhStatLogMonth;
|
||||
import com.nis.domain.restful.DfSrcIpDomesticStatLogDaily;
|
||||
import com.nis.domain.restful.DfSrcIpDomesticStatLogMonth;
|
||||
import com.nis.domain.restful.DfStatLogDaily;
|
||||
import com.nis.domain.restful.DfStatLogMonth;
|
||||
import com.nis.domain.restful.DfTagStatLogDaily;
|
||||
import com.nis.domain.restful.DfTagStatLogMonth;
|
||||
|
||||
/**
|
||||
* @ClassName: DfStatLogDao
|
||||
* @Description: TODO(这里用一句话描述这个类的作用)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 上午11:21:31
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface DfStatLogDao extends CrudDao<LogEntity> {
|
||||
|
||||
List<DfStatLogDaily> dfStatLogDaily(DfStatLogDaily daily);
|
||||
List<DfStatLogMonth> dfStatLogMonth(DfStatLogMonth mongth);
|
||||
List<DfTagStatLogDaily> dfTagStatLogDaily(DfTagStatLogDaily daily);
|
||||
List<DfTagStatLogMonth> dfTagStatLogMonth(DfTagStatLogMonth mongth);
|
||||
List<DfAttrStatLogDaily> dfAttrStatLogDaily(DfAttrStatLogDaily daily);
|
||||
List<DfAttrStatLogMonth> dfAttrStatLogMonth(DfAttrStatLogMonth mongth);
|
||||
List<DfEntrStatLogDaily> dfEntrStatLogDaily(DfEntrStatLogDaily daily);
|
||||
List<DfEntrStatLogMonth> dfEntrStatLogMonth(DfEntrStatLogMonth mongth);
|
||||
List<DfLwhhStatLogDaily> dfLwhhStatLogDaily(DfLwhhStatLogDaily daily);
|
||||
List<DfLwhhStatLogMonth> dfLwhhStatLogMonth(DfLwhhStatLogMonth mongth);
|
||||
List<DfSrcIpDomesticStatLogDaily> dfSrcIpDomesticStatLogDaily(DfSrcIpDomesticStatLogDaily daily);
|
||||
List<DfSrcIpDomesticStatLogMonth> dfSrcIpDomesticStatLogMonth(DfSrcIpDomesticStatLogMonth mongth);
|
||||
List<DfDestIpCounrtyStatLogDaily> dfDestIpCounrtyStatLogDaily(DfDestIpCounrtyStatLogDaily daily);
|
||||
List<DfDestIpCounrtyStatLogMonth> dfDestIpCounrtyStatLogMonth(DfDestIpCounrtyStatLogMonth mongth);
|
||||
|
||||
}
|
||||
@@ -1,857 +0,0 @@
|
||||
<?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.DfStatLogDao">
|
||||
<!-- 配置报表的公共属性 -->
|
||||
<sql id="commonPorperty">
|
||||
CONFIG_ID,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
|
||||
<resultMap id="DfStatLogDailyMap" type="com.nis.domain.restful.DfStatLogDaily">
|
||||
<result column="config_id" jdbcType="BIGINT" property="configId" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_StatLog_Daily日志查询 -->
|
||||
<select id="dfStatLogDaily" parameterType="com.nis.domain.restful.DfStatLogDaily" resultMap="DfStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select config_id,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select config_id,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchConfigId != null and searchConfigId !=''">
|
||||
and config_id=#{searchConfigId}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by config_id,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY config_id,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DfStatLogMonthMap" type="com.nis.domain.restful.DfStatLogMonth">
|
||||
<result column="config_id" jdbcType="BIGINT" property="configId" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_Stat_Log_Month日志查询 -->
|
||||
<select id="dfStatLogMonth" parameterType="com.nis.domain.restful.DfStatLogMonth" resultMap="DfStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select config_id,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select config_id,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_STAT_LOG_MONTH
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchConfigId != null and searchConfigId !=''">
|
||||
and config_id=#{searchConfigId}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by config_id,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY config_id,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<!-- 标签报表的公共属性 -->
|
||||
<sql id="tagCommonPorperty">
|
||||
TAG,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
<resultMap id="DfTagStatLogDailyMap" type="com.nis.domain.restful.DfTagStatLogDaily">
|
||||
<result column="tag" jdbcType="INTEGER" property="tag" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_TAG_Stat_Log_Daily日志查询 -->
|
||||
<select id="dfTagStatLogDaily" parameterType="com.nis.domain.restful.DfTagStatLogDaily" resultMap="DfTagStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="tagCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
SELECT tag,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select tag, asum, bsum, absum, stat_time,service
|
||||
from (select tag,
|
||||
stat_time,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.stat_time,
|
||||
pz.config_id,
|
||||
pz.tag,pz.service
|
||||
FROM df_cfg_tag_stat_log_daily PZ
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
and tag=#{searchTag}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.config_id, pz.tag, PZ.stat_time,pz.service)) a)
|
||||
group by tag, stat_time,service
|
||||
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DfTagStatLogMonthMap" type="com.nis.domain.restful.DfTagStatLogMonth">
|
||||
<result column="tag" jdbcType="INTEGER" property="tag" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_Tag_Stat_Log_Month日志查询 -->
|
||||
<select id="dfTagStatLogMonth" parameterType="com.nis.domain.restful.DfTagStatLogMonth" resultMap="DfTagStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="tagCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
SELECT tag,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select tag, asum, bsum, absum, stat_time,service
|
||||
from (select tag,
|
||||
stat_time,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.stat_time,
|
||||
pz.config_id,
|
||||
pz.tag,pz.service
|
||||
FROM df_cfg_tag_stat_log_month PZ
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
and tag=#{searchTag}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.config_id, pz.tag, PZ.stat_time,pz.service)) a)
|
||||
group by tag, stat_time,service
|
||||
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 性质报表的公共属性 -->
|
||||
<sql id="attrCommonPorperty">
|
||||
attr_type,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
<resultMap id="DfAttrStatLogDailyMap" type="com.nis.domain.restful.DfAttrStatLogDaily">
|
||||
<result column="attr_type" jdbcType="INTEGER" property="attrType" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_ATTR_Stat_Log_Daily日志查询 -->
|
||||
<select id="dfAttrStatLogDaily" parameterType="com.nis.domain.restful.DfAttrStatLogDaily" resultMap="DfAttrStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="attrCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
|
||||
SELECT attr_type,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select attr_type, asum, bsum, absum, stat_time,service
|
||||
from (select attr_type,
|
||||
stat_time,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.stat_time,
|
||||
pz.config_id,
|
||||
pz.attr_type,pz.service
|
||||
FROM df_cfg_attr_stat_log_daily PZ
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
and attr_type=#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.config_id, pz.attr_type, PZ.stat_time,pz.service)) a)
|
||||
group by attr_type, stat_time,service
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DfAttrStatLogMonthMap" type="com.nis.domain.restful.DfAttrStatLogMonth">
|
||||
<result column="attr_type" jdbcType="INTEGER" property="attrType" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_Attr_Stat_Log_Month日志查询 -->
|
||||
<select id="dfAttrStatLogMonth" parameterType="com.nis.domain.restful.DfAttrStatLogMonth" resultMap="DfAttrStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="attrCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
SELECT attr_type,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select attr_type, asum, bsum, absum, stat_time,service
|
||||
from (select attr_type,
|
||||
stat_time,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.stat_time,
|
||||
pz.config_id,
|
||||
pz.attr_type,pz.service
|
||||
FROM df_cfg_attr_stat_log_month PZ
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
and attr_type=#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.config_id, pz.attr_type, PZ.stat_time,pz.service)) a)
|
||||
group by attr_type, stat_time,service
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 局点报表的公共属性 -->
|
||||
<sql id="entrCommonPorperty">
|
||||
ENTRANCE_ID,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
<resultMap id="DfEntrStatLogDailyMap" type="com.nis.domain.restful.DfEntrStatLogDaily">
|
||||
<result column="ENTRANCE_ID" jdbcType="INTEGER" property="entranceId" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_ATTR_Stat_Log_Daily日志查询 -->
|
||||
<select id="dfEntrStatLogDaily" parameterType="com.nis.domain.restful.DfEntrStatLogDaily" resultMap="DfEntrStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="entrCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select ENTRANCE_ID,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select ENTRANCE_ID,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_entr_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchEntranceId != null and searchEntranceId !=''">
|
||||
and ENTRANCE_ID=#{searchEntranceId}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by ENTRANCE_ID,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY ENTRANCE_ID,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DfEntrStatLogMonthMap" type="com.nis.domain.restful.DfEntrStatLogMonth">
|
||||
<result column="ENTRANCE_ID" jdbcType="INTEGER" property="entranceId" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_Entr_Stat_Log_Month日志查询 -->
|
||||
<select id="dfEntrStatLogMonth" parameterType="com.nis.domain.restful.DfEntrStatLogMonth" resultMap="DfEntrStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="entrCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select ENTRANCE_ID,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select ENTRANCE_ID,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_entr_STAT_LOG_MONTH
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchEntranceId != null and searchEntranceId !=''">
|
||||
and ENTRANCE_ID=#{searchEntranceId}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by ENTRANCE_ID,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY ENTRANCE_ID,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 来文函号报表的公共属性 -->
|
||||
<sql id="lwhhCommonPorperty">
|
||||
lwhh,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
<resultMap id="DfLwhhStatLogDailyMap" type="com.nis.domain.restful.DfLwhhStatLogDaily">
|
||||
<result column="lwhh" jdbcType="INTEGER" property="lwhh" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_ATTR_Stat_Log_Daily日志查询 -->
|
||||
<select id="dfLwhhStatLogDaily" parameterType="com.nis.domain.restful.DfLwhhStatLogDaily" resultMap="DfLwhhStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="lwhhCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select lwhh,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select lwhh,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_lwhh_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
and lwhh=#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by lwhh,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY lwhh,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
<resultMap id="DfLwhhStatLogMonthMap" type="com.nis.domain.restful.DfLwhhStatLogMonth">
|
||||
<result column="lwhh" jdbcType="INTEGER" property="lwhh" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_Lwhh_Stat_Log_Month日志查询 -->
|
||||
<select id="dfLwhhStatLogMonth" parameterType="com.nis.domain.restful.DfLwhhStatLogMonth" resultMap="DfLwhhStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="lwhhCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select lwhh,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select lwhh,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DF_lwhh_STAT_LOG_MONTH
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
and lwhh=#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by lwhh,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY lwhh,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<!-- 境内源ip报表的公共属性 -->
|
||||
<sql id="srcIpCommonPorperty">
|
||||
SRC_PROVINCE,SRC_CITY,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
<resultMap id="DfSrcIpDomesticStatLogDailyMap" type="com.nis.domain.restful.DfSrcIpDomesticStatLogDaily">
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="srcCity" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_SrcIp_Stat_Log_Daily日志查询 -->
|
||||
<select id="dfSrcIpDomesticStatLogDaily" parameterType="com.nis.domain.restful.DfSrcIpDomesticStatLogDaily" resultMap="DfSrcIpDomesticStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="srcIpCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select SRC_PROVINCE,SRC_CITY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select SRC_PROVINCE,SRC_CITY,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from df_SRCIP_stat_log_daily
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by SRC_PROVINCE,SRC_CITY,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY SRC_PROVINCE,SRC_CITY,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
<resultMap id="DfSrcIpDomesticStatLogMonthMap" type="com.nis.domain.restful.DfSrcIpDomesticStatLogMonth">
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="srcCity" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_SrcIpDomestic_Stat_Log_Month日志查询 -->
|
||||
<select id="dfSrcIpDomesticStatLogMonth" parameterType="com.nis.domain.restful.DfSrcIpDomesticStatLogMonth" resultMap="DfSrcIpDomesticStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="srcIpCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select SRC_PROVINCE,SRC_CITY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select SRC_PROVINCE,SRC_CITY,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from df_SRCIP_stat_log_month
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by SRC_PROVINCE,SRC_CITY,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY SRC_PROVINCE,SRC_CITY,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<!-- 国家目的ip报表的公共属性 -->
|
||||
<sql id="destIpCommonPorperty">
|
||||
DEST_COUNTRY,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
<resultMap id="DfDestIpCounrtyStatLogDailyMap" type="com.nis.domain.restful.DfDestIpCounrtyStatLogDaily">
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="destCountry" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_DestIp_Stat_Log_Daily日志查询 -->
|
||||
<select id="dfDestIpCounrtyStatLogDaily" parameterType="com.nis.domain.restful.DfDestIpCounrtyStatLogDaily" resultMap="DfDestIpCounrtyStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="destIpCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select DEST_COUNTRY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select DEST_COUNTRY,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from df_DESTIP_stat_log_daily
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by DEST_COUNTRY,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY DEST_COUNTRY,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
<resultMap id="DfDestIpCounrtyStatLogMonthMap" type="com.nis.domain.restful.DfDestIpCounrtyStatLogMonth">
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="destCountry" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Df_DestIp_Stat_Log_Month日志查询 -->
|
||||
<select id="dfDestIpCounrtyStatLogMonth" parameterType="com.nis.domain.restful.DfDestIpCounrtyStatLogMonth" resultMap="DfDestIpCounrtyStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="destIpCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select DEST_COUNTRY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select DEST_COUNTRY,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from df_DESTIP_stat_log_Month
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by DEST_COUNTRY,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY DEST_COUNTRY,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,48 +0,0 @@
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.restful.DjCkStatLog;
|
||||
import com.nis.domain.restful.DjJitAffairDestReport;
|
||||
import com.nis.domain.restful.DjJitAffairSrcReport;
|
||||
import com.nis.domain.restful.DjJitFlDestReport;
|
||||
import com.nis.domain.restful.DjJitFlSrcReport;
|
||||
import com.nis.domain.restful.DjJitGuaranteeDestReport;
|
||||
import com.nis.domain.restful.DjJitGuaranteeSrcReport;
|
||||
import com.nis.domain.restful.DjJitIdDestReport;
|
||||
import com.nis.domain.restful.DjJitIdSrcReport;
|
||||
import com.nis.domain.restful.DjJitMissionDestReport;
|
||||
import com.nis.domain.restful.DjJitMissionSrcReport;
|
||||
import com.nis.domain.restful.DjJitTagDestReport;
|
||||
import com.nis.domain.restful.DjJitTagSrcReport;
|
||||
|
||||
@MyBatisDao
|
||||
public interface DjJitLogSearchDao {
|
||||
|
||||
List<DjJitFlSrcReport> findDjJitFlSrcReport(DjJitFlSrcReport djJitFlSrcReportSources);
|
||||
|
||||
List<DjJitFlDestReport> findDjJitFlDestReport(DjJitFlDestReport djJitFlDestReport);
|
||||
|
||||
List<DjJitAffairSrcReport> findDjJitAffairSrcReport(DjJitAffairSrcReport djJitAffairSrcReport);
|
||||
|
||||
List<DjJitAffairDestReport> findDjJitAffairDestReport(DjJitAffairDestReport djJitAffairDestReport);
|
||||
|
||||
List<DjJitMissionSrcReport> findDjJitMissionSrcReport(DjJitMissionSrcReport djJitMissionSrcReport);
|
||||
|
||||
List<DjJitMissionDestReport> findDjJitMissionDestReport(DjJitMissionDestReport djJitMissionDestReport);
|
||||
|
||||
List<DjJitGuaranteeSrcReport> findDjJitGuaranteeSrcReport(DjJitGuaranteeSrcReport djJitGuaranteeSrcReport);
|
||||
|
||||
List<DjJitGuaranteeDestReport> findDjJitGuaranteeDestReport(DjJitGuaranteeDestReport djJitGuaranteeDestReport);
|
||||
|
||||
List<DjJitTagSrcReport> findDjJitTagSrcReport(DjJitTagSrcReport djJitTagSrcReport);
|
||||
|
||||
List<DjJitTagDestReport> findDjJitTagDestReport(DjJitTagDestReport djJitTagDestReport);
|
||||
|
||||
List<DjJitIdSrcReport> findDjJitIdSrcReport(DjJitIdSrcReport djJitIdSrcReport);
|
||||
|
||||
List<DjJitIdDestReport> findDjJitIdDestReport(DjJitIdDestReport djJitIdDestReport);
|
||||
|
||||
List<DjCkStatLog> findDjCkStatLog(DjCkStatLog djCkStatLog);
|
||||
|
||||
}
|
||||
@@ -1,776 +0,0 @@
|
||||
<?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.DjJitLogSearchDao">
|
||||
<resultMap id="DjJitFlSrcReportMap" type="com.nis.domain.restful.DjJitFlSrcReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="FL" jdbcType="INTEGER" property="fl" />
|
||||
<result column="XZ" jdbcType="INTEGER" property="xz" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<sql id="DjJitFlSrcReport_Column_List">
|
||||
STAT_ID, FL, XZ, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
|
||||
SRC_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDjJitFlSrcReport" parameterType="com.nis.domain.restful.DjJitFlSrcReport"
|
||||
resultMap="DjJitFlSrcReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjJitFlSrcReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_JIT_FL_SRC_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchFl != null and searchFl !=''">
|
||||
AND FL = #{searchFl}
|
||||
</if>
|
||||
<if test="searchXz != null and searchXz !=''">
|
||||
AND XZ = #{searchXz}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DjJitFlDestReportMap" type="com.nis.domain.restful.DjJitFlDestReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="FL" jdbcType="INTEGER" property="fl" />
|
||||
<result column="XZ" jdbcType="INTEGER" property="xz" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<sql id="DjJitFlDestReport_Column_List">
|
||||
STAT_ID, FL, XZ, REPORT_TIME, DEST_COUNTRY, DEST_PROVINCE,
|
||||
DEST_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDjJitFlDestReport" parameterType="com.nis.domain.restful.DjJitFlDestReport"
|
||||
resultMap="DjJitFlDestReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjJitFlDestReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_JIT_FL_Dest_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchFl != null and searchFl !=''">
|
||||
AND FL = #{searchFl}
|
||||
</if>
|
||||
<if test="searchXz != null and searchXz !=''">
|
||||
AND XZ = #{searchXz}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="DjJitAffairSrcReportMap" type="com.nis.domain.restful.DjJitAffairSrcReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="Affair" jdbcType="INTEGER" property="affair" />
|
||||
<result column="topic" jdbcType="INTEGER" property="topic" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DjJitAffairSrcReport_Column_List">
|
||||
STAT_ID, Affair,topic, REPORT_TIME, SRC_COUNTRY,
|
||||
SRC_PROVINCE,
|
||||
SRC_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDjJitAffairSrcReport" parameterType="com.nis.domain.restful.DjJitAffairSrcReport"
|
||||
resultMap="DjJitAffairSrcReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjJitAffairSrcReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_JIT_AFFAIR_SRC_REPORT
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchAffair != null and searchAffair !=''">
|
||||
AND Affair = #{searchAffair}
|
||||
</if>
|
||||
<if test="searchTopic != null and searchTopic !=''">
|
||||
AND topic = #{searchTopic}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DjJitAffairDestReportMap" type="com.nis.domain.restful.DjJitAffairDestReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="Affair" jdbcType="INTEGER" property="affair" />
|
||||
<result column="topic" jdbcType="INTEGER" property="topic" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DjJitAffairDestReport_Column_List">
|
||||
STAT_ID, Affair,topic, REPORT_TIME, DEST_COUNTRY,
|
||||
DEST_PROVINCE,
|
||||
DEST_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDjJitAffairDestReport" parameterType="com.nis.domain.restful.DjJitAffairDestReport"
|
||||
resultMap="DjJitAffairDestReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjJitAffairDestReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_JIT_AFFAIR_DEST_REPORT
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchAffair != null and searchAffair !=''">
|
||||
AND Affair = #{searchAffair}
|
||||
</if>
|
||||
<if test="searchTopic != null and searchTopic !=''">
|
||||
AND topic = #{searchTopic}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DjJitMissionSrcReportMap" type="com.nis.domain.restful.DjJitMissionSrcReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="mission" jdbcType="INTEGER" property="mission" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DjJitMissionSrcReport_Column_List">
|
||||
STAT_ID, mission, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
|
||||
SRC_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDjJitMissionSrcReport" parameterType="com.nis.domain.restful.DjJitMissionSrcReport"
|
||||
resultMap="DjJitMissionSrcReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjJitMissionSrcReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_JIT_MISSION_SRC_REPORT
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchMission != null and searchMission !=''">
|
||||
AND mission = #{searchMission}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DjJitMissionDestReportMap" type="com.nis.domain.restful.DjJitMissionDestReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="mission" jdbcType="INTEGER" property="mission" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DjJitMissionDestReport_Column_List">
|
||||
STAT_ID, mission, REPORT_TIME, DEST_COUNTRY, DEST_PROVINCE,
|
||||
DEST_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDjJitMissionDestReport" parameterType="com.nis.domain.restful.DjJitMissionDestReport"
|
||||
resultMap="DjJitMissionDestReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjJitMissionDestReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_JIT_MISSION_DEST_REPORT
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchMission != null and searchMission !=''">
|
||||
AND mission = #{searchMission}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DjJitGuaranteeSrcReportMap"
|
||||
type="com.nis.domain.restful.DjJitGuaranteeSrcReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="guarantee" jdbcType="INTEGER" property="guarantee" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DjJitGuaranteeSrcReport_Column_List">
|
||||
STAT_ID, guarantee, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
|
||||
SRC_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDjJitGuaranteeSrcReport" parameterType="com.nis.domain.restful.DjJitGuaranteeSrcReport"
|
||||
resultMap="DjJitGuaranteeSrcReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjJitGuaranteeSrcReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_JIT_GUARANTEE_SRC_REPORT
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchGuarantee != null and searchGuarantee !=''">
|
||||
AND guarantee = #{searchGuarantee}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DjJitGuaranteeDestReportMap"
|
||||
type="com.nis.domain.restful.DjJitGuaranteeDestReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="guarantee" jdbcType="INTEGER" property="guarantee" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DjJitGuaranteeDestReport_Column_List">
|
||||
STAT_ID, guarantee, REPORT_TIME, DEST_COUNTRY,
|
||||
DEST_PROVINCE,
|
||||
DEST_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDjJitGuaranteeDestReport" parameterType="com.nis.domain.restful.DjJitGuaranteeDestReport"
|
||||
resultMap="DjJitGuaranteeDestReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjJitGuaranteeDestReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_JIT_GUARANTEE_DEST_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchGuarantee != null and searchGuarantee !=''">
|
||||
AND guarantee = #{searchGuarantee}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="DjJitTagSrcReportMap" type="com.nis.domain.restful.DjJitTagSrcReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="tag" jdbcType="INTEGER" property="tag" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DjJitTagSrcReport_Column_List">
|
||||
STAT_ID, tag, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
|
||||
SRC_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDjJitTagSrcReport" parameterType="com.nis.domain.restful.DjJitTagSrcReport"
|
||||
resultMap="DjJitTagSrcReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjJitTagSrcReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_JIT_TAG_SRC_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND tag in (${searchTag})
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DjJitTagDestReportMap" type="com.nis.domain.restful.DjJitTagDestReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="tag" jdbcType="INTEGER" property="tag" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DjJitTagDestReport_Column_List">
|
||||
STAT_ID, tag, REPORT_TIME, DEST_COUNTRY,
|
||||
DEST_PROVINCE,
|
||||
DEST_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDjJitTagDestReport" parameterType="com.nis.domain.restful.DjJitTagDestReport"
|
||||
resultMap="DjJitTagDestReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjJitTagDestReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_JIT_TAG_DEST_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND tag in (${searchTag})
|
||||
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="DjJitIdSrcReportMap" type="com.nis.domain.restful.DjJitIdSrcReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DjJitIdSrcReport_Column_List">
|
||||
STAT_ID, id, REPORT_TIME, SRC_COUNTRY, SRC_PROVINCE,
|
||||
SRC_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDjJitIdSrcReport" parameterType="com.nis.domain.restful.DjJitIdSrcReport"
|
||||
resultMap="DjJitIdSrcReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjJitIdSrcReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_JIT_ID_SRC_REPORT
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchId != null and searchId !=''">
|
||||
AND id = #{searchId}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DjJitIdDestReportMap" type="com.nis.domain.restful.DjJitIdDestReport">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="nation" />
|
||||
<result column="DEST_PROVINCE" jdbcType="VARCHAR" property="province" />
|
||||
<result column="DEST_CITY" jdbcType="VARCHAR" property="city" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DjJitIdDestReport_Column_List">
|
||||
STAT_ID, id, REPORT_TIME, DEST_COUNTRY,
|
||||
DEST_PROVINCE,
|
||||
DEST_CITY, SUM,
|
||||
SERVICE
|
||||
</sql>
|
||||
<select id="findDjJitIdDestReport" parameterType="com.nis.domain.restful.DjJitIdDestReport"
|
||||
resultMap="DjJitIdDestReportMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjJitIdDestReport_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_JIT_ID_DEST_REPORT
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchId != null and searchId !=''">
|
||||
AND id = #{searchId}
|
||||
</if>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="DjCkStatLogMap" type="com.nis.domain.restful.DjCkStatLog">
|
||||
<id column="STAT_ID" jdbcType="BIGINT" property="statId" />
|
||||
<result column="CONFIG_ID" jdbcType="BIGINT" property="configId" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
<result column="GJ_CK_ID" jdbcType="BIGINT" property="gjCkId" />
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="CAP_TIME" jdbcType="TIMESTAMP" property="capTime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="DjCkStatLog_Column_List">
|
||||
STAT_ID, CONFIG_ID, SERVICE, GJ_CK_ID,SUM,CAP_TIME,active_sys
|
||||
</sql>
|
||||
<select id="findDjCkStatLog" parameterType="com.nis.domain.restful.DjCkStatLog"
|
||||
resultMap="DjCkStatLogMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="DjCkStatLog_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from DJ_CK_STAT_LOG
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
<if test="searchGjCkId != null and searchGjCkId !=''">
|
||||
AND GJ_CK_ID = #{searchGjCkId}
|
||||
</if>
|
||||
<if test="searchCfgId != null and searchCfgId !=''">
|
||||
AND CONFIG_ID = #{searchCfgId}
|
||||
</if>
|
||||
<if test="searchActiveSys != null and searchActiveSys !=''">
|
||||
AND active_sys = #{searchActiveSys}
|
||||
</if>
|
||||
<if test="searchCapStartTime != null and searchCapStartTime !=''">
|
||||
<![CDATA[AND CAP_TIME >= to_date(#{searchCapStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchCapEndTime != null and searchCapEndTime !=''">
|
||||
<![CDATA[AND CAP_TIME < to_date(#{searchCapEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.DfReportEntity;
|
||||
import com.nis.domain.restful.DjLwhhAttrReport;
|
||||
import com.nis.domain.restful.DjLwhhTagReport;
|
||||
import com.nis.domain.restful.DjSrcIpAttrReport;
|
||||
import com.nis.domain.restful.DjSrcIpTagReport;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DjMultiDimensionnalReportDao
|
||||
* @Description: TODO(一句话描述这个类)
|
||||
* @author (DDM)
|
||||
* @date 2017年8月4日下午4:46:31
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface DjMultiDimensionalReportDao extends CrudDao<DfReportEntity> {
|
||||
|
||||
List<DjLwhhAttrReport> findDjLwhhAttrReport(DjLwhhAttrReport pz);
|
||||
|
||||
List<DjLwhhTagReport> findDjLwhhTagReportPage(DjLwhhTagReport pz);
|
||||
|
||||
List<DjSrcIpAttrReport> findDjSrcIpAttrReportPage(DjSrcIpAttrReport pz);
|
||||
|
||||
List<DjSrcIpTagReport> findDjSrcIpTagReportPage(DjSrcIpTagReport pz);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,230 +0,0 @@
|
||||
<?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.DjMultiDimensionalReportDao">
|
||||
<!-- 所有实时统计report表的公共属性 -->
|
||||
<sql id="commonPorperty">
|
||||
ASUM,BSUM,REPORT_TIME,SERVICE
|
||||
</sql>
|
||||
<resultMap id="DjLwhhAttrReportMap" type="com.nis.domain.restful.DjLwhhAttrReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="LWHH" jdbcType="BIGINT" property="lwhh" />
|
||||
<result column="ATTR_TYPE" jdbcType="BIGINT" property="attrType" />
|
||||
<result column="SERVICE" jdbcType="BIGINT" property="service" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="findDjLwhhAttrReport" parameterType="com.nis.domain.restful.DjLwhhAttrReport"
|
||||
resultMap="DjLwhhAttrReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty" />,LWHH,ATTR_TYPE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE,
|
||||
pz.LWHH,
|
||||
pz.ATTR_TYPE
|
||||
FROM DJ_LWHH_TYPE_REPORT PZ
|
||||
GROUP BY PZ.LWHH,PZ.ATTR_TYPE, PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DJ_LWHH_TYPE_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND LWHH =#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DjLwhhTagReportMap" type="com.nis.domain.restful.DjLwhhTagReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="LWHH" jdbcType="BIGINT" property="lwhh" />
|
||||
<result column="TAG" jdbcType="BIGINT" property="tag" />
|
||||
<result column="SERVICE" jdbcType="BIGINT" property="service" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="findDjLwhhTagReportPage" parameterType="com.nis.domain.restful.DjLwhhTagReport"
|
||||
resultMap="DjLwhhTagReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty" />,LWHH,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE,
|
||||
pz.LWHH,
|
||||
pz.TAG
|
||||
FROM DJ_LWHH_TAG_REPORT PZ
|
||||
GROUP BY PZ.LWHH,PZ.TAG, PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DJ_LWHH_TAG_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND TAG in (${searchTag})
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND LWHH =#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DjSrcIpTagReportMap" type="com.nis.domain.restful.DjSrcIpTagReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="TAG" jdbcType="BIGINT" property="tag" />
|
||||
<result column="SERVICE" jdbcType="BIGINT" property="service" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="findDjSrcIpTagReportPage" parameterType="com.nis.domain.restful.DjSrcIpTagReport"
|
||||
resultMap="DjSrcIpTagReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty" />,SRC_PROVINCE,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE,
|
||||
pz.SRC_PROVINCE,
|
||||
pz.TAG
|
||||
FROM DJ_SRCIP_DOMESTIC_TAG_REPORT PZ
|
||||
GROUP BY PZ.SRC_PROVINCE,PZ.TAG, PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DJ_SRCIP_DOMESTIC_TAG_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND TAG in (${searchTag})
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DjSrcIpAttrReportMap" type="com.nis.domain.restful.DjSrcIpAttrReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="ATTR_TYPE" jdbcType="BIGINT" property="attrType" />
|
||||
<result column="SERVICE" jdbcType="BIGINT" property="service" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="findDjSrcIpAttrReportPage" parameterType="com.nis.domain.restful.DjSrcIpAttrReport"
|
||||
resultMap="DjSrcIpAttrReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty" />,SRC_PROVINCE,ATTR_TYPE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE,
|
||||
pz.SRC_PROVINCE,
|
||||
pz.ATTR_TYPE
|
||||
FROM DJ_SRCIP_DOMESTIC_TYPE_REPORT PZ
|
||||
GROUP BY PZ.SRC_PROVINCE,PZ.ATTR_TYPE, PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DJ_SRCIP_DOMESTIC_TYPE_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.nis.domain.restful.DjLwhhAttrDaily;
|
||||
import com.nis.domain.restful.DjLwhhAttrMonth;
|
||||
import com.nis.domain.restful.DjLwhhTagDaily;
|
||||
import com.nis.domain.restful.DjLwhhTagMonth;
|
||||
import com.nis.domain.restful.DjSrcIpAttrDaily;
|
||||
import com.nis.domain.restful.DjSrcIpAttrMonth;
|
||||
import com.nis.domain.restful.DjSrcIpTagDaily;
|
||||
import com.nis.domain.restful.DjSrcIpTagMonth;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DjMultiDimensionnalReportDao
|
||||
* @Description: TODO(一句话描述这个类)
|
||||
* @author (DDM)
|
||||
* @date 2017年8月4日下午4:46:31
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface DjMultiDimensionalStatLogDao extends CrudDao<LogEntity> {
|
||||
|
||||
List<DjLwhhAttrDaily> djLwhhAttrDaily(DjLwhhAttrDaily pz);
|
||||
List<DjLwhhAttrMonth> djLwhhAttrMonth(DjLwhhAttrMonth pz);
|
||||
|
||||
List<DjLwhhTagDaily> djLwhhTagDaily(DjLwhhTagDaily pz);
|
||||
List<DjLwhhTagMonth> djLwhhTagMonth(DjLwhhTagMonth pz);
|
||||
|
||||
List<DjSrcIpAttrDaily> djSrcIpAttrDaily(DjSrcIpAttrDaily pz);
|
||||
List<DjSrcIpAttrMonth> djSrcIpAttrMonth(DjSrcIpAttrMonth pz);
|
||||
|
||||
List<DjSrcIpTagDaily> djSrcIpTagDaily(DjSrcIpTagDaily pz);
|
||||
List<DjSrcIpTagMonth> djSrcIpTagMonth(DjSrcIpTagMonth pz);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,475 +0,0 @@
|
||||
<?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.DjMultiDimensionalStatLogDao">
|
||||
<!-- 配置报表的公共属性 -->
|
||||
<sql id="commonPorperty">
|
||||
ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
|
||||
<resultMap id="DjLwhhAttrDailyMap" type="com.nis.domain.restful.DjLwhhAttrDaily">
|
||||
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
|
||||
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="djLwhhAttrDaily" parameterType="com.nis.domain.restful.DjLwhhAttrDaily" resultMap="DjLwhhAttrDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,LWHH,ATTR_TYPE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select LWHH,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select LWHH,ATTR_TYPE,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_LWHH_TYPE_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND LWHH =#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by LWHH,ATTR_TYPE,service,stat_time
|
||||
|
||||
) DJ_LWHH_TYPE_STAT_LOG_DAILY
|
||||
GROUP BY LWHH,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DjLwhhAttrMonthMap" type="com.nis.domain.restful.DjLwhhAttrMonth">
|
||||
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
|
||||
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="djLwhhAttrMonth" parameterType="com.nis.domain.restful.DjLwhhAttrMonth" resultMap="DjLwhhAttrMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,LWHH,ATTR_TYPE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select LWHH,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select LWHH,ATTR_TYPE,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_LWHH_TYPE_STAT_LOG_MONTH
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND LWHH =#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by LWHH,ATTR_TYPE,service,stat_time
|
||||
|
||||
) DJ_LWHH_TYPE_STAT_LOG_MONTH
|
||||
GROUP BY LWHH,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DjLwhhTagDailyMap" type="com.nis.domain.restful.DjLwhhTagDaily">
|
||||
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
|
||||
<result column="TAG" jdbcType="BIGINT" property="tag" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="djLwhhTagDaily" parameterType="com.nis.domain.restful.DjLwhhTagDaily" resultMap="DjLwhhTagDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,LWHH,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select LWHH,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select LWHH,TAG,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_LWHH_TAG_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND TAG IN (${searchTag})
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND LWHH =#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by LWHH,TAG,service,stat_time
|
||||
|
||||
) DJ_LWHH_TAG_STAT_LOG_DAILY
|
||||
GROUP BY LWHH,TAG,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DjLwhhTagMonthMap" type="com.nis.domain.restful.DjLwhhTagMonth">
|
||||
<result column="lwhh" jdbcType="BIGINT" property="lwhh" />
|
||||
<result column="TAG" jdbcType="BIGINT" property="tag" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="djLwhhTagMonth" parameterType="com.nis.domain.restful.DjLwhhTagMonth" resultMap="DjLwhhTagMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,LWHH,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select LWHH,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select LWHH,TAG,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_LWHH_TAG_STAT_LOG_MONTH
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND TAG IN (${searchTag})
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND LWHH =#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by LWHH,TAG,service,stat_time
|
||||
|
||||
) DJ_LWHH_TAG_STAT_LOG_MONTH
|
||||
GROUP BY LWHH,TAG,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DjSrcIpAttrDailyMap" type="com.nis.domain.restful.DjSrcIpAttrDaily">
|
||||
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="djSrcIpAttrDaily" parameterType="com.nis.domain.restful.DjSrcIpAttrDaily" resultMap="DjSrcIpAttrDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,SRC_PROVINCE,ATTR_TYPE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select SRC_PROVINCE,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select SRC_PROVINCE,ATTR_TYPE,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_SRCIP_TYPE_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by SRC_PROVINCE,ATTR_TYPE,service,stat_time
|
||||
|
||||
) DJ_SRCIP_TYPE_STAT_LOG_DAILY
|
||||
GROUP BY SRC_PROVINCE,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DjSrcIpAttrMonthMap" type="com.nis.domain.restful.DjSrcIpAttrMonth">
|
||||
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="attr_type" jdbcType="BIGINT" property="attrType" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="djSrcIpAttrMonth" parameterType="com.nis.domain.restful.DjSrcIpAttrMonth" resultMap="DjSrcIpAttrMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,SRC_PROVINCE,ATTR_TYPE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select SRC_PROVINCE,ATTR_TYPE,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select SRC_PROVINCE,ATTR_TYPE,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_SRCIP_TYPE_STAT_LOG_MONTH
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by SRC_PROVINCE,ATTR_TYPE,service,stat_time
|
||||
|
||||
) DJ_SRCIP_TYPE_STAT_LOG_MONTH
|
||||
GROUP BY SRC_PROVINCE,ATTR_TYPE,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DjSrcIpTagDailyMap" type="com.nis.domain.restful.DjSrcIpTagDaily">
|
||||
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="TAG" jdbcType="BIGINT" property="tag" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="djSrcIpTagDaily" parameterType="com.nis.domain.restful.DjSrcIpTagDaily" resultMap="DjSrcIpTagDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,SRC_PROVINCE,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select SRC_PROVINCE,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select SRC_PROVINCE,TAG,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_SRCIP_TAG_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND TAG IN (${searchTag})
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by SRC_PROVINCE,TAG,service,stat_time
|
||||
|
||||
) DJ_SRCIP_TAG_STAT_LOG_DAILY
|
||||
GROUP BY SRC_PROVINCE,TAG,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DjSrcIpTagMonthMap" type="com.nis.domain.restful.DjSrcIpTagMonth">
|
||||
<result column="src_province" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="TAG" jdbcType="BIGINT" property="tag" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<select id="djSrcIpTagMonth" parameterType="com.nis.domain.restful.DjSrcIpTagMonth" resultMap="DjSrcIpTagMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>,SRC_PROVINCE,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select SRC_PROVINCE,TAG,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select SRC_PROVINCE,TAG,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_SRCIP_TAG_STAT_LOG_MONTH
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND TAG IN (${searchTag})
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by SRC_PROVINCE,TAG,service,stat_time
|
||||
|
||||
) DJ_SRCIP_TAG_STAT_LOG_MONTH
|
||||
GROUP BY SRC_PROVINCE,TAG,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,49 +0,0 @@
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.DfReportEntity;
|
||||
import com.nis.domain.restful.DjPzReportStat;
|
||||
import com.nis.domain.restful.DjAttrTypeReport;
|
||||
import com.nis.domain.restful.DjDestIpCountryReport;
|
||||
import com.nis.domain.restful.DjEntranceReport;
|
||||
import com.nis.domain.restful.DjLwhhReport;
|
||||
import com.nis.domain.restful.DjSrcIpDomeSticReport;
|
||||
import com.nis.domain.restful.DjTagReport;
|
||||
import com.nis.domain.restful.DjPzReport;
|
||||
|
||||
/**
|
||||
* @ClassName: DjReportDao
|
||||
* @Description: TODO(一句话描述这个类)
|
||||
* @author (ZBC)
|
||||
* @date 2016年11月22日下午06:00:00
|
||||
* @version V1.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@MyBatisDao
|
||||
public interface DjReportDao extends CrudDao<DfReportEntity> {
|
||||
|
||||
List<DjPzReport> findDjPzReport(DjPzReport entity);
|
||||
|
||||
List<DjPzReport> findDjPzPrivPage(DjPzReport entity);
|
||||
|
||||
List<DjPzReportStat> findDjPzReportStat(DjPzReportStat pz);
|
||||
List<DjPzReportStat> findDjPzReportStatMinutes(DjPzReportStat pz);
|
||||
|
||||
// List<DjPzReport> findDjPzPrivPage(DjPzReport pz);
|
||||
|
||||
Long findDjPzReportSum(DjPzReportStat pz);
|
||||
|
||||
|
||||
List<DjAttrTypeReport> findAttrTypeReport(DjAttrTypeReport pz);
|
||||
|
||||
List<DjSrcIpDomeSticReport> findSrcIpDomeSticReport(DjSrcIpDomeSticReport pz);
|
||||
|
||||
List<DjDestIpCountryReport> findDestIpCountryReport(DjDestIpCountryReport pz);
|
||||
|
||||
List<DjEntranceReport> findDjEntranceReport(DjEntranceReport pz);
|
||||
|
||||
List<DjLwhhReport> findDjLwhhReport(DjLwhhReport pz);
|
||||
|
||||
List<DjTagReport> findDjTagReportPage(DjTagReport pz);
|
||||
}
|
||||
@@ -1,617 +0,0 @@
|
||||
<?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.DjReportDao">
|
||||
<!-- 所有实时统计report表的公共属性 -->
|
||||
<sql id="commonPorperty">
|
||||
ASUM,BSUM,CSUM,REPORT_TIME
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- DjPzReport日志查询 -->
|
||||
<resultMap id="DjPzReportMap" type="com.nis.domain.restful.DjPzReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="CFG_ID" jdbcType="BIGINT" property="cfgId" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<resultMap id="DjPzReportStatMap" type="com.nis.domain.restful.DjPzReportStat">
|
||||
<result column="SUM" jdbcType="BIGINT" property="sum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="CFG_ID" jdbcType="BIGINT" property="configId" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<!-- DJ_PZ_REPORT -->
|
||||
<sql id="djPzReportPorperty">
|
||||
,CFG_ID,SERVICE
|
||||
</sql>
|
||||
|
||||
<select id="findDjPzReport" parameterType="com.nis.domain.restful.DjPzReport"
|
||||
resultMap="DjPzReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,CSUM,REPORT_TIME,SERVICE,CFG_ID
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 1 THEN SUM ELSE 0 END) CSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.CFG_ID,
|
||||
PZ.SERVICE
|
||||
FROM DJ_PZ_REPORT PZ
|
||||
GROUP BY PZ.CFG_ID,
|
||||
PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DJ_PZ_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchCfgId != null and searchCfgId !=''">
|
||||
AND CFG_ID =#{searchCfgId}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="findDjPzPrivPage" parameterType="com.nis.domain.restful.DjPzReport"
|
||||
resultMap="DjPzReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,REPORT_TIME,SERVICE,CFG_ID
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.CFG_ID,
|
||||
PZ.SERVICE
|
||||
FROM DJ_PZ_REPORT PZ
|
||||
GROUP BY
|
||||
PZ.CFG_ID, PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DJ_PZ_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchCfgId != null and searchCfgId !=''">
|
||||
AND CFG_ID =#{searchCfgId}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="findDjPzReportStat" parameterType="com.nis.domain.restful.DjPzReportStat"
|
||||
resultMap="DjPzReportStatMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
CFG_ID,SERVICE,SUM
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (
|
||||
<choose>
|
||||
<when test="searchStatActiveSys == 6 ">
|
||||
SELECT CFG_ID,SERVICE, DECODE(ASUM,0,BSUM,ASUM) SUM FROM (
|
||||
SELECT
|
||||
config_id CFG_ID, SERVICE,
|
||||
SUM(CASE WHEN ACTIVE_SYS=4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN ACTIVE_SYS=2 THEN SUM ELSE 0 END) BSUM
|
||||
FROM dj_stat_log_hour
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND stat_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND stat_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null ">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY config_id,SERVICE
|
||||
) REPORT
|
||||
</when>
|
||||
<otherwise>
|
||||
SELECT
|
||||
config_id CFG_ID,SERVICE,SUM(sum) SUM
|
||||
FROM dj_stat_log_hour
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND stat_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND stat_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null ">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
AND active_sys=#{searchStatActiveSys}
|
||||
</where>
|
||||
GROUP BY config_id,SERVICE
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="findDjPzReportStatMinutes" parameterType="com.nis.domain.restful.DjPzReportStat"
|
||||
resultMap="DjPzReportStatMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
CFG_ID,SERVICE,SUM
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (
|
||||
<choose>
|
||||
<when test="searchStatActiveSys == 6 ">
|
||||
SELECT CFG_ID,SERVICE, DECODE(ASUM,0,BSUM,ASUM) SUM FROM (
|
||||
SELECT
|
||||
CFG_ID, SERVICE,
|
||||
SUM(CASE WHEN ACTIVE_SYS=4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN ACTIVE_SYS=2 THEN SUM ELSE 0 END) BSUM
|
||||
FROM DJ_PZ_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null ">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY CFG_ID,SERVICE
|
||||
) REPORT
|
||||
</when>
|
||||
<otherwise>
|
||||
SELECT
|
||||
CFG_ID,SERVICE,SUM(sum) SUM
|
||||
FROM DJ_PZ_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null ">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
AND active_sys=#{searchStatActiveSys}
|
||||
</where>
|
||||
GROUP BY CFG_ID,SERVICE
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="findDjPzReportSum" parameterType="com.nis.domain.restful.DjPzReportStat"
|
||||
resultType="java.lang.Long">
|
||||
SELECT
|
||||
SUM(sum) SUM
|
||||
FROM DJ_PZ_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null ">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
AND active_sys=#{searchStatActiveSys}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="DjAttrTypeReportMap" type="com.nis.domain.restful.DjAttrTypeReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="ABSUM" jdbcType="BIGINT" property="absum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="ATTR_TYPE" jdbcType="INTEGER" property="attrType" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
|
||||
<select id="findAttrTypeReport" parameterType="com.nis.domain.restful.DjAttrTypeReport"
|
||||
resultMap="DjAttrTypeReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,absum,REPORT_TIME,ATTR_TYPE,SERVICE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (
|
||||
SELECT attr_type,REPORT_TIME, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select attr_type, asum, bsum, absum, REPORT_TIME,service
|
||||
from (select attr_type,
|
||||
REPORT_TIME,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.REPORT_TIME,
|
||||
pz.cfg_id,
|
||||
pz.attr_type,pz.service
|
||||
FROM dj_pz_attr_report PZ
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
AND ATTR_TYPE =#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.cfg_id, pz.attr_type, PZ.REPORT_TIME,pz.service)) a)
|
||||
group by attr_type, REPORT_TIME,service
|
||||
) DJ_CFG_ATTR_STAT_LOG_HOUR
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DjSrcIpDomeSticReportMap" type="com.nis.domain.restful.DjSrcIpDomeSticReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="srcCity" />
|
||||
</resultMap>
|
||||
|
||||
<select id="findSrcIpDomeSticReport" parameterType="com.nis.domain.restful.DjSrcIpDomeSticReport"
|
||||
resultMap="DjSrcIpDomeSticReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,REPORT_TIME,SERVICE,SRC_PROVINCE,SRC_CITY
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE,
|
||||
pz.SRC_PROVINCE,pz.SRC_CITY
|
||||
FROM
|
||||
DJ_SRCIP_DOMESTIC_REPORT PZ
|
||||
GROUP BY PZ.SRC_PROVINCE,pz.SRC_CITY,
|
||||
PZ.SERVICE, PZ.REPORT_TIME
|
||||
) DJ_SRCIP_DOMESTIC_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchSrcProvince != null and searchSrcProvince !=''">
|
||||
AND SRC_PROVINCE =#{searchSrcProvince}
|
||||
</if>
|
||||
<if test="searchSrcCity != null and searchSrcCity !=''">
|
||||
AND SRC_CITY =#{searchSrcCity}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="DjDestIpCountryReportMap" type="com.nis.domain.restful.DjDestIpCountryReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="destCountry" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<select id="findDestIpCountryReport" parameterType="com.nis.domain.restful.DjDestIpCountryReport"
|
||||
resultMap="DjDestIpCountryReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,REPORT_TIME,DEST_COUNTRY,SERVICE
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.SERVICE,
|
||||
pz.DEST_COUNTRY
|
||||
FROM DJ_DESTIP_COUNTRY_REPORT
|
||||
PZ
|
||||
GROUP BY PZ.DEST_COUNTRY, PZ.SERVICE, PZ.REPORT_TIME
|
||||
)
|
||||
DJ_DESTIP_COUNTRY_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchDestCountry != null and searchDestCountry !=''">
|
||||
AND DEST_COUNTRY =#{searchDestCountry}
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND SERVICE =#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<resultMap id="DjLwhhReportMap" type="com.nis.domain.restful.DjLwhhReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="lwhh" jdbcType="INTEGER" property="lwhh" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<select id="findDjLwhhReport" parameterType="com.nis.domain.restful.DjLwhhReport"
|
||||
resultMap="DjLwhhReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,REPORT_TIME,SERVICE,LWHH
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME,
|
||||
PZ.lwhh,pz.service
|
||||
FROM DJ_LWHH_REPORT PZ
|
||||
GROUP BY
|
||||
PZ.lwhh,pz.service, PZ.REPORT_TIME
|
||||
)
|
||||
DJ_LWHH_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND service=#{searchService}
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
AND lwhh=#{searchLwhh}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<!-- DjTagReport日志查询 -->
|
||||
<resultMap id="DjTagReportMap" type="com.nis.domain.restful.DjTagReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="ABSUM" jdbcType="BIGINT" property="absum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="TAG" jdbcType="INTEGER" property="tag" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<sql id="djTagReportPorperty">
|
||||
,tag
|
||||
</sql>
|
||||
<select id="findDjTagReportPage" parameterType="com.nis.domain.restful.DjTagReport"
|
||||
resultMap="DjTagReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,absum,REPORT_TIME,SERVICE,TAG
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM (
|
||||
SELECT tag,REPORT_TIME, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select tag, asum, bsum, absum, REPORT_TIME,service
|
||||
from (select tag,
|
||||
REPORT_TIME,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.REPORT_TIME,
|
||||
pz.cfg_id,
|
||||
pz.tag,pz.service
|
||||
FROM dj_pz_tag_report PZ
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
AND tag in(${searchTag})
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.cfg_id, pz.tag, PZ.REPORT_TIME,pz.service)) a)
|
||||
group by tag, REPORT_TIME,service
|
||||
|
||||
)
|
||||
DJ_CFG_TAG_STAT_LOG_HOUR
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<resultMap id="DjEntranceReportMap" type="com.nis.domain.restful.DjEntranceReport">
|
||||
<result column="ASUM" jdbcType="BIGINT" property="asum" />
|
||||
<result column="BSUM" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="REPORT_TIME" jdbcType="TIMESTAMP" property="reportTime" />
|
||||
<result column="ENTRANCE_ID" jdbcType="INTEGER" property="entraceId" />
|
||||
<result column="SERVICE" jdbcType="INTEGER" property="service" />
|
||||
</resultMap>
|
||||
<select id="findDjEntranceReport" parameterType="com.nis.domain.restful.DjEntranceReport"
|
||||
resultMap="DjEntranceReportMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
ASUM,BSUM,REPORT_TIME,SERVICE,ENTRANCE_ID
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM ( SELECT
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 4 THEN SUM ELSE 0 END) ASUM,
|
||||
SUM(CASE WHEN PZ.ACTIVE_SYS = 2 THEN SUM ELSE 0 END) BSUM,
|
||||
PZ.REPORT_TIME REPORT_TIME,
|
||||
PZ.ENTRANCE_ID ENTRANCE_ID,
|
||||
pz.service
|
||||
FROM DJ_ENTRANCE_REPORT PZ
|
||||
GROUP BY
|
||||
PZ.REPORT_TIME,pz.service, PZ.ENTRANCE_ID
|
||||
)
|
||||
DJ_ENTRANCE_REPORT
|
||||
<where>
|
||||
<if test="searchReportStartTime != null and searchReportStartTime !=''">
|
||||
<![CDATA[AND REPORT_TIME >= to_date(#{searchReportStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchReportEndTime != null and searchReportEndTime !=''">
|
||||
<![CDATA[AND REPORT_TIME < to_date(#{searchReportEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
AND service=#{searchService}
|
||||
</if>
|
||||
<if test="searchEntraceId != null and searchEntraceId !=''">
|
||||
AND ENTRANCE_ID=#{searchEntraceId}
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,54 +0,0 @@
|
||||
/**
|
||||
* @Title: DjStatLogDao.java
|
||||
* @Package com.nis.web.dao
|
||||
* @Description: TODO(用一句话描述该文件做什么)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 上午11:21:31
|
||||
* @version V1.0
|
||||
*/
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.nis.domain.restful.DjAttrStatLogDaily;
|
||||
import com.nis.domain.restful.DjAttrStatLogMonth;
|
||||
import com.nis.domain.restful.DjDestIpCounrtyStatLogDaily;
|
||||
import com.nis.domain.restful.DjDestIpCounrtyStatLogMonth;
|
||||
import com.nis.domain.restful.DjEntrStatLogDaily;
|
||||
import com.nis.domain.restful.DjEntrStatLogMonth;
|
||||
import com.nis.domain.restful.DjLwhhStatLogDaily;
|
||||
import com.nis.domain.restful.DjLwhhStatLogMonth;
|
||||
import com.nis.domain.restful.DjSrcIpDomesticStatLogDaily;
|
||||
import com.nis.domain.restful.DjSrcIpDomesticStatLogMonth;
|
||||
import com.nis.domain.restful.DjStatLogDaily;
|
||||
import com.nis.domain.restful.DjStatLogMonth;
|
||||
import com.nis.domain.restful.DjTagStatLogDaily;
|
||||
import com.nis.domain.restful.DjTagStatLogMonth;
|
||||
|
||||
/**
|
||||
* @ClassName: DjStatLogDao
|
||||
* @Description: TODO(这里用一句话描述这个类的作用)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 上午11:21:31
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface DjStatLogDao extends CrudDao<LogEntity> {
|
||||
|
||||
List<DjStatLogDaily> djStatLogDaily(DjStatLogDaily daily);
|
||||
List<DjStatLogMonth> djStatLogMonth(DjStatLogMonth mongth);
|
||||
List<DjTagStatLogDaily> djTagStatLogDaily(DjTagStatLogDaily daily);
|
||||
List<DjTagStatLogMonth> djTagStatLogMonth(DjTagStatLogMonth mongth);
|
||||
List<DjAttrStatLogDaily> djAttrStatLogDaily(DjAttrStatLogDaily daily);
|
||||
List<DjAttrStatLogMonth> djAttrStatLogMonth(DjAttrStatLogMonth mongth);
|
||||
List<DjEntrStatLogDaily> djEntrStatLogDaily(DjEntrStatLogDaily daily);
|
||||
List<DjEntrStatLogMonth> djEntrStatLogMonth(DjEntrStatLogMonth mongth);
|
||||
List<DjLwhhStatLogDaily> djLwhhStatLogDaily(DjLwhhStatLogDaily daily);
|
||||
List<DjLwhhStatLogMonth> djLwhhStatLogMonth(DjLwhhStatLogMonth mongth);
|
||||
List<DjSrcIpDomesticStatLogDaily> djSrcIpDomesticStatLogDaily(DjSrcIpDomesticStatLogDaily daily);
|
||||
List<DjSrcIpDomesticStatLogMonth> djSrcIpDomesticStatLogMonth(DjSrcIpDomesticStatLogMonth mongth);
|
||||
List<DjDestIpCounrtyStatLogDaily> djDestIpCounrtyStatLogDaily(DjDestIpCounrtyStatLogDaily daily);
|
||||
List<DjDestIpCounrtyStatLogMonth> djDestIpCounrtyStatLogMonth(DjDestIpCounrtyStatLogMonth mongth);
|
||||
|
||||
}
|
||||
@@ -1,858 +0,0 @@
|
||||
<?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.DjStatLogDao">
|
||||
<!-- 配置报表的公共属性 -->
|
||||
<sql id="commonPorperty">
|
||||
CONFIG_ID,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
|
||||
<resultMap id="DjStatLogDailyMap" type="com.nis.domain.restful.DjStatLogDaily">
|
||||
<result column="config_id" jdbcType="BIGINT" property="configId" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_StatLog_Daily日志查询 -->
|
||||
<select id="djStatLogDaily" parameterType="com.nis.domain.restful.DjStatLogDaily" resultMap="DjStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select config_id,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select config_id,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchConfigId != null and searchConfigId !=''">
|
||||
and config_id=#{searchConfigId}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by config_id,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY config_id,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DjStatLogMonthMap" type="com.nis.domain.restful.DjStatLogMonth">
|
||||
<result column="config_id" jdbcType="BIGINT" property="configId" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_Stat_Log_Month日志查询 -->
|
||||
<select id="djStatLogMonth" parameterType="com.nis.domain.restful.DjStatLogMonth" resultMap="DjStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="commonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select config_id,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select config_id,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_STAT_LOG_MONTH
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchConfigId != null and searchConfigId !=''">
|
||||
and config_id=#{searchConfigId}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by config_id,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY config_id,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<!-- 标签报表的公共属性 -->
|
||||
<sql id="tagCommonPorperty">
|
||||
TAG,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
<resultMap id="DjTagStatLogDailyMap" type="com.nis.domain.restful.DjTagStatLogDaily">
|
||||
<result column="tag" jdbcType="INTEGER" property="tag" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_TAG_Stat_Log_Daily日志查询 -->
|
||||
<select id="djTagStatLogDaily" parameterType="com.nis.domain.restful.DjTagStatLogDaily" resultMap="DjTagStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="tagCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
SELECT tag,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select tag, asum, bsum, absum, stat_time,service
|
||||
from (select tag,
|
||||
stat_time,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.stat_time,
|
||||
pz.config_id,
|
||||
pz.tag,pz.service
|
||||
FROM dj_cfg_tag_stat_log_daily PZ
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
and tag=#{searchTag}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.config_id, pz.tag, PZ.stat_time,pz.service)) a)
|
||||
group by tag, stat_time,service
|
||||
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DjTagStatLogMonthMap" type="com.nis.domain.restful.DjTagStatLogMonth">
|
||||
<result column="tag" jdbcType="INTEGER" property="tag" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_Tag_Stat_Log_Month日志查询 -->
|
||||
<select id="djTagStatLogMonth" parameterType="com.nis.domain.restful.DjTagStatLogMonth" resultMap="DjTagStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="tagCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
SELECT tag,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select tag, asum, bsum, absum, stat_time,service
|
||||
from (select tag,
|
||||
stat_time,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.stat_time,
|
||||
pz.config_id,
|
||||
pz.tag,pz.service
|
||||
FROM dj_cfg_tag_stat_log_month PZ
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchTag != null and searchTag !=''">
|
||||
and tag=#{searchTag}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.config_id, pz.tag, PZ.stat_time,pz.service)) a)
|
||||
group by tag, stat_time,service
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 性质报表的公共属性 -->
|
||||
<sql id="attrCommonPorperty">
|
||||
attr_type,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
<resultMap id="DjAttrStatLogDailyMap" type="com.nis.domain.restful.DjAttrStatLogDaily">
|
||||
<result column="attr_type" jdbcType="INTEGER" property="attrType" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_ATTR_Stat_Log_Daily日志查询 -->
|
||||
<select id="djAttrStatLogDaily" parameterType="com.nis.domain.restful.DjAttrStatLogDaily" resultMap="DjAttrStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="attrCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
|
||||
SELECT attr_type,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select attr_type, asum, bsum, absum, stat_time,service
|
||||
from (select attr_type,
|
||||
stat_time,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.stat_time,
|
||||
pz.config_id,
|
||||
pz.attr_type,pz.service
|
||||
FROM dj_cfg_attr_stat_log_daily PZ
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
and attr_type=#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.config_id, pz.attr_type, PZ.stat_time,pz.service)) a)
|
||||
group by attr_type, stat_time,service
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DjAttrStatLogMonthMap" type="com.nis.domain.restful.DjAttrStatLogMonth">
|
||||
<result column="attr_type" jdbcType="INTEGER" property="attrType" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_Attr_Stat_Log_Month日志查询 -->
|
||||
<select id="djAttrStatLogMonth" parameterType="com.nis.domain.restful.DjAttrStatLogMonth" resultMap="DjAttrStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="attrCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
SELECT attr_type,'7' as active_sys,stat_time, sum(asum) asum, sum(bsum) bsum, SUM(absum) absum,service
|
||||
FROM (select attr_type, asum, bsum, absum, stat_time,service
|
||||
from (select attr_type,
|
||||
stat_time,service,
|
||||
asum,
|
||||
bsum,
|
||||
decode(asum, 0, bsum, asum) absum
|
||||
from (SELECT SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 4 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) ASUM,
|
||||
SUM(CASE
|
||||
WHEN PZ.ACTIVE_SYS = 2 THEN
|
||||
SUM
|
||||
ELSE
|
||||
0
|
||||
END) BSUM,
|
||||
|
||||
PZ.stat_time,
|
||||
pz.config_id,
|
||||
pz.attr_type,pz.service
|
||||
FROM dj_cfg_attr_stat_log_month PZ
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchAttrType != null and searchAttrType !=''">
|
||||
and attr_type=#{searchAttrType}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pz.config_id, pz.attr_type, PZ.stat_time,pz.service)) a)
|
||||
group by attr_type, stat_time,service
|
||||
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 局点报表的公共属性 -->
|
||||
<sql id="entrCommonPorperty">
|
||||
ENTRANCE_ID,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
<resultMap id="DjEntrStatLogDailyMap" type="com.nis.domain.restful.DjEntrStatLogDaily">
|
||||
<result column="ENTRANCE_ID" jdbcType="INTEGER" property="entranceId" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_ATTR_Stat_Log_Daily日志查询 -->
|
||||
<select id="djEntrStatLogDaily" parameterType="com.nis.domain.restful.DjEntrStatLogDaily" resultMap="DjEntrStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="entrCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select ENTRANCE_ID,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select ENTRANCE_ID,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_entr_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchEntranceId != null and searchEntranceId !=''">
|
||||
and ENTRANCE_ID=#{searchEntranceId}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by ENTRANCE_ID,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY ENTRANCE_ID,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<resultMap id="DjEntrStatLogMonthMap" type="com.nis.domain.restful.DjEntrStatLogMonth">
|
||||
<result column="ENTRANCE_ID" jdbcType="INTEGER" property="entranceId" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_Entr_Stat_Log_Month日志查询 -->
|
||||
<select id="djEntrStatLogMonth" parameterType="com.nis.domain.restful.DjEntrStatLogMonth" resultMap="DjEntrStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="entrCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select ENTRANCE_ID,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select ENTRANCE_ID,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_entr_STAT_LOG_MONTH
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchEntranceId != null and searchEntranceId !=''">
|
||||
and ENTRANCE_ID=#{searchEntranceId}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by ENTRANCE_ID,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY ENTRANCE_ID,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 来问函号报表的公共属性 -->
|
||||
<sql id="lwhhCommonPorperty">
|
||||
lwhh,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
<resultMap id="DjLwhhStatLogDailyMap" type="com.nis.domain.restful.DjLwhhStatLogDaily">
|
||||
<result column="lwhh" jdbcType="INTEGER" property="lwhh" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_ATTR_Stat_Log_Daily日志查询 -->
|
||||
<select id="djLwhhStatLogDaily" parameterType="com.nis.domain.restful.DjLwhhStatLogDaily" resultMap="DjLwhhStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="lwhhCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select lwhh,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select lwhh,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_lwhh_STAT_LOG_DAILY
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
and lwhh=#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by lwhh,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY lwhh,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
<resultMap id="DjLwhhStatLogMonthMap" type="com.nis.domain.restful.DjLwhhStatLogMonth">
|
||||
<result column="lwhh" jdbcType="INTEGER" property="lwhh" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_Lwhh_Stat_Log_Month日志查询 -->
|
||||
<select id="djLwhhStatLogMonth" parameterType="com.nis.domain.restful.DjLwhhStatLogMonth" resultMap="DjLwhhStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="lwhhCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select lwhh,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select lwhh,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from DJ_lwhh_STAT_LOG_MONTH
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchLwhh != null and searchLwhh !=''">
|
||||
and lwhh=#{searchLwhh}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by lwhh,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY lwhh,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
<!-- 境内源ip报表的公共属性 -->
|
||||
<sql id="srcIpCommonPorperty">
|
||||
SRC_PROVINCE,SRC_CITY,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
<resultMap id="DjSrcIpDomesticStatLogDailyMap" type="com.nis.domain.restful.DjSrcIpDomesticStatLogDaily">
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="srcCity" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_SrcIp_Stat_Log_Daily日志查询 -->
|
||||
<select id="djSrcIpDomesticStatLogDaily" parameterType="com.nis.domain.restful.DjSrcIpDomesticStatLogDaily" resultMap="DjSrcIpDomesticStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="srcIpCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select SRC_PROVINCE,SRC_CITY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select SRC_PROVINCE,SRC_CITY,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from dj_SRCIP_stat_log_daily
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by SRC_PROVINCE,SRC_CITY,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY SRC_PROVINCE,SRC_CITY,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
<resultMap id="DjSrcIpDomesticStatLogMonthMap" type="com.nis.domain.restful.DjSrcIpDomesticStatLogMonth">
|
||||
<result column="SRC_PROVINCE" jdbcType="VARCHAR" property="srcProvince" />
|
||||
<result column="SRC_CITY" jdbcType="VARCHAR" property="srcCity" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_SrcIpDomestic_Stat_Log_Month日志查询 -->
|
||||
<select id="djSrcIpDomesticStatLogMonth" parameterType="com.nis.domain.restful.DjSrcIpDomesticStatLogMonth" resultMap="DjSrcIpDomesticStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="srcIpCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select SRC_PROVINCE,SRC_CITY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select SRC_PROVINCE,SRC_CITY,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from dj_SRCIP_stat_log_month
|
||||
<where>
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by SRC_PROVINCE,SRC_CITY,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY SRC_PROVINCE,SRC_CITY,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<!-- 国家目的ip报表的公共属性 -->
|
||||
<sql id="destIpCommonPorperty">
|
||||
DEST_COUNTRY,ACTIVE_SYS,SERVICE,ASUM,BSUM,ABSUM,STAT_TIME
|
||||
</sql>
|
||||
<resultMap id="DjDestIpCounrtyStatLogDailyMap" type="com.nis.domain.restful.DjDestIpCounrtyStatLogDaily">
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="destCountry" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_DestIp_Stat_Log_Daily日志查询 -->
|
||||
<select id="djDestIpCounrtyStatLogDaily" parameterType="com.nis.domain.restful.DjDestIpCounrtyStatLogDaily" resultMap="DjDestIpCounrtyStatLogDailyMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="destIpCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select DEST_COUNTRY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select DEST_COUNTRY,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from dj_DESTIP_stat_log_daily
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by DEST_COUNTRY,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY DEST_COUNTRY,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
<resultMap id="DjDestIpCounrtyStatLogMonthMap" type="com.nis.domain.restful.DjDestIpCounrtyStatLogMonth">
|
||||
<result column="DEST_COUNTRY" jdbcType="VARCHAR" property="destCountry" />
|
||||
<result column="active_sys" jdbcType="INTEGER" property="activeSys" />
|
||||
<result column="service" jdbcType="INTEGER" property="service" />
|
||||
<result column="asum" jdbcType="BIGINT" property="asum" />
|
||||
<result column="bsum" jdbcType="BIGINT" property="bsum" />
|
||||
<result column="absum" jdbcType="BIGINT" property="absum" />
|
||||
<result column="stat_time" jdbcType="DATE" property="statTime" />
|
||||
</resultMap>
|
||||
<!-- Dj_DestIp_Stat_Log_Month日志查询 -->
|
||||
<select id="djDestIpCounrtyStatLogMonth" parameterType="com.nis.domain.restful.DjDestIpCounrtyStatLogMonth" resultMap="DjDestIpCounrtyStatLogMonthMap">
|
||||
SELECT
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="destIpCommonPorperty"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM
|
||||
(
|
||||
select DEST_COUNTRY,active_sys,service,stat_time,asum,bsum,decode(asum,0,bsum,asum) as absum
|
||||
from (select DEST_COUNTRY,'7' as active_sys,service,stat_time
|
||||
,sum(case when active_sys=4 then sum else 0 end) asum
|
||||
,sum(case when active_sys=2 then sum else 0 end) bsum
|
||||
from dj_DESTIP_stat_log_Month
|
||||
<where>
|
||||
|
||||
<if test="searchService != null and searchService !=''">
|
||||
and service=#{searchService}
|
||||
</if>
|
||||
<if test="searchStatStartTime != null and searchStatStartTime !=''">
|
||||
<![CDATA[AND stat_time >= to_date(#{searchStatStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
<if test="searchStatEndTime != null and searchStatEndTime !=''">
|
||||
<![CDATA[AND stat_time < to_date(#{searchStatEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
group by DEST_COUNTRY,service,stat_time
|
||||
|
||||
) A
|
||||
GROUP BY DEST_COUNTRY,active_sys ,service,stat_time,asum,bsum
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.nis.web.dao.jk;
|
||||
|
||||
import com.nis.domain.restful.jk.JkDmbCk;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
/**
|
||||
*
|
||||
* @ClassName: DmbCkDao.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2016年9月9日 上午10:03:33
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface JkDmbCkDao extends CrudDao<JkDmbCk>{
|
||||
int delete(long id);
|
||||
int insert(JkDmbCk record);
|
||||
int update(JkDmbCk record);
|
||||
int updateValid(JkDmbCk record);
|
||||
}
|
||||
@@ -1,237 +0,0 @@
|
||||
<?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.jk.JkDmbCkDao">
|
||||
<resultMap id="BaseResultMap" type="com.nis.domain.restful.jk.JkDmbCk">
|
||||
<id column="G_ID" jdbcType="BIGINT" property="gId" />
|
||||
<result column="GJ_CK_ID" jdbcType="BIGINT" property="gjCkId" />
|
||||
<result column="SF_SX" jdbcType="BIGINT" property="sfSx" />
|
||||
<result column="SX_FW" jdbcType="VARCHAR" property="sxFw" />
|
||||
<result column="CK_MC" jdbcType="VARCHAR" property="ckMc" />
|
||||
<result column="CK_WZ" jdbcType="VARCHAR" property="ckWz" />
|
||||
<!--
|
||||
<result column="CK_TXFF" jdbcType="VARCHAR" property="ckTxff" />
|
||||
<result column="CK_BZ" jdbcType="VARCHAR" property="ckBz" />
|
||||
<result column="YL" jdbcType="BIGINT" property="yl" />
|
||||
<result column="YL1" jdbcType="BIGINT" property="yl1" />
|
||||
<result column="YL2" jdbcType="VARCHAR" property="yl2" />
|
||||
<result column="YL3" jdbcType="VARCHAR" property="yl3" />
|
||||
<result column="YL4" jdbcType="VARCHAR" property="yl4" />
|
||||
<result column="YL5" jdbcType="VARCHAR" property="yl5" />
|
||||
<result column="CK_NO" jdbcType="BIGINT" property="ckNo" /> -->
|
||||
<result column="CK_NO_RAW" jdbcType="VARCHAR" property="ckNoRaw" />
|
||||
<result column="ISP" jdbcType="BIGINT" property="isp" />
|
||||
<result column="DD" jdbcType="BIGINT" property="dd" />
|
||||
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
G_ID, GJ_CK_ID,SF_SX,SX_FW,CK_MC,CK_WZ,<!-- CK_TXFF,CK_BZ,YL,YL1,YL2,YL3,YL4,YL5,CK_NO, -->CK_NO_RAW,ISP,DD
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from DMB_CK
|
||||
where GJ_CK_ID = #{gjCkId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="delete" parameterType="java.lang.Long">
|
||||
delete from DMB_CK
|
||||
where GJ_CK_ID = #{gjCkId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<!--
|
||||
<insert id="insert" parameterType="com.nis.domain.restful.jk.JkDmbCk">
|
||||
insert into DMB_CK (GJ_CK_ID,SF_SX,SX_FW,CK_MC,CK_WZ,CK_TXFF,CK_BZ,YL,YL1,YL2,YL3,YL4,YL5,CK_NO,CK_NO_RAW,ISP,DD
|
||||
)
|
||||
values (
|
||||
#{gjCkId,jdbcType=BIGINT},
|
||||
#{sfSx,jdbcType=BIGINT},
|
||||
#{sxFw,jdbcType=VARCHAR},
|
||||
#{ckMc,jdbcType=VARCHAR},
|
||||
#{ckWz,jdbcType=BIGINT},
|
||||
#{ckTxff,jdbcType=VARCHAR},
|
||||
#{ckBz,jdbcType=VARCHAR},
|
||||
#{yl,jdbcType=BIGINT},
|
||||
#{yl1,jdbcType=BIGINT},
|
||||
#{yl2,jdbcType=VARCHAR},
|
||||
#{yl3,jdbcType=VARCHAR},
|
||||
#{yl4,jdbcType=VARCHAR},
|
||||
#{yl5,jdbcType=VARCHAR},
|
||||
#{ckNo,jdbcType=BIGINT},
|
||||
#{ckNoRaw,jdbcType=VARCHAR},
|
||||
#{isp,jdbcType=BIGINT},
|
||||
#{dd,jdbcType=BIGINT}
|
||||
)
|
||||
</insert>
|
||||
-->
|
||||
<insert id="insert" parameterType="com.nis.domain.restful.jk.JkDmbCk" keyProperty="gjCkId">
|
||||
insert into DMB_CK
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="gjCkId != null">
|
||||
GJ_CK_ID ,
|
||||
</if>
|
||||
<if test="sfSx != null">
|
||||
SF_SX ,
|
||||
</if>
|
||||
<if test="sxFw != null">
|
||||
SX_FW ,
|
||||
</if>
|
||||
<if test="ckMc != null">
|
||||
CK_MC ,
|
||||
</if>
|
||||
<if test="ckWz != null">
|
||||
CK_WZ ,
|
||||
</if>
|
||||
<!--
|
||||
<if test="ckTxff != null">
|
||||
CK_TXFF ,
|
||||
</if>
|
||||
<if test="ckBz != null">
|
||||
CK_BZ ,
|
||||
</if>
|
||||
<if test="yl != null">
|
||||
YL ,
|
||||
</if>
|
||||
<if test="yl1 != null">
|
||||
YL1,
|
||||
</if>
|
||||
<if test="yl2 != null">
|
||||
YL2,
|
||||
</if>
|
||||
<if test="yl3 != null">
|
||||
YL3,
|
||||
</if>
|
||||
<if test="yl4 != null">
|
||||
YL4,
|
||||
</if>
|
||||
<if test="yl5 != null">
|
||||
YL5,
|
||||
</if>
|
||||
<if test="ckNo != null">
|
||||
CK_NO ,
|
||||
</if>
|
||||
-->
|
||||
<if test="ckNoRaw != null">
|
||||
CK_NO_RAW ,
|
||||
</if>
|
||||
<if test="isp != null">
|
||||
ISP,
|
||||
</if>
|
||||
<if test="dd != null">
|
||||
DD,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="gjCkId != null">
|
||||
#{gjCkId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="sfSx != null">
|
||||
#{sfSx,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
||||
<if test="sxFw != null">
|
||||
#{sxFw,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ckMc != null">
|
||||
#{ckMc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ckWz != null">
|
||||
#{ckWz,jdbcType=BIGINT},
|
||||
</if>
|
||||
<!--
|
||||
<if test="ckTxff != null">
|
||||
#{ckTxff,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ckBz != null">
|
||||
#{ckBz,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yl != null">
|
||||
#{yl,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="yl1 != null">
|
||||
#{yl1,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="yl2 != null">
|
||||
#{yl2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yl3 != null">
|
||||
#{yl3,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yl4 != null">
|
||||
#{yl4,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yl5 != null">
|
||||
#{yl5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ckNo != null">
|
||||
#{ckNo,jdbcType=BIGINT},
|
||||
</if>
|
||||
-->
|
||||
<if test="ckNoRaw != null">
|
||||
#{ckNoRaw,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isp != null">
|
||||
#{isp,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="dd != null">
|
||||
#{dd,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="update" parameterType="com.nis.domain.restful.jk.JkDmbCk">
|
||||
update DMB_CK set SF_SX = #{sfSx,jdbcType=BIGINT} where GJ_CK_ID = #{gjCkId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<!--
|
||||
<update id="update" parameterType="com.nis.domain.restful.jk.JkDmbCk">
|
||||
update DMB_CK
|
||||
<set>
|
||||
<if test="sfSx != null">
|
||||
SF_SX = #{sfSx,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="sxFw != null">
|
||||
SX_FW = #{sxFw,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ckMc != null">
|
||||
CK_MC = #{ckMc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ckWz != null">
|
||||
CK_WZ = #{ckWz,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="ckTxff != null">
|
||||
CK_TXFF = #{ckTxff,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ckBz != null">
|
||||
CK_BZ = #{ckBz,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yl != null">
|
||||
YL = #{yl,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="yl1 != null">
|
||||
YL1 = #{yl1,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="yl2 != null">
|
||||
YL2 = #{yl2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yl3 != null">
|
||||
YL3 = #{yl3,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yl4 != null">
|
||||
YL4 = #{yl4,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yl5 != null">
|
||||
YL5 = #{yl5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ckNo != null">
|
||||
CK_NO = #{ckNo,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="ckNoRaw != null">
|
||||
CK_NO_RAW = #{ckNoRaw,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isp != null">
|
||||
ISP =#{isp,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="dd != null">
|
||||
DD = #{dd,jdbcType=BIGINT}
|
||||
</if>
|
||||
</set>
|
||||
where GJ_CK_ID = #{gjCkId,jdbcType=BIGINT}
|
||||
</update>
|
||||
-->
|
||||
</mapper>
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.nis.web.dao.jk;
|
||||
|
||||
import com.nis.domain.restful.jk.JkFdZb;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
/**
|
||||
*
|
||||
* @ClassName: JkFdZbDao.java
|
||||
* @Description: TODO
|
||||
* @author (ddm)
|
||||
* @date 2016年10月19日 下午19:03:33
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface JkFdZbDao extends CrudDao<JkFdZb>{
|
||||
int delete(long id);
|
||||
int insert(JkFdZb record);
|
||||
int update(JkFdZb record);
|
||||
}
|
||||
@@ -1,191 +0,0 @@
|
||||
<?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.jk.JkFdZbDao">
|
||||
<resultMap id="JkFdZbMap" type="com.nis.domain.restful.jk.JkFdZb">
|
||||
<result column="g_Id" jdbcType="BIGINT" property="gId" />
|
||||
<result column="zb_Id" jdbcType="BIGINT" property="zbId" />
|
||||
<result column="fd_Fs" jdbcType="BIGINT" property="fdFs" />
|
||||
<result column="sf_Fd" jdbcType="BIGINT" property="sfFd" />
|
||||
<result column="jk_Ip" jdbcType="VARCHAR" property="jkIp" />
|
||||
<result column="jk_Ym" jdbcType="BIGINT" property="jkYm" />
|
||||
<result column="isp_Raw" jdbcType="VARCHAR" property="ispRaw" />
|
||||
<result column="LAST_UPDATE" jdbcType="TIMESTAMP" property="lastUpdate" />
|
||||
<result column="sx_Fw" jdbcType="VARCHAR" property="sxFw" />
|
||||
<!-- <result column="addr_type" jdbcType="INTEGER" property="addrType" /> -->
|
||||
<!--
|
||||
<result column="jk_Wz_Mc" jdbcType="VARCHAR" property="jkWzMc" />
|
||||
<result column="jk_Dns" jdbcType="VARCHAR" property="jkDns" />
|
||||
<result column="jk_Fl" jdbcType="BIGINT" property="jkFl" />
|
||||
<result column="jk_Xz" jdbcType="BIGINT" property="jkXz" />
|
||||
<result column="jk_yy" jdbcType="BIGINT" property="jkYy" />
|
||||
<result column="jk_Tzdw" jdbcType="VARCHAR" property="jkTzdw" />
|
||||
<result column="lwhh" jdbcType="VARCHAR" property="lwhh" />
|
||||
<result column="czy_Id" jdbcType="BIGINT" property="czyId" />
|
||||
<result column="jk_Sj1" jdbcType="TIMESTAMP" property="jkSj1" />
|
||||
<result column="jk_Shy" jdbcType="BIGINT" property="jkShy" />
|
||||
<result column="jk_Sj2" jdbcType="TIMESTAMP" property="jkSj2" />
|
||||
<result column="spd" jdbcType="VARCHAR" property="spd" />
|
||||
<result column="kgczyid" jdbcType="BIGINT" property="kgczyid" />
|
||||
<result column="kgczysj" jdbcType="TIMESTAMP" property="kgczysj" />
|
||||
<result column="groupid" jdbcType="BIGINT" property="groupid" />
|
||||
<result column="rw" jdbcType="VARCHAR" property="rw" />
|
||||
<result column="jk_Bz" jdbcType="VARCHAR" property="jkBz" />
|
||||
<result column="yl" jdbcType="VARCHAR" property="yl" />
|
||||
<result column="yhwz_Id" jdbcType="BIGINT" property="yhwzId" />
|
||||
<result column="yxrq" jdbcType="TIMESTAMP" property="yxrq" />
|
||||
<result column="yl1" jdbcType="BIGINT" property="yl1" />
|
||||
<result column="yl2" jdbcType="BIGINT" property="yl2" />
|
||||
<result column="yl3" jdbcType="VARCHAR" property="yl3" />
|
||||
<result column="yl4" jdbcType="VARCHAR" property="yl4" />
|
||||
<result column="yl5" jdbcType="VARCHAR" property="yl5" />
|
||||
<result column="djyid" jdbcType="BIGINT" property="djyid" />
|
||||
<result column="djsj" jdbcType="TIMESTAMP" property="djsj" />
|
||||
<result column="fhyid" jdbcType="BIGINT" property="fhyid" />
|
||||
<result column="fhsj" jdbcType="TIMESTAMP" property="fhsj" />
|
||||
<result column="yhwzysy" jdbcType="BIGINT" property="yhwzysy" />
|
||||
<result column="yhwzyssj" jdbcType="TIMESTAMP" property="yhwzyssj" />
|
||||
<result column="yhwzshy" jdbcType="BIGINT" property="yhwzshy" />
|
||||
<result column="yhwzshsj" jdbcType="TIMESTAMP" property="yhwzshsj" />
|
||||
<result column="ipzy_Ysy" jdbcType="BIGINT" property="ipzyYsy" />
|
||||
<result column="ipzy_Yssj" jdbcType="TIMESTAMP" property="ipzyYssj" />
|
||||
<result column="ipzy_Shy" jdbcType="BIGINT" property="ipzyShy" />
|
||||
<result column="ipzy_Shsj" jdbcType="TIMESTAMP" property="ipzyShsj" />
|
||||
<result column="ip_Num" jdbcType="BIGINT" property="ipNum" />
|
||||
<result column="isp" jdbcType="BIGINT" property="isp" />
|
||||
-->
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
G_ID,ZB_ID,FD_FS,SF_FD,JK_IP,JK_YM,ISP_RAW,LAST_UPDATE,SX_FW<!-- ,ADDR_TYPE --><!-- ,JK_WZ_MC,JK_DNS,
|
||||
JK_FL,JK_XZ,JK_YY,JK_TZDW,LWHH,CZY_ID,JK_SJ1,JK_SHY,JK_SJ2,SPD,KGCZYID,
|
||||
KGCZYSJ,GROUPID,RW,JK_BZ,YL,YHWZ_ID,YXRQ,YL1,YL2,DJYID,DJSJ,FHYID,
|
||||
FHSJ,YHWZYSY,YHWZYSSJ,YHWZSHY,YHWZSHSJ,IPZY_YSY,IPZY_YSSJ,IPZY_SHY,
|
||||
IPZY_SHSJ,IP_NUM,ISP,YL5,YL4,YL3 -->
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="JkFdZbMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from JK_FD_ZB_FULL
|
||||
where ZB_ID = #{zbId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="delete" parameterType="java.lang.Long">
|
||||
delete from JK_FD_ZB_FULL
|
||||
where ZB_ID = #{zbId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.nis.domain.restful.jk.JkFdZb">
|
||||
insert into JK_FD_ZB_FULL (
|
||||
zb_Id
|
||||
,fd_Fs
|
||||
,sf_Fd
|
||||
,jk_Ip
|
||||
,jk_Ym
|
||||
,isp_Raw
|
||||
,LAST_UPDATE
|
||||
,sx_Fw
|
||||
<!-- ,addr_type -->
|
||||
<!--
|
||||
,jk_Wz_Mc
|
||||
,jk_Dns
|
||||
,jk_Fl
|
||||
,jk_Xz
|
||||
,jk_yy
|
||||
,jk_Tzdw
|
||||
,lwhh
|
||||
,czy_Id
|
||||
,jk_Sj1
|
||||
,jk_Shy
|
||||
,jk_Sj2
|
||||
,spd
|
||||
,kgczyid
|
||||
,kgczysj
|
||||
,groupid
|
||||
,rw
|
||||
,jk_Bz
|
||||
,yl
|
||||
,yhwz_Id
|
||||
,yxrq
|
||||
,yl1
|
||||
,yl2
|
||||
,yl3
|
||||
,yl4
|
||||
,yl5
|
||||
,djyid
|
||||
,djsj
|
||||
,fhyid
|
||||
,fhsj
|
||||
,yhwzysy
|
||||
,yhwzyssj
|
||||
,yhwzshy
|
||||
,yhwzshsj
|
||||
,ipzy_Ysy
|
||||
,ipzy_Yssj
|
||||
,ipzy_Shy
|
||||
,ipzy_Shsj
|
||||
,ip_Num
|
||||
,isp -->
|
||||
)
|
||||
values (
|
||||
#{zbId,jdbcType=BIGINT},
|
||||
#{fdFs,jdbcType=BIGINT},
|
||||
#{sfFd,jdbcType=BIGINT},
|
||||
#{jkIp,jdbcType=VARCHAR},
|
||||
#{jkYm,jdbcType=BIGINT},
|
||||
#{ispRaw,jdbcType=VARCHAR},
|
||||
#{lastUpdate,jdbcType=VARCHAR},
|
||||
#{sxFw,jdbcType=VARCHAR}<!-- ,
|
||||
#{addrType,jdbcType=VARCHAR} --><!-- ,
|
||||
#{jkWzMc,jdbcType=VARCHAR},
|
||||
#{jkDns,jdbcType=VARCHAR},
|
||||
#{jkFl,jdbcType=BIGINT},
|
||||
#{jkXz,jdbcType=BIGINT},
|
||||
#{jkYy,jdbcType=BIGINT},
|
||||
#{jkTzdw,jdbcType=VARCHAR},
|
||||
#{lwhh,jdbcType=VARCHAR},
|
||||
#{czyId,jdbcType=BIGINT},
|
||||
#{jkSj1,jdbcType=TIMESTAMP},
|
||||
#{jkShy,jdbcType=BIGINT},
|
||||
#{jkSj2,jdbcType=TIMESTAMP},
|
||||
#{spd,jdbcType=VARCHAR},
|
||||
#{kgczyid,jdbcType=BIGINT},
|
||||
#{kgczysj,jdbcType=TIMESTAMP},
|
||||
#{groupid,jdbcType=BIGINT},
|
||||
#{rw,jdbcType=VARCHAR},
|
||||
#{jkBz,jdbcType=VARCHAR},
|
||||
#{yl,jdbcType=VARCHAR},
|
||||
#{yhwzId,jdbcType=BIGINT},
|
||||
#{yxrq,jdbcType=TIMESTAMP},
|
||||
#{yl1,jdbcType=BIGINT},
|
||||
#{yl2,jdbcType=BIGINT},
|
||||
#{yl3,jdbcType=VARCHAR},
|
||||
#{yl4,jdbcType=VARCHAR},
|
||||
#{yl5,jdbcType=VARCHAR},
|
||||
#{djyid,jdbcType=BIGINT},
|
||||
#{djsj,jdbcType=TIMESTAMP},
|
||||
#{fhyid,jdbcType=BIGINT},
|
||||
#{fhsj,jdbcType=TIMESTAMP},
|
||||
#{yhwzysy,jdbcType=BIGINT},
|
||||
#{yhwzyssj,jdbcType=TIMESTAMP},
|
||||
#{yhwzshy,jdbcType=BIGINT},
|
||||
#{yhwzshsj,jdbcType=TIMESTAMP},
|
||||
#{ipzyYsy,jdbcType=BIGINT},
|
||||
#{ipzyYssj,jdbcType=TIMESTAMP},
|
||||
#{ipzyShy,jdbcType=BIGINT},
|
||||
#{ipzyShsj,jdbcType=TIMESTAMP},
|
||||
#{ipNum,jdbcType=BIGINT},
|
||||
#{isp,jdbcType=BIGINT} -->
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.nis.domain.restful.jk.JkFdZb">
|
||||
update JK_FD_ZB_FULL
|
||||
<set>
|
||||
<if test="sfFd != null">
|
||||
sf_Fd=#{sfFd,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="lastUpdate != null">
|
||||
LAST_UPDATE=#{lastUpdate,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
||||
</set>
|
||||
where ZB_ID = #{zbId,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.nis.web.dao.jk;
|
||||
|
||||
import com.nis.domain.restful.jk.JkFfjInfo;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
/**
|
||||
*
|
||||
* @ClassName: JkFfjDao.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2016年9月9日 上午10:01:09
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface JkFfjInfoDao extends CrudDao<JkFfjInfo>{
|
||||
int delete(long id);
|
||||
int insert(JkFfjInfo record);
|
||||
int update(JkFfjInfo record);
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
<?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.jk.JkFfjInfoDao">
|
||||
<resultMap id="JkFfjInfoResultMap" type="com.nis.domain.restful.jk.JkFfjInfo">
|
||||
<id column="G_ID" jdbcType="BIGINT" property="gId" />
|
||||
<result column="FFJ_ID" jdbcType="BIGINT" property="ffjId" />
|
||||
<result column="FFJ_MC" jdbcType="VARCHAR" property="ffjMc" />
|
||||
<result column="FFJ_IP" jdbcType="VARCHAR" property="ffjIp" />
|
||||
<result column="FFJ_JS" jdbcType="BIGINT" property="ffjJs" />
|
||||
<result column="KG_FW" jdbcType="BIGINT" property="kgFw" />
|
||||
<result column="SF_SX" jdbcType="BIGINT" property="sfSx" />
|
||||
<result column="SX_FW" jdbcType="VARCHAR" property="sxFw" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
G_ID, FFJ_ID, FFJ_MC, FFJ_IP, FFJ_JS, KG_FW, SF_SX, SX_FW
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="JkFfjInfoResultMap">
|
||||
select <include refid="Base_Column_List" />
|
||||
from JK_FFJ
|
||||
where FFJ_ID = #{ffjId,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<delete id="delete" parameterType="java.lang.Long">
|
||||
delete from JK_FFJ
|
||||
where FFJ_ID = #{ffjId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.restful.jk.JkFfjInfo">
|
||||
insert into JK_FFJ (FFJ_ID, FFJ_MC, FFJ_IP, FFJ_JS, KG_FW, SF_SX, SX_FW)
|
||||
values (#{ffjId,jdbcType=BIGINT},
|
||||
#{ffjMc,jdbcType=VARCHAR}, #{ffjIp,jdbcType=VARCHAR},
|
||||
#{ffjJs,jdbcType=BIGINT}, #{kgFw,jdbcType=BIGINT}, #{sfSx,jdbcType=BIGINT},
|
||||
#{sxFw,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.nis.domain.restful.jk.JkFfjInfo">
|
||||
update JK_FFJ
|
||||
<set>
|
||||
<if test="sfSx != null">SF_SX = #{sfSx,jdbcType=BIGINT},</if>
|
||||
</set>
|
||||
where FFJ_ID = #{ffjId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.nis.web.dao.jk;
|
||||
|
||||
import com.nis.domain.restful.jk.JkFwqInfo;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
/**
|
||||
*
|
||||
* @ClassName: JkFfjDao.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2016年9月9日 上午10:01:09
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface JkFwqInfoDao extends CrudDao<JkFwqInfo>{
|
||||
|
||||
int insert(JkFwqInfo record);
|
||||
|
||||
int update(JkFwqInfo record);
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?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.jk.JkFwqInfoDao">
|
||||
<resultMap id="resultMap" type="com.nis.domain.restful.jk.JkFwqInfo">
|
||||
<id column="G_ID" jdbcType="BIGINT" property="gId" />
|
||||
<result column="FWQ_ID" jdbcType="BIGINT" property="fwqId" />
|
||||
<result column="FWQ_MC" jdbcType="VARCHAR" property="fwqMc" />
|
||||
<result column="FWQ_IP" jdbcType="VARCHAR" property="fwqIp" />
|
||||
<result column="SF_SX" jdbcType="BIGINT" property="sfSx" />
|
||||
<result column="SX_FW" jdbcType="VARCHAR" property="sxFw" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
G_ID, FWQ_ID, FWQ_MC, FWQ_IP, SF_SX, SX_FW
|
||||
</sql>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.restful.jk.JkFwqInfo">
|
||||
insert into JK_FWQ (FWQ_ID, FWQ_MC, FWQ_IP, SF_SX, SX_FW)
|
||||
values (#{fwqId,jdbcType=BIGINT},
|
||||
#{fwqMc,jdbcType=VARCHAR}, #{fwqIp,jdbcType=VARCHAR},
|
||||
#{sfSx,jdbcType=BIGINT}, #{sxFw,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.nis.domain.restful.jk.JkFwqInfo">
|
||||
update JK_FWQ
|
||||
<set>
|
||||
<if test="sfSx != null">SF_SX = #{sfSx,jdbcType=BIGINT},</if>
|
||||
</set>
|
||||
where FWQ_ID = #{fwqId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.nis.web.dao.jk;
|
||||
|
||||
import com.nis.domain.restful.jk.JkDmbCk;
|
||||
import com.nis.domain.restful.jk.JkLyq;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
/**
|
||||
*
|
||||
* @ClassName: DmbCkDao.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2016年9月9日 上午10:03:33
|
||||
* @version V1.0
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface JkLyqDao extends CrudDao<JkLyq>{
|
||||
int delete(long id);
|
||||
int insert(JkLyq record);
|
||||
int update(JkLyq record);
|
||||
int updateValid(JkLyq record);
|
||||
}
|
||||
@@ -1,180 +0,0 @@
|
||||
<?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.jk.JkLyqDao">
|
||||
<resultMap id="BaseResultMap" type="com.nis.domain.restful.jk.JkLyq">
|
||||
<id column="G_ID" jdbcType="BIGINT" property="gId" />
|
||||
<result column="LYQ_ID" jdbcType="BIGINT" property="lyqId" />
|
||||
<result column="LYQ_MC" jdbcType="VARCHAR" property="lyqMc" />
|
||||
<result column="FWQ_ID" jdbcType="BIGINT" property="fwqId" />
|
||||
<result column="KGFS" jdbcType="BIGINT" property="kgfs" />
|
||||
<result column="GJ_CK_ID" jdbcType="BIGINT" property="gjCkId" />
|
||||
<result column="SF_SX" jdbcType="BIGINT" property="sfSx" />
|
||||
<result column="SX_FW" jdbcType="VARCHAR" property="sxFw" />
|
||||
<!--
|
||||
<result column="CZY_ID" jdbcType="BIGINT" property="czyId" />
|
||||
<result column="CZ_SJ" jdbcType="TIMESTAMP" property="czSj" />
|
||||
<result column="BZ" jdbcType="VARCHAR" property="bz" />
|
||||
<result column="YL" jdbcType="VARCHAR" property="yl" /> -->
|
||||
<result column="FWQ_DK" jdbcType="BIGINT" property="fwqDk" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
G_ID, LYQ_ID,LYQ_MC,FWQ_ID,KGFS,GJ_CK_ID,SF_SX,SX_FW ,<!--CZY_ID,CZ_SJ,BZ,YL, -->FWQ_DK
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from JK_LYQ
|
||||
where LYQ_ID = #{lyqId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="delete" parameterType="java.lang.Long">
|
||||
delete from JK_LYQ
|
||||
where LYQ_ID = #{lyqId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<!--
|
||||
<insert id="insert" parameterType="com.nis.domain.restful.jk.JkLyq" keyProperty="lyqId">
|
||||
insert into JK_LYQ (LYQ_ID,LYQ_MC,FWQ_ID,KGFS,GJ_CK_ID,SF_SX,SX_FW,CZY_ID,CZ_SJ,BZ,YL,FWQ_DK
|
||||
)
|
||||
values (
|
||||
#{lyqId,jdbcType=BIGINT},
|
||||
#{lyqMc,jdbcType=VARCHAR},
|
||||
#{fwqId,jdbcType=BIGINT},
|
||||
#{kgfs,jdbcType=BIGINT},
|
||||
#{gjCkId,jdbcType=BIGINT},
|
||||
#{sfSx,jdbcType=BIGINT},
|
||||
#{sxFw,jdbcType=VARCHAR},
|
||||
#{czyId,jdbcType=BIGINT},
|
||||
#{czSj,jdbcType=TIMESTAMP},
|
||||
#{bz,jdbcType=VARCHAR},
|
||||
#{yl,jdbcType=VARCHAR},
|
||||
#{fwqDk,jdbcType=BIGINT}
|
||||
)
|
||||
</insert>
|
||||
-->
|
||||
<!---->
|
||||
<insert id="insert" parameterType="com.nis.domain.restful.jk.JkLyq">
|
||||
insert into JK_LYQ
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lyqId != null">
|
||||
LYQ_ID ,
|
||||
</if>
|
||||
<if test="lyqMc != null">
|
||||
LYQ_MC ,
|
||||
</if>
|
||||
<if test="fwqId != null">
|
||||
FWQ_ID ,
|
||||
</if>
|
||||
<if test="kgfs != null">
|
||||
KGFS ,
|
||||
</if>
|
||||
<if test="gjCkId != null">
|
||||
GJ_CK_ID ,
|
||||
</if>
|
||||
<if test="sfSx != null">
|
||||
SF_SX ,
|
||||
</if>
|
||||
<if test="sxFw != null">
|
||||
SX_FW ,
|
||||
</if>
|
||||
<!--
|
||||
<if test="czyId != null">
|
||||
CZY_ID ,
|
||||
</if>
|
||||
<if test="czSj != null">
|
||||
CZ_SJ ,
|
||||
</if>
|
||||
<if test="bz != null">
|
||||
BZ ,
|
||||
</if>
|
||||
<if test="yl != null">
|
||||
YL ,
|
||||
</if> -->
|
||||
<if test="fwqDk != null">
|
||||
FWQ_DK ,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lyqId != null">
|
||||
#{lyqId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="lyqMc != null">
|
||||
#{lyqMc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fwqId != null">
|
||||
#{fwqId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="kgfs != null">
|
||||
#{kgfs,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="gjCkId != null">
|
||||
#{gjCkId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="sfSx != null">
|
||||
#{sfSx,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="sxFw != null">
|
||||
#{sxFw,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<!--
|
||||
<if test="czyId != null">
|
||||
#{czyId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="czSj != null">
|
||||
#{czSj,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="bz != null">
|
||||
#{bz,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yl != null">
|
||||
#{yl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
-->
|
||||
<if test="fwqDk != null">
|
||||
#{fwqDk,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="update" parameterType="com.nis.domain.restful.jk.JkLyq">
|
||||
update JK_LYQ set SF_SX = #{sfSx,jdbcType=BIGINT} where LYQ_ID = #{lyqId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<!--
|
||||
<update id="update" parameterType="com.nis.domain.restful.jk.JkLyq">
|
||||
update JK_LYQ
|
||||
<set>
|
||||
<if test="lyqMc != null">
|
||||
LYQ_MC = #{lyqMc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fwqId != null">
|
||||
FWQ_ID = #{fwqId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="kgfs != null">
|
||||
KGFS = #{kgfs,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="gjCkId != null">
|
||||
GJ_CK_ID = #{gjCkId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="sfSx != null">
|
||||
SF_SX = #{sfSx,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="sxFw != null">
|
||||
SX_FW = #{sxFw,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="czyId != null">
|
||||
CZY_ID = #{czyId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="czSj != null">
|
||||
CZ_SJ = #{czSj,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="bz != null">
|
||||
BZ = #{bz,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yl != null">
|
||||
YL = #{yl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fwqDk != null">
|
||||
FWQ_DK = #{fwqDk,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where LYQ_ID = #{lyqId,jdbcType=BIGINT}
|
||||
</update>
|
||||
-->
|
||||
</mapper>
|
||||
@@ -1815,7 +1815,9 @@ public class ConfigSourcesService extends BaseService {
|
||||
if (null != compileList && compileList.size() > 0) {
|
||||
for (ConfigCompile config : compileList) {
|
||||
String msg = checkCompileOptForUpdate(config);
|
||||
|
||||
if (config.getOpTime()==null) {
|
||||
config.setOpTime(opTime);
|
||||
}
|
||||
if (!msg.equals("ok")) {
|
||||
thread.setExceptionInfo(msg + sb.toString());
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, msg + sb.toString(),
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfDjNestLog;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.DfDjNestLogDao;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
|
||||
/**
|
||||
* @ClassName: DfDjNestLogService
|
||||
* @Description: TODO(这里用一句话描述这个类的作用)
|
||||
* @author (zbc)
|
||||
* @date 2016年11月11日 下午4:40:00
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DfDjNestLogService extends BaseLogService {
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
protected DfDjNestLogDao dao;
|
||||
|
||||
|
||||
public Page<DfDjNestLog> findDfDjNestLogPage(Page<DfDjNestLog> page, DfDjNestLog entity) {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findDfDjNestLogPage(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public void queryConditionCheck(SaveRequestLogThread thread, long start, DfDjNestLog entity, Class<DfDjNestLog> clazz, Page<?> page) {
|
||||
|
||||
if(StringUtil.isBlank(entity.getSearchLayerId())) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "searchLayerId查询参数不能为空",
|
||||
RestBusinessCode.missing_args.getValue());
|
||||
}
|
||||
|
||||
try {
|
||||
checkCloumnIsExist(thread,start,clazz, page);
|
||||
} catch (RestServiceException e) {
|
||||
logger.error(e);
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger.error(e);
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "请求参数错误");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,144 +0,0 @@
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfJitAffairDestReport;
|
||||
import com.nis.domain.restful.DfJitAffairSrcReport;
|
||||
import com.nis.domain.restful.DfJitFlDestReport;
|
||||
import com.nis.domain.restful.DfJitFlSrcReport;
|
||||
import com.nis.domain.restful.DfJitGuaranteeDestReport;
|
||||
import com.nis.domain.restful.DfJitGuaranteeSrcReport;
|
||||
import com.nis.domain.restful.DfJitIdDestReport;
|
||||
import com.nis.domain.restful.DfJitIdSrcReport;
|
||||
import com.nis.domain.restful.DfJitMissionDestReport;
|
||||
import com.nis.domain.restful.DfJitMissionSrcReport;
|
||||
import com.nis.domain.restful.DfJitTagDestReport;
|
||||
import com.nis.domain.restful.DfJitTagSrcReport;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.DfJitLogSearchDao;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
|
||||
@Service
|
||||
public class DfJitLogSearchService extends BaseLogService {
|
||||
|
||||
@Autowired
|
||||
private DfJitLogSearchDao dfJitLogSearchDao;
|
||||
|
||||
public Page<DfJitFlSrcReport> findDfJitFlSrcReport(Page<DfJitFlSrcReport> page, DfJitFlSrcReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dfJitLogSearchDao.findDfJitFlSrcReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfJitFlDestReport> findDfJitFlDestReport(Page<DfJitFlDestReport> page, DfJitFlDestReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dfJitLogSearchDao.findDfJitFlDestReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfJitAffairSrcReport> findDfJitAffairSrcReport(Page<DfJitAffairSrcReport> page,
|
||||
DfJitAffairSrcReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dfJitLogSearchDao.findDfJitAffairSrcReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfJitAffairDestReport> findDfJitAffairDestReport(Page<DfJitAffairDestReport> page,
|
||||
DfJitAffairDestReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dfJitLogSearchDao.findDfJitAffairDestReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public Page<DfJitMissionSrcReport> findDfJitMissionSrcReport(Page<DfJitMissionSrcReport> page,
|
||||
DfJitMissionSrcReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dfJitLogSearchDao.findDfJitMissionSrcReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfJitMissionDestReport> findDfJitMissionDestReport(Page<DfJitMissionDestReport> page,
|
||||
DfJitMissionDestReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dfJitLogSearchDao.findDfJitMissionDestReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfJitGuaranteeSrcReport> findDfJitGuaranteeSrcReport(Page<DfJitGuaranteeSrcReport> page,
|
||||
DfJitGuaranteeSrcReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dfJitLogSearchDao.findDfJitGuaranteeSrcReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfJitGuaranteeDestReport> findDfJitGuaranteeDestReport(Page<DfJitGuaranteeDestReport> page,
|
||||
DfJitGuaranteeDestReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dfJitLogSearchDao.findDfJitGuaranteeDestReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfJitTagSrcReport> findDfJitTagSrcReport(Page<DfJitTagSrcReport> page, DfJitTagSrcReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dfJitLogSearchDao.findDfJitTagSrcReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfJitTagDestReport> findDfJitTagDestReport(Page<DfJitTagDestReport> page, DfJitTagDestReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dfJitLogSearchDao.findDfJitTagDestReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfJitIdSrcReport> findDfJitIdSrcReport(Page<DfJitIdSrcReport> page, DfJitIdSrcReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dfJitLogSearchDao.findDfJitIdSrcReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfJitIdDestReport> findDfJitIdDestReport(Page<DfJitIdDestReport> page, DfJitIdDestReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dfJitLogSearchDao.findDfJitIdDestReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public void queryDfJitFlCheck(SaveRequestLogThread thread,long start,String searchFl, String searchXz) {
|
||||
try {
|
||||
if (!StringUtil.isBlank(searchFl)) {
|
||||
Integer.parseInt(searchFl);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"searchFl参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"searchFl参数错误");
|
||||
}
|
||||
try {
|
||||
if (!StringUtil.isBlank(searchXz)) {
|
||||
Integer.parseInt(searchXz);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"searchXz参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"searchXz参数错误");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfAttrTypeReport;
|
||||
import com.nis.domain.restful.DfDestIpCountryReport;
|
||||
import com.nis.domain.restful.DfDestIpReport;
|
||||
import com.nis.domain.restful.DfEntranceReport;
|
||||
import com.nis.domain.restful.DfLwhhAttrReport;
|
||||
import com.nis.domain.restful.DfLwhhReport;
|
||||
import com.nis.domain.restful.DfLwhhTagReport;
|
||||
import com.nis.domain.restful.DfPzReport;
|
||||
import com.nis.domain.restful.DfPzReportStat;
|
||||
import com.nis.domain.restful.DfServiceReport;
|
||||
import com.nis.domain.restful.DfSrcIpAttrReport;
|
||||
import com.nis.domain.restful.DfSrcIpDomeSticReport;
|
||||
import com.nis.domain.restful.DfSrcIpReport;
|
||||
import com.nis.domain.restful.DfSrcIpTagReport;
|
||||
import com.nis.domain.restful.DfTagReport;
|
||||
import com.nis.web.dao.DfMultiDimensionalReportDao;
|
||||
import com.nis.web.dao.DfReportDao;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DfMultiDimensionsReportService
|
||||
* @Description: TODO(df多维实时统计)
|
||||
* @author (DDM)
|
||||
* @date 2017年8月4日下午3:14:07
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DfMultiDimensionalReportService extends BaseLogService {
|
||||
/**
|
||||
* 持久层对象
|
||||
*/
|
||||
@Autowired
|
||||
protected DfMultiDimensionalReportDao dao;
|
||||
|
||||
|
||||
public Page<DfLwhhAttrReport> findDfLwhhAttrReportPage(Page<DfLwhhAttrReport> page, DfLwhhAttrReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DfLwhhAttrReport> dfLwhhAttrReports = dao.findDfLwhhAttrReport(entity);
|
||||
if (null != dfLwhhAttrReports && dfLwhhAttrReports.size() > 0) {
|
||||
for (DfLwhhAttrReport dfLwhhAttrReport : dfLwhhAttrReports) {
|
||||
if (null != dfLwhhAttrReport.getAsum() && dfLwhhAttrReport.getAsum() != 0) {
|
||||
dfLwhhAttrReport.setAbsum(dfLwhhAttrReport.getAsum());
|
||||
} else if ((null == dfLwhhAttrReport.getAsum() || dfLwhhAttrReport.getAsum() == 0)
|
||||
&& (null != dfLwhhAttrReport.getBsum() && dfLwhhAttrReport.getBsum() != 0)) {
|
||||
dfLwhhAttrReport.setAbsum(dfLwhhAttrReport.getBsum());
|
||||
} else {
|
||||
dfLwhhAttrReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(dfLwhhAttrReports);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfLwhhTagReport> findDfLwhhTagReportPage(Page<DfLwhhTagReport> page, DfLwhhTagReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DfLwhhTagReport> dfLwhhTagReports = dao.findDfLwhhTagReportPage(entity);
|
||||
if (null != dfLwhhTagReports && dfLwhhTagReports.size() > 0) {
|
||||
for (DfLwhhTagReport dfLwhhTagReport : dfLwhhTagReports) {
|
||||
if (null != dfLwhhTagReport.getAsum() && dfLwhhTagReport.getAsum() != 0) {
|
||||
dfLwhhTagReport.setAbsum(dfLwhhTagReport.getAsum());
|
||||
} else if ((null == dfLwhhTagReport.getAsum() || dfLwhhTagReport.getAsum() == 0)
|
||||
&& (null != dfLwhhTagReport.getBsum() && dfLwhhTagReport.getBsum() != 0)) {
|
||||
dfLwhhTagReport.setAbsum(dfLwhhTagReport.getBsum());
|
||||
} else {
|
||||
dfLwhhTagReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(dfLwhhTagReports);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfSrcIpAttrReport> findDfSrcIpAttrReportPage(Page<DfSrcIpAttrReport> page, DfSrcIpAttrReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DfSrcIpAttrReport> dfSrcIpAttrReports = dao.findDfSrcIpAttrReportPage(entity);
|
||||
if (null != dfSrcIpAttrReports && dfSrcIpAttrReports.size() > 0) {
|
||||
for (DfSrcIpAttrReport dfSrcIpAttrReport : dfSrcIpAttrReports) {
|
||||
if (null != dfSrcIpAttrReport.getAsum() && dfSrcIpAttrReport.getAsum() != 0) {
|
||||
dfSrcIpAttrReport.setAbsum(dfSrcIpAttrReport.getAsum());
|
||||
} else if ((null == dfSrcIpAttrReport.getAsum() || dfSrcIpAttrReport.getAsum() == 0)
|
||||
&& (null != dfSrcIpAttrReport.getBsum() && dfSrcIpAttrReport.getBsum() != 0)) {
|
||||
dfSrcIpAttrReport.setAbsum(dfSrcIpAttrReport.getBsum());
|
||||
} else {
|
||||
dfSrcIpAttrReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(dfSrcIpAttrReports);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfSrcIpTagReport> findDfSrcIpTagReportPage(Page<DfSrcIpTagReport> page, DfSrcIpTagReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DfSrcIpTagReport> dfSrcIpTagReports = dao.findDfSrcIpTagReportPage(entity);
|
||||
if (null != dfSrcIpTagReports && dfSrcIpTagReports.size() > 0) {
|
||||
for (DfSrcIpTagReport dfSrcIpTagReport : dfSrcIpTagReports) {
|
||||
if (null != dfSrcIpTagReport.getAsum() && dfSrcIpTagReport.getAsum() != 0) {
|
||||
dfSrcIpTagReport.setAbsum(dfSrcIpTagReport.getAsum());
|
||||
} else if ((null == dfSrcIpTagReport.getAsum() || dfSrcIpTagReport.getAsum() == 0)
|
||||
&& (null != dfSrcIpTagReport.getBsum() && dfSrcIpTagReport.getBsum() != 0)) {
|
||||
dfSrcIpTagReport.setAbsum(dfSrcIpTagReport.getBsum());
|
||||
} else {
|
||||
dfSrcIpTagReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(dfSrcIpTagReports);
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfLwhhAttrDaily;
|
||||
import com.nis.domain.restful.DfLwhhAttrMonth;
|
||||
import com.nis.domain.restful.DfLwhhTagDaily;
|
||||
import com.nis.domain.restful.DfLwhhTagMonth;
|
||||
import com.nis.domain.restful.DfSrcIpAttrDaily;
|
||||
import com.nis.domain.restful.DfSrcIpAttrMonth;
|
||||
import com.nis.domain.restful.DfSrcIpTagDaily;
|
||||
import com.nis.domain.restful.DfSrcIpTagMonth;
|
||||
import com.nis.web.dao.DfMultiDimensionalStatLogDao;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DfMultiDimensionsReportService
|
||||
* @Description: TODO(df多维实时统计)
|
||||
* @author (DDM)
|
||||
* @date 2017年8月4日下午3:14:07
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DfMultiDimensionalStatLogService extends BaseLogService {
|
||||
/**
|
||||
* 持久层对象
|
||||
*/
|
||||
@Autowired
|
||||
protected DfMultiDimensionalStatLogDao dao;
|
||||
|
||||
public Page<DfLwhhAttrDaily> dfLwhhAttrDaily(Page<DfLwhhAttrDaily> page, DfLwhhAttrDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfLwhhAttrDaily(entity));
|
||||
return page;
|
||||
}
|
||||
public Page<DfLwhhAttrMonth> dfLwhhAttrMonth(Page<DfLwhhAttrMonth> page, DfLwhhAttrMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfLwhhAttrMonth(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public Page<DfLwhhTagDaily> dfLwhhTagDaily(Page<DfLwhhTagDaily> page, DfLwhhTagDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfLwhhTagDaily(entity));
|
||||
return page;
|
||||
}
|
||||
public Page<DfLwhhTagMonth> dfLwhhTagMonth(Page<DfLwhhTagMonth> page, DfLwhhTagMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfLwhhTagMonth(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public Page<DfSrcIpAttrDaily> dfSrcIpAttrDaily(Page<DfSrcIpAttrDaily> page, DfSrcIpAttrDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfSrcIpAttrDaily(entity));
|
||||
return page;
|
||||
}
|
||||
public Page<DfSrcIpAttrMonth> dfSrcIpAttrMonth(Page<DfSrcIpAttrMonth> page, DfSrcIpAttrMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfSrcIpAttrMonth(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public Page<DfSrcIpTagDaily> dfSrcIpTagDaily(Page<DfSrcIpTagDaily> page, DfSrcIpTagDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfSrcIpTagDaily(entity));
|
||||
return page;
|
||||
}
|
||||
public Page<DfSrcIpTagMonth> dfSrcIpTagMonth(Page<DfSrcIpTagMonth> page, DfSrcIpTagMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfSrcIpTagMonth(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,277 +0,0 @@
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfAttrTypeReport;
|
||||
import com.nis.domain.restful.DfDestIpCountryReport;
|
||||
import com.nis.domain.restful.DfDestIpReport;
|
||||
import com.nis.domain.restful.DfEntranceReport;
|
||||
import com.nis.domain.restful.DfLwhhReport;
|
||||
import com.nis.domain.restful.DfPzReport;
|
||||
import com.nis.domain.restful.DfPzReportStat;
|
||||
import com.nis.domain.restful.DfServiceReport;
|
||||
import com.nis.domain.restful.DfSrcIpDomeSticReport;
|
||||
import com.nis.domain.restful.DfSrcIpReport;
|
||||
import com.nis.domain.restful.DfTagReport;
|
||||
import com.nis.web.dao.DfReportDao;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DfReportService
|
||||
* @Description: TODO(一句话描述这个类)
|
||||
* @author (DDM)
|
||||
* @date 2016年10月31日上午11:54:46
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DfReportService extends BaseLogService {
|
||||
/**
|
||||
* 持久层对象
|
||||
*/
|
||||
@Autowired
|
||||
protected DfReportDao dao;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @Title: findDfPzReportPage
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param
|
||||
* page
|
||||
* @param @param
|
||||
* entity
|
||||
* @param @return
|
||||
* @param @throws
|
||||
* SQLException
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public Page<DfPzReport> findDfPzReportPage(Page<DfPzReport> page, DfPzReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findDfPzReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfAttrTypeReport> findAttrTypeReport(Page<DfAttrTypeReport> page, DfAttrTypeReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DfAttrTypeReport> findAttrTypeReport = dao.findAttrTypeReport(entity);
|
||||
page.setList(findAttrTypeReport);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfSrcIpDomeSticReport> findSrcIpDomeSticReport(Page<DfSrcIpDomeSticReport> page,
|
||||
DfSrcIpDomeSticReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DfSrcIpDomeSticReport> findSrcIpDomeSticReport = dao.findSrcIpDomeSticReport(entity);
|
||||
if (null != findSrcIpDomeSticReport && findSrcIpDomeSticReport.size() > 0) {
|
||||
for (DfSrcIpDomeSticReport dfSrcIpDomeSticReport : findSrcIpDomeSticReport) {
|
||||
if (null != dfSrcIpDomeSticReport.getAsum() && dfSrcIpDomeSticReport.getAsum() != 0) {
|
||||
dfSrcIpDomeSticReport.setAbsum(dfSrcIpDomeSticReport.getAsum());
|
||||
} else if ((null == dfSrcIpDomeSticReport.getAsum() || dfSrcIpDomeSticReport.getAsum() == 0)
|
||||
&& (null != dfSrcIpDomeSticReport.getBsum() && dfSrcIpDomeSticReport.getBsum() != 0)) {
|
||||
dfSrcIpDomeSticReport.setAbsum(dfSrcIpDomeSticReport.getBsum());
|
||||
} else {
|
||||
dfSrcIpDomeSticReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(findSrcIpDomeSticReport);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfDestIpCountryReport> findDestIpCountryReport(Page<DfDestIpCountryReport> page,
|
||||
DfDestIpCountryReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DfDestIpCountryReport> destIpCountryReport = dao.findDestIpCountryReport(entity);
|
||||
if (null != destIpCountryReport && destIpCountryReport.size() > 0) {
|
||||
for (DfDestIpCountryReport dfDestIpCountryReport : destIpCountryReport) {
|
||||
if (null != dfDestIpCountryReport.getAsum() && dfDestIpCountryReport.getAsum() != 0) {
|
||||
dfDestIpCountryReport.setAbsum(dfDestIpCountryReport.getAsum());
|
||||
} else if ((null == dfDestIpCountryReport.getAsum() || dfDestIpCountryReport.getAsum() == 0)
|
||||
&& (null != dfDestIpCountryReport.getBsum() && dfDestIpCountryReport.getBsum() != 0)) {
|
||||
dfDestIpCountryReport.setAbsum(dfDestIpCountryReport.getBsum());
|
||||
} else {
|
||||
dfDestIpCountryReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(destIpCountryReport);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfEntranceReport> findDfEntranceReport(Page<DfEntranceReport> page, DfEntranceReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DfEntranceReport> findDfEntranceReport = dao.findDfEntranceReport(entity);
|
||||
if (null != findDfEntranceReport && findDfEntranceReport.size() > 0) {
|
||||
for (DfEntranceReport dfEntranceReport : findDfEntranceReport) {
|
||||
if (null != dfEntranceReport.getAsum() && dfEntranceReport.getAsum() != 0) {
|
||||
dfEntranceReport.setAbsum(dfEntranceReport.getAsum());
|
||||
} else if ((null == dfEntranceReport.getAsum() || dfEntranceReport.getAsum() == 0)
|
||||
&& (null != dfEntranceReport.getBsum() && dfEntranceReport.getBsum() != 0)) {
|
||||
dfEntranceReport.setAbsum(dfEntranceReport.getBsum());
|
||||
} else {
|
||||
dfEntranceReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(findDfEntranceReport);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfLwhhReport> findDfLwhhReport(Page<DfLwhhReport> page, DfLwhhReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DfLwhhReport> findDfLwhhReport = dao.findDfLwhhReport(entity);
|
||||
if (null != findDfLwhhReport && findDfLwhhReport.size() > 0) {
|
||||
for (DfLwhhReport dfLwhhReport : findDfLwhhReport) {
|
||||
if (null != dfLwhhReport.getAsum() && dfLwhhReport.getAsum() != 0) {
|
||||
dfLwhhReport.setAbsum(dfLwhhReport.getAsum());
|
||||
} else if ((null == dfLwhhReport.getAsum() || dfLwhhReport.getAsum() == 0)
|
||||
&& (null != dfLwhhReport.getBsum() && dfLwhhReport.getBsum() != 0)) {
|
||||
dfLwhhReport.setAbsum(dfLwhhReport.getBsum());
|
||||
} else {
|
||||
dfLwhhReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(findDfLwhhReport);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfTagReport> findDfTagReport(Page<DfTagReport> page, DfTagReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DfTagReport> findDfTagReport = dao.findDfTagReport(entity);
|
||||
page.setList(findDfTagReport);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfPzReport> findDfPriTagReport(Page<DfPzReport> page, DfPzReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DfPzReport> findDfPzReport = dao.findDfPzReport(entity);
|
||||
if (null != findDfPzReport && findDfPzReport.size() > 0) {
|
||||
for (DfPzReport dfPzReport : findDfPzReport) {
|
||||
if (null != dfPzReport.getAsum() && dfPzReport.getAsum() != 0) {
|
||||
dfPzReport.setAbsum(dfPzReport.getAsum());
|
||||
} else if ((null == dfPzReport.getAsum() || dfPzReport.getAsum() == 0)
|
||||
&& (null != dfPzReport.getBsum() && dfPzReport.getBsum() != 0)) {
|
||||
dfPzReport.setAbsum(dfPzReport.getBsum());
|
||||
} else {
|
||||
dfPzReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(findDfPzReport);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DfPzReportStat> findDfPzReportStatPage(Page<DfPzReportStat> page, DfPzReportStat entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findDfPzReportStat(entity));
|
||||
return page;
|
||||
}
|
||||
public Page<DfPzReportStat> findDfPzReportStatMinutesPage(Page<DfPzReportStat> page, DfPzReportStat entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findDfPzReportStatMinutes(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Long findDfPzReportSumStat(Page<DfPzReportStat> page, DfPzReportStat entity) throws SQLException {
|
||||
return dao.findDfPzReportSum(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: findDfSrcIpReport
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param
|
||||
* page
|
||||
* @param @param
|
||||
* entity
|
||||
* @param @return
|
||||
* @param @throws
|
||||
* SQLException
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public Page<DfSrcIpReport> findDfSrcIpReport(Page<DfSrcIpReport> page, DfSrcIpReport entity) {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findDfSrcIpReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: findDfDestIpReport
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param
|
||||
* page
|
||||
* @param @param
|
||||
* entity
|
||||
* @param @return
|
||||
* @param @throws
|
||||
* SQLException
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public Page<DfDestIpReport> findDfDestIpReport(Page<DfDestIpReport> page, DfDestIpReport entity) {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findDfDestIpReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @Title: findDfServiceReportPage
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param
|
||||
* page
|
||||
* @param @param
|
||||
* entity
|
||||
* @param @return
|
||||
* @param @throws
|
||||
* SQLException
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public Page<DfServiceReport> findDfServiceReportPage(Page<DfServiceReport> page, DfServiceReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findDfServiceReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: findDfTagReportPage
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param @param
|
||||
* page
|
||||
* @param @param
|
||||
* entity
|
||||
* @param @return
|
||||
* @param @throws
|
||||
* SQLException
|
||||
* @return Map 返回类型
|
||||
* @author (DDM)
|
||||
* @version V1.0
|
||||
*/
|
||||
public Page<DfTagReport> findDfTagReportPage(Page<DfTagReport> page, DfTagReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
|
||||
List<DfTagReport> findDfTagReportPage = dao.findDfTagReportPage(entity);
|
||||
page.setList(findDfTagReportPage);
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,203 +0,0 @@
|
||||
/**
|
||||
* @Title: DfStatLogService.java
|
||||
* @Package com.nis.web.service.restful
|
||||
* @Description: TODO(用一句话描述该文件做什么)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 上午11:50:12
|
||||
* @version V1.0
|
||||
*/
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfAttrStatLogDaily;
|
||||
import com.nis.domain.restful.DfAttrStatLogMonth;
|
||||
import com.nis.domain.restful.DfDestIpCounrtyStatLogDaily;
|
||||
import com.nis.domain.restful.DfDestIpCounrtyStatLogMonth;
|
||||
import com.nis.domain.restful.DfEntrStatLogDaily;
|
||||
import com.nis.domain.restful.DfEntrStatLogMonth;
|
||||
import com.nis.domain.restful.DfLwhhStatLogDaily;
|
||||
import com.nis.domain.restful.DfLwhhStatLogMonth;
|
||||
import com.nis.domain.restful.DfSrcIpDomesticStatLogDaily;
|
||||
import com.nis.domain.restful.DfSrcIpDomesticStatLogMonth;
|
||||
import com.nis.domain.restful.DfStatLogDaily;
|
||||
import com.nis.domain.restful.DfStatLogMonth;
|
||||
import com.nis.domain.restful.DfTagStatLogDaily;
|
||||
import com.nis.domain.restful.DfTagStatLogMonth;
|
||||
import com.nis.web.dao.DfStatLogDao;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
|
||||
/**
|
||||
* @ClassName: DfStatLogService
|
||||
* @Description: TODO(这里用一句话描述这个类的作用)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 上午11:50:12
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DfStatLogService extends BaseLogService{
|
||||
/**
|
||||
* 持久层对象
|
||||
*/
|
||||
@Autowired
|
||||
protected DfStatLogDao dao;
|
||||
|
||||
/**
|
||||
* 查询端口封堵分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfStatLogDaily> dfStatLogDaily(Page<DfStatLogDaily> page, DfStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询端口封堵分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfStatLogMonth> dfStatLogMonth(Page<DfStatLogMonth> page, DfStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询标签日报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfTagStatLogDaily> dfTagStatLogDaily(Page<DfTagStatLogDaily> page, DfTagStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfTagStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询标签月报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfTagStatLogMonth> dfTagStatLogMonth(Page<DfTagStatLogMonth> page, DfTagStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfTagStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询性质日报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfAttrStatLogDaily> dfAttrStatLogDaily(Page<DfAttrStatLogDaily> page, DfAttrStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfAttrStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询性质月报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfAttrStatLogMonth> dfAttrStatLogMonth(Page<DfAttrStatLogMonth> page, DfAttrStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfAttrStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询局点日报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfEntrStatLogDaily> dfEntrStatLogDaily(Page<DfEntrStatLogDaily> page, DfEntrStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfEntrStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询局点月报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfEntrStatLogMonth> dfEntrStatLogMonth(Page<DfEntrStatLogMonth> page, DfEntrStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfEntrStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询来文函号日报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfLwhhStatLogDaily> dfLwhhStatLogDaily(Page<DfLwhhStatLogDaily> page, DfLwhhStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfLwhhStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询来文函号月报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfLwhhStatLogMonth> dfLwhhStatLogMonth(Page<DfLwhhStatLogMonth> page, DfLwhhStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfLwhhStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询境内源ip日报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfSrcIpDomesticStatLogDaily> dfSrcIpDomesticStatLogDaily(Page<DfSrcIpDomesticStatLogDaily> page, DfSrcIpDomesticStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfSrcIpDomesticStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询境内源ip月报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfSrcIpDomesticStatLogMonth> dfSrcIpDomesticStatLogMonth(Page<DfSrcIpDomesticStatLogMonth> page, DfSrcIpDomesticStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfSrcIpDomesticStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询国家目的ip日报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfDestIpCounrtyStatLogDaily> dfDestIpCounrtyStatLogDaily(Page<DfDestIpCounrtyStatLogDaily> page, DfDestIpCounrtyStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfDestIpCounrtyStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询国家目的ip月报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DfDestIpCounrtyStatLogMonth> dfDestIpCounrtyStatLogMonth(Page<DfDestIpCounrtyStatLogMonth> page, DfDestIpCounrtyStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.dfDestIpCounrtyStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.StatLogEntity;
|
||||
import com.nis.domain.restful.DfDjLogStatistics;
|
||||
import com.nis.domain.restful.DfDjPzLogStatistics;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.DfDjLogStatDao;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
|
||||
/**
|
||||
* @ClassName: DfdjLogStatService
|
||||
* @Description: 封堵/监测日志统计查询
|
||||
* @author (zbc)
|
||||
* @date 2016年11月14日 下午4:00:00
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
public class DfdjLogStatService extends BaseLogService {
|
||||
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
@Autowired
|
||||
protected DfDjLogStatDao dao;
|
||||
|
||||
|
||||
public DfDjLogStatistics findDfLogStatistics(DfDjLogStatistics entity) {
|
||||
List<DfDjLogStatistics> list = dao.findDfLogStatistics(entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
public Page<DfDjPzLogStatistics> findDfPzLogStatistics(Page<DfDjPzLogStatistics> page, DfDjPzLogStatistics entity) {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findDfPzLogStatistics(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public DfDjLogStatistics findDjLogStatistics(DfDjLogStatistics entity) {
|
||||
List<DfDjLogStatistics> list = dao.findDjLogStatistics(entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
public Page<DfDjPzLogStatistics> findDjPzLogStatistics(Page<DfDjPzLogStatistics> page, DfDjPzLogStatistics entity) {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findDjPzLogStatistics(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void queryConditionCheck(SaveRequestLogThread thread, long start, StatLogEntity entity, Class clazz, Page page) {
|
||||
/*
|
||||
* searchConfigId为多条件格式
|
||||
*/
|
||||
try {
|
||||
if (!StringUtil.isBlank(entity.getSearchStatStartTime())) {
|
||||
sdf.parse(entity.getSearchStatStartTime());
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger.error(e);
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "searchStatStartTime参数格式错误",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger.error(e);
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "searchStatStartTime参数格式错误");
|
||||
}
|
||||
|
||||
try {
|
||||
if (!StringUtil.isBlank(entity.getSearchStatEndTime())) {
|
||||
sdf.parse(entity.getSearchStatEndTime());
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger.error(e);
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "searchStatEndTime参数格式错误",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger.error(e);
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "searchStatEndTime参数错误");
|
||||
}
|
||||
|
||||
try {
|
||||
if (!StringUtil.isBlank(entity.getSearchService())) {
|
||||
Integer.parseInt(entity.getSearchService());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger.error(e);
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "searchService参数格式错误",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger.error(e);
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "searchService参数错误");
|
||||
}
|
||||
|
||||
try {
|
||||
checkCloumnIsExist(thread,start,clazz, page);
|
||||
} catch (RestServiceException e) {
|
||||
logger.error(e);
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
logger.error(e);
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "请求参数错误");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DjCkStatLog;
|
||||
import com.nis.domain.restful.DjJitAffairDestReport;
|
||||
import com.nis.domain.restful.DjJitAffairSrcReport;
|
||||
import com.nis.domain.restful.DjJitFlDestReport;
|
||||
import com.nis.domain.restful.DjJitFlSrcReport;
|
||||
import com.nis.domain.restful.DjJitGuaranteeDestReport;
|
||||
import com.nis.domain.restful.DjJitGuaranteeSrcReport;
|
||||
import com.nis.domain.restful.DjJitIdDestReport;
|
||||
import com.nis.domain.restful.DjJitIdSrcReport;
|
||||
import com.nis.domain.restful.DjJitMissionDestReport;
|
||||
import com.nis.domain.restful.DjJitMissionSrcReport;
|
||||
import com.nis.domain.restful.DjJitTagDestReport;
|
||||
import com.nis.domain.restful.DjJitTagSrcReport;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.DjJitLogSearchDao;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
|
||||
@Service
|
||||
public class DjJitLogSearchService extends BaseLogService {
|
||||
|
||||
@Autowired
|
||||
private DjJitLogSearchDao djJitLogSearchDao;
|
||||
|
||||
public Page<DjJitFlSrcReport> findDjJitFlSrcReport(Page<DjJitFlSrcReport> page, DjJitFlSrcReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjJitFlSrcReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjJitFlDestReport> findDjJitFlDestReport(Page<DjJitFlDestReport> page, DjJitFlDestReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjJitFlDestReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjJitAffairSrcReport> findDjJitAffairSrcReport(Page<DjJitAffairSrcReport> page,
|
||||
DjJitAffairSrcReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjJitAffairSrcReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjJitAffairDestReport> findDjJitAffairDestReport(Page<DjJitAffairDestReport> page,
|
||||
DjJitAffairDestReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjJitAffairDestReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjJitMissionSrcReport> findDjJitMissionSrcReport(Page<DjJitMissionSrcReport> page,
|
||||
DjJitMissionSrcReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjJitMissionSrcReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjJitMissionDestReport> findDjJitMissionDestReport(Page<DjJitMissionDestReport> page,
|
||||
DjJitMissionDestReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjJitMissionDestReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjJitGuaranteeSrcReport> findDjJitGuaranteeSrcReport(Page<DjJitGuaranteeSrcReport> page,
|
||||
DjJitGuaranteeSrcReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjJitGuaranteeSrcReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjJitGuaranteeDestReport> findDjJitGuaranteeDestReport(Page<DjJitGuaranteeDestReport> page,
|
||||
DjJitGuaranteeDestReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjJitGuaranteeDestReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjJitTagSrcReport> findDjJitTagSrcReport(Page<DjJitTagSrcReport> page, DjJitTagSrcReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjJitTagSrcReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjJitTagDestReport> findDjJitTagDestReport(Page<DjJitTagDestReport> page, DjJitTagDestReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjJitTagDestReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjJitIdSrcReport> findDjJitIdSrcReport(Page<DjJitIdSrcReport> page, DjJitIdSrcReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjJitIdSrcReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjJitIdDestReport> findDjJitIdDestReport(Page<DjJitIdDestReport> page, DjJitIdDestReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjJitIdDestReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjCkStatLog> findDjCkStatLog(Page<DjCkStatLog> page, DjCkStatLog entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(djJitLogSearchDao.findDjCkStatLog(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public void queryDjJitFlCheck(SaveRequestLogThread thread,long start,String searchFl, String searchXz) {
|
||||
try {
|
||||
if (!StringUtil.isBlank(searchFl)) {
|
||||
Integer.parseInt(searchFl);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"searchFl参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"searchFl参数错误");
|
||||
}
|
||||
try {
|
||||
if (!StringUtil.isBlank(searchXz)) {
|
||||
Integer.parseInt(searchXz);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"searchXz参数格式错误", RestBusinessCode.param_formate_error.getValue());
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"searchXz参数错误");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DjLwhhAttrReport;
|
||||
import com.nis.domain.restful.DjLwhhReport;
|
||||
import com.nis.domain.restful.DjLwhhTagReport;
|
||||
import com.nis.domain.restful.DjSrcIpAttrReport;
|
||||
import com.nis.domain.restful.DjSrcIpTagReport;
|
||||
import com.nis.web.dao.DjMultiDimensionalReportDao;
|
||||
import com.nis.web.dao.DjReportDao;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DjMultiDimensionsReportService
|
||||
* @Description: TODO(dj多维实时统计)
|
||||
* @author (DDM)
|
||||
* @date 2017年8月4日下午3:14:07
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DjMultiDimensionalReportService extends BaseLogService {
|
||||
/**
|
||||
* 持久层对象
|
||||
*/
|
||||
@Autowired
|
||||
protected DjMultiDimensionalReportDao dao;
|
||||
|
||||
|
||||
public Page<DjLwhhAttrReport> findDjLwhhAttrReportPage(Page<DjLwhhAttrReport> page, DjLwhhAttrReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DjLwhhAttrReport> djLwhhAttrReports = dao.findDjLwhhAttrReport(entity);
|
||||
if (null != djLwhhAttrReports && djLwhhAttrReports.size() > 0) {
|
||||
for (DjLwhhAttrReport djLwhhAttrReport : djLwhhAttrReports) {
|
||||
if (null != djLwhhAttrReport.getAsum() && djLwhhAttrReport.getAsum() != 0) {
|
||||
djLwhhAttrReport.setAbsum(djLwhhAttrReport.getAsum());
|
||||
} else if ((null == djLwhhAttrReport.getAsum() || djLwhhAttrReport.getAsum() == 0)
|
||||
&& (null != djLwhhAttrReport.getBsum() && djLwhhAttrReport.getBsum() != 0)) {
|
||||
djLwhhAttrReport.setAbsum(djLwhhAttrReport.getBsum());
|
||||
} else {
|
||||
djLwhhAttrReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(djLwhhAttrReports);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjLwhhTagReport> findDjLwhhTagReportPage(Page<DjLwhhTagReport> page, DjLwhhTagReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DjLwhhTagReport> djLwhhTagReports = dao.findDjLwhhTagReportPage(entity);
|
||||
if (null != djLwhhTagReports && djLwhhTagReports.size() > 0) {
|
||||
for (DjLwhhTagReport djLwhhTagReport : djLwhhTagReports) {
|
||||
if (null != djLwhhTagReport.getAsum() && djLwhhTagReport.getAsum() != 0) {
|
||||
djLwhhTagReport.setAbsum(djLwhhTagReport.getAsum());
|
||||
} else if ((null == djLwhhTagReport.getAsum() || djLwhhTagReport.getAsum() == 0)
|
||||
&& (null != djLwhhTagReport.getBsum() && djLwhhTagReport.getBsum() != 0)) {
|
||||
djLwhhTagReport.setAbsum(djLwhhTagReport.getBsum());
|
||||
} else {
|
||||
djLwhhTagReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(djLwhhTagReports);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjSrcIpAttrReport> findDjSrcIpAttrReportPage(Page<DjSrcIpAttrReport> page, DjSrcIpAttrReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DjSrcIpAttrReport> djSrcIpAttrReports = dao.findDjSrcIpAttrReportPage(entity);
|
||||
if (null != djSrcIpAttrReports && djSrcIpAttrReports.size() > 0) {
|
||||
for (DjSrcIpAttrReport djSrcIpAttrReport : djSrcIpAttrReports) {
|
||||
if (null != djSrcIpAttrReport.getAsum() && djSrcIpAttrReport.getAsum() != 0) {
|
||||
djSrcIpAttrReport.setAbsum(djSrcIpAttrReport.getAsum());
|
||||
} else if ((null == djSrcIpAttrReport.getAsum() || djSrcIpAttrReport.getAsum() == 0)
|
||||
&& (null != djSrcIpAttrReport.getBsum() && djSrcIpAttrReport.getBsum() != 0)) {
|
||||
djSrcIpAttrReport.setAbsum(djSrcIpAttrReport.getBsum());
|
||||
} else {
|
||||
djSrcIpAttrReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(djSrcIpAttrReports);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjSrcIpTagReport> findDjSrcIpTagReportPage(Page<DjSrcIpTagReport> page, DjSrcIpTagReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DjSrcIpTagReport> djSrcIpTagReports = dao.findDjSrcIpTagReportPage(entity);
|
||||
if (null != djSrcIpTagReports && djSrcIpTagReports.size() > 0) {
|
||||
for (DjSrcIpTagReport djSrcIpTagReport : djSrcIpTagReports) {
|
||||
if (null != djSrcIpTagReport.getAsum() && djSrcIpTagReport.getAsum() != 0) {
|
||||
djSrcIpTagReport.setAbsum(djSrcIpTagReport.getAsum());
|
||||
} else if ((null == djSrcIpTagReport.getAsum() || djSrcIpTagReport.getAsum() == 0)
|
||||
&& (null != djSrcIpTagReport.getBsum() && djSrcIpTagReport.getBsum() != 0)) {
|
||||
djSrcIpTagReport.setAbsum(djSrcIpTagReport.getBsum());
|
||||
} else {
|
||||
djSrcIpTagReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(djSrcIpTagReports);
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DjLwhhAttrDaily;
|
||||
import com.nis.domain.restful.DjLwhhAttrMonth;
|
||||
import com.nis.domain.restful.DjLwhhTagDaily;
|
||||
import com.nis.domain.restful.DjLwhhTagMonth;
|
||||
import com.nis.domain.restful.DjSrcIpAttrDaily;
|
||||
import com.nis.domain.restful.DjSrcIpAttrMonth;
|
||||
import com.nis.domain.restful.DjSrcIpTagDaily;
|
||||
import com.nis.domain.restful.DjSrcIpTagMonth;
|
||||
import com.nis.web.dao.DjMultiDimensionalStatLogDao;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DjMultiDimensionsReportService
|
||||
* @Description: TODO(dj多维实时统计)
|
||||
* @author (DDM)
|
||||
* @date 2017年8月4日下午3:14:07
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DjMultiDimensionalStatLogService extends BaseLogService {
|
||||
/**
|
||||
* 持久层对象
|
||||
*/
|
||||
@Autowired
|
||||
protected DjMultiDimensionalStatLogDao dao;
|
||||
|
||||
public Page<DjLwhhAttrDaily> djLwhhAttrDaily(Page<DjLwhhAttrDaily> page, DjLwhhAttrDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djLwhhAttrDaily(entity));
|
||||
return page;
|
||||
}
|
||||
public Page<DjLwhhAttrMonth> djLwhhAttrMonth(Page<DjLwhhAttrMonth> page, DjLwhhAttrMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djLwhhAttrMonth(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public Page<DjLwhhTagDaily> djLwhhTagDaily(Page<DjLwhhTagDaily> page, DjLwhhTagDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djLwhhTagDaily(entity));
|
||||
return page;
|
||||
}
|
||||
public Page<DjLwhhTagMonth> djLwhhTagMonth(Page<DjLwhhTagMonth> page, DjLwhhTagMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djLwhhTagMonth(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public Page<DjSrcIpAttrDaily> djSrcIpAttrDaily(Page<DjSrcIpAttrDaily> page, DjSrcIpAttrDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djSrcIpAttrDaily(entity));
|
||||
return page;
|
||||
}
|
||||
public Page<DjSrcIpAttrMonth> djSrcIpAttrMonth(Page<DjSrcIpAttrMonth> page, DjSrcIpAttrMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djSrcIpAttrMonth(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public Page<DjSrcIpTagDaily> djSrcIpTagDaily(Page<DjSrcIpTagDaily> page, DjSrcIpTagDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djSrcIpTagDaily(entity));
|
||||
return page;
|
||||
}
|
||||
public Page<DjSrcIpTagMonth> djSrcIpTagMonth(Page<DjSrcIpTagMonth> page, DjSrcIpTagMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djSrcIpTagMonth(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DjPzReportStat;
|
||||
import com.nis.domain.restful.DjAttrTypeReport;
|
||||
import com.nis.domain.restful.DjDestIpCountryReport;
|
||||
import com.nis.domain.restful.DjEntranceReport;
|
||||
import com.nis.domain.restful.DjLwhhReport;
|
||||
import com.nis.domain.restful.DjSrcIpDomeSticReport;
|
||||
import com.nis.domain.restful.DjTagReport;
|
||||
import com.nis.domain.restful.DjPzReport;
|
||||
import com.nis.web.dao.DjReportDao;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: DjReportService
|
||||
* @Description: TODO(一句话描述这个类)
|
||||
* @author (ZBC)
|
||||
* @date 2016年11月22日下午06:00:00
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DjReportService extends BaseLogService {
|
||||
/**
|
||||
* 持久层对象
|
||||
*/
|
||||
@Autowired
|
||||
protected DjReportDao dao;
|
||||
|
||||
/**
|
||||
* @Title: findDjPzReportPage
|
||||
* @param page
|
||||
* @param djPzReport
|
||||
* @return
|
||||
*/
|
||||
public Page<DjPzReport> findDjPzReportPage(Page<DjPzReport> page, DjPzReport entity) {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findDjPzReport(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjPzReportStat> findDjPzReportStatPage(Page<DjPzReportStat> page, DjPzReportStat entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findDjPzReportStat(entity));
|
||||
return page;
|
||||
}
|
||||
public Page<DjPzReportStat> findDjPzReportStatMinutesPage(Page<DjPzReportStat> page, DjPzReportStat entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findDjPzReportStatMinutes(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjPzReport> findDjPzPrivPage(Page<DjPzReport> page, DjPzReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DjPzReport> findDjPzPrivPage = dao.findDjPzPrivPage(entity);
|
||||
if (null != findDjPzPrivPage && findDjPzPrivPage.size() > 0) {
|
||||
for (DjPzReport djPzReport : findDjPzPrivPage) {
|
||||
if (null != djPzReport.getAsum() && djPzReport.getAsum() != 0) {
|
||||
djPzReport.setAbsum(djPzReport.getAsum());
|
||||
} else if ((null == djPzReport.getAsum() || djPzReport.getAsum() == 0)
|
||||
&& (null != djPzReport.getBsum() && djPzReport.getBsum() != 0)) {
|
||||
djPzReport.setAbsum(djPzReport.getBsum());
|
||||
} else {
|
||||
djPzReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(findDjPzPrivPage);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Long findDjPzReportSumStat(Page<DjPzReportStat> page, DjPzReportStat entity) throws SQLException {
|
||||
return dao.findDjPzReportSum(entity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Page<DjAttrTypeReport> findAttrTypeReport(Page<DjAttrTypeReport> page, DjAttrTypeReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DjAttrTypeReport> findAttrTypeReport = dao.findAttrTypeReport(entity);
|
||||
page.setList(findAttrTypeReport);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public Page<DjSrcIpDomeSticReport> findSrcIpDomeSticReport(Page<DjSrcIpDomeSticReport> page,
|
||||
DjSrcIpDomeSticReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DjSrcIpDomeSticReport> findSrcIpDomeSticReport = dao.findSrcIpDomeSticReport(entity);
|
||||
if (null != findSrcIpDomeSticReport && findSrcIpDomeSticReport.size() > 0) {
|
||||
for (DjSrcIpDomeSticReport djSrcIpDomeSticReport : findSrcIpDomeSticReport) {
|
||||
if (null != djSrcIpDomeSticReport.getAsum() && djSrcIpDomeSticReport.getAsum() != 0) {
|
||||
djSrcIpDomeSticReport.setAbsum(djSrcIpDomeSticReport.getAsum());
|
||||
} else if ((null == djSrcIpDomeSticReport.getAsum() || djSrcIpDomeSticReport.getAsum() == 0)
|
||||
&& (null != djSrcIpDomeSticReport.getBsum() && djSrcIpDomeSticReport.getBsum() != 0)) {
|
||||
djSrcIpDomeSticReport.setAbsum(djSrcIpDomeSticReport.getBsum());
|
||||
} else {
|
||||
djSrcIpDomeSticReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(findSrcIpDomeSticReport);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public Page<DjDestIpCountryReport> findDestIpCountryReport(Page<DjDestIpCountryReport> page,
|
||||
DjDestIpCountryReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DjDestIpCountryReport> destIpCountryReport = dao.findDestIpCountryReport(entity);
|
||||
if (null != destIpCountryReport && destIpCountryReport.size() > 0) {
|
||||
for (DjDestIpCountryReport djDestIpCountryReport : destIpCountryReport) {
|
||||
if (null != djDestIpCountryReport.getAsum() && djDestIpCountryReport.getAsum() != 0) {
|
||||
djDestIpCountryReport.setAbsum(djDestIpCountryReport.getAsum());
|
||||
} else if ((null == djDestIpCountryReport.getAsum() || djDestIpCountryReport.getAsum() == 0)
|
||||
&& (null != djDestIpCountryReport.getBsum() && djDestIpCountryReport.getBsum() != 0)) {
|
||||
djDestIpCountryReport.setAbsum(djDestIpCountryReport.getBsum());
|
||||
} else {
|
||||
djDestIpCountryReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(destIpCountryReport);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjEntranceReport> findDjEntranceReport(Page<DjEntranceReport> page, DjEntranceReport entity)
|
||||
throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DjEntranceReport> findDjEntranceReport = dao.findDjEntranceReport(entity);
|
||||
if (null != findDjEntranceReport && findDjEntranceReport.size() > 0) {
|
||||
for (DjEntranceReport djEntranceReport : findDjEntranceReport) {
|
||||
if (null != djEntranceReport.getAsum() && djEntranceReport.getAsum() != 0) {
|
||||
djEntranceReport.setAbsum(djEntranceReport.getAsum());
|
||||
} else if ((null == djEntranceReport.getAsum() || djEntranceReport.getAsum() == 0)
|
||||
&& (null != djEntranceReport.getBsum() && djEntranceReport.getBsum() != 0)) {
|
||||
djEntranceReport.setAbsum(djEntranceReport.getBsum());
|
||||
} else {
|
||||
djEntranceReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(findDjEntranceReport);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjLwhhReport> findDjLwhhReport(Page<DjLwhhReport> page, DjLwhhReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
List<DjLwhhReport> findDjLwhhReport = dao.findDjLwhhReport(entity);
|
||||
if (null != findDjLwhhReport && findDjLwhhReport.size() > 0) {
|
||||
for (DjLwhhReport djLwhhReport : findDjLwhhReport) {
|
||||
if (null != djLwhhReport.getAsum() && djLwhhReport.getAsum() != 0) {
|
||||
djLwhhReport.setAbsum(djLwhhReport.getAsum());
|
||||
} else if ((null == djLwhhReport.getAsum() || djLwhhReport.getAsum() == 0)
|
||||
&& (null != djLwhhReport.getBsum() && djLwhhReport.getBsum() != 0)) {
|
||||
djLwhhReport.setAbsum(djLwhhReport.getBsum());
|
||||
} else {
|
||||
djLwhhReport.setAbsum(0l);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(findDjLwhhReport);
|
||||
return page;
|
||||
}
|
||||
|
||||
public Page<DjTagReport> findDjTagReportPage(Page<DjTagReport> page, DjTagReport entity) throws SQLException {
|
||||
entity.setPage(page);
|
||||
|
||||
List<DjTagReport> findDjTagReportPage = dao.findDjTagReportPage(entity);
|
||||
page.setList(findDjTagReportPage);
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,203 +0,0 @@
|
||||
/**
|
||||
* @Title: DjStatLogService.java
|
||||
* @Package com.nis.web.service.restful
|
||||
* @Description: TODO(用一句话描述该文件做什么)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 上午11:50:12
|
||||
* @version V1.0
|
||||
*/
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DjAttrStatLogDaily;
|
||||
import com.nis.domain.restful.DjAttrStatLogMonth;
|
||||
import com.nis.domain.restful.DjDestIpCounrtyStatLogDaily;
|
||||
import com.nis.domain.restful.DjDestIpCounrtyStatLogMonth;
|
||||
import com.nis.domain.restful.DjEntrStatLogDaily;
|
||||
import com.nis.domain.restful.DjEntrStatLogMonth;
|
||||
import com.nis.domain.restful.DjLwhhStatLogDaily;
|
||||
import com.nis.domain.restful.DjLwhhStatLogMonth;
|
||||
import com.nis.domain.restful.DjSrcIpDomesticStatLogDaily;
|
||||
import com.nis.domain.restful.DjSrcIpDomesticStatLogMonth;
|
||||
import com.nis.domain.restful.DjStatLogDaily;
|
||||
import com.nis.domain.restful.DjStatLogMonth;
|
||||
import com.nis.domain.restful.DjTagStatLogDaily;
|
||||
import com.nis.domain.restful.DjTagStatLogMonth;
|
||||
import com.nis.web.dao.DjStatLogDao;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
|
||||
/**
|
||||
* @ClassName: DjStatLogService
|
||||
* @Description: TODO(这里用一句话描述这个类的作用)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月13日 上午11:50:12
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DjStatLogService extends BaseLogService{
|
||||
/**
|
||||
* 持久层对象
|
||||
*/
|
||||
@Autowired
|
||||
protected DjStatLogDao dao;
|
||||
|
||||
/**
|
||||
* 查询端口封堵分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjStatLogDaily> djStatLogDaily(Page<DjStatLogDaily> page, DjStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询端口封堵分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjStatLogMonth> djStatLogMonth(Page<DjStatLogMonth> page, DjStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询标签日报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjTagStatLogDaily> djTagStatLogDaily(Page<DjTagStatLogDaily> page, DjTagStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djTagStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询标签月报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjTagStatLogMonth> djTagStatLogMonth(Page<DjTagStatLogMonth> page, DjTagStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djTagStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询性质日报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjAttrStatLogDaily> djAttrStatLogDaily(Page<DjAttrStatLogDaily> page, DjAttrStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djAttrStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询性质月报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjAttrStatLogMonth> djAttrStatLogMonth(Page<DjAttrStatLogMonth> page, DjAttrStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djAttrStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询局点日报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjEntrStatLogDaily> djEntrStatLogDaily(Page<DjEntrStatLogDaily> page, DjEntrStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djEntrStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询局点月报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjEntrStatLogMonth> djEntrStatLogMonth(Page<DjEntrStatLogMonth> page, DjEntrStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djEntrStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询来文函号日报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjLwhhStatLogDaily> djLwhhStatLogDaily(Page<DjLwhhStatLogDaily> page, DjLwhhStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djLwhhStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询来文函号月报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjLwhhStatLogMonth> djLwhhStatLogMonth(Page<DjLwhhStatLogMonth> page, DjLwhhStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djLwhhStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询境内源ip日报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjSrcIpDomesticStatLogDaily> djSrcIpDomesticStatLogDaily(Page<DjSrcIpDomesticStatLogDaily> page, DjSrcIpDomesticStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djSrcIpDomesticStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询境内源ip月报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjSrcIpDomesticStatLogMonth> djSrcIpDomesticStatLogMonth(Page<DjSrcIpDomesticStatLogMonth> page, DjSrcIpDomesticStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djSrcIpDomesticStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询国家目的ip日报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjDestIpCounrtyStatLogDaily> djDestIpCounrtyStatLogDaily(Page<DjDestIpCounrtyStatLogDaily> page, DjDestIpCounrtyStatLogDaily entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djDestIpCounrtyStatLogDaily(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询国家目的ip月报表
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<DjDestIpCounrtyStatLogMonth> djDestIpCounrtyStatLogMonth(Page<DjDestIpCounrtyStatLogMonth> page, DjDestIpCounrtyStatLogMonth entity) throws SQLException{
|
||||
entity.setPage(page);
|
||||
page.setList(dao.djDestIpCounrtyStatLogMonth(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -202,6 +202,43 @@ public class UpdateCompileByJDBCThread implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @Description: 根据compileId更新与之对应的group关系表的生效状态
|
||||
* @author (zdx)
|
||||
* @date 2017年8月16日 上午9:46:44
|
||||
* @param compileList
|
||||
* @param conn
|
||||
* @param opTime
|
||||
* @param msgList
|
||||
*/
|
||||
public static void updateGroupByCompileId(List<ConfigCompile> compileList, Connection conn, Date opTime,
|
||||
List<Exception> msgList) {
|
||||
if (null != compileList && compileList.size() > 0) {
|
||||
try {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("update CONFIG_GROUP set IS_VALID=?,op_time=?,LAST_UPDATE=sysdate where COMPILE_ID=? ");
|
||||
conn.setAutoCommit(false);
|
||||
PreparedStatement ps = conn.prepareStatement(sb.toString());
|
||||
for (ConfigCompile compile : compileList) {
|
||||
Object[] obj = new Object[] { compile.getIsValid(), opTime,compile.getCompileId() };
|
||||
for (int x = 0; x < obj.length; x++) {
|
||||
if (x == 1) {
|
||||
ps.setTimestamp(x + 1, utileDate2TimeStamp(opTime));
|
||||
} else {
|
||||
ps.setObject(x + 1, obj[x]);
|
||||
}
|
||||
}
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
msgList.add(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void updateGroup(List<ConfigGroupRelation> groupList, Connection conn, Date opTime,
|
||||
List<Exception> msgList) {
|
||||
if (null != groupList && groupList.size() > 0) {
|
||||
@@ -551,6 +588,10 @@ public class UpdateCompileByJDBCThread implements Runnable {
|
||||
updateDigestRegion(tableName, digestRegionList, conn, opTime, msgList);
|
||||
}
|
||||
|
||||
if((null !=compileList && compileList.size() > 0)&&(null != groupList && groupList.size()==0)){
|
||||
updateGroupByCompileId(compileList, conn, opTime, msgList);
|
||||
}
|
||||
|
||||
if((null !=compileList && compileList.size() > 0)&&(null != groupList && groupList.size()==0)){
|
||||
updateGroupByCompileId(compileList, conn, opTime, msgList);
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
/**
|
||||
*@Title: DmbCkService.java
|
||||
*@Package com.nis.web.service.restful
|
||||
*@Description TODO
|
||||
*@author wx
|
||||
*@date 2016年9月7日 下午3:28:44
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.web.service.restful.jk;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.restful.jk.JkDmbCk;
|
||||
import com.nis.web.dao.jk.JkDmbCkDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
/**
|
||||
* @ClassName: DmbCkService.java
|
||||
* @Description: TODO
|
||||
* @author (wx)
|
||||
* @date 2016年9月7日 下午3:28:44
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class JkDmbCkService extends CrudService<JkDmbCkDao, JkDmbCk> {
|
||||
@Autowired
|
||||
public JkDmbCkDao jkDmbCkDao;
|
||||
|
||||
public JkDmbCk findById(long id) {
|
||||
return get(id);
|
||||
}
|
||||
public void saveDmbCkBatch(List<JkDmbCk> entity) {
|
||||
// TODO Auto-generated method stub
|
||||
super.saveBatch(entity,JkDmbCkDao.class);
|
||||
}
|
||||
public void updateDmbCkBatch(List<JkDmbCk> entity) {
|
||||
// TODO Auto-generated method stub
|
||||
super.updateBatch(entity, JkDmbCkDao.class);
|
||||
}
|
||||
|
||||
public void removeDmbCk(long id) {
|
||||
jkDmbCkDao.delete(id);
|
||||
}
|
||||
public void removeDmbCkBatch(List<JkDmbCk> entity) {
|
||||
super.deleteBatch(entity, JkDmbCkDao.class);
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/**
|
||||
*@Title: JkFdZbService.java
|
||||
*@Package com.nis.web.service.restful
|
||||
*@Description TODO
|
||||
*@author wx
|
||||
*@date 2016年9月7日 下午3:28:44
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.web.service.restful.jk;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.jk.JkFdZb;
|
||||
import com.nis.web.dao.jk.JkFdZbDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
/**
|
||||
* @ClassName: JkFdZbService.java
|
||||
* @Description: TODO
|
||||
* @author (DDM)
|
||||
* @date 2016年10月19日 下午21:28:44
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class JkFdZbService extends CrudService<JkFdZbDao, JkFdZb> {
|
||||
@Autowired
|
||||
public JkFdZbDao dmbCkDao;
|
||||
public Page<JkFdZb> getJkFdZb(Page<JkFdZb> page, JkFdZb entity) {
|
||||
return findPage(page, entity);
|
||||
}
|
||||
|
||||
public JkFdZb findById(long zbId) {
|
||||
return get(zbId);
|
||||
}
|
||||
public void saveJkFdZbBatch(List<JkFdZb> entity) {
|
||||
super.saveBatch(entity,JkFdZbDao.class);
|
||||
}
|
||||
public void updateJkFdZbBatch(List<JkFdZb> entity) {
|
||||
super.updateBatch(entity, JkFdZbDao.class);
|
||||
}
|
||||
public void removeJkFdZb(long zbId) {
|
||||
dmbCkDao.delete(zbId);
|
||||
}
|
||||
public void removeJkFdZbBatch(List<JkFdZb> entity) {
|
||||
super.deleteBatch(entity, JkFdZbDao.class);
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
*@Title: JkFfjInfoService.java
|
||||
*@Package com.nis.web.service.restful
|
||||
*@Description TODO
|
||||
*@author (zbc)
|
||||
*@date 2016年10月19日 下午20:04:16
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.web.service.restful.jk;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.jk.JkFdZb;
|
||||
import com.nis.domain.restful.jk.JkFfjInfo;
|
||||
import com.nis.web.dao.jk.JkFdZbDao;
|
||||
import com.nis.web.dao.jk.JkFfjInfoDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
/**
|
||||
* @ClassName: JkFfjInfoService.java
|
||||
* @Description: TODO
|
||||
* @author (zbc)
|
||||
* @date 2016年10月19日 下午20:04:16
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class JkFfjInfoService extends CrudService<JkFfjInfoDao, JkFfjInfo> {
|
||||
|
||||
@Autowired
|
||||
public JkFfjInfoDao jkFfjInfoDao;
|
||||
|
||||
public void saveJkFfjBatch(List<JkFfjInfo> entity) {
|
||||
super.saveBatch(entity, JkFfjInfoDao.class);
|
||||
}
|
||||
|
||||
|
||||
public void updateJkFfjBatch(List<JkFfjInfo> entity) {
|
||||
super.updateBatch(entity, JkFfjInfoDao.class);
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
/**
|
||||
*@Title: JkFfjInfoService.java
|
||||
*@Package com.nis.web.service.restful
|
||||
*@Description TODO
|
||||
*@author (zbc)
|
||||
*@date 2016年10月19日 下午20:04:16
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.web.service.restful.jk;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.restful.jk.JkFwqInfo;
|
||||
import com.nis.web.dao.jk.JkFwqInfoDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
/**
|
||||
* @ClassName: JkFfjInfoService.java
|
||||
* @Description: TODO
|
||||
* @author (zbc)
|
||||
* @date 2016年10月19日 下午20:04:16
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class JkFwqInfoService extends CrudService<JkFwqInfoDao, JkFwqInfo> {
|
||||
|
||||
@Autowired
|
||||
public JkFwqInfoDao jkFwqInfoDao;
|
||||
|
||||
public void savejkFwqInfoBatch(List<JkFwqInfo> entity) {
|
||||
super.saveBatch(entity, JkFwqInfoDao.class);
|
||||
}
|
||||
|
||||
|
||||
public void updatejkFwqInfoBatch(List<JkFwqInfo> entity) {
|
||||
super.updateBatch(entity, JkFwqInfoDao.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/**
|
||||
*@Title: JkLyqService.java
|
||||
*@Package com.nis.web.service.restful
|
||||
*@Description TODO
|
||||
*@author wx
|
||||
*@date 2016年9月7日 下午3:28:44
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.web.service.restful.jk;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.restful.jk.JkLyq;
|
||||
import com.nis.web.dao.jk.JkLyqDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
|
||||
/**
|
||||
* @ClassName: JkLyqService.java
|
||||
* @Description: TODO
|
||||
* @author (wx)
|
||||
* @date 2016年9月7日 下午3:28:44
|
||||
* @version V1.0
|
||||
*/
|
||||
@Service
|
||||
public class JkLyqService extends CrudService<JkLyqDao, JkLyq> {
|
||||
@Autowired
|
||||
public JkLyqDao jkLyqDao;
|
||||
|
||||
public JkLyq findById(long id) {
|
||||
return get(id);
|
||||
}
|
||||
public void saveJkLyqBatch(List<JkLyq> entity) {
|
||||
// TODO Auto-generated method stub
|
||||
super.saveBatch(entity,JkLyqDao.class);
|
||||
}
|
||||
public void updateJkLyqBatch(List<JkLyq> entity) {
|
||||
// TODO Auto-generated method stub
|
||||
super.updateBatch(entity, JkLyqDao.class);
|
||||
}
|
||||
public void removeJkLyq(long id) {
|
||||
jkLyqDao.delete(id);
|
||||
}
|
||||
public void removeJkLyqBatch(List<JkLyq> entity) {
|
||||
super.deleteBatch(entity, JkLyqDao.class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user