parent
a7e0026e79
commit
9820b845d4
|
@ -1,6 +1,6 @@
|
|||
server:
|
||||
# port: 6379
|
||||
port: 9999
|
||||
port: 6379
|
||||
# port: 9999
|
||||
servlet:
|
||||
context-path: /admin
|
||||
|
||||
|
@ -12,18 +12,18 @@ spring:
|
|||
type: redis
|
||||
data:
|
||||
redis:
|
||||
host: 192.168.244.129
|
||||
# host: localhost
|
||||
# port: 6378
|
||||
# host: 192.168.244.129
|
||||
host: localhost
|
||||
port: 6378
|
||||
# 数据库相关配置
|
||||
datasource:
|
||||
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
|
||||
# password: Xg137839
|
||||
# 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
|
||||
# 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
|
||||
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:
|
||||
properties:
|
||||
|
@ -107,17 +107,17 @@ mybatis-plus:
|
|||
|
||||
vital-sign:
|
||||
mongodb:
|
||||
host: 192.168.244.129:27017
|
||||
password: root
|
||||
username: root
|
||||
# host: localhost:27017
|
||||
# password: Xg137839mg
|
||||
# username: useradmin
|
||||
# host: 192.168.244.129:27017
|
||||
# password: root
|
||||
# username: root
|
||||
host: localhost:27017
|
||||
password: Xg137839mg
|
||||
username: useradmin
|
||||
|
||||
mysql:
|
||||
host: 192.168.244.129:3306
|
||||
password: root
|
||||
username: root
|
||||
# host: localhost:3306
|
||||
# password: Xg137839
|
||||
# host: 192.168.244.129:3306
|
||||
# password: root
|
||||
# username: root
|
||||
host: 110.41.142.124:3306
|
||||
password: Xg137839
|
||||
username: root
|
||||
|
|
|
@ -35,9 +35,9 @@ public class MachineFeedbackHandler implements WebSocketHandler {
|
|||
// yyyyMMdd
|
||||
String date = jsonObject.getString("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
|
||||
|
|
|
@ -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.get(database).equals(session.getId())) {
|
||||
sendUserMessage(database, session);
|
||||
sendUserMessage(database, session, code);
|
||||
} else {
|
||||
JSONObject msg = new JSONObject();
|
||||
msg.put("status", 1);
|
||||
|
@ -388,16 +388,16 @@ public class VitalSignTimer {
|
|||
}
|
||||
} else {
|
||||
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();
|
||||
if (userDatabaseSessionMap.containsKey(database)) {
|
||||
String userSessionId = userDatabaseSessionMap.get(database);
|
||||
WebSocketSession webSocketSession = userSessionMap.get(userSessionId);
|
||||
result.put("status", 0);
|
||||
result.put("status", code);
|
||||
result.put("msg", "");
|
||||
webSocketSession.sendMessage(new TextMessage(result.toJSONString().getBytes()));
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user