Commit 20ee8f77 authored by afe's avatar afe

Merge remote-tracking branch 'monitorAnalysis/liuna'

# Conflicts: # .idea/workspace.xml
parents 25f2cdf0 c86ed933
...@@ -1470,7 +1470,14 @@ ...@@ -1470,7 +1470,14 @@
<SOURCES /> <SOURCES />
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="library" name="lib" level="project" /> <orderEntry type="module-library">
<orderEntry type="library" name="servlet-api" level="application" /> <library>
<CLASSES>
<root url="jar://D:/CMSZMonitorAnalysis/apache-tomcat-7.0.47/lib/servlet-api.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component> </component>
</module> </module>
\ No newline at end of file
...@@ -24,8 +24,8 @@ public class AccuracyRule implements Serializable { ...@@ -24,8 +24,8 @@ public class AccuracyRule implements Serializable {
private Long accuracyRuleId;//准确性规则ID private Long accuracyRuleId;//准确性规则ID
private Long qualityRuleId;//质量规则ID private Long qualityRuleId;//质量规则ID
private String ruleType;//规则类型 private String ruleType;//规则类型
private double scopeMaxValue;//范围最大值 private String scopeMaxValue;//范围最大值
private double scopeMinValue;//范围最小值 private String scopeMinValue;//范围最小值
private String repeatedCheckGranularity;//重复考核粒度 private String repeatedCheckGranularity;//重复考核粒度
private Date repeatedCheckStartTime;//重复考核开始时间 private Date repeatedCheckStartTime;//重复考核开始时间
private Date repeatedCheckEndTime;//重复考核结束时间 private Date repeatedCheckEndTime;//重复考核结束时间
...@@ -58,16 +58,16 @@ public class AccuracyRule implements Serializable { ...@@ -58,16 +58,16 @@ public class AccuracyRule implements Serializable {
public void setRuleType(String ruleType) { public void setRuleType(String ruleType) {
this.ruleType = ruleType; this.ruleType = ruleType;
} }
public double getScopeMaxValue() { public String getScopeMaxValue() {
return scopeMaxValue; return scopeMaxValue;
} }
public void setScopeMaxValue(double scopeMaxValue) { public void setScopeMaxValue(String scopeMaxValue) {
this.scopeMaxValue = scopeMaxValue; this.scopeMaxValue = scopeMaxValue;
} }
public double getScopeMinValue() { public String getScopeMinValue() {
return scopeMinValue; return scopeMinValue;
} }
public void setScopeMinValue(double scopeMinValue) { public void setScopeMinValue(String scopeMinValue) {
this.scopeMinValue = scopeMinValue; this.scopeMinValue = scopeMinValue;
} }
public String getRepeatedCheckGranularity() { public String getRepeatedCheckGranularity() {
......
...@@ -41,6 +41,7 @@ public class Kpi implements Serializable{ ...@@ -41,6 +41,7 @@ public class Kpi implements Serializable{
private Long kpiTypeId; private Long kpiTypeId;
private Long kpiCycleTypeId; private Long kpiCycleTypeId;
private String isActive ; //是否有效,为Y时,才需要在筛选项中显示 private String isActive ; //是否有效,为Y时,才需要在筛选项中显示
private String calCycle;
public Long getKpiId() { public Long getKpiId() {
return kpiId; return kpiId;
...@@ -111,4 +112,7 @@ public class Kpi implements Serializable{ ...@@ -111,4 +112,7 @@ public class Kpi implements Serializable{
public void setIsActive(String isActive) { public void setIsActive(String isActive) {
this.isActive = isActive; this.isActive = isActive;
} }
public String getCalCycle(){ return calCycle;}
public void setCalCycle(String calCycle) { this.calCycle = calCycle;}
} }
...@@ -37,7 +37,7 @@ public class QualityRule { ...@@ -37,7 +37,7 @@ public class QualityRule {
@Id @Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="QualityRuleSequence") @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="QualityRuleSequence")
@SequenceGenerator(name = "QualityRuleSequence", sequenceName = "ccolap.quality_rule_deq", allocationSize=1) @SequenceGenerator(name = "QualityRuleSequence", sequenceName = "ccolap.quality_rule_seq", allocationSize=1)
public Long getQualityRuleId() { public Long getQualityRuleId() {
return qualityRuleId; return qualityRuleId;
} }
......
...@@ -34,7 +34,7 @@ public interface AccuracyRuleDao extends JpaSpecificationExecutor<AccuracyRule>, ...@@ -34,7 +34,7 @@ public interface AccuracyRuleDao extends JpaSpecificationExecutor<AccuracyRule>,
//根据准确性规则ID更新准确性规则信息 //根据准确性规则ID更新准确性规则信息
@Modifying @Modifying
@Query("update AccuracyRule ar set ar.ruleType=:ruleType, ar.scopeMaxValue=:scopeMaxValue, ar.scopeMinValue=:scopeMinValue, ar.repeatedCheckGranularity=:repeatedCheckGranularity, ar.repeatedCheckStartTime=:repeatedCheckStartTime, ar.repeatedCheckEndTime=:repeatedCheckEndTime, ar.ifRepeatedCheckSeries=:ifRepeatedCheckSeries, ar.repeatedCheckMaxTime=:repeatedCheckMaxTime, ar.ifRepeatedCheckSummation=:ifRepeatedCheckSummation where ar.accuracyRuleId =:accuracyRuleId") @Query("update AccuracyRule ar set ar.ruleType=:ruleType, ar.scopeMaxValue=:scopeMaxValue, ar.scopeMinValue=:scopeMinValue, ar.repeatedCheckGranularity=:repeatedCheckGranularity, ar.repeatedCheckStartTime=:repeatedCheckStartTime, ar.repeatedCheckEndTime=:repeatedCheckEndTime, ar.ifRepeatedCheckSeries=:ifRepeatedCheckSeries, ar.repeatedCheckMaxTime=:repeatedCheckMaxTime, ar.ifRepeatedCheckSummation=:ifRepeatedCheckSummation where ar.accuracyRuleId =:accuracyRuleId")
void updateAccuracyRuleByAccuracyRuleId(@Param("ruleType")String ruleType,@Param("scopeMaxValue")double scopeMaxValue,@Param("scopeMinValue")double scopeMinValue,@Param("repeatedCheckGranularity")String repeatedCheckGranularity,@Param("repeatedCheckStartTime")Date repeatedCheckStartTime,@Param("repeatedCheckEndTime")Date repeatedCheckEndTime,@Param("ifRepeatedCheckSeries")String ifRepeatedCheckSeries,@Param("repeatedCheckMaxTime")Long repeatedCheckMaxTime,@Param("ifRepeatedCheckSummation")String ifRepeatedCheckSummation,@Param("accuracyRuleId")Long accuracyRuleId); void updateAccuracyRuleByAccuracyRuleId(@Param("ruleType")String ruleType,@Param("scopeMaxValue")String scopeMaxValue,@Param("scopeMinValue")String scopeMinValue,@Param("repeatedCheckGranularity")String repeatedCheckGranularity,@Param("repeatedCheckStartTime")Date repeatedCheckStartTime,@Param("repeatedCheckEndTime")Date repeatedCheckEndTime,@Param("ifRepeatedCheckSeries")String ifRepeatedCheckSeries,@Param("repeatedCheckMaxTime")Long repeatedCheckMaxTime,@Param("ifRepeatedCheckSummation")String ifRepeatedCheckSummation,@Param("accuracyRuleId")Long accuracyRuleId);
//根据准确性规则ID删除一条准确性规则信息 //根据准确性规则ID删除一条准确性规则信息
@Modifying @Modifying
......
...@@ -26,9 +26,14 @@ public interface KpiDao extends JpaSpecificationExecutor<Kpi>,PagingAndSortingRe ...@@ -26,9 +26,14 @@ public interface KpiDao extends JpaSpecificationExecutor<Kpi>,PagingAndSortingRe
List<Kpi> findByBusinessIdIn(List<Long> businessIdList); List<Kpi> findByBusinessIdIn(List<Long> businessIdList);
List<Kpi> findByBusinessIdIn(Collection<Long> businessIdList); List<Kpi> findByBusinessIdIn(Collection<Long> businessIdList);
@Query("select kpi.kpiName, kpi.kpiCode from Kpi kpi where kpi.kpiId = :kpiId")
List<Kpi> findKpiCodeAndKpiNameByKpiId(@Param("kpiId") Long kpiId);
@Query("select kpi.kpiId, kpi.kpiName from Kpi kpi where kpi.kpiId >=0") @Query("select kpi.kpiId, kpi.kpiName from Kpi kpi where kpi.kpiId >=0")
List<Object[]> findAllKpiIdAndKpiName(); List<Object[]> findAllKpiIdAndKpiName();
//由指标名得到指标周期类型 //由指标名得到指标周期类型
@Query("select kpiCycleType.isHourKpi from Kpi kpi,KpiCycleType kpiCycleType where kpi.kpiCycleTypeId=kpiCycleType.kpiCycleTypeId and kpi.kpiName IN (:kpiName) and kpi.kpiId >=0") @Query("select kpiCycleType.isHourKpi from Kpi kpi,KpiCycleType kpiCycleType where kpi.kpiCycleTypeId=kpiCycleType.kpiCycleTypeId and kpi.kpiName IN (:kpiName) and kpi.kpiId >=0")
List<Object[]> findKpiCycleTypeByKpiName(@Param("kpiName") String kpiName); List<Object[]> findKpiCycleTypeByKpiName(@Param("kpiName") String kpiName);
...@@ -38,9 +43,9 @@ public interface KpiDao extends JpaSpecificationExecutor<Kpi>,PagingAndSortingRe ...@@ -38,9 +43,9 @@ public interface KpiDao extends JpaSpecificationExecutor<Kpi>,PagingAndSortingRe
@Query("select kpi.kpiId, kpi.kpiName from Kpi kpi,Business business where kpi.businessId=business.businessId and business.businessId IN (:businessIdList) and kpi.kpiId >=0") @Query("select kpi.kpiId, kpi.kpiName from Kpi kpi,Business business where kpi.businessId=business.businessId and business.businessId IN (:businessIdList) and kpi.kpiId >=0")
List<Object[]> findAllKpiIdAndKpiNameByBusinessId(@Param("businessIdList") List<Long> businessIdList); List<Object[]> findAllKpiIdAndKpiNameByBusinessId(@Param("businessIdList") List<Long> businessIdList);
//由业务联动得到指标 //由业务,采集频率联动得到指标
@Query("select kpi.kpiId, kpi.kpiName from Kpi kpi,Business business where business.businessId = kpi.businessId and kpi.isActive = 'Y' and business.businessId in (:businessIds) and kpi.kpiId>=0 order by kpi.kpiId ") @Query("select kpi.kpiId, kpi.kpiName from Kpi kpi,Business business where business.businessId = kpi.businessId and kpi.isActive = 'Y' and kpi.calCycle=:calCycleValue and business.businessId in (:businessIds) and kpi.kpiId>=0 order by kpi.kpiId ")
List<Object[]> findKpiIdAndKpiNameByBusinessIds(@Param("businessIds")List<Long> businessIdList); List<Object[]> findKpiIdAndKpiNameByBusinessIds(@Param("businessIds")List<Long> businessIdList, @Param("calCycleValue") String calCycleValue);
//由单个业务ID得到指标 //由单个业务ID得到指标
@Query("select kpi.kpiId, kpi.kpiName from Kpi kpi,Business business where kpi.businessId=business.businessId and business.businessId = :businessIdList and kpi.kpiId >=0") @Query("select kpi.kpiId, kpi.kpiName from Kpi kpi,Business business where kpi.businessId=business.businessId and business.businessId = :businessIdList and kpi.kpiId >=0")
......
...@@ -4,6 +4,7 @@ package com.hp.cmsz.repository; ...@@ -4,6 +4,7 @@ package com.hp.cmsz.repository;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
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;
import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.PagingAndSortingRepository;
...@@ -22,6 +23,7 @@ public interface ProvinceDao extends JpaSpecificationExecutor<Province>, ...@@ -22,6 +23,7 @@ public interface ProvinceDao extends JpaSpecificationExecutor<Province>,
List<Province> findByProvinceIdIn(List<Long> provinceIds); List<Province> findByProvinceIdIn(List<Long> provinceIds);
List<Province> findByProvinceId(Long provinceId);
@Query("from Province p where p.provinceId>=0 order by p.provinceId") @Query("from Province p where p.provinceId>=0 order by p.provinceId")
List<Province> findProvince(); List<Province> findProvince();
......
...@@ -29,7 +29,7 @@ public class AccuracyRuleService { ...@@ -29,7 +29,7 @@ public class AccuracyRuleService {
//根据准确性规则ID更新准确性规则 //根据准确性规则ID更新准确性规则
@Transactional(readOnly=false) @Transactional(readOnly=false)
public void updateAccuracyRuleByAccuracyRuleId(String ruleType,double scopeMaxValue,double scopeMinValue,String repeatedCheckGranularity,Date repeatedCheckStartTime,Date repeatedCheckEndTime,String ifRepeatedCheckSeries,Long repeatedCheckMaxTime,String ifRepeatedCheckSummation,Long accuracyRuleId){ public void updateAccuracyRuleByAccuracyRuleId(String ruleType,String scopeMaxValue,String scopeMinValue,String repeatedCheckGranularity,Date repeatedCheckStartTime,Date repeatedCheckEndTime,String ifRepeatedCheckSeries,Long repeatedCheckMaxTime,String ifRepeatedCheckSummation,Long accuracyRuleId){
accuracyRuleDao.updateAccuracyRuleByAccuracyRuleId(ruleType, scopeMaxValue, scopeMinValue, repeatedCheckGranularity, repeatedCheckStartTime, repeatedCheckEndTime, ifRepeatedCheckSeries, repeatedCheckMaxTime, ifRepeatedCheckSummation,accuracyRuleId); accuracyRuleDao.updateAccuracyRuleByAccuracyRuleId(ruleType, scopeMaxValue, scopeMinValue, repeatedCheckGranularity, repeatedCheckStartTime, repeatedCheckEndTime, ifRepeatedCheckSeries, repeatedCheckMaxTime, ifRepeatedCheckSummation,accuracyRuleId);
} }
......
...@@ -95,15 +95,15 @@ public class QualityRuleResultController { ...@@ -95,15 +95,15 @@ public class QualityRuleResultController {
//查询出所有的数据来源信息 //查询出所有的数据来源信息
List<DataSource> datasourceList=(List<DataSource>)dataSourceDao.findDataSource(); List<DataSource> datasourceList=(List<DataSource>)dataSourceDao.findDataSource();
//查询出所有的质量规则 //查询出所有的质量规则
List<QualityRule> qualityRuleList=(List<QualityRule>)qualityRuleDao.findAll(); List<QualityRule> qualityRuleViewList=(List<QualityRule>)qualityRuleDao.findAll();
Gson gson = new Gson(); Gson gson = new Gson();
model.put("provinceList", gson.toJson(provinceList)); model.put("provinceList", provinceList);
model.put("channelList", channelList); model.put("channelList", channelList);
model.put("kpiList", kpiList); model.put("kpiList", kpiList);
model.put("businessList",businessList); model.put("businessList",businessList);
model.put("datasourceList", datasourceList); model.put("datasourceList", datasourceList);
model.put("qualityRuleList", qualityRuleList); model.put("qualityRuleViewList", gson.toJson(qualityRuleViewList));
model.put("rulePageNum", rulePageNum); model.put("rulePageNum", rulePageNum);
cmszOperationLogService.createLog("查询","质量规则","质量规则首页"); cmszOperationLogService.createLog("查询","质量规则","质量规则首页");
......
...@@ -206,48 +206,7 @@ $("#createRule").click(function(){ ...@@ -206,48 +206,7 @@ $("#createRule").click(function(){
lock:true lock:true
}); });
//查看准确性规则
function lookParm(qualityRuleId){
$.dialog({
title:"准确性规则",
content:"<div id='paramList'>"+
"<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='20%'>参数ID号</th> <th width='35%'>参数名</th> <th width='20%'>参数值</th> <th width='25%'>参数类型</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div>"+
"</div>",
lock:true,
width:800,
initialize:function(){
$.ajax({
type : 'GET',
contentType : 'application/json',
url: "${ctx}/AnalysisSupport/QualityRuleResult/findAccuracy?qualityRuleId="+qualityRuleId,
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 paramTbody = $('#paramList tbody');
for(var i=0;i<data.length;i++){
if(data[i].parameterValue=="undefined" || data[i].parameterValue==null || data[i].parameterValue==""){
data[i].parameterValue="";
}
paramTbody.append($("<tr></tr>").append("<td>"+data[i].parameterId+"</td>")
.append("<td>"+data[i].parameterName+"</td>")
.append("<td>"+data[i].parameterValue+"</td>")
.append("<td>"+data[i].parameterDataType+"</td>"));
}
}
}
});
}
});
}
}); });
} }
</script> </script>
......
...@@ -417,6 +417,7 @@ printStackTrace.implementation.prototype = { ...@@ -417,6 +417,7 @@ printStackTrace.implementation.prototype = {
a = a || this.createException(); a = a || this.createException();
b = b || this.mode(a); b = b || this.mode(a);
if (b === "other") { if (b === "other") {
// noinspection JSAnnotator
return this.other(arguments.callee) return this.other(arguments.callee)
} else { } else {
return this[b](a) return this[b](a)
......
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