Commit 196ed4fc authored by liuna's avatar liuna

2017年12月4日 智能分析平台提交内容

--数据质量核查下质量规则运营页面数据修改
parent ac6f5966
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -32,7 +32,8 @@ public class QualityRuleInfo {
private String provinceName;
private String warningType;
private Long ifFilter;
private String warningReason;
private Long warningNum;
public Long getQualityRuleId() {
return qualityRuleId;
......@@ -171,6 +172,22 @@ public class QualityRuleInfo {
this.ifFilter = ifFilter;
}
public String getWarningReason() {
return warningReason;
}
public void setWarningReason(String warningReason) {
this.warningReason = warningReason;
}
public Long getWarningNum() {
return warningNum;
}
public void setWarningNum(Long warningNum) {
this.warningNum = warningNum;
}
@Override
public String toString() {
return "QualityRuleInfo{" +
......
package com.hp.cmsz.entity;
import javax.persistence.*;
import java.sql.Timestamp;
/**
* ccolap.quality_operation_detail_v视图对应的实体类
*
* @author Liu Na
*
*/
@Entity
@Table(name = "quality_operation_report_detail_v")
public class QualityRuleOperationDetail {
private Long qualityRuleId;
private Long kpiId;
private Long businessId;
private Long channelId;
private Long dataSourceId;
private Long provinceId;
private Long qualityVerificationResultId;
private Timestamp kpiMonitorRunTime;
private Timestamp businessTime;
private String kpiName;
private String kpiCode;
private String businessName;
private String channelName;
private String dataSourceName;
private String provinceName;
private String warningType;
private Long ifFilter;
private String warningReason;
private Long warningNum;
public Long getQualityRuleId() {
return qualityRuleId;
}
public void setQualityRuleId(Long qualityRuleId) {
this.qualityRuleId = qualityRuleId;
}
public Long getKpiId() {
return kpiId;
}
public void setKpiId(Long kpiId) {
this.kpiId = kpiId;
}
public Long getBusinessId() {
return businessId;
}
public void setBusinessId(Long businessId) {
this.businessId = businessId;
}
public Long getChannelId() {
return channelId;
}
public void setChannelId(Long channelId) {
this.channelId = channelId;
}
public Long getDataSourceId() {
return dataSourceId;
}
public void setDataSourceId(Long dataSourceId) {
this.dataSourceId = dataSourceId;
}
public Long getProvinceId() {
return provinceId;
}
public void setProvinceId(Long provinceId) {
this.provinceId = provinceId;
}
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public Long getQualityVerificationResultId() {
return qualityVerificationResultId;
}
public void setQualityVerificationResultId(Long qualityVerificationResultId) {
this.qualityVerificationResultId = qualityVerificationResultId;
}
public Timestamp getKpiMonitorRunTime() {
return kpiMonitorRunTime;
}
public void setKpiMonitorRunTime(Timestamp kpiMonitorRunTime) {
this.kpiMonitorRunTime = kpiMonitorRunTime;
}
public Timestamp getBusinessTime() {
return businessTime;
}
public void setBusinessTime(Timestamp businessTime) {
this.businessTime = businessTime;
}
public String getKpiName() {
return kpiName;
}
public void setKpiName(String kpiName) {
this.kpiName = kpiName;
}
public String getKpiCode() {
return kpiCode;
}
public void setKpiCode(String kpiCode) {
this.kpiCode = kpiCode;
}
public String getBusinessName() {
return businessName;
}
public void setBusinessName(String businessName) {
this.businessName = businessName;
}
public String getChannelName() {
return channelName;
}
public void setChannelName(String channelName) {
this.channelName = channelName;
}
public String getDataSourceName() {
return dataSourceName;
}
public void setDataSourceName(String dataSourceName) {
this.dataSourceName = dataSourceName;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public String getWarningType() {
return warningType;
}
public void setWarningType(String warningType) {
this.warningType = warningType;
}
public Long getIfFilter() {
return ifFilter;
}
public void setIfFilter(Long ifFilter) {
this.ifFilter = ifFilter;
}
public String getWarningReason() {
return warningReason;
}
public void setWarningReason(String warningReason) {
this.warningReason = warningReason;
}
public Long getWarningNum() {
return warningNum;
}
public void setWarningNum(Long warningNum) {
this.warningNum = warningNum;
}
}
......@@ -24,9 +24,10 @@ public interface QualityRuleInfoDao extends JpaSpecificationExecutor<QualityRule
QualityRuleInfo findByQualityRuleId(Long qualityRuleId);
//根据筛选项查找
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);
Page<QualityRuleInfo> findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndWarningTypeInAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(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.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);
//List<QualityRuleInfo> findByProvinceIdAndKpiIdAndWarningTypeIsNotAndBusinessTimeBetween(Long provinceId, Long kpiId,String type, Timestamp startTime, Timestamp endTime);
List<QualityRuleInfo> findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime);
}
......@@ -40,18 +40,17 @@ public class QualityRuleInfoService {
//根据筛选项获取质量规则
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);
return qualityRuleInfoDao.findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndWarningTypeInAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(dataSource,chnnal,busines,province,ifFilter,ifWarning,startTime, endTime,pageRequest);
}
//根据省份ID、指标ID和业务时间查询质量规则运营明细
// //根据省份ID、指标ID和业务时间查询质量规则运营明细
// public List<QualityRuleInfo> findBy(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime){
// return qualityRuleInfoDao.findByProvinceIdAndKpiIdAndWarningTypeIsNotAndBusinessTimeBetween(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);
return qualityRuleInfoDao.findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(provinceId,kpiId,startTime,endTime);
}
/**
* 创建分页请求.
*/
......
......@@ -93,7 +93,6 @@ public class QualityRuleConfigurationController {
@RequestMapping(value = "")
public String ruleMaintainHome(@RequestParam(value = "qualityRuleId", defaultValue ="") String qualityRuleId,
Map model){
System.out.println("qualityRuleId"+qualityRuleId);
staticQualityRuleId = qualityRuleId;
QualityRule qualityRule = null;
List<AccuracyRule> accuracyRuleList = null;
......
......@@ -168,7 +168,6 @@ public class QualityRuleReportController {
Long province = Long.parseLong(provinceId);
Long kpi = Long.parseLong(kpiId);
Timestamp startTime = Timestamp.valueOf(reportSumStartTime);
System.out.println(startTime);
Timestamp endTime =Timestamp.valueOf(reportSumEndTime);
List<QualityRuleInfo> qualityRuleInfo = (List<QualityRuleInfo>) qualityRuleInfoService.findBy(province,kpi,startTime,endTime);
cmszOperationLogService.createLog("查询","数据质量规则运营","查询数据质量规则运营明细");
......
......@@ -5,7 +5,7 @@
<!-- 质量规则报告类型 -->
<div id="ws" class="slide-menu-option">
<label>是否过滤</label>
<label>报告类型</label>
<select class="slide-menu-select" id="reportType" name="reportType">
<option value="1,2,3" title="全部"selected><a href="#">全部</a></option>
<option value="1" title="日报"><a href="#">日报</a></option>
......
......@@ -115,6 +115,7 @@
<td>
<input type="text" style="width: 20%;float: left" class="form-control" name="cycle" id="cycle" />
<select style="width: 12%;float: left" class="form-control" name="cycleUnit" id="unit" >
</select>
</td>
</tr>
......@@ -206,7 +207,9 @@
$("#cycle").val(value)
};
$("#ruleBack").click(function(){
location.href="${ctx}/AnalysisSupport/FilterRuleResult";
});
$('#ruleSubmit').click(function () {
var alertMsg = [];
......
......@@ -89,7 +89,13 @@
<script language="javascript">
function searchData() {
$("#businessSelectAreaStats").hide();
$('#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();
queryResult(1);
}
......
......@@ -19,8 +19,9 @@
<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>
<th width="6.4%">指标监控时间</th>
<%--<th width="6.4%">是否过滤</th>--%>
</tr>
</thead>
......@@ -36,6 +37,7 @@
<td>${qualityRuleInfo.kpiName}</td>
<td>${qualityRuleInfo.kpiCode}</td>
<td>${qualityRuleInfo.warningType}</td>
<td>${qualityRuleInfo.warningReason}</td>
<td>${qualityRuleInfo.kpiMonitorRunTime}</td>
<td>${qualityRuleInfo.businessTime}</td>
<%--<td>--%>
......@@ -165,12 +167,14 @@
SimpleDateFormat.prototype.applyPattern=function(pattern){
this.pattern=pattern;
};
var df=new SimpleDateFormat();
df.applyPattern("yyyy-MM-dd HH:mm:ss");
//查看数据质量规则
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 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,
......@@ -200,11 +204,11 @@
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));
}
console.log(data.businessTime)
ruleTbody.append($("<tr></tr>")
.append("<td>" + data.provinceName + "</td>")
.append("<td>" + data.dataSourceName + "</td>")
......
......@@ -356,15 +356,6 @@ table_pagging.prototype = {
tdTitle = tdContext;
}
if (this.header[k][3] && !(tdContext == "&nbsp;")) {
td.title = tdTitle;
tdContext = tdContext + "";
if (tdContext.length > parseInt(this.header[k][3])) {
tdContext = tdContext.substring(0,
this.header[k][3])
+ "..";
}
}
td.innerHTML = tdContext;
// alert(tdContext+"----i:"+i+",j:"+j+",k:"+k);
......
......@@ -534,12 +534,13 @@ table_pagging.prototype = {
//查看数据质量运营
function selectOperation(provinceId,kpiId,reportSumStartTime,reportSumEndTime){
$.dialog({
title:"数据质量规则运营明细",
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> </tr> </thead> <tbody> </tbody> </table> </div> </div> </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,
width:800,
height:500,
initialize:function(){
$.ajax({
type : 'GET',
......@@ -572,6 +573,7 @@ function selectOperation(provinceId,kpiId,reportSumStartTime,reportSumEndTime){
.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>"));
}
......
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