parent
a7e0026e79
commit
9820b845d4
|
@ -1,6 +1,6 @@
|
||||||
server:
|
server:
|
||||||
# port: 6379
|
port: 6379
|
||||||
port: 9999
|
# port: 9999
|
||||||
servlet:
|
servlet:
|
||||||
context-path: /admin
|
context-path: /admin
|
||||||
|
|
||||||
|
@ -12,18 +12,18 @@ spring:
|
||||||
type: redis
|
type: redis
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
host: 192.168.244.129
|
# host: 192.168.244.129
|
||||||
# host: localhost
|
host: localhost
|
||||||
# port: 6378
|
port: 6378
|
||||||
# 数据库相关配置
|
# 数据库相关配置
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
username: root
|
|
||||||
password: root
|
|
||||||
url: jdbc:mysql://192.168.244.129:3306/rax_backend?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&nullCatalogMeansCurrent=true
|
|
||||||
# username: root
|
# username: root
|
||||||
# password: Xg137839
|
# password: root
|
||||||
# url: jdbc:mysql://localhost:3306/rax_backend?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&nullCatalogMeansCurrent=true
|
# url: jdbc:mysql://192.168.244.129:3306/rax_backend?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&nullCatalogMeansCurrent=true
|
||||||
|
username: root
|
||||||
|
password: Xg137839
|
||||||
|
url: jdbc:mysql://110.41.142.124:3306/rax_backend?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&nullCatalogMeansCurrent=true
|
||||||
# 定时任务属性配置
|
# 定时任务属性配置
|
||||||
quartz:
|
quartz:
|
||||||
properties:
|
properties:
|
||||||
|
@ -107,17 +107,17 @@ mybatis-plus:
|
||||||
|
|
||||||
vital-sign:
|
vital-sign:
|
||||||
mongodb:
|
mongodb:
|
||||||
host: 192.168.244.129:27017
|
# host: 192.168.244.129:27017
|
||||||
password: root
|
# password: root
|
||||||
username: root
|
# username: root
|
||||||
# host: localhost:27017
|
host: localhost:27017
|
||||||
# password: Xg137839mg
|
password: Xg137839mg
|
||||||
# username: useradmin
|
username: useradmin
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
host: 192.168.244.129:3306
|
# host: 192.168.244.129:3306
|
||||||
password: root
|
# password: root
|
||||||
username: root
|
|
||||||
# host: localhost:3306
|
|
||||||
# password: Xg137839
|
|
||||||
# username: root
|
# username: root
|
||||||
|
host: 110.41.142.124:3306
|
||||||
|
password: Xg137839
|
||||||
|
username: root
|
||||||
|
|
|
@ -35,9 +35,9 @@ public class MachineFeedbackHandler implements WebSocketHandler {
|
||||||
// yyyyMMdd
|
// yyyyMMdd
|
||||||
String date = jsonObject.getString("date");
|
String date = jsonObject.getString("date");
|
||||||
String databaseName = DatabaseNameUtil.encrypt(patientName) + "_" + DatabaseNameUtil.encrypt(idNum) + "_" + date;
|
String databaseName = DatabaseNameUtil.encrypt(patientName) + "_" + DatabaseNameUtil.encrypt(idNum) + "_" + date;
|
||||||
jsonObject.getBoolean("status");
|
String code = jsonObject.getString("code");
|
||||||
|
|
||||||
vitalSignTimer.sendMachineFlag(databaseName, session);
|
vitalSignTimer.sendMachineFlag(databaseName, code, session);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -376,10 +376,10 @@ public class VitalSignTimer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void sendMachineFlag(String database, WebSocketSession session) throws IOException {
|
public synchronized void sendMachineFlag(String database, String code, WebSocketSession session) throws IOException {
|
||||||
if (machineDatabaseSessionMap.containsKey(database)) {
|
if (machineDatabaseSessionMap.containsKey(database)) {
|
||||||
if (machineDatabaseSessionMap.get(database).equals(session.getId())) {
|
if (machineDatabaseSessionMap.get(database).equals(session.getId())) {
|
||||||
sendUserMessage(database, session);
|
sendUserMessage(database, session, code);
|
||||||
} else {
|
} else {
|
||||||
JSONObject msg = new JSONObject();
|
JSONObject msg = new JSONObject();
|
||||||
msg.put("status", 1);
|
msg.put("status", 1);
|
||||||
|
@ -388,16 +388,16 @@ public class VitalSignTimer {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
machineDatabaseSessionMap.put(database, session.getId());
|
machineDatabaseSessionMap.put(database, session.getId());
|
||||||
sendUserMessage(database, session);
|
sendUserMessage(database, session, code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void sendUserMessage(String database, WebSocketSession session) throws IOException {
|
private synchronized void sendUserMessage(String database, WebSocketSession session, String code) throws IOException {
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
if (userDatabaseSessionMap.containsKey(database)) {
|
if (userDatabaseSessionMap.containsKey(database)) {
|
||||||
String userSessionId = userDatabaseSessionMap.get(database);
|
String userSessionId = userDatabaseSessionMap.get(database);
|
||||||
WebSocketSession webSocketSession = userSessionMap.get(userSessionId);
|
WebSocketSession webSocketSession = userSessionMap.get(userSessionId);
|
||||||
result.put("status", 0);
|
result.put("status", code);
|
||||||
result.put("msg", "");
|
result.put("msg", "");
|
||||||
webSocketSession.sendMessage(new TextMessage(result.toJSONString().getBytes()));
|
webSocketSession.sendMessage(new TextMessage(result.toJSONString().getBytes()));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user