Commit 1ba4a8ac authored by liuna's avatar liuna

2017年12月4日 智能分析平台提交内容

--数据质量核查下质量规则修改页面完成
parent 8c943857
This diff is collapsed.
...@@ -34,6 +34,8 @@ public class QualityRule { ...@@ -34,6 +34,8 @@ public class QualityRule {
private Timestamp ruleUpdateTime;//规则更新时间 private Timestamp ruleUpdateTime;//规则更新时间
private String ruleValidFlag;//规则是否有效 private String ruleValidFlag;//规则是否有效
private String ifSystemValue; private String ifSystemValue;
private Long frequencyValue;//kpiMonitorTime的值
private Long frequencyType;//kpiMonitorTime的单位
@Id @Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="QualityRuleSequence") @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="QualityRuleSequence")
...@@ -117,6 +119,22 @@ public class QualityRule { ...@@ -117,6 +119,22 @@ public class QualityRule {
this.ifSystemValue = ifSystemValue; this.ifSystemValue = ifSystemValue;
} }
public Long getFrequencyValue() {
return frequencyValue;
}
public void setFrequencyValue(Long frequencyValue) {
this.frequencyValue = frequencyValue;
}
public Long getFrequencyType() {
return frequencyType;
}
public void setFrequencyType(Long frequencyType) {
this.frequencyType = frequencyType;
}
@Override @Override
public String toString() { public String toString() {
return "QualityRule{" + return "QualityRule{" +
...@@ -127,12 +145,14 @@ public class QualityRule { ...@@ -127,12 +145,14 @@ public class QualityRule {
", provinceId=" + provinceId + ", provinceId=" + provinceId +
", dataSourceId=" + dataSourceId + ", dataSourceId=" + dataSourceId +
", kpiMonitorTime='" + kpiMonitorTime + '\'' + ", kpiMonitorTime='" + kpiMonitorTime + '\'' +
", kpiMonitorRunTime='" + kpiMonitorRunTime + '\'' + ", kpiMonitorRunTime=" + kpiMonitorRunTime +
", businessTime=" + businessTime + ", businessTime=" + businessTime +
", ruleCrtTime=" + ruleCrtTime + ", ruleCrtTime=" + ruleCrtTime +
", ruleUpdateTime=" + ruleUpdateTime + ", ruleUpdateTime=" + ruleUpdateTime +
", ruleValidFlag='" + ruleValidFlag + '\'' + ", ruleValidFlag='" + ruleValidFlag + '\'' +
", ifSystemValue='" + ifSystemValue + '\'' + ", ifSystemValue='" + ifSystemValue + '\'' +
", frequencyValue=" + frequencyValue +
", frequencyType=" + frequencyType +
'}'; '}';
} }
} }
...@@ -34,8 +34,8 @@ public interface QualityRuleDao extends JpaSpecificationExecutor<QualityRule>, ...@@ -34,8 +34,8 @@ public interface QualityRuleDao extends JpaSpecificationExecutor<QualityRule>,
//根据质量规则ID修改质量规则 //根据质量规则ID修改质量规则
@Modifying @Modifying
@Query("update from QualityRule qr set qr.businessId=:businessId, qr.kpiId=:kpiId, qr.channelId=:channelId, qr.provinceId=:provinceId, qr.dataSourceId=:dataSourceId, qr.kpiMonitorTime=:kpiMonitorTime, qr.kpiMonitorRunTime=:kpiMonitorRunTime, qr.businessTime=:businessTime, qr.ruleCrtTime=:ruleCrtTime, qr.ruleUpdateTime=:ruleUpdateTime where qr.qualityRuleId=:qualityRuleId") @Query("update from QualityRule qr set qr.kpiMonitorTime=:kpiMonitorTime, qr.kpiMonitorRunTime=:kpiMonitorRunTime, qr.businessTime=:businessTime, qr.ruleUpdateTime=:ruleUpdateTime where qr.qualityRuleId=:qualityRuleId")
void updateQualityRuleByQualityRuleId(@Param("businessId")Long businessId,@Param("kpiId")Long kpiId,@Param("channelId")Long channelId,@Param("provinceId")Long provinceId,@Param("dataSourceId")Long dataSourceId,@Param("kpiMonitorTime")String kpiMonitorTime,@Param("kpiMonitorRunTime")Timestamp kpiMonitorRunTime,@Param("businessTime")Timestamp businessTime,@Param("ruleCrtTime")Timestamp ruleCrtTime,@Param("ruleUpdateTime")Timestamp ruleUpdateTime,@Param("qualityRuleId")Long qualityRuleId); void updateQualityRuleByQualityRuleId(@Param("kpiMonitorTime")String kpiMonitorTime,@Param("kpiMonitorRunTime")Timestamp kpiMonitorRunTime,@Param("businessTime")Timestamp businessTime,@Param("ruleUpdateTime")Timestamp ruleUpdateTime,@Param("qualityRuleId")Long qualityRuleId);
//根据质量规则ID得到数据条数 //根据质量规则ID得到数据条数
@Query("select count(*) from QualityRule qualityRule where qualityRule.qualityRuleId=:qualityRuleId") @Query("select count(*) from QualityRule qualityRule where qualityRule.qualityRuleId=:qualityRuleId")
......
...@@ -28,7 +28,7 @@ public class QualityRuleService { ...@@ -28,7 +28,7 @@ public class QualityRuleService {
//根据质量规则ID修改质量规则 //根据质量规则ID修改质量规则
@Transactional(readOnly=false) @Transactional(readOnly=false)
public void updateByQualityRuleId(Long businessId,Long kpiId,Long channelId,Long provinceId,Long dataSourceId,String kpiMonitorTime,Timestamp kpiMonitorRunTime,Timestamp businessTime,Timestamp ruleCrtTime,Timestamp ruleUpdateTime,Long qualityRuleId){ public void updateByQualityRuleId(String kpiMonitorTime,Timestamp kpiMonitorRunTime,Timestamp businessTime,Timestamp ruleUpdateTime,Long qualityRuleId){
qualityRuleDao.updateQualityRuleByQualityRuleId(businessId,kpiId,channelId,provinceId,dataSourceId,kpiMonitorTime,kpiMonitorRunTime,businessTime,ruleCrtTime,ruleUpdateTime,qualityRuleId); qualityRuleDao.updateQualityRuleByQualityRuleId(kpiMonitorTime,kpiMonitorRunTime,businessTime,ruleUpdateTime,qualityRuleId);
} }
} }
...@@ -93,6 +93,7 @@ public class QualityRuleConfigurationController { ...@@ -93,6 +93,7 @@ public class QualityRuleConfigurationController {
@RequestMapping(value = "") @RequestMapping(value = "")
public String ruleMaintainHome(@RequestParam(value = "qualityRuleId", defaultValue ="") String qualityRuleId, public String ruleMaintainHome(@RequestParam(value = "qualityRuleId", defaultValue ="") String qualityRuleId,
Map model){ Map model){
System.out.println("qualityRuleId"+qualityRuleId);
staticQualityRuleId = qualityRuleId; staticQualityRuleId = qualityRuleId;
QualityRule qualityRule = null; QualityRule qualityRule = null;
List<AccuracyRule> accuracyRuleList = null; List<AccuracyRule> accuracyRuleList = null;
...@@ -251,22 +252,64 @@ public class QualityRuleConfigurationController { ...@@ -251,22 +252,64 @@ public class QualityRuleConfigurationController {
@RequestMapping(value = "/updateQualityRuleForm",method=RequestMethod.POST) @RequestMapping(value = "/updateQualityRuleForm",method=RequestMethod.POST)
public String updateQualityRuleForm(@RequestParam(value="qualityRuleId") String qualityRuleId, public String updateQualityRuleForm(@RequestParam(value="qualityRuleId") String qualityRuleId,
@RequestParam(value="businessid") String businessId, @RequestParam(value="businessid") String businessId,
@RequestParam(value="provinceid") String provinceId, @RequestParam(value="province") String provinceId,
@RequestParam(value="channelid") String channelId, @RequestParam(value="channel") String channelId,
@RequestParam(value="dataSourceid") String dataSourceId, @RequestParam(value="dataSource") String dataSourceId,
@RequestParam(value="kpiid") String kpiId, @RequestParam(value="kpiinput") String kpiId,
@RequestParam(value="kpiMonitorTimeValue") String kpiMonitorTimeValue, @RequestParam(value="frequencyValue") String frequencyValue,
@RequestParam(value="kpiUnit") String kpiUnit, @RequestParam(value="frequencyType") String frequencyType,
@RequestParam(value ="ruleCrtTime") String ruleCrtTime,
@RequestParam(value="businessTime") String businessTime, @RequestParam(value="businessTime") String businessTime,
HttpServletResponse response, HttpServletRequest request) throws ParseException { HttpServletResponse response, HttpServletRequest request) throws ParseException {
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
QualityRule qualityRule = new QualityRule(); QualityRule qualityRule = new QualityRule();
qualityRule.setQualityRuleId(Long.parseLong(qualityRuleId));
if (!provinceId.trim().equals("")) {
qualityRule.setProvinceId(Long.parseLong(provinceId));
}
if (!channelId.trim().equals("")) {
qualityRule.setChannelId(Long.parseLong(channelId));
}
if (!dataSourceId.trim().equals("")) {
qualityRule.setDataSourceId(Long.parseLong(dataSourceId));
}
if (!kpiId.trim().equals("")) {
qualityRule.setKpiId(Long.parseLong(kpiId));
if (!frequencyValue.trim().equals("")) {
qualityRule.setFrequencyValue(Long.parseLong(frequencyValue));
qualityRule.setFrequencyType(Long.parseLong(frequencyType));
if (frequencyType.equals("0")) {
qualityRule.setKpiMonitorTime(frequencyValue + "/1440");
} else if (frequencyType.equals("1")) {
qualityRule.setKpiMonitorTime(frequencyValue + "/24");
} else if (frequencyType.equals("2")) {
qualityRule.setKpiMonitorTime(frequencyValue);
} else if (frequencyType.equals("3")) {
qualityRule.setKpiMonitorTime("ADD_MONTH(" + frequencyValue + ")");
}
}
if (!businessTime.trim().equals("")) {
qualityRule.setBusinessTime(Timestamp.valueOf(businessTime));
}
if (!frequencyValue.trim().equals("")) {
if (frequencyType.equals("0")) {
qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(sd.parse(businessTime).getTime() + Integer.parseInt(frequencyValue) * 60 * 1000)));
} else if (frequencyType.equals("1")) {
qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(sd.parse(businessTime).getTime() + Integer.parseInt(frequencyValue) * 60 * 60 * 1000)));
} else if (frequencyType.equals("2")) {
qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(sd.parse(businessTime).getTime() + Integer.parseInt(frequencyValue) * 24 * 60 * 60 * 1000)));
} else if (frequencyType.equals("3")) {
qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(sd.parse(businessTime).getMonth() + Integer.parseInt(frequencyValue))));
}
}
}
qualityRule.setRuleCrtTime(Timestamp.valueOf(ruleCrtTime));
qualityRule.setRuleUpdateTime(Timestamp.valueOf(sd.format(new Date())));
qualityRule.setRuleUpdateTime(Timestamp.valueOf(sd.format(new Date()))); qualityRuleDao.save(qualityRule);
qualityRule.setBusinessTime(Timestamp.valueOf(businessTime)); cmszOperationLogService.createLog("修改", "更新数据质量规则", "quality_rule_warehouse_info_t. QUALITY_RULE_ID=" + qualityRule.getQualityRuleId().toString());
return PageURLController.RuleConfiguration; return "redirect:/AnalysisSupport/QualityRuleResult";
} }
} }
...@@ -256,12 +256,12 @@ public class QualityRuleMaintainController { ...@@ -256,12 +256,12 @@ public class QualityRuleMaintainController {
@RequestParam(value="channel") String channel, @RequestParam(value="channel") String channel,
@RequestParam(value="dataSource") String dataSourceId, @RequestParam(value="dataSource") String dataSourceId,
@RequestParam(value="kpiinput") String kpi, @RequestParam(value="kpiinput") String kpi,
@RequestParam(value="kpiUnit") String kpiUnit, @RequestParam(value="frequencyType") String frequencyType,
@RequestParam(value="kpiMonitorTimeValue") String kpiMonitorTimeValue, @RequestParam(value="frequencyValue") String frequencyValue,
@RequestParam(value="businessTime") String businessTime, @RequestParam(value="businessTime") String businessTime,
HttpServletResponse response, HttpServletRequest request) throws ParseException { HttpServletResponse response, HttpServletRequest request) throws ParseException {
System.out.println("kpiUnit:"+kpiUnit+"kpiMonitorTimeValue:"+kpiMonitorTimeValue); System.out.println("frequencyType:"+frequencyType+"kpiMonitorTimeValue:"+frequencyValue);
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List<Long> provinceIdList = new ArrayList<Long>(); List<Long> provinceIdList = new ArrayList<Long>();
...@@ -283,31 +283,29 @@ public class QualityRuleMaintainController { ...@@ -283,31 +283,29 @@ public class QualityRuleMaintainController {
qualityRule.setKpiId(kpiIdList.get(l)); qualityRule.setKpiId(kpiIdList.get(l));
if(!channel.trim().equals("")){ qualityRule.setChannelId(Long.parseLong(channel)); } if(!channel.trim().equals("")){ qualityRule.setChannelId(Long.parseLong(channel)); }
if(!dataSourceId.trim().equals("")){ qualityRule.setDataSourceId(Long.parseLong(dataSourceId)); } if(!dataSourceId.trim().equals("")){ qualityRule.setDataSourceId(Long.parseLong(dataSourceId)); }
if(!kpiMonitorTimeValue.trim().equals("")){ if(!frequencyValue.trim().equals("")){
if(kpiUnit.equals("0")){ qualityRule.setFrequencyValue(Long.parseLong(frequencyValue));
qualityRule.setKpiMonitorTime(kpiMonitorTimeValue+"/1440"); qualityRule.setFrequencyType(Long.parseLong(frequencyType));
} else if(kpiUnit.equals("1")){ if(frequencyType.equals("0")){
qualityRule.setKpiMonitorTime(kpiMonitorTimeValue+"/24"); qualityRule.setKpiMonitorTime(frequencyValue+"/1440");
} else if(kpiUnit.equals("2")){ } else if(frequencyType.equals("1")){
qualityRule.setKpiMonitorTime(kpiMonitorTimeValue); qualityRule.setKpiMonitorTime(frequencyValue+"/24");
} else if(kpiUnit.equals("3")){ } else if(frequencyType.equals("2")){
qualityRule.setKpiMonitorTime("ADD_MONTH("+kpiMonitorTimeValue+")"); qualityRule.setKpiMonitorTime(frequencyValue);
} else if(frequencyType.equals("3")){
qualityRule.setKpiMonitorTime("ADD_MONTH("+frequencyValue+")");
} }
} }
if(!businessTime.trim().equals("")){ qualityRule.setBusinessTime(Timestamp.valueOf(businessTime)); } if(!businessTime.trim().equals("")){ qualityRule.setBusinessTime(Timestamp.valueOf(businessTime)); }
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); if(!frequencyValue.trim().equals("")){
System.out.println(businessTime); if(frequencyType.equals("0")){
System.out.println("sdf.parse(businessTime)"+sdf.parse(businessTime)); qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(sd.parse(businessTime).getTime()+Integer.parseInt(frequencyValue)*60*1000)));
System.out.println("毫秒:"+sdf.parse(businessTime).getTime()); } else if(frequencyType.equals("1")){
if(!kpiMonitorTimeValue.trim().equals("")){ qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(sd.parse(businessTime).getTime()+Integer.parseInt(frequencyValue)*60*60*1000)));
if(kpiUnit.equals("0")){ } else if(frequencyType.equals("2")){
qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(sd.parse(businessTime).getTime()+Integer.parseInt(kpiMonitorTimeValue)*60*1000))); qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(sd.parse(businessTime).getTime()+Integer.parseInt(frequencyValue)*24*60*60*1000)));
} else if(kpiUnit.equals("1")){ } else if(frequencyType.equals("3")){
qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(sd.parse(businessTime).getTime()+Integer.parseInt(kpiMonitorTimeValue)*60*60*1000))); qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(sd.parse(businessTime).getMonth()+Integer.parseInt(frequencyValue))));
} else if(kpiUnit.equals("2")){
qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(sd.parse(businessTime).getTime()+Integer.parseInt(kpiMonitorTimeValue)*24*60*60*1000)));
} else if(kpiUnit.equals("3")){
qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(sd.parse(businessTime).getMonth()+Integer.parseInt(kpiMonitorTimeValue))));
} }
} }
qualityRule.setRuleCrtTime(Timestamp.valueOf(sd.format(new Date()))); qualityRule.setRuleCrtTime(Timestamp.valueOf(sd.format(new Date())));
......
...@@ -52,10 +52,11 @@ ...@@ -52,10 +52,11 @@
<div class="table-header">数据质量规则更新</div> <div class="table-header">数据质量规则更新</div>
<form action="#" class="form-horizontal" id="ruleUpdateForm" method="post"> <form action="#" class="form-horizontal" id="ruleUpdateForm" method="post">
<table id="ruleMaintainTable" class="table-null"> <table id="ruleMaintainTable" class="table-null">
<tr><td>数据质量规则ID:</td><td id="qualityRuleId"></td></tr>
<tr><td>省份(<font color="red">必填</font>):</td> <tr><td>省份(<font color="red">必填</font>):</td>
<td> <td>
<c:forEach var="province" items="${provinceList}"> <c:forEach var="province" items="${provinceList}">
<input type="checkbox" name="province" id="province" value="${province.provinceId}" checked>${province.provinceName} <input type="checkbox" name="province" value="${province.provinceId}" >${province.provinceName}
</c:forEach> </c:forEach>
</td> </td>
</tr> </tr>
...@@ -106,8 +107,8 @@ ...@@ -106,8 +107,8 @@
</tr> </tr>
<tr><td>指标监控时间(<font color="red">必填</font>):</td> <tr><td>指标监控时间(<font color="red">必填</font>):</td>
<td> <td>
<input type="text" style="width:200px" name="kpiMonitorTimeValue" id="kpiMonitorTimeValue" /> <input type="text" style="width:200px" name="frequencyValue" id="frequencyValue" />
<select style="width:200px" name="kpiUnit" id="kpiUnit" style="display: inline;"> <select style="width:200px" name="frequencyType" id="frequencyType">
<option value="0">分钟</option> <option value="0">分钟</option>
<option value="1">小时</option> <option value="1">小时</option>
<option value="2"></option> <option value="2"></option>
...@@ -171,29 +172,7 @@ ...@@ -171,29 +172,7 @@
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript">
//加载页面时显示
var getQualityRuleId = "${qualityRule.qualityRuleId}";
var getProvince = "${qualityRule.provinceId}";
var getDataSource = "${qualityRule.dataSourceId}";
var getChannel = "${qualityRule.channelId}";
var getBusinessinput = "${qualityRule.businessId}";
var getKpiinput = "${qualityRule.kpiId}";
var getCalCycle = "${qualityRule.calCycle}";
var getKpiMonitorTimeValue = "${qualityRule.kpiMonitorTimeValue}";
var getKpiUnit = "${qualityRule.kpiUnit}";
var getBusinessTime = "${qualityRule.businessTime}";
$("#qualityRuleId").text(getQualityRuleId);
$("#province").val(getProvince);
$("#dataSource").val(getDataSource);
$("#channel").val(getChannel);
$(".businessinput").val(getBusinessinput);
$(".kpiinput").val(getKpiinput);
$("#calCycle").val(getCalCycle);
$("#kpiMonitorTimeValue").val(getKpiMonitorTimeValue);
$("#kpiUnit").val(getKpiUnit);
$("#businessTime").val(getBusinessTime);
</script>
<script type="text/javascript"> <script type="text/javascript">
$(".range").hide(); $(".range").hide();
$(".repeate").hide(); $(".repeate").hide();
...@@ -462,7 +441,7 @@ ...@@ -462,7 +441,7 @@
td.empty(); td.empty();
data = JSON.parse(data) data = JSON.parse(data)
data.forEach(function(t){ data.forEach(function(t){
td.append("<input type='checkbox' name='kpiinput' class='kpiItem' value='"+t[0]+"' checked >"+t[1]+"</input>") td.append("<input type='checkbox' name='kpiinput' class='kpiItem' value='"+t[0]+"' >"+t[1]+"</input>")
}); });
} }
}); });
...@@ -481,7 +460,7 @@ ...@@ -481,7 +460,7 @@
td.empty(); td.empty();
data = JSON.parse(data) data = JSON.parse(data)
data.forEach(function(t){ data.forEach(function(t){
td.append("<input type='checkbox' name='businessinput' class='businessItem' value='"+t[0]+"' checked >"+t[1]+"</input>") td.append("<input type='checkbox' name='businessinput' class='businessItem' value='"+t[0]+"' >"+t[1]+"</input>")
businessIds+=t[0]+","; businessIds+=t[0]+",";
}); });
updateKpi(businessIds,calCycleValue); updateKpi(businessIds,calCycleValue);
...@@ -575,6 +554,41 @@ ...@@ -575,6 +554,41 @@
console.log("provinceValue:"+provinceValue+"businessValue:"+businessValue+"kpiValue:"+kpiValue) console.log("provinceValue:"+provinceValue+"businessValue:"+businessValue+"kpiValue:"+kpiValue)
</script> </script>
<script type="text/javascript">
//加载页面时显示
var getQualityRuleId = "${qualityRule.qualityRuleId}";
var getProvince = "${qualityRule.provinceId}";
var getDataSource = "${qualityRule.dataSourceId}";
var getChannel = "${qualityRule.channelId}";
var getBusinessinput = "${qualityRule.businessId}";
var getKpiinput = "${qualityRule.kpiId}";
var getFrequencyValue = "${qualityRule.frequencyValue}";
var getFrequencyType = "${qualityRule.frequencyType}";
var getBusinessTime = "${qualityRule.businessTime}";
$("#qualityRuleId").text(getQualityRuleId);
$("input[name='province']").each(function(){
if($(this).val()==getProvince){
console.log( $(this))
$(this).attr("checked",true);
}
});
$("#dataSource").val(getDataSource);
$("#channel").val(getChannel);
$("input[name='businessinput']").each(function(){
if($(this).val()==getBusinessinput){
console.log( $(this))
$(this).attr("checked",true);
}
});
$("input[name='kpiinput']").each(function(){
if($(this).val()==getKpiinput){
console.log( $(this))
$(this).attr("checked",true);
}
});
$("#frequencyValue").val(getFrequencyValue);
$("#frequencyType").val(getFrequencyType);
$("#businessTime").val(getBusinessTime);
</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
</tr> </tr>
<tr><td>指标监控时间(<font color="red">必填</font>):</td> <tr><td>指标监控时间(<font color="red">必填</font>):</td>
<td> <td>
<input type="text" name="kpiMonitorTimeValue" id="kpiMonitorTimeValue" style="display: inline;" /> <input type="text" name="frequencyValue" id="frequencyValue" style="display: inline;" />
<select name="kpiUnit" id="kpiUnit"> <select name="frequencyType" id="frequencyType">
<option value="0">分钟</option> <option value="0">分钟</option>
<option value="1">小时</option> <option value="1">小时</option>
<option value="2"></option> <option value="2"></option>
......
...@@ -115,35 +115,6 @@ $("#createRule").click(function(){ ...@@ -115,35 +115,6 @@ $("#createRule").click(function(){
lock:true lock:true
}); });
}); });
$("#updateRule").click(function(){
var pageNum = $("#goPageNo").val();
$.dialog({
title: "提醒",
content:"确定修改质量规则?",
ok: function(){location.href="${ctx}/AnalysisSupport/QualityRuleConfiguration?qualityRuleId="+qualityRuleId;},
okValue:"确定",
cancel: function(){},
cancelValue:"取消",
lock:true
});
});
$("#deleteRule").click(function(){
var pageNum = $("#goPageNo").val();
$.dialog({
title: "提醒",
content:"确定删除质量规则?",
ok: function(){location.href="${ctx}/AnalysisSupport/RuleDelete?qualityRuleId="+qualityRuleId;},
okValue:"确定",
cancel: function(){},
cancelValue:"取消",
lock:true
});
});
function ruleResultSubmit(){ function ruleResultSubmit(){
var dataSource=getStatsDataSourceCheckedValuesString(); var dataSource=getStatsDataSourceCheckedValuesString();
...@@ -183,7 +154,7 @@ $("#createRule").click(function(){ ...@@ -183,7 +154,7 @@ $("#createRule").click(function(){
success: function(data) { success: function(data) {
$("#qualityRuleView").val(data); $("#qualityRuleView").val(data);
ruleResultDetailTable(); ruleResultDetailTable();
ruleId=""; qualityRuleId="";
$("#updateRule").attr("disabled", true); $("#updateRule").attr("disabled", true);
toggleMenu('slidePushMenus2');//隐藏筛选项 toggleMenu('slidePushMenus2');//隐藏筛选项
updateTag(true); updateTag(true);
...@@ -192,26 +163,37 @@ $("#createRule").click(function(){ ...@@ -192,26 +163,37 @@ $("#createRule").click(function(){
} }
} }
function ruleResultReset(){ function ruleResultReset(){
ProvinceReset(); ProvinceReset();
statsDataSourceReset();//三级联动重置 statsDataSourceReset();//三级联动重置
} }
$("#updateRule").click(function(){
//更新按钮点击 var pageNum = $("#goPageNo").val();
$("#updateModel").click(function(){ $.dialog({
var pageNum = $("#goPageNo").val(); title: "提醒",
$.dialog({ content:"确定修改质量规则?",
title: "提醒", ok: function(){location.href="${ctx}/AnalysisSupport/QualityRuleConfiguration?qualityRuleId="+qualityRuleId;},
content:"确定修改模型?", okValue:"确定",
ok: function(){location.href="${ctx}/AnalysisSupport/RuleConfiguration?qualityRuleId="+ruleId+"&rulePageNum="+pageNum;}, cancel: function(){},
okValue:"确定", cancelValue:"取消",
cancel: function(){}, lock:true
cancelValue:"取消", });
lock:true });
});
$("#deleteRule").click(function(){
var pageNum = $("#goPageNo").val();
$.dialog({
title: "提醒",
content:"确定删除质量规则?",
ok: function(){location.href="${ctx}/AnalysisSupport/RuleDelete?qualityRuleId="+qualityRuleId;},
okValue:"确定",
cancel: function(){},
cancelValue:"取消",
lock:true
});
});
});
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -535,7 +535,7 @@ table_pagging.prototype = { ...@@ -535,7 +535,7 @@ table_pagging.prototype = {
//alert(clickObj); //alert(clickObj);
//alert(clickObj.nextSibling.innerHTML); //alert(clickObj.nextSibling.innerHTML);
$("#updateRule").attr("disabled", false); $("#updateRule").attr("disabled", false);
ruleId=parseInt(obj[parseInt(clickObj.nextSibling.innerHTML)].qualityRuleId); qualityRuleId=parseInt(obj[parseInt(clickObj.nextSibling.innerHTML)].qualityRuleId);
} }
......
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