1.修改app,协议,行为日志得查询条件,可检索;
2.修改通联关系日志,前台检索条件为webId,后台webId需转为domainId,数据列表展示为网站下域名信息(由于日志的域名id字段名称定义为了webId的问题,但实际数据为域名信息,需要界面前后台处理转换); 3.百分比查询增加地域条件。
This commit is contained in:
@@ -19,7 +19,7 @@ public class NtcConnRecordLog extends BaseLogEntity<NtcConnRecordLog> {
|
||||
protected String s2cByteNum;
|
||||
@ExcelField(title = "APP", sort = 8)
|
||||
protected String appId;
|
||||
@ExcelField(title = "Web", sort = 10)
|
||||
@ExcelField(title = "domain_name", sort = 10)
|
||||
protected String webId;
|
||||
@ExcelField(title = "application_layer_protocol", sort = 9)
|
||||
protected String protoId;
|
||||
|
||||
@@ -50,6 +50,13 @@ public class NtcConnRecordLogController extends BaseController {
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
initLogSearchValue(log, params);
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
List<CodeResult> appList = CodeDicUtils.getCodeList("appCode");
|
||||
List<CodeResult> protocolList = CodeDicUtils.getCodeList("protocolCode");
|
||||
List<CodeResult> webList = CodeDicUtils.getCodeList("webCode");
|
||||
//查询domainId
|
||||
List<WebsiteDomainTopic> domainList = appCfgService.getDomainDict(new WebsiteDomainTopic());
|
||||
if (StringUtils.isNotBlank(log.getAppId())) {
|
||||
params.put("searchAppId", log.getAppId());
|
||||
}
|
||||
@@ -57,7 +64,20 @@ public class NtcConnRecordLogController extends BaseController {
|
||||
params.put("searchProtoId", log.getProtoId());
|
||||
}
|
||||
if (StringUtils.isNotBlank(log.getWebId())) {
|
||||
params.put("searchWebId", log.getWebId());
|
||||
String[] webIds = log.getWebId().split(",");
|
||||
String domainIds = "";
|
||||
for(String webId:webIds){
|
||||
for (int i = 0; i < domainList.size(); i++) {
|
||||
WebsiteDomainTopic domain = domainList.get(i);
|
||||
if(webId.equals(domain.getWebsiteServiceId().toString())){
|
||||
domainIds += domain.getId()+",";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(domainIds)){
|
||||
domainIds = domainIds.substring(0,domainIds.length()-1);
|
||||
params.put("searchWebId", domainIds);
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(log.getsAsn())) {
|
||||
params.put("searchSAsn", log.getsAsn());
|
||||
@@ -79,12 +99,6 @@ public class NtcConnRecordLogController extends BaseController {
|
||||
params.put("searchDSubscribeId", log.getdSubscribeId());
|
||||
}
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
List<CodeResult> appList = CodeDicUtils.getCodeList("appCode");
|
||||
List<CodeResult> protocolList = CodeDicUtils.getCodeList("protocolCode");
|
||||
//查询domainId
|
||||
List<WebsiteDomainTopic> webList = appCfgService.getDomainDict(new WebsiteDomainTopic());
|
||||
|
||||
model.addAttribute("appList", appList);
|
||||
model.addAttribute("protocolList", protocolList);
|
||||
@@ -92,6 +106,7 @@ public class NtcConnRecordLogController extends BaseController {
|
||||
model.addAttribute("appList", appList);
|
||||
model.addAttribute("protocolList", protocolList);
|
||||
model.addAttribute("webList", webList);
|
||||
model.addAttribute("domainList", domainList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_CONN_RECORD_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
@@ -125,7 +140,7 @@ public class NtcConnRecordLogController extends BaseController {
|
||||
|
||||
@RequestMapping("/ajaxConnRecordPercent")
|
||||
@ResponseBody
|
||||
public JSONObject ajaxConnRecordPercent(String searchFoundStartTime, String searchFoundEndTime,
|
||||
public JSONObject ajaxConnRecordPercent(String searchFoundStartTime, String searchFoundEndTime,Long entranceId,
|
||||
String searchStreamDir, HttpServletRequest request, HttpServletResponse response) {
|
||||
Properties msgProp = getMsgProp();
|
||||
JSONObject resultAllJson = new JSONObject();
|
||||
@@ -134,6 +149,9 @@ public class NtcConnRecordLogController extends BaseController {
|
||||
try {
|
||||
params.put("searchFoundStartTime", searchFoundStartTime);
|
||||
params.put("searchFoundEndTime", searchFoundEndTime);
|
||||
if (entranceId!= null) {
|
||||
params.put("searchEntranceId", entranceId);
|
||||
}
|
||||
StringBuffer url = new StringBuffer(Constants.LOG_BASE_URL + Constants.NTC_CONN_RECORD_PERCENT);
|
||||
String json = HttpClientUtil.getMsg(url.toString(), params, request);
|
||||
if (!StringUtil.isEmpty(json)) {
|
||||
@@ -178,8 +196,31 @@ public class NtcConnRecordLogController extends BaseController {
|
||||
if (StringUtils.isNotBlank(log.getProtoId())) {
|
||||
params.put("searchProtoId", log.getProtoId());
|
||||
}
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
List<CodeResult> appList = CodeDicUtils.getCodeList("appCode");
|
||||
List<CodeResult> protocolList = CodeDicUtils.getCodeList("protocolCode");
|
||||
List<CodeResult> webList = CodeDicUtils.getCodeList("webCode");
|
||||
//查询domainId
|
||||
List<WebsiteDomainTopic> domainList = appCfgService.getDomainDict(new WebsiteDomainTopic());
|
||||
if (StringUtils.isNotBlank(log.getWebId())) {
|
||||
params.put("searchWebId", log.getWebId());
|
||||
// params.put("searchWebId", log.getWebId());
|
||||
if (StringUtils.isNotBlank(log.getWebId())) {
|
||||
String[] webIds = log.getWebId().split(",");
|
||||
String domainIds = "";
|
||||
for(String webId:webIds){
|
||||
for (int i = 0; i < domainList.size(); i++) {
|
||||
WebsiteDomainTopic domain = domainList.get(i);
|
||||
if(webId.equals(domain.getWebsiteServiceId().toString())){
|
||||
domainIds += domain.getId()+",";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(domainIds)){
|
||||
domainIds = domainIds.substring(0,domainIds.length()-1);
|
||||
params.put("searchWebId", domainIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(log.getsAsn())) {
|
||||
params.put("searchSAsn", log.getsAsn());
|
||||
@@ -200,17 +241,12 @@ public class NtcConnRecordLogController extends BaseController {
|
||||
params.put("searchDSubscribeId", log.getdSubscribeId());
|
||||
}
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
List<CodeResult> appList = CodeDicUtils.getCodeList("appCode");
|
||||
List<CodeResult> protocolList = CodeDicUtils.getCodeList("protocolCode");
|
||||
//List<CodeResult> webList = CodeDicUtils.getCodeList("webCode");
|
||||
//查询domainId
|
||||
List<WebsiteDomainTopic> webList = appCfgService.getDomainDict(new WebsiteDomainTopic());
|
||||
|
||||
|
||||
model.addAttribute("appList", appList);
|
||||
model.addAttribute("protocolList", protocolList);
|
||||
model.addAttribute("webList", webList);
|
||||
model.addAttribute("domainList", domainList);
|
||||
Properties msgProp = getMsgProp();
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_CONN_RECORD_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
@@ -233,7 +269,7 @@ public class NtcConnRecordLogController extends BaseController {
|
||||
l.setProtoId(getName(l.getProtoId(),protocolList,msgProp));
|
||||
}
|
||||
if (StringUtils.isNotBlank(l.getWebId())) {
|
||||
l.setWebId(getWebName(l.getWebId(),webList,msgProp));
|
||||
l.setWebId(getWebName(l.getWebId(),domainList,msgProp));
|
||||
}
|
||||
if (StringUtils.isNotBlank(l.getC2sPktNum()) && StringUtils.isNotBlank(l.getS2cPktNum()) ) {
|
||||
l.setTotalPkt(String.valueOf(Integer.valueOf(l.getC2sPktNum())+Integer.valueOf(l.getS2cPktNum())));
|
||||
@@ -283,8 +319,8 @@ public class NtcConnRecordLogController extends BaseController {
|
||||
public String getWebName(String id,List<WebsiteDomainTopic> list,Properties msgProp){
|
||||
String name=String.valueOf(id);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
if(String.valueOf(id).equals(list.get(i).getId())){
|
||||
name=msgProp.getProperty(list.get(i).getDomain(),list.get(i).getDomain());
|
||||
if(Long.valueOf(id).equals(list.get(i).getId())){
|
||||
name=list.get(i).getDomain();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user