(1)加载中样式提交

(2)查询日志总量Controller提交
待接口可用后调整
This commit is contained in:
wangxin
2018-06-13 15:56:29 +08:00
parent a78481bda2
commit e5af29716f
5 changed files with 162 additions and 82 deletions

View File

@@ -0,0 +1,59 @@
/**
*@Title: NtcPzReportController.java
*@Package com.nis.web.controller.log.ntc
*@Description TODO
*@author dell
*@date 2018年6月12日 下午2:09:41
*@version 版本号
*/
package com.nis.web.controller.log.ntc;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.nis.domain.FunctionServiceDict;
import com.nis.domain.log.ReportLog;
import com.nis.domain.log.ReportResultLog;
import com.nis.util.ConfigServiceUtil;
import com.nis.util.Constants;
import com.nis.util.DictUtils;
import com.nis.web.controller.BaseController;
/**
* @ClassName: NtcPzReportController.java
* @Description: TODO
* @author (dell)
* @date 2018年6月12日 下午2:09:41
* @version V1.0
*/
@Controller
@RequestMapping("${adminPath}/logs")
public class NtcPzReportController extends BaseController{
@RequestMapping(value="ajaxGetLogTotal")
@ResponseBody
public String ajaxGetLogTotal(Model model,long endTime,int action,Integer functionId,String compileIds){
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mi:ss");
int interval=Constants.LOG_TIME_RANGE;
Date endDate=new Date(endTime);
Date startDate=new Date(endTime-interval);
int serviceId=0;
List<FunctionServiceDict> serviceList=DictUtils.getFunctionServiceDictList(functionId.intValue());
for(FunctionServiceDict service:serviceList){
if(service.getAction().intValue()==action){
serviceId=service.getServiceId().intValue();
break;
}
}
ReportResultLog result=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, compileIds, String.valueOf(serviceId), sdf.format(startDate), sdf.format(endDate));
if(result.getData()!=null&&result.getData().getList()!=null){
model.addAttribute("data", result.getData().getList());
}
return "success";
}
}