Commit 8e5fdf46 authored by liuna's avatar liuna

2017年12月25日 --智能分析平台

--质量规则筛选项和报告表格修改
parent 5ec9e420
...@@ -18,4 +18,7 @@ public interface QualityRuleViewDao extends JpaSpecificationExecutor<QualityRule ...@@ -18,4 +18,7 @@ public interface QualityRuleViewDao extends JpaSpecificationExecutor<QualityRule
//筛选项加指标编码 //筛选项加指标编码
List<QualityRuleView> findByDataSourceIdInAndChannelIdInAndBusinessIdInAndKpiCodeOrderByQualityRuleIdAscBusinessTimeDesc(List<Long> dataSource,List<Long> chnnal,List<Long> busines,String kpiCode); List<QualityRuleView> findByDataSourceIdInAndChannelIdInAndBusinessIdInAndKpiCodeOrderByQualityRuleIdAscBusinessTimeDesc(List<Long> dataSource,List<Long> chnnal,List<Long> busines,String kpiCode);
//筛选项指标编码
List<QualityRuleView> findByKpiCode(String kpiCode);
} }
...@@ -25,4 +25,9 @@ public class QualityRuleViewService { ...@@ -25,4 +25,9 @@ public class QualityRuleViewService {
return qualityRuleViewDao.findByDataSourceIdInAndChannelIdInAndBusinessIdInAndKpiCodeOrderByQualityRuleIdAscBusinessTimeDesc(dataSource,chnnal,busines,kpiCode); return qualityRuleViewDao.findByDataSourceIdInAndChannelIdInAndBusinessIdInAndKpiCodeOrderByQualityRuleIdAscBusinessTimeDesc(dataSource,chnnal,busines,kpiCode);
} }
//按指标编码查
public List<QualityRuleView> getQualityRuleByKpiCode(String kpiCode){
return qualityRuleViewDao.findByKpiCode(kpiCode);
}
} }
...@@ -123,14 +123,22 @@ public class QualityRuleResultController { ...@@ -123,14 +123,22 @@ public class QualityRuleResultController {
String[] dataSourceS=dataSource.split(","); String[] dataSourceS=dataSource.split(",");
String[] chnnalS=chnnal.split(","); String[] chnnalS=chnnal.split(",");
String[] bussinesS =bussines.split(","); String[] bussinesS =bussines.split(",");
List<Long> dataSourceList=changeStrToList(dataSourceS);
List<Long> chnnalList=changeStrToList(chnnalS);
List<Long> bussinesList=changeStrToList(bussinesS);
if(code.equals("")){ if(code.equals("")){
List<Long> dataSourceList = changeStrToList(dataSourceS);
List<Long> chnnalList = changeStrToList(chnnalS);
List<Long> bussinesList = changeStrToList(bussinesS);
qualityRuleViewList = qualityRuleViewService.getQualityRuleViewBy(dataSourceList,chnnalList,bussinesList); qualityRuleViewList = qualityRuleViewService.getQualityRuleViewBy(dataSourceList,chnnalList,bussinesList);
}else{ }else {
if(!dataSource.equals("") && !chnnal.equals("") && !bussinesS.equals("")){
List<Long> dataSourceList = changeStrToList(dataSourceS);
List<Long> chnnalList = changeStrToList(chnnalS);
List<Long> bussinesList = changeStrToList(bussinesS);
qualityRuleViewList = qualityRuleViewService.getBy(dataSourceList,chnnalList,bussinesList,code); qualityRuleViewList = qualityRuleViewService.getBy(dataSourceList,chnnalList,bussinesList,code);
} else{
qualityRuleViewList = qualityRuleViewService.getQualityRuleByKpiCode(code);
}
} }
Gson gson = new Gson(); Gson gson = new Gson();
response.setContentType("text/Xml;charset=gbk"); response.setContentType("text/Xml;charset=gbk");
PrintWriter out = null; PrintWriter out = null;
...@@ -141,7 +149,6 @@ public class QualityRuleResultController { ...@@ -141,7 +149,6 @@ public class QualityRuleResultController {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
//将string数据类型转换成List<Long>类型 //将string数据类型转换成List<Long>类型
...@@ -150,7 +157,6 @@ public class QualityRuleResultController { ...@@ -150,7 +157,6 @@ public class QualityRuleResultController {
for(int i=0;i<str.length;i++){ for(int i=0;i<str.length;i++){
list.add(Long.parseLong(str[i])); list.add(Long.parseLong(str[i]));
} }
return list; return list;
} }
......
...@@ -173,14 +173,6 @@ $("#createRule").click(function(){ ...@@ -173,14 +173,6 @@ $("#createRule").click(function(){
}); });
} }
}else if(code!==""){ }else if(code!==""){
if(dataSource==""){
$.alert("数据来源的选择不能为空");
}else if(chnnal===""){
$.alert("渠道的选择不能为空");
}else if(bussines===""){
$.alert("业务的选择不能为空");
}else{
toggleMenu('slidePushMenus');//隐藏筛选项
//数据来源标签 //数据来源标签
$('#DataSourceTag').text("数据来源").append($("<span class='badge'></span>").text(getStatsDataSourceCheckedValues().length)).attr('data-original-title',getStatsDataSourceCheckedTitles()).tooltip(); $('#DataSourceTag').text("数据来源").append($("<span class='badge'></span>").text(getStatsDataSourceCheckedValues().length)).attr('data-original-title',getStatsDataSourceCheckedTitles()).tooltip();
...@@ -212,13 +204,11 @@ $("#createRule").click(function(){ ...@@ -212,13 +204,11 @@ $("#createRule").click(function(){
} }
} }
}
function ruleResultReset(){ function ruleResultReset(){
$("#kpiCodeID").attr("value",''); $("#kpiCodeID").attr("value",'');
statsDataSourceReset();//三级联动重置 statsDataSourceReset();//三级联动重置
} }
$("#updateRule").click(function(){ $("#updateRule").click(function(){
var qualityRuleId = $("input[name='checkbox']:checked").val(); var qualityRuleId = $("input[name='checkbox']:checked").val();
location.href="${ctx}/AnalysisSupport/QualityRuleConfiguration?qualityRuleId="+qualityRuleId; location.href="${ctx}/AnalysisSupport/QualityRuleConfiguration?qualityRuleId="+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