Commit 5766eec2 authored by liuna's avatar liuna

2018年1月1日 --智能分析平台

--修改质量规则和过滤规则全选不联动
parent a0735b9a
This diff is collapsed.
...@@ -12,8 +12,8 @@ import java.io.Serializable; ...@@ -12,8 +12,8 @@ import java.io.Serializable;
* @author Liu Na * @author Liu Na
* *
*/ */
@Entity //@Entity
@Table(name = "APP_SM_DB_CITY_KPI_T",schema = "ccolap") //@Table(name = "APP_SM_DB_CITY_KPI_T",schema = "ccolap")
public class FlowMonitor implements Serializable { public class FlowMonitor implements Serializable {
private Long batchId; private Long batchId;
......
...@@ -147,27 +147,19 @@ public class QualityRuleMaintainController { ...@@ -147,27 +147,19 @@ public class QualityRuleMaintainController {
@RequestMapping(value = "/findKpiId*") @RequestMapping(value = "/findKpiId*")
@ResponseBody @ResponseBody
public void findKpiId(@RequestParam(value = "businessIds", defaultValue = "") String businessIds, public List<Object[]> findKpiId(@RequestParam(value = "businessIds", defaultValue = "") String businessIds,
@RequestParam(value = "calCycleValue", defaultValue = "30MI") String calCycleValue, @RequestParam(value = "calCycleValue", defaultValue = "30MI") String calCycleValue,
HttpServletResponse response) { HttpServletResponse response) {
String[] strs = businessIds.split(","); List<Object[]> businessKpiList = new ArrayList<Object[]>();
List<Long> businessIdlist = new ArrayList<Long>(); if(!"".equals(businessIds)){
for (int i = 0; i < strs.length; i++) { String[] strs = businessIds.split(",");
businessIdlist.add(Long.valueOf(strs[i])); List<Long> businessIdlist = new ArrayList<Long>();
} for (int i = 0; i < strs.length; i++) {
List<Object[]> businessKpiList = kpiDao.findKpiIdAndKpiNameAndKpiCodeByBusinessIds(calCycleValue, businessIdlist); businessIdlist.add(Long.valueOf(strs[i]));
}
Gson gson = new Gson(); businessKpiList = kpiDao.findKpiIdAndKpiNameAndKpiCodeByBusinessIds(calCycleValue, businessIdlist);
response.setContentType("text/Xml;charset=gbk");
PrintWriter out = null;
try {
out = response.getWriter();
out.println(gson.toJson(businessKpiList));
} catch (IOException ex1) {
ex1.printStackTrace();
} finally {
out.close();
} }
return businessKpiList;
} }
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="${ctx}/MonitorOperation/RegularityAnalysis">数据特征探查</a></li> <li><a href="${ctx}/MonitorOperation/RegularityAnalysis">数据特征探查</a></li>
<li><a href="${ctx}/MonitorOperation/KeyLinkProcessAnalysis">业务环节分析</a></li> <li><a href="${ctx}/MonitorOperation/KeyLinkProcessAnalysis">业务环节分析</a></li>
<li><a href="${ctx}/MonitorOperation/FlowMonitor">实体厅流量监测分析</a></li> <%--<li><a href="${ctx}/MonitorOperation/FlowMonitor">实体厅流量监测分析</a></li>--%>
</ul> </ul>
</li> </li>
</shiro:hasPermission> </shiro:hasPermission>
......
...@@ -241,7 +241,6 @@ ...@@ -241,7 +241,6 @@
beforeSend: function(data) {}, beforeSend: function(data) {},
success: function(data){ success: function(data){
var tbody=$('<tbody></tbody>'); var tbody=$('<tbody></tbody>');
data = JSON.parse(data)
data.forEach(function(t,i){ data.forEach(function(t,i){
var tr = $('<tr></tr>'); var tr = $('<tr></tr>');
tr.empty(); tr.empty();
...@@ -291,6 +290,7 @@ ...@@ -291,6 +290,7 @@
} }
}); });
$(".businessItem").click(function(){ $(".businessItem").click(function(){
businessIds=""; businessIds="";
$("[name='businessinput']:checked").each(function (){ $("[name='businessinput']:checked").each(function (){
...@@ -438,6 +438,13 @@ ...@@ -438,6 +438,13 @@
$(".province").attr("checked",false); $(".province").attr("checked",false);
} }
}); });
$(".province").click(function(){
var clickFlag=true;//是否全部选中
$(".province").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ clickFlag=false; }
});
$("#allProvince").attr("checked",clickFlag);
});
//业务全选 //业务全选
$("#allBusiness").click(function(){ $("#allBusiness").click(function(){
if($("#allBusiness").attr("checked") == "checked"){//全选 if($("#allBusiness").attr("checked") == "checked"){//全选
...@@ -445,6 +452,19 @@ ...@@ -445,6 +452,19 @@
}else{//不全选 }else{//不全选
$(".businessItem").attr("checked",false); $(".businessItem").attr("checked",false);
} }
businessIds="";
$("[name='businessinput']:checked").each(function (){
businessIds += $(this).val()+",";
});
updateKpi(businessIds);
});
$(".businessItem").click(function(){
var clickFlag=true;//是否全部选中
$(".businessItem").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ clickFlag=false; }
});
$("#allBusiness").attr("checked",clickFlag);
}); });
//指标全选 //指标全选
$("#allKpi").click(function(){ $("#allKpi").click(function(){
...@@ -454,6 +474,13 @@ ...@@ -454,6 +474,13 @@
$(".kpiItem").attr("checked",false); $(".kpiItem").attr("checked",false);
} }
}); });
$(".kpiItem").click(function(){
var cFlag=true;//是否全部选中
$(".kpiItem").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ cFlag=false; }
});
$("#allKpi").attr("checked",cFlag);
});
</script> </script>
</body> </body>
...@@ -462,8 +462,9 @@ function updateKpi(businessIds,calCycleValue){ ...@@ -462,8 +462,9 @@ function updateKpi(businessIds,calCycleValue){
async: false, async: false,
beforeSend: function(data) {}, beforeSend: function(data) {},
success: function(data){ success: function(data){
console.log(data)
var tbody=$('<tbody></tbody>'); var tbody=$('<tbody></tbody>');
data = JSON.parse(data)
data.forEach(function(t,i){ data.forEach(function(t,i){
var tr = $('<tr></tr>'); var tr = $('<tr></tr>');
tr.empty(); tr.empty();
...@@ -629,6 +630,19 @@ $("#allBusiness").click(function(){ ...@@ -629,6 +630,19 @@ $("#allBusiness").click(function(){
}else{//不全选 }else{//不全选
$(".businessItem").attr("checked",false); $(".businessItem").attr("checked",false);
} }
businessIds="";
$("[name='businessinput']:checked").each(function (){
businessIds += $(this).val()+",";
});
console.log(businessIds);
updateKpi(businessIds,calCycleValue);
});
$(".businessItem").click(function(){
var clickFlag=true;//是否全部选中
$(".businessItem").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ clickFlag=false; }
});
$("#allBusiness").attr("checked",clickFlag);
}); });
//指标全选 //指标全选
$("#allKpi").click(function(){ $("#allKpi").click(function(){
...@@ -638,6 +652,13 @@ $("#allKpi").click(function(){ ...@@ -638,6 +652,13 @@ $("#allKpi").click(function(){
$(".kpiItem").attr("checked",false); $(".kpiItem").attr("checked",false);
} }
}); });
$(".kpiItem").click(function(){
var cFlag=true;//是否全部选中
$(".kpiItem").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ cFlag=false; }
});
$("#allKpi").attr("checked",cFlag);
});
</script> </script>
......
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