Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
TDLCloud
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WitCloud
TDLCloud
Commits
9bdad03a
Commit
9bdad03a
authored
Mar 09, 2018
by
zhuangzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3.9--修改实体类和vo层以及controller的数据类型以及判断
parent
b169ed88
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
4352 additions
and
438 deletions
+4352
-438
build.gradle
build.gradle
+25
-0
logback.log
logback.log
+3484
-0
MyWebMvcConfigurer.java
src/main/java/com/example/tdl/config/MyWebMvcConfigurer.java
+7
-0
AddAlarmVo.java
src/main/java/com/example/tdl/domain/vo/AddAlarmVo.java
+15
-15
AddProbesModelInfoVo.java
.../java/com/example/tdl/domain/vo/AddProbesModelInfoVo.java
+9
-9
AddProbesModelVo.java
...main/java/com/example/tdl/domain/vo/AddProbesModelVo.java
+4
-3
AddTopicModelInfoVo.java
...n/java/com/example/tdl/domain/vo/AddTopicModelInfoVo.java
+9
-9
AddWarehouseVo.java
src/main/java/com/example/tdl/domain/vo/AddWarehouseVo.java
+15
-15
ResultAlarmVo.java
src/main/java/com/example/tdl/domain/vo/ResultAlarmVo.java
+15
-15
ResultGatewayVo.java
src/main/java/com/example/tdl/domain/vo/ResultGatewayVo.java
+15
-15
ResultProbesModelInfoVo.java
...va/com/example/tdl/domain/vo/ResultProbesModelInfoVo.java
+9
-9
ResultProbesModelVo.java
...n/java/com/example/tdl/domain/vo/ResultProbesModelVo.java
+3
-3
ResultTDLDeviceVo.java
...ain/java/com/example/tdl/domain/vo/ResultTDLDeviceVo.java
+23
-23
ResultTopicModelInfoVo.java
...ava/com/example/tdl/domain/vo/ResultTopicModelInfoVo.java
+9
-9
ResultWarehouseVo.java
...ain/java/com/example/tdl/domain/vo/ResultWarehouseVo.java
+15
-15
TDLDeviceTermVo.java
src/main/java/com/example/tdl/domain/vo/TDLDeviceTermVo.java
+3
-3
UpdateAlarmVo.java
src/main/java/com/example/tdl/domain/vo/UpdateAlarmVo.java
+31
-31
UpdateTopicModelInfoVo.java
...ava/com/example/tdl/domain/vo/UpdateTopicModelInfoVo.java
+17
-17
UpdateWarehouseVo.java
...ain/java/com/example/tdl/domain/vo/UpdateWarehouseVo.java
+15
-15
Alarm.java
src/main/java/com/example/tdl/entity/Alarm.java
+15
-15
Probes.java
src/main/java/com/example/tdl/entity/Probes.java
+9
-9
ProbesModel.java
src/main/java/com/example/tdl/entity/ProbesModel.java
+3
-3
ProbesModelInfo.java
src/main/java/com/example/tdl/entity/ProbesModelInfo.java
+9
-9
TDLDevice.java
src/main/java/com/example/tdl/entity/TDLDevice.java
+19
-19
Topic.java
src/main/java/com/example/tdl/entity/Topic.java
+9
-9
TopicModelInfo.java
src/main/java/com/example/tdl/entity/TopicModelInfo.java
+9
-9
Warehouse.java
src/main/java/com/example/tdl/entity/Warehouse.java
+55
-63
LoginInterceptor.java
...in/java/com/example/tdl/interceptor/LoginInterceptor.java
+3
-3
PermissionInterceptor.java
...va/com/example/tdl/interceptor/PermissionInterceptor.java
+55
-0
MqttConfig.java
src/main/java/com/example/tdl/mqtt/MqttConfig.java
+106
-0
UserService.java
src/main/java/com/example/tdl/service/UserService.java
+28
-0
AuthRealm.java
src/main/java/com/example/tdl/shiro/AuthRealm.java
+0
-50
ShiroRealm.java
src/main/java/com/example/tdl/shiro/ShiroRealm.java
+0
-5
CookieUtils.java
src/main/java/com/example/tdl/util/CookieUtils.java
+220
-0
AlarmController.java
src/main/java/com/example/tdl/web/AlarmController.java
+12
-12
LoginController.java
src/main/java/com/example/tdl/web/LoginController.java
+27
-8
LoginLogController.java
src/main/java/com/example/tdl/web/LoginLogController.java
+2
-3
ProbesModelController.java
src/main/java/com/example/tdl/web/ProbesModelController.java
+1
-1
TopicModelInfoController.java
...in/java/com/example/tdl/web/TopicModelInfoController.java
+4
-4
WarehouseController.java
src/main/java/com/example/tdl/web/WarehouseController.java
+10
-10
application-dev.properties
src/main/resources/application-dev.properties
+6
-0
application-docker.properties
src/main/resources/application-docker.properties
+14
-0
application.properties
src/main/resources/application.properties
+13
-0
No files found.
build.gradle
View file @
9bdad03a
...
@@ -45,6 +45,31 @@ dependencies {
...
@@ -45,6 +45,31 @@ dependencies {
compile
(
'org.apache.commons:commons-compress:1.9'
)
compile
(
'org.apache.commons:commons-compress:1.9'
)
compile
(
'org.springframework.boot:spring-boot-starter-data-redis'
)
compile
(
'org.springframework.boot:spring-boot-starter-data-redis'
)
}
}
jar
{
String
someString
=
''
configurations
.
runtime
.
each
{
someString
=
someString
+
" lib\\"
+
it
.
name
}
//遍历项目的所有依赖的jar包赋值给变量someString
manifest
{
attributes
'Main-Class'
:
'com.example.tdl'
attributes
'Class-Path'
:
someString
}
}
//清除上次的编译过的文件
task
clearPj
(
type:
Delete
){
delete
'build'
,
'target'
}
task
copyJar
(
type:
Copy
){
from
configurations
.
runtime
into
(
'build/libs/lib'
)
}
task
release
(
type:
Copy
,
dependsOn:
[
build
,
copyJar
])
{
// from 'conf'
// into ('build/libs/core/conf')
}
logback.log
View file @
9bdad03a
This diff is collapsed.
Click to expand it.
src/main/java/com/example/tdl/config/MyWebMvcConfigurer.java
View file @
9bdad03a
package
com
.
example
.
tdl
.
config
;
package
com
.
example
.
tdl
.
config
;
import
com.example.tdl.interceptor.LoginInterceptor
;
import
com.example.tdl.interceptor.LoginInterceptor
;
import
com.example.tdl.interceptor.PermissionInterceptor
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
...
@@ -14,10 +15,16 @@ public class MyWebMvcConfigurer extends WebMvcConfigurerAdapter {
...
@@ -14,10 +15,16 @@ public class MyWebMvcConfigurer extends WebMvcConfigurerAdapter {
return
new
LoginInterceptor
();
return
new
LoginInterceptor
();
}
}
@Bean
public
PermissionInterceptor
permissionInterceptor
(){
return
new
PermissionInterceptor
();
}
@Override
@Override
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
.
addInterceptor
(
loginInterceptor
())
registry
.
addInterceptor
(
loginInterceptor
())
.
excludePathPatterns
(
"/login/**"
);
.
excludePathPatterns
(
"/login/**"
);
registry
.
addInterceptor
(
permissionInterceptor
()).
excludePathPatterns
(
"/login/**"
);
super
.
addInterceptors
(
registry
);
super
.
addInterceptors
(
registry
);
}
}
}
}
src/main/java/com/example/tdl/domain/vo/AddAlarmVo.java
View file @
9bdad03a
...
@@ -6,15 +6,15 @@ public class AddAlarmVo {
...
@@ -6,15 +6,15 @@ public class AddAlarmVo {
private
String
alarmScene
;
private
String
alarmScene
;
private
f
loat
temMax
;
//温度上限
private
F
loat
temMax
;
//温度上限
private
f
loat
temMin
;
//温度下限
private
F
loat
temMin
;
//温度下限
private
f
loat
humidityMax
;
//湿度上限
private
F
loat
humidityMax
;
//湿度上限
private
f
loat
humidityMin
;
//湿度下限
private
F
loat
humidityMin
;
//湿度下限
private
f
loat
tilt
;
//倾斜度
private
F
loat
tilt
;
//倾斜度
private
String
shock
;
//震度
private
String
shock
;
//震度
...
@@ -36,43 +36,43 @@ public class AddAlarmVo {
...
@@ -36,43 +36,43 @@ public class AddAlarmVo {
this
.
alarmScene
=
alarmScene
;
this
.
alarmScene
=
alarmScene
;
}
}
public
f
loat
getTemMax
()
{
public
F
loat
getTemMax
()
{
return
temMax
;
return
temMax
;
}
}
public
void
setTemMax
(
f
loat
temMax
)
{
public
void
setTemMax
(
F
loat
temMax
)
{
this
.
temMax
=
temMax
;
this
.
temMax
=
temMax
;
}
}
public
f
loat
getTemMin
()
{
public
F
loat
getTemMin
()
{
return
temMin
;
return
temMin
;
}
}
public
void
setTemMin
(
f
loat
temMin
)
{
public
void
setTemMin
(
F
loat
temMin
)
{
this
.
temMin
=
temMin
;
this
.
temMin
=
temMin
;
}
}
public
f
loat
getHumidityMax
()
{
public
F
loat
getHumidityMax
()
{
return
humidityMax
;
return
humidityMax
;
}
}
public
void
setHumidityMax
(
f
loat
humidityMax
)
{
public
void
setHumidityMax
(
F
loat
humidityMax
)
{
this
.
humidityMax
=
humidityMax
;
this
.
humidityMax
=
humidityMax
;
}
}
public
f
loat
getHumidityMin
()
{
public
F
loat
getHumidityMin
()
{
return
humidityMin
;
return
humidityMin
;
}
}
public
void
setHumidityMin
(
f
loat
humidityMin
)
{
public
void
setHumidityMin
(
F
loat
humidityMin
)
{
this
.
humidityMin
=
humidityMin
;
this
.
humidityMin
=
humidityMin
;
}
}
public
f
loat
getTilt
()
{
public
F
loat
getTilt
()
{
return
tilt
;
return
tilt
;
}
}
public
void
setTilt
(
f
loat
tilt
)
{
public
void
setTilt
(
F
loat
tilt
)
{
this
.
tilt
=
tilt
;
this
.
tilt
=
tilt
;
}
}
...
...
src/main/java/com/example/tdl/domain/vo/AddProbesModelInfoVo.java
View file @
9bdad03a
...
@@ -3,7 +3,7 @@ package com.example.tdl.domain.vo;
...
@@ -3,7 +3,7 @@ package com.example.tdl.domain.vo;
public
class
AddProbesModelInfoVo
{
public
class
AddProbesModelInfoVo
{
private
String
probesModelName
;
private
String
probesModelName
;
private
int
port
;
private
Integer
port
;
private
String
unit
;
private
String
unit
;
...
@@ -13,9 +13,9 @@ public class AddProbesModelInfoVo {
...
@@ -13,9 +13,9 @@ public class AddProbesModelInfoVo {
private
String
type
;
private
String
type
;
private
int
alarmUp
;
private
Integer
alarmUp
;
private
int
alarmDown
;
private
Integer
alarmDown
;
public
String
getProbesModelName
()
{
public
String
getProbesModelName
()
{
return
probesModelName
;
return
probesModelName
;
...
@@ -25,11 +25,11 @@ public class AddProbesModelInfoVo {
...
@@ -25,11 +25,11 @@ public class AddProbesModelInfoVo {
this
.
probesModelName
=
probesModelName
;
this
.
probesModelName
=
probesModelName
;
}
}
public
int
getPort
()
{
public
Integer
getPort
()
{
return
port
;
return
port
;
}
}
public
void
setPort
(
int
port
)
{
public
void
setPort
(
Integer
port
)
{
this
.
port
=
port
;
this
.
port
=
port
;
}
}
...
@@ -65,19 +65,19 @@ public class AddProbesModelInfoVo {
...
@@ -65,19 +65,19 @@ public class AddProbesModelInfoVo {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
int
getAlarmUp
()
{
public
Integer
getAlarmUp
()
{
return
alarmUp
;
return
alarmUp
;
}
}
public
void
setAlarmUp
(
int
alarmUp
)
{
public
void
setAlarmUp
(
Integer
alarmUp
)
{
this
.
alarmUp
=
alarmUp
;
this
.
alarmUp
=
alarmUp
;
}
}
public
int
getAlarmDown
()
{
public
Integer
getAlarmDown
()
{
return
alarmDown
;
return
alarmDown
;
}
}
public
void
setAlarmDown
(
int
alarmDown
)
{
public
void
setAlarmDown
(
Integer
alarmDown
)
{
this
.
alarmDown
=
alarmDown
;
this
.
alarmDown
=
alarmDown
;
}
}
}
}
src/main/java/com/example/tdl/domain/vo/AddProbesModelVo.java
View file @
9bdad03a
package
com
.
example
.
tdl
.
domain
.
vo
;
package
com
.
example
.
tdl
.
domain
.
vo
;
public
class
AddProbesModelVo
{
public
class
AddProbesModelVo
{
private
String
probesModelName
;
private
String
probesModelName
;
private
int
countNum
;
private
Integer
countNum
;
public
String
getProbesModelName
()
{
public
String
getProbesModelName
()
{
return
probesModelName
;
return
probesModelName
;
...
@@ -13,11 +14,11 @@ public class AddProbesModelVo {
...
@@ -13,11 +14,11 @@ public class AddProbesModelVo {
this
.
probesModelName
=
probesModelName
;
this
.
probesModelName
=
probesModelName
;
}
}
public
int
getCountNum
()
{
public
Integer
getCountNum
()
{
return
countNum
;
return
countNum
;
}
}
public
void
setCountNum
(
int
countNum
)
{
public
void
setCountNum
(
Integer
countNum
)
{
this
.
countNum
=
countNum
;
this
.
countNum
=
countNum
;
}
}
}
}
src/main/java/com/example/tdl/domain/vo/AddTopicModelInfoVo.java
View file @
9bdad03a
...
@@ -5,11 +5,11 @@ public class AddTopicModelInfoVo {
...
@@ -5,11 +5,11 @@ public class AddTopicModelInfoVo {
private
String
topicName
;
private
String
topicName
;
private
int
type
;
private
Integer
type
;
private
int
intervalTime
;
private
Integer
intervalTime
;
private
int
frequency
;
private
Integer
frequency
;
public
String
getTopicModelName
()
{
public
String
getTopicModelName
()
{
return
topicModelName
;
return
topicModelName
;
...
@@ -27,27 +27,27 @@ public class AddTopicModelInfoVo {
...
@@ -27,27 +27,27 @@ public class AddTopicModelInfoVo {
this
.
topicName
=
topicName
;
this
.
topicName
=
topicName
;
}
}
public
int
getType
()
{
public
Integer
getType
()
{
return
type
;
return
type
;
}
}
public
void
setType
(
int
type
)
{
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
int
getIntervalTime
()
{
public
Integer
getIntervalTime
()
{
return
intervalTime
;
return
intervalTime
;
}
}
public
void
setIntervalTime
(
int
intervalTime
)
{
public
void
setIntervalTime
(
Integer
intervalTime
)
{
this
.
intervalTime
=
intervalTime
;
this
.
intervalTime
=
intervalTime
;
}
}
public
int
getFrequency
()
{
public
Integer
getFrequency
()
{
return
frequency
;
return
frequency
;
}
}
public
void
setFrequency
(
int
frequency
)
{
public
void
setFrequency
(
Integer
frequency
)
{
this
.
frequency
=
frequency
;
this
.
frequency
=
frequency
;
}
}
}
}
src/main/java/com/example/tdl/domain/vo/AddWarehouseVo.java
View file @
9bdad03a
...
@@ -30,17 +30,17 @@ public class AddWarehouseVo {
...
@@ -30,17 +30,17 @@ public class AddWarehouseVo {
private
String
hardwareLevel
;
//硬件等级
private
String
hardwareLevel
;
//硬件等级
private
d
ouble
areaIndoor
;
//室内平面面积
private
D
ouble
areaIndoor
;
//室内平面面积
private
d
ouble
areaRack
;
//货架面积
private
D
ouble
areaRack
;
//货架面积
private
d
ouble
areaOutdoor
;
//实际室内总面积
private
D
ouble
areaOutdoor
;
//实际室内总面积
private
d
ouble
areaPlanIndoor
;
//实际室内总面积
private
D
ouble
areaPlanIndoor
;
//实际室内总面积
private
String
office
;
//办事处
private
String
office
;
//办事处
private
int
timeZone
;
//时区
private
Integer
timeZone
;
//时区
private
String
weatherInfo
;
//区域气象信息
private
String
weatherInfo
;
//区域气象信息
...
@@ -160,35 +160,35 @@ public class AddWarehouseVo {
...
@@ -160,35 +160,35 @@ public class AddWarehouseVo {
this
.
hardwareLevel
=
hardwareLevel
;
this
.
hardwareLevel
=
hardwareLevel
;
}
}
public
d
ouble
getAreaIndoor
()
{
public
D
ouble
getAreaIndoor
()
{
return
areaIndoor
;
return
areaIndoor
;
}
}
public
void
setAreaIndoor
(
d
ouble
areaIndoor
)
{
public
void
setAreaIndoor
(
D
ouble
areaIndoor
)
{
this
.
areaIndoor
=
areaIndoor
;
this
.
areaIndoor
=
areaIndoor
;
}
}
public
d
ouble
getAreaRack
()
{
public
D
ouble
getAreaRack
()
{
return
areaRack
;
return
areaRack
;
}
}
public
void
setAreaRack
(
d
ouble
areaRack
)
{
public
void
setAreaRack
(
D
ouble
areaRack
)
{
this
.
areaRack
=
areaRack
;
this
.
areaRack
=
areaRack
;
}
}
public
d
ouble
getAreaOutdoor
()
{
public
D
ouble
getAreaOutdoor
()
{
return
areaOutdoor
;
return
areaOutdoor
;
}
}
public
void
setAreaOutdoor
(
d
ouble
areaOutdoor
)
{
public
void
setAreaOutdoor
(
D
ouble
areaOutdoor
)
{
this
.
areaOutdoor
=
areaOutdoor
;
this
.
areaOutdoor
=
areaOutdoor
;
}
}
public
d
ouble
getAreaPlanIndoor
()
{
public
D
ouble
getAreaPlanIndoor
()
{
return
areaPlanIndoor
;
return
areaPlanIndoor
;
}
}
public
void
setAreaPlanIndoor
(
d
ouble
areaPlanIndoor
)
{
public
void
setAreaPlanIndoor
(
D
ouble
areaPlanIndoor
)
{
this
.
areaPlanIndoor
=
areaPlanIndoor
;
this
.
areaPlanIndoor
=
areaPlanIndoor
;
}
}
...
@@ -200,11 +200,11 @@ public class AddWarehouseVo {
...
@@ -200,11 +200,11 @@ public class AddWarehouseVo {
this
.
office
=
office
;
this
.
office
=
office
;
}
}
public
int
getTimeZone
()
{
public
Integer
getTimeZone
()
{
return
timeZone
;
return
timeZone
;
}
}
public
void
setTimeZone
(
int
timeZone
)
{
public
void
setTimeZone
(
Integer
timeZone
)
{
this
.
timeZone
=
timeZone
;
this
.
timeZone
=
timeZone
;
}
}
...
...
src/main/java/com/example/tdl/domain/vo/ResultAlarmVo.java
View file @
9bdad03a
...
@@ -6,15 +6,15 @@ public class ResultAlarmVo{
...
@@ -6,15 +6,15 @@ public class ResultAlarmVo{
private
String
alarmScene
;
private
String
alarmScene
;
private
f
loat
temMax
;
//温度上限
private
F
loat
temMax
;
//温度上限
private
f
loat
temMin
;
//温度下限
private
F
loat
temMin
;
//温度下限
private
f
loat
humidityMax
;
//湿度上限
private
F
loat
humidityMax
;
//湿度上限
private
f
loat
humidityMin
;
//湿度下限
private
F
loat
humidityMin
;
//湿度下限
private
f
loat
tilt
;
//倾斜度
private
F
loat
tilt
;
//倾斜度
private
String
shock
;
//震度
private
String
shock
;
//震度
...
@@ -36,43 +36,43 @@ public class ResultAlarmVo{
...
@@ -36,43 +36,43 @@ public class ResultAlarmVo{
this
.
alarmScene
=
alarmScene
;
this
.
alarmScene
=
alarmScene
;
}
}
public
f
loat
getTemMax
()
{
public
F
loat
getTemMax
()
{
return
temMax
;
return
temMax
;
}
}
public
void
setTemMax
(
f
loat
temMax
)
{
public
void
setTemMax
(
F
loat
temMax
)
{
this
.
temMax
=
temMax
;
this
.
temMax
=
temMax
;
}
}
public
f
loat
getTemMin
()
{
public
F
loat
getTemMin
()
{
return
temMin
;
return
temMin
;
}
}
public
void
setTemMin
(
f
loat
temMin
)
{
public
void
setTemMin
(
F
loat
temMin
)
{
this
.
temMin
=
temMin
;
this
.
temMin
=
temMin
;
}
}
public
f
loat
getHumidityMax
()
{
public
F
loat
getHumidityMax
()
{
return
humidityMax
;
return
humidityMax
;
}
}
public
void
setHumidityMax
(
f
loat
humidityMax
)
{
public
void
setHumidityMax
(
F
loat
humidityMax
)
{
this
.
humidityMax
=
humidityMax
;
this
.
humidityMax
=
humidityMax
;
}
}
public
f
loat
getHumidityMin
()
{
public
F
loat
getHumidityMin
()
{
return
humidityMin
;
return
humidityMin
;
}
}
public
void
setHumidityMin
(
f
loat
humidityMin
)
{
public
void
setHumidityMin
(
F
loat
humidityMin
)
{
this
.
humidityMin
=
humidityMin
;
this
.
humidityMin
=
humidityMin
;
}
}
public
f
loat
getTilt
()
{
public
F
loat
getTilt
()
{
return
tilt
;
return
tilt
;
}
}
public
void
setTilt
(
f
loat
tilt
)
{
public
void
setTilt
(
F
loat
tilt
)
{
this
.
tilt
=
tilt
;
this
.
tilt
=
tilt
;
}
}
...
...
src/main/java/com/example/tdl/domain/vo/ResultGatewayVo.java
View file @
9bdad03a
...
@@ -7,19 +7,11 @@ public class ResultGatewayVo {
...
@@ -7,19 +7,11 @@ public class ResultGatewayVo {
private
String
type
;
private
String
type
;
private
b
oolean
state
;
private
B
oolean
state
;
private
b
oolean
bConfig
;
private
B
oolean
bConfig
;
private
int
useScene
;
private
Integer
useScene
;
public
int
getUseScene
()
{
return
useScene
;
}
public
void
setUseScene
(
int
useScene
)
{
this
.
useScene
=
useScene
;
}
public
String
getSN
()
{
public
String
getSN
()
{
return
SN
;
return
SN
;
...
@@ -45,19 +37,27 @@ public class ResultGatewayVo {
...
@@ -45,19 +37,27 @@ public class ResultGatewayVo {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
boolean
is
State
()
{
public
Boolean
get
State
()
{
return
state
;
return
state
;
}
}
public
void
setState
(
b
oolean
state
)
{
public
void
setState
(
B
oolean
state
)
{
this
.
state
=
state
;
this
.
state
=
state
;
}
}
public
boolean
is
bConfig
()
{
public
Boolean
get
bConfig
()
{
return
bConfig
;
return
bConfig
;
}
}
public
void
setbConfig
(
b
oolean
bConfig
)
{
public
void
setbConfig
(
B
oolean
bConfig
)
{
this
.
bConfig
=
bConfig
;
this
.
bConfig
=
bConfig
;
}
}
public
Integer
getUseScene
()
{
return
useScene
;
}
public
void
setUseScene
(
Integer
useScene
)
{
this
.
useScene
=
useScene
;
}
}
}
src/main/java/com/example/tdl/domain/vo/ResultProbesModelInfoVo.java
View file @
9bdad03a
...
@@ -3,7 +3,7 @@ package com.example.tdl.domain.vo;
...
@@ -3,7 +3,7 @@ package com.example.tdl.domain.vo;
public
class
ResultProbesModelInfoVo
{
public
class
ResultProbesModelInfoVo
{
private
String
probesModelName
;
private
String
probesModelName
;
private
int
port
;
private
Integer
port
;
private
String
unit
;
private
String
unit
;
...
@@ -13,9 +13,9 @@ public class ResultProbesModelInfoVo {
...
@@ -13,9 +13,9 @@ public class ResultProbesModelInfoVo {
private
String
type
;
private
String
type
;
private
int
alarmUp
;
private
Integer
alarmUp
;
private
int
alarmDown
;
private
Integer
alarmDown
;
public
String
getProbesModelName
()
{
public
String
getProbesModelName
()
{
return
probesModelName
;
return
probesModelName
;
...
@@ -25,11 +25,11 @@ public class ResultProbesModelInfoVo {
...
@@ -25,11 +25,11 @@ public class ResultProbesModelInfoVo {
this
.
probesModelName
=
probesModelName
;
this
.
probesModelName
=
probesModelName
;
}
}
public
int
getPort
()
{
public
Integer
getPort
()
{
return
port
;
return
port
;
}
}
public
void
setPort
(
int
port
)
{
public
void
setPort
(
Integer
port
)
{
this
.
port
=
port
;
this
.
port
=
port
;
}
}
...
@@ -65,19 +65,19 @@ public class ResultProbesModelInfoVo {
...
@@ -65,19 +65,19 @@ public class ResultProbesModelInfoVo {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
int
getAlarmUp
()
{
public
Integer
getAlarmUp
()
{
return
alarmUp
;
return
alarmUp
;
}
}
public
void
setAlarmUp
(
int
alarmUp
)
{
public
void
setAlarmUp
(
Integer
alarmUp
)
{
this
.
alarmUp
=
alarmUp
;
this
.
alarmUp
=
alarmUp
;
}
}
public
int
getAlarmDown
()
{
public
Integer
getAlarmDown
()
{
return
alarmDown
;
return
alarmDown
;
}
}
public
void
setAlarmDown
(
int
alarmDown
)
{
public
void
setAlarmDown
(
Integer
alarmDown
)
{
this
.
alarmDown
=
alarmDown
;
this
.
alarmDown
=
alarmDown
;
}
}
}
}
src/main/java/com/example/tdl/domain/vo/ResultProbesModelVo.java
View file @
9bdad03a
...
@@ -3,7 +3,7 @@ package com.example.tdl.domain.vo;
...
@@ -3,7 +3,7 @@ package com.example.tdl.domain.vo;
public
class
ResultProbesModelVo
{
public
class
ResultProbesModelVo
{
private
String
probesModelName
;
private
String
probesModelName
;
private
int
countNum
;
private
Integer
countNum
;
private
String
createTime
;
private
String
createTime
;
...
@@ -17,11 +17,11 @@ public class ResultProbesModelVo {
...
@@ -17,11 +17,11 @@ public class ResultProbesModelVo {
this
.
probesModelName
=
probesModelName
;
this
.
probesModelName
=
probesModelName
;
}
}
public
int
getCountNum
()
{
public
Integer
getCountNum
()
{
return
countNum
;
return
countNum
;
}
}
public
void
setCountNum
(
int
countNum
)
{
public
void
setCountNum
(
Integer
countNum
)
{
this
.
countNum
=
countNum
;
this
.
countNum
=
countNum
;
}
}
...
...
src/main/java/com/example/tdl/domain/vo/ResultTDLDeviceVo.java
View file @
9bdad03a
...
@@ -9,7 +9,7 @@ public class ResultTDLDeviceVo {
...
@@ -9,7 +9,7 @@ public class ResultTDLDeviceVo {
private
String
lastTime
;
private
String
lastTime
;
private
int
useScene
;
private
Integer
useScene
;
private
String
warehouseName
;
private
String
warehouseName
;
...
@@ -19,20 +19,12 @@ public class ResultTDLDeviceVo {
...
@@ -19,20 +19,12 @@ public class ResultTDLDeviceVo {
private
String
gatewayType
;
private
String
gatewayType
;
public
String
getGatewaySN
()
{
public
String
getTDLName
()
{
return
gatewaySN
;
return
TDLName
;
}
public
void
setGatewaySN
(
String
gatewaySN
)
{
this
.
gatewaySN
=
gatewaySN
;
}
public
String
getGatewayType
()
{
return
gatewayType
;
}
}
public
void
set
GatewayType
(
String
gatewayTyp
e
)
{
public
void
set
TDLName
(
String
TDLNam
e
)
{
this
.
gatewayType
=
gatewayTyp
e
;
this
.
TDLName
=
TDLNam
e
;
}
}
public
String
getTDLSN
()
{
public
String
getTDLSN
()
{
...
@@ -59,19 +51,11 @@ public class ResultTDLDeviceVo {
...
@@ -59,19 +51,11 @@ public class ResultTDLDeviceVo {
this
.
lastTime
=
lastTime
;
this
.
lastTime
=
lastTime
;
}
}
public
String
getTDLName
()
{
public
Integer
getUseScene
()
{
return
TDLName
;
}
public
void
setTDLName
(
String
TDLName
)
{
this
.
TDLName
=
TDLName
;
}
public
int
getUseScene
()
{
return
useScene
;
return
useScene
;
}
}
public
void
setUseScene
(
int
useScene
)
{
public
void
setUseScene
(
Integer
useScene
)
{
this
.
useScene
=
useScene
;
this
.
useScene
=
useScene
;
}
}
...
@@ -90,4 +74,20 @@ public class ResultTDLDeviceVo {
...
@@ -90,4 +74,20 @@ public class ResultTDLDeviceVo {
public
void
setTransportationNo
(
String
transportationNo
)
{
public
void
setTransportationNo
(
String
transportationNo
)
{
this
.
transportationNo
=
transportationNo
;
this
.
transportationNo
=
transportationNo
;
}
}
public
String
getGatewaySN
()
{
return
gatewaySN
;
}
public
void
setGatewaySN
(
String
gatewaySN
)
{
this
.
gatewaySN
=
gatewaySN
;
}
public
String
getGatewayType
()
{
return
gatewayType
;
}
public
void
setGatewayType
(
String
gatewayType
)
{
this
.
gatewayType
=
gatewayType
;
}
}
}
src/main/java/com/example/tdl/domain/vo/ResultTopicModelInfoVo.java
View file @
9bdad03a
...
@@ -5,11 +5,11 @@ public class ResultTopicModelInfoVo {
...
@@ -5,11 +5,11 @@ public class ResultTopicModelInfoVo {
private
String
topicName
;
private
String
topicName
;
private
int
type
;
private
Integer
type
;
private
int
intervalTime
;
private
Integer
intervalTime
;
private
int
frequency
;
private
Integer
frequency
;
public
String
getTopicModelName
()
{
public
String
getTopicModelName
()
{
return
topicModelName
;
return
topicModelName
;
...
@@ -27,27 +27,27 @@ public class ResultTopicModelInfoVo {
...
@@ -27,27 +27,27 @@ public class ResultTopicModelInfoVo {
this
.
topicName
=
topicName
;
this
.
topicName
=
topicName
;
}
}
public
int
getType
()
{
public
Integer
getType
()
{
return
type
;
return
type
;
}
}
public
void
setType
(
int
type
)
{
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
int
getIntervalTime
()
{
public
Integer
getIntervalTime
()
{
return
intervalTime
;
return
intervalTime
;
}
}
public
void
setIntervalTime
(
int
intervalTime
)
{
public
void
setIntervalTime
(
Integer
intervalTime
)
{
this
.
intervalTime
=
intervalTime
;
this
.
intervalTime
=
intervalTime
;
}
}
public
int
getFrequency
()
{
public
Integer
getFrequency
()
{
return
frequency
;
return
frequency
;
}
}
public
void
setFrequency
(
int
frequency
)
{
public
void
setFrequency
(
Integer
frequency
)
{
this
.
frequency
=
frequency
;
this
.
frequency
=
frequency
;
}
}
}
}
src/main/java/com/example/tdl/domain/vo/ResultWarehouseVo.java
View file @
9bdad03a
...
@@ -34,17 +34,17 @@ public class ResultWarehouseVo {
...
@@ -34,17 +34,17 @@ public class ResultWarehouseVo {
private
String
hardwareLevel
;
//硬件等级
private
String
hardwareLevel
;
//硬件等级
private
d
ouble
areaIndoor
;
//室内平面面积
private
D
ouble
areaIndoor
;
//室内平面面积
private
d
ouble
areaRack
;
//货架面积
private
D
ouble
areaRack
;
//货架面积
private
d
ouble
areaOutdoor
;
//实际室内总面积
private
D
ouble
areaOutdoor
;
//实际室内总面积
private
d
ouble
areaPlanIndoor
;
//实际室内总面积
private
D
ouble
areaPlanIndoor
;
//实际室内总面积
private
String
office
;
//办事处
private
String
office
;
//办事处
private
int
timeZone
;
//时区
private
Integer
timeZone
;
//时区
private
String
weatherInfo
;
//区域气象信息
private
String
weatherInfo
;
//区域气象信息
...
@@ -180,35 +180,35 @@ public class ResultWarehouseVo {
...
@@ -180,35 +180,35 @@ public class ResultWarehouseVo {
this
.
hardwareLevel
=
hardwareLevel
;
this
.
hardwareLevel
=
hardwareLevel
;
}
}
public
d
ouble
getAreaIndoor
()
{
public
D
ouble
getAreaIndoor
()
{
return
areaIndoor
;
return
areaIndoor
;
}
}
public
void
setAreaIndoor
(
d
ouble
areaIndoor
)
{
public
void
setAreaIndoor
(
D
ouble
areaIndoor
)
{
this
.
areaIndoor
=
areaIndoor
;
this
.
areaIndoor
=
areaIndoor
;
}
}
public
d
ouble
getAreaRack
()
{
public
D
ouble
getAreaRack
()
{
return
areaRack
;
return
areaRack
;
}
}
public
void
setAreaRack
(
d
ouble
areaRack
)
{
public
void
setAreaRack
(
D
ouble
areaRack
)
{
this
.
areaRack
=
areaRack
;
this
.
areaRack
=
areaRack
;
}
}
public
d
ouble
getAreaOutdoor
()
{
public
D
ouble
getAreaOutdoor
()
{
return
areaOutdoor
;
return
areaOutdoor
;
}
}
public
void
setAreaOutdoor
(
d
ouble
areaOutdoor
)
{
public
void
setAreaOutdoor
(
D
ouble
areaOutdoor
)
{
this
.
areaOutdoor
=
areaOutdoor
;
this
.
areaOutdoor
=
areaOutdoor
;
}
}
public
d
ouble
getAreaPlanIndoor
()
{
public
D
ouble
getAreaPlanIndoor
()
{
return
areaPlanIndoor
;
return
areaPlanIndoor
;
}
}
public
void
setAreaPlanIndoor
(
d
ouble
areaPlanIndoor
)
{
public
void
setAreaPlanIndoor
(
D
ouble
areaPlanIndoor
)
{
this
.
areaPlanIndoor
=
areaPlanIndoor
;
this
.
areaPlanIndoor
=
areaPlanIndoor
;
}
}
...
@@ -220,11 +220,11 @@ public class ResultWarehouseVo {
...
@@ -220,11 +220,11 @@ public class ResultWarehouseVo {
this
.
office
=
office
;
this
.
office
=
office
;
}
}
public
int
getTimeZone
()
{
public
Integer
getTimeZone
()
{
return
timeZone
;
return
timeZone
;
}
}
public
void
setTimeZone
(
int
timeZone
)
{
public
void
setTimeZone
(
Integer
timeZone
)
{
this
.
timeZone
=
timeZone
;
this
.
timeZone
=
timeZone
;
}
}
...
...
src/main/java/com/example/tdl/domain/vo/TDLDeviceTermVo.java
View file @
9bdad03a
...
@@ -5,7 +5,7 @@ public class TDLDeviceTermVo {
...
@@ -5,7 +5,7 @@ public class TDLDeviceTermVo {
private
String
TDLSN
;
private
String
TDLSN
;
private
int
useScene
;
private
Integer
useScene
;
public
String
getTDLName
()
{
public
String
getTDLName
()
{
return
TDLName
;
return
TDLName
;
...
@@ -23,11 +23,11 @@ public class TDLDeviceTermVo {
...
@@ -23,11 +23,11 @@ public class TDLDeviceTermVo {
this
.
TDLSN
=
TDLSN
;
this
.
TDLSN
=
TDLSN
;
}
}
public
int
getUseScene
()
{
public
Integer
getUseScene
()
{
return
useScene
;
return
useScene
;
}
}
public
void
setUseScene
(
int
useScene
)
{
public
void
setUseScene
(
Integer
useScene
)
{
this
.
useScene
=
useScene
;
this
.
useScene
=
useScene
;
}
}
}
}
src/main/java/com/example/tdl/domain/vo/UpdateAlarmVo.java
View file @
9bdad03a
...
@@ -6,15 +6,15 @@ public class UpdateAlarmVo {
...
@@ -6,15 +6,15 @@ public class UpdateAlarmVo {
private
String
alarmScene
;
private
String
alarmScene
;
private
f
loat
temMax
;
//温度上限
private
F
loat
temMax
;
//温度上限
private
f
loat
temMin
;
//温度下限
private
F
loat
temMin
;
//温度下限
private
f
loat
humidityMax
;
//湿度上限
private
F
loat
humidityMax
;
//湿度上限
private
f
loat
humidityMin
;
//湿度下限
private
F
loat
humidityMin
;
//湿度下限
private
f
loat
tilt
;
//倾斜度
private
F
loat
tilt
;
//倾斜度
private
String
shock
;
//震度
private
String
shock
;
//震度
...
@@ -24,22 +24,6 @@ public class UpdateAlarmVo {
...
@@ -24,22 +24,6 @@ public class UpdateAlarmVo {
private
String
oldAlarmScene
;
private
String
oldAlarmScene
;
public
String
getOldAlarmType
()
{
return
oldAlarmType
;
}
public
void
setOldAlarmType
(
String
oldAlarmType
)
{
this
.
oldAlarmType
=
oldAlarmType
;
}
public
String
getOldAlarmScene
()
{
return
oldAlarmScene
;
}
public
void
setOldAlarmScene
(
String
oldAlarmScene
)
{
this
.
oldAlarmScene
=
oldAlarmScene
;
}
public
String
getAlarmType
()
{
public
String
getAlarmType
()
{
return
alarmType
;
return
alarmType
;
}
}
...
@@ -56,43 +40,43 @@ public class UpdateAlarmVo {
...
@@ -56,43 +40,43 @@ public class UpdateAlarmVo {
this
.
alarmScene
=
alarmScene
;
this
.
alarmScene
=
alarmScene
;
}
}
public
f
loat
getTemMax
()
{
public
F
loat
getTemMax
()
{
return
temMax
;
return
temMax
;
}
}
public
void
setTemMax
(
f
loat
temMax
)
{
public
void
setTemMax
(
F
loat
temMax
)
{
this
.
temMax
=
temMax
;
this
.
temMax
=
temMax
;
}
}
public
f
loat
getTemMin
()
{
public
F
loat
getTemMin
()
{
return
temMin
;
return
temMin
;
}
}
public
void
setTemMin
(
f
loat
temMin
)
{
public
void
setTemMin
(
F
loat
temMin
)
{
this
.
temMin
=
temMin
;
this
.
temMin
=
temMin
;
}
}
public
f
loat
getHumidityMax
()
{
public
F
loat
getHumidityMax
()
{
return
humidityMax
;
return
humidityMax
;
}
}
public
void
setHumidityMax
(
f
loat
humidityMax
)
{
public
void
setHumidityMax
(
F
loat
humidityMax
)
{
this
.
humidityMax
=
humidityMax
;
this
.
humidityMax
=
humidityMax
;
}
}
public
f
loat
getHumidityMin
()
{
public
F
loat
getHumidityMin
()
{
return
humidityMin
;
return
humidityMin
;
}
}
public
void
setHumidityMin
(
f
loat
humidityMin
)
{
public
void
setHumidityMin
(
F
loat
humidityMin
)
{
this
.
humidityMin
=
humidityMin
;
this
.
humidityMin
=
humidityMin
;
}
}
public
f
loat
getTilt
()
{
public
F
loat
getTilt
()
{
return
tilt
;
return
tilt
;
}
}
public
void
setTilt
(
f
loat
tilt
)
{
public
void
setTilt
(
F
loat
tilt
)
{
this
.
tilt
=
tilt
;
this
.
tilt
=
tilt
;
}
}
...
@@ -111,4 +95,20 @@ public class UpdateAlarmVo {
...
@@ -111,4 +95,20 @@ public class UpdateAlarmVo {
public
void
setRemark
(
String
remark
)
{
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
String
getOldAlarmType
()
{
return
oldAlarmType
;
}
public
void
setOldAlarmType
(
String
oldAlarmType
)
{
this
.
oldAlarmType
=
oldAlarmType
;
}
public
String
getOldAlarmScene
()
{
return
oldAlarmScene
;
}
public
void
setOldAlarmScene
(
String
oldAlarmScene
)
{
this
.
oldAlarmScene
=
oldAlarmScene
;
}
}
}
src/main/java/com/example/tdl/domain/vo/UpdateTopicModelInfoVo.java
View file @
9bdad03a
...
@@ -5,22 +5,14 @@ public class UpdateTopicModelInfoVo {
...
@@ -5,22 +5,14 @@ public class UpdateTopicModelInfoVo {
private
String
topicName
;
private
String
topicName
;
private
int
type
;
private
Integer
type
;
private
int
intervalTime
;
private
Integer
intervalTime
;
private
int
frequency
;
private
Integer
frequency
;
private
String
oldTopicName
;
private
String
oldTopicName
;
public
String
getOldTopicName
()
{
return
oldTopicName
;
}
public
void
setOldTopicName
(
String
oldTopicName
)
{
this
.
oldTopicName
=
oldTopicName
;
}
public
String
getTopicModelName
()
{
public
String
getTopicModelName
()
{
return
topicModelName
;
return
topicModelName
;
}
}
...
@@ -37,27 +29,35 @@ public class UpdateTopicModelInfoVo {
...
@@ -37,27 +29,35 @@ public class UpdateTopicModelInfoVo {
this
.
topicName
=
topicName
;
this
.
topicName
=
topicName
;
}
}
public
int
getType
()
{
public
Integer
getType
()
{
return
type
;
return
type
;
}
}
public
void
setType
(
int
type
)
{
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
int
getIntervalTime
()
{
public
Integer
getIntervalTime
()
{
return
intervalTime
;
return
intervalTime
;
}
}
public
void
setIntervalTime
(
int
intervalTime
)
{
public
void
setIntervalTime
(
Integer
intervalTime
)
{
this
.
intervalTime
=
intervalTime
;
this
.
intervalTime
=
intervalTime
;
}
}
public
int
getFrequency
()
{
public
Integer
getFrequency
()
{
return
frequency
;
return
frequency
;
}
}
public
void
setFrequency
(
int
frequency
)
{
public
void
setFrequency
(
Integer
frequency
)
{
this
.
frequency
=
frequency
;
this
.
frequency
=
frequency
;
}
}
public
String
getOldTopicName
()
{
return
oldTopicName
;
}
public
void
setOldTopicName
(
String
oldTopicName
)
{
this
.
oldTopicName
=
oldTopicName
;
}
}
}
src/main/java/com/example/tdl/domain/vo/UpdateWarehouseVo.java
View file @
9bdad03a
...
@@ -31,17 +31,17 @@ public class UpdateWarehouseVo {
...
@@ -31,17 +31,17 @@ public class UpdateWarehouseVo {
private
String
hardwareLevel
;
//硬件等级
private
String
hardwareLevel
;
//硬件等级
private
d
ouble
areaIndoor
;
//室内平面面积
private
D
ouble
areaIndoor
;
//室内平面面积
private
d
ouble
areaRack
;
//货架面积
private
D
ouble
areaRack
;
//货架面积
private
d
ouble
areaOutdoor
;
//实际室内总面积
private
D
ouble
areaOutdoor
;
//实际室内总面积
private
d
ouble
areaPlanIndoor
;
//实际室内总面积
private
D
ouble
areaPlanIndoor
;
//实际室内总面积
private
String
office
;
//办事处
private
String
office
;
//办事处
private
int
timeZone
;
//时区
private
Integer
timeZone
;
//时区
private
String
weatherInfo
;
//区域气象信息
private
String
weatherInfo
;
//区域气象信息
...
@@ -171,35 +171,35 @@ public class UpdateWarehouseVo {
...
@@ -171,35 +171,35 @@ public class UpdateWarehouseVo {
this
.
hardwareLevel
=
hardwareLevel
;
this
.
hardwareLevel
=
hardwareLevel
;
}
}
public
d
ouble
getAreaIndoor
()
{
public
D
ouble
getAreaIndoor
()
{
return
areaIndoor
;
return
areaIndoor
;
}
}
public
void
setAreaIndoor
(
d
ouble
areaIndoor
)
{
public
void
setAreaIndoor
(
D
ouble
areaIndoor
)
{
this
.
areaIndoor
=
areaIndoor
;
this
.
areaIndoor
=
areaIndoor
;
}
}
public
d
ouble
getAreaRack
()
{
public
D
ouble
getAreaRack
()
{
return
areaRack
;
return
areaRack
;
}
}
public
void
setAreaRack
(
d
ouble
areaRack
)
{
public
void
setAreaRack
(
D
ouble
areaRack
)
{
this
.
areaRack
=
areaRack
;
this
.
areaRack
=
areaRack
;
}
}
public
d
ouble
getAreaOutdoor
()
{
public
D
ouble
getAreaOutdoor
()
{
return
areaOutdoor
;
return
areaOutdoor
;
}
}
public
void
setAreaOutdoor
(
d
ouble
areaOutdoor
)
{
public
void
setAreaOutdoor
(
D
ouble
areaOutdoor
)
{
this
.
areaOutdoor
=
areaOutdoor
;
this
.
areaOutdoor
=
areaOutdoor
;
}
}
public
d
ouble
getAreaPlanIndoor
()
{
public
D
ouble
getAreaPlanIndoor
()
{
return
areaPlanIndoor
;
return
areaPlanIndoor
;
}
}
public
void
setAreaPlanIndoor
(
d
ouble
areaPlanIndoor
)
{
public
void
setAreaPlanIndoor
(
D
ouble
areaPlanIndoor
)
{
this
.
areaPlanIndoor
=
areaPlanIndoor
;
this
.
areaPlanIndoor
=
areaPlanIndoor
;
}
}
...
@@ -211,11 +211,11 @@ public class UpdateWarehouseVo {
...
@@ -211,11 +211,11 @@ public class UpdateWarehouseVo {
this
.
office
=
office
;
this
.
office
=
office
;
}
}
public
int
getTimeZone
()
{
public
Integer
getTimeZone
()
{
return
timeZone
;
return
timeZone
;
}
}
public
void
setTimeZone
(
int
timeZone
)
{
public
void
setTimeZone
(
Integer
timeZone
)
{
this
.
timeZone
=
timeZone
;
this
.
timeZone
=
timeZone
;
}
}
...
...
src/main/java/com/example/tdl/entity/Alarm.java
View file @
9bdad03a
...
@@ -17,15 +17,15 @@ public class Alarm implements Serializable{
...
@@ -17,15 +17,15 @@ public class Alarm implements Serializable{
private
String
alarmScene
;
private
String
alarmScene
;
private
f
loat
temMax
;
//温度上限
private
F
loat
temMax
;
//温度上限
private
f
loat
temMin
;
//温度下限
private
F
loat
temMin
;
//温度下限
private
f
loat
humidityMax
;
//湿度上限
private
F
loat
humidityMax
;
//湿度上限
private
f
loat
humidityMin
;
//湿度下限
private
F
loat
humidityMin
;
//湿度下限
private
f
loat
tilt
;
//倾斜度
private
F
loat
tilt
;
//倾斜度
private
String
shock
;
//震度
private
String
shock
;
//震度
...
@@ -55,43 +55,43 @@ public class Alarm implements Serializable{
...
@@ -55,43 +55,43 @@ public class Alarm implements Serializable{
this
.
alarmScene
=
alarmScene
;
this
.
alarmScene
=
alarmScene
;
}
}
public
f
loat
getTemMax
()
{
public
F
loat
getTemMax
()
{
return
temMax
;
return
temMax
;
}
}
public
void
setTemMax
(
f
loat
temMax
)
{
public
void
setTemMax
(
F
loat
temMax
)
{
this
.
temMax
=
temMax
;
this
.
temMax
=
temMax
;
}
}
public
f
loat
getTemMin
()
{
public
F
loat
getTemMin
()
{
return
temMin
;
return
temMin
;
}
}
public
void
setTemMin
(
f
loat
temMin
)
{
public
void
setTemMin
(
F
loat
temMin
)
{
this
.
temMin
=
temMin
;
this
.
temMin
=
temMin
;
}
}
public
f
loat
getHumidityMax
()
{
public
F
loat
getHumidityMax
()
{
return
humidityMax
;
return
humidityMax
;
}
}
public
void
setHumidityMax
(
f
loat
humidityMax
)
{
public
void
setHumidityMax
(
F
loat
humidityMax
)
{
this
.
humidityMax
=
humidityMax
;
this
.
humidityMax
=
humidityMax
;
}
}
public
f
loat
getHumidityMin
()
{
public
F
loat
getHumidityMin
()
{
return
humidityMin
;
return
humidityMin
;
}
}
public
void
setHumidityMin
(
f
loat
humidityMin
)
{
public
void
setHumidityMin
(
F
loat
humidityMin
)
{
this
.
humidityMin
=
humidityMin
;
this
.
humidityMin
=
humidityMin
;
}
}
public
f
loat
getTilt
()
{
public
F
loat
getTilt
()
{
return
tilt
;
return
tilt
;
}
}
public
void
setTilt
(
f
loat
tilt
)
{
public
void
setTilt
(
F
loat
tilt
)
{
this
.
tilt
=
tilt
;
this
.
tilt
=
tilt
;
}
}
...
...
src/main/java/com/example/tdl/entity/Probes.java
View file @
9bdad03a
...
@@ -3,7 +3,7 @@ package com.example.tdl.entity;
...
@@ -3,7 +3,7 @@ package com.example.tdl.entity;
public
class
Probes
{
public
class
Probes
{
private
int
id
;
private
int
id
;
private
int
port
;
private
Integer
port
;
private
String
unit
;
private
String
unit
;
...
@@ -13,9 +13,9 @@ public class Probes {
...
@@ -13,9 +13,9 @@ public class Probes {
private
String
type
;
private
String
type
;
private
int
alarmUp
;
private
Integer
alarmUp
;
private
int
alarmDown
;
private
Integer
alarmDown
;
private
Gateway
gateway
;
private
Gateway
gateway
;
...
@@ -27,11 +27,11 @@ public class Probes {
...
@@ -27,11 +27,11 @@ public class Probes {
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
int
getPort
()
{
public
Integer
getPort
()
{
return
port
;
return
port
;
}
}
public
void
setPort
(
int
port
)
{
public
void
setPort
(
Integer
port
)
{
this
.
port
=
port
;
this
.
port
=
port
;
}
}
...
@@ -67,19 +67,19 @@ public class Probes {
...
@@ -67,19 +67,19 @@ public class Probes {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
int
getAlarmUp
()
{
public
Integer
getAlarmUp
()
{
return
alarmUp
;
return
alarmUp
;
}
}
public
void
setAlarmUp
(
int
alarmUp
)
{
public
void
setAlarmUp
(
Integer
alarmUp
)
{
this
.
alarmUp
=
alarmUp
;
this
.
alarmUp
=
alarmUp
;
}
}
public
int
getAlarmDown
()
{
public
Integer
getAlarmDown
()
{
return
alarmDown
;
return
alarmDown
;
}
}
public
void
setAlarmDown
(
int
alarmDown
)
{
public
void
setAlarmDown
(
Integer
alarmDown
)
{
this
.
alarmDown
=
alarmDown
;
this
.
alarmDown
=
alarmDown
;
}
}
...
...
src/main/java/com/example/tdl/entity/ProbesModel.java
View file @
9bdad03a
...
@@ -5,7 +5,7 @@ public class ProbesModel {
...
@@ -5,7 +5,7 @@ public class ProbesModel {
private
String
probesModelName
;
private
String
probesModelName
;
private
int
countNum
;
private
Integer
countNum
;
private
Long
createTime
;
private
Long
createTime
;
...
@@ -27,11 +27,11 @@ public class ProbesModel {
...
@@ -27,11 +27,11 @@ public class ProbesModel {
this
.
probesModelName
=
probesModelName
;
this
.
probesModelName
=
probesModelName
;
}
}
public
int
getCountNum
()
{
public
Integer
getCountNum
()
{
return
countNum
;
return
countNum
;
}
}
public
void
setCountNum
(
int
countNum
)
{
public
void
setCountNum
(
Integer
countNum
)
{
this
.
countNum
=
countNum
;
this
.
countNum
=
countNum
;
}
}
...
...
src/main/java/com/example/tdl/entity/ProbesModelInfo.java
View file @
9bdad03a
...
@@ -5,7 +5,7 @@ public class ProbesModelInfo {
...
@@ -5,7 +5,7 @@ public class ProbesModelInfo {
private
ProbesModel
probesModel
;
private
ProbesModel
probesModel
;
private
int
port
;
private
Integer
port
;
private
String
unit
;
private
String
unit
;
...
@@ -15,9 +15,9 @@ public class ProbesModelInfo {
...
@@ -15,9 +15,9 @@ public class ProbesModelInfo {
private
String
type
;
private
String
type
;
private
int
alarmUp
;
private
Integer
alarmUp
;
private
int
alarmDown
;
private
Integer
alarmDown
;
public
int
getId
()
{
public
int
getId
()
{
return
id
;
return
id
;
...
@@ -35,11 +35,11 @@ public class ProbesModelInfo {
...
@@ -35,11 +35,11 @@ public class ProbesModelInfo {
this
.
probesModel
=
probesModel
;
this
.
probesModel
=
probesModel
;
}
}
public
int
getPort
()
{
public
Integer
getPort
()
{
return
port
;
return
port
;
}
}
public
void
setPort
(
int
port
)
{
public
void
setPort
(
Integer
port
)
{
this
.
port
=
port
;
this
.
port
=
port
;
}
}
...
@@ -75,19 +75,19 @@ public class ProbesModelInfo {
...
@@ -75,19 +75,19 @@ public class ProbesModelInfo {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
int
getAlarmUp
()
{
public
Integer
getAlarmUp
()
{
return
alarmUp
;
return
alarmUp
;
}
}
public
void
setAlarmUp
(
int
alarmUp
)
{
public
void
setAlarmUp
(
Integer
alarmUp
)
{
this
.
alarmUp
=
alarmUp
;
this
.
alarmUp
=
alarmUp
;
}
}
public
int
getAlarmDown
()
{
public
Integer
getAlarmDown
()
{
return
alarmDown
;
return
alarmDown
;
}
}
public
void
setAlarmDown
(
int
alarmDown
)
{
public
void
setAlarmDown
(
Integer
alarmDown
)
{
this
.
alarmDown
=
alarmDown
;
this
.
alarmDown
=
alarmDown
;
}
}
}
}
src/main/java/com/example/tdl/entity/TDLDevice.java
View file @
9bdad03a
...
@@ -16,20 +16,12 @@ public class TDLDevice implements Serializable{
...
@@ -16,20 +16,12 @@ public class TDLDevice implements Serializable{
private
Long
lastTime
;
private
Long
lastTime
;
private
int
useScene
;
private
Integer
useScene
;
private
String
warehouseName
;
private
String
warehouseName
;
private
String
transportationNo
;
private
String
transportationNo
;
public
String
getWarehouseName
()
{
return
warehouseName
;
}
public
void
setWarehouseName
(
String
warehouseName
)
{
this
.
warehouseName
=
warehouseName
;
}
public
int
getId
()
{
public
int
getId
()
{
return
id
;
return
id
;
}
}
...
@@ -38,14 +30,6 @@ public class TDLDevice implements Serializable{
...
@@ -38,14 +30,6 @@ public class TDLDevice implements Serializable{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
String
getTDLSN
()
{
return
TDLSN
;
}
public
void
setTDLSN
(
String
TDLSN
)
{
this
.
TDLSN
=
TDLSN
;
}
public
String
getTDLName
()
{
public
String
getTDLName
()
{
return
TDLName
;
return
TDLName
;
}
}
...
@@ -54,6 +38,14 @@ public class TDLDevice implements Serializable{
...
@@ -54,6 +38,14 @@ public class TDLDevice implements Serializable{
this
.
TDLName
=
TDLName
;
this
.
TDLName
=
TDLName
;
}
}
public
String
getTDLSN
()
{
return
TDLSN
;
}
public
void
setTDLSN
(
String
TDLSN
)
{
this
.
TDLSN
=
TDLSN
;
}
public
String
getCounts
()
{
public
String
getCounts
()
{
return
counts
;
return
counts
;
}
}
...
@@ -70,14 +62,22 @@ public class TDLDevice implements Serializable{
...
@@ -70,14 +62,22 @@ public class TDLDevice implements Serializable{
this
.
lastTime
=
lastTime
;
this
.
lastTime
=
lastTime
;
}
}
public
int
getUseScene
()
{
public
Integer
getUseScene
()
{
return
useScene
;
return
useScene
;
}
}
public
void
setUseScene
(
int
useScene
)
{
public
void
setUseScene
(
Integer
useScene
)
{
this
.
useScene
=
useScene
;
this
.
useScene
=
useScene
;
}
}
public
String
getWarehouseName
()
{
return
warehouseName
;
}
public
void
setWarehouseName
(
String
warehouseName
)
{
this
.
warehouseName
=
warehouseName
;
}
public
String
getTransportationNo
()
{
public
String
getTransportationNo
()
{
return
transportationNo
;
return
transportationNo
;
}
}
...
...
src/main/java/com/example/tdl/entity/Topic.java
View file @
9bdad03a
...
@@ -5,11 +5,11 @@ public class Topic {
...
@@ -5,11 +5,11 @@ public class Topic {
private
String
topicName
;
private
String
topicName
;
private
int
type
;
private
Integer
type
;
private
int
intervalTime
;
private
Integer
intervalTime
;
private
int
frequency
;
private
Integer
frequency
;
private
Gateway
gateway
;
private
Gateway
gateway
;
...
@@ -29,27 +29,27 @@ public class Topic {
...
@@ -29,27 +29,27 @@ public class Topic {
this
.
topicName
=
topicName
;
this
.
topicName
=
topicName
;
}
}
public
int
getType
()
{
public
Integer
getType
()
{
return
type
;
return
type
;
}
}
public
void
setType
(
int
type
)
{
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
int
getIntervalTime
()
{
public
Integer
getIntervalTime
()
{
return
intervalTime
;
return
intervalTime
;
}
}
public
void
setIntervalTime
(
int
intervalTime
)
{
public
void
setIntervalTime
(
Integer
intervalTime
)
{
this
.
intervalTime
=
intervalTime
;
this
.
intervalTime
=
intervalTime
;
}
}
public
int
getFrequency
()
{
public
Integer
getFrequency
()
{
return
frequency
;
return
frequency
;
}
}
public
void
setFrequency
(
int
frequency
)
{
public
void
setFrequency
(
Integer
frequency
)
{
this
.
frequency
=
frequency
;
this
.
frequency
=
frequency
;
}
}
...
...
src/main/java/com/example/tdl/entity/TopicModelInfo.java
View file @
9bdad03a
...
@@ -7,11 +7,11 @@ public class TopicModelInfo {
...
@@ -7,11 +7,11 @@ public class TopicModelInfo {
private
String
topicName
;
private
String
topicName
;
private
int
type
;
private
Integer
type
;
private
int
intervalTime
;
private
Integer
intervalTime
;
private
int
frequency
;
private
Integer
frequency
;
public
int
getId
()
{
public
int
getId
()
{
return
id
;
return
id
;
...
@@ -37,27 +37,27 @@ public class TopicModelInfo {
...
@@ -37,27 +37,27 @@ public class TopicModelInfo {
this
.
topicName
=
topicName
;
this
.
topicName
=
topicName
;
}
}
public
int
getType
()
{
public
Integer
getType
()
{
return
type
;
return
type
;
}
}
public
void
setType
(
int
type
)
{
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
int
getIntervalTime
()
{
public
Integer
getIntervalTime
()
{
return
intervalTime
;
return
intervalTime
;
}
}
public
void
setIntervalTime
(
int
intervalTime
)
{
public
void
setIntervalTime
(
Integer
intervalTime
)
{
this
.
intervalTime
=
intervalTime
;
this
.
intervalTime
=
intervalTime
;
}
}
public
int
getFrequency
()
{
public
Integer
getFrequency
()
{
return
frequency
;
return
frequency
;
}
}
public
void
setFrequency
(
int
frequency
)
{
public
void
setFrequency
(
Integer
frequency
)
{
this
.
frequency
=
frequency
;
this
.
frequency
=
frequency
;
}
}
}
}
src/main/java/com/example/tdl/entity/Warehouse.java
View file @
9bdad03a
...
@@ -42,17 +42,17 @@ public class Warehouse implements Serializable {
...
@@ -42,17 +42,17 @@ public class Warehouse implements Serializable {
private
String
hardwareLevel
;
//硬件等级
private
String
hardwareLevel
;
//硬件等级
private
d
ouble
areaIndoor
;
//室内平面面积
private
D
ouble
areaIndoor
;
//室内平面面积
private
d
ouble
areaRack
;
//货架面积
private
D
ouble
areaRack
;
//货架面积
private
d
ouble
areaOutdoor
;
//实际室内总面积
private
D
ouble
areaOutdoor
;
//实际室内总面积
private
d
ouble
areaPlanIndoor
;
//实际室内总面积
private
D
ouble
areaPlanIndoor
;
//实际室内总面积
private
String
office
;
//办事处
private
String
office
;
//办事处
private
int
timeZone
;
//时区
private
Integer
timeZone
;
//时区
private
String
weatherInfo
;
//区域气象信息
private
String
weatherInfo
;
//区域气象信息
...
@@ -64,6 +64,38 @@ public class Warehouse implements Serializable {
...
@@ -64,6 +64,38 @@ public class Warehouse implements Serializable {
private
String
remark
;
private
String
remark
;
public
Warehouse
()
{
}
public
Warehouse
(
String
warehouseName
,
String
warehouseNo
,
String
country
,
String
province
,
String
city
,
String
district
,
String
address
,
String
regionCN
,
String
regionEN
,
String
longitude
,
String
latitude
,
String
property
,
String
type
,
String
alarmType
,
String
hardwareLevel
,
Double
areaIndoor
,
Double
areaRack
,
Double
areaOutdoor
,
Double
areaPlanIndoor
,
String
office
,
Integer
timeZone
,
String
weatherInfo
,
String
warehouseInfo
,
Long
createTime
,
Long
updateTime
,
String
remark
)
{
this
.
warehouseName
=
warehouseName
;
this
.
warehouseNo
=
warehouseNo
;
this
.
country
=
country
;
this
.
province
=
province
;
this
.
city
=
city
;
this
.
district
=
district
;
this
.
address
=
address
;
this
.
regionCN
=
regionCN
;
this
.
regionEN
=
regionEN
;
this
.
longitude
=
longitude
;
this
.
latitude
=
latitude
;
this
.
property
=
property
;
this
.
type
=
type
;
this
.
alarmType
=
alarmType
;
this
.
hardwareLevel
=
hardwareLevel
;
this
.
areaIndoor
=
areaIndoor
;
this
.
areaRack
=
areaRack
;
this
.
areaOutdoor
=
areaOutdoor
;
this
.
areaPlanIndoor
=
areaPlanIndoor
;
this
.
office
=
office
;
this
.
timeZone
=
timeZone
;
this
.
weatherInfo
=
weatherInfo
;
this
.
warehouseInfo
=
warehouseInfo
;
this
.
createTime
=
createTime
;
this
.
updateTime
=
updateTime
;
this
.
remark
=
remark
;
}
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
...
@@ -80,6 +112,14 @@ public class Warehouse implements Serializable {
...
@@ -80,6 +112,14 @@ public class Warehouse implements Serializable {
this
.
warehouseName
=
warehouseName
;
this
.
warehouseName
=
warehouseName
;
}
}
public
String
getWarehouseNo
()
{
return
warehouseNo
;
}
public
void
setWarehouseNo
(
String
warehouseNo
)
{
this
.
warehouseNo
=
warehouseNo
;
}
public
String
getCountry
()
{
public
String
getCountry
()
{
return
country
;
return
country
;
}
}
...
@@ -168,14 +208,6 @@ public class Warehouse implements Serializable {
...
@@ -168,14 +208,6 @@ public class Warehouse implements Serializable {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
Serializable
getSerializable
()
{
return
serializable
;
}
public
void
setSerializable
(
Serializable
serializable
)
{
this
.
serializable
=
serializable
;
}
public
String
getAlarmType
()
{
public
String
getAlarmType
()
{
return
alarmType
;
return
alarmType
;
}
}
...
@@ -192,35 +224,35 @@ public class Warehouse implements Serializable {
...
@@ -192,35 +224,35 @@ public class Warehouse implements Serializable {
this
.
hardwareLevel
=
hardwareLevel
;
this
.
hardwareLevel
=
hardwareLevel
;
}
}
public
d
ouble
getAreaIndoor
()
{
public
D
ouble
getAreaIndoor
()
{
return
areaIndoor
;
return
areaIndoor
;
}
}
public
void
setAreaIndoor
(
d
ouble
areaIndoor
)
{
public
void
setAreaIndoor
(
D
ouble
areaIndoor
)
{
this
.
areaIndoor
=
areaIndoor
;
this
.
areaIndoor
=
areaIndoor
;
}
}
public
d
ouble
getAreaRack
()
{
public
D
ouble
getAreaRack
()
{
return
areaRack
;
return
areaRack
;
}
}
public
void
setAreaRack
(
d
ouble
areaRack
)
{
public
void
setAreaRack
(
D
ouble
areaRack
)
{
this
.
areaRack
=
areaRack
;
this
.
areaRack
=
areaRack
;
}
}
public
d
ouble
getAreaOutdoor
()
{
public
D
ouble
getAreaOutdoor
()
{
return
areaOutdoor
;
return
areaOutdoor
;
}
}
public
void
setAreaOutdoor
(
d
ouble
areaOutdoor
)
{
public
void
setAreaOutdoor
(
D
ouble
areaOutdoor
)
{
this
.
areaOutdoor
=
areaOutdoor
;
this
.
areaOutdoor
=
areaOutdoor
;
}
}
public
d
ouble
getAreaPlanIndoor
()
{
public
D
ouble
getAreaPlanIndoor
()
{
return
areaPlanIndoor
;
return
areaPlanIndoor
;
}
}
public
void
setAreaPlanIndoor
(
d
ouble
areaPlanIndoor
)
{
public
void
setAreaPlanIndoor
(
D
ouble
areaPlanIndoor
)
{
this
.
areaPlanIndoor
=
areaPlanIndoor
;
this
.
areaPlanIndoor
=
areaPlanIndoor
;
}
}
...
@@ -232,11 +264,11 @@ public class Warehouse implements Serializable {
...
@@ -232,11 +264,11 @@ public class Warehouse implements Serializable {
this
.
office
=
office
;
this
.
office
=
office
;
}
}
public
int
getTimeZone
()
{
public
Integer
getTimeZone
()
{
return
timeZone
;
return
timeZone
;
}
}
public
void
setTimeZone
(
int
timeZone
)
{
public
void
setTimeZone
(
Integer
timeZone
)
{
this
.
timeZone
=
timeZone
;
this
.
timeZone
=
timeZone
;
}
}
...
@@ -256,14 +288,6 @@ public class Warehouse implements Serializable {
...
@@ -256,14 +288,6 @@ public class Warehouse implements Serializable {
this
.
warehouseInfo
=
warehouseInfo
;
this
.
warehouseInfo
=
warehouseInfo
;
}
}
public
String
getWarehouseNo
()
{
return
warehouseNo
;
}
public
void
setWarehouseNo
(
String
warehouseNo
)
{
this
.
warehouseNo
=
warehouseNo
;
}
public
Long
getCreateTime
()
{
public
Long
getCreateTime
()
{
return
createTime
;
return
createTime
;
}
}
...
@@ -287,36 +311,4 @@ public class Warehouse implements Serializable {
...
@@ -287,36 +311,4 @@ public class Warehouse implements Serializable {
public
void
setRemark
(
String
remark
)
{
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
Warehouse
()
{
}
public
Warehouse
(
String
warehouseName
,
String
warehouseNo
,
String
country
,
String
province
,
String
city
,
String
district
,
String
address
,
String
regionCN
,
String
regionEN
,
String
longitude
,
String
latitude
,
String
property
,
String
type
,
String
alarmType
,
String
hardwareLevel
,
double
areaIndoor
,
double
areaRack
,
double
areaOutdoor
,
double
areaPlanIndoor
,
String
office
,
int
timeZone
,
String
weatherInfo
,
String
warehouseInfo
,
Long
createTime
,
Long
updateTime
,
String
remark
)
{
this
.
warehouseName
=
warehouseName
;
this
.
warehouseNo
=
warehouseNo
;
this
.
country
=
country
;
this
.
province
=
province
;
this
.
city
=
city
;
this
.
district
=
district
;
this
.
address
=
address
;
this
.
regionCN
=
regionCN
;
this
.
regionEN
=
regionEN
;
this
.
longitude
=
longitude
;
this
.
latitude
=
latitude
;
this
.
property
=
property
;
this
.
type
=
type
;
this
.
alarmType
=
alarmType
;
this
.
hardwareLevel
=
hardwareLevel
;
this
.
areaIndoor
=
areaIndoor
;
this
.
areaRack
=
areaRack
;
this
.
areaOutdoor
=
areaOutdoor
;
this
.
areaPlanIndoor
=
areaPlanIndoor
;
this
.
office
=
office
;
this
.
timeZone
=
timeZone
;
this
.
weatherInfo
=
weatherInfo
;
this
.
warehouseInfo
=
warehouseInfo
;
this
.
createTime
=
createTime
;
this
.
updateTime
=
updateTime
;
this
.
remark
=
remark
;
}
}
}
src/main/java/com/example/tdl/interceptor/LoginInterceptor.java
View file @
9bdad03a
...
@@ -26,7 +26,7 @@ public class LoginInterceptor implements HandlerInterceptor {
...
@@ -26,7 +26,7 @@ public class LoginInterceptor implements HandlerInterceptor {
String
token
=
request
.
getHeader
(
"Account_token"
);
String
token
=
request
.
getHeader
(
"Account_token"
);
if
(
token
==
null
){
if
(
token
==
null
){
response
.
setContentType
(
"application/json"
);
response
.
setContentType
(
"application/json"
);
response
.
setStatus
(
401
);
response
.
setStatus
(
200
);
response
.
setHeader
(
"Content-type"
,
"text/html;charset=UTF-8"
);
response
.
setHeader
(
"Content-type"
,
"text/html;charset=UTF-8"
);
OutputStream
ps
=
response
.
getOutputStream
();
OutputStream
ps
=
response
.
getOutputStream
();
ps
.
write
(
"{\"code\":0,\"message\":\"用户未登录,请先登录\"}"
.
getBytes
(
"UTF-8"
));
ps
.
write
(
"{\"code\":0,\"message\":\"用户未登录,请先登录\"}"
.
getBytes
(
"UTF-8"
));
...
@@ -35,10 +35,10 @@ public class LoginInterceptor implements HandlerInterceptor {
...
@@ -35,10 +35,10 @@ public class LoginInterceptor implements HandlerInterceptor {
String
data
=
redisService
.
get
(
"TOKEN_"
+
token
);
String
data
=
redisService
.
get
(
"TOKEN_"
+
token
);
if
(
data
==
null
){
if
(
data
==
null
){
response
.
setContentType
(
"application/json"
);
response
.
setContentType
(
"application/json"
);
response
.
setStatus
(
401
);
response
.
setStatus
(
200
);
response
.
setHeader
(
"Content-type"
,
"text/html;charset=UTF-8"
);
response
.
setHeader
(
"Content-type"
,
"text/html;charset=UTF-8"
);
OutputStream
ps
=
response
.
getOutputStream
();
OutputStream
ps
=
response
.
getOutputStream
();
ps
.
write
(
"{\"code\":
0
,\"message\":\"用户登录过期,请重新登录\"}"
.
getBytes
(
"UTF-8"
));
ps
.
write
(
"{\"code\":
2
,\"message\":\"用户登录过期,请重新登录\"}"
.
getBytes
(
"UTF-8"
));
return
false
;
return
false
;
}
}
redisService
.
expire
(
"TOKEN_"
+
token
,
60
*
30
);
redisService
.
expire
(
"TOKEN_"
+
token
,
60
*
30
);
...
...
src/main/java/com/example/tdl/interceptor/PermissionInterceptor.java
0 → 100644
View file @
9bdad03a
package
com
.
example
.
tdl
.
interceptor
;
import
com.example.tdl.domain.vo.UserVo
;
import
com.example.tdl.service.RoleService
;
import
com.example.tdl.service.TokenRedisService
;
import
com.google.gson.Gson
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.servlet.HandlerInterceptor
;
import
org.springframework.web.servlet.ModelAndView
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
public
class
PermissionInterceptor
implements
HandlerInterceptor
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
PermissionInterceptor
.
class
);
@Autowired
private
TokenRedisService
redisService
;
@Autowired
private
RoleService
roleService
;
Gson
gson
=
new
Gson
();
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
logger
.
info
(
"==============执行顺序: 1、preHandle================"
);
String
requestUri
=
request
.
getRequestURI
();
String
contextPath
=
request
.
getContextPath
();
String
url
=
requestUri
.
substring
(
contextPath
.
length
());
logger
.
info
(
"requestUri:"
+
requestUri
);
logger
.
info
(
"contextPath:"
+
contextPath
);
logger
.
info
(
"url:"
+
url
);
//获取用户信息以及对应的权限信息
UserVo
user
=
gson
.
fromJson
(
redisService
.
get
(
"TOKEN_"
+
request
.
getHeader
(
"Account_token"
)),
UserVo
.
class
);
//根据用户名获取对应的权限
return
true
;
}
@Override
public
void
postHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
ModelAndView
modelAndView
)
throws
Exception
{
}
@Override
public
void
afterCompletion
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
Exception
ex
)
throws
Exception
{
}
}
src/main/java/com/example/tdl/mqtt/MqttConfig.java
0 → 100644
View file @
9bdad03a
package
com
.
example
.
tdl
.
mqtt
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.Configuration
;
@Configuration
@ConfigurationProperties
(
prefix
=
"tdl.mqtt"
)
public
class
MqttConfig
{
private
String
url
;
private
String
port
;
private
String
username
;
private
String
password
;
private
String
qos
;
private
String
clientPubId
;
private
String
clientSubId
;
private
String
clientSubTopic
;
private
Boolean
useCredential
;
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
String
getPort
()
{
return
port
;
}
public
void
setPort
(
String
port
)
{
this
.
port
=
port
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getQos
()
{
return
qos
;
}
public
void
setQos
(
String
qos
)
{
this
.
qos
=
qos
;
}
public
String
getClientPubId
()
{
return
clientPubId
;
}
public
void
setClientPubId
(
String
clientPubId
)
{
this
.
clientPubId
=
clientPubId
;
}
public
String
getClientSubId
()
{
return
clientSubId
;
}
public
void
setClientSubId
(
String
clientSubId
)
{
this
.
clientSubId
=
clientSubId
;
}
public
String
getClientSubTopic
()
{
return
clientSubTopic
;
}
public
void
setClientSubTopic
(
String
clientSubTopic
)
{
this
.
clientSubTopic
=
clientSubTopic
;
}
public
Boolean
getUseCredential
()
{
return
useCredential
;
}
public
void
setUseCredential
(
Boolean
useCredential
)
{
this
.
useCredential
=
useCredential
;
}
/* @Bean
public MqttTemplate mqttTemplate() throws MqttException {
MqttTemplate mqttTemplate =null;
try {
mqttTemplate = new MqttTemplate(this.url+":"+this.port,"witiumcloud");
mqttTemplate.connect(MqttTemplate.setOptions(this.username,this.password));
System.out.println("Mqtt connected with mqtt broker at url : 120.27.235.39:1883");
}catch (MqttException e)
{
e.printStackTrace();
}
return mqttTemplate;
}*/
}
src/main/java/com/example/tdl/service/UserService.java
View file @
9bdad03a
...
@@ -2,6 +2,9 @@ package com.example.tdl.service;
...
@@ -2,6 +2,9 @@ package com.example.tdl.service;
import
com.example.tdl.domain.vo.*
;
import
com.example.tdl.domain.vo.*
;
import
com.example.tdl.mapper.UserMapper
;
import
com.example.tdl.mapper.UserMapper
;
import
com.google.gson.Gson
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -9,9 +12,15 @@ import java.util.List;
...
@@ -9,9 +12,15 @@ import java.util.List;
@Service
@Service
public
class
UserService
{
public
class
UserService
{
Gson
gson
=
new
Gson
();
@Autowired
@Autowired
private
UserMapper
userMapper
;
private
UserMapper
userMapper
;
@Autowired
private
TokenRedisService
redisService
;
public
int
login
(
LoginUserVo
loginUserVo
){
public
int
login
(
LoginUserVo
loginUserVo
){
return
userMapper
.
login
(
loginUserVo
);
return
userMapper
.
login
(
loginUserVo
);
}
}
...
@@ -55,4 +64,23 @@ public class UserService {
...
@@ -55,4 +64,23 @@ public class UserService {
public
int
resetPassword
(
String
userNumber
,
String
password
){
public
int
resetPassword
(
String
userNumber
,
String
password
){
return
userMapper
.
resetPassword
(
userNumber
,
password
);
return
userMapper
.
resetPassword
(
userNumber
,
password
);
}
}
//登录
public
String
getUser
(
LoginUserVo
loginUserVo
)
{
//获取用户信息
UserVo
userVo
=
userMapper
.
getByUserName
(
loginUserVo
.
getUserName
());
if
(
userVo
==
null
){
return
null
;
}
//匹配密码
if
(!
userVo
.
getPassword
().
equals
(
DigestUtils
.
sha256Hex
(
loginUserVo
.
getPassword
()))){
return
null
;
}
String
token
=
DigestUtils
.
md5Hex
(
System
.
currentTimeMillis
()
+
userVo
.
getUserName
());
UserRedisVo
redisVo
=
new
UserRedisVo
(
userVo
.
getUserName
(),
userVo
.
getUserNumber
(),
userVo
.
getNickName
(),
userVo
.
getEmail
(),
userVo
.
getPhone
(),
userVo
.
getRoleName
());
//将用户数据保存到redis中
redisService
.
set
(
"TOKEN_"
+
token
,
gson
.
toJson
(
redisVo
),
60
*
30
);
return
token
;
}
}
}
src/main/java/com/example/tdl/shiro/AuthRealm.java
deleted
100644 → 0
View file @
b169ed88
package
com
.
example
.
tdl
.
shiro
;
import
com.example.tdl.domain.vo.UserVo
;
import
com.example.tdl.service.UserService
;
import
org.apache.shiro.authc.*
;
import
org.apache.shiro.authz.AuthorizationInfo
;
import
org.apache.shiro.authz.SimpleAuthorizationInfo
;
import
org.apache.shiro.realm.AuthorizingRealm
;
import
org.apache.shiro.subject.PrincipalCollection
;
import
org.springframework.beans.factory.annotation.Autowired
;
public
class
AuthRealm
extends
AuthorizingRealm
{
@Autowired
private
UserService
userService
;
protected
AuthenticationInfo
doGetAuthenticationInfo
(
AuthenticationToken
token
)
throws
AuthenticationException
{
System
.
out
.
println
(
"....认证...."
);
//1 强转token
UsernamePasswordToken
upToken
=
(
UsernamePasswordToken
)
token
;
//2 根据用户名查找用户信息
UserVo
user
=
userService
.
getByUserName
(
upToken
.
getUsername
());
if
(
user
==
null
){
return
null
;
}
SimpleAuthenticationInfo
info
=
new
SimpleAuthenticationInfo
(
user
,
user
.
getPassword
(),
this
.
getName
());
return
info
;
}
protected
AuthorizationInfo
doGetAuthorizationInfo
(
PrincipalCollection
principals
)
{
// 授权
//1 获取当前登录用户
UserVo
user
=
(
UserVo
)
principals
.
fromRealm
(
this
.
getName
()).
iterator
().
next
();
//2 获取用户的角色
//Set<Role> roles = user.getRoles();
//定义接收module的结果集
// List<String> list = new ArrayList<String>();
//3 遍历角色,获取每个角色对应的访问权限
//for(Role r:roles){
//}
// 4返回AuthorizationInfo信息
SimpleAuthorizationInfo
info
=
new
SimpleAuthorizationInfo
();
//添加list信息
//info.addStringPermissions(list);
//return info;
return
null
;
}
}
src/main/java/com/example/tdl/shiro/ShiroRealm.java
View file @
9bdad03a
...
@@ -64,9 +64,6 @@ public class ShiroRealm extends AuthorizingRealm {
...
@@ -64,9 +64,6 @@ public class ShiroRealm extends AuthorizingRealm {
Set
<
String
>
r
=
new
HashSet
<
String
>();
Set
<
String
>
r
=
new
HashSet
<
String
>();
r
.
add
(
"role1"
);
r
.
add
(
"role1"
);
info
.
setRoles
(
r
);
info
.
setRoles
(
r
);
//设置登录次数、时间
// userService.updateUserLogin(user);
return
info
;
return
info
;
}
}
...
@@ -75,8 +72,6 @@ public class ShiroRealm extends AuthorizingRealm {
...
@@ -75,8 +72,6 @@ public class ShiroRealm extends AuthorizingRealm {
//认证
//认证
logger
.
info
(
"doGetAuthenticationInfo +"
+
authenticationToken
.
toString
());
logger
.
info
(
"doGetAuthenticationInfo +"
+
authenticationToken
.
toString
());
UsernamePasswordToken
token
=
(
UsernamePasswordToken
)
authenticationToken
;
UsernamePasswordToken
token
=
(
UsernamePasswordToken
)
authenticationToken
;
//String userName=token.getUsername();
//logger.info(userName+token.getPassword());
UserVo
user
=
userService
.
getByUserName
(
token
.
getUsername
());
UserVo
user
=
userService
.
getByUserName
(
token
.
getUsername
());
if
(
user
==
null
){
if
(
user
==
null
){
...
...
src/main/java/com/example/tdl/util/CookieUtils.java
0 → 100644
View file @
9bdad03a
package
com
.
example
.
tdl
.
util
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
javax.servlet.http.Cookie
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.net.URLEncoder
;
/**
*
* Cookie 工具类
*
*/
public
final
class
CookieUtils
{
protected
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
CookieUtils
.
class
);
/**
* 得到Cookie的值, 不编码
*
* @param request
* @param cookieName
* @return
*/
public
static
String
getCookieValue
(
HttpServletRequest
request
,
String
cookieName
)
{
return
getCookieValue
(
request
,
cookieName
,
false
);
}
/**
* 得到Cookie的值,
*
* @param request
* @param cookieName
* @return
*/
public
static
String
getCookieValue
(
HttpServletRequest
request
,
String
cookieName
,
boolean
isDecoder
)
{
Cookie
[]
cookieList
=
request
.
getCookies
();
if
(
cookieList
==
null
||
cookieName
==
null
){
return
null
;
}
String
retValue
=
null
;
try
{
for
(
int
i
=
0
;
i
<
cookieList
.
length
;
i
++)
{
if
(
cookieList
[
i
].
getName
().
equals
(
cookieName
))
{
if
(
isDecoder
)
{
retValue
=
URLDecoder
.
decode
(
cookieList
[
i
].
getValue
(),
"UTF-8"
);
}
else
{
retValue
=
cookieList
[
i
].
getValue
();
}
break
;
}
}
}
catch
(
UnsupportedEncodingException
e
)
{
logger
.
error
(
"Cookie Decode Error."
,
e
);
}
return
retValue
;
}
/**
* 得到Cookie的值,
*
* @param request
* @param cookieName
* @return
*/
public
static
String
getCookieValue
(
HttpServletRequest
request
,
String
cookieName
,
String
encodeString
)
{
Cookie
[]
cookieList
=
request
.
getCookies
();
if
(
cookieList
==
null
||
cookieName
==
null
){
return
null
;
}
String
retValue
=
null
;
try
{
for
(
int
i
=
0
;
i
<
cookieList
.
length
;
i
++)
{
if
(
cookieList
[
i
].
getName
().
equals
(
cookieName
))
{
retValue
=
URLDecoder
.
decode
(
cookieList
[
i
].
getValue
(),
encodeString
);
break
;
}
}
}
catch
(
UnsupportedEncodingException
e
)
{
logger
.
error
(
"Cookie Decode Error."
,
e
);
}
return
retValue
;
}
/**
* 设置Cookie的值 不设置生效时间默认浏览器关闭即失效,也不编码
*/
public
static
void
setCookie
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
cookieName
,
String
cookieValue
)
{
setCookie
(
request
,
response
,
cookieName
,
cookieValue
,
-
1
);
}
/**
* 设置Cookie的值 在指定时间内生效,但不编码
*/
public
static
void
setCookie
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
cookieName
,
String
cookieValue
,
int
cookieMaxage
)
{
setCookie
(
request
,
response
,
cookieName
,
cookieValue
,
cookieMaxage
,
false
);
}
/**
* 设置Cookie的值 不设置生效时间,但编码
*/
public
static
void
setCookie
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
cookieName
,
String
cookieValue
,
boolean
isEncode
)
{
setCookie
(
request
,
response
,
cookieName
,
cookieValue
,
-
1
,
isEncode
);
}
/**
* 设置Cookie的值 在指定时间内生效, 编码参数
*/
public
static
void
setCookie
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
cookieName
,
String
cookieValue
,
int
cookieMaxage
,
boolean
isEncode
)
{
doSetCookie
(
request
,
response
,
cookieName
,
cookieValue
,
cookieMaxage
,
isEncode
);
}
/**
* 设置Cookie的值 在指定时间内生效, 编码参数(指定编码)
*/
public
static
void
setCookie
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
cookieName
,
String
cookieValue
,
int
cookieMaxage
,
String
encodeString
)
{
doSetCookie
(
request
,
response
,
cookieName
,
cookieValue
,
cookieMaxage
,
encodeString
);
}
/**
* 删除Cookie带cookie域名
*/
public
static
void
deleteCookie
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
cookieName
)
{
doSetCookie
(
request
,
response
,
cookieName
,
""
,
-
1
,
false
);
}
/**
* 设置Cookie的值,并使其在指定时间内生效
*
* @param cookieMaxage
* cookie生效的最大秒数
*/
private
static
final
void
doSetCookie
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
cookieName
,
String
cookieValue
,
int
cookieMaxage
,
boolean
isEncode
)
{
try
{
if
(
cookieValue
==
null
)
{
cookieValue
=
""
;
}
else
if
(
isEncode
)
{
cookieValue
=
URLEncoder
.
encode
(
cookieValue
,
"utf-8"
);
}
Cookie
cookie
=
new
Cookie
(
cookieName
,
cookieValue
);
if
(
cookieMaxage
>
0
)
cookie
.
setMaxAge
(
cookieMaxage
);
if
(
null
!=
request
)
{
// 设置域名的cookie
if
(
request
.
getRemoteHost
().
equals
(
"localhost"
)
||
request
.
getRemoteHost
().
equals
(
"127.0.0.1"
)
||
request
.
getRemoteHost
().
equals
(
"192.168.1.52"
))
{
cookie
.
setDomain
(
""
);
}
else
{
cookie
.
setDomain
(
getDomainName
(
request
));
}
}
cookie
.
setPath
(
"/"
);
response
.
addCookie
(
cookie
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"Cookie Encode Error."
,
e
);
}
}
/**
* 设置Cookie的值,并使其在指定时间内生效
*
* @param cookieMaxage
* cookie生效的最大秒数
*/
private
static
final
void
doSetCookie
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
cookieName
,
String
cookieValue
,
int
cookieMaxage
,
String
encodeString
)
{
try
{
if
(
cookieValue
==
null
)
{
cookieValue
=
""
;
}
else
{
cookieValue
=
URLEncoder
.
encode
(
cookieValue
,
encodeString
);
}
Cookie
cookie
=
new
Cookie
(
cookieName
,
cookieValue
);
if
(
cookieMaxage
>
0
)
cookie
.
setMaxAge
(
cookieMaxage
);
if
(
null
!=
request
)
// 设置域名的cookie
cookie
.
setDomain
(
getDomainName
(
request
));
cookie
.
setPath
(
"/"
);
response
.
addCookie
(
cookie
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"Cookie Encode Error."
,
e
);
}
}
/**
* 得到cookie的域名
*/
private
static
final
String
getDomainName
(
HttpServletRequest
request
)
{
String
domainName
=
null
;
String
serverName
=
request
.
getRequestURL
().
toString
();
if
(
serverName
==
null
||
serverName
.
equals
(
""
))
{
domainName
=
""
;
}
else
{
serverName
=
serverName
.
toLowerCase
();
serverName
=
serverName
.
substring
(
7
);
final
int
end
=
serverName
.
indexOf
(
"/"
);
serverName
=
serverName
.
substring
(
0
,
end
);
final
String
[]
domains
=
serverName
.
split
(
"\\."
);
int
len
=
domains
.
length
;
if
(
len
>
3
)
{
// www.xxx.com.cn
domainName
=
"."
+
domains
[
len
-
3
]
+
"."
+
domains
[
len
-
2
]
+
"."
+
domains
[
len
-
1
];
}
else
if
(
len
<=
3
&&
len
>
1
)
{
// xxx.com or xxx.cn
domainName
=
"."
+
domains
[
len
-
2
]
+
"."
+
domains
[
len
-
1
];
}
else
{
domainName
=
serverName
;
}
}
if
(
domainName
!=
null
&&
domainName
.
indexOf
(
":"
)
>
0
)
{
String
[]
ary
=
domainName
.
split
(
"\\:"
);
domainName
=
ary
[
0
];
}
return
domainName
;
}
}
src/main/java/com/example/tdl/web/AlarmController.java
View file @
9bdad03a
...
@@ -113,32 +113,32 @@ public class AlarmController {
...
@@ -113,32 +113,32 @@ public class AlarmController {
fb
.
setMessage
(
"请选择正确的预警场景"
);
fb
.
setMessage
(
"请选择正确的预警场景"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
addAlarmVo
.
getTemMax
()+
""
)
){
if
(
addAlarmVo
.
getTemMax
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"温度上限不能为空"
);
fb
.
setMessage
(
"温度上限不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
addAlarmVo
.
getTemMin
()+
""
)
){
if
(
addAlarmVo
.
getTemMin
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"温度下限不能为空"
);
fb
.
setMessage
(
"温度下限不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
addAlarmVo
.
getHumidityMax
()+
""
)
){
if
(
addAlarmVo
.
getHumidityMax
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"湿度上限不能为空"
);
fb
.
setMessage
(
"湿度上限不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
addAlarmVo
.
getHumidityMin
()+
""
)
){
if
(
addAlarmVo
.
getHumidityMin
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"湿度下限不能为空"
);
fb
.
setMessage
(
"湿度下限不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
addAlarmVo
.
getTilt
()+
""
)
){
if
(
addAlarmVo
.
getTilt
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"倾斜度不能为空"
);
fb
.
setMessage
(
"倾斜度不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
addAlarmVo
.
getShock
()+
""
)
){
if
(
addAlarmVo
.
getShock
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"震度不能为空"
);
fb
.
setMessage
(
"震度不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
...
@@ -206,32 +206,32 @@ public class AlarmController {
...
@@ -206,32 +206,32 @@ public class AlarmController {
fb
.
setMessage
(
"请选择正确的预警场景"
);
fb
.
setMessage
(
"请选择正确的预警场景"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateAlarmVo
.
getTemMax
()+
""
)
){
if
(
updateAlarmVo
.
getTemMax
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"温度上限不能为空"
);
fb
.
setMessage
(
"温度上限不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateAlarmVo
.
getTemMin
()+
""
)
){
if
(
updateAlarmVo
.
getTemMin
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"温度下限不能为空"
);
fb
.
setMessage
(
"温度下限不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateAlarmVo
.
getHumidityMax
()+
""
)
){
if
(
updateAlarmVo
.
getHumidityMax
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"湿度上限不能为空"
);
fb
.
setMessage
(
"湿度上限不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateAlarmVo
.
getHumidityMin
()+
""
)
){
if
(
updateAlarmVo
.
getHumidityMin
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"湿度下限不能为空"
);
fb
.
setMessage
(
"湿度下限不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateAlarmVo
.
getTilt
()+
""
)
){
if
(
updateAlarmVo
.
getTilt
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"倾斜度不能为空"
);
fb
.
setMessage
(
"倾斜度不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateAlarmVo
.
getShock
()+
""
)
){
if
(
updateAlarmVo
.
getShock
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"震度不能为空"
);
fb
.
setMessage
(
"震度不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
...
...
src/main/java/com/example/tdl/web/LoginController.java
View file @
9bdad03a
...
@@ -8,6 +8,7 @@ import com.example.tdl.entity.LoginLog;
...
@@ -8,6 +8,7 @@ import com.example.tdl.entity.LoginLog;
import
com.example.tdl.service.LoginLogService
;
import
com.example.tdl.service.LoginLogService
;
import
com.example.tdl.service.TokenRedisService
;
import
com.example.tdl.service.TokenRedisService
;
import
com.example.tdl.service.UserService
;
import
com.example.tdl.service.UserService
;
import
com.example.tdl.util.CookieUtils
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
...
@@ -50,7 +51,6 @@ public class LoginController {
...
@@ -50,7 +51,6 @@ public class LoginController {
" userName: 用户名,"
+
" userName: 用户名,"
+
" password: 密码"
)
" password: 密码"
)
@RequestMapping
(
value
=
"/loginForToken"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/loginForToken"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
String
loginForToken
(
@RequestBody
LoginUserVo
loginUserVo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
loginForToken
(
@RequestBody
LoginUserVo
loginUserVo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
if
(
StringUtils
.
isEmpty
(
loginUserVo
.
getUserName
())){
if
(
StringUtils
.
isEmpty
(
loginUserVo
.
getUserName
())){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
...
@@ -62,11 +62,6 @@ public class LoginController {
...
@@ -62,11 +62,6 @@ public class LoginController {
fb
.
setMessage
(
"密码不能为空"
);
fb
.
setMessage
(
"密码不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
userService
.
getByUserName
(
loginUserVo
.
getUserName
())
==
null
){
fb
.
setCode
(
0
);
fb
.
setMessage
(
"该用户不存在"
);
return
gson
.
toJson
(
fb
);
}
try
{
try
{
UserVo
userVo
=
userService
.
getByUserName
(
loginUserVo
.
getUserName
());
UserVo
userVo
=
userService
.
getByUserName
(
loginUserVo
.
getUserName
());
//将封装好的用户名和密码交给shiro安全框架并实现登陆
//将封装好的用户名和密码交给shiro安全框架并实现登陆
...
@@ -100,7 +95,6 @@ public class LoginController {
...
@@ -100,7 +95,6 @@ public class LoginController {
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
})
})
@RequestMapping
(
value
=
"/logout"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/logout"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
String
logout
(
HttpServletRequest
request
){
public
String
logout
(
HttpServletRequest
request
){
String
token
=
request
.
getHeader
(
"Account_token"
);
String
token
=
request
.
getHeader
(
"Account_token"
);
tokenRedisService
.
delKey
(
"TOKEN_"
+
token
);
tokenRedisService
.
delKey
(
"TOKEN_"
+
token
);
...
@@ -110,13 +104,38 @@ public class LoginController {
...
@@ -110,13 +104,38 @@ public class LoginController {
}
}
@ApiOperation
(
value
=
"登录"
,
notes
=
"登录"
)
@RequestMapping
(
value
=
"/login"
,
method
=
RequestMethod
.
POST
)
public
String
login
(
@RequestBody
LoginUserVo
loginUserVo
,
HttpServletRequest
request
,
HttpServletResponse
response
){
if
(
StringUtils
.
isEmpty
(
loginUserVo
.
getUserName
())){
fb
.
setCode
(
0
);
fb
.
setMessage
(
"用户名不能为空"
);
return
gson
.
toJson
(
fb
);
}
if
(
StringUtils
.
isEmpty
(
loginUserVo
.
getPassword
())){
fb
.
setCode
(
0
);
fb
.
setMessage
(
"密码不能为空"
);
return
gson
.
toJson
(
fb
);
}
String
token
=
userService
.
getUser
(
loginUserVo
);
if
(
token
==
null
){
fb
.
setCode
(
0
);
fb
.
setMessage
(
"账号或者密码错误"
);
}
else
{
CookieUtils
.
setCookie
(
request
,
response
,
"Account_token"
,
token
);
fb
.
setCode
(
1
);
fb
.
setMessage
(
token
);
}
return
gson
.
toJson
(
fb
);
}
//登录功能
//登录功能
// @ApiOperation(value = "登录功能",notes = "登录功能:" +
// @ApiOperation(value = "登录功能",notes = "登录功能:" +
// " userName: 用户名," +
// " userName: 用户名," +
// " password: 密码")
// " password: 密码")
// @RequestMapping(value = "/doLogin", method = RequestMethod.POST)
// @RequestMapping(value = "/doLogin", method = RequestMethod.POST)
// @ResponseBody
// public String login(@RequestBody LoginUserVo loginUserVo) {
// public String login(@RequestBody LoginUserVo loginUserVo) {
// if(StringUtils.isEmpty(loginUserVo.getUserName())){
// if(StringUtils.isEmpty(loginUserVo.getUserName())){
// fb.setCode(0);
// fb.setCode(0);
...
...
src/main/java/com/example/tdl/web/LoginLogController.java
View file @
9bdad03a
...
@@ -38,7 +38,6 @@ public class LoginLogController {
...
@@ -38,7 +38,6 @@ public class LoginLogController {
@Autowired
@Autowired
private
TokenRedisService
tokenRedisService
;
private
TokenRedisService
tokenRedisService
;
//查询登录日志
//查询登录日志
@ApiOperation
(
value
=
"查询登录日志"
,
notes
=
"查询登录日志,返回值说明:"
+
@ApiOperation
(
value
=
"查询登录日志"
,
notes
=
"查询登录日志,返回值说明:"
+
" userName:用户名,"
+
" userName:用户名,"
+
...
@@ -65,12 +64,12 @@ public class LoginLogController {
...
@@ -65,12 +64,12 @@ public class LoginLogController {
})
})
@RequestMapping
(
value
=
"/getByTime"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/getByTime"
,
method
=
RequestMethod
.
POST
)
public
Object
getByTime
(
@RequestBody
LoginLogTermVo
loginLogTermVo
){
public
Object
getByTime
(
@RequestBody
LoginLogTermVo
loginLogTermVo
){
if
(
StringUtils
.
isEmpty
(
loginLogTermVo
.
getStartTime
()+
""
)
){
if
(
loginLogTermVo
.
getStartTime
()
==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"查询开始时间不能为空"
);
fb
.
setMessage
(
"查询开始时间不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
loginLogTermVo
.
getStopTime
()+
""
)
){
if
(
loginLogTermVo
.
getStopTime
()
==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"查询结束时间不能为空"
);
fb
.
setMessage
(
"查询结束时间不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
...
...
src/main/java/com/example/tdl/web/ProbesModelController.java
View file @
9bdad03a
...
@@ -69,7 +69,7 @@ public class ProbesModelController {
...
@@ -69,7 +69,7 @@ public class ProbesModelController {
fb
.
setMessage
(
"模板名不能为空"
);
fb
.
setMessage
(
"模板名不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
addProbesModelVo
.
getCountNum
()+
""
)
){
if
(
addProbesModelVo
.
getCountNum
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"新增的模板通道数量不能为空"
);
fb
.
setMessage
(
"新增的模板通道数量不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
...
...
src/main/java/com/example/tdl/web/TopicModelInfoController.java
View file @
9bdad03a
...
@@ -90,12 +90,12 @@ public class TopicModelInfoController {
...
@@ -90,12 +90,12 @@ public class TopicModelInfoController {
fb
.
setMessage
(
"添加的主题名不能为空"
);
fb
.
setMessage
(
"添加的主题名不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
topicModelInfoVo
.
getType
()+
""
)
){
if
(
topicModelInfoVo
.
getType
()
==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"添加的主题类型不能为空"
);
fb
.
setMessage
(
"添加的主题类型不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
topicModelInfoVo
.
getIntervalTime
()+
""
)
){
if
(
topicModelInfoVo
.
getIntervalTime
()
==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"添加的间隔时间不能为空"
);
fb
.
setMessage
(
"添加的间隔时间不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
...
@@ -148,12 +148,12 @@ public class TopicModelInfoController {
...
@@ -148,12 +148,12 @@ public class TopicModelInfoController {
fb
.
setMessage
(
"修改的主题名不能为空"
);
fb
.
setMessage
(
"修改的主题名不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateTopicModelInfoVo
.
getType
()+
""
)
){
if
(
updateTopicModelInfoVo
.
getType
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"修改的主题类型不能为空"
);
fb
.
setMessage
(
"修改的主题类型不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateTopicModelInfoVo
.
getIntervalTime
()+
""
)
){
if
(
updateTopicModelInfoVo
.
getIntervalTime
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"修改的间隔时间不能为空"
);
fb
.
setMessage
(
"修改的间隔时间不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
...
...
src/main/java/com/example/tdl/web/WarehouseController.java
View file @
9bdad03a
...
@@ -266,22 +266,22 @@ public class WarehouseController {
...
@@ -266,22 +266,22 @@ public class WarehouseController {
fb
.
setMessage
(
"请选择正确的硬件等级"
);
fb
.
setMessage
(
"请选择正确的硬件等级"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
addWarehouseVo
.
getAreaIndoor
()+
""
)
){
if
(
addWarehouseVo
.
getAreaIndoor
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"室内平面面积不能为空"
);
fb
.
setMessage
(
"室内平面面积不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
addWarehouseVo
.
getAreaRack
()+
""
)
){
if
(
addWarehouseVo
.
getAreaRack
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"货架面积不能为空"
);
fb
.
setMessage
(
"货架面积不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
addWarehouseVo
.
getAreaOutdoor
()+
""
)
){
if
(
addWarehouseVo
.
getAreaOutdoor
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"室外面积不能为空"
);
fb
.
setMessage
(
"室外面积不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
addWarehouseVo
.
getAreaPlanIndoor
()+
""
)
){
if
(
addWarehouseVo
.
getAreaPlanIndoor
()
==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"实际室内总面积不能为空"
);
fb
.
setMessage
(
"实际室内总面积不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
...
@@ -291,7 +291,7 @@ public class WarehouseController {
...
@@ -291,7 +291,7 @@ public class WarehouseController {
fb
.
setMessage
(
"办事处不能为空"
);
fb
.
setMessage
(
"办事处不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
addWarehouseVo
.
getTimeZone
()+
""
)
){
if
(
addWarehouseVo
.
getTimeZone
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"时区不能为空"
);
fb
.
setMessage
(
"时区不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
...
@@ -465,22 +465,22 @@ public class WarehouseController {
...
@@ -465,22 +465,22 @@ public class WarehouseController {
fb
.
setMessage
(
"请选择正确的硬件等级"
);
fb
.
setMessage
(
"请选择正确的硬件等级"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateWarehouseVo
.
getAreaIndoor
()+
""
)
){
if
(
updateWarehouseVo
.
getAreaIndoor
()
==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"室内平面面积不能为空"
);
fb
.
setMessage
(
"室内平面面积不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateWarehouseVo
.
getAreaRack
()+
""
)
){
if
(
updateWarehouseVo
.
getAreaRack
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"货架面积不能为空"
);
fb
.
setMessage
(
"货架面积不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateWarehouseVo
.
getAreaOutdoor
()+
""
)
){
if
(
updateWarehouseVo
.
getAreaOutdoor
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"室外面积不能为空"
);
fb
.
setMessage
(
"室外面积不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateWarehouseVo
.
getAreaPlanIndoor
()+
""
)
){
if
(
updateWarehouseVo
.
getAreaPlanIndoor
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"实际室内总面积不能为空"
);
fb
.
setMessage
(
"实际室内总面积不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
...
@@ -490,7 +490,7 @@ public class WarehouseController {
...
@@ -490,7 +490,7 @@ public class WarehouseController {
fb
.
setMessage
(
"办事处不能为空"
);
fb
.
setMessage
(
"办事处不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateWarehouseVo
.
getTimeZone
()+
""
)
){
if
(
updateWarehouseVo
.
getTimeZone
()==
null
){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
"时区不能为空"
);
fb
.
setMessage
(
"时区不能为空"
);
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
...
...
src/main/resources/application-dev.properties
0 → 100644
View file @
9bdad03a
spring.datasource.url
=
jdbc:mysql://192.168.1.200:3306/tdlcloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.redis.host
=
192.168.1.200
tdl.influxdb.host
=
http://192.168.1.200:8086
src/main/resources/application-docker.properties
0 → 100644
View file @
9bdad03a
spring.datasource.url
=
jdbc:mysql://HostTest-mysql:3306/cy?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.username
=
root
spring.datasource.password
=
37774020
# Redisַ
spring.redis.host
=
HostTest-redis
spring.redis.port
=
6379
tdl.influxdb.host
=
http://HostTest-influxdb:8086
# Logging
logging.config
=
classpath:logback.xml
src/main/resources/application.properties
View file @
9bdad03a
...
@@ -35,3 +35,16 @@ spring.redis.timeout=0
...
@@ -35,3 +35,16 @@ spring.redis.timeout=0
# Logging
# Logging
logging.config
=
classpath:logback.xml
logging.config
=
classpath:logback.xml
tdl.mqtt.url
=
tcp://192.168.1.87
tdl.mqtt.port
=
1883
tdl.mqtt.username
=
test
tdl.mqtt.password
=
witium
tdl.mqtt.qos
=
0
tdl.mqtt.timeout
=
20;
tdl.mqtt.clientPubId
=
witiumcloud
tdl.mqtt.useCredential
=
true
tdl.mqtt.clientSubId
=
witiumcloud
tdl.mqtt.clientSubTopic
=
witium/#
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