Parcourir la Source

Merge branch 'master' of http://121.42.53.174:3000/jiapeng/bridge

XMTT 6 ans auparavant
Parent
commit
7cda15e0b6

+ 3 - 0
src/main/java/com/ekexiu/project/bridge/alarm/AlarmDao.java

@ -17,6 +17,9 @@ import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
17 17
import org.jfw.util.PageQueryResult;
18 18
@DAO
19 19
public interface AlarmDao {
20
	@Insert
21
	int insert(Connection con,AlarmDataError cnt)throws SQLException;
22
	
20 23
	@Insert
21 24
	int insert(Connection con,AlarmMsg msg)throws SQLException;
22 25
	@Insert

+ 36 - 0
src/main/java/com/ekexiu/project/bridge/alarm/AlarmDataError.java

@ -0,0 +1,36 @@
1
package com.ekexiu.project.bridge.alarm;
2

3
import org.jfw.apt.orm.annotation.entry.Column;
4
import org.jfw.apt.orm.annotation.entry.Table;
5
import org.jfw.apt.orm.core.enums.DE;
6
@Table(descp="报警数据错误表")
7
public class AlarmDataError {
8

9
	private String cnt;
10
	private long  rtime;
11
	private String reason;
12
	
13
	@Column(descp="接口数据",value=DE.text_de)
14
	public String getCnt() {
15
		return cnt;
16
	}
17
	public void setCnt(String cnt) {
18
		this.cnt = cnt;
19
	}
20
	@Column(descp="接口数据接收时间",value=DE.long_de)
21
	public long getRtime() {
22
		return rtime;
23
	}
24
	public void setRtime(long rtime) {
25
		this.rtime = rtime;
26
	}
27
	@Column(descp="接口数据错误原因",value=DE.text_de)
28
	public String getReason() {
29
		return reason;
30
	}
31
	public void setReason(String reason) {
32
		this.reason = reason;
33
	}
34
	
35
	
36
}

+ 5 - 4
src/main/java/com/ekexiu/project/bridge/alarm/AlarmService.java

@ -51,14 +51,15 @@ public class AlarmService {
51 51
		}
52 52
		sb.append(") AND UID=? AND READED='0' GROUP BY SERVER");
53 53
		
54
		return JdbcUtil.queryList(con, sb.toString(), new ResultSetExtractor<Map<String,Integer>>() {
54
		return JdbcUtil.queryList(con, sb.toString(), new ResultSetExtractor<Map<String,Object>>() {
55 55

56 56
			@Override
57
			public Map<String, Integer> extractData(ResultSet rs) throws SQLException {
58
				Map<String,Integer> map = new HashMap<String,Integer>();
57
			public Map<String, Object> extractData(ResultSet rs) throws SQLException {
58
				Map<String,Object> map = new HashMap<String,Object>();
59 59
				String s= rs.getString(1);
60 60
				int c = rs.getInt(2);
61
				map.put(s, c);
61
				map.put("server",s);
62
				map.put("num",c);
62 63
				return map;
63 64
			}
64 65
		}, new PreparedStatementConfig() {

+ 3 - 0
src/main/java/com/ekexiu/project/bridge/collect/CollectDao.java

@ -17,6 +17,9 @@ import org.jfw.apt.orm.annotation.dao.param.LtEq;
17 17
@DAO
18 18
public interface CollectDao {
19 19

20
	@Insert
21
	int insertWaveDataError(Connection con,WaveDataError cnt)throws SQLException;
22
	
20 23
	@Insert
21 24
	@Batch
22 25
	int[] insertWaveDataItems(Connection con,List<WaveDataItem> items)throws SQLException;

+ 37 - 0
src/main/java/com/ekexiu/project/bridge/collect/WaveDataError.java

@ -0,0 +1,37 @@
1
package com.ekexiu.project.bridge.collect;
2

3
import org.jfw.apt.orm.annotation.entry.Column;
4
import org.jfw.apt.orm.annotation.entry.Table;
5
import org.jfw.apt.orm.core.enums.DE;
6

7
@Table(descp="实时数据错误表")
8
public class WaveDataError {
9

10
	private String cnt;
11
	private long  rtime;
12
	private String reason;
13
	
14
	@Column(descp="接口数据",value=DE.text_de)
15
	public String getCnt() {
16
		return cnt;
17
	}
18
	public void setCnt(String cnt) {
19
		this.cnt = cnt;
20
	}
21
	@Column(descp="接口数据接收时间",value=DE.long_de)
22
	public long getRtime() {
23
		return rtime;
24
	}
25
	public void setRtime(long rtime) {
26
		this.rtime = rtime;
27
	}
28
	@Column(descp="接口数据错误原因",value=DE.text_de)
29
	public String getReason() {
30
		return reason;
31
	}
32
	public void setReason(String reason) {
33
		this.reason = reason;
34
	}
35
	
36
	
37
}

+ 2 - 2
src/main/java/com/ekexiu/project/bridge/mobile/MobilePhoneService.java

@ -24,8 +24,8 @@ import java.util.Map;
24 24
public class MobilePhoneService {
25 25
	private static final Map<String, String> errorReason = new HashMap<String, String>();
26 26
27
	private String accountSid = "a9e818c5ffb547c6a1db15ce45381ab0";
28
	private String authToken = "d34f7d9bccd74d67abe8a62263a73fda";
27
	private String accountSid = "6f5c2612d691480a9bbbee0c64e10872";
28
	private String authToken = "4fac48f2d37d4ba89cc037e7d012348e";
29 29
	private String restUrl = "https://api.miaodiyun.com/20150822/industrySMS/sendSMS";
30 30
	private String marketUrl = "https://api.miaodiyun.com/20150822/affMarkSMS/sendSMS";
31 31
	private int sendTimeout = 10 * 1000;

+ 174 - 119
src/main/java/com/ekexiu/project/bridge/servlet/AlarmDataServlet.java

@ -5,6 +5,7 @@ import java.io.IOException;
5 5
import java.io.InputStream;
6 6
import java.lang.reflect.Type;
7 7
import java.sql.Connection;
8
import java.sql.SQLException;
8 9
import java.util.HashMap;
9 10
import java.util.LinkedList;
10 11
import java.util.List;
@ -16,6 +17,7 @@ import javax.servlet.http.HttpServletRequest;
16 17
import javax.servlet.http.HttpServletResponse;
17 18
import javax.sql.DataSource;
18 19

20
import org.jfw.apt.util.Base64;
19 21
import org.jfw.util.ConstData;
20 22
import org.jfw.util.context.JfwAppContext;
21 23
import org.jfw.util.io.IoUtil;
@ -24,6 +26,7 @@ import org.jfw.util.json.JsonService;
24 26
import org.jfw.util.reflect.TypeReference;
25 27

26 28
import com.ekexiu.project.bridge.alarm.AlarmDao;
29
import com.ekexiu.project.bridge.alarm.AlarmDataError;
27 30
import com.ekexiu.project.bridge.alarm.AlarmDataItem;
28 31
import com.ekexiu.project.bridge.alarm.AlarmMsg;
29 32
import com.ekexiu.project.bridge.mail.MailService;
@ -64,157 +67,190 @@ public class AlarmDataServlet extends HttpServlet {
64 67
		final AlarmMsg msg = new AlarmMsg();
65 68
		StringBuilder sb = new StringBuilder();
66 69
		final Map<User, String> notices = new HashMap<User, String>();
67
		List<Object> datas = null;
70
		Map<Object, Object> map = null;
68 71
		AlarmDataItem item = null;
72
		final Map<String, String> errorData = new HashMap<String, String>();
73
		String pcnt = null;
74

75
		List<Object> datas = null;
69 76
		try {
70 77
			byte[] buf = new byte[8192];
71 78
			IoUtil.copy(in, baos, buf);
72
			Map<Object, Object> map = JsonService.fromJson(new String(baos.toByteArray(), ConstData.UTF8), DATA_TYPE);
73
			Object tmpObj = map.get("node_id");
74
			if (tmpObj != null && tmpObj instanceof String) {
75
				msg.setServer((String) tmpObj);
76
				tmpObj = map.get("alarm_no");
77
				if (tmpObj != null && tmpObj instanceof String) {
78
					msg.setAid((String) tmpObj);
79
					tmpObj = map.get("box_id");
80
					if (tmpObj != null && tmpObj instanceof String) {
81
						try {
82
							msg.setDevice(Integer.parseInt((String) tmpObj));
83
							tmpObj = map.get("data");
84
							if (tmpObj != null && tmpObj instanceof List) {
85
								datas = (List<Object>) tmpObj;
86
							}
87
						} catch (Exception e) {
88
						}
89
					}
79
			byte[] ba = baos.toByteArray();
80

81
			if (ba.length == 0) {
82
				errorData.put(" ", "EMPTY");
83
			} else {
84
				try {
85
					pcnt = new String(baos.toByteArray(), ConstData.UTF8);
86
				} catch (Exception e) {
87
					errorData.put(new String(Base64.encodeBase64(ba), ConstData.UTF8), "CHARSET");
90 88
				}
91
			}
92
			if (datas != null) {
93
				for (Object obj : datas) {
94
					item = new AlarmDataItem();
95
					if (obj != null && obj instanceof Map) {
96
						map = (Map<Object, Object>) obj;
97
						item.setId(msg.getAid());
98
						tmpObj = map.get("channel_id");
89
				if (pcnt != null) {
90
					try {
91
						map = JsonService.fromJson(pcnt, DATA_TYPE);
92
					} catch (Exception e) {
93
						errorData.put(pcnt, "JSON_PARSE");
94
					}
95
					if (map != null) {
96
						Object tmpObj = map.get("node_id");
99 97
						if (tmpObj != null && tmpObj instanceof String) {
100
							try {
101
								item.setSeq(Integer.parseInt((String) tmpObj));
102
							} catch (Exception e) {
103
								items.clear();
104
								break;
98
							msg.setServer((String) tmpObj);
99
							tmpObj = map.get("alarm_no");
100
							if (tmpObj != null && tmpObj instanceof String) {
101
								msg.setAid((String) tmpObj);
102
								tmpObj = map.get("box_id");
103
								if (tmpObj != null && tmpObj instanceof String) {
104
									try {
105
										msg.setDevice(Integer.parseInt((String) tmpObj));
106
										tmpObj = map.get("data");
107
										if (tmpObj != null && tmpObj instanceof List) {
108
											datas = (List<Object>) tmpObj;
109
										}
110
									} catch (Exception e) {
111
									}
112
								}
105 113
							}
106
						} else {
107
							items.clear();
108
							break;
109
						}
110
						tmpObj = map.get("start_time");
111
						if (tmpObj != null && tmpObj instanceof String) {
112
							item.setStime((String) tmpObj);
113
						} else {
114
							items.clear();
115
							break;
116 114
						}
117
						tmpObj = map.get("alarm_time");
118
						if (tmpObj != null && tmpObj instanceof String) {
119
							item.setStime((String) tmpObj);
120
							if (msg.getAlarmTime() == null) {
121
								String at = (String) tmpObj;
122
								at = at.substring(0, 14);
123
								msg.setAlarmTime(at);
124
							}
115
						if (datas != null) {
116
							for (Object obj : datas) {
117
								item = new AlarmDataItem();
118
								if (obj != null && obj instanceof Map) {
119
									map = (Map<Object, Object>) obj;
120
									item.setId(msg.getAid());
121
									tmpObj = map.get("channel_id");
122
									if (tmpObj != null && tmpObj instanceof String) {
123
										try {
124
											item.setSeq(Integer.parseInt((String) tmpObj));
125
										} catch (Exception e) {
126
											items.clear();
127
											break;
128
										}
129
									} else {
130
										items.clear();
131
										break;
132
									}
133
									tmpObj = map.get("start_time");
134
									if (tmpObj != null && tmpObj instanceof String) {
135
										item.setStime((String) tmpObj);
136
									} else {
137
										items.clear();
138
										break;
139
									}
140
									tmpObj = map.get("alarm_time");
141
									if (tmpObj != null && tmpObj instanceof String) {
142
										item.setStime((String) tmpObj);
143
										if (msg.getAlarmTime() == null) {
144
											String at = (String) tmpObj;
145
											at = at.substring(0, 14);
146
											msg.setAlarmTime(at);
147
										}
125 148

126
						} else {
127
							items.clear();
128
							break;
129
						}
149
									} else {
150
										items.clear();
151
										break;
152
									}
130 153

131
						sb.setLength(0);
132
						tmpObj = map.get("value");
133
						if (tmpObj != null && tmpObj instanceof List) {
134
							for (Object val : ((List) tmpObj)) {
135
								sb.append(val.toString()).append(",");
154
									sb.setLength(0);
155
									tmpObj = map.get("value");
156
									if (tmpObj != null && tmpObj instanceof List) {
157
										for (Object val : ((List) tmpObj)) {
158
											sb.append(val.toString()).append(",");
159
										}
160
									}
161
									if (sb.length() > 0) {
162
										item.setData(sb.substring(0, sb.length() - 1));
163
									} else {
164
										items.clear();
165
										break;
166
									}
167
									items.add(item);
168
								}
136 169
							}
137 170
						}
138
						if (sb.length() > 0) {
139
							item.setData(sb.substring(0, sb.length() - 1));
140
						} else {
141
							items.clear();
142
							break;
143
						}
144
						items.add(item);
145 171
					}
146 172
				}
147 173
			}
148 174
		} finally {
149 175
			in.close();
150 176
		}
151
		Connection con = null;
152
		try {
153
			con = this.dataSource.getConnection();
154
			BridgeServer server = this.bridgeServerDao.queryBySeq(con, msg.getServer());
155
			if (server != null) {
156
				Bridge bridge = this.bridgeDao.query(con, server.getBridgeId());
157
				if (bridge != null) {
158
					CollectDevice device = this.collectDeviceDao.query(con, server.getId(), msg.getDevice());
159
					if (device != null) {
160
						String atime = items.get(0).getAtime();
161
						String cnt = "您负责管理维护的桥梁:【" + bridge.getShortName() + "】,于【" + atime.substring(0, 4) + "-" + atime.substring(4, 6) + "-"
162
								+ atime.substring(6, 8) + " " + atime.substring(8, 10) + ":" + atime.substring(10, 12) + ":" + atime.substring(12, 14)
163
								+ "】,编号为【" + device.getCode() + "】的采集盒发生一起报警事件,请尽快登录平台查看详细的报警信息。";
164
						List<User> users = this.userDao.queryByBridgeId(con, bridge.getId(), true);
165
						if (users != null && users.size() > 0) {
166
							for (User u : users) {
167
								msg.setUid(u.getId());
168
								this.alarmDao.insert(con, msg);
169
								notices.put(u, cnt);
177
		if (items.size() > 0) {
178

179
			Connection con = null;
180
			try {
181
				con = this.dataSource.getConnection();
182
				BridgeServer server = this.bridgeServerDao.queryBySeq(con, msg.getServer());
183
				if (server != null) {
184
					Bridge bridge = this.bridgeDao.query(con, server.getBridgeId());
185
					if (bridge != null) {
186
						CollectDevice device = this.collectDeviceDao.query(con, server.getId(), msg.getDevice());
187
						if (device != null) {
188
							String atime = items.get(0).getAtime();
189
							String cnt = "您负责管理维护的桥梁:【" + bridge.getShortName() + "】,于【" + atime.substring(0, 4) + "-" + atime.substring(4, 6) + "-"
190
									+ atime.substring(6, 8) + " " + atime.substring(8, 10) + ":" + atime.substring(10, 12) + ":" + atime.substring(12, 14)
191
									+ "】,编号为【" + device.getCode() + "】的采集盒发生一起报警事件,请尽快登录平台查看详细的报警信息。";
192
							List<User> users = this.userDao.queryByBridgeId(con, bridge.getId(), true);
193
							if (users != null && users.size() > 0) {
194
								for (User u : users) {
195
									msg.setUid(u.getId());
196
									this.alarmDao.insert(con, msg);
197
									notices.put(u, cnt);
198
								}
199
								this.alarmDao.insertAlarmDataItems(con, items);
200
							} else {
201
								errorData.put(pcnt, "NOT FOUND USER");
202
								items.clear();
170 203
							}
171
							this.alarmDao.insertAlarmDataItems(con, items);
172 204
						} else {
205
							errorData.put(pcnt, "NOT FOUND DEVICE");
173 206
							items.clear();
174 207
						}
175 208
					} else {
209
						errorData.put(pcnt, "NOT FOUND BRIDGE");
176 210
						items.clear();
177 211
					}
178 212
				} else {
213
					errorData.put(pcnt, "NOT FOUND SERVER");
179 214
					items.clear();
180 215
				}
181
			} else {
182
				items.clear();
183
			}
184
			if (items.size() > 0) {
185
				con.commit();
186
				JfwAppContext.getScheduledExecutorService().equals(new Runnable() {
187
					@Override
188
					public void run() {
216
				if (items.size() > 0) {
217
					con.commit();
218
					JfwAppContext.getScheduledExecutorService().equals(new Runnable() {
219
						@Override
220
						public void run() {
189 221

190
						for (Map.Entry<User, String> entry : notices.entrySet()) {
191
							User u = entry.getKey();
192
							String to = u.getEmail();
193
							try {
194
								if (to != null && to.length() > 0) {
195
									mailService.sendSimpleMail(to, "【" + u.getName() + "】您好:<br>" + entry.getValue(), null, "桥梁临控报警");
222
							for (Map.Entry<User, String> entry : notices.entrySet()) {
223
								User u = entry.getKey();
224
								String to = u.getEmail();
225
								try {
226
									if (to != null && to.length() > 0) {
227
										mailService.sendSimpleMail(to, "【" + u.getName() + "】您好:<br>" + entry.getValue(), null, "桥梁临控报警");
228
									}
229
								} catch (Throwable thr) {
196 230
								}
197
							} catch (Throwable thr) {
198
							}
199
							to = u.getPhone();
200
							try {
201
								if (to != null && to.length() > 0) {
202
									phoneService.sendMessage(to, "【__USERNAME__】您好:" + entry.getValue(), "__USERNAME__", u.getName());
231
								to = u.getPhone();
232
								try {
233
									if (to != null && to.length() > 0) {
234
										phoneService.sendMessage(to, "【__USERNAME__】您好:" + entry.getValue(), "__USERNAME__", u.getName());
235
									}
236
								} catch (Throwable thr) {
203 237
								}
204
							} catch (Throwable thr) {
205 238
							}
206
						}
207 239

208
					}
209
				});
240
						}
241
					});
242
				}
243
			} catch (Exception e) {
244
				if (null != con)
245
					JdbcUtil.rollback(con);
246
				items.clear();
247
			} finally {
248
				if (null != con)
249
					JdbcUtil.close(con);
210 250
			}
211
		} catch (Exception e) {
212
			if (null != con)
213
				JdbcUtil.rollback(con);
214
			items.clear();
215
		} finally {
216
			if (null != con)
217
				JdbcUtil.close(con);
251
		} else {
252
			if (errorData.isEmpty())
253
				errorData.put(pcnt, "ALARMDATA_PARSE");
218 254
		}
219 255

220 256
		response.setDateHeader("Expires", 0);
@ -228,10 +264,29 @@ public class AlarmDataServlet extends HttpServlet {
228 264
		response.setContentType("application/json");
229 265
		java.io.PrintWriter out = response.getWriter();
230 266
		if (items.isEmpty()) {
231
			out.write("{\"status\":0,}");
267
			out.write("{\"status\":0}");
268

269
			try {
270
				Connection con = dataSource.getConnection();
271
				try {
272
					for (Map.Entry<String, String> entry : errorData.entrySet()) {
273
						AlarmDataError wde = new AlarmDataError();
274
						wde.setCnt(entry.getKey());
275
						wde.setReason(entry.getValue());
276
						wde.setRtime(System.currentTimeMillis());
277
						alarmDao.insert(con, wde);
278
					}
279
					con.commit();
280
				} catch (SQLException e) {
281
					con.rollback();
282
				} finally {
283
					con.close();
284
				}
285
			} catch (Throwable thr) {
286
			}
232 287
			return;
233 288
		}
234
		out.write("{\"status\":1,}");
289
		out.write("{\"status\":1}");
235 290
	}
236 291

237 292
	@Override

+ 122 - 69
src/main/java/com/ekexiu/project/bridge/servlet/WaveDataServlet.java

@ -17,6 +17,7 @@ import javax.servlet.http.HttpServletRequest;
17 17
import javax.servlet.http.HttpServletResponse;
18 18
import javax.sql.DataSource;
19 19

20
import org.jfw.apt.util.Base64;
20 21
import org.jfw.util.ConstData;
21 22
import org.jfw.util.context.JfwAppContext;
22 23
import org.jfw.util.io.IoUtil;
@ -25,6 +26,7 @@ import org.jfw.util.reflect.TypeReference;
25 26

26 27
import com.ekexiu.project.bridge.collect.CollectDao;
27 28
import com.ekexiu.project.bridge.collect.CollectService;
29
import com.ekexiu.project.bridge.collect.WaveDataError;
28 30
import com.ekexiu.project.bridge.collect.WaveDataItem;
29 31

30 32
public class WaveDataServlet extends HttpServlet {
@ -35,7 +37,8 @@ public class WaveDataServlet extends HttpServlet {
35 37
	@SuppressWarnings("unused")
36 38
	private static final LinkedList<List<WaveDataItem>> EMPTY_LIST = new LinkedList<List<WaveDataItem>>();
37 39

38
	public static Type DATA_TYPE=new TypeReference<List<Object>>(){}.getType();
40
	public static Type DATA_TYPE = new TypeReference<List<Object>>() {
41
	}.getType();
39 42

40 43
	private DataSource dataSource;
41 44
	private CollectDao collectDao;
@ -49,78 +52,104 @@ public class WaveDataServlet extends HttpServlet {
49 52
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
50 53
		InputStream in = request.getInputStream();
51 54
		final List<WaveDataItem> items = new LinkedList<WaveDataItem>();
55
		final Map<String, String> errorData = new HashMap<String, String>();
56
		String cnt = null;
57
		List<Object> param = null;
52 58
		try {
53 59
			byte[] buf = new byte[8192];
54 60
			IoUtil.copy(in, baos, buf);
55
			List<Object> param = JsonService.fromJson(new String(baos.toByteArray(), ConstData.UTF8), DATA_TYPE);
56
			for (Object obj : param) {
57
				if (obj instanceof List) {
58
					WaveDataItem item = new WaveDataItem();
59
					Object tmpObj = ((List) obj).get(0);
60
					if (tmpObj instanceof String) {
61
						item.setSeq((String) tmpObj);
62
					} else {
63
						items.clear();
64
						break;
65
					}
66
					tmpObj = ((List) obj).get(3);
67
					if (tmpObj instanceof String) {
68
						item.setCtime((String) tmpObj);
69
					} else {
70
						items.clear();
71
						break;
72
					}
73
					tmpObj = ((List) obj).get(1);
74
					if (tmpObj instanceof String) {
75
						try {
76
							item.setDid(Integer.parseInt((String) tmpObj));
77
						} catch (Exception e) {
78
							items.clear();
79
							break;
80
						}
81
					} else {
82
						items.clear();
83
						break;
84
					}
85
					tmpObj = ((List) obj).get(2);
86
					if (tmpObj instanceof String) {
87
						try {
88
							item.setCid(Integer.parseInt((String) tmpObj));
89
						} catch (Exception e) {
90
							items.clear();
91
							break;
92
						}
93
					} else {
94
						items.clear();
95
						break;
61
			byte[] ba = baos.toByteArray();
62
			if (ba.length == 0) {
63
				errorData.put(" ", "EMPTY");
64
			} else {
65
				try {
66
					cnt = new String(baos.toByteArray(), ConstData.UTF8);
67
				} catch (Exception e) {
68
					errorData.put(new String(Base64.encodeBase64(ba), ConstData.UTF8), "CHARSET");
69
				}
70
				if (cnt != null) {
71
					try {
72
						param = JsonService.fromJson(cnt, DATA_TYPE);
73
					} catch (Exception e) {
74
						errorData.put(cnt, "JSON_PARSE");
96 75
					}
97
					tmpObj = ((List) obj).get(4);
98
					if (tmpObj instanceof String) {
99
						try {
100
							item.setLvalue(Integer.parseInt((String) tmpObj));
101
						} catch (Exception e) {
102
							items.clear();
103
							break;
76
					if (param != null) {
77
						for (Object obj : param) {
78
							if (obj instanceof List && ((List)obj).size()>5) {
79
								WaveDataItem item = new WaveDataItem();
80
								Object tmpObj = ((List) obj).get(0);
81
								if (tmpObj instanceof String) {
82
									item.setSeq((String) tmpObj);
83
								} else {
84
									items.clear();
85
									break;
86
								}
87
								tmpObj = ((List) obj).get(3);
88
								if (tmpObj instanceof String) {
89
									item.setCtime((String) tmpObj);
90
								} else {
91
									items.clear();
92
									break;
93
								}
94
								tmpObj = ((List) obj).get(1);
95
								if (tmpObj instanceof String) {
96
									try {
97
										item.setDid(Integer.parseInt((String) tmpObj));
98
									} catch (Exception e) {
99
										items.clear();
100
										break;
101
									}
102
								} else {
103
									items.clear();
104
									break;
105
								}
106
								tmpObj = ((List) obj).get(2);
107
								if (tmpObj instanceof String) {
108
									try {
109
										item.setCid(Integer.parseInt((String) tmpObj));
110
									} catch (Exception e) {
111
										items.clear();
112
										break;
113
									}
114
								} else {
115
									items.clear();
116
									break;
117
								}
118
								tmpObj = ((List) obj).get(4);
119
								if (tmpObj instanceof String) {
120
									try {
121
										item.setLvalue(Integer.parseInt((String) tmpObj));
122
									} catch (Exception e) {
123
										items.clear();
124
										break;
125
									}
126
								} else {
127
									items.clear();
128
									break;
129
								}
130
								tmpObj = ((List) obj).get(5);
131
								if (tmpObj instanceof String) {
132
									try {
133
										item.setHvalue(Integer.parseInt((String) tmpObj));
134
									} catch (Exception e) {
135
										items.clear();
136
										break;
137
									}
138
								} else {
139
									items.clear();
140
									break;
141
								}
142
								items.add(item);
143
							} else {
144
								items.clear();
145
								break;
146
							}
104 147
						}
105
					} else {
106
						items.clear();
107
						break;
108
					}
109
					tmpObj = ((List) obj).get(5);
110
					if (tmpObj instanceof String) {
111
						try {
112
							item.setHvalue(Integer.parseInt((String) tmpObj));
113
						} catch (Exception e) {
114
							items.clear();
115
							break;
148
					
149
						if(items.isEmpty()){
150
							errorData.put(cnt,"WAVEDATA_PARSE");
116 151
						}
117
					} else {
118
						items.clear();
119
						break;
120 152
					}
121
				} else {
122
					items.clear();
123
					break;
124 153
				}
125 154
			}
126 155
		} finally {
@ -137,10 +166,35 @@ public class WaveDataServlet extends HttpServlet {
137 166
		response.setContentType("application/json");
138 167
		java.io.PrintWriter out = response.getWriter();
139 168
		if (items.isEmpty()) {
140
			out.write("{\"status\":0,}");
169
			out.write("{\"status\":0}");
170
			JfwAppContext.getScheduledExecutorService().execute(new Runnable() {
171
				@Override
172
				public void run() {
173
					try {
174
						Connection con = dataSource.getConnection();
175
						try {
176
							for(Map.Entry<String,String> entry:errorData.entrySet()){
177
								WaveDataError wde = new WaveDataError();
178
								wde.setCnt(entry.getKey());
179
								wde.setReason(entry.getValue());
180
								wde.setRtime(System.currentTimeMillis());
181
								collectDao.insertWaveDataError(con, wde);
182
							}
183
							con.commit();
184
						} catch (SQLException e) {
185
							con.rollback();
186
						} finally {
187
							con.close();
188
						}
189
					} catch (Throwable thr) {
190
					}
191

192
				}
193
			});
194
			
141 195
			return;
142 196
		}
143
		out.write("{\"status\":1,}");
197
		out.write("{\"status\":1}");
144 198
		synchronized (DATA_CACHE) {
145 199
			DATA_CACHE.put(items.get(0).getSeq(), items);
146 200
		}
@ -164,7 +218,6 @@ public class WaveDataServlet extends HttpServlet {
164 218
		});
165 219
	}
166 220

167

168 221
	@Override
169 222
	public void init() throws ServletException {
170 223
		this.dataSource = JfwAppContext.getDataSource();

+ 1 - 1
src/main/java/com/ekexiu/project/bridge/system/service/DictService.java

@ -122,7 +122,7 @@ public class DictService {
122 122
	@Post
123 123
	@Path("/modify")
124 124
	public int update(@JdbcConn(true) Connection con, String code, String dict, @Nullable String bcode, String caption, @Nullable String fullCaption,
125
			@Nullable String shortCut, @Nullable String remark, boolean readonly, @AfterCommit List<Runnable> runs) throws SQLException {
125
			@Nullable String shortCut, @Nullable String remark, @AfterCommit List<Runnable> runs) throws SQLException {
126 126
		int num = this.dictDao.update(con, bcode, caption, fullCaption, shortCut, remark, code, dict);
127 127
		if (num > 0) {
128 128
			final DictItem item = new DictItem();

+ 282 - 0
src/main/resources/database.sql

@ -0,0 +1,282 @@
1
CREATE TABLE SYS_DICT (
2
        CODE TEXT NOT NULL,
3
        BCODE TEXT,
4
        DICT_CODE TEXT NOT NULL,
5
        CAPTION TEXT NOT NULL,
6
        FULL_CAPTION TEXT,
7
        SHORT_CUT TEXT,
8
        REMARK TEXT,
9
        READONLY CHAR(1) NOT NULL,
10
        ACTIVE CHAR(1) NOT NULL);
11
ALTER TABLE SYS_DICT ADD PRIMARY KEY (DICT_CODE,CODE);
12
COMMENT ON TABLE SYS_DICT IS '数据字典表';
13
COMMENT ON COLUMN SYS_DICT.CODE IS '字典项编码';
14
COMMENT ON COLUMN SYS_DICT.BCODE IS '字典项编码(业务编码)';
15
COMMENT ON COLUMN SYS_DICT.DICT_CODE IS '字典编码';
16
COMMENT ON COLUMN SYS_DICT.CAPTION IS '字典项显示';
17
COMMENT ON COLUMN SYS_DICT.FULL_CAPTION IS '字典项显示(全)';
18
COMMENT ON COLUMN SYS_DICT.SHORT_CUT IS '助记码';
19
COMMENT ON COLUMN SYS_DICT.REMARK IS '备注';
20
COMMENT ON COLUMN SYS_DICT.READONLY IS '是否只读';
21
COMMENT ON COLUMN SYS_DICT.ACTIVE IS '是否有效';
22

23
CREATE TABLE NOTICE (
24
        CNT TEXT,
25
        MODIFIER CHAR(32) NOT NULL,
26
        MODIFY_TIME CHAR(14) NOT NULL);
27
COMMENT ON TABLE NOTICE IS '系统公告';
28
COMMENT ON COLUMN NOTICE.CNT IS '备注';
29
COMMENT ON COLUMN NOTICE.MODIFIER IS '最后修改人ID';
30
COMMENT ON COLUMN NOTICE.MODIFY_TIME IS '最后修改时间(YYYYMMDDHH24MISS),初始值:20000101010101';
31

32
CREATE TABLE LUSER (
33
        ACTIVE CHAR(1) NOT NULL,
34
        PASSWD TEXT NOT NULL,
35
        ID CHAR(32) NOT NULL,
36
        NAME TEXT NOT NULL,
37
        ACCOUNT TEXT NOT NULL,
38
        COMP TEXT NOT NULL,
39
        JOB TEXT NOT NULL,
40
        PHONE TEXT,
41
        EMAIL TEXT,
42
        REMARK TEXT,
43
        TYPE INTEGER NOT NULL,
44
        CREATE_TIME CHAR(14) NOT NULL,
45
        MODIFY_TIME CHAR(14) NOT NULL,
46
        CREATOR CHAR(32) NOT NULL,
47
        MODIFIER CHAR(32) NOT NULL);
48
ALTER TABLE LUSER ADD PRIMARY KEY (ID);
49
ALTER TABLE LUSER ADD UNIQUE (ACCOUNT);
50
COMMENT ON TABLE LUSER IS '用户表';
51
COMMENT ON COLUMN LUSER.ACTIVE IS '是否可用';
52
COMMENT ON COLUMN LUSER.PASSWD IS '密码(MD5)';
53
COMMENT ON COLUMN LUSER.ID IS '用户ID';
54
COMMENT ON COLUMN LUSER.NAME IS '用户姓名';
55
COMMENT ON COLUMN LUSER.ACCOUNT IS '用户帐号';
56
COMMENT ON COLUMN LUSER.COMP IS '用户所属单位';
57
COMMENT ON COLUMN LUSER.JOB IS '用户职位';
58
COMMENT ON COLUMN LUSER.PHONE IS '联系电话';
59
COMMENT ON COLUMN LUSER.EMAIL IS '联系邮件';
60
COMMENT ON COLUMN LUSER.REMARK IS '备注';
61
COMMENT ON COLUMN LUSER.TYPE IS '账户类型';
62
COMMENT ON COLUMN LUSER.CREATE_TIME IS '创建时间(YYYYMMDDHH24MISS)不可修改';
63
COMMENT ON COLUMN LUSER.MODIFY_TIME IS '最后修改时间(YYYYMMDDHH24MISS),初始值:20000101010101';
64
COMMENT ON COLUMN LUSER.CREATOR IS '创建人ID';
65
COMMENT ON COLUMN LUSER.MODIFIER IS '最后修改人ID';
66

67

68
CREATE TABLE BRIDGE (
69
        ID CHAR(32) NOT NULL,
70
        ACTIVE CHAR(1) NOT NULL,
71
        CODE TEXT NOT NULL,
72
        SHORT_NAME TEXT NOT NULL,
73
        NAME TEXT NOT NULL,
74
        ADDR_CODE TEXT NOT NULL,
75
        SERVICE_DAY TEXT NOT NULL,
76
        LOCATION TEXT NOT NULL,
77
        DESCP TEXT,
78
        REMARK TEXT,
79
        IMG TEXT NOT NULL,
80
        ORG TEXT NOT NULL,
81
        PHONE TEXT NOT NULL,
82
        EMAIL TEXT NOT NULL,
83
        CREATE_TIME CHAR(14) NOT NULL,
84
        MODIFY_TIME CHAR(14) NOT NULL,
85
        CREATOR CHAR(32) NOT NULL,
86
        MODIFIER CHAR(32) NOT NULL);
87
ALTER TABLE BRIDGE ADD PRIMARY KEY (ID);
88
ALTER TABLE BRIDGE ADD UNIQUE (SHORT_NAME);
89
ALTER TABLE BRIDGE ADD UNIQUE (NAME);
90
COMMENT ON TABLE BRIDGE IS '桥梁信息';
91
COMMENT ON COLUMN BRIDGE.ID IS 'id';
92
COMMENT ON COLUMN BRIDGE.ACTIVE IS '是否可用';
93
COMMENT ON COLUMN BRIDGE.CODE IS '桥梁编号';
94
COMMENT ON COLUMN BRIDGE.SHORT_NAME IS '桥梁简称';
95
COMMENT ON COLUMN BRIDGE.NAME IS '桥梁名称(全称)';
96
COMMENT ON COLUMN BRIDGE.ADDR_CODE IS '桥梁政区划编码';
97
COMMENT ON COLUMN BRIDGE.SERVICE_DAY IS '桥梁开通日期(YYYYMMDD)';
98
COMMENT ON COLUMN BRIDGE.LOCATION IS '桥梁定位';
99
COMMENT ON COLUMN BRIDGE.DESCP IS '桥梁详细描述';
100
COMMENT ON COLUMN BRIDGE.REMARK IS '桥梁备注';
101
COMMENT ON COLUMN BRIDGE.ORG IS '桥梁维护机构名称';
102
COMMENT ON COLUMN BRIDGE.PHONE IS '桥梁维护机构电话';
103
COMMENT ON COLUMN BRIDGE.EMAIL IS '桥梁维护机构电邮';
104
COMMENT ON COLUMN BRIDGE.CREATE_TIME IS '创建时间(YYYYMMDDHH24MISS)不可修改';
105
COMMENT ON COLUMN BRIDGE.MODIFY_TIME IS '最后修改时间(YYYYMMDDHH24MISS),初始值:20000101010101';
106
COMMENT ON COLUMN BRIDGE.CREATOR IS '创建人ID';
107
COMMENT ON COLUMN BRIDGE.MODIFIER IS '最后修改人ID';
108

109

110
CREATE TABLE USER_BRIDGE (
111
        UID TEXT NOT NULL,
112
        BRIDGE TEXT NOT NULL);
113
COMMENT ON TABLE USER_BRIDGE IS '用户桥梁';
114
COMMENT ON COLUMN USER_BRIDGE.UID IS '用户ID';
115
COMMENT ON COLUMN USER_BRIDGE.BRIDGE IS '桥梁ID';
116

117
CREATE TABLE BRIDGE_SERVER (
118
        ID CHAR(32) NOT NULL,
119
        SEQ TEXT NOT NULL,
120
        ACTIVE CHAR(1) NOT NULL,
121
        CODE TEXT NOT NULL,
122
        BRIDGE_ID TEXT NOT NULL,
123
        IP TEXT NOT NULL,
124
        DEVICES INTEGER NOT NULL,
125
        REMARK TEXT,
126
        CREATE_TIME CHAR(14) NOT NULL,
127
        MODIFY_TIME CHAR(14) NOT NULL,
128
        CREATOR CHAR(32) NOT NULL,
129
        MODIFIER CHAR(32) NOT NULL);
130
ALTER TABLE BRIDGE_SERVER ADD PRIMARY KEY (ID);
131
COMMENT ON TABLE BRIDGE_SERVER IS '采集服务器';
132
COMMENT ON COLUMN BRIDGE_SERVER.ID IS 'id';
133
COMMENT ON COLUMN BRIDGE_SERVER.SEQ IS '内部编号';
134
COMMENT ON COLUMN BRIDGE_SERVER.ACTIVE IS '是否可用';
135
COMMENT ON COLUMN BRIDGE_SERVER.CODE IS '采集服务器编号';
136
COMMENT ON COLUMN BRIDGE_SERVER.BRIDGE_ID IS '采集服务器所属桥梁Id';
137
COMMENT ON COLUMN BRIDGE_SERVER.IP IS '采集服务器IP';
138
COMMENT ON COLUMN BRIDGE_SERVER.DEVICES IS '采集盒数量';
139
COMMENT ON COLUMN BRIDGE_SERVER.REMARK IS '备注';
140
COMMENT ON COLUMN BRIDGE_SERVER.CREATE_TIME IS '创建时间(YYYYMMDDHH24MISS)不可修改';
141
COMMENT ON COLUMN BRIDGE_SERVER.MODIFY_TIME IS '最后修改时间(YYYYMMDDHH24MISS),初始值:20000101010101';
142
COMMENT ON COLUMN BRIDGE_SERVER.CREATOR IS '创建人ID';
143
COMMENT ON COLUMN BRIDGE_SERVER.MODIFIER IS '最后修改人ID';
144

145
CREATE TABLE COLLECT_DEVICE (
146
        ID CHAR(32) NOT NULL,
147
        SEQ INTEGER NOT NULL,
148
        CODE TEXT NOT NULL,
149
        SERVER_ID TEXT NOT NULL,
150
        CHANNELS INTEGER NOT NULL,
151
        REMARK TEXT,
152
        ACTIVE CHAR(1) NOT NULL,
153
        CREATE_TIME CHAR(14) NOT NULL,
154
        MODIFY_TIME CHAR(14) NOT NULL,
155
        CREATOR CHAR(32) NOT NULL,
156
        MODIFIER CHAR(32) NOT NULL);
157
ALTER TABLE COLLECT_DEVICE ADD PRIMARY KEY (ID);
158
COMMENT ON TABLE COLLECT_DEVICE IS '采集盒';
159
COMMENT ON COLUMN COLLECT_DEVICE.ID IS 'id';
160
COMMENT ON COLUMN COLLECT_DEVICE.SEQ IS '内部编号';
161
COMMENT ON COLUMN COLLECT_DEVICE.CODE IS '采集盒编号';
162
COMMENT ON COLUMN COLLECT_DEVICE.SERVER_ID IS '采集盒所属服务器ID';
163
COMMENT ON COLUMN COLLECT_DEVICE.CHANNELS IS '采集盒信道数量';
164
COMMENT ON COLUMN COLLECT_DEVICE.REMARK IS '备注';
165
COMMENT ON COLUMN COLLECT_DEVICE.ACTIVE IS '是否可用';
166
COMMENT ON COLUMN COLLECT_DEVICE.CREATE_TIME IS '创建时间(YYYYMMDDHH24MISS)不可修改';
167
COMMENT ON COLUMN COLLECT_DEVICE.MODIFY_TIME IS '最后修改时间(YYYYMMDDHH24MISS),初始值:20000101010101';
168
COMMENT ON COLUMN COLLECT_DEVICE.CREATOR IS '创建人ID';
169
COMMENT ON COLUMN COLLECT_DEVICE.MODIFIER IS '最后修改人ID';
170

171

172
CREATE TABLE TRANSDUCER (
173
        ID CHAR(32) NOT NULL,
174
        SEQ INTEGER NOT NULL,
175
        CODE TEXT NOT NULL,
176
        DEVICE_ID TEXT NOT NULL,
177
        CABLE_TYPE TEXT NOT NULL,
178
        LOC_TYPE TEXT NOT NULL,
179
        REMARK TEXT,
180
        ACTIVE CHAR(1) NOT NULL,
181
        CREATE_TIME CHAR(14) NOT NULL,
182
        MODIFY_TIME CHAR(14) NOT NULL,
183
        CREATOR CHAR(32) NOT NULL,
184
        MODIFIER CHAR(32) NOT NULL);
185
ALTER TABLE TRANSDUCER ADD PRIMARY KEY (ID);
186
COMMENT ON TABLE TRANSDUCER IS '传感器';
187
COMMENT ON COLUMN TRANSDUCER.ID IS 'id';
188
COMMENT ON COLUMN TRANSDUCER.SEQ IS '内部编号';
189
COMMENT ON COLUMN TRANSDUCER.CODE IS '采集盒编号';
190
COMMENT ON COLUMN TRANSDUCER.DEVICE_ID IS '传感器编号';
191
COMMENT ON COLUMN TRANSDUCER.CABLE_TYPE IS '传感器所在主缆(dict)';
192
COMMENT ON COLUMN TRANSDUCER.LOC_TYPE IS '传感器所在位置(dict)';
193
COMMENT ON COLUMN TRANSDUCER.REMARK IS '备注';
194
COMMENT ON COLUMN TRANSDUCER.ACTIVE IS '是否可用';
195
COMMENT ON COLUMN TRANSDUCER.CREATE_TIME IS '创建时间(YYYYMMDDHH24MISS)不可修改';
196
COMMENT ON COLUMN TRANSDUCER.MODIFY_TIME IS '最后修改时间(YYYYMMDDHH24MISS),初始值:20000101010101';
197
COMMENT ON COLUMN TRANSDUCER.CREATOR IS '创建人ID';
198
COMMENT ON COLUMN TRANSDUCER.MODIFIER IS '最后修改人ID';
199

200
CREATE TABLE ALARM_DATA_ITEM (
201
        ID TEXT NOT NULL,
202
        SEQ INTEGER NOT NULL,
203
        STIME TEXT NOT NULL,
204
        ATIME TEXT NOT NULL,
205
        DATA TEXT NOT NULL);
206
ALTER TABLE ALARM_DATA_ITEM ADD PRIMARY KEY (ID,SEQ);
207
COMMENT ON TABLE ALARM_DATA_ITEM IS '报警数据';
208
COMMENT ON COLUMN ALARM_DATA_ITEM.ID IS '报警编号';
209
COMMENT ON COLUMN ALARM_DATA_ITEM.SEQ IS '传感内部编号';
210
COMMENT ON COLUMN ALARM_DATA_ITEM.STIME IS '起始时间';
211
COMMENT ON COLUMN ALARM_DATA_ITEM.ATIME IS '报警时间';
212
COMMENT ON COLUMN ALARM_DATA_ITEM.DATA IS '报警数据,共300个数据点,以英文逗号分隔';
213

214

215
CREATE TABLE ALARM_MSG (
216
        UID CHAR(32) NOT NULL,
217
        AID TEXT NOT NULL,
218
        SERVER TEXT NOT NULL,
219
        DEVICE INTEGER NOT NULL,
220
        READED CHAR(1) NOT NULL,
221
        READ_TIME TEXT,
222
        CREATE_TIME CHAR(14) NOT NULL,
223
        ALARM_TIME TEXT NOT NULL);
224
ALTER TABLE ALARM_MSG ADD PRIMARY KEY (UID,AID);
225
COMMENT ON TABLE ALARM_MSG IS '报警消息';
226
COMMENT ON COLUMN ALARM_MSG.UID IS '用户ID';
227
COMMENT ON COLUMN ALARM_MSG.AID IS '报警ID';
228
COMMENT ON COLUMN ALARM_MSG.SERVER IS '采集服务器内部编号';
229
COMMENT ON COLUMN ALARM_MSG.DEVICE IS '采集盒内部编号';
230
COMMENT ON COLUMN ALARM_MSG.READED IS '是否已读';
231
COMMENT ON COLUMN ALARM_MSG.READ_TIME IS '读取时间';
232
COMMENT ON COLUMN ALARM_MSG.CREATE_TIME IS '创建时间(YYYYMMDDHH24MISS)不可修改';
233
COMMENT ON COLUMN ALARM_MSG.ALARM_TIME IS '报警时间';
234

235

236
CREATE TABLE WAVE_DATA_ITEM (
237
        SEQ TEXT NOT NULL,
238
        CTIME TEXT NOT NULL,
239
        DID INTEGER NOT NULL,
240
        CID INTEGER NOT NULL,
241
        HVALUE INTEGER NOT NULL,
242
        LVALUE INTEGER NOT NULL);
243
ALTER TABLE WAVE_DATA_ITEM ADD PRIMARY KEY (CTIME,SEQ,DID,CID);
244
COMMENT ON TABLE WAVE_DATA_ITEM IS '监控历史数据';
245
COMMENT ON COLUMN WAVE_DATA_ITEM.SEQ IS '采集服务器内部编号';
246
COMMENT ON COLUMN WAVE_DATA_ITEM.CTIME IS '上传时间(YYYYMMDDHH24MISS';
247
COMMENT ON COLUMN WAVE_DATA_ITEM.DID IS '采集盒内部编号';
248
COMMENT ON COLUMN WAVE_DATA_ITEM.CID IS '传感器内部编号';
249
COMMENT ON COLUMN WAVE_DATA_ITEM.HVALUE IS '一秒内最大幅度值';
250
COMMENT ON COLUMN WAVE_DATA_ITEM.LVALUE IS '一秒内最小幅度值';
251

252

253

254
INSERT INTO LUSER (active, passwd, id, name,account, comp,job,phone,email,remark,type, create_time,modify_time, creator, modifier) 
255
VALUES 
256
('1', 'E10ADC3949BA59ABBE56E057F20F883E', '77005D20EAB44360918AFD2EA5B867AE', 'admin', '18888888888', 'kexiu', 'a', '18888888888', 
257
'admin@ekexiu.com', NULL, '1', '20180801123001', '20000101010101', '77005D20EAB44360918AFD2EA5B867AE', '77005D20EAB44360918AFD2EA5B867AE');
258

259
INSERT INTO sys_dict (code, bcode, dict_code, caption, full_caption, short_cut, remark, readonly, active) VALUES ('01', NULL, 'ZLLX', '上游主缆', NULL, NULL, NULL, '0', '1');
260
INSERT INTO sys_dict (code, bcode, dict_code, caption, full_caption, short_cut, remark, readonly, active) VALUES ('02', NULL, 'ZLLX', '下游主缆', NULL, NULL, NULL, '0', '1');
261
INSERT INTO sys_dict (code, bcode, dict_code, caption, full_caption, short_cut, remark, readonly, active) VALUES ('01', NULL, 'ZLWZ', '东跨', NULL, NULL, NULL, '0', '1');
262
INSERT INTO sys_dict (code, bcode, dict_code, caption, full_caption, short_cut, remark, readonly, active) VALUES ('02', NULL, 'ZLWZ', '西跨', NULL, NULL, NULL, '0', '1');
263

264
CREATE TABLE ALARM_DATA_ERROR (
265
        CNT TEXT NOT NULL,
266
        RTIME BIGINT NOT NULL,
267
        REASON TEXT NOT NULL);
268
COMMENT ON TABLE ALARM_DATA_ERROR IS '报警数据错误表';
269
COMMENT ON COLUMN ALARM_DATA_ERROR.CNT IS '接口数据';
270
COMMENT ON COLUMN ALARM_DATA_ERROR.RTIME IS '接口数据接收时间';
271
COMMENT ON COLUMN ALARM_DATA_ERROR.REASON IS '接口数据错误原因';
272

273
CREATE TABLE WAVE_DATA_ERROR (
274
        CNT TEXT NOT NULL,
275
        RTIME BIGINT NOT NULL,
276
        REASON TEXT NOT NULL);
277
COMMENT ON TABLE WAVE_DATA_ERROR IS '实时数据错误表';
278
COMMENT ON COLUMN WAVE_DATA_ERROR.CNT IS '接口数据';
279
COMMENT ON COLUMN WAVE_DATA_ERROR.RTIME IS '接口数据接收时间';
280
COMMENT ON COLUMN WAVE_DATA_ERROR.REASON IS '接口数据错误原因';
281

282
INSERT INTO notice(cnt,modifier,modify_time) VALUES ('欢迎使用本系统!', '111                             ', '20180101010101');

+ 3 - 3
src/main/resources/project.properties

@ -1,8 +1,8 @@
1 1
dataSource=com.alibaba.druid.pool.DruidDataSource
2 2
#数据库连接地址、名称、密码
3
dataSource.url=jdbc:postgresql://localhost:5432/bridge
3
dataSource.url=jdbc:postgresql://47.100.53.9:5432/bridge
4 4
dataSource.username=postgres
5
dataSource.password=postgres
5
dataSource.password=postgres_bridge
6 6
#连接池启动时的初始值(初始化连接)
7 7
dataSource.initialSize::int=1
8 8
#最小空闲连接值
@ -30,4 +30,4 @@ dataSource.maxPoolPreparedStatementPerConnectionSize::int=20
30 30
#默认的SQL语句自动提交状态(开启或关闭)设置由连接池本身设置(false由连接池定)
31 31
dataSource.defaultAutoCommit::boolean=false
32 32
33
com_ekexiu_portal_ware_WareService.imgPath::java.io.File=D:/tmp/data/bridge
33
com_ekexiu_project_bridge_resource_service_BridgeService.imgPath::java.io.File=/bridge/web_data/data/bridge