Commit 1c6b8dca authored by 莫林毅's avatar 莫林毅

一 ,预分析与建模 ->数据模型管理 '模型预览&新建&修改'界面

增加 '参数编码'字段 2 ,预分析与建模 ->数据模型管理 页面 修改 '查看详情'点击事件 修改 后台sql
parent db8a15a3
...@@ -38,6 +38,9 @@ public interface ModelParameterDao extends JpaSpecificationExecutor<ModelParamet ...@@ -38,6 +38,9 @@ public interface ModelParameterDao extends JpaSpecificationExecutor<ModelParamet
void updateParamByParameterId(@Param("parameterName")String parameterName,@Param("parameterCode")String parameterCode,@Param("parameterValue")String parameterValue,@Param("parameterDataType")String parameterDataType,@Param("parameterId")Long parameterId); void updateParamByParameterId(@Param("parameterName")String parameterName,@Param("parameterCode")String parameterCode,@Param("parameterValue")String parameterValue,@Param("parameterDataType")String parameterDataType,@Param("parameterId")Long parameterId);
//根据数据模型ID查找参数d //根据数据模型ID查找参数d
List<ModelParameter> findByDataModelId(Long dataModelId); List<ModelParameter> findByDataModelId(Long dataModelId);
@Query(value = "SELECT mp FROM ModelParameter mp WHERE mp.dataModelId =:dataModelId AND mp.ifSystemDefault =:ifSystemDefault")
List<ModelParameter> findByDataModelIdAndifSystemDefault(@Param("dataModelId") Long dataModelId,@Param("ifSystemDefault") Long ifSystemDefault);
//根据数据模型ID查找系统默认的参数d //根据数据模型ID查找系统默认的参数d
......
...@@ -136,7 +136,7 @@ public class QualityRuleOperationController { ...@@ -136,7 +136,7 @@ public class QualityRuleOperationController {
String ifWarning="正常"; String ifWarning="正常";
sortType = HtmlUtils.htmlEscape(sortType); sortType = HtmlUtils.htmlEscape(sortType);
// Page<QualityRuleInfo> qualityRuleInfoPage = qualityRuleInfoService.getQualityRuleInfoPage(qualityRuleInfo,pageNumber,pageSize,sortType); // Page<QualityRuleInfo> qualityRuleInfoPage = qualityRuleInfoService.getQualityRuleInfoPage(qualityRuleInfo,pageNumber,pageSize,sortType);
Page<QualityRuleInfo> qualityRuleInfoPage = qualityRuleInfoService.getQualityRuleInfoBy(qualityRuleInfo, pageNumber, pageSize, sortType,dataSourceList,chnnalList,bussinesList,provinceList,ifFilterList,ifWarning,startTime,endTime); Page<QualityRuleInfo> qualityRuleInfoPage = null;//qualityRuleInfoService.getQualityRuleInfoBy(qualityRuleInfo, pageNumber, pageSize, sortType,dataSourceList,chnnalList,bussinesList,provinceList,ifFilterList,ifWarning,startTime,endTime);
// qualityRuleInfoList = qualityRuleInfoPage.iterator(); // qualityRuleInfoList = qualityRuleInfoPage.iterator();
for (Object aQualityRuleInfoPage : qualityRuleInfoPage) { for (Object aQualityRuleInfoPage : qualityRuleInfoPage) {
......
...@@ -288,6 +288,7 @@ public class TaskManageController { ...@@ -288,6 +288,7 @@ public class TaskManageController {
@RequestParam(value="paramId") String paramId, @RequestParam(value="paramId") String paramId,
@RequestParam(value="useType") String useType, @RequestParam(value="useType") String useType,
@RequestParam(value="paramValue") String paramValue, @RequestParam(value="paramValue") String paramValue,
@RequestParam(value="paramCode") String paramCode,
@RequestParam(value="paramType") String paramType, @RequestParam(value="paramType") String paramType,
@RequestParam(value="taskId") String taskId, @RequestParam(value="taskId") String taskId,
@RequestParam(value="modelId") String modelId, @RequestParam(value="modelId") String modelId,
...@@ -302,6 +303,7 @@ public class TaskManageController { ...@@ -302,6 +303,7 @@ public class TaskManageController {
if(!paramName.trim().equals("")){modelParameter.setParameterName(paramName);} if(!paramName.trim().equals("")){modelParameter.setParameterName(paramName);}
if(!paramValue.trim().equals("")){modelParameter.setParameterValue(paramValue);} if(!paramValue.trim().equals("")){modelParameter.setParameterValue(paramValue);}
if(!paramCode.trim().equals("")){modelParameter.setParameterCode(paramCode);}
if(!paramType.trim().equals("")){modelParameter.setParameterDataType(paramType);} if(!paramType.trim().equals("")){modelParameter.setParameterDataType(paramType);}
if(!taskId.trim().equals("")){modelParameter.setTaskId(Long.parseLong(taskId));} if(!taskId.trim().equals("")){modelParameter.setTaskId(Long.parseLong(taskId));}
if(!modelId.trim().equals("")){modelParameter.setDataModelId(Long.parseLong(modelId));} if(!modelId.trim().equals("")){modelParameter.setDataModelId(Long.parseLong(modelId));}
......
...@@ -315,7 +315,7 @@ public class ModelResultController { ...@@ -315,7 +315,7 @@ public class ModelResultController {
public void findParam( public void findParam(
@RequestParam(value = "dataModelId") String dataModelId, @RequestParam(value = "dataModelId") String dataModelId,
HttpServletResponse response){ HttpServletResponse response){
List<ModelParameter> modelParameterList = modelParameterDao.findByDataModelId(Long.parseLong(dataModelId)); List<ModelParameter> modelParameterList = modelParameterDao.findByDataModelIdAndifSystemDefault(Long.parseLong(dataModelId),0l);
cmszOperationLogService.createLog("查询","数据参数","查询数据参数"); cmszOperationLogService.createLog("查询","数据参数","查询数据参数");
Gson gson = new Gson(); Gson gson = new Gson();
response.setContentType("text/Xml;charset=gbk"); response.setContentType("text/Xml;charset=gbk");
......
...@@ -179,14 +179,15 @@ var kpiOptions = []; ...@@ -179,14 +179,15 @@ var kpiOptions = [];
var paramId = $(this).context.id; var paramId = $(this).context.id;
var modelId = $('#modelId').val(); var modelId = $('#modelId').val();
var paramName = $(this).find("td").eq(0).html(); var paramName = $(this).find("td").eq(0).html();
var paramValue = $(this).find("td").eq(1).find("input").val(); var paramCode = $(this).find("td").eq(1).html();
var paramType = $(this).find("td").eq(2).html(); var paramValue = $(this).find("td").eq(2).find("input").val();
var paramType = $(this).find("td").eq(3).html();
var taskId = $('#taskId').val(); var taskId = $('#taskId').val();
$.ajax({ $.ajax({
type: "GET", type: "GET",
contentType: "application/json", contentType: "application/json",
url: "${ctx}/BaseManage/TaskManage/createModelParam?useType="+$("#useType").val()+"&paramId="+paramId+"&modelId="+encodeURIComponent(modelId)+"&paramName=" + encodeURIComponent(paramName) + "&paramValue=" + encodeURIComponent(paramValue) + "&paramType=" + paramType + "&taskId=" + taskId, url: "${ctx}/BaseManage/TaskManage/createModelParam?useType="+$("#useType").val()+"&paramId="+paramId+"&modelId="+encodeURIComponent(modelId)+"&paramName=" + encodeURIComponent(paramName) +"&paramCode=" + encodeURIComponent(paramCode) + "&paramValue=" + encodeURIComponent(paramValue) + "&paramType=" + paramType + "&taskId=" + taskId,
dataType: "text", dataType: "text",
async: false, async: false,
beforeSend: function (data) { beforeSend: function (data) {
...@@ -371,7 +372,7 @@ var kpiOptions = []; ...@@ -371,7 +372,7 @@ var kpiOptions = [];
<c:forEach items="${dataModelParameterList}" var="dataModelParameter"> <c:forEach items="${dataModelParameterList}" var="dataModelParameter">
var tr = "<tr id='${dataModelParameter.parameterId}'><td>${dataModelParameter.parameterName}</td><td><input type='text' class='parameterValue' name='parameterValue' value='${dataModelParameter.parameterValue}'/></td><td>${dataModelParameter.parameterDataType}</td></tr>"; var tr = "<tr id='${dataModelParameter.parameterId}'><td>${dataModelParameter.parameterName}</td><td>${dataModelParameter.parameterCode}</td><td><input type='text' class='parameterValue' name='parameterValue' value='${dataModelParameter.parameterValue}'/></td><td>${dataModelParameter.parameterDataType}</td></tr>";
$('#addTr').append(tr); $('#addTr').append(tr);
</c:forEach> </c:forEach>
if("${useType}" !== "new"){ if("${useType}" !== "new"){
...@@ -500,7 +501,7 @@ var kpiOptions = []; ...@@ -500,7 +501,7 @@ var kpiOptions = [];
$('#addTr').empty(); $('#addTr').empty();
data = JSON.parse(data) data = JSON.parse(data)
data.forEach(function(t){ data.forEach(function(t){
var tr = "<tr id='"+t.parameterId+"'><td>"+t.parameterName+"</td><td><input type='text' class='parameterValue' value='"+t.parameterValue+"'/></td><td>"+t.parameterDataType+"</td></tr>"; var tr = "<tr id='"+t.parameterId+"'><td>"+t.parameterName+"</td><td>"+t.parameterCode+"</td><td><input type='text' class='parameterValue' value='"+t.parameterValue+"'/></td><td>"+t.parameterDataType+"</td></tr>";
$('#addTr').append(tr); $('#addTr').append(tr);
}) })
} }
...@@ -730,7 +731,7 @@ var kpiOptions = []; ...@@ -730,7 +731,7 @@ var kpiOptions = [];
<div style="width:420px;height: 130px;overflow: auto"> <div style="width:420px;height: 130px;overflow: auto">
<table class="table table-hover table-striped" id="displayParam" > <table class="table table-hover table-striped" id="displayParam" >
<thead> <thead>
<tr><th>参数名</th><th>参数值</th><th>参数类型</th></tr> <tr><th>参数名</th><th>参数编码</th><th>参数</th><th>参数类型</th></tr>
</thead> </thead>
<tbody id="addTr"> <tbody id="addTr">
......
...@@ -130,12 +130,14 @@ taskName = "自定义任务"; ...@@ -130,12 +130,14 @@ taskName = "自定义任务";
var context = "<div style='width:420px;height: 130px;overflow: auto'>" + var context = "<div style='width:420px;height: 130px;overflow: auto'>" +
"<table class='table table-hover table-striped' id='displayParam' >" + "<table class='table table-hover table-striped' id='displayParam' >" +
"<thead>" + "<thead>" +
"<tr><th>参数名</th><th>参数值</th><th>参数类型</th></tr>" + "<tr><th>参数名</th><th>参数编码</th><th>参数值</th><th>参数类型</th></tr>" +
"</thead>" + "</thead>" +
"<tbody id='addTr'>"; "<tbody id='addTr'>";
data.forEach(function (t) { data.forEach(function (t) {
context +='<tr class="parameterTr" id='+t.parameterId+'><td>'+t.parameterName+'</td><td><input type="text" class="parameterValue" value="'+t.parameterValue+'"/></td><td>'+t.parameterDataType+'</td></tr>'; var parameterCode=t.parameterCode;
if(parameterCode == null){parameterCode=''}
context +='<tr class="parameterTr" id='+t.parameterId+'><td>'+t.parameterName+'</td><td>'+parameterCode+'</td><td><input type="text" class="parameterValue" value="'+t.parameterValue+'"/></td><td>'+t.parameterDataType+'</td></tr>';
}); });
context = context+ context = context+
"</tbody>" + "</tbody>" +
......
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