main
han-l 2 years ago
parent 9e891fb0a9
commit efb893d615

@ -51,7 +51,7 @@ public class WebSocketController {
} else if (command.equals("close")) {
portInfoSocketAsyncService.removeIsOpen(socketId + resultMap.get("staNoPortNo").toString());
} else if (command.equals("Untitled")) {
portInfoSocketAsyncService.getUntitled(resultMap.get("manNo").toString(), session, resultMap.get("staNo").toString());
portInfoSocketAsyncService.getUntitled(resultMap.get("manNo").toString(), session, resultMap.get("staNo").toString(),Boolean.parseBoolean(resultMap.get("isFirst").toString()) );
} else if (command.equals("closeUntitled")) {
portInfoSocketAsyncService.closeUntitled();
}

@ -125,8 +125,10 @@ public class PortInfoSocketAsyncService {
public List<String> staList = new ArrayList<>();
@Async("CentralizedMonitoringThreadPool")
public void getUntitled(String manNo, Session session, String staNo) {
reloadUntitledMap(manNo);
public void getUntitled(String manNo, Session session, String staNo, boolean isFirst) {
if (isFirst) {
reloadUntitledMap(manNo);
}
List<Map<String, String>> List = getUntitledByDB(dbMap, staNo);
if (List != null && List.size() > 0) {
WebsocketUtil.sendMessage(session, getSocketResult("", "Untitled", JSONArray.toJSONString(List)));
@ -184,6 +186,9 @@ public class PortInfoSocketAsyncService {
}
}
}
// o1.compareToo2 升序
// o2.compareToo1 降序
list.sort((o1, o2) -> o2.get("datemark").compareTo(o1.get("datemark")));
return list;
}
}

@ -5,7 +5,7 @@
<link rel="icon" href="/favicon.ico"/>
<title></title>
<script type="module" crossorigin src="./assets/index.975a1f81.js"></script>
<script type="module" crossorigin src="./assets/index.8e23a08c.js"></script>
<link rel="stylesheet" href="./assets/index.38f67042.css">
</head>
<body>

@ -2,8 +2,16 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="3f61f33b-1398-438f-b18e-516860fc6663" name="更改" comment="">
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/resources/static/View/assets/index.38f67042.css" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/resources/static/View/assets/index.975a1f81.js" beforeDir="false" />
<change afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/resources/static/View/assets/index.38f67042.css" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/resources/static/View/assets/index.8e23a08c.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/CentralizedMonitoring/assets/index.8e23a08c.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/controller/WebSocketController.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/controller/WebSocketController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/service/PortInfoSocketAsyncService.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/service/PortInfoSocketAsyncService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/resources/static/View/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/resources/static/View/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CentralizedMonitoring/assets/index.975a1f81.js" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CentralizedMonitoring/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/CentralizedMonitoring/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/views/CarLine/components/PortInfo.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/CarLine/components/PortInfo.vue" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -91,6 +99,7 @@
<workItem from="1701066715379" duration="1825000" />
<workItem from="1701218529863" duration="1213000" />
<workItem from="1701224666672" duration="769000" />
<workItem from="1701306952152" duration="2398000" />
</task>
<task id="LOCAL-00001" summary="变更">
<created>1699319109952</created>

@ -5,7 +5,7 @@
<link rel="icon" href="/favicon.ico"/>
<title></title>
<script type="module" crossorigin src="./assets/index.975a1f81.js"></script>
<script type="module" crossorigin src="./assets/index.8e23a08c.js"></script>
<link rel="stylesheet" href="./assets/index.38f67042.css">
</head>
<body>

@ -91,6 +91,7 @@ export default {
logsDialog: false,
staNoPortNo: '',
labelName: '',
isFirst: true,
manNo: localStorage.getItem("mannoDe")
}
},
@ -200,6 +201,9 @@ export default {
mapData.CarInfo = data.value;
}
} else if (data.type == 'Untitled') {
if (!this.isFirst) {
this.isFirst = false
}
this.$emit('changeUntitledData', JSON.parse(data.value))
}
if (data.type == 'CarInfo' || data.type == 'ImgBase64' || data.type == 'ComStr' || data.type == 'ComStrList') {
@ -270,7 +274,7 @@ export default {
this.logsDialog = true
},
sendUntitled(staNo) {
let _bar = {"manNo": this.manNo, "command": "Untitled", "staNo": staNo}
let _bar = {"manNo": this.manNo, "command": "Untitled", "staNo": staNo, "isFirst": this.isFirst}
this.socket.send(JSON.stringify(_bar));
}
},

Loading…
Cancel
Save