Commit c8358d99 authored by 胡斌's avatar 胡斌

Merge remote-tracking branch 'origin/liuna'

# Conflicts: # .idea/workspace.xml # src/main/java/com/hp/cmsz/web/analysissupport/FilterRuleMaintainController.java
parents 08503c0e 29444a6f
...@@ -34,7 +34,7 @@ public interface AccuracyRuleDao extends JpaSpecificationExecutor<AccuracyRule>, ...@@ -34,7 +34,7 @@ public interface AccuracyRuleDao extends JpaSpecificationExecutor<AccuracyRule>,
//根据准确性规则ID更新准确性规则信息 //根据准确性规则ID更新准确性规则信息
@Modifying @Modifying
@Query("update AccuracyRule ar set ar.ruleType=:ruleType, ar.scopeMaxValue=:scopeMaxValue, ar.scopeMinValue=:scopeMinValue, ar.repeatedCheckGranularity=:repeatedCheckGranularity, ar.repeatedCheckStartTime=:repeatedCheckStartTime, ar.repeatedCheckEndTime=:repeatedCheckEndTime, ar.ifRepeatedCheckSeries=:ifRepeatedCheckSeries, ar.repeatedCheckMaxTime=:repeatedCheckMaxTime, ar.ifRepeatedCheckSummation=:ifRepeatedCheckSummation where ar.accuracyRuleId =:accuracyRuleId") @Query("update AccuracyRule ar set ar.ruleType=:ruleType, ar.scopeMaxValue=:scopeMaxValue, ar.scopeMinValue=:scopeMinValue, ar.repeatedCheckGranularity=:repeatedCheckGranularity, ar.repeatedCheckStartTime=:repeatedCheckStartTime, ar.repeatedCheckEndTime=:repeatedCheckEndTime, ar.ifRepeatedCheckSeries=:ifRepeatedCheckSeries, ar.repeatedCheckMaxTime=:repeatedCheckMaxTime, ar.ifRepeatedCheckSummation=:ifRepeatedCheckSummation where ar.accuracyRuleId =:accuracyRuleId")
void updateAccuracyRuleByAccuracyRuleId(@Param("ruleType")String ruleType,@Param("scopeMaxValue")String scopeMaxValue,@Param("scopeMinValue")String scopeMinValue,@Param("repeatedCheckGranularity")String repeatedCheckGranularity,@Param("repeatedCheckStartTime")Date repeatedCheckStartTime,@Param("repeatedCheckEndTime")Date repeatedCheckEndTime,@Param("ifRepeatedCheckSeries")String ifRepeatedCheckSeries,@Param("repeatedCheckMaxTime")Long repeatedCheckMaxTime,@Param("ifRepeatedCheckSummation")String ifRepeatedCheckSummation,@Param("accuracyRuleId")Long accuracyRuleId); void updateAccuracyRuleByAccuracyRuleId(@Param("ruleType")String ruleType,@Param("scopeMaxValue")Double scopeMaxValue,@Param("scopeMinValue")Double scopeMinValue,@Param("repeatedCheckGranularity")String repeatedCheckGranularity,@Param("repeatedCheckStartTime")Date repeatedCheckStartTime,@Param("repeatedCheckEndTime")Date repeatedCheckEndTime,@Param("ifRepeatedCheckSeries")String ifRepeatedCheckSeries,@Param("repeatedCheckMaxTime")Long repeatedCheckMaxTime,@Param("ifRepeatedCheckSummation")String ifRepeatedCheckSummation,@Param("accuracyRuleId")Long accuracyRuleId);
//根据准确性规则ID删除一条准确性规则信息 //根据准确性规则ID删除一条准确性规则信息
@Modifying @Modifying
......
...@@ -5,7 +5,9 @@ import org.springframework.data.jpa.domain.Specification; ...@@ -5,7 +5,9 @@ import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.PagingAndSortingRepository;
import sun.security.krb5.internal.Ticket;
import java.sql.Timestamp;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -16,5 +18,5 @@ public interface QualityRuleInfoDao extends JpaSpecificationExecutor<QualityRule ...@@ -16,5 +18,5 @@ public interface QualityRuleInfoDao extends JpaSpecificationExecutor<QualityRule
List<QualityRuleInfo> findQualityRuleInfo(); List<QualityRuleInfo> findQualityRuleInfo();
//根据筛选项查找 //根据筛选项查找
List<QualityRuleInfo> findByBusinessTimeBetweenAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndDataSourceIdInOrderByBusinessTimeDesc(Date time1, Date time2,List<Long> dataSource,List<Long> chnnal,List<Long> busines,List<Long> province,List<Long> ifFilter); List<QualityRuleInfo> findByBusinessTimeBetweenAndDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInOrderByBusinessTimeDesc(Timestamp time1, Timestamp time2, List<Long> dataSource, List<Long> chnnal, List<Long> busines, List<Long> province, List<Long> ifFilter);
} }
...@@ -29,7 +29,7 @@ public class AccuracyRuleService { ...@@ -29,7 +29,7 @@ public class AccuracyRuleService {
//根据准确性规则ID更新准确性规则 //根据准确性规则ID更新准确性规则
@Transactional(readOnly=false) @Transactional(readOnly=false)
public void updateAccuracyRuleByAccuracyRuleId(String ruleType,String scopeMaxValue,String scopeMinValue,String repeatedCheckGranularity,Date repeatedCheckStartTime,Date repeatedCheckEndTime,String ifRepeatedCheckSeries,Long repeatedCheckMaxTime,String ifRepeatedCheckSummation,Long accuracyRuleId){ public void updateAccuracyRuleByAccuracyRuleId(String ruleType,Double scopeMaxValue,Double scopeMinValue,String repeatedCheckGranularity,Date repeatedCheckStartTime,Date repeatedCheckEndTime,String ifRepeatedCheckSeries,Long repeatedCheckMaxTime,String ifRepeatedCheckSummation,Long accuracyRuleId){
accuracyRuleDao.updateAccuracyRuleByAccuracyRuleId(ruleType, scopeMaxValue, scopeMinValue, repeatedCheckGranularity, repeatedCheckStartTime, repeatedCheckEndTime, ifRepeatedCheckSeries, repeatedCheckMaxTime, ifRepeatedCheckSummation,accuracyRuleId); accuracyRuleDao.updateAccuracyRuleByAccuracyRuleId(ruleType, scopeMaxValue, scopeMinValue, repeatedCheckGranularity, repeatedCheckStartTime, repeatedCheckEndTime, ifRepeatedCheckSeries, repeatedCheckMaxTime, ifRepeatedCheckSummation,accuracyRuleId);
} }
......
package com.hp.cmsz.service.analysissupport; package com.hp.cmsz.service.analysissupport;
import com.hp.cmsz.entity.QualityRuleInfo; import com.hp.cmsz.entity.QualityRuleInfo;
import com.hp.cmsz.entity.Time;
import com.hp.cmsz.repository.QualityRuleInfoDao; import com.hp.cmsz.repository.QualityRuleInfoDao;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.sql.Timestamp;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -21,7 +23,7 @@ public class QualityRuleInfoService { ...@@ -21,7 +23,7 @@ public class QualityRuleInfoService {
} }
//根据筛选项获取质量规则 //根据筛选项获取质量规则
public List<QualityRuleInfo> getQualityRuleInfoBy(Date time1, Date time2,List<Long> dataSource,List<Long> chnnal,List<Long> busines,List<Long>province,List<Long> ifFilter){ public List<QualityRuleInfo> getQualityRuleInfoBy(Timestamp time1 , Timestamp time2, List<Long> dataSource, List<Long> chnnal, List<Long> busines, List<Long>province, List<Long> ifFilter){
return qualityRuleInfoDao.findByBusinessTimeBetweenAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInAndDataSourceIdInOrderByBusinessTimeDesc(time1, time2,dataSource,chnnal,busines,province,ifFilter); return qualityRuleInfoDao.findByBusinessTimeBetweenAndDataSourceIdInAndChannelIdInAndBusinessIdInAndProvinceIdInAndIfFilterInOrderByBusinessTimeDesc(time1, time2,dataSource,chnnal,busines,province,ifFilter);
} }
} }
...@@ -3,18 +3,16 @@ package com.hp.cmsz.web.analysissupport; ...@@ -3,18 +3,16 @@ package com.hp.cmsz.web.analysissupport;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.hp.cmsz.entity.Province; import com.google.gson.Gson;
import com.hp.cmsz.repository.ChannelDao; import com.hp.cmsz.entity.*;
import com.hp.cmsz.repository.DataSourceDao; import com.hp.cmsz.repository.*;
import com.hp.cmsz.repository.ProvinceDao; import com.hp.cmsz.service.BusinessService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import com.hp.cmsz.web.PageURLController; import com.hp.cmsz.web.PageURLController;
import javax.annotation.Resource;
/** /**
* 质量规则维护的新增过滤规则控制类 * 质量规则维护的新增过滤规则控制类
* *
...@@ -26,23 +24,51 @@ import javax.annotation.Resource; ...@@ -26,23 +24,51 @@ import javax.annotation.Resource;
@RequestMapping(value="AnalysisSupport/FilterRuleMaintain") @RequestMapping(value="AnalysisSupport/FilterRuleMaintain")
public class FilterRuleMaintainController { public class FilterRuleMaintainController {
@Resource @Autowired
private ProvinceDao provinceDao; private ProvinceDao provinceDao;
@Autowired @Autowired
private ChannelDao channelDao; private ChannelDao channelDao;
@Autowired
private DataSourceDao dataSourceDao;
@Autowired
private ChannelDataSourceMapDao channelDataSourceMapDao;
@Autowired
private BusinessService businessService;
@RequestMapping(value = "") @Autowired
public String filterMaintainHome(Map model){ private BusinessDao businessDao;
@Autowired
private KpiDao kpiDao;
List<Province> provinceList=(List<Province>)provinceDao.findProvince(); @Autowired
private DataTypeDao dataTypeDao;
@Autowired
private DataSourceDao dataSourceDao;
model.put("providerList", provinceList); @RequestMapping(value = "")
public String filterMaintainHome(Map model){
//查询出所有的省份
List<Province> provinceList=(List<Province>)provinceDao.findProvince();
//查询出所有的渠道信息
List<Channel> channelList=(List<Channel>)channelDao.findChannel();
//查询出所有的指标
List<Kpi> kpiList=(List<Kpi>)kpiDao.findAll();
//查询出所有的业务
List<Object[]> businessList=(List<Object[]>)businessDao.findAllBusinessIdAndBusinessName();
//查询出所有的数据类型
List<DataType> dataTypeList= (List<DataType>)dataTypeDao.findAll();
//查询出所有的数据来源
List<DataSource> dataSourceList=(List<DataSource>)dataSourceDao.findAll();
Gson gson = new Gson();
model.put("provinceList", provinceList);
model.put("channelList", channelList);
model.put("kpiList", kpiList);
model.put("businessList", gson.toJson(businessList));
model.put("dataTypeList", dataTypeList);
model.put("dataSourceList", dataSourceList);
return PageURLController.FilterMaintain; return PageURLController.FilterMaintain;
} }
} }
package com.hp.cmsz.web.analysissupport; package com.hp.cmsz.web.analysissupport;
import java.io.IOException;
import java.io.PrintWriter;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -8,6 +12,10 @@ import java.util.Map; ...@@ -8,6 +12,10 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.hp.cmsz.repository.*;
import com.hp.cmsz.service.BusinessService;
import com.hp.cmsz.service.CmszOperationLogService;
import com.hp.cmsz.service.analysissupport.QualityRuleService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -24,14 +32,6 @@ import com.hp.cmsz.entity.DataType; ...@@ -24,14 +32,6 @@ import com.hp.cmsz.entity.DataType;
import com.hp.cmsz.entity.Kpi; import com.hp.cmsz.entity.Kpi;
import com.hp.cmsz.entity.Province; import com.hp.cmsz.entity.Province;
import com.hp.cmsz.entity.QualityRule; import com.hp.cmsz.entity.QualityRule;
import com.hp.cmsz.repository.AccuracyRuleDao;
import com.hp.cmsz.repository.BusinessDao;
import com.hp.cmsz.repository.ChannelDao;
import com.hp.cmsz.repository.DataSourceDao;
import com.hp.cmsz.repository.DataTypeDao;
import com.hp.cmsz.repository.KpiDao;
import com.hp.cmsz.repository.ProvinceDao;
import com.hp.cmsz.repository.QualityRuleDao;
import com.hp.cmsz.service.analysissupport.AccuracyRuleService; import com.hp.cmsz.service.analysissupport.AccuracyRuleService;
import com.hp.cmsz.web.PageURLController; import com.hp.cmsz.web.PageURLController;
...@@ -46,111 +46,219 @@ import com.hp.cmsz.web.PageURLController; ...@@ -46,111 +46,219 @@ import com.hp.cmsz.web.PageURLController;
@RequestMapping(value="AnalysisSupport/QualityRuleConfiguration") @RequestMapping(value="AnalysisSupport/QualityRuleConfiguration")
public class QualityRuleConfigurationController { public class QualityRuleConfigurationController {
// @Autowired @Autowired
// private ProvinceDao provinceDao; private ProvinceDao provinceDao;
//
// @Autowired @Autowired
// private ChannelDao channelDao; private ChannelDao channelDao;
//
// @Autowired @Autowired
// private BusinessDao businessDao; private ChannelDataSourceMapDao channelDataSourceMapDao;
//
// @Autowired @Autowired
// private KpiDao kpiDao; private BusinessService businessService;
//
// @Autowired @Autowired
// private DataTypeDao dataTypeDao; private BusinessDao businessDao;
//
// @Autowired @Autowired
// private DataSourceDao dataSourceDao; private KpiDao kpiDao;
//
// @Autowired @Autowired
// private QualityRuleDao qualityRuleDao; private DataTypeDao dataTypeDao;
//
//// @Autowired @Autowired
//// private QualityRuleService qualityRuleService; private DataSourceDao dataSourceDao;
//
// @Autowired @Autowired
// private AccuracyRuleDao accuracyRuleDao; private QualityRuleDao qualityRuleDao;
//
// @Autowired @Autowired
// private AccuracyRuleService accuracyRuleService; private QualityRuleService qualityRuleService;
////
//// @Autowired @Autowired
//// private CmszOperationLogService cmszOperationLogService; private AccuracyRuleDao accuracyRuleDao;
//
// @RequestMapping(value = "") @Autowired
// public String ruleMaintainHome(@RequestParam(value = "qualityRuleId", defaultValue ="") String qualityRuleId, private AccuracyRuleService accuracyRuleService;
// Map model){
// @Autowired
// QualityRule qualityRule = null; private CmszOperationLogService cmszOperationLogService;
// List<AccuracyRule> accuracyRuleList = null;
// if(!qualityRuleId.trim().equals("")){ private String staticQualityRuleId = "";
// qualityRule = qualityRuleDao.findByQualityRuleId(Long.parseLong(qualityRuleId)); private Double staticScopeMaxValue = 0.00;
// accuracyRuleList = accuracyRuleDao.findByQualityRuleId(Long.parseLong(qualityRuleId)); private Double staticScopeMinValue = 0.00;
// }
// @RequestMapping(value = "")
// //查询出所有的省份 public String ruleMaintainHome(@RequestParam(value = "qualityRuleId", defaultValue ="") String qualityRuleId,
// List<Province> provinceList=(List<Province>)provinceDao.findProvince(); Map model){
// //查询出所有的渠道信息 staticQualityRuleId = qualityRuleId;
// List<Channel> channelList=(List<Channel>)channelDao.findChannelWithoutAll(); QualityRule qualityRule = null;
// //查询出所有的指标 List<AccuracyRule> accuracyRuleList = null;
// List<Kpi> kpiList=(List<Kpi>)kpiDao.findAll(); if(!qualityRuleId.trim().equals("")){
// //查询出所有的业务 qualityRule = qualityRuleDao.findByQualityRuleId(Long.parseLong(qualityRuleId));
// List<Business> businessList=(List<Business>)businessDao.findAll(); accuracyRuleList = accuracyRuleDao.findByQualityRuleId(Long.parseLong(qualityRuleId));
// //查询出所有的数据类型 }
// List<DataType> dataTypeList= (List<DataType>)dataTypeDao.findAll(); //查询出所有的省份
// //查询出所有的数据来源 List<Province> provinceList=provinceDao.findProvince();
// List<DataSource> dataSourceList=(List<DataSource>)dataSourceDao.findAll(); //查询出所有的渠道信息
// Gson gson = new Gson(); List<Channel> channelList=channelDao.findChannel();
// model.put("provinceList", provinceList); //查询出所有的指标
// model.put("channelList", channelList); List<Kpi> kpiList=(List<Kpi>)kpiDao.findAll();
// model.put("kpiList", kpiList); //查询出所有的业务
// model.put("businessList", gson.toJson(businessList)); List<Object[]> businessList=businessDao.findAllBusinessIdAndBusinessName();
// model.put("dataTypeList", dataTypeList); //查询出所有的数据类型
// model.put("dataSourceList", dataSourceList); List<DataType> dataTypeList= (List<DataType>)dataTypeDao.findAll();
// //查询出所有的数据来源
// return PageURLController.RuleConfiguration; List<DataSource> dataSourceList=(List<DataSource>)dataSourceDao.findAll();
// } Gson gson = new Gson();
// model.put("provinceList", provinceList);
// //修改准确性规则信息 model.put("channelList", channelList);
// @RequestMapping(value = "/updateAccuracyRule*",method=RequestMethod.GET) model.put("kpiList", kpiList);
// @ResponseBody model.put("businessList", gson.toJson(businessList));
// public void updateParameter( model.put("dataTypeList", dataTypeList);
// @RequestParam(value="ruleType") String ruleType, model.put("dataSourceList", dataSourceList);
// @RequestParam(value="scopeMaxValue") double scopeMaxValue,
// @RequestParam(value="scopeMinValue") double scopeMinValue, return PageURLController.RuleConfiguration;
// @RequestParam(value="repeatedCheckGranularity") String repeatedCheckGranularity, }
// @RequestParam(value="repeatedCheckStartTime") Date repeatedCheckStartTime,
// @RequestParam(value="repeatedCheckEndTime") Date repeatedCheckEndTime, @RequestMapping(value = "/findBusinessId*")
// @RequestParam(value="ifRepeatedCheckSeries") String ifRepeatedCheckSeries, @ResponseBody
// @RequestParam(value="repeatedCheckMaxTime") Long repeatedCheckMaxTime, public void datasource_select(@RequestParam(value = "dataSource", defaultValue ="" ) String dataSource,
// @RequestParam(value="ifRepeatedCheckSummation") String ifRepeatedCheckSummation, @RequestParam(value = "channel", defaultValue ="" ) String channel,
// @RequestParam(value="qualityRuleId")String qualityRuleId, HttpServletResponse response) {
// @RequestParam(value="accuracyRuleId")String accuracyRuleId){ System.out.println(dataSource);
//
// if(qualityRuleId.trim().equals("")){ List<Object []> resultList = new ArrayList<Object []>();
// AccuracyRule accuracyRule = new AccuracyRule();
// accuracyRule.setAccuracyRuleId(Long.parseLong(qualityRuleId)); List<Object[]> list = (List<Object[]>)businessDao.findBusinessIdAndBusinessNameByDataSourceIdAndChannelIdWithIsActive(Long.parseLong(channel),Long.parseLong(dataSource));
// accuracyRule.setRuleType(ruleType); for(int i=0;i<list.size();i++){
// accuracyRule.setScopeMinValue(scopeMaxValue); Object[] objs = list.get(i);
// accuracyRule.setScopeMinValue(scopeMinValue); //将重复的业务名的Id写在同一个对象中
// accuracyRule.setRepeatedCheckGranularity(repeatedCheckGranularity); for(int j=0;j<list.size();j++){
// accuracyRule.setRepeatedCheckStartTime(repeatedCheckStartTime); if(i == j){}else{
// accuracyRule.setRepeatedCheckEndTime(repeatedCheckEndTime); Object[] objs1 = list.get(j);
// accuracyRule.setIfRepeatedCheckSeries(ifRepeatedCheckSeries); if(objs[1].equals(objs1[1])){
// accuracyRule.setRepeatedCheckMaxTime(repeatedCheckMaxTime); objs[0] = objs[0] +","+ objs1[0];
// accuracyRule.setIfRepeatedCheckSummation(ifRepeatedCheckSummation); list.remove(j);
// j--;
// accuracyRuleDao.save(accuracyRule); }
// }else{ }
// accuracyRuleService.updateAccuracyRuleByAccuracyRuleId(ruleType, scopeMaxValue, scopeMinValue, repeatedCheckGranularity, repeatedCheckStartTime, repeatedCheckEndTime, ifRepeatedCheckSeries, repeatedCheckMaxTime, ifRepeatedCheckSummation, Long.parseLong(accuracyRuleId));; }
// } resultList.add(objs);
// }
// }
Gson gson = new Gson();
@RequestMapping() response.setContentType("text/Xml;chartset=gbk");
public String updateQualityRuleForm() { PrintWriter out = null;
try{
out = response.getWriter();
out.println(gson.toJson(resultList));
}
catch(IOException ex){
ex.printStackTrace();
}
finally{
out.close();
}
}
@RequestMapping(value="/findKpiId*")
@ResponseBody
public void findKpiId(@RequestParam(value = "businessIds", defaultValue ="" ) String businessIds,
@RequestParam(value = "calCycleValue", defaultValue = "30MI") String calCycleValue,
HttpServletResponse response){
String[] strs = businessIds.split(",");
List<Long> businessIdlist = new ArrayList<Long>();
for(int i=0;i<strs.length;i++) {
businessIdlist.add(Long.valueOf(strs[i]));
}
List<Object[]> businessKpiList = (List<Object[]>)kpiDao.findKpiIdAndKpiNameByBusinessIds(businessIdlist,calCycleValue);
Gson gson = new Gson();
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(); }
}
//删除准确性规则信息
@RequestMapping(value = "/deleteAccuracyRule*",method=RequestMethod.GET)
@ResponseBody
public void deleteParameter(@RequestParam(value = "accuracyRuleId", defaultValue ="") String accuracyRuleId,
@RequestParam(value = "qualityRuleId", defaultValue ="") String qualityRuleId){
if(!accuracyRuleId.trim().equals("")){
accuracyRuleService.deleteAccuracyRuleByAccuracyRuleId(Long.parseLong(accuracyRuleId));
}
if(!qualityRuleId.trim().equals("")){
accuracyRuleService.deleteAccuracyRuleByOneQualityRuleId(Long.parseLong(qualityRuleId));
}
}
//修改准确性规则信息
@RequestMapping(value = "/updateAccuracyRule*",method=RequestMethod.GET)
@ResponseBody
public void updateParameter(
@RequestParam(value="ruleType") String ruleType,
@RequestParam(value="scopeMaxValue") double scopeMaxValue,
@RequestParam(value="scopeMinValue") double scopeMinValue,
@RequestParam(value="repeatedCheckGranularity") String repeatedCheckGranularity,
@RequestParam(value="repeatedCheckStartTime") Date repeatedCheckStartTime,
@RequestParam(value="repeatedCheckEndTime") Date repeatedCheckEndTime,
@RequestParam(value="ifRepeatedCheckSeries") String ifRepeatedCheckSeries,
@RequestParam(value="repeatedCheckMaxTime") Long repeatedCheckMaxTime,
@RequestParam(value="ifRepeatedCheckSummation") String ifRepeatedCheckSummation,
@RequestParam(value="qualityRuleId")String qualityRuleId,
@RequestParam(value="accuracyRuleId")String accuracyRuleId){
if(qualityRuleId.trim().equals("")){
AccuracyRule accuracyRule = new AccuracyRule();
accuracyRule.setAccuracyRuleId(Long.parseLong(qualityRuleId));
if (ruleType == "1") {
accuracyRule.setRuleType("范围");
} else if (ruleType == "2") {
accuracyRule.setRuleType("重复");
}
accuracyRule.setScopeMinValue(String.valueOf(scopeMaxValue));
accuracyRule.setScopeMinValue(String.valueOf(scopeMinValue));
accuracyRule.setRepeatedCheckGranularity(repeatedCheckGranularity);
accuracyRule.setRepeatedCheckStartTime(repeatedCheckStartTime);
accuracyRule.setRepeatedCheckEndTime(repeatedCheckEndTime);
accuracyRule.setIfRepeatedCheckSeries(ifRepeatedCheckSeries);
accuracyRule.setRepeatedCheckMaxTime(repeatedCheckMaxTime);
accuracyRule.setIfRepeatedCheckSummation(ifRepeatedCheckSummation);
accuracyRuleDao.save(accuracyRule);
}else{
staticScopeMaxValue= Double.parseDouble(String.valueOf(scopeMaxValue));
staticScopeMinValue= Double.parseDouble(String.valueOf(scopeMinValue));
accuracyRuleService.updateAccuracyRuleByAccuracyRuleId(ruleType, staticScopeMaxValue, staticScopeMinValue, repeatedCheckGranularity, repeatedCheckStartTime, repeatedCheckEndTime, ifRepeatedCheckSeries, repeatedCheckMaxTime, ifRepeatedCheckSummation, Long.parseLong(accuracyRuleId));;
}
}
@RequestMapping(value = "/updateQualityRuleForm",method=RequestMethod.POST)
public String updateQualityRuleForm(@RequestParam(value="businessid") String businessId,
@RequestParam(value="provinceid") String provinceId,
@RequestParam(value="channelid") String channelId,
@RequestParam(value="dataSourceid") String dataSourceId,
@RequestParam(value="kpiid") String kpiId,
@RequestParam(value="kpiMonitorTime") String kpiMonitorTime,
@RequestParam(value="businessTime") String businessTime,
HttpServletResponse response, HttpServletRequest request) throws ParseException {
System.out.println("businessId"+businessId+"provinceid"+provinceId+"channelId"+channelId+"dataSourceId"+dataSourceId+"kpi"+kpiId+"kpiMonitorTime"+kpiMonitorTime+"businessTime"+businessTime);
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return PageURLController.RuleConfiguration; return PageURLController.RuleConfiguration;
} }
......
...@@ -194,36 +194,47 @@ public class QualityRuleMaintainController { ...@@ -194,36 +194,47 @@ public class QualityRuleMaintainController {
@RequestParam(value="repeatedCheckMaxTime") String repeatedCheckMaxTime, @RequestParam(value="repeatedCheckMaxTime") String repeatedCheckMaxTime,
@RequestParam(value="ifRepeatedCheckSummation") String ifRepeatedCheckSummation, @RequestParam(value="ifRepeatedCheckSummation") String ifRepeatedCheckSummation,
HttpServletResponse response,HttpServletRequest request) { HttpServletResponse response,HttpServletRequest request) {
System.out.println("ruleType"+ruleType);
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
AccuracyRule accuracyRule = new AccuracyRule(); AccuracyRule accuracyRule = new AccuracyRule();
if(!ruleType.trim().equals("")) { if (!ruleType.trim().equals("")) {
if (ruleType == "1") { if (ruleType == "1") {
accuracyRule.setRuleType("范围"); accuracyRule.setRuleType("范围");
} else if (ruleType == "2") { } else if (ruleType == "2") {
accuracyRule.setRuleType("重复"); accuracyRule.setRuleType("重复");
} }
if (!scopeMaxValue.trim().equals("")) {
accuracyRule.setScopeMaxValue(scopeMaxValue);
} }
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); if (!scopeMinValue.trim().equals("")) {
if(!scopeMaxValue.trim().equals("")){accuracyRule.setScopeMaxValue(scopeMaxValue);} accuracyRule.setScopeMinValue(scopeMinValue);
if(!scopeMinValue.trim().equals("")){accuracyRule.setScopeMinValue(scopeMinValue);} }
if(!repeatedCheckGranularity.trim().equals("")){accuracyRule.setRepeatedCheckGranularity(repeatedCheckGranularity);} if (!repeatedCheckGranularity.trim().equals("")) {
if(!repeatedCheckStartTime.trim().equals("")){ accuracyRule.setRepeatedCheckGranularity(repeatedCheckGranularity);
}
if (!repeatedCheckStartTime.trim().equals("")) {
try { try {
accuracyRule.setRepeatedCheckStartTime(sd.parse(repeatedCheckStartTime)); accuracyRule.setRepeatedCheckStartTime(sd.parse(repeatedCheckStartTime));
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
if(!repeatedCheckEndTime.trim().equals("")){ if (!repeatedCheckEndTime.trim().equals("")) {
try { try {
accuracyRule.setRepeatedCheckEndTime(sd.parse(repeatedCheckEndTime)); accuracyRule.setRepeatedCheckEndTime(sd.parse(repeatedCheckEndTime));
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
if(!ifRepeatedCheckSeries.trim().equals("")){accuracyRule.setIfRepeatedCheckSeries(ifRepeatedCheckSeries);} if (!ifRepeatedCheckSeries.trim().equals("")) {
if(!repeatedCheckMaxTime.trim().equals("")){accuracyRule.setRepeatedCheckMaxTime(Long.parseLong(repeatedCheckMaxTime));} accuracyRule.setIfRepeatedCheckSeries(ifRepeatedCheckSeries);
if(!ifRepeatedCheckSummation.trim().equals("")){accuracyRule.setIfRepeatedCheckSummation(ifRepeatedCheckSummation);} }
if (!repeatedCheckMaxTime.trim().equals("")) {
accuracyRule.setRepeatedCheckMaxTime(Long.parseLong(repeatedCheckMaxTime));
}
if (!ifRepeatedCheckSummation.trim().equals("")) {
accuracyRule.setIfRepeatedCheckSummation(ifRepeatedCheckSummation);
}
accuracyRule.setRuleCrtTime(new Date()); accuracyRule.setRuleCrtTime(new Date());
accuracyRule.setRuleUpdateTime(new Date()); accuracyRule.setRuleUpdateTime(new Date());
...@@ -232,82 +243,55 @@ public class QualityRuleMaintainController { ...@@ -232,82 +243,55 @@ public class QualityRuleMaintainController {
Long qualityRuleId = accuracyRule.getAccuracyRuleId(); Long qualityRuleId = accuracyRule.getAccuracyRuleId();
qualityRuleIdList.add(qualityRuleId); qualityRuleIdList.add(qualityRuleId);
} }
}
//新增质量模型 //新增质量模型
@RequestMapping(value = "/saveRuleDataForm", method = RequestMethod.POST) @RequestMapping(value = "/saveRuleDataForm", method = RequestMethod.POST)
public String saveRuleDataForm( public String saveRuleDataForm (@RequestParam(value="businessinput") String business,
// @RequestParam(value="channel") String channel, @RequestParam(value="province") String province,
// @RequestParam(value="dataSource") String dataSourceId, @RequestParam(value="channel") String channel,
// @RequestParam(value="kpiMonitorTime") String kpiMonitorTime, @RequestParam(value="dataSource") String dataSourceId,
// @RequestParam(value="businessTime") String businessTime, @RequestParam(value="kpiinput") String kpi,
// @RequestParam(value="ruleCrtTime") String ruleCrtTime, @RequestParam(value="kpiUnit") String kpiUnit,
// @RequestParam(value="ruleUpdateTime") String ruleUpdateTime, @RequestParam(value="kpiMonitorTime") String kpiMonitorTime,
HttpServletResponse response,HttpServletRequest request) throws ParseException{ @RequestParam(value="businessTime") String businessTime,
// String province = request.getParameter("province"); HttpServletResponse response, HttpServletRequest request) throws ParseException {
// String businessValue = request.getParameter("businessinput");
String channel =request.getParameter("channel"); System.out.println("0000"+kpiUnit);
// String dataSourceId =request.getParameter("dataSource");
// String kpiValue = request.getParameter("kpiinput");
// String kpiMonitorTime=request.getParameter("kpiMonitorTime");
// String businessTime=request.getParameter("businessTime");
// String ruleCrtTime=request.getParameter("ruleCrtTime");
// String ruleUpdateTime=request.getParameter("ruleUpdateTime");
// String provinceId = "";
// String businessId = "";
// String kpiId = "";
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
QualityRule qualityRule = new QualityRule();
// List<Long> provinceIdList = new ArrayList<Long>(); List<Long> provinceIdList = new ArrayList<Long>();
// for(int i=0;i<province.split(",").length;i++){ for(int i=0;i<province.split(",").length;i++){
// provinceIdList.add(Long.parseLong(province.split(",")[i])); provinceIdList.add(Long.parseLong(province.split(",")[i]));
// } }
// List<Long> businessIdList = new ArrayList<Long>(); List<Long> businessIdList = new ArrayList<Long>();
// for(int i=0;i<businessValue.split(",").length;i++){ for(int i=0;i<business.split(",").length;i++){
// businessIdList.add(Long.parseLong(businessValue.split(",")[i])); businessIdList.add(Long.parseLong(business.split(",")[i]));
// }
// List<Long> kpiIdList = new ArrayList<Long>();
// for(int i=0;i<kpiValue.split(",").length;i++){
// kpiIdList.add(Long.parseLong(kpiValue.split(",")[i]));
// }
// System.out.println("provinceIdList:"+provinceIdList+"businessIdList:"+businessIdList+"kpiIdList:"+kpiIdList);
// for(int j=0; j<provinceIdList.size(); j++) {
// for(int k=0; k<businessIdList.size(); k++){
// for(int l=0; l<kpiIdList.size(); l++){
// provinceId = String.valueOf(provinceIdList.get(j));
// businessId = String.valueOf(businessIdList.get(k));
// kpiId = String.valueOf(kpiIdList.get(l));
// if(!provinceId.trim().equals("")){qualityRule.setProvinceId(Long.parseLong(provinceId));}
// if(!businessId.trim().equals("")){qualityRule.setBusinessId(Long.parseLong(businessId));}
// if(!kpiId.trim().equals("")){qualityRule.setKpiId(Long.parseLong(kpiId));}
qualityRule.setProvinceId(Long.parseLong("1"));
qualityRule.setBusinessId(Long.parseLong("1490"));
qualityRule.setKpiId(Long.parseLong("2411"));
if(!channel.trim().equals("")){
qualityRule.setChannelId(Long.parseLong(channel));
} }
//if(!dataSourceId.trim().equals("")){ List<Long> kpiIdList = new ArrayList<Long>();
qualityRule.setDataSourceId(Long.parseLong("7")); for(int i=0;i<kpi.split(",").length;i++){
//} kpiIdList.add(Long.parseLong(kpi.split(",")[i]));
//if(!kpiMonitorTime.trim().equals("")){ }
qualityRule.setKpiMonitorTime("4"); for(int j=0; j<provinceIdList.size(); j++) {
//} for(int l=0; l<kpiIdList.size(); l++){
QualityRule qualityRule = new QualityRule();
qualityRule.setProvinceId(provinceIdList.get(j));
qualityRule.setKpiId(kpiIdList.get(l));
if(!channel.trim().equals("")){ qualityRule.setChannelId(Long.parseLong(channel)); }
if(!dataSourceId.trim().equals("")){ qualityRule.setDataSourceId(Long.parseLong(dataSourceId)); }
if(!kpiMonitorTime.trim().equals("")){ qualityRule.setKpiMonitorTime(kpiMonitorTime); }
qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(new Date()))); qualityRule.setKpiMonitorRunTime(Timestamp.valueOf(sd.format(new Date())));
//if(!businessTime.trim().equals("")){ if(!businessTime.trim().equals("")){ qualityRule.setBusinessTime(Timestamp.valueOf(businessTime)); }
qualityRule.setBusinessTime(Timestamp.valueOf(sd.format(new Date())));
//}
qualityRule.setRuleCrtTime(Timestamp.valueOf(sd.format(new Date()))); qualityRule.setRuleCrtTime(Timestamp.valueOf(sd.format(new Date())));
qualityRule.setRuleUpdateTime(Timestamp.valueOf(sd.format(new Date()))); qualityRule.setRuleUpdateTime(Timestamp.valueOf(sd.format(new Date())));
qualityRule.setRuleValidFlag("0"); qualityRule.setRuleValidFlag("0");
qualityRule.setIfSystemValue("0"); qualityRule.setIfSystemValue("0");
System.out.println("qualityRule"+qualityRule);
qualityRuleDao.save(qualityRule); qualityRuleDao.save(qualityRule);
// } cmszOperationLogService.createLog("增加", "新建质量模型", "quality_rule_warehouse_info_t. QUALITY_RULE_ID=" + qualityRule.getQualityRuleId().toString());
// }
// }
cmszOperationLogService.createLog("增加","新建质量模型","quality_rule_warehouse_info_t. QUALITY_RULE_ID="+ qualityRule.getQualityRuleId().toString());
Long qualityRuleId = qualityRule.getQualityRuleId(); Long qualityRuleId = qualityRule.getQualityRuleId();
return "redirect:AnalysisSupport/QualityRuleResult"; }
} }
return "redirect:/AnalysisSupport/QualityRuleResult";
}
} }
...@@ -18,10 +18,12 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -18,10 +18,12 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.sql.Timestamp;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -97,7 +99,7 @@ public class QualityRuleOperationController { ...@@ -97,7 +99,7 @@ public class QualityRuleOperationController {
} }
//根据筛选项搜索 //根据筛选项搜索
@RequestMapping(value = "/changeTable*", method = RequestMethod.POST) @RequestMapping(value = "/operationChangeTable*", method = RequestMethod.GET)
@ResponseBody @ResponseBody
public void changeTable(@RequestParam(value = "period") String period,// 时间 public void changeTable(@RequestParam(value = "period") String period,// 时间
@RequestParam(value = "dataSource") String dataSource,// 数据来源 @RequestParam(value = "dataSource") String dataSource,// 数据来源
...@@ -106,23 +108,24 @@ public class QualityRuleOperationController { ...@@ -106,23 +108,24 @@ public class QualityRuleOperationController {
@RequestParam(value = "province") String province,//省份 @RequestParam(value = "province") String province,//省份
@RequestParam(value = "ifFilter") String ifFilter,//是否过滤 @RequestParam(value = "ifFilter") String ifFilter,//是否过滤
HttpServletResponse response) throws ParseException, UnsupportedEncodingException { HttpServletResponse response) throws ParseException, UnsupportedEncodingException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
cmszOperationLogService.createLog("查询","质量规则运营查询","质量规则运营页面查询"); cmszOperationLogService.createLog("查询","质量规则运营查询","质量规则运营页面查询");
List<QualityRuleInfo> qualityRuleInfoList; List<QualityRuleInfo> qualityRuleInfoList;
String[] time=period.split("~"); String[] dates=period.split("~");
String[] dataSourceS=dataSource.split(","); String[] dataSourceS=dataSource.split(",");
String[] chnnalS=chnnal.split(","); String[] chnnalS=chnnal.split(",");
String[] bussinesS =bussines.split(","); String[] bussinesS =bussines.split(",");
String[] provinceS=province.split(","); String[] provinceS=province.split(",");
String[] ifFilterS=province.split(","); String[] ifFilterS=ifFilter.split(",");
Date time1=sdf.parse(time[0]); Timestamp time1=new Timestamp(format.parse(dates[0]).getTime());
Date time2=sdf.parse(time[1]); Timestamp time2=new Timestamp(format.parse(dates[1]).getTime());
List<Long> dataSourceList=changeStrToList(dataSourceS); List<Long> dataSourceList=changeStrToList(dataSourceS);
List<Long> chnnalList=changeStrToList(chnnalS); List<Long> chnnalList=changeStrToList(chnnalS);
List<Long> bussinesList=changeStrToList(bussinesS); List<Long> bussinesList=changeStrToList(bussinesS);
List<Long> provinceList=changeStrToList(provinceS); List<Long> provinceList=changeStrToList(provinceS);
List<Long> ifFilterList=changeStrToList(ifFilterS); List<Long> ifFilterList=changeStrToList(ifFilterS);
System.out.println("qualityRule:"+time1+time2+"data"+dataSourceList+"busin"+bussinesList+"procin"+provinceList+"if"+ifFilterList);
qualityRuleInfoList = qualityRuleInfoService.getQualityRuleInfoBy(time1,time2,dataSourceList,chnnalList,bussinesList,provinceList,ifFilterList); qualityRuleInfoList = qualityRuleInfoService.getQualityRuleInfoBy(time1,time2,dataSourceList,chnnalList,bussinesList,provinceList,ifFilterList);
Gson gson = new Gson(); Gson gson = new Gson();
response.setContentType("text/Xml;charset=gbk"); response.setContentType("text/Xml;charset=gbk");
......
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
<div id="ws" class="slide-menu-option"> <div id="ws" class="slide-menu-option">
<label>是否过滤</label> <label>是否过滤</label>
<select class="slide-menu-select" id="ifFilter" name="ifFilter"> <select class="slide-menu-select" id="ifFilter" name="ifFilter">
<option value="'1'" title="是"><a href="#">是</a></option> <option value="0,1" title="全部"selected><a href="#">全部</a></option>
<option value="'0'" title="否"><a href="#">否</a></option> <option value="1" title="是"><a href="#">是</a></option>
<option value="0" title="否"><a href="#">否</a></option>
</select> </select>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
//获取其被选中的value,若是0则代表不是关键配置,若是1则代表是关键配置
function getIfFilter(){ function getIfFilter(){
return $("#ifFilter").val(); return $("#ifFilter").val();
} }
...@@ -25,6 +25,6 @@ ...@@ -25,6 +25,6 @@
} }
function RelFilterRest() { function RelFilterRest() {
$("#ifFilter").val("1"); $("#ifFilter").val("0,1");
} }
</script> </script>
\ No newline at end of file
...@@ -53,16 +53,48 @@ ...@@ -53,16 +53,48 @@
<form action="#" class="form-horizontal" id="filterMaintainForm" method="post" enctype="multipart/form-data"> <form action="#" class="form-horizontal" id="filterMaintainForm" method="post" enctype="multipart/form-data">
<table id="filterMaintainTable" class="table-null"> <table id="filterMaintainTable" class="table-null">
<tr><td>省份(<font color="red">必填</font>):</td> <tr><td>省份(<font color="red">必填</font>):</td>
<td><tags:ProvinceTag /></td> <td>
<c:forEach var="province" items="${provinceList}">
<input type="checkbox" name="province" id="province" value="${province.provinceId}" checked>${province.provinceName}
</c:forEach>
</td>
</tr>
<tr><td>数据来源(<font color="red">必填</font>):</td>
<td>
<select class="form-control" name="dataSource" id="dataSource" >
<c:forEach var="dataSource" items="${dataSourceList}">
<c:if test="${dataSource.dataSourceId == '5'}">
<option value="${dataSource.dataSourceId}" selected>${dataSource.dataSourceName}</option>
</c:if >
<c:if test="${dataSource.dataSourceId != '5'}">
<option value="${dataSource.dataSourceId}" >${dataSource.dataSourceName}</option>
</c:if >
</c:forEach>
</select></td>
</tr> </tr>
<tr><td>渠道(<font color="red">必填</font>):</td> <tr><td>渠道(<font color="red">必填</font>):</td>
<td><tags:ChannelTag /></td> <td><select class="form-control" name="channel" id="channel" >
<c:forEach var="channel" items="${channelList}">
<c:if test="${channel.channelId == '7'}">
<option value="${channel.channelId}" selected>${channel.channelName}</option>
</c:if>
<c:if test="${channel.channelId != '7'}">
<option value="${channel.channelId}">${channel.channelName}</option>
</c:if>
</c:forEach>
</select></td>
</tr> </tr>
<tr><td>业务(<font color="red">必填</font>):</td> <tr><td>业务(<font color="red">必填</font>):</td>
<td><tags:BusinessTag /></td> <td >
<div id="businesstd"></div>
</td>
</tr> </tr>
<tr><td>数据来源(<font color="red">必填</font>):</td> <tr><td>指标(<font color="red">必填</font>):</td>
<td><tags:DataSourceTag /></td> <td>
<div id="kpitd"></div>
</td>
</tr> </tr>
<!--<tr><td>影响开始时间(<font color="red">必填</font>):</td><td><input type="text" class="form-control" id="ruleCrtTime" name="ruleCrtTime" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'ruleCrtTime\')}'})" /></td></tr> <!--<tr><td>影响开始时间(<font color="red">必填</font>):</td><td><input type="text" class="form-control" id="ruleCrtTime" name="ruleCrtTime" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'ruleCrtTime\')}'})" /></td></tr>
<tr><td>影响结束时间(<font color="red">必填</font>):</td><td><input id="ruleUpdateTime" name="ruleUpdateTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'ruleUpdateTime\')}'})"> </td></tr> --> <tr><td>影响结束时间(<font color="red">必填</font>):</td><td><input id="ruleUpdateTime" name="ruleUpdateTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'ruleUpdateTime\')}'})"> </td></tr> -->
...@@ -96,5 +128,139 @@ $(".ifRepeate").change(function (){ ...@@ -96,5 +128,139 @@ $(".ifRepeate").change(function (){
$(".period").show(); $(".period").show();
} }
}) })
function getProvinceCheckedValues() {
var provinceArray = new Array();
var i=0;
$("#province:checked").each(function(){
provinceArray[i]=$(this).val();
i++;
});
return provinceArray;
}
function getProvinceCheckedValuesString(){
var provinceStr="";
var provinceArray=getProvinceCheckedValues();
for(var i=0;i<provinceArray.length;i++){
if(i==provinceArray.length-1){
provinceStr+=provinceArray[i];
}else{
provinceStr+=provinceArray[i]+",";
}
}
return provinceStr;
}
var dataSourceValue =$("#dataSource").val();
var channelValue = $("#channel").val();
var businessIds = getBusinessCheckedValues();
var calCycleValue =$("#calCycle").val();
$("#dataSource").change(function(){
dataSourceValue = $("#dataSource").val();
updateBusiness(dataSourceValue,channelValue);
});
$("#channel").change(function(){
channelValue = $("#channel").val();
updateBusiness(dataSourceValue,channelValue);
});
function updateKpi(businessIds){
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/AnalysisSupport/QualityRuleMaintain/findKpiId?businessIds="+businessIds,
async: false,
beforeSend: function(data) {},
success: function(data){
var td = $("#kpitd");
td.empty();
data = JSON.parse(data)
data.forEach(function(t){
td.append("<input type='checkbox' name='kpiinput' class='kpiItem' value='"+t[0]+"' checked >"+t[1]+"</input>")
});
}
});
}
function updateBusiness(dataSource,channel){
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/AnalysisSupport/QualityRuleMaintain/findBusinessId?dataSource="+dataSource+"&channel="+channel,
async: false,
beforeSend: function(data) {},
success: function(data){
var td = $("#businesstd");
var businessIds = new Array();
td.empty();
data = JSON.parse(data)
data.forEach(function(t){
td.append("<input type='checkbox' name='businessinput' class='businessItem' value='"+t[0]+"' checked >"+t[1]+"</input>")
businessIds+=t[0]+",";
});
updateKpi(businessIds);
}
});
$(".businessItem").click(function(){
businessIds="";
$("[name='businessinput']:checked").each(function (){
businessIds += $(this).val()+",";
});
updateKpi(businessIds);
});
}
updateBusiness($("#dataSource").val(),$("#channel").val());
function getBusinessCheckedValues(){
var businessArray = new Array();
var i=0;
$("[name='businessinput']:checked").each(function(){
businessArray[i]=$(this).val();
i++;
});
return businessArray;
}
function getBusinessCheckedValuesString(){
var businessStr="";
var businessArray=getBusinessCheckedValues();
for(var i=0;i<businessArray.length;i++){
if(i==businessArray.length-1){
businessStr+=businessArray[i];
}else{
businessStr+=businessArray[i]+",";
}
}
return businessStr;
}
function getKpiCheckedValues(){
var kpiArray = new Array();
var i=0;
$("[name='kpiinput']:checked").each(function(){
kpiArray[i]=$(this).val();
i++;
});
return kpiArray;
}
function getKpiCheckedValuesString(){
var kpiStr="";
var kpiArray=getKpiCheckedValues();
for(var i=0;i<kpiArray.length;i++){
if(i==kpiArray.length-1){
kpiStr+=kpiArray[i];
}else{
kpiStr+=kpiArray[i]+",";
}
}
return kpiStr;
}
</script> </script>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> <html>
<head> <head>
<title>质量规则维护</title> <title>数据质量规则维护</title>
<style> <style>
.table-null .table{ .table-null .table{
margin-bottom: 0px; margin-bottom: 0px;
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<ol class="breadcrumb"> <ol class="breadcrumb">
<li><a href="${ctx}/index">首页</a></li> <li><a href="${ctx}/index">首页</a></li>
<li>数据质量核查</li> <li>数据质量核查</li>
<li class="active">质量规则维护</li> <li class="active">数据质量规则维护</li>
</ol> </ol>
</div> </div>
<div id="main-container main-tab-container"> <div id="main-container main-tab-container">
...@@ -49,78 +49,121 @@ ...@@ -49,78 +49,121 @@
<div class="tab-pane fade in active" id="home"> <div class="tab-pane fade in active" id="home">
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="table-header">质量规则更新</div> <div class="table-header">数据质量规则更新</div>
<form action="#" class="form-horizontal" id="ruleMaintainForm" method="post" enctype="multipart/form-data"> <form action="#" class="form-horizontal" id="ruleUpdateForm" method="post">
<table id="ruleMaintainTable" class="table-null"> <table id="ruleMaintainTable" class="table-null">
<tr><td>省份(<font color="red">必填</font>):</td> <tr><td>省份(<font color="red">必填</font>):</td>
<td><tags:ProvinceTag /></td> <td>
<c:forEach var="province" items="${provinceList}">
<input type="checkbox" name="province" id="province" value="${province.provinceId}" checked>${province.provinceName}
</c:forEach>
</td>
</tr>
<tr><td>数据来源(<font color="red">必填</font>):</td>
<td>
<select class="form-control" name="dataSource" id="dataSource" >
<c:forEach var="dataSource" items="${dataSourceList}">
<c:if test="${dataSource.dataSourceId == '5'}">
<option value="${dataSource.dataSourceId}" selected>${dataSource.dataSourceName}</option>
</c:if >
<c:if test="${dataSource.dataSourceId != '5'}">
<option value="${dataSource.dataSourceId}" >${dataSource.dataSourceName}</option>
</c:if >
</c:forEach>
</select></td>
</tr> </tr>
<tr><td>渠道(<font color="red">必填</font>):</td> <tr><td>渠道(<font color="red">必填</font>):</td>
<td><tags:ChannelTag /></td> <td><select class="form-control" name="channel" id="channel" >
<c:forEach var="channel" items="${channelList}">
<c:if test="${channel.channelId == '7'}">
<option value="${channel.channelId}" selected>${channel.channelName}</option>
</c:if>
<c:if test="${channel.channelId != '7'}">
<option value="${channel.channelId}">${channel.channelName}</option>
</c:if>
</c:forEach>
</select></td>
</tr> </tr>
<tr><td>业务(<font color="red">必填</font>):</td> <tr><td>业务(<font color="red">必填</font>):</td>
<td><tags:BusinessTag /></td> <td >
</tr> <div id="businesstd"></div>
<tr><td>数据来源(<font color="red">必填</font>):</td>
<td><tags:DataSourceTag /></td> </td>
</tr> </tr>
<tr><td>数据采集频率(<font color="red">必填</font>):</td> <tr><td>数据采集频率(<font color="red">必填</font>):</td>
<td><select class="form-control" name="" id="" style="display: inline;"> <td><select class="form-control" name="calCycle" id="calCycle" style="display: inline;">
<option value="0">30分钟</option> <option value="30MI">30分钟</option>
<option value="1">1小时</option> <option value="01HR">1小时</option>
<option value="2">1天</option> <option value="01DY">1天</option>
<option value="3">1月</option> <option value="01MO">1月</option>
</select></td></tr>
<tr><td>指标检测时间(<font color="red">必填</font>):</td>
<td>
<div>
<input type="text" class="form-control" name="kpiMonitorTime" id="kpiMonitorTime" style="display: inline;" />
<select class="form-control" name="" id="" style="display: inline;">
<option value="0">分钟</option>
<option value="1">小时</option>
<option value="2"></option>
<option value="3"></option>
</select> </select>
</div></td> </td></tr>
<tr><td>指标(<font color="red">必填</font>):</td>
<td>
<div id="kpitd"></div>
</td>
</tr> </tr>
<tr><td>指标检测范围<font color="red">必填</font>):</td> <tr><td>指标监控时间<font color="red">必填</font>):</td>
<td> <td>
<div> <input type="text" style="width:200px" name="kpiMonitorTime" id="kpiMonitorTime" style="display: inline;" />
<input type="text" class="form-control" name="kpiMonitorRange" id="kpiMonitorRange" style="display: inline;" /> <select style="width:200px" name="kpiUnit" id="kpiUnit" style="display: inline;">
<select class="form-control" name="" id="" style="display: inline;">
<option value="0">分钟</option> <option value="0">分钟</option>
<option value="1">小时</option> <option value="1">小时</option>
<option value="2"></option> <option value="2"></option>
<option value="3"></option> <option value="3"></option>
</select> </select></td>
</div></td>
</tr> </tr>
<tr><td>完整性阈值(<font color="red">必填</font>):</td><td><input type='text' name='integrityThresholdValue' id='integrityThresholdValue' class="form-control" style="display: inline;"/></td></tr> <tr><td>指标采集时间(<font color="red">必填</font>):</td>
<tr><td>及时性阈值(<font color="red">必填</font>):</td><td><input type='text' name='timelinessThresholdValue' id='timelinessThresholdValue' class="form-control" style="display: inline;"/></td></tr> <td id="businessTimetd">
<tr><td>规则创建时间(<font color="red">必填</font>):</td><td><input type="text" class="form-control" id="ruleCrtTime" name="ruleCrtTime" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'ruleCrtTime\')}'})" /></td></tr> <input type='text' class='form-control' id='businessTime' name='businessTime' onfocus='WdatePicker({dateFmt:"yyyy-MM-dd HH:mm:00",readOnly:false,hmsMenuCfg : {H : [ 1, 6 ], m : [ 30, 2 ], s : [ 60, 0 ]}})'/>
<tr><td>规则更新时间(<font color="red">必填</font>):</td><td><input id="ruleUpdateTime" name="ruleUpdateTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'ruleUpdateTime\')}'})"> </td></tr> </td>
<tr><td>准确性规则:</td> </tr>
<td><select class="form-control" name="accuracyRule" id="accuracyRule" > <tr><td>添加准确性规则:</td>
<option value="0"></option> <td><table class="table table-hover table-striped" id="displayParam">
<thead>
<tr><th>规则类型</th><th>范围最大值</th><th>范围最小值</th><th>重复考核粒度</th><th>重复考核开始时间</th><th>重复考核结束时间</th><th>重复是否连续</th><th>重复最大次数</th><th>数据是否累计</th><th><a href="javascript:deleteAllTr()">删除所有规则</a></th></tr>
</thead>
<tbody id="addTr"></tbody>
</table></td></tr>
<tr><td>准确性规则类型:</td>
<td><select class="form-control" name="ruleType" id="ruleType" >
<option value=""></option>
<option value="1">范围类</option> <option value="1">范围类</option>
<option value="2">重复类</option> <option value="2">重复类</option>
</select></td></tr> </select></td></tr>
<tr class="range"><td>范围最大值:</td><td><input type="text" class="form-control" name="scopeMaxValue" id="scopeMaxValue" /></td></tr> <tr class="range"><td>范围最大值:</td><td><input type="text" class="form-control" name="scopeMaxValue" id="scopeMaxValue" /></td></tr>
<tr class="range"><td>范围最小值:</td><td><input type="text" class="form-control" name="scopeMinValue" id="scopeMinValue" /></td></tr> <tr class="range"><td>范围最小值:</td><td><input type="text" class="form-control" name="scopeMinValue" id="scopeMinValue" /></td></tr>
<tr class="repeate"><td>重复考核粒度:</td><td><input type='text' name='repeatedCheckGranularity' id='repeatedCheckGranularity' class="form-control" style="display: inline;"/></td></tr> <tr class="repeate"><td>重复考核粒度:</td>
<td><select class="form-control" name='repeatedCheckGranularity' id='repeatedCheckGranularity'>
<option value="day" selected></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> <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>
<tr class="repeate"><td>重复考核结束时间:</td><td><input id="repeatedCheckEndTime" name="repeatedCheckEndTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'repeatedCheckEndTime\')}'})"></td></tr> <tr class="repeate"><td>重复考核结束时间:</td><td><input id="repeatedCheckEndTime" name="repeatedCheckEndTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'repeatedCheckEndTime\')}'})"></td></tr>
<tr class="repeate"><td>重复是否连续:</td><td><input type='text' name='ifRepeatedCheckSeries' id='ifRepeatedCheckSeries' class="form-control" style="display: inline;"/></td></tr> <tr class="repeate"><td>重复是否连续:</td>
<td><select name='ifRepeatedCheckSeries' id='ifRepeatedCheckSeries' class="form-control">
<option value="1" selected></option>
<option value="0"></option>
</select>
</td></tr>
<tr class="repeate"><td>重复最大次数:</td><td><input type='text' name='repeatedCheckMaxTime' id='repeatedCheckMaxTime' class="form-control" style="display: inline;"/></td></tr> <tr class="repeate"><td>重复最大次数:</td><td><input type='text' name='repeatedCheckMaxTime' id='repeatedCheckMaxTime' class="form-control" style="display: inline;"/></td></tr>
<tr class="repeate"><td>数据是否累计:</td><td><input type='text' name='ifRepeatedCheckSummation' id='ifRepeatedCheckSummation' class="form-control" style="display: inline;"/></td></tr> <tr class="repeate"><td>数据是否累计:</td>
<td><select name='ifRepeatedCheckSummation' id='ifRepeatedCheckSummation' class="form-control">
<option value="1" selected></option>
<option value="0"></option>
</select>
</td></tr>
<tr><td></td>
<td><button type="button" id="addParam" class="btn btn-primary">添加规则</button></td></tr>
<tr><td></td><td><button type="button" id="ruleSubmit" class="btn btn-primary">确定</button> <tr><td></td><td><button type="button" id="ruleSubmit" class="btn btn-primary">确定</button>
<button type="reset" class="btn btn-default" id="ruleReset">清空</button>
<button type="reset" class="btn btn-warning" id="ruleBack">返回</button> <button type="reset" class="btn btn-warning" id="ruleBack">返回</button>
</td></tr> </td></tr>
</table> </table>
</form> </form>
<input type="hidden" id="kpi" name="kpi" value='${kpiList}' />
<input type="hidden" id="business" name="business" value='${businessList}' />
</div> </div>
</div> </div>
</div> </div>
...@@ -129,27 +172,387 @@ ...@@ -129,27 +172,387 @@
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(".range").hide(); $(".range").hide();
$(".repeate").hide(); $(".repeate").hide();
$("#accuracyRule").change(function (){ $("#addParam").hide();
var selectValue = $("#accuracyRule").val(); $("#ruleType").change(function (){
console.log(selectValue); var selectValue = $("#ruleType").val();
if (selectValue == 0){ if (selectValue == ""){
$(".range").hide(); $(".range").hide();
$(".repeate").hide(); $(".repeate").hide();
$("#addParam").hide();
} }
if (selectValue == 1){ if (selectValue == 1){
$(".repeate").hide(); $(".repeate").hide();
$(".range").show(); $(".range").show();
$("#addParam").show();
} }
if (selectValue == 2){ if (selectValue == 2){
$(".range").hide(); $(".range").hide();
$(".repeate").show(); $(".repeate").show();
$("#addParam").show();
}
});
//删除所有准确性规则
function deleteAllTr(){
$("#addTr").empty();
}
//删除一条准确性规则
function deleteRow(elementTag){
$(elementTag).parent().parent().remove();
}
//添加/修改准确性规则
$("#addParam").click(function(){
var ruleType= $("#ruleType").val();
var scopeMaxValue = $.trim($("#scopeMaxValue").val());
var scopeMinValue = $.trim($("#scopeMinValue").val());
var repeatedCheckGranularity = $.trim($("#repeatedCheckGranularity").val());
var repeatedCheckStartTime = $.trim($("#repeatedCheckStartTime").val());
var repeatedCheckEndTime = $.trim($("#repeatedCheckEndTime").val());
var ifRepeatedCheckSeries = $.trim($("#ifRepeatedCheckSeries").val());
var repeatedCheckMaxTime = $.trim($("#repeatedCheckMaxTime").val());
var ifRepeatedCheckSummation = $.trim($("#ifRepeatedCheckSummation").val());
if(ruleType == "1" || ruleType == "2"){
if(ruleType == "1"){
if(scopeMaxValue==""){$.alert("范围最大值不能为空");}
if(scopeMinValue==""){$.alert("范围最小值不能为空");}
repeatedCheckGranularity ="无";
repeatedCheckStartTime ="无";
repeatedCheckEndTime ="无";
ifRepeatedCheckSeries ="无";
repeatedCheckMaxTime ="无";
ifRepeatedCheckSummation ="无";
} else if(ruleType == "2"){
if(repeatedCheckGranularity==""){$.alert("重复考核粒度不能为空");}
if(repeatedCheckStartTime==""){$.alert("重复考核开始时间不能为空");}
if(repeatedCheckEndTime==""){$.alert("重复考核结束时间不能为空");}
if(ifRepeatedCheckSeries==""){$.alert("重复是否连续不能为空");}
if(repeatedCheckMaxTime==""){$.alert("重复最大次数不能为空");}
if(ifRepeatedCheckSummation==""){$.alert("数据是否累计不能为空");}
scopeMaxValue ="无";
scopeMinValue ="无";
}
if($("#addTr").find("tr.orange-tr").html()==null){
var addRow = $("<tr><td>"+ruleType+"</td><td>"+scopeMaxValue+"</td><td>"+scopeMinValue+"</td><td>"+repeatedCheckGranularity+"</td><td>"+repeatedCheckStartTime+"</td><td>"+repeatedCheckEndTime+"</td><td>"+ifRepeatedCheckSeries+"</td><td>"+repeatedCheckMaxTime+"</td><td>"+ifRepeatedCheckSummation+"</td><td><a href='javascript:;' title='' onclick='deleteRow(this)'>删除</a></td></tr>");
$("#addTr").append(addRow);
$("#ruleType").attr("value","");
$("#scopeMaxValue").attr("value","");
$("#scopeMinValue").attr("value","");
$("#repeatedCheckGranularity").attr("value","");
$("#repeatedCheckStartTime").attr("value","");
$("#repeatedCheckEndTime").attr("value","");
$("#ifRepeatedCheckSeries").attr("value","");
$("#repeatedCheckMaxTime").attr("value","");
$("#ifRepeatedCheckSummation").attr("value","");
}else{
var findTr = $("#addTr").find("tr.orange-tr");
$(findTr).find("td").eq(0).html(ruleType);
$(findTr).find("td").eq(1).html(scopeMaxValue);
$(findTr).find("td").eq(2).html(scopeMinValue);
$(findTr).find("td").eq(3).html(repeatedCheckGranularity);
$(findTr).find("td").eq(4).html(repeatedCheckStartTime);
$(findTr).find("td").eq(5).html(repeatedCheckEndTime);
$(findTr).find("td").eq(6).html(ifRepeatedCheckSeries);
$(findTr).find("td").eq(7).html(repeatedCheckMaxTime);
$(findTr).find("td").eq(8).html(ifRepeatedCheckSummation);
$("#addTr").find("tr").removeClass();
$("#addParam").text("添加规则");
} }
}) }
});
//form表单提交
$("#ruleSubmit").click(function(){
if($.trim($("#kpiMonitorTime").val())==""){
$.alert("指标监控时间不能为空");
}else if($("#businessTime").val()==""){
$.alert("指标业务时间不能为空");
}else if($("#ruleCrtTime").val()==""){
$.alert("规则创建时间不能为空");
}else if($("#ruleUpdateTime").val()==""){
$.alert("规则更新时间不能为空");
}else{
if($.trim($("#ruleType").val())=="1" || $.trim($("#ruleType").val())=="2"){
$.dialog({
title: "提醒",
content: "有准确性规则参数尚未添加,确定提交",
ok: function(){
$("#ruleSubmit").attr("disabled",true);
var i = $("#addTr").find("tr").size();
if(i==0){
var createForm=$("#ruleMaintainForm");
createForm.attr("action","${ctx}/AnalysisSupport/QualityRuleMaintain/saveRuleDataForm");
createForm.submit();
createForm.attr("action","#");
}else{
$("#addTr").find("tr").each(function(){
var ruleType = $(this).find("td").eq(0).html();
var scopeMaxValue = $(this).find("td").eq(1).html();
var scopeMinValue = $(this).find("td").eq(2).html();
var repeatedCheckGranularity = $(this).find("td").eq(3).html();
var repeatedCheckStartTime = $(this).find("td").eq(4).html();
var repeatedCheckEndTime = $(this).find("td").eq(5).html();
var ifRepeatedCheckSeries = $(this).find("td").eq(6).html();
var repeatedCheckMaxTime = $(this).find("td").eq(7).html();
var ifRepeatedCheckSummation = $(this).find("td").eq(8).html();
if(scopeMaxValue =="无"){scopeMaxValue ="";}
if(scopeMinValue =="无"){scopeMinValue ="";}
if(repeatedCheckGranularity =="无"){repeatedCheckGranularity ="";}
if(repeatedCheckStartTime =="无"){repeatedCheckStartTime ="";}
if(repeatedCheckEndTime ="无"){repeatedCheckEndTime ="";}
if(ifRepeatedCheckSeries =="无"){ifRepeatedCheckSeries ="";}
if(repeatedCheckMaxTime =="无"){repeatedCheckMaxTime ="";}
if(ifRepeatedCheckSummation =="无"){ifRepeatedCheckSummation ="";}
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/AnalysisSupport/QualityRuleMaintain/createAccuracyRule?ruleType="+ruleType+"&scopeMaxValue="+scopeMaxValue+"&scopeMinValue="+scopeMinValue+"&repeatedCheckGranularity="+repeatedCheckGranularity+"&repeatedCheckStartTime="+repeatedCheckStartTime+"&repeatedCheckEndTime="+repeatedCheckEndTime+"&scopeMinValue="+ifRepeatedCheckSeries+"&ifRepeatedCheckSeries="+repeatedCheckMaxTime+"&repeatedCheckMaxTime="+ifRepeatedCheckSummation+"&ifRepeatedCheckSummation=",
dataType : "text",
async: false,
beforeSend: function(data) {},
success: function(){
i--;
if(i==0){
var createForm=$("#ruleMaintainForm");
createForm.attr("action","${ctx}/AnalysisSupport/QualityRuleMaintain/saveRuleDataForm");
createForm.submit();
createForm.attr("action","#");
}
}
});
});
}
},
okValue: "确定",
cancel: function(){},
cancelValue: "取消",
});
}else{
$("#ruleSubmit").attr("disabled",true);
var i = $("#addTr").find("tr").size();
if(i==0){
var createForm=$("#ruleMaintainForm");
createForm.attr("action","${ctx}/AnalysisSupport/QualityRuleMaintain/saveRuleDataForm");
createForm.submit();
createForm.attr("action","#");
}else{
$("#addTr").find("tr").each(function(){
var ruleType = $(this).find("td").eq(0).html();
var scopeMaxValue = $(this).find("td").eq(1).html();
var scopeMinValue = $(this).find("td").eq(2).html();
var repeatedCheckGranularity = $(this).find("td").eq(3).html();
var repeatedCheckStartTime = $(this).find("td").eq(4).html();
var repeatedCheckEndTime = $(this).find("td").eq(5).html();
var ifRepeatedCheckSeries = $(this).find("td").eq(6).html();
var repeatedCheckMaxTime = $(this).find("td").eq(7).html();
var ifRepeatedCheckSummation = $(this).find("td").eq(8).html();
if(scopeMaxValue =="无"){scopeMaxValue ="";}
if(scopeMinValue =="无"){scopeMinValue ="";}
if(repeatedCheckGranularity =="无"){repeatedCheckGranularity ="";}
if(repeatedCheckStartTime =="无"){repeatedCheckStartTime ="";}
if(repeatedCheckEndTime ="无"){repeatedCheckEndTime ="";}
if(ifRepeatedCheckSeries =="无"){ifRepeatedCheckSeries ="";}
if(repeatedCheckMaxTime =="无"){repeatedCheckMaxTime ="";}
if(ifRepeatedCheckSummation =="无"){ifRepeatedCheckSummation ="";}
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/AnalysisSupport/QualityRuleMaintain/createAccuracyRule?ruleType="+ruleType+"&scopeMaxValue="+scopeMaxValue+"&scopeMinValue="+scopeMinValue+"&repeatedCheckGranularity="+encodeURIComponent(repeatedCheckGranularity)+"&repeatedCheckStartTime="+encodeURIComponent(repeatedCheckStartTime)+"&repeatedCheckEndTime="+encodeURIComponent(repeatedCheckEndTime)+"&ifRepeatedCheckSeries="+ifRepeatedCheckSeries+"&repeatedCheckMaxTime="+repeatedCheckMaxTime+"&ifRepeatedCheckSummation="+ifRepeatedCheckSummation,
dataType : "text",
async: false,
beforeSend: function(data) {},
success: function(){
i--;
if(i==0){
var createForm=$("#ruleMaintainForm");
createForm.attr("action","${ctx}/AnalysisSupport/QualityRuleMaintain/saveRuleDataForm");
createForm.submit();
createForm.attr("action","#");
}
}
});
});
}
}
}
});
$("#ruleBack").click(function(){
location.href="${ctx}/AnalysisSupport/QualityRuleResult";
});
function getProvinceCheckedValues() {
var provinceArray = new Array();
var i=0;
$("#province:checked").each(function(){
provinceArray[i]=$(this).val();
i++;
});
return provinceArray;
}
function getProvinceCheckedValuesString(){
var provinceStr="";
var provinceArray=getProvinceCheckedValues();
for(var i=0;i<provinceArray.length;i++){
if(i==provinceArray.length-1){
provinceStr+=provinceArray[i];
}else{
provinceStr+=provinceArray[i]+",";
}
}
return provinceStr;
}
var dataSourceValue =$("#dataSource").val();
var channelValue = $("#channel").val();
var businessIds = getBusinessCheckedValues();
var calCycleValue =$("#calCycle").val();
$("#dataSource").change(function(){
dataSourceValue = $("#dataSource").val();
updateBusiness(dataSourceValue,channelValue);
});
$("#channel").change(function(){
channelValue = $("#channel").val();
updateBusiness(dataSourceValue,channelValue);
});
function updateKpi(businessIds,calCycleValue){
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/AnalysisSupport/QualityRuleMaintain/findKpiId?businessIds="+businessIds+"&calCycleValue="+calCycleValue,
async: false,
beforeSend: function(data) {},
success: function(data){
var td = $("#kpitd");
td.empty();
data = JSON.parse(data)
data.forEach(function(t){
td.append("<input type='checkbox' name='kpiinput' class='kpiItem' value='"+t[0]+"' checked >"+t[1]+"</input>")
});
}
});
}
function updateBusiness(dataSource,channel){
$.ajax({
type : "GET",
contentType : "application/json",
url: "${ctx}/AnalysisSupport/QualityRuleMaintain/findBusinessId?dataSource="+dataSource+"&channel="+channel,
async: false,
beforeSend: function(data) {},
success: function(data){
var td = $("#businesstd");
var businessIds = new Array();
td.empty();
data = JSON.parse(data)
data.forEach(function(t){
td.append("<input type='checkbox' name='businessinput' class='businessItem' value='"+t[0]+"' checked >"+t[1]+"</input>")
businessIds+=t[0]+",";
});
updateKpi(businessIds,calCycleValue);
}
});
$(".businessItem").click(function(){
businessIds="";
$("[name='businessinput']:checked").each(function (){
businessIds += $(this).val()+",";
});
updateKpi(businessIds,calCycleValue);
});
}
$("#calCycle").change(function () {
calCycleValue=$("#calCycle").val();
$("[name='businessinput']:checked").each(function (){
businessIds += $(this).val()+",";
});
updateKpi(businessIds,calCycleValue)
updateBusinessTime(calCycleValue)
});
updateBusiness($("#dataSource").val(),$("#channel").val());
function updateBusinessTime(calCycleValue) {
$("#businessTimetd").empty()
if(calCycleValue == "30MI"){
$("#businessTimetd").append("<input type='text' class='form-control' id='businessTime' name='businessTime' onfocus='WdatePicker({dateFmt:\"yyyy-MM-dd HH:mm:00\",readOnly:false,hmsMenuCfg : {H : [ 1, 6 ], m : [ 30, 2 ], s : [ 60, 0 ]}})'/>");
}else if(calCycleValue == "01HR"){
$("#businessTimetd").append("<input type='text' class='form-control' id='businessTime' name='businessTime' onfocus='WdatePicker({dateFmt:\"yyyy-MM-dd HH:00:00\",readOnly:false,hmsMenuCfg : {H : [ 1, 6 ], m : [ 30, 2 ], s : [ 60, 0 ]}})'/>");
}else if(calCycleValue == "01DY"){
$("#businessTimetd").append("<input type='text' class='form-control' id='businessTime' name='businessTime' onfocus='WdatePicker({dateFmt:\"yyyy-MM-dd 00:00:00\",readOnly:false,hmsMenuCfg : {H : [ 24, 0 ], m : [ 60, 0 ], s : [ 60, 0 ]}})'/>");
}else if(calCycleValue == "01MO"){
$("#businessTimetd").append("<input type='text' class='form-control' id='businessTime' name='businessTime' onfocus='WdatePicker({dateFmt:\"yyyy-MM-01 00:00:00\",readOnly:false,hmsMenuCfg : {H : [ 24, 0 ], m : [ 60, 0 ], s : [ 60, 0 ]}})' />");
}
}
function getBusinessCheckedValues(){
var businessArray = new Array();
var i=0;
$("[name='businessinput']:checked").each(function(){
businessArray[i]=$(this).val();
i++;
});
return businessArray;
}
function getBusinessCheckedValuesString(){
var businessStr="";
var businessArray=getBusinessCheckedValues();
for(var i=0;i<businessArray.length;i++){
if(i==businessArray.length-1){
businessStr+=businessArray[i];
}else{
businessStr+=businessArray[i]+",";
}
}
return businessStr;
}
function getKpiCheckedValues(){
var kpiArray = new Array();
var i=0;
$("[name='kpiinput']:checked").each(function(){
kpiArray[i]=$(this).val();
i++;
});
return kpiArray;
}
function getKpiCheckedValuesString(){
var kpiStr="";
var kpiArray=getKpiCheckedValues();
for(var i=0;i<kpiArray.length;i++){
if(i==kpiArray.length-1){
kpiStr+=kpiArray[i];
}else{
kpiStr+=kpiArray[i]+",";
}
}
return kpiStr;
}
var provinceValue = getProvinceCheckedValuesString();
var businessValue = getBusinessCheckedValuesString();
var kpiValue = getKpiCheckedValuesString();
console.log("provinceValue:"+provinceValue+"businessValue:"+businessValue+"kpiValue:"+kpiValue)
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> <html>
<head> <head>
<title>质量规则维护</title> <title>数据质量规则维护</title>
<style> <style>
.table-null .table{ .table-null .table{
margin-bottom: 0px; margin-bottom: 0px;
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<ol class="breadcrumb"> <ol class="breadcrumb">
<li><a href="${ctx}/index">首页</a></li> <li><a href="${ctx}/index">首页</a></li>
<li>数据质量核查</li> <li>数据质量核查</li>
<li class="active">质量规则维护</li> <li class="active">数据质量规则维护</li>
</ol> </ol>
</div> </div>
<div id="main-container main-tab-container"> <div id="main-container main-tab-container">
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
<div class="tab-pane fade in active" id="home"> <div class="tab-pane fade in active" id="home">
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="table-header">质量规则上传</div> <div class="table-header">数据质量规则上传</div>
<form action="#" class="form-horizontal" id="ruleMaintainForm" method="post" enctype="multipart/form-data"> <form action="#" class="form-horizontal" id="ruleMaintainForm" method="post">
<table id="ruleMaintainTable" class="table-null"> <table id="ruleMaintainTable" class="table-null">
<tr><td>省份(<font color="red">必填</font>):</td> <tr><td>省份(<font color="red">必填</font>):</td>
<td> <td>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<tr><td>指标监控时间(<font color="red">必填</font>):</td> <tr><td>指标监控时间(<font color="red">必填</font>):</td>
<td> <td>
<input type="text" style="width:200px" name="kpiMonitorTime" id="kpiMonitorTime" style="display: inline;" /> <input type="text" style="width:200px" name="kpiMonitorTime" id="kpiMonitorTime" style="display: inline;" />
<select style="width:200px" name="kpiUnit" id="kpiUnit" style="display: inline;"> <select name="kpiUnit" id="kpiUnit">
<option value="0">分钟</option> <option value="0">分钟</option>
<option value="1">小时</option> <option value="1">小时</option>
<option value="2"></option> <option value="2"></option>
...@@ -127,12 +127,27 @@ ...@@ -127,12 +127,27 @@
</select></td></tr> </select></td></tr>
<tr class="range"><td>范围最大值:</td><td><input type="text" class="form-control" name="scopeMaxValue" id="scopeMaxValue" /></td></tr> <tr class="range"><td>范围最大值:</td><td><input type="text" class="form-control" name="scopeMaxValue" id="scopeMaxValue" /></td></tr>
<tr class="range"><td>范围最小值:</td><td><input type="text" class="form-control" name="scopeMinValue" id="scopeMinValue" /></td></tr> <tr class="range"><td>范围最小值:</td><td><input type="text" class="form-control" name="scopeMinValue" id="scopeMinValue" /></td></tr>
<tr class="repeate"><td>重复考核粒度:</td><td><input type='text' name='repeatedCheckGranularity' id='repeatedCheckGranularity' class="form-control" style="display: inline;"/></td></tr> <tr class="repeate"><td>重复考核粒度:</td>
<td><select class="form-control" name='repeatedCheckGranularity' id='repeatedCheckGranularity'>
<option value="day" selected></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> <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>
<tr class="repeate"><td>重复考核结束时间:</td><td><input id="repeatedCheckEndTime" name="repeatedCheckEndTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'repeatedCheckEndTime\')}'})"></td></tr> <tr class="repeate"><td>重复考核结束时间:</td><td><input id="repeatedCheckEndTime" name="repeatedCheckEndTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'repeatedCheckEndTime\')}'})"></td></tr>
<tr class="repeate"><td>重复是否连续:</td><td><input type='text' name='ifRepeatedCheckSeries' id='ifRepeatedCheckSeries' class="form-control" style="display: inline;"/></td></tr> <tr class="repeate"><td>重复是否连续:</td>
<td><select name='ifRepeatedCheckSeries' id='ifRepeatedCheckSeries' class="form-control">
<option value="1" selected></option>
<option value="0"></option>
</select>
</td></tr>
<tr class="repeate"><td>重复最大次数:</td><td><input type='text' name='repeatedCheckMaxTime' id='repeatedCheckMaxTime' class="form-control" style="display: inline;"/></td></tr> <tr class="repeate"><td>重复最大次数:</td><td><input type='text' name='repeatedCheckMaxTime' id='repeatedCheckMaxTime' class="form-control" style="display: inline;"/></td></tr>
<tr class="repeate"><td>数据是否累计:</td><td><input type='text' name='ifRepeatedCheckSummation' id='ifRepeatedCheckSummation' class="form-control" style="display: inline;"/></td></tr> <tr class="repeate"><td>数据是否累计:</td>
<td><select name='ifRepeatedCheckSummation' id='ifRepeatedCheckSummation' class="form-control">
<option value="1" selected></option>
<option value="0"></option>
</select>
</td></tr>
<tr><td></td> <tr><td></td>
<td><button type="button" id="addParam" class="btn btn-primary">添加规则</button></td></tr> <td><button type="button" id="addParam" class="btn btn-primary">添加规则</button></td></tr>
<tr><td></td><td><button type="button" id="ruleSubmit" class="btn btn-primary">确定</button> <tr><td></td><td><button type="button" id="ruleSubmit" class="btn btn-primary">确定</button>
...@@ -171,7 +186,78 @@ $("#ruleType").change(function (){ ...@@ -171,7 +186,78 @@ $("#ruleType").change(function (){
$(".repeate").show(); $(".repeate").show();
$("#addParam").show(); $("#addParam").show();
} }
}) });
//删除所有准确性规则
function deleteAllTr(){
$("#addTr").empty();
}
//删除一条准确性规则
function deleteRow(elementTag){
$(elementTag).parent().parent().remove();
}
//添加/修改准确性规则
$("#addParam").click(function(){
var ruleType= $("#ruleType").val();
var scopeMaxValue = $.trim($("#scopeMaxValue").val());
var scopeMinValue = $.trim($("#scopeMinValue").val());
var repeatedCheckGranularity = $.trim($("#repeatedCheckGranularity").val());
var repeatedCheckStartTime = $.trim($("#repeatedCheckStartTime").val());
var repeatedCheckEndTime = $.trim($("#repeatedCheckEndTime").val());
var ifRepeatedCheckSeries = $.trim($("#ifRepeatedCheckSeries").val());
var repeatedCheckMaxTime = $.trim($("#repeatedCheckMaxTime").val());
var ifRepeatedCheckSummation = $.trim($("#ifRepeatedCheckSummation").val());
if(ruleType == "1" || ruleType == "2"){
if(ruleType == "1"){
if(scopeMaxValue==""){$.alert("范围最大值不能为空");}
if(scopeMinValue==""){$.alert("范围最小值不能为空");}
repeatedCheckGranularity ="无";
repeatedCheckStartTime ="无";
repeatedCheckEndTime ="无";
ifRepeatedCheckSeries ="无";
repeatedCheckMaxTime ="无";
ifRepeatedCheckSummation ="无";
} else if(ruleType == "2"){
if(repeatedCheckGranularity==""){$.alert("重复考核粒度不能为空");}
if(repeatedCheckStartTime==""){$.alert("重复考核开始时间不能为空");}
if(repeatedCheckEndTime==""){$.alert("重复考核结束时间不能为空");}
if(ifRepeatedCheckSeries==""){$.alert("重复是否连续不能为空");}
if(repeatedCheckMaxTime==""){$.alert("重复最大次数不能为空");}
if(ifRepeatedCheckSummation==""){$.alert("数据是否累计不能为空");}
scopeMaxValue ="无";
scopeMinValue ="无";
}
if($("#addTr").find("tr.orange-tr").html()==null){
var addRow = $("<tr><td>"+ruleType+"</td><td>"+scopeMaxValue+"</td><td>"+scopeMinValue+"</td><td>"+repeatedCheckGranularity+"</td><td>"+repeatedCheckStartTime+"</td><td>"+repeatedCheckEndTime+"</td><td>"+ifRepeatedCheckSeries+"</td><td>"+repeatedCheckMaxTime+"</td><td>"+ifRepeatedCheckSummation+"</td><td><a href='javascript:;' title='' onclick='deleteRow(this)'>删除</a></td></tr>");
$("#addTr").append(addRow);
$("#ruleType").attr("value","");
$("#scopeMaxValue").attr("value","");
$("#scopeMinValue").attr("value","");
$("#repeatedCheckGranularity").attr("value","");
$("#repeatedCheckStartTime").attr("value","");
$("#repeatedCheckEndTime").attr("value","");
$("#ifRepeatedCheckSeries").attr("value","");
$("#repeatedCheckMaxTime").attr("value","");
$("#ifRepeatedCheckSummation").attr("value","");
}else{
var findTr = $("#addTr").find("tr.orange-tr");
$(findTr).find("td").eq(0).html(ruleType);
$(findTr).find("td").eq(1).html(scopeMaxValue);
$(findTr).find("td").eq(2).html(scopeMinValue);
$(findTr).find("td").eq(3).html(repeatedCheckGranularity);
$(findTr).find("td").eq(4).html(repeatedCheckStartTime);
$(findTr).find("td").eq(5).html(repeatedCheckEndTime);
$(findTr).find("td").eq(6).html(ifRepeatedCheckSeries);
$(findTr).find("td").eq(7).html(repeatedCheckMaxTime);
$(findTr).find("td").eq(8).html(ifRepeatedCheckSummation);
$("#addTr").find("tr").removeClass();
$("#addParam").text("添加规则");
}
}
});
//form表单提交 //form表单提交
$("#ruleSubmit").click(function(){ $("#ruleSubmit").click(function(){
...@@ -184,7 +270,7 @@ $("#ruleType").change(function (){ ...@@ -184,7 +270,7 @@ $("#ruleType").change(function (){
}else if($("#ruleUpdateTime").val()==""){ }else if($("#ruleUpdateTime").val()==""){
$.alert("规则更新时间不能为空"); $.alert("规则更新时间不能为空");
}else{ }else{
if($.trim($("#ruleType").val())!=""){ if($.trim($("#ruleType").val())=="1" || $.trim($("#ruleType").val())=="2"){
$.dialog({ $.dialog({
title: "提醒", title: "提醒",
content: "有准确性规则参数尚未添加,确定提交", content: "有准确性规则参数尚未添加,确定提交",
...@@ -209,6 +295,14 @@ $("#ruleType").change(function (){ ...@@ -209,6 +295,14 @@ $("#ruleType").change(function (){
var ifRepeatedCheckSeries = $(this).find("td").eq(6).html(); var ifRepeatedCheckSeries = $(this).find("td").eq(6).html();
var repeatedCheckMaxTime = $(this).find("td").eq(7).html(); var repeatedCheckMaxTime = $(this).find("td").eq(7).html();
var ifRepeatedCheckSummation = $(this).find("td").eq(8).html(); var ifRepeatedCheckSummation = $(this).find("td").eq(8).html();
if(scopeMaxValue =="无"){scopeMaxValue ="";}
if(scopeMinValue =="无"){scopeMinValue ="";}
if(repeatedCheckGranularity =="无"){repeatedCheckGranularity ="";}
if(repeatedCheckStartTime =="无"){repeatedCheckStartTime ="";}
if(repeatedCheckEndTime ="无"){repeatedCheckEndTime ="";}
if(ifRepeatedCheckSeries =="无"){ifRepeatedCheckSeries ="";}
if(repeatedCheckMaxTime =="无"){repeatedCheckMaxTime ="";}
if(ifRepeatedCheckSummation =="无"){ifRepeatedCheckSummation ="";}
$.ajax({ $.ajax({
type : "GET", type : "GET",
contentType : "application/json", contentType : "application/json",
...@@ -253,10 +347,18 @@ $("#ruleType").change(function (){ ...@@ -253,10 +347,18 @@ $("#ruleType").change(function (){
var ifRepeatedCheckSeries = $(this).find("td").eq(6).html(); var ifRepeatedCheckSeries = $(this).find("td").eq(6).html();
var repeatedCheckMaxTime = $(this).find("td").eq(7).html(); var repeatedCheckMaxTime = $(this).find("td").eq(7).html();
var ifRepeatedCheckSummation = $(this).find("td").eq(8).html(); var ifRepeatedCheckSummation = $(this).find("td").eq(8).html();
if(scopeMaxValue =="无"){scopeMaxValue ="";}
if(scopeMinValue =="无"){scopeMinValue ="";}
if(repeatedCheckGranularity =="无"){repeatedCheckGranularity ="";}
if(repeatedCheckStartTime =="无"){repeatedCheckStartTime ="";}
if(repeatedCheckEndTime ="无"){repeatedCheckEndTime ="";}
if(ifRepeatedCheckSeries =="无"){ifRepeatedCheckSeries ="";}
if(repeatedCheckMaxTime =="无"){repeatedCheckMaxTime ="";}
if(ifRepeatedCheckSummation =="无"){ifRepeatedCheckSummation ="";}
$.ajax({ $.ajax({
type : "GET", type : "GET",
contentType : "application/json", contentType : "application/json",
url: "${ctx}/AnalysisSupport/QualityRuleMaintain/createAccuracyRule?ruleType="+ruleType+"&scopeMaxValue="+scopeMaxValue+"&scopeMinValue="+scopeMinValue+"&repeatedCheckGranularity="+repeatedCheckGranularity+"&repeatedCheckStartTime="+repeatedCheckStartTime+"&repeatedCheckEndTime="+repeatedCheckEndTime+"&scopeMinValue="+ifRepeatedCheckSeries+"&ifRepeatedCheckSeries="+repeatedCheckMaxTime+"&repeatedCheckMaxTime="+ifRepeatedCheckSummation+"&ifRepeatedCheckSummation=", url: "${ctx}/AnalysisSupport/QualityRuleMaintain/createAccuracyRule?ruleType="+ruleType+"&scopeMaxValue="+scopeMaxValue+"&scopeMinValue="+scopeMinValue+"&repeatedCheckGranularity="+encodeURIComponent(repeatedCheckGranularity)+"&repeatedCheckStartTime="+encodeURIComponent(repeatedCheckStartTime)+"&repeatedCheckEndTime="+encodeURIComponent(repeatedCheckEndTime)+"&ifRepeatedCheckSeries="+ifRepeatedCheckSeries+"&repeatedCheckMaxTime="+repeatedCheckMaxTime+"&ifRepeatedCheckSummation="+ifRepeatedCheckSummation,
dataType : "text", dataType : "text",
async: false, async: false,
beforeSend: function(data) {}, beforeSend: function(data) {},
...@@ -382,7 +484,7 @@ updateBusiness($("#dataSource").val(),$("#channel").val()); ...@@ -382,7 +484,7 @@ updateBusiness($("#dataSource").val(),$("#channel").val());
function updateBusinessTime(calCycleValue) { function updateBusinessTime(calCycleValue) {
$("#businessTimetd").empty() $("#businessTimetd").empty()
if(calCycleValue == "30MI"){ if(calCycleValue == "30MI"){
$("#businessTimetd").append("<input type='text' class='form-control' id='businessTime' name='businessTime' onfocus='WdatePicker({dateFmt:\"yyyy-MM-dd HH:mm:00\",readOnly:false,hmsMenuCfg : {H : [ 1, 6 ], m : [ 30, 2 ], s : [ 60, 0 ]}})'/>"); $("#businessTimetd").append("<input type='text' class='form-control' id='businessTime' name='businessTime' onfocus='WdatePicker({dateFmt:\"yyyy-MM-dd HH:mm:00\",readOnly:false,hmsMenuCfg : {H : [ 1, 6 ], m : [ 30, 2 ], s : [ 60, 0 ]},'minDate:HH:00:00','maxDate:HH:30:00'})'/>");
}else if(calCycleValue == "01HR"){ }else if(calCycleValue == "01HR"){
$("#businessTimetd").append("<input type='text' class='form-control' id='businessTime' name='businessTime' onfocus='WdatePicker({dateFmt:\"yyyy-MM-dd HH:00:00\",readOnly:false,hmsMenuCfg : {H : [ 1, 6 ], m : [ 30, 2 ], s : [ 60, 0 ]}})'/>"); $("#businessTimetd").append("<input type='text' class='form-control' id='businessTime' name='businessTime' onfocus='WdatePicker({dateFmt:\"yyyy-MM-dd HH:00:00\",readOnly:false,hmsMenuCfg : {H : [ 1, 6 ], m : [ 30, 2 ], s : [ 60, 0 ]}})'/>");
}else if(calCycleValue == "01DY"){ }else if(calCycleValue == "01DY"){
...@@ -441,7 +543,6 @@ function getKpiCheckedValuesString(){ ...@@ -441,7 +543,6 @@ function getKpiCheckedValuesString(){
var provinceValue = getProvinceCheckedValuesString(); var provinceValue = getProvinceCheckedValuesString();
var businessValue = getBusinessCheckedValuesString(); var businessValue = getBusinessCheckedValuesString();
var kpiValue = getKpiCheckedValuesString(); var kpiValue = getKpiCheckedValuesString();
console.log("provinceValue:"+provinceValue+"businessValue:"+businessValue+"kpiValue:"+kpiValue)
</script> </script>
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
ruleOperationDetailTable(); ruleOperationDetailTable();
function operResultSubmit(){ function operResultSubmit(){
var period=getPeriodStr(); var period=getPeriodStr()
var dataSource=getStatsDataSourceCheckedValuesString(); var dataSource=getStatsDataSourceCheckedValuesString();
var chnnal=getStatsChannelCheckedValuesString(); var chnnal=getStatsChannelCheckedValuesString();
var bussines=getStatsBusinessCheckedValuesString(); var bussines=getStatsBusinessCheckedValuesString();
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
$.ajax({ $.ajax({
type : 'GET', type : 'GET',
contentType : 'application/json', contentType : 'application/json',
url: "${ctx}/AnalysisSupport/QualityRuleOperation/changeTable?period="+period+"&province="+province+"&dataSource="+dataSource+"&chnnal="+chnnal+"&bussines="+bussines+"&ifFilter="+ifFilter, url: "${ctx}/AnalysisSupport/QualityRuleOperation/operationChangeTable?period="+period+"&province="+province+"&dataSource="+dataSource+"&chnnal="+chnnal+"&bussines="+bussines+"&ifFilter="+ifFilter,
dataType : 'text', dataType : 'text',
async: false, async: false,
beforeSend: function(data) { beforeSend: function(data) {
......
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