Commit 25f2cdf0 authored by afe's avatar afe

模型监控增加字段,增加添加修改模型参数

模型预览完成
parent 009b18e1
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
### Example user template ### Example user template
# IntelliJ project files # IntelliJ project files
.idea
*.iml *.iml
out out
gen gen
......
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
<component name="JavaScriptSettings"> <component name="JavaScriptSettings">
<option name="languageLevel" value="ES5" /> <option name="languageLevel" value="ES5" />
</component> </component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="false" project-jdk-name="1.6" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="false" project-jdk-name="1.6" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
......
This diff is collapsed.
No preview for this file type
//package com.hp.cmsz.entity; package com.hp.cmsz.entity;
//
//import javax.persistence.Entity; import com.hp.cmsz.entity.commonmanage.EWarningCalcResult;
//import javax.persistence.Table;
// import javax.persistence.*;
//@Entity import java.sql.Timestamp;
//@Table(name="etl.APP_EWARNING_DETAIL_T") import java.util.List;
//public class APPEWarningDetail {
// private Long EwarningDetailId; @Entity
//// private Long EwarningDetailId; @Table(name="Model_Preview_v",schema = "ccolap")
// public class APPEWarningDetail {
// private Long ewarningDetailId;
// private String provinceName;
//} private String datasourceName;
private String busname;
private String channelName;
private String kpiName;
private String kpiCode;
private Timestamp busdatabegTime;
private Timestamp busdataendTime;
private String threshold1Val;
private String threshold2Val;
private String threshold3Val;
private String warn1Val;
private String warn2Val;
private String warn3Val;
private String fileAddress;
private List<EWarningCalcResult> eWarningCalcResult;
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public Long getEwarningDetailId() {
return ewarningDetailId;
}
public void setEwarningDetailId(Long ewarningDetailId) {
this.ewarningDetailId = ewarningDetailId;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public String getDatasourceName() {
return datasourceName;
}
public void setDatasourceName(String datasourceName) {
this.datasourceName = datasourceName;
}
public String getBusname() {
return busname;
}
public void setBusname(String busname) {
this.busname = busname;
}
public String getChannelName() {
return channelName;
}
public void setChannelName(String channelName) {
this.channelName = channelName;
}
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 Timestamp getBusdatabegTime() {
return busdatabegTime;
}
public void setBusdatabegTime(Timestamp busdatabegTime) {
this.busdatabegTime = busdatabegTime;
}
public Timestamp getBusdataendTime() {
return busdataendTime;
}
public void setBusdataendTime(Timestamp busdataendTime) {
this.busdataendTime = busdataendTime;
}
@Column(name = "threshold1_val")
public String getThreshold1Val() {
return threshold1Val;
}
public void setThreshold1Val(String threshold1Val) {
this.threshold1Val = threshold1Val;
}
@Column(name = "threshold2_val")
public String getThreshold2Val() {
return threshold2Val;
}
public void setThreshold2Val(String threshold2Val) {
this.threshold2Val = threshold2Val;
}
@Column(name = "threshold3_val")
public String getThreshold3Val() {
return threshold3Val;
}
public void setThreshold3Val(String threshold3Val) {
this.threshold3Val = threshold3Val;
}
@Column(name = "warn1_val")
public String getWarn1Val() {
return warn1Val;
}
public void setWarn1Val(String warn1Val) {
this.warn1Val = warn1Val;
}
@Column(name = "warn2_Val")
public String getWarn2Val() {
return warn2Val;
}
public void setWarn2Val(String warn2Val) {
this.warn2Val = warn2Val;
}
@Column(name = "warn3_Val")
public String getWarn3Val() {
return warn3Val;
}
public void setWarn3Val(String warn3Val) {
this.warn3Val = warn3Val;
}
public String getFileAddress() {
return fileAddress;
}
public void setFileAddress(String fileAddress) {
this.fileAddress = fileAddress;
}
@Transient
public List<EWarningCalcResult> geteWarningCalcResult() {
return eWarningCalcResult;
}
public void seteWarningCalcResult(List<EWarningCalcResult> eWarningCalcResult) {
this.eWarningCalcResult = eWarningCalcResult;
}
}
...@@ -34,6 +34,7 @@ public class Business implements Serializable{ ...@@ -34,6 +34,7 @@ public class Business implements Serializable{
public Long getBusinessId() { public Long getBusinessId() {
return businessId; return businessId;
} }
public void setBusinessId(Long businessId) { public void setBusinessId(Long businessId) {
this.businessId = businessId; this.businessId = businessId;
} }
......
...@@ -27,13 +27,13 @@ public class Channel implements Serializable{ ...@@ -27,13 +27,13 @@ public class Channel implements Serializable{
@Id @Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ChannelSequence") @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ChannelSequence")
@SequenceGenerator(name = "ChannelSequence", sequenceName = "dim_channel_info_t_seq", allocationSize=20) @SequenceGenerator(name = "ChannelSequence", sequenceName = "dim_channel_info_t_seq", allocationSize=20)
public String getChannelName() {
return channelName;
}
public Long getChannelId() { public Long getChannelId() {
return channelId; return channelId;
} }
public String getChannelName() {
return channelName;
}
public void setChannelId(Long channelId) { public void setChannelId(Long channelId) {
this.channelId = channelId; this.channelId = channelId;
} }
......
...@@ -26,12 +26,14 @@ public class DataSource implements Serializable{ ...@@ -26,12 +26,14 @@ public class DataSource implements Serializable{
@Id @Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="DataSourceSequence") @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="DataSourceSequence")
@SequenceGenerator(name = "DataSourceSequence", sequenceName = "dim_data_source_info_t_seq", allocationSize=20) @SequenceGenerator(name = "DataSourceSequence", sequenceName = "dim_data_source_info_t_seq", allocationSize=20)
public String getDataSourceName() {
return dataSourceName;
}
public Long getDataSourceId() { public Long getDataSourceId() {
return dataSourceId; return dataSourceId;
} }
public String getDataSourceName() {
return dataSourceName;
}
public void setDataSourceId(Long dataSourceId) { public void setDataSourceId(Long dataSourceId) {
this.dataSourceId = dataSourceId; this.dataSourceId = dataSourceId;
} }
......
...@@ -18,7 +18,7 @@ import javax.persistence.Table; ...@@ -18,7 +18,7 @@ import javax.persistence.Table;
*/ */
@Entity @Entity
@Table(name = "etl.dim_kpi_t") @Table(name = "dim_kpi_t",schema = "etl")
public class DimKpi implements Serializable{ public class DimKpi implements Serializable{
/** /**
......
package com.hp.cmsz.entity.commonmanage;
import javax.persistence.*;
import java.sql.Timestamp;
@Entity
@Table(name = "APP_EWARNING_CALC_RESULT_T", schema = "ETL")
public class EWarningCalcResult {
private Long ewarningDataresultId;
private Timestamp resultDate;
private Long dim1Val;
private Long dim2Val;
private Long ewarningDetailId;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "EWarningCalcResultSequence")
@SequenceGenerator(name = "EWarningCalcResultSequence", sequenceName = "SEQ_APP_EWARNING_CALC_RESULT", allocationSize = 1)
public Long getEwarningDataresultId() {
return ewarningDataresultId;
}
public void setEwarningDataresultId(Long ewarningDataresultId) {
this.ewarningDataresultId = ewarningDataresultId;
}
public Timestamp getResultDate() {
return resultDate;
}
public void setResultDate(Timestamp resultDate) {
this.resultDate = resultDate;
}
@Column(name = "dim1_val")
public Long getDim1Val() {
return dim1Val;
}
public void setDim1Val(Long dim1Val) {
this.dim1Val = dim1Val;
}
@Column(name = "dim2_val")
public Long getDim2Val() {
return dim2Val;
}
public void setDim2Val(Long dim2Val) {
this.dim2Val = dim2Val;
}
public Long getEwarningDetailId() {
return ewarningDetailId;
}
public void setEwarningDetailId(Long ewarningDetailId) {
this.ewarningDetailId = ewarningDetailId;
}
}
...@@ -53,21 +53,21 @@ public class RunTask { ...@@ -53,21 +53,21 @@ public class RunTask {
@JoinColumn(name = "province_id") @JoinColumn(name = "province_id")
private Province provinceView; private Province provinceView;
private Long kpiId; @ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "kpi_id")
private DimKpi dimKpiView;
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "channel_id")
private Channel channelView;
// @ManyToOne(fetch = FetchType.EAGER) @ManyToOne(fetch = FetchType.EAGER)
// @JoinColumn(name = "channel_id") @JoinColumn(name = "data_source_id")
// private Channel channelView; private DataSource dataSourceView;
//
// @ManyToOne(fetch = FetchType.EAGER)
// @JoinColumn(name = "dataSource_id")
// private DataSource dataSourceView;
// @ManyToOne(fetch = FetchType.EAGER) @ManyToOne(fetch = FetchType.EAGER)
// @JoinColumn(name = "business_id") @JoinColumn(name = "business_id")
// private Business businessView; private Business businessView;
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
...@@ -204,37 +204,38 @@ public class RunTask { ...@@ -204,37 +204,38 @@ public class RunTask {
this.provinceView = provinceView; this.provinceView = provinceView;
} }
public Long getKpiId() { public DimKpi getDimKpiView() {
return kpiId; return dimKpiView;
} }
public void setKpiId(Long kpiId) { public void setDimKpiView(DimKpi dimKpiView) {
this.kpiId = kpiId; this.dimKpiView = dimKpiView;
} }
// public Channel getChannelView() { public Channel getChannelView() {
// return channelView; return channelView;
// } }
//
// public void setChannelView(Channel channelView) { public void setChannelView(Channel channelView) {
// this.channelView = channelView; this.channelView = channelView;
// } }
//
// public DataSource getDataSourceView() { public DataSource getDataSourceView() {
// return dataSourceView; return dataSourceView;
// } }
//
// public void setDataSourceView(DataSource dataSourceView) { public void setDataSourceView(DataSource dataSourceView) {
// this.dataSourceView = dataSourceView; this.dataSourceView = dataSourceView;
// } }
//
// public Business getBusinessView() { public Business getBusinessView() {
// return businessView; return businessView;
// } }
//
// public void setBusinessView(Business businessView) { public void setBusinessView(Business businessView) {
// this.businessView = businessView; this.businessView = businessView;
// } }
/*public String getParallelFlg() { /*public String getParallelFlg() {
return parallelFlg; return parallelFlg;
} }
......
...@@ -11,12 +11,15 @@ import org.springframework.data.repository.query.Param; ...@@ -11,12 +11,15 @@ import org.springframework.data.repository.query.Param;
import com.hp.cmsz.entity.DimKpi; import com.hp.cmsz.entity.DimKpi;
public interface DimKpiDao extends JpaSpecificationExecutor<DimKpi>, public interface DimKpiDao extends JpaSpecificationExecutor<DimKpi>,
PagingAndSortingRepository<DimKpi, Long>{ PagingAndSortingRepository<DimKpi, Long>{
List<DimKpi> findAllByIsActiveAndBusnameId(String active,Long businessId);
//通过kpiTypeId查找数据采集频率 //通过kpiTypeId查找数据采集频率
@Query("select dk.calCycle from DimKpi dk where dk.kpiTypeId = ?1") @Query("select dk.calCycle from DimKpi dk where dk.kpiTypeId = :kpiTypeId")
List<String> findCayCycleByKpiTypeIdIn(@Param("kpiTypeId")Long kpiTypeId); List<String> findCayCycleByKpiTypeIdIn(@Param("kpiTypeId")Long kpiTypeId);
//通过kpiTypeId修改数据采集频率 //通过kpiTypeId修改数据采集频率
@Modifying @Modifying
@Query("update from DimKpi dk set dk.calCycle=:calCycle where dk.kpiTypeId=:kpiTypeId") @Query("update from DimKpi dk set dk.calCycle=:calCycle where dk.kpiTypeId=:kpiTypeId")
......
...@@ -33,7 +33,12 @@ public interface ModelParameterDao extends JpaSpecificationExecutor<ModelParamet ...@@ -33,7 +33,12 @@ public interface ModelParameterDao extends JpaSpecificationExecutor<ModelParamet
//根据数据模型ID查找系统默认的参数d //根据数据模型ID查找系统默认的参数d
List<ModelParameter> findByDataModelIdAndIfSystemDefault(Long dataModelId, Long ifSystemDefault); List<ModelParameter> findByDataModelIdAndIfSystemDefault(Long dataModelId, Long ifSystemDefault);
//根据任务ID查找系统默认的参数d
List<ModelParameter> findByTaskIdAndIfSystemDefault(Long taskId, Long ifSystemDefault);
//根据数据模型ID查找参数d //根据数据模型ID查找参数d
List<ModelParameter> findByDataModelIdIn(List<Long> dataModelId); List<ModelParameter> findByDataModelIdIn(List<Long> dataModelId);
......
package com.hp.cmsz.repository.commonmanage;
import com.hp.cmsz.entity.APPEWarningDetail;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface APPEWarningDetailDao extends PagingAndSortingRepository<APPEWarningDetail,
Long>, JpaSpecificationExecutor<APPEWarningDetail> {
APPEWarningDetail findByEwarningDetailId(Long id);
}
package com.hp.cmsz.repository.commonmanage;
import com.hp.cmsz.entity.commonmanage.EWarningCalcResult;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface EWarningCalcResultDao extends PagingAndSortingRepository<EWarningCalcResult, Long>,
JpaSpecificationExecutor<EWarningCalcResult> {
List<EWarningCalcResult> findByEwarningDetailId(Long id);
}
package com.hp.cmsz.service.analysissupport; package com.hp.cmsz.service.analysissupport;
import com.hp.cmsz.entity.DimKpi;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.hp.cmsz.repository.DimKpiDao; import com.hp.cmsz.repository.DimKpiDao;
import java.util.List;
@Service @Service
@Transactional @Transactional
public class DimKpiService { public class DimKpiService {
...@@ -18,4 +21,9 @@ public class DimKpiService { ...@@ -18,4 +21,9 @@ public class DimKpiService {
private void updateByKpiTypeId(String calCycle,Long kpiTypeId){ private void updateByKpiTypeId(String calCycle,Long kpiTypeId){
dimKpiDao.updateDimKpiByKpiTypeId(calCycle, kpiTypeId); dimKpiDao.updateDimKpiByKpiTypeId(calCycle, kpiTypeId);
} }
//查出active为Y的所以KPI指标
public List<DimKpi> findAllByIsActiveAAndBusnameId(Long businessId){
return dimKpiDao.findAllByIsActiveAndBusnameId("Y",businessId);
}
} }
...@@ -74,37 +74,66 @@ ...@@ -74,37 +74,66 @@
</div> </div>
</div> </div>
<script type=""> <script type="">
function OpenDialog(data) {
// var data = JSON.parse(data); var dilog;
function editTask(e){
// var id = $('input[name="taskId"]:checked').val();
var id = e.id.split("_")[1];
var taskType=e.id.split("_")[0];
dilog.close();
document.getElementById("taskManageFrame").src='${ctx}'+"/BaseManage/TaskManage/taskFormFrame?defaultTaskType="+taskType+"&taskId=" + id+"&type=modify";
}
function OpenDialog(data,id,taskType) {
var df=new SimpleDateFormat();
df.applyPattern("yyyy-MM-dd HH:mm:ss");
var content ="<div class='dialog-p' style='max-height: 560px; overflow-y: scroll; overflow-x: auto;'>" + var content ="<div class='dialog-p' style='max-height: 560px; overflow-y: scroll; overflow-x: auto;'>" +
" <div class='col-xs-12'>" + " <div class='col-xs-12'>" +
" <div class='panel panel-default'>" + " <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-heading'>模型预览<input onclick='editTask(this)' id='"+taskType+"_"+id+"' style='float:right' type='button' class='btn btn-primary' value='参数修改'></div>" +
" <div class='panel-body'>"+ " <div class='panel-body'>"+
" <table class='table table-vertical'>"+ " <table class='table table-vertical'>"+
" <tr><td>"+ " <tr><td>"+
" <table class='table table-vertical'>" + " <table class='table table-vertical'>" +
" <tr>" + " <tr>" +
" <td width='10%'>省份</td>" + " <td width='10%'>省份</td>" +
" <td>自定义</td>" + " <td>"+data.provinceName+"</td>" +
" <td width='10%'>数据来源</td>" + " <td width='10%'>数据来源</td>" +
" <td>自定义</td>" + " <td>"+data.datasourceName+"</td>" +
" <td width='10%'>业务</td>" + " <td width='10%'>业务</td>" +
" <td>自定义</td>" + " <td>"+data.busname+"</td>" +
" <td width='10%'>渠道</td>" +
" <td>自定义</td>" +
" </tr>" + " </tr>" +
" <tr>" + " <tr>" +
" <td width='10%'>渠道</td>" +
" <td>"+data.channelName+"</td>" +
" <td>指标编码</td>" + " <td>指标编码</td>" +
" <td>自定义</td>" + " <td>"+data.kpiCode+"</td>" +
" <td>指标名称</td>" + " <td>指标名称</td>" +
" <td>自定义</td>" + " <td>"+data.kpiName+"</td>" +
" </tr>" +
" <tr>" +
" <td>预测开始时间</td>" + " <td>预测开始时间</td>" +
" <td>自定义</td>" + " <td>"+df.format(new Date(data.busdatabegTime))+"</td>" +
" <td>预测结束时间</td>" + " <td>预测结束时间</td>" +
" <td>自定义</td>" + " <td>"+df.format(new Date(data.busdataendTime))+"</td>" +
" <td>阈值1</td>" +
" <td>"+removeNull(data.threshold1Val)+"</td>" +
" </tr>" +
" <tr>" +
" <td>阈值2</td>" +
" <td>"+removeNull(data.threshold2Val)+"</td>" +
" <td>阈值3</td>" +
" <td>"+removeNull(data.threshold3Val)+"</td>" +
" <td>阈值告警1</td>" +
" <td>"+removeNull(data.warn1Val)+"</td>" +
" </tr>" +
" <tr>" +
" <td>阈值告警2</td>" +
" <td>"+removeNull(data.warn2Val)+"</td>" +
" <td>阈值告警3</td>" +
" <td>"+removeNull(data.warn3Val)+"</td>" +
" </tr>" + " </tr>" +
" <tr>" + " <tr>" +
" <td colspan='8' align='center'>图表展示</td>" + " <td colspan='8' align='center'>图表展示</td>" +
...@@ -112,20 +141,46 @@ ...@@ -112,20 +141,46 @@
" <tr>" + " <tr>" +
" <td colspan='8'>" + " <td colspan='8'>" +
" <div class=''>" + " <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>" +--%> " <img src='${ctx}/BaseManage/TaskManage/modelPreviewImg?path="+data.fileAddress+"'/>" +
" </div>" +
" </td>" +
" </tr>" +
" <tr>" +
" <td colspan='8' align='center'>模型数据明细展示</td>" +
" </tr>" +
" <tr>" +
" <td colspan='8'>" +
" <div class='panel-body'>" +
" <table class='table '>" +
" <thead>" +
" <tr><th colspan='2'>时间</th><th colspan='2'>真实值</th><th colspan='2'>预测值</th></tr>" +
" </thead>" +
" <tbody>" ;
data.eWarningCalcResult = data.eWarningCalcResult.sort(function (a,b) {
return a.resultDate-b.resultDate
});
data.eWarningCalcResult.forEach(function (t) {
content = content+"<tr><td colspan='2'>"+df.format(new Date(t.resultDate))+"<td><td colspan='2'>"+t.dim1Val+"</td><td colspan='2'>"+t.dim2Val+"</td></tr>"
});
content = content+
" </tbody>" +
" </table>"+
" </div>" + " </div>" +
" </td>" + " </td>" +
" </tr>" + " </tr>" +
"</table>"; "</table>";
$.dialog({ dilog= $.dialog({
title:'模型预览结果', title:'模型预览结果',
content:content, content:content,
lock: true lock: true
}); });
} }
function preview() { function removeNull(val) {
OpenDialog(); return val==null?"":val
} }
</script> </script>
</body> </body>
......
...@@ -29,7 +29,7 @@ taskName = "自定义任务"; ...@@ -29,7 +29,7 @@ taskName = "自定义任务";
$.dialog({ $.dialog({
title: "提醒", title: "提醒",
content:"确定新增" + taskName + "?", content:"确定新增" + taskName + "?",
ok: function(){window.location.href='${ctx}/BaseManage/TaskManage/taskFormFrame?defaultTaskType=${queryCondition.defaultTaskType}'}, ok: function(){window.location.href='${ctx}/BaseManage/TaskManage/taskFormFrame?defaultTaskType=${queryCondition.defaultTaskType}'+"&type=new"},
okValue:"确定", okValue:"确定",
cancel: function(){}, cancel: function(){},
cancelValue:"取消", cancelValue:"取消",
...@@ -46,7 +46,7 @@ taskName = "自定义任务"; ...@@ -46,7 +46,7 @@ taskName = "自定义任务";
$.dialog({ $.dialog({
title: "提醒", title: "提醒",
content:"确定修改" + taskName + "?", content:"确定修改" + taskName + "?",
ok: function(){window.location.href = '${ctx}/BaseManage/TaskManage/taskFormFrame?defaultTaskType=${queryCondition.defaultTaskType}&taskId=' + id;}, ok: function(){window.location.href = '${ctx}/BaseManage/TaskManage/taskFormFrame?defaultTaskType=${queryCondition.defaultTaskType}&taskId=' + id+"&type=modify";},
okValue:"确定", okValue:"确定",
cancel: function(){}, cancel: function(){},
cancelValue:"取消", cancelValue:"取消",
...@@ -134,10 +134,31 @@ taskName = "自定义任务"; ...@@ -134,10 +134,31 @@ taskName = "自定义任务";
} }
}); });
} }
function preview(){ function preview(e){
var id = $('input[name="taskId"]:checked').val(); var id = $('input[name="taskId"]:checked').val();
parent.preview(); var taskType = '${queryCondition.defaultTaskType}';
$.ajax({
type : 'GET',
'url' : '${ctx}/BaseManage/TaskManage/modelPreview?id='+id,
data : "",
success : function(data) {
parent.OpenDialog(data,id,taskType);
}
});
}
function choseTask(){
$("#ModelPreview").attr("disabled", false);
} }
$(document).ready(function(){ $(document).ready(function(){
......
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
<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" id="ModelPreview" onclick="preview()">模型预览</button> <c:if test="${runTask.defaultTaskType == '1' || runTask.defaultTaskType == '5' }">
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" id="ModelPreview" onclick="preview()" disabled>模型预览</button>
</c:if>
</div> </div>
</div> </div>
...@@ -20,14 +22,12 @@ ...@@ -20,14 +22,12 @@
<thead> <thead>
<tr> <tr>
<th>选择</th> <th>选择</th>
<c:if test="${runTask.defaultTaskType == '1' || runTask.defaultTaskType == '5' }">
<%--2017-10-26 create by afe--%> <th>省份</th>
<%--<th>任务代码</th>--%> <th>渠道</th>
<th>省份</th> <th>业务名称</th>
<th>渠道</th> <th>指标名称</th>
<th>业务名称</th> </c:if>
<th>数据类型</th>
<th>任务名称</th> <th>任务名称</th>
<th>任务类型</th> <th>任务类型</th>
<th>任务绑定信息</th> <th>任务绑定信息</th>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<th>任务运行状态</th> <th>任务运行状态</th>
<th>下次运行时间</th> <th>下次运行时间</th>
<c:if test="${runTask.defaultTaskType != '3'}"> <c:if test="${runTask.defaultTaskType != '3'}">
<th>运行频率</th> <th>运行频率</th>
</c:if> </c:if>
</tr> </tr>
</thead> </thead>
...@@ -43,8 +43,13 @@ ...@@ -43,8 +43,13 @@
<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}" onclick="choseTask()" /></td>
<td>${runTask.code}</td> <c:if test="${runTask.taskType.tasktypeId == '1' || runTask.taskType.tasktypeId == '5' }">
<td>${runTask.provinceView.provinceName}</td>
<td>${runTask.channelView.channelName}</td>
<td>${runTask.businessView.businessName}</td>
<td>${runTask.dimKpiView.name}</td>
</c:if>
<td>${runTask.name}</td> <td>${runTask.name}</td>
<td> <td>
<c:forEach items="${taskTypeList}" var="taskType"> <c:forEach items="${taskTypeList}" var="taskType">
...@@ -88,20 +93,20 @@ ...@@ -88,20 +93,20 @@
</td> </td>
<td><fmt:formatDate value="${runTask.taskNextrunTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss" /></td> <td><fmt:formatDate value="${runTask.taskNextrunTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss" /></td>
<c:if test="${runTask.defaultTaskType != '3'}"> <c:if test="${runTask.defaultTaskType != '3'}">
<td>${runTask.frequencyValue} <td>${runTask.frequencyValue}
<c:if test="${runTask.frequencyType == '1'}"> <c:if test="${runTask.frequencyType == '1'}">
分钟 分钟
</c:if> </c:if>
<c:if test="${runTask.frequencyType == '2'}"> <c:if test="${runTask.frequencyType == '2'}">
小时 小时
</c:if> </c:if>
<c:if test="${runTask.frequencyType == '3'}"> <c:if test="${runTask.frequencyType == '3'}">
</c:if> </c:if>
<c:if test="${runTask.frequencyType == '4'}"> <c:if test="${runTask.frequencyType == '4'}">
</c:if> </c:if>
</td> </td>
</c:if> </c:if>
</tr> </tr>
</c:forEach> </c:forEach>
......
...@@ -9,16 +9,12 @@ ...@@ -9,16 +9,12 @@
ex = exception; ex = exception;
if (request.getAttribute("javax.servlet.error.exception") != null) if (request.getAttribute("javax.servlet.error.exception") != null)
ex = (Throwable) request.getAttribute("javax.servlet.error.exception"); ex = (Throwable) request.getAttribute("javax.servlet.error.exception");
%>
if(ex.getMessage().substring(0, 6).equals("R_HOME")){%>--%> <c:set value="<%=ex.toString() %>" var="msg" scope="page" />
<c:set value="服务器上的R语言环境没配置正确或者Rserve服务没有启动!" var="msg" scope="page" /> <%
<%}else{ %>
<c:set value="<%=ex.getMessage() %>" var="msg" scope="page" />
<%}
//记录日志 //记录日志
Logger logger = LoggerFactory.getLogger("500.jsp"); Logger logger = LoggerFactory.getLogger("500.jsp");
logger.error(ex.getMessage(), ex); logger.error(ex.toString(), ex);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
......
...@@ -173,6 +173,10 @@ ...@@ -173,6 +173,10 @@
<location>/WEB-INF/views/error/500.jsp</location> <location>/WEB-INF/views/error/500.jsp</location>
</error-page> </error-page>
<error-page> <error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/WEB-INF/views/error/500.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code> <error-code>500</error-code>
<location>/WEB-INF/views/error/500.jsp</location> <location>/WEB-INF/views/error/500.jsp</location>
</error-page> </error-page>
......
...@@ -110,7 +110,7 @@ function checkAndSubmit(url, data) { ...@@ -110,7 +110,7 @@ function checkAndSubmit(url, data) {
function saveForm(id) { function saveForm(id) {
var message = ""; var message = "";
if($("#"+id).val()) { if($("#useType").val()!="new") {
message = "确定修改吗?"; message = "确定修改吗?";
} else { } else {
message = "确定增加吗?"; message = "确定增加吗?";
......
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