Commit 96875115 authored by 胡斌's avatar 胡斌

Merge remote-tracking branch 'origin/liuna'

# Conflicts: # .idea/workspace.xml
parents 499337df 2a4d65fe
......@@ -221,4 +221,33 @@ public class QualityRuleReport {
public void setChannelName(String channelName) {
this.channelName = channelName;
}
@Override
public String toString() {
return "QualityRuleReport{" +
"qualityVerificationReportId=" + qualityVerificationReportId +
", dataSourceId=" + dataSourceId +
", businessId=" + businessId +
", kpiId=" + kpiId +
", provinceId=" + provinceId +
", channelId=" + channelId +
", provinceName='" + provinceName + '\'' +
", dataSourceName='" + dataSourceName + '\'' +
", businessName='" + businessName + '\'' +
", channelName='" + channelName + '\'' +
", kpiName='" + kpiName + '\'' +
", kpiCode='" + kpiCode + '\'' +
", reportType='" + reportType + '\'' +
", reportName='" + reportName + '\'' +
", reportSumStartTime=" + reportSumStartTime +
", reportSumEndTime=" + reportSumEndTime +
", integralityNum=" + integralityNum +
", integralityPro=" + integralityPro +
", timelyNum=" + timelyNum +
", timelyPro=" + timelyPro +
", accuracyNum=" + accuracyNum +
", accuracyPro=" + accuracyPro +
", ifPredicted=" + ifPredicted +
'}';
}
}
package com.hp.cmsz.repository;
import com.hp.cmsz.entity.QualityRuleInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
......@@ -14,16 +16,17 @@ import java.util.List;
public interface QualityRuleInfoDao extends JpaSpecificationExecutor<QualityRuleInfo>,
PagingAndSortingRepository<QualityRuleInfo, Long> {
@Query("from QualityRuleInfo qualityRuleInfo where qualityRuleInfo.businessTime between timestampadd(D,-1,getdate()) and getdate() order by qualityRuleInfo.businessTime Desc")
List<QualityRuleInfo> findQualityRuleInfo();
@Query("from QualityRuleInfo qualityRuleInfo where qualityRuleInfo.businessTime between timestampadd(M,-1,getdate()) and getdate()")
Page<QualityRuleInfo> findByBusinessTime(Pageable pageable);
//根据质量规则ID查找质量规则
QualityRuleInfo findByQualityRuleId(Long qualityRuleId);
//根据筛选项查找
List<QualityRuleInfo> findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndWarningTypeInAndBusinessTimeBetweenOrderByBusinessTimeDesc(List<Long> dataSource, List<Long> chnnal, List<Long> busines, List<Long> province, List<Long> ifFilter,List<String> ifWarning,Timestamp startTime, Timestamp endTime);
Page<QualityRuleInfo> findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndWarningTypeInAndBusinessTimeBetweenOrderByBusinessTimeDesc(List<Long> dataSource, List<Long> chnnal, List<Long> busines, List<Long> province, List<Long> ifFilter,List<String> ifWarning,Timestamp startTime, Timestamp endTime,Pageable pageable);
@Query("from QualityRuleInfo qualityRuleInfo where qualityRuleInfo.warningType <> '正常'")
QualityRuleInfo findByProvinceIdAndKpiIdAndBusinessTimeBetween(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime);
// @Query("from QualityRuleInfo qualityRuleInfo where qualityRuleInfo.provinceId = :provinceId and qualityRuleInfo.kpiId = :kpiId and qualityRuleInfo.warningType <>:type and qualityRuleInfo.businessTime between startTime and endTime ")
List<QualityRuleInfo> findByProvinceIdAndKpiIdAndWarningTypeIsNotAndBusinessTimeBetween(Long provinceId, Long kpiId,String type, Timestamp startTime, Timestamp endTime);
}
......@@ -3,10 +3,16 @@ package com.hp.cmsz.service.analysissupport;
import com.hp.cmsz.entity.QualityRuleInfo;
import com.hp.cmsz.entity.Time;
import com.hp.cmsz.repository.QualityRuleInfoDao;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;
......@@ -18,18 +24,45 @@ public class QualityRuleInfoService {
@Autowired
private QualityRuleInfoDao qualityRuleInfoDao;
public List<QualityRuleInfo> getQualityRuleInfoByLastDay(){
return qualityRuleInfoDao.findQualityRuleInfo();
@PersistenceContext
EntityManager em;
// public List<QualityRuleInfo> getQualityRuleInfoByLastDay(){
// return qualityRuleInfoDao.findQualityRuleInfo();
// }
//生成分页
public Page<QualityRuleInfo> getQualityRuleInfoPage(QualityRuleInfo qualityRuleInfo,int pageNumber, int pageSize, String sortType) {
PageRequest pageRequest = buildPageRequest(pageNumber, pageSize, sortType, "qualityRuleId");
return qualityRuleInfoDao.findByBusinessTime(pageRequest);
}
//根据筛选项获取质量规则
public List<QualityRuleInfo> getQualityRuleInfoBy(List<Long> dataSource, List<Long> chnnal, List<Long> busines, List<Long>province, List<Long> ifFilter,List<String> ifWarning,Timestamp startTime, Timestamp endTime){
return qualityRuleInfoDao.findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndWarningTypeInAndBusinessTimeBetweenOrderByBusinessTimeDesc(dataSource,chnnal,busines,province,ifFilter,ifWarning,startTime, endTime);
public Page<QualityRuleInfo> getQualityRuleInfoBy(QualityRuleInfo qualityRuleInfo,int pageNumber, int pageSize, String sortType,List<Long> dataSource, List<Long> chnnal, List<Long> busines, List<Long>province, List<Long> ifFilter,List<String> ifWarning,Timestamp startTime, Timestamp endTime){
PageRequest pageRequest = buildPageRequest(pageNumber, pageSize, sortType, "qualityRuleId");
return qualityRuleInfoDao.findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndWarningTypeInAndBusinessTimeBetweenOrderByBusinessTimeDesc(dataSource,chnnal,busines,province,ifFilter,ifWarning,startTime, endTime,pageRequest);
}
//根据省份ID、指标ID和业务时间查询质量规则运营明细
public QualityRuleInfo findBy(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime){
return qualityRuleInfoDao.findByProvinceIdAndKpiIdAndBusinessTimeBetween(provinceId,kpiId,startTime,endTime);
public List<QualityRuleInfo> findBy(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime){
System.out.println(provinceId);
System.out.println(kpiId);
System.out.println(startTime);
System.out.println(endTime);
return qualityRuleInfoDao.findByProvinceIdAndKpiIdAndWarningTypeIsNotAndBusinessTimeBetween(provinceId,kpiId,"正常",startTime,endTime);
}
/**
* 创建分页请求.
*/
private PageRequest buildPageRequest(int pageNumber, int pagzSize, String sortType, String sortFiled) {
Sort sort = new Sort(Sort.Direction.DESC, sortFiled);
return new PageRequest(pageNumber - 1, pagzSize, sort);
}
public List getData(String jhql) {
List dataList = em.createNativeQuery(jhql).getResultList();
em.close();
return dataList;
}
}
......@@ -10,13 +10,17 @@ import com.hp.cmsz.service.CmszOperationLogService;
import com.hp.cmsz.service.analysissupport.QualityRuleInfoService;
import com.hp.cmsz.web.PageURLController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
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.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.util.HtmlUtils;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
......@@ -37,7 +41,7 @@ import java.util.Map;
*/
@Controller
@RequestMapping(value="AnalysisSupport/QualityRuleOperation")
@RequestMapping(value="AnalysisSupport/QualityRuleOperation/*")
public class QualityRuleOperationController {
@Autowired
......@@ -64,13 +68,19 @@ public class QualityRuleOperationController {
@Autowired
private CmszOperationLogService cmszOperationLogService;
@RequestMapping(value = "")
public String ruleResultHome(
@RequestParam(value = "rulePageNum", defaultValue="1") String rulePageNum,
Map model){
List<QualityRuleInfo> qualityRuleInfoList = new ArrayList<QualityRuleInfo>();
//返回到质量规则运营页面
@RequestMapping(value = "/home")
public ModelAndView crawlDataManageHome(String selectTab) {
ModelAndView modelAndView = new ModelAndView("AnalysisSupport/QualityRuleOperation");
//selectTab = CommonUtil.cleanXSS(selectTab);
selectTab = HtmlUtils.htmlEscape(selectTab);
modelAndView.addObject("selectTab", selectTab);
return modelAndView;
}
@RequestMapping(value = "/operationFrame")
public ModelAndView focus() {
ModelAndView modelAndView = new ModelAndView("AnalysisSupport/RuleOperation");
//查询出所有省份的信息
List<Province> provinceList=(List<Province>)provinceDao.findAll();
//查询出所有的渠道信息
......@@ -82,37 +92,32 @@ public class QualityRuleOperationController {
List<String> businessList=businessService.getAllBusinessIdAndBusinessName();
//查询出所有的数据来源信息
List<DataSource> datasourceList=dataSourceDao.findDataSource();
//查询出所有的运营质量规则
qualityRuleInfoList = qualityRuleInfoService.getQualityRuleInfoByLastDay();
Gson gson = new Gson();
model.put("provinceList", provinceList);
model.put("channelList", channelList);
model.put("kpiList", kpiList);
model.put("businessList",businessList);
model.put("datasourceList", datasourceList);
model.put("qualityRuleInfoList", gson.toJson(qualityRuleInfoList));
model.put("rulePageNum", rulePageNum);
cmszOperationLogService.createLog("查询","质量规则运营","质量规则运营首页");
return PageURLController.RuleOperation;
modelAndView.addObject("provinceList", provinceList);
modelAndView.addObject("channelList", channelList);
modelAndView.addObject("kpiList", kpiList);
modelAndView.addObject("businessList", businessList);
modelAndView.addObject("datasourceList", datasourceList);
return modelAndView;
}
//根据筛选项搜索
@RequestMapping(value = "/operationChangeTable*", method = RequestMethod.GET)
@ResponseBody
public void changeTable(@RequestParam(value = "period") String period,// 时间
@RequestMapping(value = "/queryOperationFrame")
public ModelAndView queryFocusFrame(HttpServletRequest request,
@RequestParam(value = "period") String period,// 时间
@RequestParam(value = "dataSource") String dataSource,// 数据来源
@RequestParam(value = "chnnal") String chnnal,//渠道
@RequestParam(value = "bussines") String bussines,//业务
@RequestParam(value = "province") String province,//省份
@RequestParam(value = "ifFilter") String ifFilter,//是否过滤
@RequestParam(value = "ifWarning") String ifWarning,//是否告警
HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
@RequestParam(value = "sortType", defaultValue = "parameterId") String sortType,
@RequestParam(value = "page", defaultValue = "1") int pageNumber,
@RequestParam(value = "pageSize", defaultValue = "30") int pageSize,
HttpServletResponse response) throws ParseException, UnsupportedEncodingException{
ModelAndView modelAndView = new ModelAndView("AnalysisSupport/RuleOperationTable");
QualityRuleInfo qualityRuleInfo = new QualityRuleInfo();
List<QualityRuleInfo> qualityRuleInfoList;
String[] dates=period.split("~");
String[] dataSourceS=dataSource.split(",");
String[] chnnalS=chnnal.split(",");
......@@ -128,20 +133,17 @@ public class QualityRuleOperationController {
List<Long> provinceList=changeStrToList(provinceS);
List<Long> ifFilterList=changeStrToList(ifFilterS);
List<String> ifWarningList=changeStrToListstr(ifWarningS);
qualityRuleInfoList = qualityRuleInfoService.getQualityRuleInfoBy(dataSourceList,chnnalList,bussinesList,provinceList,ifFilterList,ifWarningList,startTime,endTime);
cmszOperationLogService.createLog("查询","数据质量运营","由筛选项得到数据质量运营");
Gson gson = new Gson();
response.setContentType("text/Xml;charset=gbk");
PrintWriter out = null;
try {
out = response.getWriter();
out.println(gson.toJson(qualityRuleInfoList));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
sortType = HtmlUtils.htmlEscape(sortType);
// Page<QualityRuleInfo> qualityRuleInfoPage = qualityRuleInfoService.getQualityRuleInfoPage(qualityRuleInfo,pageNumber,pageSize,sortType);
Page<QualityRuleInfo> qualityRuleInfoPage = qualityRuleInfoService.getQualityRuleInfoBy(qualityRuleInfo, pageNumber, pageSize, sortType,dataSourceList,chnnalList,bussinesList,provinceList,ifFilterList,ifWarningList,startTime,endTime);
modelAndView.addObject("qualityRuleInfoPage", qualityRuleInfoPage);
modelAndView.addObject("pageSize", pageSize);
modelAndView.addObject("sortType", sortType);
cmszOperationLogService.createLog("查询","质量规则运营","质量规则运营首页");
return modelAndView;
}
//将string数据类型转换成List<Long>类型
public List<Long> changeStrToList(String[] str){
List<Long> list = new ArrayList<Long>();
......
......@@ -80,9 +80,8 @@ public class QualityRuleReportController {
List<String> businessList=businessService.getAllBusinessIdAndBusinessName();
//查询出所有的数据来源信息
List<DataSource> datasourceList=dataSourceDao.findDataSource();
//查询出所有的运营质量规则
//查询出所有的质量规则报告
qualityRuleReportList = qualityRuleReportService.getQualityRuleReportByLastMonth();
Gson gson = new Gson();
model.put("provinceList", provinceList);
model.put("channelList", channelList);
......@@ -166,16 +165,13 @@ public class QualityRuleReportController {
@RequestParam(value = "reportSumStartTime") String reportSumStartTime,
@RequestParam(value = "reportSumEndTime") String reportSumEndTime,
HttpServletResponse response) throws ParseException{
System.out.println(reportSumEndTime);
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
SimpleDateFormat sdf= new SimpleDateFormat("MMM d, yyyy K:m:s a", Locale.ENGLISH);
Long province = Long.parseLong(provinceId);
Long kpi = Long.parseLong(kpiId);
Timestamp startTime = Timestamp.valueOf(sd.format(sdf.parse(reportSumStartTime)));
Timestamp endTime =Timestamp.valueOf(sd.format(sdf.parse(reportSumEndTime)));
System.out.println(startTime);
System.out.println(endTime);
QualityRuleInfo qualityRuleInfo = qualityRuleInfoService.findBy(province,kpi,startTime,endTime);
List<QualityRuleInfo> qualityRuleInfo = (List<QualityRuleInfo>) qualityRuleInfoService.findBy(province,kpi,startTime,endTime);
cmszOperationLogService.createLog("查询","数据质量规则运营","查询数据质量规则运营明细");
Gson gson = new Gson();
response.setContentType("text/Xml;charset=gbk");
......
......@@ -273,7 +273,7 @@
<a href="#">数据质量核查</a>
<ul class="dropdown-menu">
<li><a href="${ctx}/AnalysisSupport/QualityRuleResult">数据质量规则维护</a></li>
<li><a href="${ctx}/AnalysisSupport/QualityRuleOperation">数据质量运营</a></li>
<li><a href="${ctx}/AnalysisSupport/QualityRuleOperation/home?selectTab=focus">数据质量运营</a></li>
<li><a href="${ctx}/AnalysisSupport/QualityRuleReport">数据质量报告</a></li>
<li><a href="${ctx}/AnalysisSupport/FilterRuleResult">过滤规则维护</a></li>
</ul>
......
......@@ -7,6 +7,7 @@
<div id="ws" class="slide-menu-option">
<label>是否告警</label>
<select class="slide-menu-select" id="ifWarning" name="ifWarning">
<option value="正常,及时性,准确性" title="全部"><a href="#">全部</a></option>
<option value="正常" title="正常"><a href="#">正常</a></option>
<option value="及时性,准确性" title="告警"><a href="#">告警</a></option>
</select>
......@@ -24,6 +25,6 @@
}
function RelWarningRest() {
$("#ifWarning").val("正常");
$("#ifWarning").val("正常,及时性,准确性");
}
</script>
\ No newline at end of file
......@@ -576,13 +576,11 @@
$("#channel").val(getChannel);
$("input[name='businessinput']").each(function(){
if($(this).val()==getBusinessinput){
console.log( $(this))
$(this).attr("checked",true);
}
});
$("input[name='kpiinput']").each(function(){
if($(this).val()==getKpiinput){
console.log( $(this))
$(this).attr("checked",true);
}
});
......
......@@ -27,7 +27,7 @@
<div class="tab-bar-bt">
<ul class="nav nav-tabs">
<li><a href="${ctx}/AnalysisSupport/QualityRuleResult">数据质量规则维护</a></li>
<li><a href="${ctx}/AnalysisSupport/QualityRuleOperation">数据质量运营</a></li>
<li><a href="${ctx}/AnalysisSupport/QualityRuleOperation/home?selectTab=focus">数据质量运营</a></li>
<li class="active"><a href="#home" data-toggle="tab">数据质量报告</a></li>
<li><a href="${ctx}/AnalysisSupport/FilterRuleResult">过滤规则维护</a></li>
</ul>
......
......@@ -26,7 +26,7 @@
<div class="tab-bar-bt">
<ul class="nav nav-tabs">
<li class="active"><a href="#home" data-toggle="tab">数据质量规则维护</a></li>
<li><a href="${ctx}/AnalysisSupport/QualityRuleOperation">数据质量运营</a></li>
<li><a href="${ctx}/AnalysisSupport/QualityRuleOperation/home?selectTab=focus">数据质量运营</a></li>
<li><a href="${ctx}/AnalysisSupport/QualityRuleReport">数据质量报告</a></li>
<li><a href="${ctx}/AnalysisSupport/FilterRuleResult">过滤规则维护</a></li>
</ul>
......
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<title>全网监控智能分析平台</title>
<%-- <script src="${ctx}/static/js/keleyi.min.js"></script> --%>
<script src="${ctx}/static/js/modernizr.custom.js"></script>
<script src="${ctx}/static/js/classie.js"></script>
<script src="${ctx}/static/js/slideCommon.js"></script>
<%-- <script src="${ctx}/static/js/mlpushmenu.js"></script> --%>
<script language="javascript">
$(document).ready(function(){
$("#businessSelectAreaStats").hide();
initDate();
queryResult(1);
});
</script>
</head>
<body>
<form action="#" method="get" id="listForm"></form>
<div id="main-tab-container">
<div id="content">
<div class="section" height="100%" style="overflow: visible">
<div class="tab-content">
<div class="row me-row">
<div id="slidePushMenus" class="cbp-spmenu-push">
<div class="slideMenu" id="cbp-spmenu-s1">
<div class="form">
<form id="queryForm" role="form" action="${ctx}/AnalysisSupport/QualityRuleOperation/focusFrame"
method="post">
<div class="slide-menu-option">
<tags:PeriodTag />
<tags:ProvinceTag/>
<tags:GJFX_datasource_channle_business/>
<tags:QualityRule_IfFilter />
<tags:QualityRuleInfo_IfWarning />
</div>
<div class="slide-menu-option">
<button type="input" class="btn btn-primary" onclick="searchData();return false;">提交</button>
<button type="reset" class="btn btn-warning">重置</button>
</div>
</form>
</div>
</div>
<div class="main col-xs-12">
<div id="mainm" class="mainm" onclick="disable()"></div>
<div class="content clearfix">
<div class="block clearfix">
<!-- <a href="#" id="trigger" class="menu-trigger"> <span class="glyphicon glyphicon-list"></span>
</a> -->
<div ><!-- class="slide-menu-tags" -->
<button id="showLeftPush" class="menu-trigger btn btn-default">
<span class="glyphicon glyphicon-list"></span>
</button>
<span id="PeriodTag" class="label label-info" data-placement="bottom" >最近一个月</span>
<span id="ProvinceTag" class="label label-info" data-placement="bottom"></span>
<span id="DataSourceTag" class="label label-info" data-placement="bottom" ></span>
<span id="ChannelTag3" class="label label-info" data-placement="bottom"></span>
<span id="BusinessTag" class="label label-info" data-placement="bottom" ></span>
<span id="ifFilterTag" class="label label-info" data-placement="bottom" ></span>
<span id="ifWarningTag" class="label label-info" data-placement="bottom" ></span>
</div>
</div>
<!-- Top Navigation -->
<div style="OVERFLOW-Y: auto; OVERFLOW-X:auto;height:500px;width:99%">
<!-- <div class="row"> -->
<div class="col-xs-12" id="resultList">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script language="javascript">
function searchData() {
$("#businessSelectAreaStats").hide();
queryResult(1);
}
function queryResult(page) {
$.ajax({
type : 'post',
'url' : '${ctx}/AnalysisSupport/QualityRuleOperation/queryOperationFrame',
data : "page=" + page +"&period="+getPeriodStr()+"&province="+getProvinceCheckedValues()+"&dataSource="+getStatsDataSourceCheckedValuesString()+"&chnnal="+getStatsChannelCheckedValuesString()+"&bussines="+getStatsBusinessCheckedValuesString()+"&ifFilter="+getIfFilter()+"&ifWarning="+getIfWarning(),
success : function(data) {
$('#resultList').html(data);
disable();
}
});
}
</script>
</body>
</html>
......@@ -302,6 +302,27 @@ table_pagging.prototype = {
tdContext = "&nbsp;";
}
if(k==9){
if(tdContext!="&nbsp;"){
var a = tdContext;
tdContext =(a*100).toFixed(0)+"%";
}
}
if(k==11){
if(tdContext!="&nbsp;"){
var a = tdContext;
tdContext =(a*100).toFixed(0)+"%";
}
}
if(k==13){
if(tdContext!="&nbsp;"){
var a = tdContext;
tdContext =(a*100).toFixed(0)+"%";
}
}
if(k==15){
if(tdContext!="&nbsp;"){
......@@ -527,26 +548,33 @@ function selectOperation(provinceId,kpiId,reportSumStartTime,reportSumEndTime){
beforeSend: function(data) {
},
success: function(data) {
for (var i = 0; i < data.length; i++) {
if (data[i] == '\"') {
data = data.replace('\"', '\'');
}
}
data = eval("(" + data + ")");
if (data != null && data != "") {
var ruleTbody = $('#ruleList tbody');
data = JSON.parse(data)
if(data.kpiMonitorRunTime != null){
data.kpiMonitorRunTime = df.format(new Date(data.kpiMonitorRunTime));
for (var i = 0; i < data.length; i++) {
if (data[i].kpiMonitorRunTime != null) {
data[i].kpiMonitorRunTime = df.format(new Date(data[i].kpiMonitorRunTime));
}
if(data.businessTime != null){
data.businessTime = df.format(new Date(data.businessTime));
if (data[i].businessTime != null) {
data[i].businessTime = df.format(new Date(data[i].businessTime));
}
ruleTbody.append($("<tr></tr>")
.append("<td>" + data.provinceName + "</td>")
.append("<td>" + data.dataSourceName + "</td>")
.append("<td>" + data.channelName + "</td>")
.append("<td>" + data.businessName + "</td>")
.append("<td>" + data.kpiName + "</td>")
.append("<td>" + data.kpiCode + "</td>")
.append("<td>" + data.kpiTypeName + "</td>")
.append("<td>" + data.warningType + "</td>")
.append("<td>" + data.kpiMonitorRunTime + "</td>")
.append("<td>" + data.businessTime + "</td>"));
.append("<td>" + data[i].provinceName + "</td>")
.append("<td>" + data[i].dataSourceName + "</td>")
.append("<td>" + data[i].channelName + "</td>")
.append("<td>" + data[i].businessName + "</td>")
.append("<td>" + data[i].kpiName + "</td>")
.append("<td>" + data[i].kpiCode + "</td>")
.append("<td>" + data[i].warningType + "</td>")
.append("<td>" + data[i].kpiMonitorRunTime + "</td>")
.append("<td>" + data[i].businessTime + "</td>"));
}
}
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment