Commit a2b72039 authored by afe's avatar afe

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

--模型页面
parents 19d07868 3d549e7b
...@@ -147,7 +147,7 @@ ...@@ -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/XmlSchema-1.1.jar"/>
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/xmlsec-1.3.0-1.0.0.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="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:/CMSZMonitorAnalysis/apache-tomcat-7.0.47/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="D:/hungriam/CmszMonitorAnalysis/trunk/src/main/webapp/WEB-INF/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"/> <classpathentry kind="output" path="src/main/webapp/WEB-INF/classes"/>
</classpath> </classpath>
...@@ -34,6 +34,10 @@ public class DataModel implements Serializable{ ...@@ -34,6 +34,10 @@ public class DataModel implements Serializable{
private Date businessEndTime;//业务结束时间 private Date businessEndTime;//业务结束时间
private Long batchNo; private Long batchNo;
private Long modelStatus;//模型状态 private Long modelStatus;//模型状态
private Long kpiTypeId;//数据类型
private String modelDesc;//模型描述
private String evaluationMethod;//评判方法
private String evaluationStandard;//评判标准
@Id @Id
...@@ -117,5 +121,29 @@ public class DataModel implements Serializable{ ...@@ -117,5 +121,29 @@ public class DataModel implements Serializable{
public void setModelStatus(Long modelStatus) { public void setModelStatus(Long modelStatus) {
this.modelStatus = 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{ ...@@ -32,6 +32,10 @@ public class DataModelView{
private String serverName;//服务器名称 private String serverName;//服务器名称
private String modelParameter;//模型参数 private String modelParameter;//模型参数
private Long modelStatus;//模型状态 private Long modelStatus;//模型状态
private Long kpiTypeId;//数据类型
private String modelDesc;//模型描述
private String evaluationMethod;//评判方法
private String evaluationStandard;//评判标准
@Id @Id
@GeneratedValue(strategy=GenerationType.IDENTITY) @GeneratedValue(strategy=GenerationType.IDENTITY)
...@@ -113,5 +117,29 @@ public class DataModelView{ ...@@ -113,5 +117,29 @@ public class DataModelView{
public void setModelStatus(Long modelStatus) { public void setModelStatus(Long modelStatus) {
this.modelStatus = 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>, ...@@ -41,8 +41,8 @@ public interface DataModelDao extends JpaSpecificationExecutor<DataModel>,
*/ */
//根据数据模型ID修改数据模型 //根据数据模型ID修改数据模型
@Modifying @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") @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("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); 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 ...@@ -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") @Query("from DataModelView dataModelView where dataModelView.modelPublishTime between timestampadd(M,-1,getdate()) and getdate() order by dataModelView.modelPublishTime desc")
List<DataModelView> findLastDataModel(); 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); List<DataModelView> findByDataModelNameLikeOrderByModelPublishTimeDesc(String modelTitle);
......
...@@ -32,8 +32,8 @@ public class DataModelService { ...@@ -32,8 +32,8 @@ public class DataModelService {
//根据数据模型ID修改数据模型 //根据数据模型ID修改数据模型
@Transactional(readOnly=false) @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){ 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, ruleDefinition, dataModelTypeId, serverId, modelStatus, modelScriptName, modelUpdateTime, businessStartTime, businessEndTime, dataModelId); dataModelDao.updateDataModelByDataModelId(dataModelName, modelDesc, ruleDefinition, evaluationMethod, evaluationStandard, dataModelTypeId, serverId, modelStatus, modelScriptName, kpiTypeId, modelUpdateTime, businessStartTime, businessEndTime, dataModelId);
} }
//根据模型类别得到数据 //根据模型类别得到数据
......
...@@ -121,12 +121,16 @@ public class ModelMaintainController { ...@@ -121,12 +121,16 @@ public class ModelMaintainController {
public String saveModelDataForm(HttpServletResponse response,HttpServletRequest request) throws ParseException{ public String saveModelDataForm(HttpServletResponse response,HttpServletRequest request) throws ParseException{
String modelSavePath = systemParameterDao.findByParameterName("MODEL_SCRIPT_FILE_DIR").get(0).getParameterValue(); String modelSavePath = systemParameterDao.findByParameterName("MODEL_SCRIPT_FILE_DIR").get(0).getParameterValue();
String dataModelName = ""; String dataModelName = "";
String modelDesc = "";
String ruleDefinition = ""; String ruleDefinition = "";
String evaluationMethod = "";
String evaluationStandard = "";
String modelType = ""; String modelType = "";
String deployedServer = ""; String deployedServer = "";
String modelStatus = ""; String modelStatus = "";
//String cycleMinutes = ""; //String cycleMinutes = "";
String modelExeScriptName = ""; String modelExeScriptName = "";
String kpiTypeId = "";
String businessEndTime = ""; String businessEndTime = "";
String businessStartTime = ""; String businessStartTime = "";
Date publishTime = new Date(); Date publishTime = new Date();
...@@ -147,14 +151,22 @@ public class ModelMaintainController { ...@@ -147,14 +151,22 @@ public class ModelMaintainController {
String tempName = fm.getString("UTF-8"); String tempName = fm.getString("UTF-8");
if(formName.equals("dataModelName")){ if(formName.equals("dataModelName")){
dataModelName = tempName; dataModelName = tempName;
}else if(formName.equals("modelDesc")){
modelDesc = tempName;
}else if(formName.equals("ruleDefinition")){ }else if(formName.equals("ruleDefinition")){
ruleDefinition = tempName; ruleDefinition = tempName;
}else if(formName.equals("evaluationMethod")){
evaluationMethod = tempName;
}else if(formName.equals("evaluationStandard")){
evaluationStandard = tempName;
}else if(formName.equals("modelType")){ }else if(formName.equals("modelType")){
modelType = tempName; modelType = tempName;
}else if(formName.equals("deployedServer")){ }else if(formName.equals("deployedServer")){
deployedServer = tempName; deployedServer = tempName;
}else if(formName.equals("modelStatus")){ }else if(formName.equals("modelStatus")){
modelStatus = tempName; modelStatus = tempName;
}else if(formName.equals("kpiTypeId")){
kpiTypeId = tempName;
}/*else if(formName.equals("cycleMinutes")){ }/*else if(formName.equals("cycleMinutes")){
cycleMinutes = tempName; cycleMinutes = tempName;
}*/else if(formName.equals("businessStartTime")){ }*/else if(formName.equals("businessStartTime")){
...@@ -187,10 +199,14 @@ public class ModelMaintainController { ...@@ -187,10 +199,14 @@ public class ModelMaintainController {
SimpleDateFormat batchFormat = new SimpleDateFormat("yyyyMMdd000001"); SimpleDateFormat batchFormat = new SimpleDateFormat("yyyyMMdd000001");
dataModel.setBatchNo(Long.parseLong(batchFormat.format(sd.parse(businessStartTime)))); dataModel.setBatchNo(Long.parseLong(batchFormat.format(sd.parse(businessStartTime))));
dataModel.setDataModelName(dataModelName); dataModel.setDataModelName(dataModelName);
if(!modelDesc.trim().equals("")){dataModel.setModelDesc(modelDesc);}
if(!ruleDefinition.trim().equals("")){dataModel.setRuleDefinition(ruleDefinition);} 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(!modelType.trim().equals("")){dataModel.setDataModelTypeId(Long.parseLong(modelType));}
if(!deployedServer.trim().equals("")){dataModel.setServerId(Long.parseLong(deployedServer));} if(!deployedServer.trim().equals("")){dataModel.setServerId(Long.parseLong(deployedServer));}
if(!modelStatus.trim().equals("")){dataModel.setModelStatus(Long.parseLong(modelStatus));} 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));}*/ /*if(!cycleMinutes.trim().equals("")){dataModel.setCycleMinutes(Long.parseLong(cycleMinutes));}*/
dataModel.setModelPublishTime(publishTime); dataModel.setModelPublishTime(publishTime);
dataModel.setModelUpdateTime(updateTime); dataModel.setModelUpdateTime(updateTime);
......
...@@ -165,11 +165,15 @@ public class ModelParameterConfigurationController { ...@@ -165,11 +165,15 @@ public class ModelParameterConfigurationController {
String modelScript = dataModelDao.findByDataModelId(Long.parseLong(staticDataModelId)).getModelScriptName(); String modelScript = dataModelDao.findByDataModelId(Long.parseLong(staticDataModelId)).getModelScriptName();
String dataModelName = ""; String dataModelName = "";
String modelDesc = "";
String ruleDefinition = ""; String ruleDefinition = "";
String evaluationMethod = "";
String evaluationStandard = "";
String modelTypeId = ""; String modelTypeId = "";
String deployedServerId = ""; String deployedServerId = "";
String modelStatus = ""; String modelStatus = "";
//String cycleMinutes = ""; //String cycleMinutes = "";
String kpiTypeId = "";
String businessEndTime = ""; String businessEndTime = "";
String businessStartTime = ""; String businessStartTime = "";
Date updateTime = new Date(); Date updateTime = new Date();
...@@ -201,8 +205,14 @@ public class ModelParameterConfigurationController { ...@@ -201,8 +205,14 @@ public class ModelParameterConfigurationController {
String tempName = fm.getString("UTF-8"); String tempName = fm.getString("UTF-8");
if(formName.equals("dataModelName")){ if(formName.equals("dataModelName")){
dataModelName = tempName; dataModelName = tempName;
}else if(formName.equals("modelDesc")){
modelDesc = tempName;
}else if(formName.equals("ruleDefinition")){ }else if(formName.equals("ruleDefinition")){
ruleDefinition = tempName; ruleDefinition = tempName;
}else if(formName.equals("evaluationMethod")){
evaluationMethod = tempName;
}else if(formName.equals("evaluationStandard")){
evaluationStandard = tempName;
}else if(formName.equals("modelType")){ }else if(formName.equals("modelType")){
modelTypeId = tempName; modelTypeId = tempName;
}else if(formName.equals("deployedServer")){ }else if(formName.equals("deployedServer")){
...@@ -211,7 +221,9 @@ public class ModelParameterConfigurationController { ...@@ -211,7 +221,9 @@ public class ModelParameterConfigurationController {
modelStatus = tempName; modelStatus = tempName;
}/*else if(formName.equals("cycleMinutes")){ }/*else if(formName.equals("cycleMinutes")){
cycleMinutes = tempName; cycleMinutes = tempName;
}*/else if(formName.equals("businessStartTime")){ }*/else if(formName.equals("kpiTypeId")){
kpiTypeId = tempName;
}else if(formName.equals("businessStartTime")){
businessStartTime = tempName; businessStartTime = tempName;
}else if(formName.equals("businessEndTime")){ }else if(formName.equals("businessEndTime")){
businessEndTime = tempName; businessEndTime = tempName;
...@@ -228,7 +240,7 @@ public class ModelParameterConfigurationController { ...@@ -228,7 +240,7 @@ public class ModelParameterConfigurationController {
runTaskService.updateTaskStatusByModelId(Long.parseLong(staticDataModelId)); 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(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); 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; return "redirect:/ModelManage/ModelResult?modelPeriod="+staticModelPeriod+"&modelType="+staticModelType+"&modelTitle="+staticModelTitle+"&modelStatusId="+staticModelStatusId+"&modelPageNum="+staticModelPageNum;
......
...@@ -92,6 +92,7 @@ public class ModelResultController { ...@@ -92,6 +92,7 @@ public class ModelResultController {
private String staticType = ""; private String staticType = "";
private String staticTitle = ""; private String staticTitle = "";
private String staticModelStatusId = ""; private String staticModelStatusId = "";
private String staticKpiTypeId = "";
List<DataModelView> staticModelViewList = new ArrayList<DataModelView>(); List<DataModelView> staticModelViewList = new ArrayList<DataModelView>();
@RequestMapping(value = "") @RequestMapping(value = "")
...@@ -100,6 +101,7 @@ public class ModelResultController { ...@@ -100,6 +101,7 @@ public class ModelResultController {
@RequestParam(value = "modelType", defaultValue="") String modelType, @RequestParam(value = "modelType", defaultValue="") String modelType,
@RequestParam(value = "modelTitle", defaultValue="") String modelTitle, @RequestParam(value = "modelTitle", defaultValue="") String modelTitle,
@RequestParam(value = "modelStatusId", defaultValue="") String modelStatusId, @RequestParam(value = "modelStatusId", defaultValue="") String modelStatusId,
@RequestParam(value = "kpiTypeId", defaultValue="") String kpiTypeId,
@RequestParam(value = "modelPageNum", defaultValue="1") String modelPageNum, @RequestParam(value = "modelPageNum", defaultValue="1") String modelPageNum,
Map model){ Map model){
List<DataModelType> dataModelTypeList = dataModelTypeDao.findAllDataModelType(); List<DataModelType> dataModelTypeList = dataModelTypeDao.findAllDataModelType();
...@@ -127,10 +129,15 @@ public class ModelResultController { ...@@ -127,10 +129,15 @@ public class ModelResultController {
for(int i=0;i<modelType.split(",").length;i++){ for(int i=0;i<modelType.split(",").length;i++){
modelTypeList.add(Long.parseLong(modelType.split(",")[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("")){ if(modelStatusId.equals("")){
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList); dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInAndKpiTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList, kpiTypeIdList);
}else{ }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); //dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList);
...@@ -168,11 +175,13 @@ public class ModelResultController { ...@@ -168,11 +175,13 @@ public class ModelResultController {
@RequestParam(value = "modelType", defaultValue="") String modelType, @RequestParam(value = "modelType", defaultValue="") String modelType,
@RequestParam(value = "modelStatusId", defaultValue="") String modelStatusId, @RequestParam(value = "modelStatusId", defaultValue="") String modelStatusId,
@RequestParam(value = "modelTitle", defaultValue="") String modelTitle, @RequestParam(value = "modelTitle", defaultValue="") String modelTitle,
@RequestParam(value = "kpiTypeId", defaultValue="") String kpiTypeId,
HttpServletResponse response) throws UnsupportedEncodingException{ HttpServletResponse response) throws UnsupportedEncodingException{
staticTime = modelPeriod; staticTime = modelPeriod;
staticType = modelType; staticType = modelType;
staticTitle = modelTitle; staticTitle = modelTitle;
staticModelStatusId = modelStatusId ; staticModelStatusId = modelStatusId ;
staticKpiTypeId = kpiTypeId;
System.out.println("modelPeriod="+modelPeriod+"\nmodelType="+modelType+"\nmodelTitle="+modelTitle); System.out.println("modelPeriod="+modelPeriod+"\nmodelType="+modelType+"\nmodelTitle="+modelTitle);
List<DataModelView> dataModelViewList = new ArrayList<DataModelView>(); List<DataModelView> dataModelViewList = new ArrayList<DataModelView>();
...@@ -194,10 +203,14 @@ public class ModelResultController { ...@@ -194,10 +203,14 @@ public class ModelResultController {
for(int i=0;i<modelType.split(",").length;i++){ for(int i=0;i<modelType.split(",").length;i++){
modelTypeList.add(Long.parseLong(modelType.split(",")[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("")){ if(modelStatusId.equals("")){
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList); dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInAndKpiTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList, kpiTypeIdList);
}else{ }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); //dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList);
...@@ -274,9 +287,9 @@ public class ModelResultController { ...@@ -274,9 +287,9 @@ public class ModelResultController {
modelTypeList.add(Long.parseLong(staticType.split(",")[i])); modelTypeList.add(Long.parseLong(staticType.split(",")[i]));
} }
if(!staticModelStatusId.equals("")){ if(!staticModelStatusId.equals("")){
dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList); dataModelViewList = dataModelViewDao.findByModelPublishTimeBetweenAndDataModelTypeIdInAndKpiTypeIdOrderByModelPublishTimeDesc(startTime, endTime, modelTypeList, Long.parseLong(staticKpiTypeId));
}else{ }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 { ...@@ -340,11 +353,15 @@ public class ModelResultController {
List<String> fialList = new ArrayList<String>(); List<String> fialList = new ArrayList<String>();
fialList.add("数据模型ID"); 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("部署服务器"); fialList.add("部署服务器");
//fialList.add("模型运行频度分钟数"); //fialList.add("模型运行频度分钟数");
fialList.add("数据类型");
fialList.add("模型发布时间"); fialList.add("模型发布时间");
fialList.add("模型修改时间"); fialList.add("模型修改时间");
...@@ -407,13 +424,17 @@ public class ModelResultController { ...@@ -407,13 +424,17 @@ public class ModelResultController {
row.createCell(0).setCellValue(dataModelView.getDataModelId()); row.createCell(0).setCellValue(dataModelView.getDataModelId());
dataModelIds.add(dataModelView.getDataModelId()); dataModelIds.add(dataModelView.getDataModelId());
row.createCell(1).setCellValue(dataModelView.getDataModelName()); row.createCell(1).setCellValue(dataModelView.getDataModelName());
if(dataModelView.getRuleDefinition()!=null){row.createCell(2).setCellValue(dataModelView.getRuleDefinition());} row.createCell(2).setCellValue(dataModelView.getModelDesc());
row.createCell(3).setCellValue(dataModelView.getModelScriptName()); if(dataModelView.getRuleDefinition()!=null){row.createCell(3).setCellValue(dataModelView.getRuleDefinition());}
row.createCell(4).setCellValue(dataModelView.getDataModelTypeName()); row.createCell(4).setCellValue(dataModelView.getEvaluationMethod());
row.createCell(5).setCellValue(dataModelView.getServerName()); 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());} //if(dataModelView.getCycleMinutes()!=null){row.createCell(6).setCellValue(dataModelView.getCycleMinutes());}
row.createCell(6).setCellValue(formatDate.format(dataModelView.getModelPublishTime())); row.createCell(9).setCellValue(dataModelView.getKpiTypeId());
if(dataModelView.getModelUpdateTime()!=null){row.createCell(7).setCellValue(formatDate.format(dataModelView.getModelUpdateTime()));} 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 ...@@ -28,7 +28,7 @@ jdbc.database=ccolap
#jdbc.username=szcm #jdbc.username=szcm
#jdbc.password=szcm #jdbc.password=szcm
jdbc.driver=com.vertica.jdbc.Driver 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.username=ccolap
jdbc.password=hg.2015 jdbc.password=hg.2015
##test ##test
......
...@@ -28,7 +28,7 @@ jdbc.database=ccolap ...@@ -28,7 +28,7 @@ jdbc.database=ccolap
#jdbc.username=szcm #jdbc.username=szcm
#jdbc.password=szcm #jdbc.password=szcm
jdbc.driver=com.vertica.jdbc.Driver 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.username=ccolap
jdbc.password=hg.2015 jdbc.password=hg.2015
##test ##test
......
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