Commit a2b72039 authored by afe's avatar afe

2017年11月08 智能分析平台提交内容

--模型页面
parents 19d07868 3d549e7b
......@@ -147,7 +147,7 @@
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/XmlSchema-1.1.jar"/>
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/xmlsec-1.3.0-1.0.0.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="D:/hg-env7/workspace/CmszMonitorAnalysis/freemarker-2.3.20.jar"/>
<classpathentry kind="lib" path="D:/hungriam/CmszMonitorAnalysis/trunk/src/main/webapp/WEB-INF/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="D:/CMSZMonitorAnalysis/apache-tomcat-7.0.47/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="C:/Users/liuna/git/monitorAnalysis/lib/freemarker.jar"/>
<classpathentry kind="output" path="src/main/webapp/WEB-INF/classes"/>
</classpath>
......@@ -34,6 +34,10 @@ public class DataModel implements Serializable{
private Date businessEndTime;//业务结束时间
private Long batchNo;
private Long modelStatus;//模型状态
private Long kpiTypeId;//数据类型
private String modelDesc;//模型描述
private String evaluationMethod;//评判方法
private String evaluationStandard;//评判标准
@Id
......@@ -117,5 +121,29 @@ public class DataModel implements Serializable{
public void setModelStatus(Long modelStatus) {
this.modelStatus = modelStatus;
}
public Long getKpiTypeId() {
return kpiTypeId;
}
public void setKpiTypeId(Long kpiTypeId) {
this.kpiTypeId = kpiTypeId;
}
public String getModelDesc() {
return modelDesc;
}
public void setModelDesc(String modelDesc) {
this.modelDesc = modelDesc;
}
public String getEvaluationMethod() {
return evaluationMethod;
}
public void setEvaluationMethod(String evaluationMethod) {
this.evaluationMethod = evaluationMethod;
}
public String getEvaluationStandard() {
return evaluationStandard;
}
public void setEvaluationStandard(String evaluationStandard) {
this.evaluationStandard = evaluationStandard;
}
}
......@@ -32,6 +32,10 @@ public class DataModelView{
private String serverName;//服务器名称
private String modelParameter;//模型参数
private Long modelStatus;//模型状态
private Long kpiTypeId;//数据类型
private String modelDesc;//模型描述
private String evaluationMethod;//评判方法
private String evaluationStandard;//评判标准
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
......@@ -113,5 +117,29 @@ public class DataModelView{
public void setModelStatus(Long modelStatus) {
this.modelStatus = modelStatus;
}
public Long getKpiTypeId() {
return kpiTypeId;
}
public void setKpiTypeId(Long kpiTypeId) {
this.kpiTypeId = kpiTypeId;
}
public String getModelDesc() {
return modelDesc;
}
public void setModelDesc(String modelDesc) {
this.modelDesc = modelDesc;
}
public String getEvaluationMethod() {
return evaluationMethod;
}
public void setEvaluationMethod(String evaluationMethod) {
this.evaluationMethod = evaluationMethod;
}
public String getEvaluationStandard() {
return evaluationStandard;
}
public void setEvaluationStandard(String evaluationStandard) {
this.evaluationStandard = evaluationStandard;
}
}
......@@ -41,8 +41,8 @@ public interface DataModelDao extends JpaSpecificationExecutor<DataModel>,
*/
//根据数据模型ID修改数据模型
@Modifying
@Query("update from DataModel dm set dm.dataModelName=:dataModelName, dm.ruleDefinition=:ruleDefinition, dm.dataModelTypeId=:dataModelTypeId, dm.serverId=:serverId,dm.modelStatus=:modelStatus, dm.modelScriptName=:modelScriptName, dm.modelUpdateTime=:modelUpdateTime,dm.businessStartTime=:businessStartTime,dm.businessEndTime=:businessEndTime where dm.dataModelId=:dataModelId")
void updateDataModelByDataModelId(@Param("dataModelName")String dataModelName,@Param("ruleDefinition")String ruleDefinition,@Param("dataModelTypeId")Long dataModelTypeId,@Param("serverId")Long serverId,@Param("modelStatus")Long modelStatus,@Param("modelScriptName")String modelScriptName,@Param("modelUpdateTime")Date modelUpdateTime,@Param("businessStartTime")Date businessStartTime,@Param("businessEndTime")Date businessEndTime,@Param("dataModelId")Long dataModelId);
@Query("update from DataModel dm set dm.dataModelName=:dataModelName,dm.modelDesc=:modelDesc, dm.ruleDefinition=:ruleDefinition, dm.evaluationMethod=:evaluationMethod, dm.evaluationStandard=:evaluationStandard, dm.dataModelTypeId=:dataModelTypeId, dm.serverId=:serverId,dm.modelStatus=:modelStatus, dm.modelScriptName=:modelScriptName, dm.kpiTypeId=:kpiTypeId, dm.modelUpdateTime=:modelUpdateTime,dm.businessStartTime=:businessStartTime,dm.businessEndTime=:businessEndTime where dm.dataModelId=:dataModelId")
void updateDataModelByDataModelId(@Param("dataModelName")String dataModelName,@Param("modelDesc")String modelDesc,@Param("ruleDefinition")String ruleDefinition,@Param("evaluationMethod")String evaluationMethod,@Param("evaluationStandard")String evaluationStandard,@Param("dataModelTypeId")Long dataModelTypeId,@Param("serverId")Long serverId,@Param("modelStatus")Long modelStatus,@Param("modelScriptName")String modelScriptName,@Param("kpiTypeId")Long kpiTypeId,@Param("modelUpdateTime")Date modelUpdateTime,@Param("businessStartTime")Date businessStartTime,@Param("businessEndTime")Date businessEndTime,@Param("dataModelId")Long dataModelId);
//根据模型名称得到数据条数
......
......@@ -21,11 +21,17 @@ public interface DataModelViewDao extends JpaSpecificationExecutor<DataModelView
@Query("from DataModelView dataModelView where dataModelView.modelPublishTime between timestampadd(M,-1,getdate()) and getdate() order by dataModelView.modelPublishTime desc")
List<DataModelView> findLastDataModel();
//按时间,模型类别,部署服务器查找数据模型
List<DataModelView> findByModelPublishTimeBetweenAndDataModelTypeIdInOrderByModelPublishTimeDesc(Date startTime, Date endTime,List<Long> dataModelTypeId);
//按时间,模型类别,部署服务器,数据类型查找数据模型
List<DataModelView> findByModelPublishTimeBetweenAndDataModelTypeIdInAndKpiTypeIdOrderByModelPublishTimeDesc(Date startTime, Date endTime,List<Long> dataModelTypeId, Long kpiTypeId);
//按时间,模型类别,部署服务器,模型状态查找数据模型
List<DataModelView> findByModelPublishTimeBetweenAndDataModelTypeIdInAndModelStatusOrderByModelPublishTimeDesc(Date startTime, Date endTime,List<Long> dataModelTypeId,Long modelStatus);
//按时间,模型类别,部署服务器,数据类型查找数据模型(筛选)
List<DataModelView> findByModelPublishTimeBetweenAndDataModelTypeIdInAndKpiTypeIdInOrderByModelPublishTimeDesc(Date startTime, Date endTime,List<Long> dataModelTypeId, List<Long> kpiTypeId);
//按时间,模型类别,部署服务器,模型状态,数据类型查找数据模型(筛选)
List<DataModelView> findByModelPublishTimeBetweenAndDataModelTypeIdInAndModelStatusAndKpiTypeIdOrderByModelPublishTimeDesc(Date startTime, Date endTime,List<Long> dataModelTypeId,Long modelStatus, Long kpiTypeId);
//按时间,模型类别,部署服务器,模型状态,数据类型查找数据模型(筛选)
List<DataModelView> findByModelPublishTimeBetweenAndDataModelTypeIdInAndModelStatusAndKpiTypeIdInOrderByModelPublishTimeDesc(Date startTime, Date endTime,List<Long> dataModelTypeId,Long modelStatus, List<Long> kpiTypeId);
//按标题模糊查询
List<DataModelView> findByDataModelNameLikeOrderByModelPublishTimeDesc(String modelTitle);
......
......@@ -32,8 +32,8 @@ public class DataModelService {
//根据数据模型ID修改数据模型
@Transactional(readOnly=false)
public void updateByDataModelId(String dataModelName, String ruleDefinition,Long dataModelTypeId,Long serverId,Long modelStatus,String modelScriptName,Date modelUpdateTime,Date businessStartTime,Date businessEndTime,Long dataModelId){
dataModelDao.updateDataModelByDataModelId(dataModelName, ruleDefinition, dataModelTypeId, serverId, modelStatus, modelScriptName, modelUpdateTime, businessStartTime, businessEndTime, dataModelId);
public void updateByDataModelId(String dataModelName, String modelDesc, String ruleDefinition, String evaluationMethod, String evaluationStandard, Long dataModelTypeId,Long serverId,Long modelStatus,String modelScriptName ,Long kpiTypeId,Date modelUpdateTime,Date businessStartTime,Date businessEndTime,Long dataModelId){
dataModelDao.updateDataModelByDataModelId(dataModelName, modelDesc, ruleDefinition, evaluationMethod, evaluationStandard, dataModelTypeId, serverId, modelStatus, modelScriptName, kpiTypeId, modelUpdateTime, businessStartTime, businessEndTime, dataModelId);
}
//根据模型类别得到数据
......
......@@ -121,12 +121,16 @@ public class ModelMaintainController {
public String saveModelDataForm(HttpServletResponse response,HttpServletRequest request) throws ParseException{
String modelSavePath = systemParameterDao.findByParameterName("MODEL_SCRIPT_FILE_DIR").get(0).getParameterValue();
String dataModelName = "";
String modelDesc = "";
String ruleDefinition = "";
String evaluationMethod = "";
String evaluationStandard = "";
String modelType = "";
String deployedServer = "";
String modelStatus = "";
//String cycleMinutes = "";
String modelExeScriptName = "";
String kpiTypeId = "";
String businessEndTime = "";
String businessStartTime = "";
Date publishTime = new Date();
......@@ -147,14 +151,22 @@ public class ModelMaintainController {
String tempName = fm.getString("UTF-8");
if(formName.equals("dataModelName")){
dataModelName = tempName;
}else if(formName.equals("modelDesc")){
modelDesc = tempName;
}else if(formName.equals("ruleDefinition")){
ruleDefinition = tempName;
}else if(formName.equals("evaluationMethod")){
evaluationMethod = tempName;
}else if(formName.equals("evaluationStandard")){
evaluationStandard = tempName;
}else if(formName.equals("modelType")){
modelType = tempName;
}else if(formName.equals("deployedServer")){
deployedServer = tempName;
}else if(formName.equals("modelStatus")){
modelStatus = tempName;
}else if(formName.equals("kpiTypeId")){
kpiTypeId = tempName;
}/*else if(formName.equals("cycleMinutes")){
cycleMinutes = tempName;
}*/else if(formName.equals("businessStartTime")){
......@@ -187,10 +199,14 @@ public class ModelMaintainController {
SimpleDateFormat batchFormat = new SimpleDateFormat("yyyyMMdd000001");
dataModel.setBatchNo(Long.parseLong(batchFormat.format(sd.parse(businessStartTime))));
dataModel.setDataModelName(dataModelName);
if(!modelDesc.trim().equals("")){dataModel.setModelDesc(modelDesc);}
if(!ruleDefinition.trim().equals("")){dataModel.setRuleDefinition(ruleDefinition);}
if(!evaluationMethod.trim().equals("")){dataModel.setEvaluationMethod(evaluationMethod);}
if(!evaluationStandard.trim().equals("")){dataModel.setEvaluationStandard(evaluationStandard);}
if(!modelType.trim().equals("")){dataModel.setDataModelTypeId(Long.parseLong(modelType));}
if(!deployedServer.trim().equals("")){dataModel.setServerId(Long.parseLong(deployedServer));}
if(!modelStatus.trim().equals("")){dataModel.setModelStatus(Long.parseLong(modelStatus));}
if(!kpiTypeId.trim().equals("")){dataModel.setKpiTypeId(Long.parseLong(kpiTypeId));}
/*if(!cycleMinutes.trim().equals("")){dataModel.setCycleMinutes(Long.parseLong(cycleMinutes));}*/
dataModel.setModelPublishTime(publishTime);
dataModel.setModelUpdateTime(updateTime);
......
......@@ -165,11 +165,15 @@ public class ModelParameterConfigurationController {
String modelScript = dataModelDao.findByDataModelId(Long.parseLong(staticDataModelId)).getModelScriptName();
String dataModelName = "";
String modelDesc = "";
String ruleDefinition = "";
String evaluationMethod = "";
String evaluationStandard = "";
String modelTypeId = "";
String deployedServerId = "";
String modelStatus = "";
//String cycleMinutes = "";
String kpiTypeId = "";
String businessEndTime = "";
String businessStartTime = "";
Date updateTime = new Date();
......@@ -201,8 +205,14 @@ public class ModelParameterConfigurationController {
String tempName = fm.getString("UTF-8");
if(formName.equals("dataModelName")){
dataModelName = tempName;
}else if(formName.equals("modelDesc")){
modelDesc = tempName;
}else if(formName.equals("ruleDefinition")){
ruleDefinition = tempName;
}else if(formName.equals("evaluationMethod")){
evaluationMethod = tempName;
}else if(formName.equals("evaluationStandard")){
evaluationStandard = tempName;
}else if(formName.equals("modelType")){
modelTypeId = tempName;
}else if(formName.equals("deployedServer")){
......@@ -211,7 +221,9 @@ public class ModelParameterConfigurationController {
modelStatus = tempName;
}/*else if(formName.equals("cycleMinutes")){
cycleMinutes = tempName;
}*/else if(formName.equals("businessStartTime")){
}*/else if(formName.equals("kpiTypeId")){
kpiTypeId = tempName;
}else if(formName.equals("businessStartTime")){
businessStartTime = tempName;
}else if(formName.equals("businessEndTime")){
businessEndTime = tempName;
......@@ -228,7 +240,7 @@ public class ModelParameterConfigurationController {
runTaskService.updateTaskStatusByModelId(Long.parseLong(staticDataModelId));
}
//dataModelService.updateByDataModelId(Long.parseLong(modelTypeId), Long.parseLong(deployedServerId), modelScript, Long.parseLong(cycleMinutes), updateTime, sdf.parse(businessStartTime), sdf.parse(businessEndTime), Long.parseLong(staticDataModelId));
dataModelService.updateByDataModelId(dataModelName, ruleDefinition, Long.parseLong(modelTypeId), Long.parseLong(deployedServerId), Long.parseLong(modelStatus), modelScript, updateTime, sdf.parse(businessStartTime), sdf.parse(businessEndTime), Long.parseLong(staticDataModelId));
dataModelService.updateByDataModelId(dataModelName, modelDesc, ruleDefinition, evaluationMethod, evaluationStandard, Long.parseLong(modelTypeId), Long.parseLong(deployedServerId), Long.parseLong(modelStatus), modelScript, Long.parseLong(kpiTypeId), updateTime, sdf.parse(businessStartTime), sdf.parse(businessEndTime), Long.parseLong(staticDataModelId));
cmszOperationLogService.createLog("修改","更新数据模型","fxjm_data_model_info_t. DATA_MODEL_ID="+staticDataModelId);
return "redirect:/ModelManage/ModelResult?modelPeriod="+staticModelPeriod+"&modelType="+staticModelType+"&modelTitle="+staticModelTitle+"&modelStatusId="+staticModelStatusId+"&modelPageNum="+staticModelPageNum;
......
......@@ -92,6 +92,7 @@ public class ModelResultController {
private String staticType = "";
private String staticTitle = "";
private String staticModelStatusId = "";
private String staticKpiTypeId = "";
List<DataModelView> staticModelViewList = new ArrayList<DataModelView>();
@RequestMapping(value = "")
......@@ -100,6 +101,7 @@ public class ModelResultController {
@RequestParam(value = "modelType", defaultValue="") String modelType,
@RequestParam(value = "modelTitle", defaultValue="") String modelTitle,
@RequestParam(value = "modelStatusId", defaultValue="") String modelStatusId,
@RequestParam(value = "kpiTypeId", defaultValue="") String kpiTypeId,
@RequestParam(value = "modelPageNum", defaultValue="1") String modelPageNum,
Map model){
List<DataModelType> dataModelTypeList = dataModelTypeDao.findAllDataModelType();
......@@ -127,10 +129,15 @@ public class ModelResultController {
for(int i=0;i<modelType.split(",").length;i++){
modelTypeList.add(Long.parseLong(modelType.split(",")[i]));
}
List<Long> kpiTypeIdList = new ArrayList<Long>();
for(int i=0;i<kpiTypeId.trim().split(",").length;i++){
kpiTypeIdList.add(Long.parseLong(kpiTypeId.trim().split(",")[i]));
}
if(modelStatusId.equals("")){
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList);
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInAndKpiTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList, kpiTypeIdList);
}else{
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInAndModelStatusOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList, Long.parseLong(modelStatusId));
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInAndModelStatusAndKpiTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList, Long.parseLong(modelStatusId), kpiTypeIdList);
}
//dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList);
......@@ -168,11 +175,13 @@ public class ModelResultController {
@RequestParam(value = "modelType", defaultValue="") String modelType,
@RequestParam(value = "modelStatusId", defaultValue="") String modelStatusId,
@RequestParam(value = "modelTitle", defaultValue="") String modelTitle,
@RequestParam(value = "kpiTypeId", defaultValue="") String kpiTypeId,
HttpServletResponse response) throws UnsupportedEncodingException{
staticTime = modelPeriod;
staticType = modelType;
staticTitle = modelTitle;
staticModelStatusId = modelStatusId ;
staticKpiTypeId = kpiTypeId;
System.out.println("modelPeriod="+modelPeriod+"\nmodelType="+modelType+"\nmodelTitle="+modelTitle);
List<DataModelView> dataModelViewList = new ArrayList<DataModelView>();
......@@ -194,10 +203,14 @@ public class ModelResultController {
for(int i=0;i<modelType.split(",").length;i++){
modelTypeList.add(Long.parseLong(modelType.split(",")[i]));
}
List<Long> kpiTypeIdList = new ArrayList<Long>();
for(int i=0;i<kpiTypeId.trim().split(",").length;i++){
kpiTypeIdList.add(Long.parseLong(kpiTypeId.trim().split(",")[i]));
}
if(modelStatusId.equals("")){
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList);
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInAndKpiTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList, kpiTypeIdList);
}else{
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInAndModelStatusOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList, Long.parseLong(modelStatusId));
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInAndModelStatusAndKpiTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList, Long.parseLong(modelStatusId), kpiTypeIdList);
}
//dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList);
......@@ -274,9 +287,9 @@ public class ModelResultController {
modelTypeList.add(Long.parseLong(staticType.split(",")[i]));
}
if(!staticModelStatusId.equals("")){
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList);
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInAndKpiTypeIdOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList, Long.parseLong(staticKpiTypeId));
}else{
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInAndModelStatusOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList, Long.parseLong(staticModelStatusId));
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInAndModelStatusAndKpiTypeIdOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList, Long.parseLong(staticModelStatusId), Long.parseLong(staticKpiTypeId));
}
......@@ -340,11 +353,15 @@ public class ModelResultController {
List<String> fialList = new ArrayList<String>();
fialList.add("数据模型ID");
fialList.add("数据模型标题");
fialList.add("模型描述");
fialList.add("规则定义");
fialList.add("评判方法");
fialList.add("评判标准");
fialList.add("模型执行脚本名称");
fialList.add("模型类别");
fialList.add("部署服务器");
//fialList.add("模型运行频度分钟数");
fialList.add("数据类型");
fialList.add("模型发布时间");
fialList.add("模型修改时间");
......@@ -407,13 +424,17 @@ public class ModelResultController {
row.createCell(0).setCellValue(dataModelView.getDataModelId());
dataModelIds.add(dataModelView.getDataModelId());
row.createCell(1).setCellValue(dataModelView.getDataModelName());
if(dataModelView.getRuleDefinition()!=null){row.createCell(2).setCellValue(dataModelView.getRuleDefinition());}
row.createCell(3).setCellValue(dataModelView.getModelScriptName());
row.createCell(4).setCellValue(dataModelView.getDataModelTypeName());
row.createCell(5).setCellValue(dataModelView.getServerName());
row.createCell(2).setCellValue(dataModelView.getModelDesc());
if(dataModelView.getRuleDefinition()!=null){row.createCell(3).setCellValue(dataModelView.getRuleDefinition());}
row.createCell(4).setCellValue(dataModelView.getEvaluationMethod());
row.createCell(5).setCellValue(dataModelView.getEvaluationStandard());
row.createCell(6).setCellValue(dataModelView.getModelScriptName());
row.createCell(7).setCellValue(dataModelView.getDataModelTypeName());
row.createCell(8).setCellValue(dataModelView.getServerName());
//if(dataModelView.getCycleMinutes()!=null){row.createCell(6).setCellValue(dataModelView.getCycleMinutes());}
row.createCell(6).setCellValue(formatDate.format(dataModelView.getModelPublishTime()));
if(dataModelView.getModelUpdateTime()!=null){row.createCell(7).setCellValue(formatDate.format(dataModelView.getModelUpdateTime()));}
row.createCell(9).setCellValue(dataModelView.getKpiTypeId());
row.createCell(10).setCellValue(formatDate.format(dataModelView.getModelPublishTime()));
if(dataModelView.getModelUpdateTime()!=null){row.createCell(11).setCellValue(formatDate.format(dataModelView.getModelUpdateTime()));}
}
//参数表
......
......@@ -28,7 +28,7 @@ jdbc.database=ccolap
#jdbc.username=szcm
#jdbc.password=szcm
jdbc.driver=com.vertica.jdbc.Driver
jdbc.url=jdbc:vertica://192.168.189.128:5433/cmsz_ccolap
jdbc.url=jdbc:vertica://hg-computer:5433/cmsz_ccolap
jdbc.username=ccolap
jdbc.password=hg.2015
##test
......
......@@ -28,7 +28,7 @@ jdbc.database=ccolap
#jdbc.username=szcm
#jdbc.password=szcm
jdbc.driver=com.vertica.jdbc.Driver
jdbc.url=jdbc:vertica://192.168.189.128:5433/cmsz_ccolap
jdbc.url=jdbc:vertica://hg-computer:5433/cmsz_ccolap
jdbc.username=ccolap
jdbc.password=hg.2015
##test
......
......@@ -3,12 +3,42 @@
<%--数据类型 --%>
<div id="model_dataType" class="slide-menu-option">
<div class="slide-select">
<label >数据类型:</label><br/>
<select class="slide-menu-select" id="relStatus" name="relStatus">
<option value="业务量类" title="业务量类" selected><a href="#">业务量类</a></option>
<option value="时长类" title="时长类" ><a href="#">时长类</a></option>
<option value="百分比类" title="百分比类" ><a href="#">百分比类</a></option>
<label >数据类型:</label>
<select class="slide-menu-select" id="kpiTypeId" name="kpiTypeId">
<option value="1,2,3" selected>全部</option>
<option value="1" title="时长类">时长类</option>
<option value="2" title="业务量类" >业务量类</option>
<option value="3" title="百分比类" >百分比类</option>
</select>
</div>
</div>
<script type="text/javascript">
//返回结果为数据类型的值
function getKpiTypeIdCheckedValue(){
var KpiTypeId = ($("#kpiTypeId option:selected").val());
return KpiTypeId;
}
//返回结果为数据类型的文本值
function getKpiTypeIdCheckedText(){
var KpiTypeId = ($("#kpiTypeId option:selected").text());
return KpiTypeId;
}
//得到模型类别的ID数组值
function getKpiTypeIdValues(){
var kpiTypeIds = new Array();
var i=0;
kpiTypeIdCheckedValues.each(function(){
kpiTypeIds[i] = $(this).val();
i++;
});
return KpiTypeIds;
}
function resetKpiTypeId(){
$("#kpiTypeId option[value='']").attr("selected",true);
}
</script>
\ No newline at end of file
......@@ -52,7 +52,10 @@
<form action="#" class="form-horizontal" id="modelMaintainForm" method="post" enctype="multipart/form-data">
<table id="modelMaintainTable" class="table-null">
<tr><td>数据模型名称(<font color="red">必填</font>):</td><td><input type="text" class="form-control" name="dataModelName" id="dataModelName" style="display: inline;" /><span id="writeWarningInf" style="color:red;display: inline;padding-left:10px;"></span></td></tr>
<tr><td>模型描述:</td><td><input type="text" class="form-control" name="modelDesc" id="modelDesc" style="display:inline;" /></td></tr>
<tr><td>规则定义:</td><td><input type="text" class="form-control" name="ruleDefinition" id="ruleDefinition"/></td></tr>
<tr><td>评判方法:</td><td><input type="text" class="form-control" name="evaluationMethod" id="evaluationMethod" style="display: inline;" /></td></tr>
<tr><td>评判标准:</td><td><input type="text" class="form-control" name="evaluationStandard" id="evaluationStandard" style="display: inline;" /></td></tr>
<tr><td>模型执行脚本(<font color="red">必填</font>):</td><td>
<div class="file-box">
<input type='text' id='modelExeScriptName' class="form-control" style="display: inline;"/>
......@@ -77,9 +80,15 @@
<option value="1">正常</option>
<option value="0">失效</option>
</select></td></tr>
<tr><td>数据类型(<font color="red">必填</font>):</td>
<td><select class="form-control" name="kpiTypeId" id="kpiTypeId">
<option value="1">时长类</option>
<option value="2">业务量类</option>
<option value="3">百分比类</option>
</select></td></tr>
<!-- <tr><td>模型运行频度分钟数(<font color="red">只能是数字</font>):</td><td><input name="cycleMinutes" type="text" class="form-control" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9]+/,'');}).call(this)" onblur="this.v();"/></td></tr> -->
<tr><td>业务开始时间(<font color="red">必填</font>):</td><td><input id="businessStartTime" name="businessStartTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'businessEndTime\')}'})"> </td></tr>
<tr><td>业务结束时间(<font color="red">必填</font>):</td><td><input type="text" class="form-control" id="businessEndTime" name="businessEndTime" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'businessStartTime\')}'})" /></td></tr>
<tr><td>业务开始时间(<font color="red">必填</font>):</td><td><input id="businessStartTime" name="businessStartTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'businessEndTime\')}'})"> </td></tr>
<tr><td>已添加参数:</td>
<td><table class="table table-hover table-striped" id="displayParam">
<thead>
......
......@@ -50,7 +50,10 @@
<!-- <tr><td>数据模型名称:</td><td id="dataModelName"></td></tr>
<tr><td>规则定义:</td><td id="ruleDefinition"></td></tr> -->
<tr><td>数据模型名称(<font color="red">必填</font>):</td><td><input type="text" class="form-control" name="dataModelName" id="dataModelName" style="display: inline;" /><span id="writeWarningInf" style="color:red;display: inline;padding-left:10px;"></span></td></tr>
<tr><td>模型描述:</td><td><input type="text" class="form-control" name="modelDesc" id="modelDesc" style="display:inline;" /></td></tr>
<tr><td>规则定义:</td><td><input type="text" class="form-control" name="ruleDefinition" id="ruleDefinition"/></td></tr>
<tr><td>评判方法:</td><td><input type="text" class="form-control" name="evaluationMethod" id="evaluationMethod" style="display: inline;" /></td></tr>
<tr><td>评判标准:</td><td><input type="text" class="form-control" name="evaluationStandard" id="evaluationStandard" style="display: inline;" /></td></tr>
<!-- <tr><td>数据模型名称(<font color="red">必填</font>):</td><td><input type="text" class="form-control" name="dataModelName" id="dataModelName" style="display: inline;" /><span id="writeWarningInf" style="color:red;display: inline;padding-left:10px;"></span></td></tr>
<tr><td>规则定义:</td><td><input type="text" class="form-control" name="ruleDefinition" id="ruleDefinition"/></td></tr>
--><tr><td>模型执行脚本(<font color="red">必填</font>):</td><td>
......@@ -81,6 +84,12 @@
<option value="1">正常</option>
<option value="0">失效</option>
</select></td></tr>
<tr><td>数据类型(<font color="red">必填</font>):</td>
<td><select class="form-control" name="kpiTypeId" id="kpiTypeId">
<option value="1">时长类</option>
<option value="2">业务量类</option>
<option value="3">百分比类</option>
</select></td></tr>
<tr><td>业务开始时间(<font color="red">必填</font>):</td><td><input id="businessStartTime" name="businessStartTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'businessEndTime\')}'})"> </td></tr>
<tr><td>业务结束时间(<font color="red">必填</font>):</td><td><input type="text" class="form-control" id="businessEndTime" name="businessEndTime" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'businessStartTime\')}'})" /></td></tr>
<tr><td>参数:</td>
......@@ -122,11 +131,15 @@
//加载页面时显示
var getDataModelId = "${dataModel.dataModelId}";
var getDataModelName = "${dataModel.dataModelName}";
var getModelDesc = "${dataModel.modelDesc}";
var getRuleDefinition = "${dataModel.ruleDefinition}";
var getEvaluationMethod = "${dataModel.evaluationMethod}";
var getEvaluationStandard = "${dataModel.evaluationStandard}";
var getScript = "${dataModel.modelScriptName}";
var getModelTypeId = "${dataModel.dataModelTypeId}";
var getModelStatus = "${dataModel.modelStatus}";
var getServerId = "${dataModel.serverId}";
var getKpiTypeId = "${dataModel.kpiTypeId}";
var getBusinessStartTime = "${dataModel.businessStartTime}";
var getBusinessEndTime = "${dataModel.businessEndTime}";
getBusinessStartTime = getBusinessStartTime.replace(".0","");
......@@ -135,11 +148,15 @@
/* $("#dataModelName").text(getDataModelName);
$("#ruleDefinition").text(getRuleDefinition); */
$("#dataModelName").val(getDataModelName);
$("#modelDesc").val(getModelDesc);
$("#ruleDefinition").val(getRuleDefinition);
$("#evaluationMethod").val(getEvaluationMethod);
$("#evaluationStandard").val(getEvaluationStandard);
$("#modelExeScriptName").val(getScript);
$("#modelType").val(getModelTypeId);
$("#deployedServer").val(getServerId);
$("#modelStatus").val(getModelStatus);
$("#kpiTypeId").val(getKpiTypeId);
$("#businessStartTime").val(getBusinessStartTime);
$("#businessEndTime").val(getBusinessEndTime)
/* $("#businessStartTime").val(formatDate(fillBusinessStartTime ,"yyyy-MM-dd HH:mm:ss"));
......
......@@ -43,8 +43,9 @@
<tags:ModelResultPeriodTag/>
<tags:FXJM_modelResult_DataModelTypeTag/>
<tags:FXJM_Status/>
<tags:FXJM_TitleSearch/>
<tags:ModelDataType/>
<tags:FXJM_TitleSearch/>
<!-- <tags:FXJM_modelResult_DeployedServerTag/> -->
<button id="submit" class="btn btn-primary" onclick="modelResultSubmit()">提交</button>
......@@ -117,6 +118,7 @@
var receiveModelPeriod = "${labelModelPeriod}";
var receiveModelTitle = "${labelModelTitle}";
var receiveModelStatusId = "${labelModelStatusId}";
var receiveKpiTypeId = "${labelKpiTypeId}";
var judge = true;
if(receiveModelPeriod!="" && receiveModelPeriod!=null){
......@@ -124,6 +126,8 @@
$("#DataModelTag").text("数据模型类别").append($("<span class='badge'></span>").text(receiveModelType.split(" ").length)).attr('data-original-title',receiveModelType).tooltip();
var modelStatusText = $("#modelStatus option[value="+receiveModelStatusId+"]").text();
$("#DataModelStatusTag").text("模型状态").attr('data-original-title',modelStatusText).tooltip();
var kpiTypeIdText = $("#kpiTypeId option[value="+receiveKpiTypeId+"]").text();
$("#KpiTypeIdTag").text("数据类型").attr('data-original-title',kpiTypeIdText).tooltip();
}
if(receiveModelTitle!="" && receiveModelTitle!=null){
$("#DataModelTitleTag").text("模型名称").attr('data-original-title', receiveModelTitle).tooltip();
......@@ -158,15 +162,17 @@
var modelStatusId = getModelStatusCheckedValue();
//var deployedServer = getDeployedServerIdStr();
var modelTitle = $.trim(getTitle());
var kpiTypeId = getKpiTypeIdCheckedValue();
receiveGlobalModelType = modelType;
receiveModelPeriod = modelPeriod;
receiveModelTitle = modelTitle;
receiveModelStatusId = modelStatusId;
receiveKpiTypeId = kpiTypeId;
if(modelTitle!=""){
$.ajax({
type : 'GET',
contentType : 'application/json',
url: "${ctx}/ModelManage/ModelResult/modelTableChange?modelTitle="+encodeURIComponent(modelTitle)+"&modelPeriod="+modelPeriod+"&modelType="+modelType,/* +"&deployedServer="+deployedServer */
url: "${ctx}/ModelManage/ModelResult/modelTableChange?modelTitle="+encodeURIComponent(modelTitle)+"&modelPeriod="+modelPeriod+"&modelType="+modelType+"&kpiTypeId="+kpiTypeId,/* +"&deployedServer="+deployedServer */
dataType : 'text',
async: false,
beforeSend: function(data) {
......@@ -191,7 +197,7 @@
$.ajax({
type : 'GET',
contentType : 'application/json',
url: "${ctx}/ModelManage/ModelResult/modelTableChange?modelPeriod="+modelPeriod+"&modelType="+modelType+"&modelTitle="+encodeURIComponent(modelTitle)+"&modelStatusId="+modelStatusId,/* +"&deployedServer="+deployedServer */
url: "${ctx}/ModelManage/ModelResult/modelTableChange?modelPeriod="+modelPeriod+"&modelType="+modelType+"&modelTitle="+encodeURIComponent(modelTitle)+"&modelStatusId="+modelStatusId+"&kpiTypeId="+kpiTypeId,/* +"&deployedServer="+deployedServer */
dataType : 'text',
async: false,
beforeSend: function(data) {
......@@ -216,6 +222,7 @@
$("#DataModelTag").empty();
$("#DataModelTitleTag").empty();
$("#DataModelStatusTag").empty();
$("#KpiTypeIdTag").empty();
if(judge == true){
$("#PeriodTag").text("最近一个月");
}else{
......@@ -223,6 +230,7 @@
$("#PeriodTag").text("时间范围").attr('data-original-title',getPeriodStr()).tooltip();
$("#DataModelTag").text("数据模型类别").append($("<span class='badge'></span>").text(getDateModelTypeValues().length)).attr('data-original-title',getDataModelTypeTitleStr()).tooltip();
$("#DataModelStatusTag").text("模型状态").attr('data-original-title',getModelStatusCheckedText()).tooltip();
$("#KpiTypeIdTag").text("数据类型").attr('data-original-title',kpiTypeIdText()).tooltip();
}else{
$("#DataModelTitleTag").text("模型名称").attr('data-original-title', $.trim(getTitle())).tooltip();
}
......
......@@ -127,16 +127,19 @@ function modelResultDetailTable(){
header[0] = ["","<input type='radio' name='update'id='update' onclick='javascript:radioChoose(this);'/>","1%",""];
//header[0] = ["<input type='checkbox' name='modelAll' id='modelAll' class='modelAll' onclick='javascript:changeModelAll();'/>","modelCheckBox","2%",""];
header[1] = ["数据模型ID","dataModelId","9%",""];
header[2] = ["数据模型标题","dataModelName","10%","15"];
header[3] = ["规则定义","ruleDefinition","10%","15"];
header[4] = ["模型执行脚本名称","modelScriptName","12%","15"];
header[5] = ["模型类别","dataModelTypeName","10%",""];
header[6] = ["部署服务器","serverName","8%",""];
header[7] = ["数据类型","cycleMinutes","12%",""];
header[8] = ["模型发布时间","modelPublishTime","15%",""];
header[9] = ["模型修改时间","modelUpdateTime","15%",""];
header[10] = ["参数","modelParameter","9%",""];
header[1] = ["数据模型ID","dataModelId","7%","15"];
header[2] = ["数据模型标题","dataModelName","7%","15"];
header[3] = ["模型描述","modelDesc","7%","15"];
//header[4] = ["规则定义","ruleDefinition","7%","15"];
header[4] = ["评判方法","evaluationMethod","7%","15"];
header[5] = ["评判标准","evaluationStandard","7%","15"];
header[6] = ["模型执行脚本名称","modelScriptName","7%","15"];
header[7] = ["模型类别","dataModelTypeName","7%","15"];
//header[9] = ["部署服务器","serverName","7%",""];
header[8] = ["数据类型","kpiTypeId","7%",""];
header[9] = ["模型发布时间","modelPublishTime","7%",""];
header[10] = ["模型修改时间","modelUpdateTime","7%",""];
header[11] = ["参数","modelParameter","7%",""];
window.pagging = new table_pagging({limit:12,tableId:'modelResultTable',header:header});
pagging.pagging(jsonData);
......@@ -309,22 +312,33 @@ table_pagging.prototype = {
// 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==7){
if(k==9){
if(tdContext!="&nbsp;"){
tdContext = df.format(new Date(tdContext));
}
}
if(k==8){
if(k==10){
if(tdContext!="&nbsp;"){
tdContext = df.format(new Date(tdContext));
}
}
if(k==9){
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=\"openDialog('"+this.getData(this.objectlist[i],"dataModelId")+"','"+ this.getData(this.objectlist[i],"dataModelName")"')\">查看参数</a>";
}
if(k==4){
if (this.header[k][4] && !(tdContext == "&nbsp;")) {
td.title = tdTitle;
tdContext = tdContext + "";
if (tdContext.length > parseInt(this.header[k][4])) {
tdContext = tdContext.substring(0,
this.header[k][4])
+ "..";
}
}
}
}
} else {
tdContext=this.header[k][1]+"<span style='display:none'>"+i+"</span>";
......@@ -351,9 +365,16 @@ table_pagging.prototype = {
+ "..";
}
}
td.innerHTML = tdContext;
console.log(tdContext);
td.innerHTML = tdContext;
// alert(tdContext+"----i:"+i+",j:"+j+",k:"+k);
}
i = i + j;
......
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