Commit c10d26a5 by shenjinzhu

页面部分修改错误信息

parent d6d63e89
......@@ -7,6 +7,8 @@ import java.util.Map;
import javax.annotation.Resource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.bson.types.ObjectId;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
......@@ -25,21 +27,26 @@ import com.zhiwei.manage.util.Change;
@Component
public class MessageDaoImpl implements MessageDao {
private static final Log log = LogFactory.getLog(MessageDaoImpl.class);
@Resource(name = "mongoTemplate")
private MongoTemplate mongo;
@Autowired
private DbDepot dbDepot;
@SuppressWarnings("all")
@Override
public String insert(Message message) {
Message msg = mongo.findOne(Query.query(Criteria.where("tempName").is(message.getTempName()).where("handle")
.is(false).where("errorType").is(message.getErrorType())), Message.class);
Message msg = mongo.findOne(Query
.query(Criteria.where("tempName").is(message.getTempName())
.andOperator(Criteria.where("handle").is(false)))
.addCriteria(Criteria.where("errorType").is(message.getErrorType())), Message.class);
if (msg == null) {
mongo.insert(message);
return "添加成功";
}
log.info("有类似错误存在不添加");
return "未添加";
}
......@@ -73,7 +80,7 @@ public class MessageDaoImpl implements MessageDao {
return null;
}
DBCursor cursor = con.find(new BasicDBObject("pt", pt).append("handle", false)).skip((pageNo - 1) * pageSize)
.limit(pageSize).sort(new BasicDBObject("templateLv",1).append("createDate", -1));
.limit(pageSize).sort(new BasicDBObject("templateLv", 1).append("createDate", -1));
while (cursor.hasNext()) {
Map<String, Object> map = (Map<String, Object>) cursor.next();
Message msg = Change.toBean(Message.class, map);
......@@ -93,7 +100,7 @@ public class MessageDaoImpl implements MessageDao {
}
return con;
}
@Override
public List<Message> findByTmpName(String templateName, int pageNo, int pageSize, String pt) {
List<Message> msgList = new ArrayList<Message>();
......
......@@ -136,7 +136,6 @@ public class NewsDaoImpl implements NewsDao {
MongoCollection<Document> col = null;
if (DbDepot.newsCol != null) {
if (DbDepot.newsCol.get(pt) != null) {
System.out.println("已经有,不重新创建");
col = (MongoCollection<Document>) DbDepot.newsCol.get(pt);
} else {
MongoClient mongoClient = new MongoClient(host, port);
......
......@@ -42,7 +42,6 @@ public class DelayedThread extends Thread {
NewsDelayed run = runMap.get(key);
Calendar cal = Calendar.getInstance();
if (run.getNextRun().before(cal.getTime())&&!run.isStartNow()) {
System.out.println("延时启动一个");
queue.offer(run);
cal.add(Calendar.HOUR, run.getDelayedInterval());
run.setNextRun(cal.getTime());
......
......@@ -46,7 +46,6 @@ public class FieldThread extends Thread {
FieldIntegerity run = runMap.get(key);
Calendar cal = Calendar.getInstance();
if (run.getNextRun().before(cal.getTime()) && !run.isStartNow()) {
System.out.println("字段添加一个");
queue.offer(run);
cal.add(Calendar.HOUR, run.getFieldInterval());
run.setNextRun(cal.getTime());
......
......@@ -110,7 +110,6 @@ public class Task implements Runnable {
List<Map<String, Object>> list = newsService.findNews(field.getHost(), field.getPort(),
field.getdBName(), field.getCollection(), field.getTestCount(), field.getSpyderInfoId(),
field.getPt());
System.out.println("field检测数据长度" + list.size());
if (list.size() < field.getTestCount()) {
Template tp = MainThread.mainMap.get(field.getTemplateId());
Message msg = new Message();
......@@ -159,7 +158,6 @@ public class Task implements Runnable {
List<Map<String, Object>> list = newsService.findNews(delayed.getHost(), delayed.getPort(),
delayed.getdBName(), delayed.getCollection(), delayed.getTestCount(), delayed.getSpyderInfoId(),
delayed.getPt());
System.out.println("delay检测数据长度" + list.size());
long sum = 0;
if (list.size() < delayed.getTestCount()) {
Template tp = MainThread.mainMap.get(delayed.getTemplateId());
......@@ -205,7 +203,6 @@ public class Task implements Runnable {
}
}
Collections.sort(dNum);
System.out.println(sum);
int cutSize = (int) (dNum.size() * 0.8 / 1);
for (int i = cutSize; i < dNum.size(); i++) {
sum -= dNum.get(i);
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>数据管理系统</title><link rel=stylesheet href=./static/css/style.ini.css><link rel=stylesheet href=./static/datepicker/css/datepicker.css><link rel=stylesheet href=./static/datepicker/css/layout.css><link href=./static/css/app.6f47627e9efa16c11dbedd718e637bc9.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.831f4c0acbad15a40c03.js></script><script type=text/javascript src=./static/js/vendor.c00def797876150978d2.js></script><script type=text/javascript src=./static/js/app.716319d99e004baea6ee.js></script></body><script src=./static/js/jquery-1.12.4.min.js></script><script src=./static/js/jquery.easing-master/jquery.easing.min.js></script><script src=./static/js/jquery.transit.js></script><script src=./static/datepicker/js/datepicker.js></script><script src=./static/datepicker/js/eye.js></script><script src=./static/datepicker/js/utils.js></script></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>数据管理系统</title><link rel=stylesheet href=./static/css/style.ini.css><link rel=stylesheet href=./static/datepicker/css/datepicker.css><link rel=stylesheet href=./static/datepicker/css/layout.css><link href=./static/css/app.9b4aea3851f5b6e1eb674f9463251a60.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.1c1dd5cd2fcca323c6b4.js></script><script type=text/javascript src=./static/js/vendor.c00def797876150978d2.js></script><script type=text/javascript src=./static/js/app.ff17a705b8009599f890.js></script></body><script src=./static/js/jquery-1.12.4.min.js></script><script src=./static/js/jquery.easing-master/jquery.easing.min.js></script><script src=./static/js/jquery.transit.js></script><script src=./static/datepicker/js/datepicker.js></script><script src=./static/datepicker/js/eye.js></script><script src=./static/datepicker/js/utils.js></script></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,a){for(var i,u,f,s=0,l=[];s<t.length;s++)u=t[s],o[u]&&l.push(o[u][0]),o[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(r&&r(t,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)f=n(n.s=a[s]);return f};var t={},o={2:0};n.e=function(e){function r(){i.onerror=i.onload=null,clearTimeout(u);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}var t=o[e];if(0===t)return new Promise(function(e){e()});if(t)return t[2];var c=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=c;var a=document.getElementsByTagName("head")[0],i=document.createElement("script");i.type="text/javascript",i.charset="utf-8",i.async=!0,i.timeout=12e4,n.nc&&i.setAttribute("nonce",n.nc),i.src=n.p+"static/js/"+e+"."+{0:"c00def797876150978d2",1:"716319d99e004baea6ee"}[e]+".js";var u=setTimeout(r,12e4);return i.onerror=i.onload=r,a.appendChild(i),c},n.m=e,n.c=t,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="./",n.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.831f4c0acbad15a40c03.js.map
\ No newline at end of file
......@@ -275,7 +275,7 @@ export default {
return false
}
} else {
bus.$emit('alert', '选择时间段错误!(Error code: 159)')
bus.$emit('alert', '选择时间段错误!(Error code: 123)')
return false
}
let data = params
......
......@@ -8,7 +8,7 @@
<div class="list">
<p class="item">
<span>检测模板</span>:
<input type="text" name="" :value="data.templateName" disabled spellcheck="false" placeholder="UC">
<input type="text" name="" :value="data.tempName" disabled spellcheck="false" placeholder="UC">
</p>
<p class="item">
<span>产生时间</span>:
......@@ -55,7 +55,7 @@ export default {
return {
data: {
messageId: '',
templateName: '',
tempName: '',
handleDate: '',
errorMsg: '',
handleMsg: '',
......@@ -75,7 +75,7 @@ export default {
// 初始化
this.data = {
messageId: this.childrenData.messageId,
templateName: this.childrenData.templateName,
tempName: this.childrenData.tempName,
handleDate: moment(this.childrenData.handleDate).format('YYYY-MM-DD'),
errorMsg: this.childrenData.errorMsg,
handleMsg: this.childrenData.handleMsg,
......@@ -115,7 +115,7 @@ export default {
submit () {
let data = {
messageId: this.childrenData.messageId,
// templateName: this.childrenData.templateName,
// tempName: this.childrenData.tempName,
// handleDate: this.childrenData.handleDate,
// errorMsg: this.childrenData.errorMsg,
// templateLv: this.childrenData.templateLv,
......
......@@ -8,7 +8,7 @@
<div class="list">
<p class="item">
<span>检测模板</span>:
<input type="text" name="" :value="data.templateName" disabled spellcheck="false" placeholder="UC">
<input type="text" name="" :value="data.tempName" disabled spellcheck="false" placeholder="UC">
</p>
<p class="item">
<span>产生时间</span>:
......@@ -69,7 +69,7 @@ export default {
return {
data: {
messageId: '',
templateName: '',
tempName: '',
createDate: '',
errorMsg: '',
templateLv: '',
......@@ -91,7 +91,7 @@ export default {
// 初始化
this.data = {
messageId: this.childrenData.messageId,
templateName: this.childrenData.templateName,
tempName: this.childrenData.tempName,
createDate: moment(this.childrenData.createDate).format('YYYY-MM-DD HH:mm'),
errorMsg: this.childrenData.errorMsg,
templateLv: this.childrenData.templateLv,
......@@ -133,7 +133,7 @@ export default {
// submit () {
// let params = {
// messageId: this.childrenData.messageId,
// // templateName: this.childrenData.templateName,
// // tempName: this.childrenData.tempName,
// // handleDate: this.childrenData.handleDate,
// // errorMsg: this.childrenData.errorMsg,
// // templateLv: this.childrenData.templateLv,
......
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