实时报表
1、action中drop和whitelist判断处理 2、修复functionId后台没有获取到
This commit is contained in:
@@ -60,7 +60,6 @@ public class NtcDestIpReportController extends BaseController {
|
||||
}else if(bean.getReportType()==Constants.REPORT_TYPE_MONTH){
|
||||
bean.setSearchBusinessType("4");
|
||||
}
|
||||
|
||||
// 调用服务接口...
|
||||
|
||||
bean.setPageSize(-1);
|
||||
@@ -70,6 +69,7 @@ public class NtcDestIpReportController extends BaseController {
|
||||
} catch (ParseException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
|
||||
}
|
||||
List<String> titles=this.getDateTitiles(bean);
|
||||
model.addAttribute("titles", titles);
|
||||
@@ -91,7 +91,11 @@ public class NtcDestIpReportController extends BaseController {
|
||||
trimStr=report.getDestCountry().trim()+Constants.REPORT_TRIM_CONNECTOR+
|
||||
report.getReportTime().substring(0,7);
|
||||
}
|
||||
if(trimData.containsKey(trimStr)){
|
||||
trimData.put(trimStr, trimData.get(trimStr)+report.getSum().longValue());
|
||||
}else{
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
}
|
||||
|
||||
}
|
||||
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
@@ -115,7 +119,8 @@ public class NtcDestIpReportController extends BaseController {
|
||||
model.addAttribute("datas", showData);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
// List<Long> line= new ArrayList<Long>();
|
||||
|
||||
@@ -32,9 +32,7 @@ import net.sf.json.JsonConfig;
|
||||
public class NtcEntranceReportController extends BaseController {
|
||||
@RequestMapping("/ajaxNtcIspReport")
|
||||
public String list(@ModelAttribute("bean") SearchReport bean,Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId());
|
||||
|
||||
if(bean.getAction()!=null){
|
||||
for(FunctionServiceDict service:serviceList){
|
||||
if(service.getAction().intValue()==bean.getAction().intValue()){
|
||||
@@ -91,8 +89,12 @@ public class NtcEntranceReportController extends BaseController {
|
||||
trimStr=report.getEntranceId().intValue()+Constants.REPORT_TRIM_CONNECTOR+
|
||||
report.getReportTime().substring(0,7);
|
||||
}
|
||||
if(trimData.containsKey(trimStr)){
|
||||
trimData.put(trimStr, trimData.get(trimStr)+report.getSum().longValue());
|
||||
}else{
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
}
|
||||
}
|
||||
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
for(Entry<String, Long> counrty:trimData.entrySet()){
|
||||
String[] keyArr=counrty.getKey().split(Constants.REPORT_TRIM_CONNECTOR);
|
||||
@@ -114,7 +116,8 @@ public class NtcEntranceReportController extends BaseController {
|
||||
model.addAttribute("datas", showData);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
// List<Long> line= new ArrayList<Long>();
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.nis.domain.report.NtcLwhhReport;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
@@ -89,8 +90,12 @@ public class NtcLwhhReportController extends BaseController {
|
||||
trimStr=report.getLwhh().intValue()+Constants.REPORT_TRIM_CONNECTOR+
|
||||
report.getReportTime().substring(0,7);
|
||||
}
|
||||
if(trimData.containsKey(trimStr)){
|
||||
trimData.put(trimStr, trimData.get(trimStr)+report.getSum().longValue());
|
||||
}else{
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
}
|
||||
}
|
||||
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
for(RequestInfo requestInfo:requestInfos){
|
||||
List<Long> line= new ArrayList<Long>();
|
||||
@@ -111,7 +116,8 @@ public class NtcLwhhReportController extends BaseController {
|
||||
model.addAttribute("datas", showData);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
// for(RequestInfo requestInfo:requestInfos){
|
||||
|
||||
@@ -122,7 +122,8 @@ public class NtcPzReportController extends BaseController{
|
||||
model.addAttribute("datas", getList(json));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
return "/report/pz";
|
||||
}
|
||||
|
||||
@@ -67,13 +67,16 @@ public class NtcServiceReportController extends BaseController {
|
||||
}
|
||||
StringBuffer url=new StringBuffer(Constants.LOG_BASE_URL+Constants.NTC_SERVICE_REPORT);
|
||||
try {
|
||||
//bean.setSearchReportEndTime("2018-08-27 00:00:00");
|
||||
String json=ConfigServiceUtil.getReport(url.toString(), bean);
|
||||
List<NtcServiceReport> data=getList(json);
|
||||
Map<Integer, Long> dataMap=new HashMap<>();
|
||||
for(NtcServiceReport report:data){
|
||||
if(dataMap.containsKey(report.getService())){
|
||||
dataMap.put(report.getService(), dataMap.get(report.getService())+report.getSum().longValue());
|
||||
}else{
|
||||
dataMap.put(report.getService(),report.getSum().longValue());
|
||||
}
|
||||
}
|
||||
for(Entry<Integer, Long> e:dataMap.entrySet()) {
|
||||
Map<String, Object> _data=new HashMap<>();
|
||||
_data.put("service", e.getKey());
|
||||
@@ -82,7 +85,8 @@ public class NtcServiceReportController extends BaseController {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// if(bean.getAction()!=null){
|
||||
// data.put(bean.getAction().toString(), 66666666l);
|
||||
|
||||
@@ -127,8 +127,12 @@ public class NtcSrcipDomesticReportController extends BaseController {
|
||||
report.getSrcCity().trim()+Constants.REPORT_TRIM_CONNECTOR+
|
||||
report.getReportTime().substring(0,7);
|
||||
}
|
||||
if(trimData.containsKey(trimStr)){
|
||||
trimData.put(trimStr, trimData.get(trimStr)+report.getSum().longValue());
|
||||
}else{
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
}
|
||||
}
|
||||
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
for(String key:trimData.keySet()){
|
||||
List<Long> line= new ArrayList<Long>();
|
||||
@@ -152,7 +156,8 @@ public class NtcSrcipDomesticReportController extends BaseController {
|
||||
model.addAttribute("datas", showData);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
// long total=0;
|
||||
|
||||
@@ -90,8 +90,12 @@ public class NtcTagReportController extends BaseController {
|
||||
trimStr=report.getTag().intValue()+Constants.REPORT_TRIM_CONNECTOR+
|
||||
report.getReportTime().substring(0,7);
|
||||
}
|
||||
if(trimData.containsKey(trimStr)){
|
||||
trimData.put(trimStr, trimData.get(trimStr)+report.getSum().longValue());
|
||||
}else{
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
}
|
||||
}
|
||||
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
for(ServiceDictInfo label:labels){
|
||||
List<Long> line= new ArrayList<Long>();
|
||||
@@ -112,7 +116,8 @@ public class NtcTagReportController extends BaseController {
|
||||
model.addAttribute("datas", showData);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
// for(ServiceDictInfo label:labels){
|
||||
|
||||
@@ -95,8 +95,12 @@ public class NtcXzReportController extends BaseController {
|
||||
trimStr=report.getAttrType().intValue()+Constants.REPORT_TRIM_CONNECTOR+
|
||||
report.getReportTime().substring(0,7);
|
||||
}
|
||||
if(trimData.containsKey(trimStr)){
|
||||
trimData.put(trimStr, trimData.get(trimStr)+report.getSum().longValue());
|
||||
}else{
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
}
|
||||
}
|
||||
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
for(ServiceDictInfo xz:xzs){
|
||||
List<Long> line= new ArrayList<Long>();
|
||||
@@ -117,7 +121,8 @@ public class NtcXzReportController extends BaseController {
|
||||
model.addAttribute("datas", showData);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
// for(ServiceDictInfo xz:xzs){
|
||||
|
||||
@@ -159,7 +159,8 @@ var ajaxReport=function(url,target){
|
||||
data:{
|
||||
"action":$('[name="action"]').val(),
|
||||
"reportType":$('[name="reportType"]').val(),
|
||||
"reportTime":$('[name="reportTime"]').val()
|
||||
"reportTime":$('[name="reportTime"]').val(),
|
||||
"functionId":$('[name="functionId"]').val()
|
||||
},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
@@ -215,6 +216,8 @@ function customColumnClick(){
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="action">
|
||||
<c:forEach items="${serviceList}" var="service" varStatus="status">
|
||||
<c:if test="${service.functionId eq bean.functionId and action.itemCode eq service.action}">
|
||||
<c:if test="${service.serviceId ne 5}">
|
||||
<c:if test="${(service.action ne 128) && (service.action ne 32)}" >
|
||||
<div data-service="${service.serviceId}" class="service btn
|
||||
<c:if test="${status.index%2==0}">btn-primary</c:if>
|
||||
<c:if test="${status.index%2!=0}">btn-default</c:if>">
|
||||
@@ -223,6 +226,17 @@ function customColumnClick(){
|
||||
<span>0</span>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:if>
|
||||
<c:if test="${service.serviceId eq 5}">
|
||||
<div data-service="${service.serviceId}" class="service btn
|
||||
<c:if test="${status.index%2==0}">btn-primary</c:if>
|
||||
<c:if test="${status.index%2!=0}">btn-default</c:if>">
|
||||
<spring:message code="${action.itemValue}"/>
|
||||
<spring:message code="log_total"/>
|
||||
<span>0</span>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</div>
|
||||
@@ -253,8 +267,15 @@ function customColumnClick(){
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="action" >
|
||||
<c:forEach items="${serviceList}" var="service" >
|
||||
<c:if test="${service.functionId eq bean.functionId and action.itemCode eq service.action}">
|
||||
<c:if test="${service.serviceId ne 5}">
|
||||
<c:if test="${(service.action ne 128) && (service.action ne 32)}" >
|
||||
<form:option value="${action.itemCode}" ><spring:message code="${action.itemValue}"/></form:option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
<c:if test="${service.serviceId eq 5}">
|
||||
<form:option value="${action.itemCode}" ><spring:message code="${action.itemValue}"/></form:option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
|
||||
Reference in New Issue
Block a user