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 { ...@@ -221,4 +221,33 @@ public class QualityRuleReport {
public void setChannelName(String channelName) { public void setChannelName(String channelName) {
this.channelName = 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; package com.hp.cmsz.repository;
import com.hp.cmsz.entity.QualityRuleInfo; 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.domain.Specification;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.Query;
...@@ -14,16 +16,17 @@ import java.util.List; ...@@ -14,16 +16,17 @@ import java.util.List;
public interface QualityRuleInfoDao extends JpaSpecificationExecutor<QualityRuleInfo>, public interface QualityRuleInfoDao extends JpaSpecificationExecutor<QualityRuleInfo>,
PagingAndSortingRepository<QualityRuleInfo, Long> { 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查找质量规则 //根据质量规则ID查找质量规则
QualityRuleInfo findByQualityRuleId(Long qualityRuleId); 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 <> '正常'") // @Query("from QualityRuleInfo qualityRuleInfo where qualityRuleInfo.provinceId = :provinceId and qualityRuleInfo.kpiId = :kpiId and qualityRuleInfo.warningType <>:type and qualityRuleInfo.businessTime between startTime and endTime ")
QualityRuleInfo findByProvinceIdAndKpiIdAndBusinessTimeBetween(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime); List<QualityRuleInfo> findByProvinceIdAndKpiIdAndWarningTypeIsNotAndBusinessTimeBetween(Long provinceId, Long kpiId,String type, Timestamp startTime, Timestamp endTime);
} }
...@@ -3,10 +3,16 @@ package com.hp.cmsz.service.analysissupport; ...@@ -3,10 +3,16 @@ package com.hp.cmsz.service.analysissupport;
import com.hp.cmsz.entity.QualityRuleInfo; import com.hp.cmsz.entity.QualityRuleInfo;
import com.hp.cmsz.entity.Time; import com.hp.cmsz.entity.Time;
import com.hp.cmsz.repository.QualityRuleInfoDao; import com.hp.cmsz.repository.QualityRuleInfoDao;
import org.apache.commons.lang3.StringUtils;
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.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -18,18 +24,45 @@ public class QualityRuleInfoService { ...@@ -18,18 +24,45 @@ public class QualityRuleInfoService {
@Autowired @Autowired
private QualityRuleInfoDao qualityRuleInfoDao; private QualityRuleInfoDao qualityRuleInfoDao;
public List<QualityRuleInfo> getQualityRuleInfoByLastDay(){ @PersistenceContext
return qualityRuleInfoDao.findQualityRuleInfo(); 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){ 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){
return qualityRuleInfoDao.findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndWarningTypeInAndBusinessTimeBetweenOrderByBusinessTimeDesc(dataSource,chnnal,busines,province,ifFilter,ifWarning,startTime, endTime); PageRequest pageRequest = buildPageRequest(pageNumber, pageSize, sortType, "qualityRuleId");
return qualityRuleInfoDao.findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndWarningTypeInAndBusinessTimeBetweenOrderByBusinessTimeDesc(dataSource,chnnal,busines,province,ifFilter,ifWarning,startTime, endTime,pageRequest);
} }
//根据省份ID、指标ID和业务时间查询质量规则运营明细 //根据省份ID、指标ID和业务时间查询质量规则运营明细
public QualityRuleInfo findBy(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime){ public List<QualityRuleInfo> findBy(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime){
return qualityRuleInfoDao.findByProvinceIdAndKpiIdAndBusinessTimeBetween(provinceId,kpiId,startTime,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; ...@@ -10,13 +10,17 @@ import com.hp.cmsz.service.CmszOperationLogService;
import com.hp.cmsz.service.analysissupport.QualityRuleInfoService; import com.hp.cmsz.service.analysissupport.QualityRuleInfoService;
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.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
...@@ -37,7 +41,7 @@ import java.util.Map; ...@@ -37,7 +41,7 @@ import java.util.Map;
*/ */
@Controller @Controller
@RequestMapping(value="AnalysisSupport/QualityRuleOperation") @RequestMapping(value="AnalysisSupport/QualityRuleOperation/*")
public class QualityRuleOperationController { public class QualityRuleOperationController {
@Autowired @Autowired
...@@ -64,13 +68,19 @@ public class QualityRuleOperationController { ...@@ -64,13 +68,19 @@ public class QualityRuleOperationController {
@Autowired @Autowired
private CmszOperationLogService cmszOperationLogService; private CmszOperationLogService cmszOperationLogService;
@RequestMapping(value = "") //返回到质量规则运营页面
public String ruleResultHome( @RequestMapping(value = "/home")
@RequestParam(value = "rulePageNum", defaultValue="1") String rulePageNum, public ModelAndView crawlDataManageHome(String selectTab) {
Map model){ ModelAndView modelAndView = new ModelAndView("AnalysisSupport/QualityRuleOperation");
//selectTab = CommonUtil.cleanXSS(selectTab);
List<QualityRuleInfo> qualityRuleInfoList = new ArrayList<QualityRuleInfo>(); 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(); List<Province> provinceList=(List<Province>)provinceDao.findAll();
//查询出所有的渠道信息 //查询出所有的渠道信息
...@@ -82,37 +92,32 @@ public class QualityRuleOperationController { ...@@ -82,37 +92,32 @@ public class QualityRuleOperationController {
List<String> businessList=businessService.getAllBusinessIdAndBusinessName(); List<String> businessList=businessService.getAllBusinessIdAndBusinessName();
//查询出所有的数据来源信息 //查询出所有的数据来源信息
List<DataSource> datasourceList=dataSourceDao.findDataSource(); 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 = "/queryOperationFrame")
@RequestMapping(value = "/operationChangeTable*", method = RequestMethod.GET) public ModelAndView queryFocusFrame(HttpServletRequest request,
@ResponseBody @RequestParam(value = "period") String period,// 时间
public void changeTable(@RequestParam(value = "period") String period,// 时间 @RequestParam(value = "dataSource") String dataSource,// 数据来源
@RequestParam(value = "dataSource") String dataSource,// 数据来源 @RequestParam(value = "chnnal") String chnnal,//渠道
@RequestParam(value = "chnnal") String chnnal,//渠道 @RequestParam(value = "bussines") String bussines,//业务
@RequestParam(value = "bussines") String bussines,//业务 @RequestParam(value = "province") String province,//省份
@RequestParam(value = "province") String province,//省份 @RequestParam(value = "ifFilter") String ifFilter,//是否过滤
@RequestParam(value = "ifFilter") String ifFilter,//是否过滤 @RequestParam(value = "ifWarning") String ifWarning,//是否告警
@RequestParam(value = "ifWarning") String ifWarning,//是否告警 @RequestParam(value = "sortType", defaultValue = "parameterId") String sortType,
HttpServletResponse response) throws ParseException, UnsupportedEncodingException { @RequestParam(value = "page", defaultValue = "1") int pageNumber,
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); @RequestParam(value = "pageSize", defaultValue = "30") int pageSize,
HttpServletResponse response) throws ParseException, UnsupportedEncodingException{
List<QualityRuleInfo> qualityRuleInfoList;
ModelAndView modelAndView = new ModelAndView("AnalysisSupport/RuleOperationTable");
QualityRuleInfo qualityRuleInfo = new QualityRuleInfo();
String[] dates=period.split("~"); String[] dates=period.split("~");
String[] dataSourceS=dataSource.split(","); String[] dataSourceS=dataSource.split(",");
String[] chnnalS=chnnal.split(","); String[] chnnalS=chnnal.split(",");
...@@ -128,20 +133,17 @@ public class QualityRuleOperationController { ...@@ -128,20 +133,17 @@ public class QualityRuleOperationController {
List<Long> provinceList=changeStrToList(provinceS); List<Long> provinceList=changeStrToList(provinceS);
List<Long> ifFilterList=changeStrToList(ifFilterS); List<Long> ifFilterList=changeStrToList(ifFilterS);
List<String> ifWarningList=changeStrToListstr(ifWarningS); List<String> ifWarningList=changeStrToListstr(ifWarningS);
qualityRuleInfoList = qualityRuleInfoService.getQualityRuleInfoBy(dataSourceList,chnnalList,bussinesList,provinceList,ifFilterList,ifWarningList,startTime,endTime); sortType = HtmlUtils.htmlEscape(sortType);
cmszOperationLogService.createLog("查询","数据质量运营","由筛选项得到数据质量运营"); // Page<QualityRuleInfo> qualityRuleInfoPage = qualityRuleInfoService.getQualityRuleInfoPage(qualityRuleInfo,pageNumber,pageSize,sortType);
Gson gson = new Gson(); Page<QualityRuleInfo> qualityRuleInfoPage = qualityRuleInfoService.getQualityRuleInfoBy(qualityRuleInfo, pageNumber, pageSize, sortType,dataSourceList,chnnalList,bussinesList,provinceList,ifFilterList,ifWarningList,startTime,endTime);
response.setContentType("text/Xml;charset=gbk"); modelAndView.addObject("qualityRuleInfoPage", qualityRuleInfoPage);
PrintWriter out = null; modelAndView.addObject("pageSize", pageSize);
try { modelAndView.addObject("sortType", sortType);
out = response.getWriter(); cmszOperationLogService.createLog("查询","质量规则运营","质量规则运营首页");
out.println(gson.toJson(qualityRuleInfoList)); return modelAndView;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} }
//将string数据类型转换成List<Long>类型 //将string数据类型转换成List<Long>类型
public List<Long> changeStrToList(String[] str){ public List<Long> changeStrToList(String[] str){
List<Long> list = new ArrayList<Long>(); List<Long> list = new ArrayList<Long>();
......
...@@ -80,9 +80,8 @@ public class QualityRuleReportController { ...@@ -80,9 +80,8 @@ public class QualityRuleReportController {
List<String> businessList=businessService.getAllBusinessIdAndBusinessName(); List<String> businessList=businessService.getAllBusinessIdAndBusinessName();
//查询出所有的数据来源信息 //查询出所有的数据来源信息
List<DataSource> datasourceList=dataSourceDao.findDataSource(); List<DataSource> datasourceList=dataSourceDao.findDataSource();
//查询出所有的运营质量规则 //查询出所有的质量规则报告
qualityRuleReportList = qualityRuleReportService.getQualityRuleReportByLastMonth(); qualityRuleReportList = qualityRuleReportService.getQualityRuleReportByLastMonth();
Gson gson = new Gson(); Gson gson = new Gson();
model.put("provinceList", provinceList); model.put("provinceList", provinceList);
model.put("channelList", channelList); model.put("channelList", channelList);
...@@ -166,16 +165,13 @@ public class QualityRuleReportController { ...@@ -166,16 +165,13 @@ public class QualityRuleReportController {
@RequestParam(value = "reportSumStartTime") String reportSumStartTime, @RequestParam(value = "reportSumStartTime") String reportSumStartTime,
@RequestParam(value = "reportSumEndTime") String reportSumEndTime, @RequestParam(value = "reportSumEndTime") String reportSumEndTime,
HttpServletResponse response) throws ParseException{ HttpServletResponse response) throws ParseException{
System.out.println(reportSumEndTime);
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
SimpleDateFormat sdf= new SimpleDateFormat("MMM d, yyyy K:m:s a", Locale.ENGLISH); SimpleDateFormat sdf= new SimpleDateFormat("MMM d, yyyy K:m:s a", Locale.ENGLISH);
Long province = Long.parseLong(provinceId); Long province = Long.parseLong(provinceId);
Long kpi = Long.parseLong(kpiId); Long kpi = Long.parseLong(kpiId);
Timestamp startTime = Timestamp.valueOf(sd.format(sdf.parse(reportSumStartTime))); Timestamp startTime = Timestamp.valueOf(sd.format(sdf.parse(reportSumStartTime)));
Timestamp endTime =Timestamp.valueOf(sd.format(sdf.parse(reportSumEndTime))); Timestamp endTime =Timestamp.valueOf(sd.format(sdf.parse(reportSumEndTime)));
System.out.println(startTime); List<QualityRuleInfo> qualityRuleInfo = (List<QualityRuleInfo>) qualityRuleInfoService.findBy(province,kpi,startTime,endTime);
System.out.println(endTime);
QualityRuleInfo qualityRuleInfo = qualityRuleInfoService.findBy(province,kpi,startTime,endTime);
cmszOperationLogService.createLog("查询","数据质量规则运营","查询数据质量规则运营明细"); cmszOperationLogService.createLog("查询","数据质量规则运营","查询数据质量规则运营明细");
Gson gson = new Gson(); Gson gson = new Gson();
response.setContentType("text/Xml;charset=gbk"); response.setContentType("text/Xml;charset=gbk");
......
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
<a href="#">数据质量核查</a> <a href="#">数据质量核查</a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="${ctx}/AnalysisSupport/QualityRuleResult">数据质量规则维护</a></li> <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/QualityRuleReport">数据质量报告</a></li>
<li><a href="${ctx}/AnalysisSupport/FilterRuleResult">过滤规则维护</a></li> <li><a href="${ctx}/AnalysisSupport/FilterRuleResult">过滤规则维护</a></li>
</ul> </ul>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<div id="ws" class="slide-menu-option"> <div id="ws" class="slide-menu-option">
<label>是否告警</label> <label>是否告警</label>
<select class="slide-menu-select" id="ifWarning" name="ifWarning"> <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>
<option value="及时性,准确性" title="告警"><a href="#">告警</a></option> <option value="及时性,准确性" title="告警"><a href="#">告警</a></option>
</select> </select>
...@@ -24,6 +25,6 @@ ...@@ -24,6 +25,6 @@
} }
function RelWarningRest() { function RelWarningRest() {
$("#ifWarning").val("正常"); $("#ifWarning").val("正常,及时性,准确性");
} }
</script> </script>
\ No newline at end of file
...@@ -576,13 +576,11 @@ ...@@ -576,13 +576,11 @@
$("#channel").val(getChannel); $("#channel").val(getChannel);
$("input[name='businessinput']").each(function(){ $("input[name='businessinput']").each(function(){
if($(this).val()==getBusinessinput){ if($(this).val()==getBusinessinput){
console.log( $(this))
$(this).attr("checked",true); $(this).attr("checked",true);
} }
}); });
$("input[name='kpiinput']").each(function(){ $("input[name='kpiinput']").each(function(){
if($(this).val()==getKpiinput){ if($(this).val()==getKpiinput){
console.log( $(this))
$(this).attr("checked",true); $(this).attr("checked",true);
} }
}); });
......
<%@ page language="java" pageEncoding="UTF-8"%> <%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ 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"%> <%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en"> <html lang="en">
<head> <head>
<title>全网监控智能分析平台</title> <title>全网监控智能分析平台</title>
<script type="text/javascript" src="${ctx}/static/js/modernizr.custom.js"></script>
<script type="text/javascript" src="${ctx}/static/js/classie.js"></script>
<script type="text/javascript" src="${ctx}/static/js/mlpushmenu.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#focus").click(
function() {
$("#dataFrame").attr('src', '${ctx}/AnalysisSupport/QualityRuleOperation/operationFrame');
});
$("#qualityRule").click(function () {
window.location.href="${ctx}/AnalysisSupport/QualityRuleResult";
});
$("#qualityReport").click(function () {
window.location.href="${ctx}/AnalysisSupport/QualityRuleReport";
});
$("#filterRule").click(function () {
window.location.href="${ctx}/AnalysisSupport/FilterRuleResult";
});
$("#${selectTab}").click();
});
</script>
</head> </head>
<body> <body>
<div id="sticky-wrap"></div> <div id="sticky-wrap"></div>
...@@ -16,7 +45,7 @@ ...@@ -16,7 +45,7 @@
<div class="container"> <div class="container">
<ol class="breadcrumb"> <ol class="breadcrumb">
<li><a href="${ctx}/index">首页</a></li> <li><a href="${ctx}/index">首页</a></li>
<li>数据质量核查</li> <li>运营支撑</li>
<li class="active">质量规则运营</li> <li class="active">质量规则运营</li>
</ol> </ol>
</div> </div>
...@@ -26,155 +55,29 @@ ...@@ -26,155 +55,29 @@
<div id="content" class="container"> <div id="content" class="container">
<div class="tab-bar-bt"> <div class="tab-bar-bt">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li><a href="${ctx}/AnalysisSupport/QualityRuleResult">数据质量规则维护</a></li> <li><a id="qualityRule" data-toggle="tab">数据质量规则维护</a></li>
<li class="active"><a href="#home" data-toggle="tab">数据质量运营</a></li> <li class="active"><a id="focus" data-toggle="tab">质量规则运营</a></li>
<li><a href="${ctx}/AnalysisSupport/QualityRuleReport">数据质量报告</a></li> <li><a id="qualityReport" data-toggle="tab">数据质量报告</a></li>
<li><a href="${ctx}/AnalysisSupport/FilterRuleResult">过滤规则维护</a></li> <li><a id="filterRule" data-toggle="tab">过滤规则维护</a></li>
</ul> </ul>
</div> </div>
<div class="section"> <div class="section">
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane fade in active" id="dataDiv">
<div class="tab-pane fade in active" id="home"> <div class="row me-row" style="margin-top:0px">
<div class="row me-row"> <div class="content clearfix">
<div class="row" style="margin-top:0px">
<div id="slidePushMenus2" class="cbp-spmenu-push"> <iframe id="dataFrame" style="height:580px"
scrolling="no"> </iframe>
<div class="slideMenu" id="cbp-spmenu-s2" style="">
<div class="form">
<tags:PeriodTag />
<tags:Public_ProvinceTag />
<tags:GJFX_datasource_channle_business/>
<tags:QualityRule_IfFilter />
<tags:QualityRuleInfo_IfWarning />
<button id="submit" class="btn btn-primary" onclick="operResultSubmit()">提交</button>
<button id="disable" class="btn btn-warning" onclick="operResultReset()">重置</button>
</div>
</div>
<div class="main col-xs-12">
<div id="mainm2" class="mainm" ></div>
<div class="content clearfix">
<div class="block clearfix">
<button id="showLeftPush2" class="menu-trigger btn btn-default" onclick="toggleMenu('slidePushMenus2')">
<span class="glyphicon glyphicon-list"></span>
</button>
<div class="slide-menu-tags">
<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 class="bt-list-import">
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="table-header">
数据质量规则运营结果
<shiro:hasAnyRoles name="admin,dataAnalysis,businessAnalysis">
<div id="time_div" style="top: -6px;float: right;height: 0px;position: relative;">
</div>
</shiro:hasAnyRoles>
</div>
<table id="ruleOperationTable" class="table table-hover table-striped">
</table>
<input type="hidden" id="qualityRuleInfo" name="qualityRuleInfo" value='${qualityRuleInfoList}' />
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<form action="#" method="get" id="listForm"></form>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="${ctx}/static/js/ruleOperationDetailTable.js"></script>
<script type="text/javascript">
initDate();
ruleOperationDetailTable();
function operResultSubmit(){
var period=getPeriodStr()
var dataSource=getStatsDataSourceCheckedValuesString();
var chnnal=getStatsChannelCheckedValuesString();
var bussines=getStatsBusinessCheckedValuesString();
var province=getProvinceCheckedValuesString();
var ifFilter=getIfFilter();
var ifWarning=getIfWarning();
if(dataSource==""){
$.alert("数据来源的选择不能为空");
}else if(chnnal===""){
$.alert("渠道的选择不能为空");
}else if(bussines===""){
$.alert("业务的选择不能为空");
}else if(province===""){
$.alert("省份的选择不能为空");
}else if(ifFilter==="") {
$.alert("是否过滤的选择不能为空");
}else if(ifWarning==="") {
$.alert("是否告警的选择不能为空");
}else{
toggleMenu('slidePushMenus');//隐藏筛选项
//时间标签
$('#PeriodTag').text("时间范围").attr('data-original-title',getPeriodStr()).tooltip();
//数据来源标签
$('#DataSourceTag').text("数据来源").append($("<span class='badge'></span>").text(getStatsDataSourceCheckedValues().length)).attr('data-original-title',getStatsDataSourceCheckedTitles()).tooltip();
//渠道标签
$('#ChannelTag').text("渠道").append($("<span class='badge'></span>").text(getStatsChannelCheckedValues().length)).attr('data-original-title',getStatsChannelCheckedTitles()).tooltip();
//业务标签
$('#BusinessTag').text("业务").append($("<span class='badge'></span>").text(getStatsBusinessCheckedValues().length)).attr('data-original-title',getStatsBusinessCheckedTitlesString()).tooltip();
//省份标签
$('#ProvinceTag').text("省份").append($("<span class='badge'></span>").text(getProvinceCheckedValues().length)).attr('data-original-title',getProvinceCheckedTitles()).tooltip();
//是否过滤
$('#ifFilterTag').text("是否过滤").attr('data-original-title', getIfFilterTitle()).tooltip();
//是否告警
$('#ifWarningTag').text("是否告警").attr('data-original-title', getIfWarningTitle()).tooltip();
if(period==""){
$.alert("时间选择不能为空");
}
$.ajax({
type : 'GET',
contentType : 'application/json',
url: "${ctx}/AnalysisSupport/QualityRuleOperation/operationChangeTable?period="+period+"&province="+province+"&dataSource="+dataSource+"&chnnal="+chnnal+"&bussines="+bussines+"&ifFilter="+ifFilter+"&ifWarning="+ifWarning,
dataType : 'text',
async: false,
beforeSend: function(data) {
},
success: function(data) {
$("#qualityRuleInfo").val(data);
ruleOperationDetailTable();
ruleId="";
toggleMenu('slidePushMenus2');//隐藏筛选项
updateTag(true);
}
});
}
}
function operResultReset(){
initDate();
ProvinceReset();
statsDataSourceReset();//三级联动重置
RelFilterRest();
RelWarningRest();
}
</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<div class="tab-bar-bt"> <div class="tab-bar-bt">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li><a href="${ctx}/AnalysisSupport/QualityRuleResult">数据质量规则维护</a></li> <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 class="active"><a href="#home" data-toggle="tab">数据质量报告</a></li>
<li><a href="${ctx}/AnalysisSupport/FilterRuleResult">过滤规则维护</a></li> <li><a href="${ctx}/AnalysisSupport/FilterRuleResult">过滤规则维护</a></li>
</ul> </ul>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div class="tab-bar-bt"> <div class="tab-bar-bt">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="active"><a href="#home" data-toggle="tab">数据质量规则维护</a></li> <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/QualityRuleReport">数据质量报告</a></li>
<li><a href="${ctx}/AnalysisSupport/FilterRuleResult">过滤规则维护</a></li> <li><a href="${ctx}/AnalysisSupport/FilterRuleResult">过滤规则维护</a></li>
</ul> </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>
<%@ 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"%>
<div class="table-header">质量规则运营
<div id="time_div" style="top: -6px;float: right;height: 0px;position: relative;">
</div>
</div>
<table class="table table-hover table-striped">
<thead>
<tr>
<th width="6.4%">质量规则ID</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%">指标CODE</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="${qualityRuleInfoPage.content}" var="qualityRuleInfo">
<tr>
<td><a href='javascript:;' onclick='selectRule(${qualityRuleInfo.qualityRuleId})'>${qualityRuleInfo.qualityRuleId}</a></td>
<td>${qualityRuleInfo.provinceName} </td>
<td>${qualityRuleInfo.dataSourceName}</td>
<td>${qualityRuleInfo.channelName}</td>
<td>${qualityRuleInfo.businessName}</td>
<td>${qualityRuleInfo.kpiName}</td>
<td>${qualityRuleInfo.kpiCode}</td>
<td>${qualityRuleInfo.warningType}</td>
<td>${qualityRuleInfo.kpiMonitorRunTime}</td>
<td>${qualityRuleInfo.businessTime}</td>
<td>
<c:if test="${qualityRuleInfo.ifFilter == '0'}">未过滤</c:if>
<c:if test="${qualityRuleInfo.ifFilter == '1'}">已过滤</c:if>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<tags:paging page="${qualityRuleInfoPage}" paginationSize="${pageSize}" />
<script>
//格式化日期
function Format(){
this.jsjava_class="jsjava.text.Format";
}
function DateFormat(){
this.jsjava_class="jsjava.text.DateFormat";
}
DateFormat.prototype=new Format();
DateFormat.prototype.constructor=DateFormat;
DateFormat.zh_cn_month2=["01","02","03","04","05","06","07","08","09","10","11","12"];
DateFormat.zh_cn_month3=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708",];
DateFormat.zh_cn_month4=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708",];
DateFormat.en_us_month4=["Janu","Febr","Marc","Apri","May","Juhn","July","Augu","Sept","Octo","Nove","Dece"];
DateFormat.en_us_month3=["Jan","Feb","Mar","Apr","May","Juh","Jul","Aug","Sep","Oct","Nov","Dec"];
DateFormat.en_us_month2=["01","02","03","04","05","06","07","08","09","10","11","12"];
DateFormat.zh_cn_week=["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"];
DateFormat.zh_cn_am="\u4e0b\u5348";
DateFormat.zh_cn_pm="\u4e0a\u5348";
DateFormat.language=(navigator.userLanguage==undefined?navigator.language:navigator.userLanguage).replace("-","_").toLowerCase();
DateFormat.prototype.format=function(date){
var year4=date.getFullYear();
var year2=year4.toString().substring(2);
var pattern=this.pattern;
pattern=pattern.replace(/yyyy/,year4);
pattern=pattern.replace(/yy/,year2);
var month=date.getMonth();
pattern=pattern.replace(/MMMM/,eval("DateFormat."+DateFormat.language+"_month4[month]"));
pattern=pattern.replace(/MMM/,eval("DateFormat."+DateFormat.language+"_month3[month]"));
pattern=pattern.replace(/MM/,eval("DateFormat."+DateFormat.language+"_month2[month]"));
var dayOfMonth=date.getDate();
var dayOfMonth2=dayOfMonth;
var dayOfMonthLength=dayOfMonth.toString().length;
if(dayOfMonthLength==1){
dayOfMonth2="0"+dayOfMonth;
}
pattern=pattern.replace(/dd/,dayOfMonth2);
pattern=pattern.replace(/d/,dayOfMonth);
var hours=date.getHours();
var hours2=hours;
var hoursLength=hours.toString().length;
if(hoursLength==1){
hours2="0"+hours;
}
pattern=pattern.replace(/HH/,hours2);
pattern=pattern.replace(/H/,hours);
var minutes=date.getMinutes();
var minutes2=minutes;
var minutesLength=minutes.toString().length;
if(minutesLength==1){
minutes2="0"+minutes;
}
pattern=pattern.replace(/mm/,minutes2);
pattern=pattern.replace(/m/,minutes);
var seconds=date.getSeconds();
var seconds2=seconds;
var secondsLength=seconds.toString().length;
if(secondsLength==1){
seconds2="0"+seconds;
}
pattern=pattern.replace(/ss/,seconds2);
pattern=pattern.replace(/s/,seconds);
var milliSeconds=date.getMilliseconds();
pattern=pattern.replace(/S+/,milliSeconds);
var day=date.getDay();
// pattern=pattern.replace(/E+/,eval("DateFormat."+DateFormat.language+"_week[day]"));
if(hours>12){
pattern=pattern.replace(/a+/,eval("DateFormat."+DateFormat.language+"_am"));
}else{
pattern=pattern.replace(/a+/,eval("DateFormat."+DateFormat.language+"_pm"));
}
var kHours=hours;
if(kHours==0){
kHours=24;
}
var kHours2=kHours;
var kHoursLength=kHours.toString().length;
if(kHoursLength==1){
kHours2="0"+kHours;
}
pattern=pattern.replace(/kk/,kHours2);
pattern=pattern.replace(/k/,kHours);
var KHours=hours;
if(hours>11){
KHours=hours-12;
}
var KHours2=KHours;
var KHoursLength=KHours.toString().length;
if(KHoursLength==1){
KHours2="0"+KHours;
}
pattern=pattern.replace(/KK/,KHours2);
pattern=pattern.replace(/K/,KHours);
var hHours=KHours;
if(hHours==0){
hHours=12;
}
var hHours2=hHours;
var hHoursLength=hHours.toString().length;
if(KHoursLength==1){
hHours2="0"+hHours;
}
pattern=pattern.replace(/hh/,hHours2);
pattern=pattern.replace(/h/,hHours);
return pattern;
};
function SimpleDateFormat(){
this.jsjava_class="jsjava.text.SimpleDateFormat";
}
SimpleDateFormat.prototype=new DateFormat();
SimpleDateFormat.prototype.constructor=SimpleDateFormat;
SimpleDateFormat.prototype.applyPattern=function(pattern){
this.pattern=pattern;
};
//查看数据质量规则
function selectRule(qualityRuleId) {
$.dialog({
title: "数据质量规则",
content: "<div id='ruleList'>" +
"<div class='col-xs-12'><div class='panel panel-default'><div class='panel-heading'>规则参数列表</div><div class='panel-body'> <table 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,
width: 800,
initialize: function () {
$.ajax({
type: 'GET',
contentType: 'application/json',
url: "/AnalysisSupport/QualityRuleOperation/findQuality?qualityRuleId=" + qualityRuleId,
dataType: 'text',
beforeSend: function (data) {
},
success: function (data) {
var ruleTbody = $('#ruleList tbody');
data = JSON.parse(data)
if (data.kpiMonitorTime.indexOf("/") != -1) {
var a = new Array();
a = data.kpiMonitorTime.split("/");
if (a[1] == "1440") {
data.kpiMonitorTime = a[0] + "分钟";
} else if (a[1] == "24") {
data.kpiMonitorTime = a[0] + "小时";
}
} else {
if (data.kpiMonitorTime.indexOf("ADD") != -1) {
data.kpiMonitorTime = data.kpiMonitorTime.substring(data.kpiMonitorTime.indexOf("(") + 1, data.kpiMonitorTime.length - 1) + "个月"
} else {
data.kpiMonitorTime = data.kpiMonitorTime + "天";
}
}
var df=new SimpleDateFormat();
df.applyPattern("yyyy-MM-dd HH:mm:ss");
if (data.businessTime != null) {
data.businessTime = df.format(new Date(data.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.calCycle + "</td>")
.append("<td>" + data.kpiMonitorTime + "</td>")
.append("<td>" + data.businessTime + "</td>"));
}
});
}
});
}
</script>
\ No newline at end of file
...@@ -302,6 +302,27 @@ table_pagging.prototype = { ...@@ -302,6 +302,27 @@ table_pagging.prototype = {
tdContext = "&nbsp;"; 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(k==15){
if(tdContext!="&nbsp;"){ if(tdContext!="&nbsp;"){
...@@ -527,26 +548,33 @@ function selectOperation(provinceId,kpiId,reportSumStartTime,reportSumEndTime){ ...@@ -527,26 +548,33 @@ function selectOperation(provinceId,kpiId,reportSumStartTime,reportSumEndTime){
beforeSend: function(data) { beforeSend: function(data) {
}, },
success: function(data) { success: function(data) {
var ruleTbody = $('#ruleList tbody'); for (var i = 0; i < data.length; i++) {
data = JSON.parse(data) if (data[i] == '\"') {
data = data.replace('\"', '\'');
if(data.kpiMonitorRunTime != null){ }
data.kpiMonitorRunTime = df.format(new Date(data.kpiMonitorRunTime));
} }
if(data.businessTime != null){ data = eval("(" + data + ")");
data.businessTime = df.format(new Date(data.businessTime)); 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].kpiMonitorRunTime + "</td>")
.append("<td>" + data[i].businessTime + "</td>"));
}
} }
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>"));
} }
}); });
} }
......
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