Commit b86ba305 authored by 赵建伟's avatar 赵建伟

add vis codes

parent 182d895a
...@@ -20,7 +20,7 @@ public class DqmpApplication extends WebMvcConfigurationSupport{ ...@@ -20,7 +20,7 @@ public class DqmpApplication extends WebMvcConfigurationSupport{
@Override @Override
public void addResourceHandlers(ResourceHandlerRegistry registry) { public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/templates/static/**").addResourceLocations(ResourceUtils.CLASSPATH_URL_PREFIX+"/templates/static/"); registry.addResourceHandler("/templates/**").addResourceLocations(ResourceUtils.CLASSPATH_URL_PREFIX+"/templates/");
} }
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -17,6 +17,6 @@ public class BaseController { ...@@ -17,6 +17,6 @@ public class BaseController {
}else { }else {
model.addAttribute("result", msg); model.addAttribute("result", msg);
} }
return "result"; return "view/result";
} }
} }
...@@ -7,24 +7,51 @@ import org.springframework.stereotype.Controller; ...@@ -7,24 +7,51 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import com.gmei.data.dqmp.service.DashbordService;
import com.gmei.data.dqmp.service.DqRuleService; import com.gmei.data.dqmp.service.DqRuleService;
import com.gmei.data.dqmp.service.ThresholdExceedAllService;
import com.gmei.data.dqmp.vo.DashbordVo;
import com.gmei.data.dqmp.vo.DqReferRuleVo; import com.gmei.data.dqmp.vo.DqReferRuleVo;
import com.gmei.data.dqmp.vo.DqSpecialRuleVo; import com.gmei.data.dqmp.vo.DqSpecialRuleVo;
import com.gmei.data.dqmp.vo.DqUnblankRuleVo; import com.gmei.data.dqmp.vo.DqUnblankRuleVo;
import com.gmei.data.dqmp.vo.DqUniqueRuleVo; import com.gmei.data.dqmp.vo.DqUniqueRuleVo;
import com.gmei.data.dqmp.vo.DqVolatilityRuleVo; import com.gmei.data.dqmp.vo.DqVolatilityRuleVo;
import com.gmei.data.dqmp.vo.ThresholdExceedAllVo;
@Controller @Controller
public class IndexController { public class IndexController {
@Autowired @Autowired
private DqRuleService dqRuleService; private DqRuleService dqRuleService;
@Autowired
private DashbordService dashbordService;
@Autowired
private ThresholdExceedAllService thresholdExceedAllService;
@GetMapping("/")
public String index() {
return "index";
}
@GetMapping("/view")
public String demo(Model model) {
DashbordVo dashbordInfo = dashbordService.getDashbordInfo();
model.addAttribute("volatilityLegendData",dashbordInfo.getVolatilityLegendData());
model.addAttribute("volatilitySeriesData",dashbordInfo.getVolatilitySeriesData());
model.addAttribute("specialLegendData",dashbordInfo.getSpecialLegendData());
model.addAttribute("specialSeriesData",dashbordInfo.getSpecialSeriesData());
List<ThresholdExceedAllVo> thresholdExceedAllList = thresholdExceedAllService.getThresholdExceedAllList();
model.addAttribute("thresholdExceedAllList",thresholdExceedAllList);
return "view/dashbord";
}
/** /**
* 首页中功能列表 * 首页中功能列表
*
* @param model * @param model
* @return * @return
*/ */
@GetMapping("/") @GetMapping("/manage")
public String index(Model model) { public String index(Model model) {
List<DqUniqueRuleVo> uniqueList = dqRuleService.findUniqueDqRuleList(); List<DqUniqueRuleVo> uniqueList = dqRuleService.findUniqueDqRuleList();
List<DqUnblankRuleVo> unblankList = dqRuleService.findUnblankDqRuleList(); List<DqUnblankRuleVo> unblankList = dqRuleService.findUnblankDqRuleList();
...@@ -36,12 +63,7 @@ public class IndexController { ...@@ -36,12 +63,7 @@ public class IndexController {
model.addAttribute("referList", referList); model.addAttribute("referList", referList);
model.addAttribute("volatilityList", volatilityList); model.addAttribute("volatilityList", volatilityList);
model.addAttribute("specialList", specialList); model.addAttribute("specialList", specialList);
return "index"; return "view/manage";
}
@GetMapping("/demo")
public String demo(Model model) {
return "static/demo";
} }
} }
package com.gmei.data.dqmp.domain;
public class TblThresholdExceedAll {
private Integer id;
private String checkType;
private String dbName;
private String tbName;
private String colName;
private Long allNum;
private Long checkNum;
private Double checkRate;
private String partitionDate;
private Integer sqlId;
private String createTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getCheckType() {
return checkType;
}
public void setCheckType(String checkType) {
this.checkType = checkType == null ? null : checkType.trim();
}
public String getDbName() {
return dbName;
}
public void setDbName(String dbName) {
this.dbName = dbName == null ? null : dbName.trim();
}
public String getTbName() {
return tbName;
}
public void setTbName(String tbName) {
this.tbName = tbName == null ? null : tbName.trim();
}
public String getColName() {
return colName;
}
public void setColName(String colName) {
this.colName = colName == null ? null : colName.trim();
}
public Long getAllNum() {
return allNum;
}
public void setAllNum(Long allNum) {
this.allNum = allNum;
}
public Long getCheckNum() {
return checkNum;
}
public void setCheckNum(Long checkNum) {
this.checkNum = checkNum;
}
public Double getCheckRate() {
return checkRate;
}
public void setCheckRate(Double checkRate) {
this.checkRate = checkRate;
}
public String getPartitionDate() {
return partitionDate;
}
public void setPartitionDate(String partitionDate) {
this.partitionDate = partitionDate == null ? null : partitionDate.trim();
}
public Integer getSqlId() {
return sqlId;
}
public void setSqlId(Integer sqlId) {
this.sqlId = sqlId;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime == null ? null : createTime.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", checkType=").append(checkType);
sb.append(", dbName=").append(dbName);
sb.append(", tbName=").append(tbName);
sb.append(", colName=").append(colName);
sb.append(", allNum=").append(allNum);
sb.append(", checkNum=").append(checkNum);
sb.append(", checkRate=").append(checkRate);
sb.append(", partitionDate=").append(partitionDate);
sb.append(", sqlId=").append(sqlId);
sb.append(", createTime=").append(createTime);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.gmei.data.dqmp.mapper;
import com.gmei.data.dqmp.domain.TblThresholdExceedAll;
import com.gmei.data.dqmp.domain.TblThresholdExceedAllCriteria;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TblThresholdExceedAllMapper {
int countByExample(TblThresholdExceedAllCriteria example);
int deleteByExample(TblThresholdExceedAllCriteria example);
int deleteByPrimaryKey(Integer id);
int insert(TblThresholdExceedAll record);
int insertSelective(TblThresholdExceedAll record);
List<TblThresholdExceedAll> selectByExample(TblThresholdExceedAllCriteria example);
TblThresholdExceedAll selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") TblThresholdExceedAll record, @Param("example") TblThresholdExceedAllCriteria example);
int updateByExample(@Param("record") TblThresholdExceedAll record, @Param("example") TblThresholdExceedAllCriteria example);
int updateByPrimaryKeySelective(TblThresholdExceedAll record);
int updateByPrimaryKey(TblThresholdExceedAll record);
}
\ No newline at end of file
package com.gmei.data.dqmp.service;
import com.gmei.data.dqmp.vo.DashbordVo;
public interface DashbordService {
DashbordVo getDashbordInfo();
}
package com.gmei.data.dqmp.service;
import java.util.List;
import com.alibaba.fastjson.JSONObject;
import com.gmei.data.dqmp.vo.ThresholdExceedAllVo;
public interface ThresholdExceedAllService {
boolean persistThresholdExceedAll(JSONObject jsonObject);
List<ThresholdExceedAllVo> getThresholdExceedAllList();
}
...@@ -12,6 +12,8 @@ import org.slf4j.LoggerFactory; ...@@ -12,6 +12,8 @@ import org.slf4j.LoggerFactory;
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 com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gmei.data.dqmp.common.Constants; import com.gmei.data.dqmp.common.Constants;
import com.gmei.data.dqmp.domain.TblResultCheckRefer; import com.gmei.data.dqmp.domain.TblResultCheckRefer;
import com.gmei.data.dqmp.domain.TblResultCheckUnblank; import com.gmei.data.dqmp.domain.TblResultCheckUnblank;
...@@ -29,6 +31,7 @@ import com.gmei.data.dqmp.pool.JdbcConnectPool; ...@@ -29,6 +31,7 @@ import com.gmei.data.dqmp.pool.JdbcConnectPool;
import com.gmei.data.dqmp.service.CheckService; import com.gmei.data.dqmp.service.CheckService;
import com.gmei.data.dqmp.service.DingdingService; import com.gmei.data.dqmp.service.DingdingService;
import com.gmei.data.dqmp.service.MailService; import com.gmei.data.dqmp.service.MailService;
import com.gmei.data.dqmp.service.ThresholdExceedAllService;
import com.gmei.data.dqmp.utils.CrontabUtils; import com.gmei.data.dqmp.utils.CrontabUtils;
import com.gmei.data.dqmp.utils.DateUtils; import com.gmei.data.dqmp.utils.DateUtils;
...@@ -49,6 +52,8 @@ public class CheckServiceImpl implements CheckService { ...@@ -49,6 +52,8 @@ public class CheckServiceImpl implements CheckService {
private MailService mailService; private MailService mailService;
@Autowired @Autowired
private DingdingService dingdingService; private DingdingService dingdingService;
@Autowired
private ThresholdExceedAllService thresholdExceedAllService;
private static final Logger logger = LoggerFactory.getLogger(CheckServiceImpl.class); private static final Logger logger = LoggerFactory.getLogger(CheckServiceImpl.class);
/** /**
...@@ -82,6 +87,9 @@ public class CheckServiceImpl implements CheckService { ...@@ -82,6 +87,9 @@ public class CheckServiceImpl implements CheckService {
if(null != uniqueRate && uniqueRate < threshold) { if(null != uniqueRate && uniqueRate < threshold) {
mailService.sendSimpleMail(uniqueCheckResult.toString()); mailService.sendSimpleMail(uniqueCheckResult.toString());
dingdingService.sendMsgToDingding(uniqueCheckResult.toString()); dingdingService.sendMsgToDingding(uniqueCheckResult.toString());
JSONObject parseObject = JSONObject.parseObject(JSON.toJSONString(uniqueCheckResult));
parseObject.put("checkType", Constants.CHECK_UNIQUE);
thresholdExceedAllService.persistThresholdExceedAll(parseObject);
} }
} }
uniqueCheckResult.setSqlId(id); uniqueCheckResult.setSqlId(id);
...@@ -96,6 +104,9 @@ public class CheckServiceImpl implements CheckService { ...@@ -96,6 +104,9 @@ public class CheckServiceImpl implements CheckService {
if(null != unblankRate && unblankRate < threshold) { if(null != unblankRate && unblankRate < threshold) {
mailService.sendSimpleMail(tblResultCheckUnblank.toString()); mailService.sendSimpleMail(tblResultCheckUnblank.toString());
dingdingService.sendMsgToDingding(tblResultCheckUnblank.toString()); dingdingService.sendMsgToDingding(tblResultCheckUnblank.toString());
JSONObject parseObject = JSONObject.parseObject(JSON.toJSONString(tblResultCheckUnblank));
parseObject.put("checkType", Constants.CHECK_UNBLANK);
thresholdExceedAllService.persistThresholdExceedAll(parseObject);
} }
} }
tblResultCheckUnblank.setSqlId(id); tblResultCheckUnblank.setSqlId(id);
...@@ -143,6 +154,9 @@ public class CheckServiceImpl implements CheckService { ...@@ -143,6 +154,9 @@ public class CheckServiceImpl implements CheckService {
if(null != matchedRate && matchedRate < threshold) { if(null != matchedRate && matchedRate < threshold) {
mailService.sendSimpleMail(referCheckResult.toString()); mailService.sendSimpleMail(referCheckResult.toString());
dingdingService.sendMsgToDingding(referCheckResult.toString()); dingdingService.sendMsgToDingding(referCheckResult.toString());
JSONObject parseObject = JSONObject.parseObject(JSON.toJSONString(referCheckResult));
parseObject.put("checkType", Constants.CHECK_REFER);
thresholdExceedAllService.persistThresholdExceedAll(parseObject);
} }
} }
referCheckResult.setSqlId(id); referCheckResult.setSqlId(id);
......
package com.gmei.data.dqmp.service.impl;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gmei.data.dqmp.domain.TblResultMonitorSpecial;
import com.gmei.data.dqmp.domain.TblResultMonitorSpecialCriteria;
import com.gmei.data.dqmp.domain.TblResultMonitorVolatility;
import com.gmei.data.dqmp.domain.TblResultMonitorVolatilityCriteria;
import com.gmei.data.dqmp.mapper.TblResultMonitorSpecialMapper;
import com.gmei.data.dqmp.mapper.TblResultMonitorVolatilityMapper;
import com.gmei.data.dqmp.service.DashbordService;
import com.gmei.data.dqmp.vo.DashbordVo;
@Service
public class DashbordServiceImpl implements DashbordService {
@Autowired
private TblResultMonitorVolatilityMapper tblResultMonitorVolatilityMapper;
@Autowired
private TblResultMonitorSpecialMapper tblResultMonitorSpecialMapper;
@Override
public DashbordVo getDashbordInfo() {
DashbordVo dashbordVo = new DashbordVo();
List<String> volatilityLegendData = new ArrayList<String>();
List<Long> volatilitySeriesData = new ArrayList<Long>();
TblResultMonitorVolatilityCriteria example = new TblResultMonitorVolatilityCriteria();
example.createCriteria().andSqlIdEqualTo(1);
List<TblResultMonitorVolatility> selectByExample = tblResultMonitorVolatilityMapper.selectByExample(example);
for(TblResultMonitorVolatility tblResultMonitorVolatility : selectByExample) {
volatilityLegendData.add(tblResultMonitorVolatility.getPartitionDate());
volatilitySeriesData.add(tblResultMonitorVolatility.getIndicatorValue());
}
dashbordVo.setVolatilityLegendData(volatilityLegendData);
dashbordVo.setVolatilitySeriesData(volatilitySeriesData);
List<String> specialLegendData = new ArrayList<String>();
List<Long> specialSeriesData = new ArrayList<Long>();
TblResultMonitorSpecialCriteria tblResultMonitorSpecialCriteria = new TblResultMonitorSpecialCriteria();
tblResultMonitorSpecialCriteria.createCriteria()
.andDbNameEqualTo("online")
.andTbNameEqualTo("tl_finance_financeexpand_view")
.andTimeColNameEqualTo("flow_time")
.andIndicatorTypeEqualTo("PV");
List<TblResultMonitorSpecial> specialList = tblResultMonitorSpecialMapper.selectByExample(tblResultMonitorSpecialCriteria);
for(TblResultMonitorSpecial tblResultMonitorSpecial : specialList) {
specialLegendData.add(tblResultMonitorSpecial.getPartitionDate());
specialSeriesData.add(tblResultMonitorSpecial.getIndicatorValue());
}
dashbordVo.setSpecialLegendData(specialLegendData);
dashbordVo.setSpecialSeriesData(specialSeriesData);
return dashbordVo;
}
}
package com.gmei.data.dqmp.service.impl;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gmei.data.dqmp.common.Constants;
import com.gmei.data.dqmp.domain.TblThresholdExceedAll;
import com.gmei.data.dqmp.domain.TblThresholdExceedAllCriteria;
import com.gmei.data.dqmp.mapper.TblThresholdExceedAllMapper;
import com.gmei.data.dqmp.service.ThresholdExceedAllService;
import com.gmei.data.dqmp.utils.BeanUtils;
import com.gmei.data.dqmp.vo.ThresholdExceedAllVo;
@Service
public class ThresholdExceedAllServiceImpl implements ThresholdExceedAllService {
@Autowired
private TblThresholdExceedAllMapper tblThresholdExceedAllMapper;
private static final Logger logger = LoggerFactory.getLogger(ThresholdExceedAllServiceImpl.class);
@Override
public boolean persistThresholdExceedAll(JSONObject jsonObject) {
boolean rs = false;
TblThresholdExceedAll tblThresholdExceedAll = JSON.toJavaObject(jsonObject, TblThresholdExceedAll.class);
String checkType = jsonObject.getString("checkType");
if (null != checkType) {
if (Constants.CHECK_UNIQUE.equals(checkType)) {
tblThresholdExceedAll.setCheckNum(jsonObject.getLong("unique_num"));
tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("unique_rate"));
} else if (Constants.CHECK_UNBLANK.equals(checkType)) {
tblThresholdExceedAll.setCheckNum(jsonObject.getLong("unblank_num"));
tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("unblank_rate"));
} else if (Constants.CHECK_REFER.equals(checkType)) {
tblThresholdExceedAll.setDbName(jsonObject.getString("check_db_name"));
tblThresholdExceedAll.setTbName(jsonObject.getString("check_tb_name"));
tblThresholdExceedAll.setColName(jsonObject.getString("check_col_name"));
tblThresholdExceedAll.setCheckNum(jsonObject.getLong("matched_num"));
tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("matched_rate"));
} else {
logger.error("checkType params is error: {}", checkType);
}
} else {
logger.error("checkType params is null!");
}
int insertSelective = tblThresholdExceedAllMapper.insertSelective(tblThresholdExceedAll);
if (1 == insertSelective) {
rs = true;
} else {
logger.error("insert tblThresholdExceedAll failed!");
}
return rs;
}
@Override
public List<ThresholdExceedAllVo> getThresholdExceedAllList() {
List<ThresholdExceedAllVo> rsList = new ArrayList<ThresholdExceedAllVo>();
TblThresholdExceedAllCriteria example = new TblThresholdExceedAllCriteria();
List<TblThresholdExceedAll> list = tblThresholdExceedAllMapper.selectByExample(example);
for (TblThresholdExceedAll tblThresholdExceedAll : list) {
ThresholdExceedAllVo thresholdExceedAllVo = BeanUtils.map(tblThresholdExceedAll,ThresholdExceedAllVo.class);
String checkType = thresholdExceedAllVo.getCheckType();
if (Constants.CHECK_UNIQUE.equals(checkType)) {
thresholdExceedAllVo.setCheckType("唯一性校验");
} else if (Constants.CHECK_UNBLANK.equals(checkType)) {
thresholdExceedAllVo.setCheckType("非空性校验");
} else if (Constants.CHECK_REFER.equals(checkType)) {
thresholdExceedAllVo.setCheckType("参照性校验");
} else {
logger.error("check type is error: {}",checkType);
}
rsList.add(thresholdExceedAllVo);
}
return rsList;
}
}
package com.gmei.data.dqmp.vo;
import java.util.List;
import lombok.Data;
@Data
public class DashbordVo {
private List<String> volatilityLegendData;
private List<Long> volatilitySeriesData;
private List<String> specialLegendData;
private List<Long> specialSeriesData;
}
package com.gmei.data.dqmp.vo;
import lombok.Data;
@Data
public class ThresholdExceedAllVo {
private Integer id;
private String checkType;
private String dbName;
private String tbName;
private String colName;
private Long allNum;
private Long checkNum;
private Double checkRate;
private String partitionDate;
private Integer sqlId;
private String createTime;
}
...@@ -41,10 +41,10 @@ ...@@ -41,10 +41,10 @@
<table tableName="tbl_sql_monitor_volatility" domainObjectName="TblSqlMonitorVolatility"/> <table tableName="tbl_sql_monitor_volatility" domainObjectName="TblSqlMonitorVolatility"/>
<table tableName="tbl_sql_monitor_special" domainObjectName="TblSqlMonitorSpecial"/> --> <table tableName="tbl_sql_monitor_special" domainObjectName="TblSqlMonitorSpecial"/> -->
<!-- <table tableName="tbl_result_check_unique" domainObjectName="TblResultCheckUnique"/> --> <!-- <table tableName="tbl_result_check_unique" domainObjectName="TblResultCheckUnique"/> -->
<table tableName="tbl_result_check_unblank" domainObjectName="TblResultCheckUnblank"/> <!-- <table tableName="tbl_result_check_unblank" domainObjectName="TblResultCheckUnblank"/>
<table tableName="tbl_result_check_refer" domainObjectName="TblResultCheckRefer"/> <table tableName="tbl_result_check_refer" domainObjectName="TblResultCheckRefer"/>
<table tableName="tbl_result_monitor_volatility" domainObjectName="TblResultMonitorVolatility"/> <table tableName="tbl_result_monitor_volatility" domainObjectName="TblResultMonitorVolatility"/>
<table tableName="tbl_result_monitor_special" domainObjectName="TblResultMonitorSpecial"/> <table tableName="tbl_result_monitor_special" domainObjectName="TblResultMonitorSpecial"/> -->
<!-- <table tableName="tbl_indicator_operator_info" domainObjectName="TblIndicatorOperatorInfo"/> --> <!-- <table tableName="tbl_indicator_operator_info" domainObjectName="TblIndicatorOperatorInfo"/> -->
<!-- <table tableName="tbl_rule_template" domainObjectName="TblRuleTemplate"/> --> <!-- <table tableName="tbl_rule_template" domainObjectName="TblRuleTemplate"/> -->
<!-- <table tableName="tbl_rule_info_simple" domainObjectName="TblRuleInfoSimple"> <!-- <table tableName="tbl_rule_info_simple" domainObjectName="TblRuleInfoSimple">
...@@ -54,5 +54,6 @@ ...@@ -54,5 +54,6 @@
<generatedKey column="id" sqlStatement="MySql" identity="true"/> <generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table> --> </table> -->
<!-- <table tableName="tbl_sys_param_info" domainObjectName="TblSysParamInfo"/> --> <!-- <table tableName="tbl_sys_param_info" domainObjectName="TblSysParamInfo"/> -->
<table tableName="tbl_threshold_exceed_all" domainObjectName="TblThresholdExceedAll"/>
</context> </context>
</generatorConfiguration> </generatorConfiguration>
...@@ -17,206 +17,23 @@ ...@@ -17,206 +17,23 @@
<div style="text-align: center"> <div style="text-align: center">
<h1>数据质量管理平台</h1> <h1>数据质量管理平台</h1>
<hr></hr> <hr></hr>
<h2>数据质量规则导入</h2> <br>
<form action="/excel/importUnique" method="post" <br>
enctype="multipart/form-data"> <br>
<input type="file" name="file"></input> <a rel="external nofollow" href="/view">数据质量仪表盘</a>
<button type="submit">唯一性质量规则上传</button> <br>
</form> <br>
<form action="/excel/importUnblank" method="post" <br>
enctype="multipart/form-data"> <a rel="external nofollow" href="/manage">数据质量规则管理</a>
<input type="file" name="file"></input> <br>
<button type="submit">非空性质量规则上传</button> <br>
</form> <br>
<form action="/excel/importRefer" method="post" <br>
enctype="multipart/form-data"> <br>
<input type="file" name="file"></input> <br>
<button type="submit">参照性质量规则上传</button> <br>
</form> <br>
<form action="/excel/importVolatility" method="post" <br>
enctype="multipart/form-data">
<input type="file" name="file"></input>
<button type="submit">波动性质量规则上传</button>
</form>
<form action="/excel/importSpecial" method="post"
enctype="multipart/form-data">
<input type="file" name="file"></input>
<button type="submit">特殊性质量规则上传</button>
</form>
<hr></hr>
<h2>数据质量规则列表查询</h2>
<h3>唯一性校验规则列表</h3>
<div class="tableCenter">
<table class="table" style="table-layout: fixed;" border="1">
<tr>
<th>序号</th>
<th>数据库名</th>
<th>数据表名</th>
<th>数据列名</th>
<th>过滤条件</th>
<th>预警阈值</th>
<th>当前状态</th>
<th>校验时间</th>
<th>备注</th>
<th>操作</th>
</tr>
<tr th:each="dqRule,dqRuleStat : ${uniqueList}">
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th th:text="${dqRule.id}"></th>
<td th:text="${dqRule.dbName}"></td>
<td th:text="${dqRule.tbName}"></td>
<th th:text="${dqRule.colName}"></th>
<th th:text="${dqRule.filters}"></th>
<th th:text="${dqRule.threshold}"></th>
<th th:text="${dqRule.status}"></th>
<th th:text="${dqRule.checkTime}"></th>
<th th:text="${dqRule.comment}"></th>
<td><a
th:href="@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}">删除</a></td>
</tr>
</table>
</div>
<h3>非空性校验规则列表</h3>
<div class="tableCenter">
<table class="table" style="table-layout: fixed;" border="1">
<tr>
<th>序号</th>
<th>数据库名</th>
<th>数据表名</th>
<th>数据列名</th>
<th>过滤条件</th>
<th>预警阈值</th>
<th>当前状态</th>
<th>校验时间</th>
<th>备注</th>
<th>操作</th>
</tr>
<tr th:each="dqRule,dqRuleStat : ${unblankList}">
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th th:text="${dqRule.id}"></th>
<td th:text="${dqRule.dbName}"></td>
<td th:text="${dqRule.tbName}"></td>
<th th:text="${dqRule.colName}"></th>
<th th:text="${dqRule.filters}"></th>
<th th:text="${dqRule.threshold}"></th>
<th th:text="${dqRule.status}"></th>
<th th:text="${dqRule.checkTime}"></th>
<th th:text="${dqRule.comment}"></th>
<td><a
th:href="@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}">删除</a></td>
</tr>
</table>
</div>
<h3>参照性校验规则列表</h3>
<div class="tableCenter">
<table class="table" style="table-layout: fixed;" border="1">
<tr>
<th>序号</th>
<th>校验数据库名</th>
<th>校验数据表名</th>
<th>校验数据列名</th>
<th>校验过滤条件</th>
<th>参照数据库名</th>
<th>参照数据表名</th>
<th>参照数据列名</th>
<th>参照过滤条件</th>
<th>预警阈值</th>
<th>当前状态</th>
<th>校验时间</th>
<th>备注</th>
<th>操作</th>
</tr>
<tr th:each="dqRule,dqRuleStat : ${referList}">
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th th:text="${dqRule.id}"></th>
<td th:text="${dqRule.checkDbName}"></td>
<td th:text="${dqRule.checkTbName}"></td>
<th th:text="${dqRule.checkColName}"></th>
<th th:text="${dqRule.checkFilters}"></th>
<td th:text="${dqRule.referDbName}"></td>
<td th:text="${dqRule.referTbName}"></td>
<th th:text="${dqRule.referColName}"></th>
<th th:text="${dqRule.referFilters}"></th>
<th th:text="${dqRule.threshold}"></th>
<th th:text="${dqRule.status}"></th>
<th th:text="${dqRule.checkTime}"></th>
<th th:text="${dqRule.comment}"></th>
<td><a
th:href="@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}">删除</a></td>
</tr>
</table>
</div>
<h3>波动性校验规则列表</h3>
<div class="tableCenter">
<table class="table" style="table-layout: fixed;" border="1">
<tr>
<th>序号</th>
<th>数据库名</th>
<th>数据表名</th>
<th>数据列名</th>
<th>指标类型</th>
<th>过滤条件</th>
<th>预警阈值</th>
<th>当前状态</th>
<th>校验时间</th>
<th>备注</th>
<th>操作</th>
</tr>
<tr th:each="dqRule,dqRuleStat : ${volatilityList}">
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th th:text="${dqRule.id}"></th>
<td th:text="${dqRule.dbName}"></td>
<td th:text="${dqRule.tbName}"></td>
<th th:text="${dqRule.colName}"></th>
<th th:text="${dqRule.indicatorType}"></th>
<th th:text="${dqRule.filters}"></th>
<th th:text="${dqRule.threshold}"></th>
<th th:text="${dqRule.status}"></th>
<th th:text="${dqRule.checkTime}"></th>
<th th:text="${dqRule.comment}"></th>
<td><a
th:href="@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}">删除</a></td>
</tr>
</table>
</div>
<h3>特殊性校验规则列表</h3>
<div class="tableCenter">
<table class="table" style="table-layout: fixed;" border="1">
<tr>
<th>序号</th>
<th>数据库名</th>
<th>数据表名</th>
<th>数据列名</th>
<th>数据时间列名</th>
<th>指标类型</th>
<th>数据校验起始时间</th>
<th>过滤条件</th>
<th>预警阈值</th>
<th>当前状态</th>
<th>校验时间</th>
<th>备注</th>
<th>操作</th>
</tr>
<tr th:each="dqRule,dqRuleStat : ${specialList}">
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th th:text="${dqRule.id}"></th>
<td th:text="${dqRule.dbName}"></td>
<td th:text="${dqRule.tbName}"></td>
<th th:text="${dqRule.colName}"></th>
<th th:text="${dqRule.timeColName}"></th>
<th th:text="${dqRule.indicatorType}"></th>
<th th:text="${dqRule.startTime}"></th>
<th th:text="${dqRule.filters}"></th>
<th th:text="${dqRule.threshold}"></th>
<th th:text="${dqRule.status}"></th>
<th th:text="${dqRule.checkTime}"></th>
<th th:text="${dqRule.comment}"></th>
<td><a
th:href="@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}">删除</a></td>
</tr>
</table>
</div>
<hr></hr>
</div> </div>
</body> </body>
</html> </html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ECharts</title>
<!-- 引入 echarts.js -->
<script src="/templates/static/echarts.min.js"></script>
</head>
<body>
123
<!-- 为ECharts准备一个具备大小(宽高)的Dom -->
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
// 指定图表的配置项和数据
var option = {
title: {
text: 'ECharts 入门示例'
},
tooltip: {},
legend: {
data:['销量']
},
xAxis: {
data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
},
yAxis: {},
series: [{
name: '销量',
type: 'bar',
data: [5, 20, 36, 10, 10, 20]
}]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
</script>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>数据质量管理仪表盘</title>
<!-- 引入 echarts.js -->
<script src="/templates/static/js/jquery-3.1.1.min.js"></script>
<script src="/templates/static/js/echarts.min.js"></script>
</head>
<style type="text/css">
.table {
width: 100%;
margin: auto;
}
.tableCenter {
text-align: center;
}
</style>
<body>
<br>
<!-- 为ECharts准备一个具备大小(宽高)的Dom -->
<div id="volatility" style="width: 100%; height: 300px;"></div>
<script th:inline="javascript">
var volatilityLegendData=[[${volatilityLegendData}]];
var volatilitySeriesData=[[${volatilitySeriesData}]];
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('volatility'));
// 指定图表的配置项和数据
var option = {
title : {
text : '波动性校验趋势图:'
},
tooltip : {},
legend : {
data : [ '汇总值' ]
},
xAxis : {
data : volatilityLegendData
},
yAxis : {},
series : [ {
name : '汇总值',
type : 'line',//bar
data : volatilitySeriesData
} ]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
</script>
<br>
<!-- 为ECharts准备一个具备大小(宽高)的Dom -->
<div id="special" style="width: 100%; height: 300px;"></div>
<script th:inline="javascript">
var specialLegendData=[[${specialLegendData}]];
var specialSeriesData=[[${specialSeriesData}]];
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('special'));
// 指定图表的配置项和数据
var option = {
title : {
text : '特殊性校验趋势图:'
},
tooltip : {},
legend : {
data : [ '汇总值' ]
},
xAxis : {
data : specialLegendData
},
yAxis : {},
series : [ {
name : '汇总值',
type : 'line',//bar
data : specialSeriesData
} ]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
</script>
<h3>数据质量预警信息列表:</h3>
<br>
<div class="tableCenter" style="text-align: center">
<table class="table" style="table-layout: fixed;" border="1">
<tr>
<th>序号</th>
<th>校验类型</th>
<th>数据库名</th>
<th>数据表名</th>
<th>数据列名</th>
<th>数据总数</th>
<th>有效总数</th>
<th>有效比率</th>
<th>分区时间</th>
<th>管理ID</th>
<th>创建时间</th>
</tr>
<tr th:each="thresholdExceedAll,thresholdExceedAllState : ${thresholdExceedAllList}">
<th th:text="${thresholdExceedAll.id}"></th>
<th th:text="${thresholdExceedAll.checkType}"></th>
<td th:text="${thresholdExceedAll.dbName}"></td>
<td th:text="${thresholdExceedAll.tbName}"></td>
<th th:text="${thresholdExceedAll.colName}"></th>
<th th:text="${thresholdExceedAll.allNum}"></th>
<th th:text="${thresholdExceedAll.checkNum}"></th>
<th th:text="${thresholdExceedAll.checkRate}"></th>
<th th:text="${thresholdExceedAll.partitionDate}"></th>
<th th:text="${thresholdExceedAll.sqlId}"></th>
<th th:text="${thresholdExceedAll.createTime}"></th>
</tr>
</table>
</div>
</body>
</html>
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>数据质量管理平台</title>
</head>
<style type="text/css">
.table {
width: 100%;
margin: auto;
}
.tableCenter {
text-align: center;
}
</style>
<body>
<div style="text-align: center">
<h2>数据质量规则导入</h2>
<form action="/excel/importUnique" method="post"
enctype="multipart/form-data">
<input type="file" name="file"></input>
<button type="submit">唯一性质量规则上传</button>
</form>
<form action="/excel/importUnblank" method="post"
enctype="multipart/form-data">
<input type="file" name="file"></input>
<button type="submit">非空性质量规则上传</button>
</form>
<form action="/excel/importRefer" method="post"
enctype="multipart/form-data">
<input type="file" name="file"></input>
<button type="submit">参照性质量规则上传</button>
</form>
<form action="/excel/importVolatility" method="post"
enctype="multipart/form-data">
<input type="file" name="file"></input>
<button type="submit">波动性质量规则上传</button>
</form>
<form action="/excel/importSpecial" method="post"
enctype="multipart/form-data">
<input type="file" name="file"></input>
<button type="submit">特殊性质量规则上传</button>
</form>
<hr></hr>
<h2>数据质量规则列表查询</h2>
<h3>唯一性校验规则列表</h3>
<div class="tableCenter">
<table class="table" style="table-layout: fixed;" border="1">
<tr>
<th>序号</th>
<th>数据库名</th>
<th>数据表名</th>
<th>数据列名</th>
<th>过滤条件</th>
<th>预警阈值</th>
<th>当前状态</th>
<th>校验时间</th>
<th>备注</th>
<th>操作</th>
</tr>
<tr th:each="dqRule,dqRuleStat : ${uniqueList}">
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th th:text="${dqRule.id}"></th>
<td th:text="${dqRule.dbName}"></td>
<td th:text="${dqRule.tbName}"></td>
<th th:text="${dqRule.colName}"></th>
<th th:text="${dqRule.filters}"></th>
<th th:text="${dqRule.threshold}"></th>
<th th:text="${dqRule.status}"></th>
<th th:text="${dqRule.checkTime}"></th>
<th th:text="${dqRule.comment}"></th>
<td><a
th:href="@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}">删除</a></td>
</tr>
</table>
</div>
<h3>非空性校验规则列表</h3>
<div class="tableCenter">
<table class="table" style="table-layout: fixed;" border="1">
<tr>
<th>序号</th>
<th>数据库名</th>
<th>数据表名</th>
<th>数据列名</th>
<th>过滤条件</th>
<th>预警阈值</th>
<th>当前状态</th>
<th>校验时间</th>
<th>备注</th>
<th>操作</th>
</tr>
<tr th:each="dqRule,dqRuleStat : ${unblankList}">
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th th:text="${dqRule.id}"></th>
<td th:text="${dqRule.dbName}"></td>
<td th:text="${dqRule.tbName}"></td>
<th th:text="${dqRule.colName}"></th>
<th th:text="${dqRule.filters}"></th>
<th th:text="${dqRule.threshold}"></th>
<th th:text="${dqRule.status}"></th>
<th th:text="${dqRule.checkTime}"></th>
<th th:text="${dqRule.comment}"></th>
<td><a
th:href="@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}">删除</a></td>
</tr>
</table>
</div>
<h3>参照性校验规则列表</h3>
<div class="tableCenter">
<table class="table" style="table-layout: fixed;" border="1">
<tr>
<th>序号</th>
<th>校验数据库名</th>
<th>校验数据表名</th>
<th>校验数据列名</th>
<th>校验过滤条件</th>
<th>参照数据库名</th>
<th>参照数据表名</th>
<th>参照数据列名</th>
<th>参照过滤条件</th>
<th>预警阈值</th>
<th>当前状态</th>
<th>校验时间</th>
<th>备注</th>
<th>操作</th>
</tr>
<tr th:each="dqRule,dqRuleStat : ${referList}">
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th th:text="${dqRule.id}"></th>
<td th:text="${dqRule.checkDbName}"></td>
<td th:text="${dqRule.checkTbName}"></td>
<th th:text="${dqRule.checkColName}"></th>
<th th:text="${dqRule.checkFilters}"></th>
<td th:text="${dqRule.referDbName}"></td>
<td th:text="${dqRule.referTbName}"></td>
<th th:text="${dqRule.referColName}"></th>
<th th:text="${dqRule.referFilters}"></th>
<th th:text="${dqRule.threshold}"></th>
<th th:text="${dqRule.status}"></th>
<th th:text="${dqRule.checkTime}"></th>
<th th:text="${dqRule.comment}"></th>
<td><a
th:href="@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}">删除</a></td>
</tr>
</table>
</div>
<h3>波动性校验规则列表</h3>
<div class="tableCenter">
<table class="table" style="table-layout: fixed;" border="1">
<tr>
<th>序号</th>
<th>数据库名</th>
<th>数据表名</th>
<th>数据列名</th>
<th>指标类型</th>
<th>过滤条件</th>
<th>预警阈值</th>
<th>当前状态</th>
<th>校验时间</th>
<th>备注</th>
<th>操作</th>
</tr>
<tr th:each="dqRule,dqRuleStat : ${volatilityList}">
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th th:text="${dqRule.id}"></th>
<td th:text="${dqRule.dbName}"></td>
<td th:text="${dqRule.tbName}"></td>
<th th:text="${dqRule.colName}"></th>
<th th:text="${dqRule.indicatorType}"></th>
<th th:text="${dqRule.filters}"></th>
<th th:text="${dqRule.threshold}"></th>
<th th:text="${dqRule.status}"></th>
<th th:text="${dqRule.checkTime}"></th>
<th th:text="${dqRule.comment}"></th>
<td><a
th:href="@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}">删除</a></td>
</tr>
</table>
</div>
<h3>特殊性校验规则列表</h3>
<div class="tableCenter">
<table class="table" style="table-layout: fixed;" border="1">
<tr>
<th>序号</th>
<th>数据库名</th>
<th>数据表名</th>
<th>数据列名</th>
<th>数据时间列名</th>
<th>指标类型</th>
<th>数据校验起始时间</th>
<th>过滤条件</th>
<th>预警阈值</th>
<th>当前状态</th>
<th>校验时间</th>
<th>备注</th>
<th>操作</th>
</tr>
<tr th:each="dqRule,dqRuleStat : ${specialList}">
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th th:text="${dqRule.id}"></th>
<td th:text="${dqRule.dbName}"></td>
<td th:text="${dqRule.tbName}"></td>
<th th:text="${dqRule.colName}"></th>
<th th:text="${dqRule.timeColName}"></th>
<th th:text="${dqRule.indicatorType}"></th>
<th th:text="${dqRule.startTime}"></th>
<th th:text="${dqRule.filters}"></th>
<th th:text="${dqRule.threshold}"></th>
<th th:text="${dqRule.status}"></th>
<th th:text="${dqRule.checkTime}"></th>
<th th:text="${dqRule.comment}"></th>
<td><a
th:href="@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}">删除</a></td>
</tr>
</table>
</div>
<hr></hr>
</div>
</body>
</html>
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