main
han-l 2 years ago
parent c9901ce8c3
commit 890f253583

@ -21,6 +21,8 @@ public class ThreadPoolConfig {
executor.setQueueCapacity(300);
executor.setKeepAliveSeconds(300);
executor.setThreadNamePrefix("NORMAL--");
executor.setAwaitTerminationSeconds(60);
executor.setWaitForTasksToCompleteOnShutdown(true);
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.AbortPolicy());
executor.initialize();
return executor;

@ -1,96 +1,126 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nmgs.mapper.CarLineMapper">
<select id="selectStaList" resultType="java.util.Map">
SELECT a.*
FROM NAME_TABLE_DCOM a INNER JOIN USER_STA_TABLE b on a.STANO=b.STANO
WHERE a.USERTYPE = 1
AND (a.SUBCOMNO = ${STANO} OR a.STANO = ${STANO})
<if test="manNo !=null and manNo!=0">
AND b.MANNO=${manNo}
</if>
</select>
<select id="selectPortBySta" resultType="java.util.Map">
SELECT CAST(PORTNO AS VARCHAR(100)) + '车道' + '-' + b.TEXT labelName,
CAST(a.STANO AS VARCHAR(100)) + '-' + CAST(PORTNO AS VARCHAR(100)) treeId,
#{STANAME} STANAME,
a.*
FROM SETUP_TABLE a
LEFT JOIN PORTTYPE_TEXT b ON a.PORTTYPE = b.VALUE
WHERE a.STANO = ${STANO}
ORDER BY a.PORTNO
</select>
<select id="selectPortLogs" resultType="java.util.Map">
SELECT * FROM ${tableName}
<where>
<if test="text != null and text != '' ">
<bind name="text" value="'%'+text+'%'"/>
AND TEXT LIKE #{text}
</if>
<if test="startHour != null and startHour != '' ">
AND HOUR >= ${startHour}
</if>
<if test="endHour != null and endHour != '' ">
AND HOUR &lt;= ${endHour}
</if>
<if test="CARNO != null and CARNO != '' ">
AND CARNO = #{carNo}
</if>
AND STANO=${staNo}
AND PORTNO=${portNo}
</where>
ORDER BY TIME
</select>
<select id="getAllStaList" resultType="java.util.Map">
SELECT b.*,c.PORTNO
FROM NAME_TABLE_DCOM a
INNER JOIN IP_PORT_TYPE_TEXT b on a.STANO=b.STANO
LEFT JOIN SETUP_TABLE c on c.STANO=a.STANO
WHERE a.USERTYPE = 1
AND (a.SUBCOMNO = ${STANO} OR a.STANO = ${STANO})
AND b.TEXT='集中监控车道日志'
ORDER BY c.PORTNO
</select>
<select id="getOnlySta" resultType="java.util.Map">
SELECT
b.*
FROM
NAME_TABLE_DCOM a
INNER JOIN IP_PORT_TYPE_TEXT b ON a.STANO= b.STANO
WHERE
a.USERTYPE = 1
AND (a.SUBCOMNO = ${STANO} OR a.STANO = ${STANO})
AND b.TEXT= '集中监控车道日志'
ORDER BY
a.STANO
</select>
<select id="getTypeText" resultType="java.util.Map">
SELECT * FROM TYPE_TEXT
</select>
<select id="getKindText" resultType="java.util.Map">
SELECT * FROM KIND_TEXT
</select>
<select id="getFlagText" resultType="java.util.Map">
SELECT * FROM FLAG_TEXT
</select>
<select id="getClassNo" resultType="java.util.Map">
SELECT * FROM CLASSNO_TEXT
</select>
<select id="getStaName" resultType="java.util.Map">
SELECT STANO,STANAME FROM NAME_TABLE_DCOM WHERE USERTYPE=1
</select>
<select id="getStaByManNo" resultType="java.lang.String">
SELECT STANO FROM USER_STA_TABLE
<if test="manNo !=null and manNo!=0">
WHERE MANNO=${manNo}
</if>
</select>
<select id="getStaNameByManNo" resultType="java.util.Map">
SELECT a.STANO,b.STANAME FROM USER_STA_TABLE a INNER JOIN NAME_TABLE_DCOM b on a.STANO=b.STANO
<if test="manNo !=null and manNo!=0">
WHERE a.MANNO=${manNo}
</if>
</select>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nmgs.mapper.CarLineMapper">
<select id="selectStaList" resultType="java.util.Map">
SELECT a.*
FROM NAME_TABLE_DCOM a INNER JOIN
(select
<if test="manNo !=null and manNo!=0">
*
</if>
<if test="manNo ==null or manNo==0">
STANO
</if>
from USER_STA_TABLE
<where>
<if test="manNo !=null and manNo!=0">
MANNO=${manNo}
</if>
</where>
<if test="manNo ==null or manNo==0">
GROUP BY STANO
</if>
) b on a.STANO=b.STANO
WHERE a.USERTYPE = 1
AND (a.SUBCOMNO = ${STANO} OR a.STANO = ${STANO})
</select>
<select id="selectPortBySta" resultType="java.util.Map">
SELECT CAST(PORTNO AS VARCHAR(100)) + '车道' + '-' + b.TEXT labelName,
CAST(a.STANO AS VARCHAR(100)) + '-' + CAST(PORTNO AS VARCHAR(100)) treeId,
#{STANAME} STANAME,
a.*
FROM SETUP_TABLE a
LEFT JOIN PORTTYPE_TEXT b ON a.PORTTYPE = b.VALUE
WHERE a.STANO = ${STANO}
ORDER BY a.PORTNO
</select>
<select id="selectPortLogs" resultType="java.util.Map">
SELECT * FROM ${tableName}
<where>
<if test="text != null and text != '' ">
<bind name="text" value="'%'+text+'%'"/>
AND TEXT LIKE #{text}
</if>
<if test="startHour != null and startHour != '' ">
AND HOUR >= ${startHour}
</if>
<if test="endHour != null and endHour != '' ">
AND HOUR &lt;= ${endHour}
</if>
<if test="CARNO != null and CARNO != '' ">
AND CARNO = #{carNo}
</if>
AND STANO=${staNo}
AND PORTNO=${portNo}
</where>
ORDER BY TIME
</select>
<select id="getAllStaList" resultType="java.util.Map">
SELECT b.*,c.PORTNO
FROM NAME_TABLE_DCOM a
INNER JOIN IP_PORT_TYPE_TEXT b on a.STANO=b.STANO
LEFT JOIN SETUP_TABLE c on c.STANO=a.STANO
WHERE a.USERTYPE = 1
AND (a.SUBCOMNO = ${STANO} OR a.STANO = ${STANO})
AND b.TEXT='集中监控车道日志'
ORDER BY c.PORTNO
</select>
<select id="getOnlySta" resultType="java.util.Map">
SELECT
b.*
FROM
NAME_TABLE_DCOM a
INNER JOIN IP_PORT_TYPE_TEXT b ON a.STANO= b.STANO
WHERE
a.USERTYPE = 1
AND (a.SUBCOMNO = ${STANO} OR a.STANO = ${STANO})
AND b.TEXT= '集中监控车道日志'
ORDER BY
a.STANO
</select>
<select id="getTypeText" resultType="java.util.Map">
SELECT * FROM TYPE_TEXT
</select>
<select id="getKindText" resultType="java.util.Map">
SELECT * FROM KIND_TEXT
</select>
<select id="getFlagText" resultType="java.util.Map">
SELECT * FROM FLAG_TEXT
</select>
<select id="getClassNo" resultType="java.util.Map">
SELECT * FROM CLASSNO_TEXT
</select>
<select id="getStaName" resultType="java.util.Map">
SELECT STANO,STANAME FROM NAME_TABLE_DCOM WHERE USERTYPE=1
</select>
<select id="getStaByManNo" resultType="java.lang.String">
SELECT STANO FROM USER_STA_TABLE
<if test="manNo !=null and manNo!=0">
WHERE MANNO=${manNo}
</if>
</select>
<select id="getStaNameByManNo" resultType="java.util.Map">
SELECT a.STANO,b.STANAME FROM (select
<if test="manNo !=null and manNo!=0">
*
</if>
<if test="manNo ==null or manNo==0">
STANO
</if>
from USER_STA_TABLE
<where>
<if test="manNo !=null and manNo!=0">
MANNO=${manNo}
</if>
</where>
<if test="manNo ==null or manNo==0">
GROUP BY STANO
</if>
) a INNER JOIN NAME_TABLE_DCOM b on a.STANO=b.STANO
<if test="manNo !=null and manNo!=0">
WHERE a.MANNO=${manNo}
</if>
</select>
</mapper>

@ -71,7 +71,6 @@ public class LogUtil {
reader.seek(reader.length());
reader.write(sb.toString().getBytes());
} catch (IOException e) {
e.printStackTrace();
System.out.println(e.getMessage());

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

File diff suppressed because it is too large Load Diff

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

@ -11,7 +11,7 @@
/>
</div>
</template>
<div class="text item" >
<div class="text item">
<el-row>
<el-row style="width: 100%">
<el-image
@ -76,9 +76,9 @@ export default {
},
data() {
return {
spanStyle:'font-size: 15px;margin-top: 2px;margin-bottom: 2px',
textStyle:' font-size: 14px;',
rowNum:6,
spanStyle: 'font-size: 15px;margin-top: 2px;margin-bottom: 2px',
textStyle: ' font-size: 14px;',
rowNum: 6,
WindowsHeight: 20,
itemNum: 20,
socket: null,
@ -97,12 +97,12 @@ export default {
watch: {
rowNum: {
handler(newValue, oldValue) {
if(newValue==8){
this.textStyle='font-size: 9px;'
this.spanStyle='font-size: 12px;margin-top: 2px;margin-bottom: 2px'
}else{
this.textStyle='font-size: 14px;'
this.spanStyle='font-size: 15px;margin-top: 2px;margin-bottom: 2px'
if (newValue == 8) {
this.textStyle = 'font-size: 9px;'
this.spanStyle = 'font-size: 12px;margin-top: 2px;margin-bottom: 2px'
} else {
this.textStyle = 'font-size: 14px;'
this.spanStyle = 'font-size: 15px;margin-top: 2px;margin-bottom: 2px'
}
},
}
@ -156,13 +156,12 @@ export default {
this.socketOnOpen(); //
this.socketOnError();
this.socketOnMessage();
},
socketOnOpen() {
this.socket.onopen = () => {
this.$emit('changeLoading', false)
this.socketLoading = false
const _this=this;
const _this = this;
this.$emit('reCheckData')
window.setInterval(() => {
setTimeout(() => {
@ -228,17 +227,15 @@ export default {
socketOnClose() {
this.socket.onclose = () => {
console.log("close socket");
this.initSocket();
};
},
socketOnError() {
this.socket.onerror = () => {
this.socketIsNoOpen = true;
const _this = this;
console.log("socket 链接失败 重新链接");
this.socketOnClose();
window.setTimeout(() => {
_this.initSocket();
}, 3000)
this.initSocket();
console.log("socket 链接失败");
};
},
@ -272,7 +269,7 @@ export default {
this.labelName = stanLabelName
this.logsDialog = true
},
sendUntitled(staNo){
sendUntitled(staNo) {
let _bar = {"manNo": this.manNo, "command": "Untitled", "staNo": staNo}
this.socket.send(JSON.stringify(_bar));
}

Loading…
Cancel
Save