配置日志总量查询修改,开始时间结束时间可为空
This commit is contained in:
@@ -397,8 +397,12 @@ public class ConfigServiceUtil {
|
||||
builder.queryParam("searchBusinessType",type);
|
||||
builder.queryParam("searchService",serviceIds);
|
||||
builder.queryParam("searchCfgId",ids);
|
||||
if(StringUtils.isNotBlank(searchReportStartTime)) {
|
||||
builder.queryParam("searchReportStartTime",searchReportStartTime);
|
||||
}
|
||||
if(StringUtils.isNotBlank(searchReportEndTime)) {
|
||||
builder.queryParam("searchReportEndTime",searchReportEndTime);
|
||||
}
|
||||
URI uri=builder.build();
|
||||
//创建连接
|
||||
ClientUtil.initClient();
|
||||
|
||||
@@ -53,11 +53,12 @@ import net.sf.json.JsonConfig;
|
||||
public class NtcPzReportController extends BaseController{
|
||||
@RequestMapping(value="ajaxGetLogTotal",method=RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public List<Map<String, Object>> ajaxGetLogTotal(Model model,long endTime,String actions,Integer functionId,String compileIds){
|
||||
public List<Map<String, Object>> ajaxGetLogTotal(Model model,Long endTime,String actions,Integer functionId,String compileIds){
|
||||
List<Map<String, Object>> dataList=new ArrayList<>();
|
||||
SimpleDateFormat sdf=new SimpleDateFormat(Constants.SEARCH_DATEFORMAT);
|
||||
Date endDate=null;
|
||||
Date startDate=null;
|
||||
if(endTime!=null) {
|
||||
if(StringUtils.isNotBlank(Constants.LOG_TIME_START)) {
|
||||
try {
|
||||
startDate=sdf.parse(Constants.LOG_TIME_START);
|
||||
@@ -93,6 +94,8 @@ public class NtcPzReportController extends BaseController{
|
||||
}
|
||||
logger.info("log search end time:"+sdf.format(endDate));
|
||||
logger.info("log search start time:"+sdf.format(startDate));
|
||||
}
|
||||
|
||||
String serviceIdsStr="";
|
||||
StringBuffer serviceIds=new StringBuffer();
|
||||
List<FunctionServiceDict> serviceList=DictUtils.getFunctionServiceDictList(functionId.intValue());
|
||||
@@ -107,7 +110,7 @@ public class NtcPzReportController extends BaseController{
|
||||
if(serviceIds.toString().endsWith(",")) {
|
||||
serviceIdsStr=serviceIds.toString().substring(0,serviceIds.toString().lastIndexOf(","));
|
||||
}
|
||||
String json=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, compileIds, serviceIdsStr, sdf.format(startDate), sdf.format(endDate));
|
||||
String json=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, compileIds, serviceIdsStr, startDate==null?null:sdf.format(startDate), endDate==null?null:sdf.format(endDate));
|
||||
List<NtcPzReport> list=getList(json);
|
||||
String[] idArr=compileIds.split(",");
|
||||
if(list!=null&&(list.size()>0)){
|
||||
|
||||
@@ -1340,12 +1340,12 @@ var getTotalLog=function(){
|
||||
}
|
||||
var GetLogTotal=function(_data){
|
||||
var pathName=window.document.location.pathname.substring(0,window.document.location.pathname.indexOf("/nis")+4);
|
||||
var timeStamp=0;
|
||||
var timeStamp;
|
||||
if(_data.date){
|
||||
timeStamp=_data.date.valueOf();
|
||||
}else{
|
||||
}/*else{
|
||||
timeStamp=(new Date()).valueOf();
|
||||
}
|
||||
}*/
|
||||
var totalTrs=$(_data.objs);
|
||||
var timeout=$.validator.messages.timeout;
|
||||
var failed=$.validator.messages.failed;
|
||||
|
||||
Reference in New Issue
Block a user