Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nnjcy-data-model
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
梁家彪
nnjcy-data-model
Commits
9739d98c
Commit
9739d98c
authored
Mar 19, 2024
by
wqc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏条线接口
parent
1cadf7ce
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
5 deletions
+39
-5
data-collect-server/src/main/java/com/zq/datacollect/controller/BigScreenController.java
+7
-1
data-collect-server/src/main/java/com/zq/datacollect/holder/ConnectDB.java
+12
-2
data-collect-server/src/main/java/com/zq/datacollect/service/BigScreenService.java
+2
-0
data-collect-server/src/main/java/com/zq/datacollect/service/impl/BigScreenServiceImpl.java
+18
-2
No files found.
data-collect-server/src/main/java/com/zq/datacollect/controller/BigScreenController.java
View file @
9739d98c
...
@@ -61,7 +61,7 @@ public class BigScreenController {
...
@@ -61,7 +61,7 @@ public class BigScreenController {
}
}
@ApiOperation
(
"获取单个模型数据统计"
)
@ApiOperation
(
"获取单个模型数据统计"
)
@
Reques
tMapping
(
value
=
"/getModelDetails"
)
@
Ge
tMapping
(
value
=
"/getModelDetails"
)
public
ResultVo
getModelDetails
(
@RequestParam
(
"modelName"
)
String
modelName
)
{
public
ResultVo
getModelDetails
(
@RequestParam
(
"modelName"
)
String
modelName
)
{
return
ResultVo
.
success
(
bigScreenService
.
getModelDetails
(
modelName
));
return
ResultVo
.
success
(
bigScreenService
.
getModelDetails
(
modelName
));
}
}
...
@@ -170,5 +170,11 @@ public class BigScreenController {
...
@@ -170,5 +170,11 @@ public class BigScreenController {
return
ResultVo
.
success
(
bigScreenService
.
getJswpajlb
(
diqu
,
pcNo
));
return
ResultVo
.
success
(
bigScreenService
.
getJswpajlb
(
diqu
,
pcNo
));
}
}
@ApiOperation
(
"各业务条线案件数量"
)
@GetMapping
(
value
=
"/getGywtxajNum"
)
public
ResultVo
getGywtxajNum
(
@RequestParam
String
diqu
,
String
pcNo
)
throws
SQLException
{
return
ResultVo
.
success
(
bigScreenService
.
getGywtxajNum
(
diqu
,
pcNo
));
}
}
}
data-collect-server/src/main/java/com/zq/datacollect/holder/ConnectDB.java
View file @
9739d98c
...
@@ -38,7 +38,7 @@ public class ConnectDB implements ApplicationRunner {
...
@@ -38,7 +38,7 @@ public class ConnectDB implements ApplicationRunner {
switch
(
ds
.
getDbType
())
{
switch
(
ds
.
getDbType
())
{
case
1
:
case
1
:
className
=
"com.mysql.cj.jdbc.Driver"
;
className
=
"com.mysql.cj.jdbc.Driver"
;
url
=
"jdbc:mysql://"
+
ds
.
getDbIp
()
+
":"
+
ds
.
getDbPort
()
+
"/"
+
ds
.
getDbName
()
+
"?characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&useOldAliasMetadataBehavior=true"
;
url
=
"jdbc:mysql://"
+
ds
.
getDbIp
()
+
":"
+
ds
.
getDbPort
()
+
"/"
+
ds
.
getDbName
()
+
"?characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&useOldAliasMetadataBehavior=true
&allowPublicKeyRetrieval=true
"
;
break
;
break
;
case
2
:
case
2
:
className
=
"oracle.jdbc.driver.OracleDriver"
;
className
=
"oracle.jdbc.driver.OracleDriver"
;
...
@@ -55,7 +55,17 @@ public class ConnectDB implements ApplicationRunner {
...
@@ -55,7 +55,17 @@ public class ConnectDB implements ApplicationRunner {
druidDataSource
.
setUrl
(
url
);
druidDataSource
.
setUrl
(
url
);
druidDataSource
.
setUsername
(
ds
.
getUsername
());
druidDataSource
.
setUsername
(
ds
.
getUsername
());
druidDataSource
.
setPassword
(
ds
.
getPassword
());
druidDataSource
.
setPassword
(
ds
.
getPassword
());
druidDataSource
.
setQueryTimeout
(
20
*
1000
);
druidDataSource
.
setInitialSize
(
5
);
druidDataSource
.
setMinIdle
(
10
);
druidDataSource
.
setMaxActive
(
1000
);
druidDataSource
.
setMaxWait
(
60000
);
druidDataSource
.
setTimeBetweenEvictionRunsMillis
(
60000
);
druidDataSource
.
setMinEvictableIdleTimeMillis
(
100000
);
druidDataSource
.
setMaxEvictableIdleTimeMillis
(
300000
);
druidDataSource
.
setTestWhileIdle
(
true
);
druidDataSource
.
setTestOnBorrow
(
false
);
druidDataSource
.
setTestOnReturn
(
false
);
druidDataSource
.
setValidationQuery
(
"SELECT 1 FROM DUAL"
);
druidDataSource
.
init
();
druidDataSource
.
init
();
DruidPooledConnection
connection
=
druidDataSource
.
getConnection
();
DruidPooledConnection
connection
=
druidDataSource
.
getConnection
();
connectionMap
.
put
(
ds
.
getId
(),
connection
);
connectionMap
.
put
(
ds
.
getId
(),
connection
);
...
...
data-collect-server/src/main/java/com/zq/datacollect/service/BigScreenService.java
View file @
9739d98c
...
@@ -50,4 +50,6 @@ public interface BigScreenService {
...
@@ -50,4 +50,6 @@ public interface BigScreenService {
Object
getQbajcqwj
(
String
diqu
,
String
pcNo
)
throws
SQLException
;
Object
getQbajcqwj
(
String
diqu
,
String
pcNo
)
throws
SQLException
;
Object
getJswpajlb
(
String
diqu
,
String
pcNo
)
throws
SQLException
;
Object
getJswpajlb
(
String
diqu
,
String
pcNo
)
throws
SQLException
;
Object
getGywtxajNum
(
String
diqu
,
String
pcNo
)
throws
SQLException
;
}
}
data-collect-server/src/main/java/com/zq/datacollect/service/impl/BigScreenServiceImpl.java
View file @
9739d98c
...
@@ -500,7 +500,7 @@ public class BigScreenServiceImpl implements BigScreenService {
...
@@ -500,7 +500,7 @@ public class BigScreenServiceImpl implements BigScreenService {
}
}
@Override
@Override
public
Object
getBlqzlxData
(
String
diqu
,
String
pcNo
)
throws
SQLException
{
public
Object
getBlqzlxData
(
String
diqu
,
String
pcNo
)
throws
SQLException
{
Map
<
String
,
Object
>
body
=
new
HashMap
<>();
Map
<
String
,
Object
>
body
=
new
HashMap
<>();
body
.
put
(
"diqu"
,
"'"
+
diqu
+
"'"
);
body
.
put
(
"diqu"
,
"'"
+
diqu
+
"'"
);
body
.
put
(
"pcNo"
,
"'"
+
pcNo
+
"'"
);
body
.
put
(
"pcNo"
,
"'"
+
pcNo
+
"'"
);
...
@@ -551,7 +551,7 @@ public class BigScreenServiceImpl implements BigScreenService {
...
@@ -551,7 +551,7 @@ public class BigScreenServiceImpl implements BigScreenService {
}
}
@Override
@Override
public
Object
getJswpajlb
(
String
diqu
,
String
pcNo
)
throws
SQLException
{
public
Object
getJswpajlb
(
String
diqu
,
String
pcNo
)
throws
SQLException
{
Map
<
String
,
Object
>
body
=
new
HashMap
<>();
Map
<
String
,
Object
>
body
=
new
HashMap
<>();
body
.
put
(
"diqu"
,
"'"
+
diqu
+
"'"
);
body
.
put
(
"diqu"
,
"'"
+
diqu
+
"'"
);
body
.
put
(
"pcNo"
,
"'"
+
pcNo
+
"'"
);
body
.
put
(
"pcNo"
,
"'"
+
pcNo
+
"'"
);
...
@@ -566,4 +566,20 @@ public class BigScreenServiceImpl implements BigScreenService {
...
@@ -566,4 +566,20 @@ public class BigScreenServiceImpl implements BigScreenService {
return
mapList
;
return
mapList
;
}
}
@Override
public
Object
getGywtxajNum
(
String
diqu
,
String
pcNo
)
throws
SQLException
{
Map
<
String
,
Object
>
body
=
new
HashMap
<>();
body
.
put
(
"diqu"
,
"'"
+
diqu
+
"'"
);
body
.
put
(
"pcNo"
,
"'"
+
pcNo
+
"'"
);
List
<
Map
<
String
,
Object
>>
mapList
=
null
;
if
(
diqu
!=
null
&&
!
diqu
.
equals
(
""
))
{
body
.
put
(
"queryName"
,
"各业务条线案件数量1"
);
mapList
=
CommonQuery
(
body
);
}
else
{
body
.
put
(
"queryName"
,
"各业务条线案件数量2"
);
mapList
=
CommonQuery
(
body
);
}
return
mapList
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment