Commit 445fbf80 authored by 胡斌's avatar 胡斌

Merge remote-tracking branch 'origin/liuna'

# Conflicts: # .idea/workspace.xml
parents 1c6e4772 793255b1
...@@ -185,4 +185,28 @@ public class QualityRuleOperationDetail { ...@@ -185,4 +185,28 @@ public class QualityRuleOperationDetail {
public void setWarningNum(Long warningNum) { public void setWarningNum(Long warningNum) {
this.warningNum = warningNum; this.warningNum = warningNum;
} }
@Override
public String toString() {
return "QualityRuleOperationDetail{" +
"qualityRuleId=" + qualityRuleId +
", kpiId=" + kpiId +
", businessId=" + businessId +
", channelId=" + channelId +
", dataSourceId=" + dataSourceId +
", provinceId=" + provinceId +
", kpiMonitorRunTime=" + kpiMonitorRunTime +
", businessTime=" + businessTime +
", kpiName='" + kpiName + '\'' +
", kpiCode='" + kpiCode + '\'' +
", businessName='" + businessName + '\'' +
", channelName='" + channelName + '\'' +
", dataSourceName='" + dataSourceName + '\'' +
", provinceName='" + provinceName + '\'' +
", warningType='" + warningType + '\'' +
", ifFilter=" + ifFilter +
", warningReason='" + warningReason + '\'' +
", warningNum=" + warningNum +
'}';
}
} }
...@@ -2,6 +2,8 @@ package com.hp.cmsz.repository; ...@@ -2,6 +2,8 @@ package com.hp.cmsz.repository;
import com.hp.cmsz.entity.QualityRuleOperationDetail; import com.hp.cmsz.entity.QualityRuleOperationDetail;
import com.hp.cmsz.entity.QualityRuleReport; import com.hp.cmsz.entity.QualityRuleReport;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.PagingAndSortingRepository;
...@@ -10,5 +12,6 @@ import java.util.List; ...@@ -10,5 +12,6 @@ import java.util.List;
public interface QualityRuleReportInfoDao extends JpaSpecificationExecutor<QualityRuleOperationDetail>, public interface QualityRuleReportInfoDao extends JpaSpecificationExecutor<QualityRuleOperationDetail>,
PagingAndSortingRepository<QualityRuleOperationDetail, Long> { PagingAndSortingRepository<QualityRuleOperationDetail, Long> {
List<QualityRuleOperationDetail> findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime);
Page<QualityRuleOperationDetail> findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime,Pageable pageable);
} }
...@@ -12,7 +12,7 @@ import org.springframework.data.repository.PagingAndSortingRepository; ...@@ -12,7 +12,7 @@ import org.springframework.data.repository.PagingAndSortingRepository;
public interface TSWB_YZDetailDataDao extends JpaSpecificationExecutor<TSWB_YZDetailData>, public interface TSWB_YZDetailDataDao extends JpaSpecificationExecutor<TSWB_YZDetailData>,
PagingAndSortingRepository<TSWB_YZDetailData, Long> { PagingAndSortingRepository<TSWB_YZDetailData, Long> {
Page<TSWB_YZDetailData> findByProcessingTime(String month, Pageable pageable); Page<TSWB_YZDetailData> findByFilingTime(String month, Pageable pageable);
} }
...@@ -52,6 +52,7 @@ public class QualityRuleInfoService { ...@@ -52,6 +52,7 @@ public class QualityRuleInfoService {
public List<QualityRuleReport> findBy(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime){ public List<QualityRuleReport> findBy(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime){
return qualityRuleInfoDao.findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(provinceId,kpiId,startTime,endTime); return qualityRuleInfoDao.findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(provinceId,kpiId,startTime,endTime);
} }
/** /**
* 创建分页请求. * 创建分页请求.
*/ */
......
package com.hp.cmsz.service.analysissupport; package com.hp.cmsz.service.analysissupport;
import com.hp.cmsz.entity.QualityRuleInfo;
import com.hp.cmsz.entity.QualityRuleOperationDetail; import com.hp.cmsz.entity.QualityRuleOperationDetail;
import com.hp.cmsz.entity.QualityRuleReport; import com.hp.cmsz.entity.QualityRuleReport;
import com.hp.cmsz.repository.QualityRuleReportInfoDao; import com.hp.cmsz.repository.QualityRuleReportInfoDao;
import org.springframework.beans.factory.annotation.Autowired; 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.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
@Service @Service
@Transactional @Transactional
public class QualityRuleReportInfoService { public class QualityRuleReportInfoService {
@Autowired @Autowired
private QualityRuleReportInfoDao qualityRuleReportInfoDao; private QualityRuleReportInfoDao qualityRuleReportInfoDao;
public List<QualityRuleOperationDetail> findBy(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime){ @PersistenceContext
return qualityRuleReportInfoDao.findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(provinceId,kpiId,startTime,endTime); EntityManager em;
public Page<QualityRuleOperationDetail> findBy(QualityRuleOperationDetail qualityRuleOperationDetail, int pageNumber, int pageSize, String sortType, Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime){
PageRequest pageRequest = buildPageRequest(pageNumber, pageSize, sortType, "qualityRuleId");
return qualityRuleReportInfoDao.findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(provinceId,kpiId,startTime,endTime,pageRequest);
}
/**
* 创建分页请求.
*/
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;
} }
} }
package com.hp.cmsz.service.analysissupport; package com.hp.cmsz.service.analysissupport;
import com.hp.cmsz.entity.QualityRule;
import com.hp.cmsz.repository.QualityRuleDao; import com.hp.cmsz.repository.QualityRuleDao;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
...@@ -17,9 +20,24 @@ import java.util.List; ...@@ -17,9 +20,24 @@ import java.util.List;
@Transactional @Transactional
public class QualityRuleService { public class QualityRuleService {
@PersistenceContext
protected EntityManager em;
@Autowired @Autowired
private QualityRuleDao qualityRuleDao; private QualityRuleDao qualityRuleDao;
//批量插入
@Transactional
public void insertIntoRule(List<QualityRule> qualityRules){
for (int i = 0; i < qualityRules.size(); i++) {
em.persist(qualityRules.get(i));
if (i % 100 == 0) {
em.flush();
em.clear();
}
}
}
//根据质量规则ID删除质量规则 //根据质量规则ID删除质量规则
@Transactional(readOnly=false) @Transactional(readOnly=false)
public void deleteByQualityRuleId(List<Long> qualityRuleId){ public void deleteByQualityRuleId(List<Long> qualityRuleId){
......
...@@ -98,11 +98,11 @@ public class TSWBAnalysisService { ...@@ -98,11 +98,11 @@ public class TSWBAnalysisService {
Date endTime) { Date endTime) {
List<SearchFilter> filterList = new ArrayList<SearchFilter>(); List<SearchFilter> filterList = new ArrayList<SearchFilter>();
if (startTime != null ) { if (startTime != null ) {
filterList.add(new SearchFilter("processingTime", SearchFilter.Operator.GTE, startTime)); filterList.add(new SearchFilter("filingTime", SearchFilter.Operator.GTE, startTime));
} }
if (endTime != null ) { if (endTime != null ) {
filterList.add(new SearchFilter("processingTime", SearchFilter.Operator.LTE, endTime)); filterList.add(new SearchFilter("filingTime", SearchFilter.Operator.LTE, endTime));
} }
Specification<TSWB_YZDetailData> spec = DynamicSpecifications.bySearchFilter(filterList, TSWB_YZDetailData.class); Specification<TSWB_YZDetailData> spec = DynamicSpecifications.bySearchFilter(filterList, TSWB_YZDetailData.class);
return spec; return spec;
......
...@@ -260,22 +260,18 @@ public class QualityRuleMaintainController { ...@@ -260,22 +260,18 @@ public class QualityRuleMaintainController {
@RequestParam(value="frequencyValue") String frequencyValue, @RequestParam(value="frequencyValue") String frequencyValue,
@RequestParam(value="businessTime") String businessTime, @RequestParam(value="businessTime") String businessTime,
HttpServletResponse response, HttpServletRequest request) throws ParseException { HttpServletResponse response, HttpServletRequest request) throws ParseException {
System.out.println("frequencyType:"+frequencyType+"kpiMonitorTimeValue:"+frequencyValue);
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List<Long> provinceIdList = new ArrayList<Long>(); List<Long> provinceIdList = new ArrayList<Long>();
for(int i=0;i<province.split(",").length;i++){ for(int i=0;i<province.split(",").length;i++){
provinceIdList.add(Long.parseLong(province.split(",")[i])); provinceIdList.add(Long.parseLong(province.split(",")[i]));
} }
List<Long> businessIdList = new ArrayList<Long>();
for(int i=0;i<business.split(",").length;i++){
businessIdList.add(Long.parseLong(business.split(",")[i]));
}
List<Long> kpiIdList = new ArrayList<Long>(); List<Long> kpiIdList = new ArrayList<Long>();
for(int i=0;i<kpi.split(",").length;i++){ for(int i=0;i<kpi.split(",").length;i++){
kpiIdList.add(Long.parseLong(kpi.split(",")[i])); kpiIdList.add(Long.parseLong(kpi.split(",")[i]));
} }
List<QualityRule> qualityRuleList = new ArrayList<QualityRule>();
for(int j=0; j<provinceIdList.size(); j++) { for(int j=0; j<provinceIdList.size(); j++) {
for(int l=0; l<kpiIdList.size(); l++){ for(int l=0; l<kpiIdList.size(); l++){
QualityRule qualityRule = new QualityRule(); QualityRule qualityRule = new QualityRule();
...@@ -312,17 +308,18 @@ public class QualityRuleMaintainController { ...@@ -312,17 +308,18 @@ public class QualityRuleMaintainController {
qualityRule.setRuleUpdateTime(Timestamp.valueOf(sd.format(new Date()))); qualityRule.setRuleUpdateTime(Timestamp.valueOf(sd.format(new Date())));
qualityRule.setRuleValidFlag("1"); qualityRule.setRuleValidFlag("1");
qualityRule.setIfSystemValue("1"); qualityRule.setIfSystemValue("1");
qualityRuleDao.save(qualityRule); cmszOperationLogService.createLog("增加", "新建质量模型","");
cmszOperationLogService.createLog("增加", "新建质量模型", "quality_rule_warehouse_info_t. QUALITY_RULE_ID=" + qualityRule.getQualityRuleId().toString());
Long qualityRuleId = qualityRule.getQualityRuleId(); Long qualityRuleId = qualityRule.getQualityRuleId();
if(!qualityRuleIdList.isEmpty()){ if(!qualityRuleIdList.isEmpty()){
accuracyRuleService.updateAccuracyRuleByAccuracyRuleIds(qualityRuleId, qualityRuleIdList); accuracyRuleService.updateAccuracyRuleByAccuracyRuleIds(qualityRuleId, qualityRuleIdList);
qualityRuleIdList.clear(); qualityRuleIdList.clear();
} }
qualityRuleList.add(qualityRule);
} }
} }
qualityRuleService.insertIntoRule(qualityRuleList);
return "redirect:/AnalysisSupport/QualityRuleResult"; return "redirect:/AnalysisSupport/QualityRuleResult";
} }
} }
...@@ -14,11 +14,14 @@ import com.hp.cmsz.service.analysissupport.QualityRuleReportInfoService; ...@@ -14,11 +14,14 @@ import com.hp.cmsz.service.analysissupport.QualityRuleReportInfoService;
import com.hp.cmsz.service.analysissupport.QualityRuleReportService; import com.hp.cmsz.service.analysissupport.QualityRuleReportService;
import com.hp.cmsz.web.PageURLController; import com.hp.cmsz.web.PageURLController;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.util.HtmlUtils;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
...@@ -162,31 +165,30 @@ public class QualityRuleReportController { ...@@ -162,31 +165,30 @@ public class QualityRuleReportController {
} }
//查看数据质量运营内容 //查看数据质量运营内容
@RequestMapping(value = "/findOperation*",method = RequestMethod.GET) @RequestMapping(value = "/findOperationFrame")
@ResponseBody public ModelAndView findQuality(
public void findQuality(
@RequestParam(value = "provinceId") String provinceId, @RequestParam(value = "provinceId") String provinceId,
@RequestParam(value = "kpiId") String kpiId, @RequestParam(value = "kpiId") String kpiId,
@RequestParam(value = "reportSumStartTime") String reportSumStartTime, @RequestParam(value = "reportSumStartTime") String reportSumStartTime,
@RequestParam(value = "reportSumEndTime") String reportSumEndTime, @RequestParam(value = "reportSumEndTime") String reportSumEndTime,
@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{ HttpServletResponse response) throws ParseException{
ModelAndView modelAndView = new ModelAndView("AnalysisSupport/ReportOperationTable");
QualityRuleOperationDetail qualityRuleOperationDetail = new QualityRuleOperationDetail();
Long province = Long.parseLong(provinceId); Long province = Long.parseLong(provinceId);
Long kpi = Long.parseLong(kpiId); Long kpi = Long.parseLong(kpiId);
Timestamp startTime = Timestamp.valueOf(reportSumStartTime); Timestamp startTime = Timestamp.valueOf(reportSumStartTime);
Timestamp endTime =Timestamp.valueOf(reportSumEndTime); Timestamp endTime =Timestamp.valueOf(reportSumEndTime);
List<QualityRuleOperationDetail> qualityRuleReportList = qualityRuleReportInfoService.findBy(province,kpi,startTime,endTime); sortType = HtmlUtils.htmlEscape(sortType);
Page<QualityRuleOperationDetail> qualityRuleOperationDetailPage = qualityRuleReportInfoService.findBy(qualityRuleOperationDetail, pageNumber, pageSize, sortType,province,kpi,startTime,endTime);
modelAndView.addObject("qualityRuleOperationDetailPage", qualityRuleOperationDetailPage);
modelAndView.addObject("pageSize", pageSize);
modelAndView.addObject("sortType", sortType);
cmszOperationLogService.createLog("查询","数据质量规则运营","查询数据质量运营明细"); cmszOperationLogService.createLog("查询","数据质量规则运营","查询数据质量运营明细");
Gson gson = new Gson();
response.setContentType("text/Xml;charset=gbk");
PrintWriter out = null;
try { return modelAndView;
out = response.getWriter();
out.println(gson.toJson(qualityRuleReportList));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} }
} }
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<table class="table table-hover table-striped">
<thead>
<tr>
<th width="6.4%">省份</th>
<th width="6.4%">数据来源</th>
<th width="6.4%">渠道</th>
<th width="6.4%">业务</th>
<th width="6.4%">指标名称</th>
<th width="6.4%">指标编码</th>
<th width="6.4%">告警类型</th>
<th width="6.4%">告警原因</th>
<th width="6.4%">指标监控范围</th>
<th width="6.4%">指标采集时间</th>
</tr>
</thead>
<tbody>
<c:forEach items="${qualityRuleOperationDetailPage.content}" var="qualityRuleOperationDetail">
<tr>
<td>${qualityRuleOperationDetail.provinceName} </td>
<td>${qualityRuleOperationDetail.dataSourceName}</td>
<td>${qualityRuleOperationDetail.channelName}</td>
<td>${qualityRuleOperationDetail.businessName}</td>
<td>${qualityRuleOperationDetail.kpiName}</td>
<td>${qualityRuleOperationDetail.kpiCode}</td>
<td>${qualityRuleOperationDetail.warningType}</td>
<td>${qualityRuleOperationDetail.warningReason}</td>
<td><fmt:formatDate value="${qualityRuleOperationDetail.kpiMonitorRunTime}" pattern="yyyy-MM-dd hh:mm:ss" /> </td>
<td><fmt:formatDate value="${qualityRuleOperationDetail.businessTime}" pattern="yyyy-MM-dd hh:mm:ss" /></td>
</tr>
</c:forEach>
</tbody>
</table>
<tags:paging page="${qualityRuleOperationDetailPage}" paginationSize="${pageSize}" />
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
<td>${qualityRuleInfo.kpiCode}</td> <td>${qualityRuleInfo.kpiCode}</td>
<td>${qualityRuleInfo.warningType}</td> <td>${qualityRuleInfo.warningType}</td>
<td>${qualityRuleInfo.warningReason}</td> <td>${qualityRuleInfo.warningReason}</td>
<td>${qualityRuleInfo.kpiMonitorRunTime}</td> <td><fmt:formatDate value="${qualityRuleInfo.kpiMonitorRunTime}" pattern="yyyy-MM-dd hh:mm:ss" /></td>
<td>${qualityRuleInfo.businessTime}</td> <td><fmt:formatDate value="${qualityRuleInfo.businessTime}" pattern="yyyy-MM-dd hh:mm:ss" /></td>
<%--<td>--%> <%--<td>--%>
<%--<c:if test="${qualityRuleInfo.ifFilter == '1'}">无过滤规则</c:if>--%> <%--<c:if test="${qualityRuleInfo.ifFilter == '1'}">无过滤规则</c:if>--%>
<%--<c:if test="${qualityRuleInfo.ifFilter == '0'}">过滤</c:if>--%> <%--<c:if test="${qualityRuleInfo.ifFilter == '0'}">过滤</c:if>--%>
......
...@@ -331,7 +331,6 @@ table_pagging.prototype = { ...@@ -331,7 +331,6 @@ table_pagging.prototype = {
} }
if(k==1){ if(k==1){
console.log(this.objectlist[i])
tdContext = "<a href='javascript:;' onclick='selectOperation(\""+this.getData(this.objectlist[i],"provinceId")+"\",\""+this.getData(this.objectlist[i],"kpiId")+"\",\""+this.getData(this.objectlist[i],"reportSumStartTime")+"\",\""+this.getData(this.objectlist[i],"reportSumEndTime")+"\")'>"+this.getData(this.objectlist[i],this.header[k][1])+"</a>"; tdContext = "<a href='javascript:;' onclick='selectOperation(\""+this.getData(this.objectlist[i],"provinceId")+"\",\""+this.getData(this.objectlist[i],"kpiId")+"\",\""+this.getData(this.objectlist[i],"reportSumStartTime")+"\",\""+this.getData(this.objectlist[i],"reportSumEndTime")+"\")'>"+this.getData(this.objectlist[i],this.header[k][1])+"</a>";
} }
...@@ -531,56 +530,39 @@ table_pagging.prototype = { ...@@ -531,56 +530,39 @@ table_pagging.prototype = {
} }
}; };
var province =null;
var kpi = null;
var startTime = null;
var endTime = null;
function queryOperation(page,provinceId,kpiId,reportSumStartTime,reportSumEndTime) {
province=provinceId;
kpi=kpiId;
startTime=reportSumStartTime;
endTime=reportSumEndTime;
$.ajax({
type : 'post',
'url' : 'QualityRuleReport/findOperationFrame',
data : "page=" + page +"&provinceId="+provinceId+"&kpiId="+kpiId+"&reportSumStartTime="+df.format(new Date(reportSumStartTime))+"&reportSumEndTime="+df.format(new Date(reportSumEndTime)),
success : function(data) {
$("#dataForm").html (data);
}
});
}
function queryResult(page) {
queryOperation(page,province,kpi,startTime,endTime);
}
//查看数据质量运营 //查看数据质量运营
function selectOperation(provinceId,kpiId,reportSumStartTime,reportSumEndTime){ function selectOperation(provinceId,kpiId,reportSumStartTime,reportSumEndTime){
$.dialog({ $.dialog({
title:"数据质量运营明细", title:"数据质量运营明细",
content:"<div id='ruleList'>"+ content:"<div style='width: 800px; height: 500px;overflow-y: scroll' id='dataForm'></div>",
"<div style='height: 500px;overflow-y: scroll;' class='col-xs-12'><div class='panel panel-default'><div class='panel-heading'></div><div class='panel-body'> <table style='height: 600px;' class='table table-hover table-striped'> <thead> <tr> <th width=''>省份</th> <th width=''>数据来源</th> <th width=''>渠道</th> <th width=''>业务</th> <th width=''>指标名称</th> <th width=''>指标编码</th> <th width=''>告警类型</th> <th width=''>告警原因</th> <th width=''>指标监控范围</th> <th width=''>指标采集时间</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div>"+
"</div>",
lock:true, lock:true,
width:800, width:800,
height:500, initialize:function() {
initialize:function(){ queryOperation(1,provinceId,kpiId,reportSumStartTime,reportSumEndTime);
$.ajax({
type : 'GET',
contentType : 'application/json',
url: "/AnalysisSupport/QualityRuleReport/findOperation?provinceId="+provinceId+"&kpiId="+kpiId+"&reportSumStartTime="+df.format(new Date(reportSumStartTime))+"&reportSumEndTime="+df.format(new Date(reportSumEndTime)),
dataType : 'text',
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');
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[i].businessTime != null) {
data[i].businessTime = df.format(new Date(data[i].businessTime));
}
ruleTbody.append($("<tr></tr>")
.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].warningReason + "</td>")
.append("<td>" + data[i].kpiMonitorRunTime + "</td>")
.append("<td>" + data[i].businessTime + "</td>"));
}
}
}
});
} }
}); });
} }
\ No newline at end of file
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