Commit a1e0ac68 authored by 胡斌's avatar 胡斌

智能分析平台备份提交

parent 90a378e9
......@@ -36,6 +36,7 @@ public class QualityRuleReport {
private Long accuracyNum;
private Double accuracyPro;
private Long ifPredicted;
private Long warningStatus;
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public Long getQualityVerificationReportId() {
......@@ -222,6 +223,14 @@ public class QualityRuleReport {
this.channelName = channelName;
}
public Long getWarningStatus() {
return warningStatus;
}
public void setWarningStatus(Long warningStatus) {
this.warningStatus = warningStatus;
}
@Override
public String toString() {
return "QualityRuleReport{" +
......
......@@ -16,7 +16,7 @@ public interface QualityRuleReportDao extends JpaSpecificationExecutor<QualityRu
List<QualityRuleReport> findQualityRuleReport();
//根据筛选项筛选出质量规则报告
List<QualityRuleReport> findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndReportTypeInAndReportSumEndTimeBetweenOrderByReportSumEndTimeDesc(List<Long> dataSource, List<Long> chnnal, List<Long> busines, List<Long> province,List<String> reportType, Timestamp startTime, Timestamp endTime);
List<QualityRuleReport> findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndReportTypeInAndReportSumEndTimeBetweenAndWarningStatusInOrderByReportSumEndTimeDesc(List<Long> dataSource, List<Long> chnnal, List<Long> busines, List<Long> province,List<String> reportType, Timestamp startTime, Timestamp endTime,List<Long> warningStatus);
//根据ID查询质量规则报告
QualityRuleReport findByQualityVerificationReportId(Long qualityVerificationReportId);
......
......@@ -13,5 +13,5 @@ import java.util.List;
public interface QualityRuleReportInfoDao extends JpaSpecificationExecutor<QualityRuleOperationDetail>,
PagingAndSortingRepository<QualityRuleOperationDetail, Long> {
Page<QualityRuleOperationDetail> findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime,Pageable pageable);
Page<QualityRuleOperationDetail> findByProvinceIdAndKpiIdAndBusinessTimeBetweenAndWarningNumIsNotOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime,Long warningNum,Pageable pageable);
}
......@@ -28,7 +28,7 @@ public class QualityRuleReportInfoService {
public Page<QualityRuleOperationDetail> findBy(QualityRuleOperationDetail qualityRuleOperationDetail, int pageNumber, int pageSize, String sortType, Long provinceId, Long kpiId, Timestamp startTime, Timestamp endTime){
PageRequest pageRequest = buildPageRequest(pageNumber, pageSize, sortType, "qualityRuleId");
return qualityRuleReportInfoDao.findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(provinceId,kpiId,startTime,endTime,pageRequest);
return qualityRuleReportInfoDao.findByProvinceIdAndKpiIdAndBusinessTimeBetweenAndWarningNumIsNotOrderByBusinessTimeDescProvinceIdDescWarningNumAsc(provinceId,kpiId,startTime,endTime,3L,pageRequest);
}
/**
......
......@@ -19,7 +19,7 @@ public class QualityRuleReportService {
public List<QualityRuleReport> getQualityRuleReportByLastMonth(){ return qualityRuleReportDao.findQualityRuleReport();}
//根据筛选项筛选
public List<QualityRuleReport> getQualityRuleReportBy(List<Long> dataSource, List<Long> chnnal, List<Long> busines, List<Long>province,List<String> reportType, Timestamp startTime, Timestamp endTime){
return qualityRuleReportDao.findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndReportTypeInAndReportSumEndTimeBetweenOrderByReportSumEndTimeDesc(dataSource,chnnal,busines,province,reportType,startTime, endTime);
public List<QualityRuleReport> getQualityRuleReportBy(List<Long> dataSource, List<Long> chnnal, List<Long> busines, List<Long>province,List<String> reportType, Timestamp startTime, Timestamp endTime,List<Long> isExList){
return qualityRuleReportDao.findByDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndReportTypeInAndReportSumEndTimeBetweenAndWarningStatusInOrderByReportSumEndTimeDesc(dataSource,chnnal,busines,province,reportType,startTime, endTime,isExList);
}
}
......@@ -63,6 +63,9 @@ public class AssociateDiagosisConfigurationService {
return dimAssociationAnaInfoDao.findAllDimAssociationAnaInfo();
}
public DimAssociationAnaInfo findOne(Long id) {
return dimAssociationAnaInfoDao.findOne(id);
}
public List<DimAssociationAnaInfo> findDimAssociationAnaInfoByDimension(String demension) {
return dimAssociationAnaInfoDao.findDimAssociationAnaInfoByDimension(demension);
}
......@@ -184,9 +187,8 @@ public class AssociateDiagosisConfigurationService {
}
public void deleteAssociDigConfig(Long associationId) {
dimAssociationAnaInfoDao.delete(associationId);
public void deleteAssociDigConfig(List<DimAssociationAnaInfo> dimAssociationAnaInfoList) {
dimAssociationAnaInfoDao.delete(dimAssociationAnaInfoList);
}
public void pathSave(List<DimAssociationAnaInfo> anaInfoList, List<DimKpiAssociationRelInfo> dimKpiAssociationRelInfoList) {
......
......@@ -110,9 +110,16 @@ public class FilterRuleConfigurationController {
@ResponseBody
public Map<String, String> FilterDelete(String filterRuleId) {
Map<String, String> m = new HashMap<String,String>();
filterRuleDao.delete(Long.parseLong(filterRuleId));
List<FilterRule> filterRuleList = new ArrayList<FilterRule>();
if(filterRuleId.contains(",")){
String [] filterRuleIds = filterRuleId.split(",");
for (String s : filterRuleIds) {
filterRuleList.add(filterRuleDao.findAllBywarningFilteringRuleId(Long.parseLong(s)));
}
}else{
filterRuleList.add(filterRuleDao.findAllBywarningFilteringRuleId(Long.parseLong(filterRuleId)));
}
filterRuleDao.delete(filterRuleList);
m.put("status","success");
return m;
}
......
......@@ -80,6 +80,8 @@ public class FilterRuleResultController {
List<Kpi> kpiList=(List<Kpi>)kpiDao.findAllByIsActive("Y");
//查询出所有的业务
List<Business> businessList=(List<Business>)businessDao.findAllBusiness();
//查询出所有的业务
List<String> businessListString=businessService.getBusinessIdAndBusinessName();
//查询出所有的数据类型
List<DataType> dataTypeList= (List<DataType>)dataTypeDao.findAll();
//查询出所有的数据来源
......@@ -91,7 +93,8 @@ public class FilterRuleResultController {
model.put("provinceList", provinceList);
model.put("channelList", channelList);
model.put("kpiList", kpiList);
model.put("businessList", businessList);
model.put("businessList", businessListString);
model.put("businessListEntity", businessList);
model.put("dataTypeList", dataTypeList);
model.put("datasourceList", dataSourceList);
model.put("filterRuleViewList", gson.toJson(FilterRuleList));
......@@ -104,14 +107,10 @@ public class FilterRuleResultController {
String provinceArr,
String businessArr,
String isRepeat,
String ruleId,HttpServletResponse response){
HttpServletResponse response){
List<FilterRule> filterRuleList = null;
if(StringUtils.isNotEmpty(ruleId)){
FilterRule fr = filterRuleDao.findAllBywarningFilteringRuleId(Long.parseLong(ruleId));
filterRuleList.add(fr);
}else{
List<Long> kpi = new ArrayList<Long>();
List<Long> provinceList = new ArrayList<Long>();
List<String> isRepeatList = new ArrayList<String>();
......@@ -165,7 +164,7 @@ public class FilterRuleResultController {
}
return filterRuleList;
......
......@@ -11,6 +11,7 @@ import com.hp.cmsz.service.CmszOperationLogService;
import com.hp.cmsz.service.analysissupport.QualityRuleInfoService;
import com.hp.cmsz.web.PageURLController;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.util.ArrayUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
......@@ -28,10 +29,7 @@ import java.io.*;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* 数据质量核查中的质量规则运营结果控制类
......@@ -69,6 +67,8 @@ public class QualityRuleOperationController {
private CmszOperationLogService cmszOperationLogService;
List<QualityRuleInfo> qualityRuleInfoList = new ArrayList<QualityRuleInfo>();
//返回到质量规则运营页面
@RequestMapping(value = "/home")
public ModelAndView crawlDataManageHome(String selectTab) {
......@@ -137,6 +137,16 @@ public class QualityRuleOperationController {
sortType = HtmlUtils.htmlEscape(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);
// qualityRuleInfoList = qualityRuleInfoPage.iterator();
for (Object aQualityRuleInfoPage : qualityRuleInfoPage) {
qualityRuleInfoList.add((QualityRuleInfo) aQualityRuleInfoPage);
}
modelAndView.addObject("qualityRuleInfoPage", qualityRuleInfoPage);
modelAndView.addObject("pageSize", pageSize);
modelAndView.addObject("sortType", sortType);
......@@ -206,7 +216,6 @@ public class QualityRuleOperationController {
// 创建列标头LIST
List<String> fialList = new ArrayList<String>();
fialList.add("质量规则ID");
fialList.add("省份");
fialList.add("数据来源");
fialList.add("渠道");
......@@ -215,8 +224,8 @@ public class QualityRuleOperationController {
fialList.add("指标编码");
fialList.add("告警类型");
fialList.add("告警原因");
fialList.add("指标业务时间");
fialList.add("指标延迟时间");
fialList.add("数据时间");
fialList.add("告警时间");
// 该报表的列数
int number = fialList.size();
......@@ -263,7 +272,7 @@ public class QualityRuleOperationController {
row2Cell.setCellValue(new HSSFRichTextString(fialList.get(i).toString()));
}
List<Long> ruleOperationIds = new ArrayList<Long>();
List<QualityRuleInfo> list = null;
List<QualityRuleInfo> list = qualityRuleInfoList;
int rowNum=list.size();
// 设置列表数据
for (int i = 2; i < (rowNum+2); i++) {
......@@ -272,18 +281,18 @@ public class QualityRuleOperationController {
row.setHeight((short) 350);
//报表数据
QualityRuleInfo qualityRuleInfo = list.get(i-2);
row.createCell(0).setCellValue(qualityRuleInfo.getQualityRuleId());
ruleOperationIds.add(qualityRuleInfo.getQualityRuleId());
row.createCell(1).setCellValue(qualityRuleInfo.getProvinceName());
row.createCell(2).setCellValue(qualityRuleInfo.getDataSourceName());
row.createCell(3).setCellValue(qualityRuleInfo.getChannelName());
row.createCell(4).setCellValue(qualityRuleInfo.getBusinessName());
row.createCell(5).setCellValue(qualityRuleInfo.getKpiName());
row.createCell(6).setCellValue(qualityRuleInfo.getKpiCode());
row.createCell(7).setCellValue(qualityRuleInfo.getWarningType());
row.createCell(8).setCellValue(qualityRuleInfo.getWarningReason());
// row.createCell(0).setCellValue(qualityRuleInfo.getQualityRuleId());
// ruleOperationIds.add(qualityRuleInfo.getQualityRuleId());
row.createCell(0).setCellValue(qualityRuleInfo.getProvinceName());
row.createCell(1).setCellValue(qualityRuleInfo.getDataSourceName());
row.createCell(2).setCellValue(qualityRuleInfo.getChannelName());
row.createCell(3).setCellValue(qualityRuleInfo.getBusinessName());
row.createCell(4).setCellValue(qualityRuleInfo.getKpiName());
row.createCell(5).setCellValue(qualityRuleInfo.getKpiCode());
row.createCell(6).setCellValue(qualityRuleInfo.getWarningType());
row.createCell(7).setCellValue(qualityRuleInfo.getWarningReason());
row.createCell(8).setCellValue(formatDate.format(qualityRuleInfo.getKpiMonitorRunTime()));
row.createCell(9).setCellValue(formatDate.format(qualityRuleInfo.getBusinessTime()));
row.createCell(10).setCellValue(formatDate.format(qualityRuleInfo.getKpiMonitorRunTime()));
}
cmszOperationLogService.createLog("导出","质量规则运营","导出质量规则运营信息");
......
......@@ -88,11 +88,12 @@ public class QualityRuleReportController {
//查询出所有的指标
List<Kpi> kpiList=(List<Kpi>)kpiDao.findAll();
//查询出所有的业务
List<String> businessList=businessService.getAllBusinessIdAndBusinessName();
List<String> businessList=businessService.getBusinessIdAndBusinessName();
//查询出所有的数据来源信息
List<DataSource> datasourceList=dataSourceDao.findDataSource();
//查询出所有的质量规则报告
qualityRuleReportList = qualityRuleReportService.getQualityRuleReportByLastMonth();
staticRuleReportList = qualityRuleReportList;
Gson gson = new Gson();
model.put("provinceList", provinceList);
model.put("channelList", channelList);
......@@ -116,6 +117,7 @@ public class QualityRuleReportController {
@RequestParam(value = "bussines") String bussines,//业务
@RequestParam(value = "province") String province,//省份
@RequestParam(value = "reportType") String reportType,//报告类型
@RequestParam(value = "isEx") String isEx,//是否异常
HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
......@@ -126,14 +128,17 @@ public class QualityRuleReportController {
String[] bussinesS = bussines.split(",");
String[] provinceS = province.split(",");
String[] reportTypeS = reportType.split(",");
String[] isExS=null;
if(isEx.contains(",")){isExS = isEx.split(",");}else{isExS = new String[]{isEx};}
Timestamp startTime = Timestamp.valueOf(dates[0]);
Timestamp endTime = Timestamp.valueOf(dates[1]);
List<Long> dataSourceList = changeStrToList(dataSourceS);
List<Long> chnnalList = changeStrToList(chnnalS);
List<Long> bussinesList = changeStrToList(bussinesS);
List<Long> provinceList = changeStrToList(provinceS);
List<Long> isExList = changeStrToList(isExS);
List<String> reportTypeList = changeStrToListstr(reportTypeS);
qualityRuleReportList = qualityRuleReportService.getQualityRuleReportBy(dataSourceList, chnnalList, bussinesList, provinceList,reportTypeList, startTime, endTime);
qualityRuleReportList = qualityRuleReportService.getQualityRuleReportBy(dataSourceList, chnnalList, bussinesList, provinceList,reportTypeList, startTime, endTime,isExList);
staticRuleReportList = qualityRuleReportList;
cmszOperationLogService.createLog("查询", "数据质量报告", "由筛选项得到数据质量报告");
Gson gson = new Gson();
......@@ -279,7 +284,7 @@ public class QualityRuleReportController {
cellStyle.setFont(font);
// 创建报表头部
exportExcel.createNormalHead("运营明细列表", number - 1);
exportExcel.createNormalHead("质量规则报告列表", number - 1);
// 创建第二行
HSSFRow row2 = sheet.createRow(1);
......
......@@ -155,14 +155,21 @@ public class QualityRuleResultController {
public String deleteRule(
@RequestParam(value = "qualityRuleId") String qualityRuleId,
HttpServletResponse response){
List<Long> qualityRuleIdList = new ArrayList<Long>();
String[] qualityRuleIdStr = qualityRuleId.split(",");
for(int i=0; i<qualityRuleIdStr.length; i++){
qualityRuleIdList.add(Long.parseLong(qualityRuleIdStr[i]));
List<QualityRule> qualityRuleList = new ArrayList<QualityRule>();
List<AccuracyRule> accuracyRuleList = new ArrayList<AccuracyRule>();
if(qualityRuleId.contains(",")){
String [] qualityRules = qualityRuleId.split(",");
for (String s : qualityRules) {
qualityRuleList.add(qualityRuleDao.findByQualityRuleId(Long.parseLong(s)));
accuracyRuleList = accuracyRuleDao.findByQualityRuleId(Long.parseLong(s));
}
}else{
qualityRuleList.add(qualityRuleDao.findByQualityRuleId(Long.parseLong(qualityRuleId)));
}
qualityRuleService.deleteByQualityRuleId(qualityRuleIdList);
accuracyRuleService.deleteAccuracyRuleByQualityRuleId(qualityRuleIdList);
qualityRuleDao.delete(qualityRuleList);
accuracyRuleDao.delete(accuracyRuleList);
cmszOperationLogService.createLog("删除","更新质量规则","quality_rule_warehouse_info_t. QUALITY_RULE_ID="+qualityRuleId);
return PageURLController.RuleResult;
......
......@@ -481,7 +481,7 @@ public class AssociateDiagosisConfigurationController {
return strR;
}
@RequestMapping(value = "/deleteAssociDigConfig", method = RequestMethod.GET)
/*@RequestMapping(value = "/deleteAssociDigConfig", method = RequestMethod.GET)
@ResponseBody
public String deleteAssociDigConfig(@RequestParam(value = "associationId", defaultValue = "") String associationId) {
String strR = "删除失败";
......@@ -494,15 +494,24 @@ public class AssociateDiagosisConfigurationController {
}
return strR;
}
}*/
@RequestMapping(value = {"/deleteAssociDigConfigM"})
public String deleteAssociDigConfigM(@RequestParam(value = "associationId", defaultValue = "") String associationId, Map model) {
String strR="";
List<DimAssociationAnaInfo> dimAssociationAnaInfoList = new ArrayList<DimAssociationAnaInfo>();
if(associationId.contains(",")){
String [] associationIds = associationId.split(",");
for (String s : associationIds) {
dimAssociationAnaInfoList.add(associateDiagosisConfigurationService.findOne(Long.parseLong(s)));
}
}else{
dimAssociationAnaInfoList.add(associateDiagosisConfigurationService.findOne(Long.parseLong(associationId)));
}
String strR;
try {
Long associationIdL = Long.parseLong(associationId);//associationId
associateDiagosisConfigurationService.deleteAssociDigConfig(associationIdL);
associateDiagosisConfigurationService.deleteAssociDigConfig(dimAssociationAnaInfoList);
strR="success";
} catch (Exception e) {
strR="failed";
......@@ -510,7 +519,7 @@ public class AssociateDiagosisConfigurationController {
}
List<DimAssociationAnaInfo> listDim = new ArrayList<DimAssociationAnaInfo>();
List<DimAssociationAnaInfo> listDim;
listDim = associateDiagosisConfigurationService.findAllDimAssociationAnaInfo();
......
......@@ -15,6 +15,9 @@
</label>
</div>
</c:forEach>
<%--<label>--%>
<%--<input type="checkbox" name="datasourceStats" class="datasourceStats" title="关键指标直采" value="5" checked>关键指标直采--%>
<%--</label>--%>
</div>
</div>
<%--------------------------------------------------渠道筛选项---- --------------------------------------------------%>
......
......@@ -238,6 +238,7 @@
</script>
<%--------------------------------------------------业务JS代码块 --------------------------------------------------%>
<script type="text/javascript">
console.log('${businessList}')
$("#allBusinessStats").click(function(){
if($("#allBusinessStats").attr("checked") == "checked"){//全选
$(".businessStats").attr("checked","checked");
......
......@@ -47,7 +47,7 @@
<%--<input id="filterEndTime" name="filterEndTime" class="Wdate" type="text" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'filterStartTime\')}'})">--%>
<%--</div>--%>
<tags:ProvinceTag />
<tags:dataSource_channel_business_kpi />
<tags:Quality_dataSource_channel_business/>
<div id="isRepeat" class="slide-menu-option">
<label>是否重复:</label>
<select id="isRepeatSelect">
......@@ -55,10 +55,10 @@
<option value="0"></option>
</select>
</div>
<div id="fromRuleIdDiv" class="slide-menu-option">
<%--<div id="fromRuleIdDiv" class="slide-menu-option">
<label>规则ID:</label>
<input type="text" id="fromRuleId">
</div>
</div>--%>
<button id="submit" class="btn btn-primary" >提交</button>
<button id="disable" class="btn btn-warning">重置</button>
</div>
......@@ -83,8 +83,8 @@
过滤规则查询结果
<shiro:hasAnyRoles name="admin,dataAnalysis,businessAnalysis">
<div id="time_div" style="top: -6px;float: right;height: 0px;position: relative;">
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" id="deleteFilter" disabled>删除规则</button>
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" id="updateFilter" disabled>修改规则</button>
<button class="btn-sm btn btn-danger btn-sm btn-group btn-group-cog" id="deleteFilter" disabled>删除规则</button>
<button class="btn-sm btn btn-warning btn-sm btn-group btn-group-cog" id="updateFilter" disabled>修改规则</button>
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" id="createFilter">新建规则</button>
</div>
</shiro:hasAnyRoles>
......@@ -117,7 +117,7 @@
channelList.push({channelName:'${list.channelName}',channelId:'${list.channelId}'});
</c:forEach>
var businessList = [];
<c:forEach var="list" items="${businessList}">
<c:forEach var="list" items="${businessListEntity}">
businessList.push({businessName:'${list.businessName}',businessId:'${list.businessId}',channelDataSourceMapId:'${list.channelDataSourceMapId}'});
</c:forEach>
var channelDataSourceMapList = [];
......@@ -144,7 +144,6 @@
provinceArr+=$(this).val()+","
});
provinceArr = provinceArr.substring(0,provinceArr.length-1);
console.log(provinceArr)
var businessArr = getStatsBusinessCheckedValuesString();
// var startTime = $('#filterStartTime').val();
......@@ -164,7 +163,6 @@
"&businessArr="+businessArr+
// "&startTime="+startTime +
// "&endtTime="+startTime +
"&ruleId="+ruleId+
"&isRepeat="+isRepeat;
$.ajax({
......@@ -176,7 +174,6 @@
success: function(data){
$("#filterRuleView").val(JSON.stringify(data));
filterResultDetailTable();
ruleId="";
$("fromRuleId").val("")
$("#updateRule").attr("disabled", true);
toggleMenu('slidePushMenus2');//隐藏筛选项
......@@ -195,17 +192,23 @@
});
$("#updateFilter").click(function(){
var filterRuleId = $("input[name='update']:checked").val();
var filterRuleId = $("input[name='checkbox']:checked").val();
location.href="${ctx}/AnalysisSupport/FilterRuleConfiguration?filterRuleId="+filterRuleId;
});
$("#deleteFilter").click(function(){
var filterRuleId = $("input[name='update']:checked").val();
var filterRuleId = $("input[name='checkbox']:checked");
var id ="";
filterRuleId.each(function () {
id+=$(this).val()+","
});
id= id.substring(0,id.length-1);
$.dialog({
title: "提醒",
content:"确定删除过滤规则?<span style='color: red'>(该操作不可逆)</span>",
ok: function(){
var url = "${ctx}/AnalysisSupport/FilterRuleConfiguration/FilterDelete?filterRuleId="+filterRuleId;
var url = "${ctx}/AnalysisSupport/FilterRuleConfiguration/FilterDelete?filterRuleId="+id;
$.ajax({
url:url,
cache: true,
......
......@@ -156,7 +156,7 @@
<tr class="repeate"><td>重复考核粒度:</td>
<td><select class="form-control" name='repeatedCheckGranularity' id='repeatedCheckGranularity'>
<option value="day" selected></option>
<option value="mon"></option>
<option value="mon"></option>
</select>
</td></tr>
<tr class="repeate"><td>重复考核开始时间:</td><td><input type="text" class="form-control" id="repeatedCheckStartTime" name="repeatedCheckStartTime" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'repeatedCheckStartTime\')}'})" /></td></tr>
......
......@@ -44,8 +44,16 @@
<div class="form">
<tags:PeriodTag />
<tags:Public_ProvinceTag />
<tags:GJFX_datasource_channle_business/>
<tags:Quality_dataSource_channel_business/>
<tags:QualityReportType />
<div class="slide-menu-option">
<label for="isEx">是否异常</label><select id="isEx" class="slide-menu-select">
<option value='0,1' selected>全部</option>
<option value='0'>正常</option>
<option value='1'>异常</option>
</select>
</div>
<button id="submit" class="btn btn-primary" onclick="reportResultSubmit()">提交</button>
<button id="disable" class="btn btn-warning" onclick="reportResultReset()">重置</button>
</div>
......@@ -105,12 +113,14 @@
ruleReportDetailTable();
function reportResultSubmit(){
var period=getPeriodStr()
var period=getPeriodStr();
var dataSource=getStatsDataSourceCheckedValuesString();
var chnnal=getStatsChannelCheckedValuesString();
var bussines=getStatsBusinessCheckedValuesString();
var province=getProvinceCheckedValuesString();
var reportType=getReportType();
var isEx = $('#isEx').val();
if(dataSource==""){
$.alert("数据来源的选择不能为空");
}else if(chnnal===""){
......@@ -146,7 +156,7 @@
$.ajax({
type : 'GET',
contentType : 'application/json',
url: "${ctx}/AnalysisSupport/QualityRuleReport/reportChangeTable?period="+period+"&province="+province+"&dataSource="+dataSource+"&chnnal="+chnnal+"&bussines="+bussines+"&reportType="+reportType,
url: "${ctx}/AnalysisSupport/QualityRuleReport/reportChangeTable?period="+period+"&province="+province+"&dataSource="+dataSource+"&chnnal="+chnnal+"&bussines="+bussines+"&reportType="+reportType+"&isEx="+isEx,
dataType : 'text',
async: false,
beforeSend: function(data) {
......
......@@ -71,8 +71,8 @@
质量规则查询结果
<shiro:hasAnyRoles name="admin,dataAnalysis,businessAnalysis">
<div id="time_div" style="top: -6px;float: right;height: 0px;position: relative;">
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" style="background-color: red" id="deleteRule" disabled>删除规则</button>
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" id="updateRule" disabled>修改规则</button>
<button class="btn-sm btn btn-danger btn-sm btn-group btn-group-cog" id="deleteRule" disabled>删除规则</button>
<button class="btn-sm btn btn-warning btn-sm btn-group btn-group-cog" id="updateRule" disabled>修改规则</button>
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" id="createRule">新建规则</button>
</div>
</shiro:hasAnyRoles>
......@@ -172,19 +172,25 @@ $("#createRule").click(function(){
statsDataSourceReset();//三级联动重置
}
$("#updateRule").click(function(){
var pageNum = $("#goPageNo").val();
var qualityRuleId = $("input[name='checkbox']:checked").val();
location.href="${ctx}/AnalysisSupport/QualityRuleConfiguration?qualityRuleId="+qualityRuleId;
});
$("#deleteRule").click(function(){
var pageNum = $("#goPageNo").val();
var qualityRuleId = $("input[name='checkbox']:checked");
var id ="";
qualityRuleId.each(function () {
id+=$(this).val()+","
});
id= id.substring(0,id.length-1);
$.dialog({
title: "提醒",
content:"确定删除质量规则?",
ok: function(){
$.ajax({
type: 'get',
url: "${ctx}/AnalysisSupport/QualityRuleResult/deleteOneRule?qualityRuleId="+qualityRuleId,
url: "${ctx}/AnalysisSupport/QualityRuleResult/deleteOneRule?qualityRuleId="+id,
success:function(){
window.location.href="${ctx}/AnalysisSupport/QualityRuleResult"
}
......
......@@ -41,6 +41,7 @@
<tags:GJFX_datasource_channle_business/>
<tags:QualityRule_IfFilter />
</div>
<div class="slide-menu-option">
<button type="input" class="btn btn-primary" onclick="searchData();return false;">提交</button>
......
......@@ -17,7 +17,7 @@
<th width="6.4%">渠道</th>
<th width="6.4%">业务</th>
<th width="6.4%">指标名称</th>
<th width="6.4%">指标CODE</th>
<th width="6.4%">指标编码</th>
<th width="6.4%">告警类型</th>
<th width="6.4%">告警原因</th>
<th width="6.4%">数据时间</th>
......
......@@ -290,10 +290,11 @@
</tr>
</tfoot>
<tbody id="xcdWorkingOrderInfos_tbody">
<c:if test="${xcdWorkingOrderInfos != null}">
<c:forEach items="${xcdWorkingOrderInfos}" var="item">
<tr>
<td style='vertical-align: middle !important;text-align: center;'>${item.workingOrderCode}</td>
<td style='vertical-align: middle !important;text-align: center;'><a target="view_window" href="${ctx}/MonitorOperation/WorkingOrderDetail?xcdCode=${item.workingOrderCode}" >${item.workingOrderCode}</a></td>
<td style='vertical-align: middle !important;text-align: center;'>${item.workingOrderTitle}</td>
<td style='vertical-align: middle !important;text-align: center;'>
<fmt:formatDate
......
......@@ -115,15 +115,9 @@
<shiro:hasAnyRoles name="admin,dataAnalysis,businessAnalysis">
<div id="time_div"
style="top: -6px;float: right;height: 0px;position: relative;">
<button id="createIndicatorsBtn"
class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog"
onclick="createIndicators()">新建
</button>
<button id="createIndicatorsBtn" class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog">新建</button>
<button type="button" id="deleteAnaInfo" class="btn btn-danger" disabled>删除</button>
<button id="updateIndicatorsBtn"
class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" disabled
>修改
</button>
<button id="updateIndicatorsBtn" class="btn-sm btn btn-warning btn-sm btn-group btn-group-cog" disabled>修改</button>
</div>
</shiro:hasAnyRoles>
</div>
......@@ -308,8 +302,7 @@
//更新按钮点击
$("#updateIndicatorsBtn").click(function(){
var associationId= $("#anaInfoSelected").val();
var associationId = $("input[name='checkbox']:checked").val();
window.location.href="${ctx}/MonitorOperation/AssociateDiagosisConfiguration/getAanaInfo?associationId="+associationId;
/*$.dialog({
title: "提醒",
......@@ -326,13 +319,18 @@
});
$("#deleteAnaInfo").click(function(){
var associationId = $("input[name='checkbox']:checked");
var id ="";
associationId.each(function () {
id+=$(this).val()+","
});
var associationId= $("#anaInfoSelected").val();
id= id.substring(0,id.length-1);
$.dialog({
title: "提醒",
content:"确定删除规则?",
ok: function(){location.href="${ctx}/MonitorOperation/AssociateDiagosisConfiguration/deleteAssociDigConfigM?associationId="+associationId;},
ok: function(){location.href="${ctx}/MonitorOperation/AssociateDiagosisConfiguration/deleteAssociDigConfigM?associationId="+id;},
okValue:"确定",
cancel: function(){},
cancelValue:"取消",
......
......@@ -28,7 +28,20 @@ function radioChoose(e){
$("#anaInfoSelected").val(e.id);
}
function Choose(){
var ids = $("input[name='checkbox']:checked");
if(ids.length!==0){
if(ids.length===1){
$("#updateIndicatorsBtn").attr("disabled", false);
}else{
$("#updateIndicatorsBtn").attr("disabled", true);
}
$("#deleteAnaInfo").attr("disabled", false);
}else{
$("#updateIndicatorsBtn").attr("disabled", true);
$("#deleteAnaInfo").attr("disabled", true);
}
}
//将省份转换为 数组
function provinceToArr(){
......@@ -225,7 +238,7 @@ table_pagging.prototype={
}
}
if(k==0) {
tdContext="<input type='radio' name='update'id='"+this.getData(this.objectlist[i],this.header[0][1])+"' onclick='radioChoose(this);'/>";
tdContext="<input type='checkbox' name='checkbox' value='"+this.getData(this.objectlist[i],this.header[0][1])+"' onclick='Choose(this);'/>";
}
if(k==4){
......
......@@ -342,7 +342,7 @@ table_pagging.prototype = {
}
} else {
tdContext="<input type='radio' name='update' onclick='radioChoose(this)' value='"+this.getData(this.objectlist[i],'warningFilteringRuleId')+"'/>"+"<span style='display:none'>"+i+"</span>";
tdContext="<input type='checkbox' name='checkbox' onclick='Choose(this)' value='"+this.getData(this.objectlist[i],'warningFilteringRuleId')+"'/>"+"<span style='display:none'>"+i+"</span>";
}
} else {
tdContext = "&nbsp;";
......@@ -610,14 +610,17 @@ table_pagging.prototype = {
}
}
function radioChoose(clickObj){
if(clickObj.checked){
function Choose(){
var ids = $("input[name='checkbox']:checked");
if(ids.length!==0){
if(ids.length===1){
$("#updateFilter").attr("disabled", false);
$("#deleteFilter").attr("disabled", false);
}else{
$("#updateFilter").attr("disabled", false);
$("#updateFilter").attr("disabled", true);
}
$("#deleteFilter").attr("disabled", false);
}else{
$("#updateFilter").attr("disabled", true);
$("#deleteFilter").attr("disabled", true);
}
}
\ No newline at end of file
......@@ -126,7 +126,7 @@ function ruleResultDetailTable(){
jsonData=document.getElementById('qualityRuleView').value;
var header = new Array();
header[0] = ["","<input type='radio' name='update'id='update' onclick='javascript:radioChoose(this);'/>","1%",""];
header[0] = ["","checkbox","1%",""];
// header[1] = ["质量规则ID","qualityRuleId","7%","15"];
// header[2] = ["省份","provinceName","7%","15"];
// header[3] = ["数据来源","dataSourceName","7%","15"];
......@@ -331,8 +331,8 @@ table_pagging.prototype = {
}
} else {
tdContext=this.header[k][1]+"<span style='display:none'>"+i+"</span>";
// tdContext=this.header[k][1];
tdContext="<input type='checkbox' name='checkbox' onclick='Choose(this)' value='"+this.getData(this.objectlist[i],'qualityRuleId')+"'/>"+"<span style='display:none'>"+i+"</span>";
}
} else {
tdContext = "&nbsp;";
......@@ -526,8 +526,21 @@ table_pagging.prototype = {
alert(this.tablename);
}
};
function Choose(){
var ids = $("input[name='checkbox']:checked");
if(ids.length!==0){
if(ids.length===1){
$("#updateRule").attr("disabled", false);
}else{
$("#updateRule").attr("disabled", true);
}
$("#deleteRule").attr("disabled", false);
}else{
$("#updateRule").attr("disabled", true);
$("#deleteRule").attr("disabled", true);
}
}
function radioChoose(clickObj){
var obj = eval("(" + jsonData + ")");
//alert(obj);
......
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