2024年11月11日 1.0.1 将前端路由页面去掉,都由主框架路径跳转,同时兼容GoldenDB数据库

main
gaoshuguang 1 year ago
parent bfbd00015b
commit 89c6e0f2b6

@ -220,6 +220,12 @@
<artifactId>ojdbc6</artifactId>
<version>11.2.0.4</version>
</dependency>
<!-- goldendb驱动 -->
<dependency>
<groupId>com.zte.goldendb</groupId> <!-- 假设的groupId -->
<artifactId>gdb_mysql-connector-java</artifactId> <!-- 假设的artifactId -->
<version>5.1.46.67</version> <!-- 版本号 -->
</dependency>
</dependencies>

@ -1,5 +1,6 @@
package com.nmgs;
import com.nmgs.config.Constant;
import com.nmgs.util.PathUtil;
import com.nmgs.util.PropertiesUtil;
import com.trkf.PasswordEncryption.PassWordUtils;
@ -43,31 +44,39 @@ public class MyEnvironmentPostProcessor implements EnvironmentPostProcessor {
properties.load(new FileInputStream(path));
String DBType = properties.getProperty("DBType") == null ? "1" : properties.getProperty("DBType");
Newproperties.load(new FileInputStream(NewPath));
properties.setProperty("spring.logback.logPath",PathUtil.TomcatPath+"/logs");
properties.setProperty("spring.datasource.url",properties.getProperty("DBUrl"));
properties.setProperty("spring.datasource.username",properties.getProperty("DBUserName"));
properties.setProperty("spring.datasource.password",PassWordUtils.decrypt(properties.getProperty("DBPassWord")));
switch (DBType) {
case "1":
properties.setProperty("spring.datasource.driver-class-name", Newproperties.getProperty("sqlClassName"));
properties.setProperty("spring.datasource.validationQuery", Newproperties.getProperty("sqlvalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query", Newproperties.getProperty("sqlvalidationQuery"));
break;
case "2":
properties.setProperty("spring.datasource.driver-class-name", Newproperties.getProperty("OracleClassName"));
properties.setProperty("spring.datasource.validationQuery", Newproperties.getProperty("OraclevalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query", Newproperties.getProperty("OraclevalidationQuery"));
break;
case "3":
properties.setProperty("spring.datasource.driver-class-name", Newproperties.getProperty("DMClassName"));
properties.setProperty("spring.datasource.validationQuery", Newproperties.getProperty("DMvalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query", Newproperties.getProperty("DMvalidationQuery"));
break;
case "4":
properties.setProperty("spring.datasource.driver-class-name", Newproperties.getProperty("MySQLClassName"));
properties.setProperty("spring.datasource.validationQuery", Newproperties.getProperty("MySQLvalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query", Newproperties.getProperty("MySQLvalidationQuery"));
break;
//获取是否是goldenDB数据库
String IsGolDen = properties.getProperty("IsGolDen") == null ? "0" : properties.getProperty("IsGolDen");
properties.setProperty("spring.logback.logPath", PathUtil.TomcatPath + "/logs");
properties.setProperty("spring.datasource.url", properties.getProperty("DBUrl"));
properties.setProperty("spring.datasource.username", properties.getProperty("DBUserName"));
properties.setProperty("spring.datasource.password", PassWordUtils.decrypt(properties.getProperty("DBPassWord")));
if(Constant.STR_ONE.equals(IsGolDen)){
properties.setProperty("spring.datasource.driver-class-name", Newproperties.getProperty("GoldenDBClassName"));
properties.setProperty("spring.datasource.validationQuery", Newproperties.getProperty("GoldenvalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query", Newproperties.getProperty("GoldenvalidationQuery"));
}else {
switch (DBType) {
case "1":
properties.setProperty("spring.datasource.driver-class-name", Newproperties.getProperty("sqlClassName"));
properties.setProperty("spring.datasource.validationQuery", Newproperties.getProperty("sqlvalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query", Newproperties.getProperty("sqlvalidationQuery"));
break;
case "2":
properties.setProperty("spring.datasource.driver-class-name", Newproperties.getProperty("OracleClassName"));
properties.setProperty("spring.datasource.validationQuery", Newproperties.getProperty("OraclevalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query", Newproperties.getProperty("OraclevalidationQuery"));
break;
case "3":
properties.setProperty("spring.datasource.driver-class-name", Newproperties.getProperty("DMClassName"));
properties.setProperty("spring.datasource.validationQuery", Newproperties.getProperty("DMvalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query", Newproperties.getProperty("DMvalidationQuery"));
break;
case "4":
properties.setProperty("spring.datasource.driver-class-name", Newproperties.getProperty("MySQLClassName"));
properties.setProperty("spring.datasource.validationQuery", Newproperties.getProperty("MySQLvalidationQuery"));
properties.setProperty("spring.datasource.hikari.connection-test-query", Newproperties.getProperty("MySQLvalidationQuery"));
break;
}
}
System.out.println("---------------------------OverLimitDetection本次载入数据库----------------------");
System.out.println("server.port: " + properties.getProperty("server.port"));

@ -13,6 +13,7 @@ public class Constant {
public static final String STR_TWO = "2";
public static final String STR_THREE = "3";
public static final String STR_FOUR = "4";
public static final String STR_FIVE = "5";
public static final String STR_ZERO = "0";
public static final String STR_TEN = "10";
public static final String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";

@ -18,7 +18,7 @@ public class MybatisConfig {
String dbType = PropertiesUtil.getValue("DBType");
if (Constant.STR_ONE.equals(dbType)) {
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.SQL_SERVER2005));
} else if (Constant.STR_TWO.equals(dbType)) {
} else if (Constant.STR_TWO.equals(dbType) || Constant.STR_FIVE.equals(dbType)) {
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.ORACLE));
} else if (Constant.STR_THREE.equals(dbType)) {
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.DM));

@ -46,4 +46,6 @@ DMClassName=dm.jdbc.driver.DmDriver
DMvalidationQuery=SELECT 1
MySQLClassName=com.mysql.cj.jdbc.Driver
MySQLvalidationQuery=SELECT 1
GoldenDBClassName=com.goldendb.jdbc.Driver
GoldenvalidationQuery=SELECT 1 FROM DUAL
spring.web.resources.static-locations= classpath:/static/View/

File diff suppressed because one or more lines are too long

@ -5,7 +5,7 @@
<meta charset="UTF-8"/>
<title></title>
<script type="module" crossorigin src="./assets/index.259bdd29.js"></script>
<script type="module" crossorigin src="./assets/index.3de6f3e4.js"></script>
<link rel="stylesheet" href="./assets/index.4eed0f89.css">
</head>
<body>

@ -1,4 +0,0 @@
序号 日期 版本号 说明
1 2024年03月04日 1.0.0 超限检测管理初始版本号

@ -0,0 +1,5 @@
序号 日期 版本号 说明
1 2024年03月04日 1.0.0 超限检测管理初始版本号
2 2024年11月11日 1.0.1 将前端路由页面去掉都由主框架路径跳转同时兼容GoldenDB数据库

@ -46,4 +46,6 @@ DMClassName=dm.jdbc.driver.DmDriver
DMvalidationQuery=SELECT 1
MySQLClassName=com.mysql.cj.jdbc.Driver
MySQLvalidationQuery=SELECT 1
GoldenDBClassName=com.goldendb.jdbc.Driver
GoldenvalidationQuery=SELECT 1 FROM DUAL
spring.web.resources.static-locations= classpath:/static/View/

@ -1,4 +0,0 @@
序号 日期 版本号 说明
1 2024年03月04日 1.0.0 超限检测管理初始版本号

@ -46,4 +46,6 @@ DMClassName=dm.jdbc.driver.DmDriver
DMvalidationQuery=SELECT 1
MySQLClassName=com.mysql.cj.jdbc.Driver
MySQLvalidationQuery=SELECT 1
GoldenDBClassName=com.goldendb.jdbc.Driver
GoldenvalidationQuery=SELECT 1 FROM DUAL
spring.web.resources.static-locations= classpath:/static/View/

@ -1,4 +0,0 @@
序号 日期 版本号 说明
1 2024年03月04日 1.0.0 超限检测管理初始版本号

File diff suppressed because one or more lines are too long

@ -5,7 +5,7 @@
<meta charset="UTF-8"/>
<title></title>
<script type="module" crossorigin src="./assets/index.259bdd29.js"></script>
<script type="module" crossorigin src="./assets/index.3de6f3e4.js"></script>
<link rel="stylesheet" href="./assets/index.4eed0f89.css">
</head>
<body>

@ -9,10 +9,10 @@ import DeviceStatus from '../../views/NoParkOverLoad/DeviceStatus.vue';
import NearbyDriveAway from '../../views/NoParkOverLoad/NearbyDriveAway.vue';
const routes = [
{
path: '/OverLimitDetection/estimateIndex',
component: estimateIndex,
children: [
// {
// path: '/OverLimitDetection/estimateIndex',
// component: estimateIndex,
// children: [
//入口治超数据
{
path: '/OverLimitDetection/EntranceQuery',
@ -42,9 +42,9 @@ const routes = [
{
path: '/OverLimitDetection/NearbyDriveAway',
component: NearbyDriveAway
}
]
// }
//
// ]
},
{

@ -82,9 +82,9 @@ export default {
// console.log(key, keyPath)
},
selectMenu() {
const sid = getUrlKey(window.location.search, "sid");
// const sid = getUrlKey(window.location.search, "sid");
// console.log(sid)
// const sid = 'f24cdd86-01c3-4bdb-8f14-2f1e1d5b8946';
const sid = 'f24cdd86-01c3-4bdb-8f14-2f1e1d5b8946';
// const sid = '801';
getMenu({
sid: sid

Loading…
Cancel
Save