Commit 50f4355d authored by 莫林毅's avatar 莫林毅

Merge remote-tracking branch 'origin/master' into moly

parents 1ad6ab05 009b18e1
...@@ -12,7 +12,7 @@ local.ip.prefix=192.168 ...@@ -12,7 +12,7 @@ local.ip.prefix=192.168
#jdbc.driver=com.vertica.jdbc.Driver #jdbc.driver=com.vertica.jdbc.Driver
#vertica database ip address #vertica database ip address
jdbc.dbip=192.168.113.117 jdbc.dbip=hg-computer
jdbc.dbport=5433 jdbc.dbport=5433
......
//package com.hp.cmsz.entity;
//
//import javax.persistence.Entity;
//import javax.persistence.Table;
//
//@Entity
//@Table(name="etl.APP_EWARNING_DETAIL_T")
//public class APPEWarningDetail {
// private Long EwarningDetailId;
//// private Long EwarningDetailId;
//
//
//
//}
...@@ -38,7 +38,7 @@ public class AccuracyRule implements Serializable { ...@@ -38,7 +38,7 @@ public class AccuracyRule implements Serializable {
@Id @Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="AccuracyRuleSequence") @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="AccuracyRuleSequence")
@SequenceGenerator(name = "AccuracyRuleSequence", sequenceName = "accuracy_rule_info_t_seq", allocationSize=1) @SequenceGenerator(name = "AccuracyRuleSequence", sequenceName = "ccolap.accuracy_rule_seq", allocationSize=1)
public Long getAccuracyRuleId() { public Long getAccuracyRuleId() {
return accuracyRuleId; return accuracyRuleId;
......
...@@ -17,7 +17,7 @@ import javax.persistence.Table; ...@@ -17,7 +17,7 @@ import javax.persistence.Table;
* *
*/ */
@Entity @Entity
@Table(name = "dim_business_info_t") @Table(name = "dim_business_info_t",schema="ccolap")
public class Business implements Serializable{ public class Business implements Serializable{
private Long businessId ;//业务ID private Long businessId ;//业务ID
......
package com.hp.cmsz.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
* dim_kpi_t表对应的实体类
*
* @author Ma Wenmeng
*
*/
@Entity
@Table(name = "etl.dim_kpi_t")
public class DimKpi implements Serializable{
/**
*
*/
private Long kpiId;
private String code;
private String name;
private Long busnameId;
private Date crtTime;
private String crtUser;
private String currentVersion;
private Date invalidTime;
private Long origKpiId;
private Long kpiTypeId;
private String bacType;
private String isActive;
private Long kpiCycleTypeId;
private String calCycle;
private String ifPercentageKpi;
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="DimKpiSequence")
@SequenceGenerator(name = "DimKpiSequence", sequenceName = "dim_kpi_seq", allocationSize=1)
public Long getKpiId() {
return kpiId;
}
public void setKpiId(Long kpiId) {
this.kpiId = kpiId;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getBusnameId() {
return busnameId;
}
public void setBusnameId(Long busnameId) {
this.busnameId = busnameId;
}
public Date getCrtTime() {
return crtTime;
}
public void setCrtTime(Date crtTime) {
this.crtTime = crtTime;
}
public String getCrtUser() {
return crtUser;
}
public void setCrtUser(String crtUser) {
this.crtUser = crtUser;
}
public String getCurrentVersion() {
return currentVersion;
}
public void setCurrentVersion(String currentVersion) {
this.currentVersion = currentVersion;
}
public Date getInvalidTime() {
return invalidTime;
}
public void setInvalidTime(Date invalidTime) {
this.invalidTime = invalidTime;
}
public Long getOrigKpiId() {
return origKpiId;
}
public void setOrigKpiId(Long origKpiId) {
this.origKpiId = origKpiId;
}
public Long getKpiTypeId() {
return kpiTypeId;
}
public void setKpiTypeId(Long kpiTypeId) {
this.kpiTypeId = kpiTypeId;
}
public String getBacType() {
return bacType;
}
public void setBacType(String bacType) {
this.bacType = bacType;
}
public String getIsActive() {
return isActive;
}
public void setIsActive(String isActive) {
this.isActive = isActive;
}
public Long getKpiCycleTypeId() {
return kpiCycleTypeId;
}
public void setKpiCycleTypeId(Long kpiCycleTypeId) {
this.kpiCycleTypeId = kpiCycleTypeId;
}
public String getCalCycle() {
return calCycle;
}
public void setCalCycle(String calCycle) {
this.calCycle = calCycle;
}
public String getIfPercentageKpi() {
return ifPercentageKpi;
}
public void setIfPercentageKpi(String ifPercentageKpi) {
this.ifPercentageKpi = ifPercentageKpi;
}
}
...@@ -60,7 +60,6 @@ public class InsideXcdWorkingOrderInfo { ...@@ -60,7 +60,6 @@ public class InsideXcdWorkingOrderInfo {
@Id @Id
@GeneratedValue(strategy= GenerationType.SEQUENCE, generator="XcdWorkingOrderInfoSequence") @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="XcdWorkingOrderInfoSequence")
@SequenceGenerator(name = "XcdWorkingOrderInfoSequence", sequenceName = "seq_inner_Working_Order_id", allocationSize=1) @SequenceGenerator(name = "XcdWorkingOrderInfoSequence", sequenceName = "seq_inner_Working_Order_id", allocationSize=1)
public Long getInnerWorkingOrderId() { public Long getInnerWorkingOrderId() {
return innerWorkingOrderId; return innerWorkingOrderId;
} }
......
...@@ -25,6 +25,8 @@ public class ModelParameter implements Serializable{ ...@@ -25,6 +25,8 @@ public class ModelParameter implements Serializable{
private String parameterValue;//参数值 private String parameterValue;//参数值
private String parameterDataType;//参数数据类型 private String parameterDataType;//参数数据类型
private Long dataModelId;//数据模型ID private Long dataModelId;//数据模型ID
private Long taskId;//任务表ID
private Long ifSystemDefault;//是否系统默认
@Id @Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ModelParameterSequence") @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ModelParameterSequence")
...@@ -59,7 +61,16 @@ public class ModelParameter implements Serializable{ ...@@ -59,7 +61,16 @@ public class ModelParameter implements Serializable{
public void setDataModelId(Long dataModelId) { public void setDataModelId(Long dataModelId) {
this.dataModelId = dataModelId; this.dataModelId = dataModelId;
} }
public Long getTaskId() {
return taskId;
}
public void setTaskId(Long taskId) {
this.taskId = taskId;
}
public Long getIfSystemDefault() {
return ifSystemDefault;
}
public void setIfSystemDefault(Long ifSystemDefault) {
this.ifSystemDefault = ifSystemDefault;
}
} }
package com.hp.cmsz.entity; package com.hp.cmsz.entity;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date; import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.SequenceGenerator; import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/** /**
* quality_rule_warehouse_info_t表对应的实体类 * quality_rule_warehouse_info_t表对应的实体类
...@@ -14,27 +17,27 @@ import javax.persistence.SequenceGenerator; ...@@ -14,27 +17,27 @@ import javax.persistence.SequenceGenerator;
* @author Liu Na * @author Liu Na
* *
*/ */
@Entity
public class QualityRule implements Serializable { @Table(name = "quality_rule_warehouse_info_t")
public class QualityRule {
private Long qualityRuleId;//质量规则ID private Long qualityRuleId;//质量规则ID
private Long businessId;//业务ID private Long businessId;//业务ID
private Long kpiId;//指标ID private Long kpiId;//指标ID
private Long channelId;//渠道ID private Long channelId;//渠道ID
private Long provinceId;//省份维表ID private Long provinceId;//省份维表ID
private Long taskId;//任务ID
private Long dataSourceId;//数据来源ID private Long dataSourceId;//数据来源ID
private String kpiMonitorTime;//指标检测时间 private String kpiMonitorTime;//指标检测时间
private String kpiMonitorRange;//指标检查范围 private String kpiMonitorRunTime;
private double integrityThresholdValue;//完整性阈值 private String businessTime;//指标业务时间
private Long timelinessThresholdValue;//及时性阈值
private Date ruleCrtTime;//规则创建时间 private Date ruleCrtTime;//规则创建时间
private Date ruleUpdateTime;//规则更新时间 private Date ruleUpdateTime;//规则更新时间
private String rileValidFlag;//规则是否有效 private String ruleValidFlag;//规则是否有效
private String ifSystemValue;
@Id @Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="QualityRuleSequence") @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="QualityRuleSequence")
@SequenceGenerator(name = "QualityRuleSequence", sequenceName = "quality_rule_warehouse_info_t_seq", allocationSize=1) @SequenceGenerator(name = "QualityRuleSequence", sequenceName = "ccolap.quality_rule_deq", allocationSize=1)
public Long getQualityRuleId() { public Long getQualityRuleId() {
return qualityRuleId; return qualityRuleId;
} }
...@@ -65,12 +68,6 @@ public class QualityRule implements Serializable { ...@@ -65,12 +68,6 @@ public class QualityRule implements Serializable {
public void setProvinceId(Long provinceId) { public void setProvinceId(Long provinceId) {
this.provinceId = provinceId; this.provinceId = provinceId;
} }
public Long getTaskId() {
return taskId;
}
public void setTaskId(Long taskId) {
this.taskId = taskId;
}
public Long getDataSourceId() { public Long getDataSourceId() {
return dataSourceId; return dataSourceId;
} }
...@@ -83,23 +80,17 @@ public class QualityRule implements Serializable { ...@@ -83,23 +80,17 @@ public class QualityRule implements Serializable {
public void setKpiMonitorTime(String kpiMonitorTime) { public void setKpiMonitorTime(String kpiMonitorTime) {
this.kpiMonitorTime = kpiMonitorTime; this.kpiMonitorTime = kpiMonitorTime;
} }
public String getKpiMonitorRange() { public String getKpiMonitorRunTime() {
return kpiMonitorRange; return kpiMonitorRunTime;
}
public void setKpiMonitorRange(String kpiMonitorRange) {
this.kpiMonitorRange = kpiMonitorRange;
}
public double getIntegrityThresholdValue() {
return integrityThresholdValue;
} }
public void setIntegrityThresholdValue(double integrityThresholdValue) { public void setKpiMonitorRunTime(String kpiMonitorRunTime) {
this.integrityThresholdValue = integrityThresholdValue; this.kpiMonitorRunTime = kpiMonitorRunTime;
} }
public Long getTimelinessThresholdValue() { public String getBusinessTime() {
return timelinessThresholdValue; return businessTime;
} }
public void setTimelinessThresholdValue(Long timelinessThresholdValue) { public void setBusinessTime(String businessTime) {
this.timelinessThresholdValue = timelinessThresholdValue; this.businessTime = businessTime;
} }
public Date getRuleCrtTime() { public Date getRuleCrtTime() {
return ruleCrtTime; return ruleCrtTime;
...@@ -113,13 +104,17 @@ public class QualityRule implements Serializable { ...@@ -113,13 +104,17 @@ public class QualityRule implements Serializable {
public void setRuleUpdateTime(Date ruleUpdateTime) { public void setRuleUpdateTime(Date ruleUpdateTime) {
this.ruleUpdateTime = ruleUpdateTime; this.ruleUpdateTime = ruleUpdateTime;
} }
public String getRileValidFlag() { public String getRuleValidFlag() {
return rileValidFlag; return ruleValidFlag;
} }
public void setRileValidFlag(String rileValidFlag) { public void setRuleValidFlag(String ruleValidFlag) {
this.rileValidFlag = rileValidFlag; this.ruleValidFlag = ruleValidFlag;
}
public String getIfSystemValue() {
return ifSystemValue;
}
public void setIfSystemValue(String ifSystemValue) {
this.ifSystemValue = ifSystemValue;
} }
} }
...@@ -3,6 +3,7 @@ package com.hp.cmsz.entity.commonmanage; ...@@ -3,6 +3,7 @@ package com.hp.cmsz.entity.commonmanage;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.FetchType; import javax.persistence.FetchType;
...@@ -17,18 +18,13 @@ import javax.persistence.Temporal; ...@@ -17,18 +18,13 @@ import javax.persistence.Temporal;
import javax.persistence.TemporalType; import javax.persistence.TemporalType;
import javax.persistence.Transient; import javax.persistence.Transient;
import com.hp.cmsz.entity.DataModel; import com.hp.cmsz.entity.*;
@Entity @Entity
@Table(name = "RUN_TASK_T", schema = "ETL") @Table(name = "RUN_TASK_T", schema = "ETL")
public class RunTask { public class RunTask {
@Id @Id
//@TableGenerator(name = "ID_GENERATOR", table = "ID_GEN", pkColumnName = "GEN_NAME", pkColumnValue = "NBR_PK", valueColumnName = "GEN_VALUE", allocationSize = 1)
//@GeneratedValue(strategy = GenerationType.TABLE, generator = "ID_GENERATOR")
/*@GenericGenerator(name = "idGenerator", strategy = "uuid")
@GeneratedValue(generator = "idGenerator")*/
//@GeneratedValue(strategy = GenerationType.IDENTITY)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "RunTaskSequence") @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "RunTaskSequence")
@SequenceGenerator(name = "RunTaskSequence", sequenceName = "run_task_t_seq", allocationSize = 1) @SequenceGenerator(name = "RunTaskSequence", sequenceName = "run_task_t_seq", allocationSize = 1)
private Long taskId; private Long taskId;
...@@ -53,6 +49,27 @@ public class RunTask { ...@@ -53,6 +49,27 @@ public class RunTask {
@JoinColumn(name = "MODEL_ID") @JoinColumn(name = "MODEL_ID")
private DataModel dataModelView; private DataModel dataModelView;
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "province_id")
private Province provinceView;
private Long kpiId;
// @ManyToOne(fetch = FetchType.EAGER)
// @JoinColumn(name = "channel_id")
// private Channel channelView;
//
// @ManyToOne(fetch = FetchType.EAGER)
// @JoinColumn(name = "dataSource_id")
// private DataSource dataSourceView;
// @ManyToOne(fetch = FetchType.EAGER)
// @JoinColumn(name = "business_id")
// private Business businessView;
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date taskNextrunTime; private Date taskNextrunTime;
...@@ -179,7 +196,46 @@ public class RunTask { ...@@ -179,7 +196,46 @@ public class RunTask {
this.taskContext = taskContext; this.taskContext = taskContext;
} }
/*public String getParallelFlg() { public Province getProvinceView() {
return provinceView;
}
public void setProvinceView(Province provinceView) {
this.provinceView = provinceView;
}
public Long getKpiId() {
return kpiId;
}
public void setKpiId(Long kpiId) {
this.kpiId = kpiId;
}
// public Channel getChannelView() {
// return channelView;
// }
//
// public void setChannelView(Channel channelView) {
// this.channelView = channelView;
// }
//
// public DataSource getDataSourceView() {
// return dataSourceView;
// }
//
// public void setDataSourceView(DataSource dataSourceView) {
// this.dataSourceView = dataSourceView;
// }
//
// public Business getBusinessView() {
// return businessView;
// }
//
// public void setBusinessView(Business businessView) {
// this.businessView = businessView;
// }
/*public String getParallelFlg() {
return parallelFlg; return parallelFlg;
} }
......
...@@ -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); 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);
//根据准确性规则ID删除一条准确性规则信息 //根据准确性规则ID删除一条准确性规则信息
@Modifying @Modifying
......
...@@ -39,6 +39,10 @@ public interface BusinessDao extends JpaSpecificationExecutor<Business>, ...@@ -39,6 +39,10 @@ public interface BusinessDao extends JpaSpecificationExecutor<Business>,
@Query("select business.businessId, business.businessName from Business business,ChannelDataSourceMap channelDataSourceMap where business.channelDataSourceMapId=channelDataSourceMap.channelDataSourceMapId and channelDataSourceMap.channelId = :channelIdList and channelDataSourceMap.dataSourceId =:datasourceIdList and business.businessId >= 0 order by business.businessId") @Query("select business.businessId, business.businessName from Business business,ChannelDataSourceMap channelDataSourceMap where business.channelDataSourceMapId=channelDataSourceMap.channelDataSourceMapId and channelDataSourceMap.channelId = :channelIdList and channelDataSourceMap.dataSourceId =:datasourceIdList and business.businessId >= 0 order by business.businessId")
List<Object[]> findBusinessIdAndBusinessNameByDataSourceIdAndChannelId(@Param("channelIdList") Long channelIdList,@Param("datasourceIdList") Long datasourceIdList); List<Object[]> findBusinessIdAndBusinessNameByDataSourceIdAndChannelId(@Param("channelIdList") Long channelIdList,@Param("datasourceIdList") Long datasourceIdList);
//由单个数据来源ID和单个渠道ID得到业务,加入isActive=N
@Query("select business.businessId, business.businessName from Business business,ChannelDataSourceMap channelDataSourceMap where business.isActive = 'Y' and business.channelDataSourceMapId=channelDataSourceMap.channelDataSourceMapId and channelDataSourceMap.channelId = :channelId and channelDataSourceMap.dataSourceId =:datasourceId and business.businessId >= 0 order by business.businessId")
List<Object[]> findBusinessIdAndBusinessNameByDataSourceIdAndChannelIdWithIsActive(@Param("channelId") Long channelId,@Param("datasourceId") Long datasourceId);
@Query("select business.businessId, business.businessName from Business business,ChannelDataSourceMap channelDataSourceMap,Channel channel where channel.channelId=channelDataSourceMap.channelId and business.channelDataSourceMapId=channelDataSourceMap.channelDataSourceMapId and channel.channelName=:channelName and business.businessId >= 0 order by business.businessId") @Query("select business.businessId, business.businessName from Business business,ChannelDataSourceMap channelDataSourceMap,Channel channel where channel.channelId=channelDataSourceMap.channelId and business.channelDataSourceMapId=channelDataSourceMap.channelDataSourceMapId and channel.channelName=:channelName and business.businessId >= 0 order by business.businessId")
List<Object[]> findBusinessByChannelName(@Param("channelName")String channelName); List<Object[]> findBusinessByChannelName(@Param("channelName")String channelName);
......
...@@ -19,6 +19,9 @@ public interface ChannelDao extends JpaSpecificationExecutor<Channel>, ...@@ -19,6 +19,9 @@ public interface ChannelDao extends JpaSpecificationExecutor<Channel>,
@Query("from Channel channel where channel.channelId >=0 order by channel.channelId") @Query("from Channel channel where channel.channelId >=0 order by channel.channelId")
List<Channel> findChannel(); List<Channel> findChannel();
@Query("from Channel channel where channel.channelId >=0 and channel.channelId <>7 order by channel.channelId")
List<Channel> findChannelWithoutAll();
List<Channel> findByChannelIdInOrderByChannelIdAsc(List<Long> channelIdList); List<Channel> findByChannelIdInOrderByChannelIdAsc(List<Long> channelIdList);
@Query("select channel from Channel channel, ChannelDataSourceMap channelDataSourceMap where channelDataSourceMap.channelId=channel.channelId and channelDataSourceMap.dataSourceId =:datasourceId and channel.channelId >=0 order by channel.channelId") @Query("select channel from Channel channel, ChannelDataSourceMap channelDataSourceMap where channelDataSourceMap.channelId=channel.channelId and channelDataSourceMap.dataSourceId =:datasourceId and channel.channelId >=0 order by channel.channelId")
......
package com.hp.cmsz.repository;
import java.util.List;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import com.hp.cmsz.entity.DimKpi;
public interface DimKpiDao extends JpaSpecificationExecutor<DimKpi>,
PagingAndSortingRepository<DimKpi, Long>{
//通过kpiTypeId查找数据采集频率
@Query("select dk.calCycle from DimKpi dk where dk.kpiTypeId = ?1")
List<String> findCayCycleByKpiTypeIdIn(@Param("kpiTypeId")Long kpiTypeId);
//通过kpiTypeId修改数据采集频率
@Modifying
@Query("update from DimKpi dk set dk.calCycle=:calCycle where dk.kpiTypeId=:kpiTypeId")
void updateDimKpiByKpiTypeId(@Param("calCycle")String calCycle,@Param("kpiTypeId")Long kpiTypeId);
}
...@@ -38,6 +38,10 @@ public interface KpiDao extends JpaSpecificationExecutor<Kpi>,PagingAndSortingRe ...@@ -38,6 +38,10 @@ 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 ")
List<Object[]> findKpiIdAndKpiNameByBusinessIds(@Param("businessIds")List<Long> businessIdList);
//由单个业务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")
List<Object[]> findKpiIdAndKpiNameByBusinessId(@Param("businessIdList") Long businessIdList); List<Object[]> findKpiIdAndKpiNameByBusinessId(@Param("businessIdList") Long businessIdList);
......
...@@ -27,10 +27,13 @@ public interface ModelParameterDao extends JpaSpecificationExecutor<ModelParamet ...@@ -27,10 +27,13 @@ public interface ModelParameterDao extends JpaSpecificationExecutor<ModelParamet
@Modifying @Modifying
@Query("update ModelParameter mp set mp.parameterName=:parameterName,mp.parameterValue=:parameterValue, mp.parameterDataType=:parameterDataType where mp.parameterId =:parameterId") @Query("update ModelParameter mp set mp.parameterName=:parameterName,mp.parameterValue=:parameterValue, mp.parameterDataType=:parameterDataType where mp.parameterId =:parameterId")
void updateParamByParameterId(@Param("parameterName")String parameterName,@Param("parameterValue")String parameterValue,@Param("parameterDataType")String parameterDataType,@Param("parameterId")Long parameterId); void updateParamByParameterId(@Param("parameterName")String parameterName,@Param("parameterValue")String parameterValue,@Param("parameterDataType")String parameterDataType,@Param("parameterId")Long parameterId);
//根据数据模型ID查找参数d //根据数据模型ID查找参数d
List<ModelParameter> findByDataModelId(Long dataModelId); List<ModelParameter> findByDataModelId(Long dataModelId);
//根据数据模型ID查找系统默认的参数d
List<ModelParameter> findByDataModelIdAndIfSystemDefault(Long dataModelId, Long ifSystemDefault);
//根据数据模型ID查找参数d //根据数据模型ID查找参数d
List<ModelParameter> findByDataModelIdIn(List<Long> dataModelId); List<ModelParameter> findByDataModelIdIn(List<Long> dataModelId);
......
package com.hp.cmsz.repository; package com.hp.cmsz.repository;
import java.sql.Timestamp;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -20,7 +21,7 @@ import com.hp.cmsz.entity.QualityRule; ...@@ -20,7 +21,7 @@ import com.hp.cmsz.entity.QualityRule;
public interface QualityRuleDao extends JpaSpecificationExecutor<QualityRule>, public interface QualityRuleDao extends JpaSpecificationExecutor<QualityRule>,
PagingAndSortingRepository<QualityRule, Long>{ PagingAndSortingRepository<QualityRule, Long>{
List<QualityRule> findAll();
//根据质量规则ID查找质量规则 //根据质量规则ID查找质量规则
QualityRule findByQualityRuleId(Long qualityRuleId); QualityRule findByQualityRuleId(Long qualityRuleId);
...@@ -35,14 +36,14 @@ public interface QualityRuleDao extends JpaSpecificationExecutor<QualityRule>, ...@@ -35,14 +36,14 @@ public interface QualityRuleDao extends JpaSpecificationExecutor<QualityRule>,
//根据质量规则ID修改质量规则 //根据质量规则ID修改质量规则
@Modifying @Modifying
@Query("update from QualityRule qr set qr.businessId=:businessId, qr.kpiId=:kpiId, qr.channelId=:channelId, qr.provinceId=:provinceId, qr.dataSourceId=:dataSourceId, qr.kpiMonitorTime=:kpiMonitorTime, qr.kpiMonitorRange=:kpiMonitorRange,dm.integrityThresholdValue=:integrityThresholdValue, qr.timelinessThresholdValue=:timelinessThresholdValue, qr.ruleCrtTime=:ruleCrtTime, qr.ruleUpdateTime=:ruleUpdateTime where qr.qualityRuleId=:qualityRuleId") @Query("update from QualityRule qr set qr.businessId=:businessId, qr.kpiId=:kpiId, qr.channelId=:channelId, qr.provinceId=:provinceId, qr.dataSourceId=:dataSourceId, qr.kpiMonitorTime=:kpiMonitorTime, qr.kpiMonitorRunTime=:kpiMonitorRunTime, qr.businessTime=:businessTime, qr.ruleCrtTime=:ruleCrtTime, qr.ruleUpdateTime=:ruleUpdateTime where qr.qualityRuleId=:qualityRuleId")
void updateQualityRuleByQualityRuleId(@Param("businessId")Long businessId,@Param("kpiId")Long kpiId,@Param("channelId")Long channelId,@Param("provinceId")Long provinceId,@Param("dataSourceId")Long dataSourceId,@Param("kpiMonitorTime")String kpiMonitorTime,@Param("kpiMonitorRange")String kpiMonitorRange,@Param("integrityThresholdValue")double integrityThresholdValue,@Param("timelinessThresholdValue")Long timelinessThresholdValue,@Param("ruleCrtTime")Date ruleCrtTime,@Param("ruleUpdateTime")Date ruleUpdateTime,@Param("qualityRuleId")Long qualityRuleId); void updateQualityRuleByQualityRuleId(@Param("businessId")Long businessId,@Param("kpiId")Long kpiId,@Param("channelId")Long channelId,@Param("provinceId")Long provinceId,@Param("dataSourceId")Long dataSourceId,@Param("kpiMonitorTime")String kpiMonitorTime,@Param("kpiMonitorRunTime")String kpiMonitorRunTime,@Param("businessTime")String businessTime,@Param("ruleCrtTime")Date ruleCrtTime,@Param("ruleUpdateTime")Date ruleUpdateTime,@Param("qualityRuleId")Long qualityRuleId);
//根据质量规则ID得到数据条数 //根据质量规则ID得到数据条数
@Query("select count(*) from QualityRule qualityRule where qualityRule.qualityRuleId=:qualityRuleId") @Query("select count(*) from QualityRule qualityRule where qualityRule.qualityRuleId=:qualityRuleId")
Long getNumOfQualityRuleByQualityRuleId(@Param("qualityRuleId")String qualityRuleId); Long getNumOfQualityRuleByQualityRuleId(@Param("qualityRuleId")String qualityRuleId);
//根据省份、渠道、业务、指标查询质量规则 //根据省份、渠道、业务、数据来源筛选查询质量规则
List<QualityRule> findByProvinceIdInAndBusinessIdInAndKpiIdInAndChannelIdInOrderByQualityRuleIdDesc(List<Long> provinceId, List<Long> businessId, List<Long> kpiId, List<Long> channelId); List<QualityRule> findByProvinceIdInAndBusinessIdInAndDataSourceIdInAndChannelIdInOrderByQualityRuleIdDesc(Long[] province, Long[] business, Long[] datasource, Long[] channel);
} }
...@@ -30,6 +30,8 @@ public class BusinessService { ...@@ -30,6 +30,8 @@ public class BusinessService {
} }
public List<Business> getByChannelDataSourceMapIdIn(List<Long> channelDataSourceMapIdList){ public List<Business> getByChannelDataSourceMapIdIn(List<Long> channelDataSourceMapIdList){
return (List<Business>)businessDao.findByChannelDataSourceMapIdIn(channelDataSourceMapIdList); return (List<Business>)businessDao.findByChannelDataSourceMapIdIn(channelDataSourceMapIdList);
} }
......
...@@ -29,8 +29,8 @@ public class AccuracyRuleService { ...@@ -29,8 +29,8 @@ 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){ public void updateAccuracyRuleByAccuracyRuleId(String ruleType,double scopeMaxValue,double 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);; accuracyRuleDao.updateAccuracyRuleByAccuracyRuleId(ruleType, scopeMaxValue, scopeMinValue, repeatedCheckGranularity, repeatedCheckStartTime, repeatedCheckEndTime, ifRepeatedCheckSeries, repeatedCheckMaxTime, ifRepeatedCheckSummation,accuracyRuleId);
} }
//根据准确性规则ID删除一条准确性规则信息 //根据准确性规则ID删除一条准确性规则信息
......
package com.hp.cmsz.service.analysissupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.hp.cmsz.repository.DimKpiDao;
@Service
@Transactional
public class DimKpiService {
@Autowired
private DimKpiDao dimKpiDao;
//根据kpiTypeId修改数据采集频率
@Transactional(readOnly=false)
private void updateByKpiTypeId(String calCycle,Long kpiTypeId){
dimKpiDao.updateDimKpiByKpiTypeId(calCycle, kpiTypeId);
}
}
package com.hp.cmsz.service.analysissupport; package com.hp.cmsz.service.analysissupport;
import java.sql.Timestamp;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -7,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -7,6 +8,7 @@ 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 com.hp.cmsz.entity.QualityRule;
import com.hp.cmsz.repository.QualityRuleDao; import com.hp.cmsz.repository.QualityRuleDao;
/** /**
...@@ -21,6 +23,11 @@ public class QualityRuleService { ...@@ -21,6 +23,11 @@ public class QualityRuleService {
@Autowired @Autowired
private QualityRuleDao qualityRuleDao; private QualityRuleDao qualityRuleDao;
//根据筛选条件查询出质量规则
public List<QualityRule> getAllQualityRuleByOther(Long[] province,Long[] datasource,Long[] channel,Long[] business){
return qualityRuleDao.findByProvinceIdInAndBusinessIdInAndDataSourceIdInAndChannelIdInOrderByQualityRuleIdDesc(province, business, datasource, channel);
}
//根据质量规则ID删除质量规则 //根据质量规则ID删除质量规则
@Transactional(readOnly=false) @Transactional(readOnly=false)
public void deleteByQualityRuleId(List<Long> qualityRuleId){ public void deleteByQualityRuleId(List<Long> qualityRuleId){
...@@ -29,8 +36,8 @@ public class QualityRuleService { ...@@ -29,8 +36,8 @@ public class QualityRuleService {
//根据质量规则ID修改质量规则 //根据质量规则ID修改质量规则
@Transactional(readOnly=false) @Transactional(readOnly=false)
public void updateByQualityRuleId(Long businessId, Long kpiId, Long channelId, Long provinceId, Long dataSourceId, String kpiMonitorTime,String kpiMonitorRange,double integrityThresholdValue,Long timelinessThresholdValue ,Date ruleCrtTime,Date ruleUpdateTime,Long qualityRuleId){ public void updateByQualityRuleId(Long businessId, Long kpiId, Long channelId, Long provinceId, Long dataSourceId, String kpiMonitorTime,String kpiMonitorRunTime,String businessTime,Date ruleCrtTime,Date ruleUpdateTime,Long qualityRuleId){
qualityRuleDao.updateQualityRuleByQualityRuleId(businessId, kpiId, channelId, provinceId, dataSourceId, kpiMonitorTime, kpiMonitorRange, integrityThresholdValue, timelinessThresholdValue, ruleCrtTime, ruleUpdateTime, qualityRuleId); qualityRuleDao.updateQualityRuleByQualityRuleId(businessId, kpiId, channelId, provinceId, dataSourceId, kpiMonitorTime, kpiMonitorRunTime, businessTime, ruleCrtTime, ruleUpdateTime, qualityRuleId);
} }
} }
package com.hp.cmsz.web.analysissupport; package com.hp.cmsz.web.analysissupport;
import java.text.ParseException; import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
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.ResponseBody;
import com.google.gson.Gson;
import com.hp.cmsz.entity.AccuracyRule;
import com.hp.cmsz.entity.Business;
import com.hp.cmsz.entity.Channel;
import com.hp.cmsz.entity.DataSource;
import com.hp.cmsz.entity.DataType;
import com.hp.cmsz.entity.Kpi;
import com.hp.cmsz.entity.Province;
import com.hp.cmsz.entity.QualityRule;
import com.hp.cmsz.repository.AccuracyRuleDao;
import com.hp.cmsz.repository.BusinessDao;
import com.hp.cmsz.repository.ChannelDao;
import com.hp.cmsz.repository.DataSourceDao;
import com.hp.cmsz.repository.DataTypeDao;
import com.hp.cmsz.repository.KpiDao;
import com.hp.cmsz.repository.ProvinceDao;
import com.hp.cmsz.repository.QualityRuleDao;
import com.hp.cmsz.service.analysissupport.AccuracyRuleService;
import com.hp.cmsz.web.PageURLController; import com.hp.cmsz.web.PageURLController;
/** /**
...@@ -22,6 +46,109 @@ import com.hp.cmsz.web.PageURLController; ...@@ -22,6 +46,109 @@ import com.hp.cmsz.web.PageURLController;
@RequestMapping(value="AnalysisSupport/QualityRuleConfiguration") @RequestMapping(value="AnalysisSupport/QualityRuleConfiguration")
public class QualityRuleConfigurationController { public class QualityRuleConfigurationController {
// @Autowired
// private ProvinceDao provinceDao;
//
// @Autowired
// private ChannelDao channelDao;
//
// @Autowired
// private BusinessDao businessDao;
//
// @Autowired
// private KpiDao kpiDao;
//
// @Autowired
// private DataTypeDao dataTypeDao;
//
// @Autowired
// private DataSourceDao dataSourceDao;
//
// @Autowired
// private QualityRuleDao qualityRuleDao;
//
//// @Autowired
//// private QualityRuleService qualityRuleService;
//
// @Autowired
// private AccuracyRuleDao accuracyRuleDao;
//
// @Autowired
// private AccuracyRuleService accuracyRuleService;
////
//// @Autowired
//// private CmszOperationLogService cmszOperationLogService;
//
// @RequestMapping(value = "")
// public String ruleMaintainHome(@RequestParam(value = "qualityRuleId", defaultValue ="") String qualityRuleId,
// Map model){
//
// QualityRule qualityRule = null;
// List<AccuracyRule> accuracyRuleList = null;
// if(!qualityRuleId.trim().equals("")){
// qualityRule = qualityRuleDao.findByQualityRuleId(Long.parseLong(qualityRuleId));
// accuracyRuleList = accuracyRuleDao.findByQualityRuleId(Long.parseLong(qualityRuleId));
// }
//
// //查询出所有的省份
// List<Province> provinceList=(List<Province>)provinceDao.findProvince();
// //查询出所有的渠道信息
// List<Channel> channelList=(List<Channel>)channelDao.findChannelWithoutAll();
// //查询出所有的指标
// List<Kpi> kpiList=(List<Kpi>)kpiDao.findAll();
// //查询出所有的业务
// List<Business> businessList=(List<Business>)businessDao.findAll();
// //查询出所有的数据类型
// List<DataType> dataTypeList= (List<DataType>)dataTypeDao.findAll();
// //查询出所有的数据来源
// List<DataSource> dataSourceList=(List<DataSource>)dataSourceDao.findAll();
// Gson gson = new Gson();
// model.put("provinceList", provinceList);
// model.put("channelList", channelList);
// model.put("kpiList", kpiList);
// model.put("businessList", gson.toJson(businessList));
// model.put("dataTypeList", dataTypeList);
// model.put("dataSourceList", dataSourceList);
//
// return PageURLController.RuleConfiguration;
// }
//
// //修改准确性规则信息
// @RequestMapping(value = "/updateAccuracyRule*",method=RequestMethod.GET)
// @ResponseBody
// public void updateParameter(
// @RequestParam(value="ruleType") String ruleType,
// @RequestParam(value="scopeMaxValue") double scopeMaxValue,
// @RequestParam(value="scopeMinValue") double scopeMinValue,
// @RequestParam(value="repeatedCheckGranularity") String repeatedCheckGranularity,
// @RequestParam(value="repeatedCheckStartTime") Date repeatedCheckStartTime,
// @RequestParam(value="repeatedCheckEndTime") Date repeatedCheckEndTime,
// @RequestParam(value="ifRepeatedCheckSeries") String ifRepeatedCheckSeries,
// @RequestParam(value="repeatedCheckMaxTime") Long repeatedCheckMaxTime,
// @RequestParam(value="ifRepeatedCheckSummation") String ifRepeatedCheckSummation,
// @RequestParam(value="qualityRuleId")String qualityRuleId,
// @RequestParam(value="accuracyRuleId")String accuracyRuleId){
//
// if(qualityRuleId.trim().equals("")){
// AccuracyRule accuracyRule = new AccuracyRule();
// accuracyRule.setAccuracyRuleId(Long.parseLong(qualityRuleId));
// accuracyRule.setRuleType(ruleType);
// accuracyRule.setScopeMinValue(scopeMaxValue);
// accuracyRule.setScopeMinValue(scopeMinValue);
// accuracyRule.setRepeatedCheckGranularity(repeatedCheckGranularity);
// accuracyRule.setRepeatedCheckStartTime(repeatedCheckStartTime);
// accuracyRule.setRepeatedCheckEndTime(repeatedCheckEndTime);
// accuracyRule.setIfRepeatedCheckSeries(ifRepeatedCheckSeries);
// accuracyRule.setRepeatedCheckMaxTime(repeatedCheckMaxTime);
// accuracyRule.setIfRepeatedCheckSummation(ifRepeatedCheckSummation);
//
// accuracyRuleDao.save(accuracyRule);
// }else{
// accuracyRuleService.updateAccuracyRuleByAccuracyRuleId(ruleType, scopeMaxValue, scopeMinValue, repeatedCheckGranularity, repeatedCheckStartTime, repeatedCheckEndTime, ifRepeatedCheckSeries, repeatedCheckMaxTime, ifRepeatedCheckSummation, Long.parseLong(accuracyRuleId));;
// }
//
// }
@RequestMapping() @RequestMapping()
public String updateQualityRuleForm() { public String updateQualityRuleForm() {
......
package com.hp.cmsz.web.commonmanage; package com.hp.cmsz.web.commonmanage;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.util.List;
//import com.hp.cmsz.entity.APPEWarningDetail;
import com.hp.cmsz.entity.*;
import com.hp.cmsz.repository.*;
import com.hp.cmsz.service.PublicService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.regexp.RE;
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.Page;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
...@@ -19,6 +25,9 @@ import com.hp.cmsz.service.commonmanage.RunTaskService; ...@@ -19,6 +25,9 @@ import com.hp.cmsz.service.commonmanage.RunTaskService;
import com.hp.cmsz.service.commonmanage.TaskDetailService; import com.hp.cmsz.service.commonmanage.TaskDetailService;
import com.hp.cmsz.web.PageURLController; import com.hp.cmsz.web.PageURLController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller @Controller
@RequestMapping(value = "/BaseManage/TaskManage/*") @RequestMapping(value = "/BaseManage/TaskManage/*")
public class TaskManageController { public class TaskManageController {
...@@ -31,6 +40,25 @@ public class TaskManageController { ...@@ -31,6 +40,25 @@ public class TaskManageController {
@Autowired @Autowired
private CmszOperationLogService cmszOperationLogService; private CmszOperationLogService cmszOperationLogService;
@Autowired
private ModelParameterDao modelParameterDao;
@Autowired
private ChannelDao channelDao;
@Autowired
private DataSourceDao dataSourceDao;
@Autowired
private BusinessDao businessDao;
@Autowired
private com.hp.cmsz.repository.PublicDao PublicDao;
@Autowired
private ChannelDataSourceMapDao channelDataSourceMapDao;
@RequestMapping(value = "/taskHome") @RequestMapping(value = "/taskHome")
public ModelAndView taskHome(String selectTab) { public ModelAndView taskHome(String selectTab) {
ModelAndView modelAndView = new ModelAndView(PageURLController.TaskHome); ModelAndView modelAndView = new ModelAndView(PageURLController.TaskHome);
...@@ -80,6 +108,7 @@ public class TaskManageController { ...@@ -80,6 +108,7 @@ public class TaskManageController {
} }
Page<RunTask> taskList = runTaskService.getRunTaskPage(runTask, pageNumber, pageSize, sortType); Page<RunTask> taskList = runTaskService.getRunTaskPage(runTask, pageNumber, pageSize, sortType);
System.out.println(taskList.getSize());
modelAndView.addObject("taskList", taskList); modelAndView.addObject("taskList", taskList);
//modelAndView.addObject("queryCondition", runTask); //modelAndView.addObject("queryCondition", runTask);
modelAndView.addObject("pageSize", pageSize); modelAndView.addObject("pageSize", pageSize);
...@@ -125,19 +154,49 @@ public class TaskManageController { ...@@ -125,19 +154,49 @@ public class TaskManageController {
runTask = runTaskService.getRunTask(taskId); runTask = runTaskService.getRunTask(taskId);
} else { } else {
runTask = new RunTask(); runTask = new RunTask();
runTaskService.saveRunTask(runTask);//能够让模型参数根据任务id来进行关联,先把taskId传到前端
} }
if (StringUtils.isNotEmpty(defaultTaskType)) { if (StringUtils.isNotEmpty(defaultTaskType)) {
runTask.setDefaultTaskType(new Long(defaultTaskType)); runTask.setDefaultTaskType(new Long(defaultTaskType));
} }
//模型列表
List<DataModel> dataModelList = runTaskService.getDataModelViewList();
//默认第一个模型的参数列表
List<ModelParameter> modelParameterList = null;
if(dataModelList.size()!=0){
modelParameterList = modelParameterDao.findByDataModelIdAndIfSystemDefault(dataModelList.get(0).getDataModelId(),0L);
}
//查询出所以省份信息
List<Province> provinceList = (List<Province>) PublicDao.findAll();
//查询出所有的渠道信息
List<Channel> channelList=(List<Channel>)channelDao.findChannel();
//查询出所有的数据来源信息
List<DataSource> datasourceList=(List<DataSource>)dataSourceDao.findDataSource();
//查询出所有的业务
List<Business> businessList= (List<Business>) businessDao.findAll();
List<ChannelDataSourceMap> channelDataSourceMapList = (List<ChannelDataSourceMap>) channelDataSourceMapDao.findAll();
modelAndView.addObject("runTask", runTask); modelAndView.addObject("runTask", runTask);
modelAndView.addObject("provinceList", provinceList);
modelAndView.addObject("channelList", channelList);
modelAndView.addObject("datasourceList", datasourceList);
modelAndView.addObject("businessList", businessList);
modelAndView.addObject("channelDataSourceMapList", channelDataSourceMapList);
//modelAndView.addObject("isModel", isModel); //modelAndView.addObject("isModel", isModel);
modelAndView.addObject("taskGroupList", runTaskService.getTaskGroupList()); modelAndView.addObject("taskGroupList", runTaskService.getTaskGroupList());
/*modelAndView.addObject("taskTypeList", runTaskService.getTaskTypeList());*/ /*modelAndView.addObject("taskTypeList", runTaskService.getTaskTypeList());*/
modelAndView.addObject("sanboxList", taskDetailService.findTaskList(RunTaskDetail.TASK_TYPE_SANDBOX)); modelAndView.addObject("sanboxList", taskDetailService.findTaskList(RunTaskDetail.TASK_TYPE_SANDBOX));
modelAndView.addObject("recoverList", taskDetailService.findTaskList(RunTaskDetail.TASK_TYPE_RECOVER)); modelAndView.addObject("recoverList", taskDetailService.findTaskList(RunTaskDetail.TASK_TYPE_RECOVER));
modelAndView.addObject("dataModelList", runTaskService.getDataModelViewList()); modelAndView.addObject("dataModelList", dataModelList);
modelAndView.addObject("dataModelParameterList", modelParameterList);
modelAndView.addObject("taskTypeList", runTaskService.getTaskTypeList()); modelAndView.addObject("taskTypeList", runTaskService.getTaskTypeList());
cmszOperationLogService.createLog("新增", "模型任务", "RUN_TASK_T.taskId=" + runTask.getTaskId());
return modelAndView; return modelAndView;
} }
...@@ -175,6 +234,37 @@ public class TaskManageController { ...@@ -175,6 +234,37 @@ public class TaskManageController {
return url; return url;
} }
@RequestMapping(value = "/getModelParameterList")
@ResponseBody
public List<ModelParameter> getModelParameterList(String modelId){
return modelParameterDao.findByDataModelIdAndIfSystemDefault(Long.parseLong(modelId),0L);
}
@RequestMapping(value = "/createModelParam*", method = RequestMethod.GET)
@ResponseBody
public void createModelParam(
@RequestParam(value="paramName") String paramName,
@RequestParam(value="paramValue") String paramValue,
@RequestParam(value="paramType") String paramType,
@RequestParam(value="taskId") String taskId,
@RequestParam(value="modelId") String modelId,
HttpServletResponse response, HttpServletRequest request) {
ModelParameter modelParameter = new ModelParameter();
if(!paramName.trim().equals("")){modelParameter.setParameterName(paramName);}
if(!paramValue.trim().equals("")){modelParameter.setParameterValue(paramValue);}
if(!paramType.trim().equals("")){modelParameter.setParameterDataType(paramType);}
if(!taskId.trim().equals("")){modelParameter.setTaskId(Long.parseLong(taskId));}
if(!modelId.trim().equals("")){modelParameter.setDataModelId(Long.parseLong(modelId));}
modelParameter.setIfSystemDefault(1L);
modelParameterDao.save(modelParameter);
}
@RequestMapping(value = "/taskDeleteFrame") @RequestMapping(value = "/taskDeleteFrame")
public String taskDeleteFrame(Long taskId, @RequestParam(required = false) String defaultTaskType) { public String taskDeleteFrame(Long taskId, @RequestParam(required = false) String defaultTaskType) {
runTaskService.deleteRunTask(taskId); runTaskService.deleteRunTask(taskId);
...@@ -198,4 +288,13 @@ public class TaskManageController { ...@@ -198,4 +288,13 @@ public class TaskManageController {
@RequestParam(required = false) String defaultTaskType) throws UnsupportedEncodingException { @RequestParam(required = false) String defaultTaskType) throws UnsupportedEncodingException {
return runTaskService.checkNameAndCode(java.net.URLDecoder.decode(name, "UTF-8"), code, id, defaultTaskType); return runTaskService.checkNameAndCode(java.net.URLDecoder.decode(name, "UTF-8"), code, id, defaultTaskType);
} }
// public APPEWarningDetail ModelPreview(String id){
//
//
// return null;
// };
} }
\ No newline at end of file
...@@ -109,9 +109,8 @@ public class ModelMaintainController { ...@@ -109,9 +109,8 @@ public class ModelMaintainController {
if(!paramName.trim().equals("")){modelParameter.setParameterName(paramName);} if(!paramName.trim().equals("")){modelParameter.setParameterName(paramName);}
if(!paramValue.trim().equals("")){modelParameter.setParameterValue(paramValue);} if(!paramValue.trim().equals("")){modelParameter.setParameterValue(paramValue);}
if(!paramType.trim().equals("")){modelParameter.setParameterDataType(paramType);} if(!paramType.trim().equals("")){modelParameter.setParameterDataType(paramType);}
modelParameter.setIfSystemDefault(0L);
modelParameterDao.save(modelParameter); modelParameterDao.save(modelParameter);
Long dataModelId = modelParameter.getParameterId(); Long dataModelId = modelParameter.getParameterId();
dataModelIdList.add(dataModelId); dataModelIdList.add(dataModelId);
} }
......
...@@ -103,7 +103,7 @@ public class ModelParameterConfigurationController { ...@@ -103,7 +103,7 @@ public class ModelParameterConfigurationController {
if(!dataModelId.trim().equals("")){ if(!dataModelId.trim().equals("")){
dataModel = dataModelDao.findByDataModelId(Long.parseLong(dataModelId)); dataModel = dataModelDao.findByDataModelId(Long.parseLong(dataModelId));
modelParameterList = modelParameterDao.findByDataModelId(Long.parseLong(dataModelId)); modelParameterList = modelParameterDao.findByDataModelIdAndIfSystemDefault(Long.parseLong(dataModelId),0L);
} }
......
...@@ -428,6 +428,9 @@ public class RegularityAnalysisController { ...@@ -428,6 +428,9 @@ public class RegularityAnalysisController {
//Comment by Huach on 20140731 begin //Comment by Huach on 20140731 begin
String dbConXml =Constant.CONFIG_FILE;// "/home/pentaho/conf" + System.getProperty("file.separator") + "application.properties"; String dbConXml =Constant.CONFIG_FILE;// "/home/pentaho/conf" + System.getProperty("file.separator") + "application.properties";
//Comment by Huach on 20140731 end //Comment by Huach on 20140731 end
System.out.println("-=====");
System.out.println(PropertiesUtil.readValue(dbConXml, "jdbc.dbip"));
System.out.println("======");
s.set("dbHost", PropertiesUtil.readValue(dbConXml, "jdbc.dbip")); s.set("dbHost", PropertiesUtil.readValue(dbConXml, "jdbc.dbip"));
s.set("dbPort", Integer.valueOf(PropertiesUtil.readValue(dbConXml, "jdbc.dbport"))); s.set("dbPort", Integer.valueOf(PropertiesUtil.readValue(dbConXml, "jdbc.dbport")));
......
...@@ -12,7 +12,7 @@ local.ip.prefix=192.168 ...@@ -12,7 +12,7 @@ local.ip.prefix=192.168
#jdbc.driver=com.vertica.jdbc.Driver #jdbc.driver=com.vertica.jdbc.Driver
#vertica database ip address #vertica database ip address
jdbc.dbip=192.168.113.117 jdbc.dbip=hg-computer
jdbc.dbport=5433 jdbc.dbport=5433
......
...@@ -12,7 +12,7 @@ local.ip.prefix=192.168 ...@@ -12,7 +12,7 @@ local.ip.prefix=192.168
#jdbc.driver=com.vertica.jdbc.Driver #jdbc.driver=com.vertica.jdbc.Driver
#vertica database ip address #vertica database ip address
jdbc.dbip=192.168.113.117 jdbc.dbip=hg-computer
jdbc.dbport=5433 jdbc.dbport=5433
......
...@@ -40,12 +40,11 @@ ...@@ -40,12 +40,11 @@
<div class="slideMenu" id="cbp-spmenu-s2" style=""> <div class="slideMenu" id="cbp-spmenu-s2" style="">
<div class="form"> <div class="form">
<tags:ProvinceTag /> <tags:Public_ProvinceTag />
<tags:ChannelTag /> <tags:GJFX_datasource_channle_business/>
<tags:BusinessTag />
<button id="submit" class="btn btn-primary" onclick="modelResultSubmit()">提交</button> <button id="submit" class="btn btn-primary" onclick="ruleResultSubmit()">提交</button>
<button id="disable" class="btn btn-warning" onclick="modelResultReset()">重置</button> <button id="disable" class="btn btn-warning" onclick="ruleResultReset()">重置</button>
</div> </div>
</div> </div>
...@@ -92,8 +91,15 @@ ...@@ -92,8 +91,15 @@
</div> </div>
<script type="text/javascript" src="${ctx}/static/js/ruleResultDetailTable.js"></script> <script type="text/javascript" src="${ctx}/static/js/ruleResultDetailTable.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var receiveRulePageNum = "${rulePageNum}";
ruleResultDetailTable(); ruleResultDetailTable();
if(receiveRulePageNum!=1){
$("#goPageNo").attr("value",receiveRulePageNum);
$("#jumpButton").click();
}
$("#createRule").click(function(){ $("#createRule").click(function(){
$.dialog({ $.dialog({
...@@ -136,6 +142,114 @@ $("#createRule").click(function(){ ...@@ -136,6 +142,114 @@ $("#createRule").click(function(){
}); });
}); });
function ruleResultSubmit(){
var dataSource=getStatsDataSourceCheckedValuesString();
var chnnal=getStatsChannelCheckedValuesString();
var bussines=getStatsBusinessCheckedValuesString();
var province=getProvinceCheckedValuesString();
if(dataSource==""){
$.alert("数据来源的选择不能为空");
}else if(chnnal===""){
$.alert("渠道的选择不能为空");
}else if(bussines===""){
$.alert("业务的选择不能为空");
}else if(province===""){
$.alert("省份的选择不能为空");
}else{
toggleMenu('slidePushMenus');//隐藏筛选项
//数据来源标签
$('#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();
$.ajax({
type : 'GET',
contentType : 'application/json',
url: "${ctx}/AnalysisSupport/QualityRuleResult/ruleTableChange?province="+province+"&dataSource="+dataSource+"&chnnal="+chnnal+"&bussines="+bussines,
dataType : 'text',
async: false,
beforeSend: function(data) {
},
success: function(data) {
$("#qualityRuleView").val(data);
ruleResultDetailTable();
ruleId="";
$("#updateRule").attr("disabled", true);
toggleMenu('slidePushMenus2');//隐藏筛选项
updateTag(true);
}
});
}
function ruleResultReset(){
ProvinceReset();
statsDataSourceReset();//三级联动重置
}
//更新按钮点击
$("#updateModel").click(function(){
var pageNum = $("#goPageNo").val();
$.dialog({
title: "提醒",
content:"确定修改模型?",
ok: function(){location.href="${ctx}/AnalysisSupport/RuleConfiguration?qualityRuleId="+ruleId+"&rulePageNum="+pageNum;},
okValue:"确定",
cancel: function(){},
cancelValue:"取消",
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>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -291,7 +291,8 @@ ...@@ -291,7 +291,8 @@
cancel: function(){}, cancel: function(){},
cancelValue: "取消", cancelValue: "取消",
}); });
}else{ }
else{
$("#modelSubmit").attr("disabled",true); $("#modelSubmit").attr("disabled",true);
var i = $("#addTr").find("tr").size(); var i = $("#addTr").find("tr").size();
......
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
$("#taskLogFrame").attr('src', '${ctx}/BaseManage/TaskLogManage/taskLogListFrame'); $("#taskLogFrame").attr('src', '${ctx}/BaseManage/TaskLogManage/taskLogListFrame');
} }
}); });
}); });
</script> </script>
...@@ -60,7 +64,7 @@ ...@@ -60,7 +64,7 @@
<div class="row me-row" style="margin-top:0px"> <div class="row me-row" style="margin-top:0px">
<div class="content clearfix"> <div class="content clearfix">
<div class="row" style="margin-top:0px"> <div class="row" style="margin-top:0px">
<iframe id="taskManageFrame" style="height:680px" scrolling="no" src="${ctx}/BaseManage/TaskManage/taskListFrame?defaultTaskType=1"> </iframe> <iframe id="taskManageFrame" style="height:800px" src="${ctx}/BaseManage/TaskManage/taskListFrame?defaultTaskType=1"> </iframe>
</div> </div>
</div> </div>
</div> </div>
...@@ -69,5 +73,60 @@ ...@@ -69,5 +73,60 @@
</div> </div>
</div> </div>
</div> </div>
<script type="">
function OpenDialog(data) {
// var data = JSON.parse(data);
var content ="<div class='dialog-p' style='max-height: 560px; overflow-y: scroll; overflow-x: auto;'>" +
" <div class='col-xs-12'>" +
" <div class='panel panel-default'>" +
" <div class='panel-heading'>模型预览<input onclick='createWorkingDetail()' id='createWorkingDetail' style='float:right' type='button' class='btn btn-primary' value='参数修改'></div>" +
" <div class='panel-body'>"+
" <table class='table table-vertical'>"+
" <tr><td>"+
" <table class='table table-vertical'>" +
" <tr>" +
" <td width='10%'>省份</td>" +
" <td>自定义</td>" +
" <td width='10%'>数据来源</td>" +
" <td>自定义</td>" +
" <td width='10%'>业务</td>" +
" <td>自定义</td>" +
" <td width='10%'>渠道</td>" +
" <td>自定义</td>" +
" </tr>" +
" <tr>" +
" <td>指标编码</td>" +
" <td>自定义</td>" +
" <td>指标名称</td>" +
" <td>自定义</td>" +
" <td>预测开始时间</td>" +
" <td>自定义</td>" +
" <td>预测结束时间</td>" +
" <td>自定义</td>" +
" </tr>" +
" <tr>" +
" <td colspan='8' align='center'>图表展示</td>" +
" </tr>" +
" <tr>" +
" <td colspan='8'>" +
" <div class=''>" +
<%--" <iframe id='ewarningIf' style='height:560px;padding: 7px;' scrolling='no' src='${biserver_config}&path=MonitorOperation/WarnAnalysis&action=GJFX_DETAIL_RELATED_EWARN.xaction&wrapper=false&height=534&WarningID="+getCol(t1, 'warningId')+ "&WarningSourceTag="+getCol(t1, 'warningSourceId')+ "&ctx=${ctx}" +"'></iframe>" +--%>
" </div>" +
" </td>" +
" </tr>" +
"</table>";
$.dialog({
title:'模型预览结果',
content:content,
lock: true
});
}
function preview() {
OpenDialog();
}
</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -121,30 +121,7 @@ taskName = "自定义任务"; ...@@ -121,30 +121,7 @@ taskName = "自定义任务";
cancelValue:"取消", cancelValue:"取消",
lock:true lock:true
}); });
/* $('#newTaskStatus').val(status);
$('#targetTaskId').val(id);
$('#queryForm').submit();
$.ajax({
type : 'post',
'url' : '${ctx}/BaseManage/TaskManage/queryResultFrame',
data : $('#queryForm').serialize() + "&page=" + page,
success : function(data) {
alert("操作成功")
}
}); */
}
/* function updateStatus(status, id) {
$.ajax({
type : 'post',
'url' : '${ctx}/BaseManage/TaskManage/updateStatusFrame',
data : "newTaskStatus=" + status + "&taskId=" +id,
success : function(data) {
queryResult($('#currentPage').val);
} }
});
} */
function queryResult(page) { function queryResult(page) {
$.ajax({ $.ajax({
...@@ -157,6 +134,11 @@ taskName = "自定义任务"; ...@@ -157,6 +134,11 @@ taskName = "自定义任务";
} }
}); });
} }
function preview(){
var id = $('input[name="taskId"]:checked').val();
parent.preview();
}
$(document).ready(function(){ $(document).ready(function(){
queryResult(1); queryResult(1);
...@@ -267,5 +249,6 @@ taskName = "自定义任务"; ...@@ -267,5 +249,6 @@ taskName = "自定义任务";
</div> </div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -12,9 +12,10 @@ ...@@ -12,9 +12,10 @@
<button class="btn-sm btn btn-warning btn-sm btn-group btn-group-cog" onclick="deleteTask();">删除</button> <button class="btn-sm btn btn-warning btn-sm btn-group btn-group-cog" onclick="deleteTask();">删除</button>
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" onclick="addTask();">新建</button> <button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" onclick="addTask();">新建</button>
<%--create by afe 2017-10-26--%> <%--create by afe 2017-10-26--%>
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" onclick="">模型预览</button> <button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" id="ModelPreview" onclick="preview()">模型预览</button>
</div> </div>
</div> </div>
<table class="table table-hover table-striped"> <table class="table table-hover table-striped">
<thead> <thead>
<tr> <tr>
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<c:forEach items="${taskList.content}" var="runTask"> <c:forEach items="${taskList.content}" var="runTask">
<tr> <tr>
<td><input type="radio" name="taskId" id="taskId" value="${runTask.taskId}" /></td> <td><input type="radio" name="taskId" id="taskId" value="${runTask.taskId}" /></td>
......
...@@ -30,6 +30,11 @@ ...@@ -30,6 +30,11 @@
}); });
$("#${selectTab}").click(); $("#${selectTab}").click();
}); });
</script> </script>
</head> </head>
......
...@@ -128,17 +128,16 @@ function ruleResultDetailTable(){ ...@@ -128,17 +128,16 @@ function ruleResultDetailTable(){
header[0] = ["","<input type='radio' name='update'id='update' onclick='javascript:radioChoose(this);'/>","1%",""]; header[0] = ["","<input type='radio' name='update'id='update' onclick='javascript:radioChoose(this);'/>","1%",""];
header[1] = ["质量规则ID","qualityRuleId","7%","15"]; header[1] = ["质量规则ID","qualityRuleId","7%","15"];
header[2] = ["省份","provinceName","7%","15"]; header[2] = ["数据来源","dataSourceName","7%","15"];
header[3] = ["渠道","qualityRuleId","7%","15"]; header[3] = ["渠道","channelName","7%","15"];
header[4] = ["业务","qualityRuleId","7%","15"]; header[4] = ["业务","businessName","7%","15"];
header[5] = ["数据来源","qualityRuleId","7%","15"]; header[5] = ["指标名称","qualityRuleId","7%","15"];
header[6] = ["数据采集频率","qualityRuleId","7%","15"]; header[6] = ["指标编码","qualityRuleId","7%","15"];
header[7] = ["指标监控时间","qualityRuleId","7%","15"]; header[7] = ["数据类型","qualityRuleId","7%","15"];
header[8] = ["指标监控时间范围","qualityRuleId","7%","15"]; header[8] = ["数据采集频率","qualityRuleId","7%","15"];
header[9] = ["完整性阈值","qualityRuleId","7%","15"]; header[9] = ["指标监控时间","qualityRuleId","7%","15"];
header[10] = ["及时性阈值","qualityRuleId","7%","15"]; header[10] = ["指标业务时间","qualityRuleId","7%","15"];
header[11] = ["数据类型","qualityRuleId","7%","15"]; header[11] = ["准确性规则","qualityRuleId","7%","15"];
header[12] = ["准确性规则","qualityRuleId","7%","15"];
window.pagging = new table_pagging({limit:12,tableId:'ruleResultTable',header:header}); window.pagging = new table_pagging({limit:12,tableId:'ruleResultTable',header:header});
//pagging.pagging(jsonData); //pagging.pagging(jsonData);
...@@ -299,17 +298,6 @@ table_pagging.prototype = { ...@@ -299,17 +298,6 @@ table_pagging.prototype = {
tdContext = "&nbsp;"; tdContext = "&nbsp;";
} }
/*if(K==3){
if(tdContext!="&nbsp;"){
var strLength = tdContext.lastIndexOf(".");
var strBody = tdContext.substring(0,strLen-14);
var strExt = tdContext.substring(strLen);
tdContext=strBody+strExt;
}
}*/
// if(k==12){ //显示协查单的详细列表
// tdContext= "<a target='_blank' href='/CmszMonitorAnalysis/MonitorOperation/WorkingOrderReasult?xcdId="+this.getData(this.objectlist[i],this.header[k][1])+"'>"+ tdContext+"</a>"
if(k==9){ if(k==9){
if(tdContext!="&nbsp;"){ if(tdContext!="&nbsp;"){
...@@ -323,8 +311,8 @@ table_pagging.prototype = { ...@@ -323,8 +311,8 @@ table_pagging.prototype = {
} }
} }
if(k==11){ if(k==11){
tdContext = "<a href='javascript:;' onclick='lookParm(\""+this.getData(this.objectlist[i],"dataModelId")+"\",\""+this.getData(this.objectlist[i],"dataModelName")+"\")'>查看参数</a>"; tdContext = "<a href='javascript:;' onclick='lookParm(\""+this.getData(this.objectlist[i],"qualityRuleId")+"\")'>查看参数</a>";
//tdContext = "<a href='javascript:;' onclick=\"openDialog('"+this.getData(this.objectlist[i],"dataModelId")+"','"+ this.getData(this.objectlist[i],"dataModelName")"')\">查看参数</a>";
} }
if(k==4){ if(k==4){
if (this.header[k][4] && !(tdContext == "&nbsp;")) { if (this.header[k][4] && !(tdContext == "&nbsp;")) {
...@@ -364,12 +352,6 @@ table_pagging.prototype = { ...@@ -364,12 +352,6 @@ table_pagging.prototype = {
} }
} }
console.log(tdContext); console.log(tdContext);
td.innerHTML = tdContext; td.innerHTML = tdContext;
...@@ -557,8 +539,8 @@ table_pagging.prototype = { ...@@ -557,8 +539,8 @@ table_pagging.prototype = {
if(clickObj.checked){ if(clickObj.checked){
//alert(clickObj); //alert(clickObj);
//alert(clickObj.nextSibling.innerHTML); //alert(clickObj.nextSibling.innerHTML);
$("#updateModel").attr("disabled", false); $("#updateRule").attr("disabled", false);
modelId=parseInt(obj[parseInt(clickObj.nextSibling.innerHTML)].dataModelId); ruleId=parseInt(obj[parseInt(clickObj.nextSibling.innerHTML)].qualityRuleId);
} }
} }
\ No newline at end of file
...@@ -88,7 +88,7 @@ function checkKpi() { ...@@ -88,7 +88,7 @@ function checkKpi() {
} }
function checkAndSubmit(url, data) { function checkAndSubmit(url, data) {
if (validate()) {
$.ajax({ $.ajax({
type : 'POST', type : 'POST',
url: url, url: url,
...@@ -105,7 +105,7 @@ function checkAndSubmit(url, data) { ...@@ -105,7 +105,7 @@ function checkAndSubmit(url, data) {
} }
} }
}); });
}
} }
function saveForm(id) { function saveForm(id) {
......
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