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
563d88ca
Commit
563d88ca
authored
Aug 09, 2018
by
zhuangzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8.9-修复仓库环境数据异常bug;增加了公司自定义主题颜色以及字体颜色的功能能
parent
4b485e45
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
317 additions
and
85 deletions
+317
-85
AddCompanyVo.java
src/main/java/com/example/tdl/domain/vo/AddCompanyVo.java
+43
-23
ResultCompanyVo.java
src/main/java/com/example/tdl/domain/vo/ResultCompanyVo.java
+34
-14
UpdateCompanyVo.java
src/main/java/com/example/tdl/domain/vo/UpdateCompanyVo.java
+20
-0
UserNameVo.java
src/main/java/com/example/tdl/domain/vo/UserNameVo.java
+41
-0
TDLLogMapper.java
src/main/java/com/example/tdl/mapper/TDLLogMapper.java
+2
-0
TDLLogService.java
src/main/java/com/example/tdl/service/TDLLogService.java
+3
-0
CompanyController.java
src/main/java/com/example/tdl/web/CompanyController.java
+42
-5
EquipmentBindingController.java
.../java/com/example/tdl/web/EquipmentBindingController.java
+51
-5
RoleController.java
src/main/java/com/example/tdl/web/RoleController.java
+2
-1
UserController.java
src/main/java/com/example/tdl/web/UserController.java
+9
-2
application-docker.properties
src/main/resources/application-docker.properties
+26
-26
application.properties
src/main/resources/application.properties
+2
-2
messages_en.properties
src/main/resources/i18n/messages_en.properties
+6
-1
messages_ja.properties
src/main/resources/i18n/messages_ja.properties
+11
-0
messages_zh_CN.properties
src/main/resources/i18n/messages_zh_CN.properties
+4
-0
CompanyMapper.xml
src/main/resources/mapper/CompanyMapper.xml
+9
-5
GatewayMapper.xml
src/main/resources/mapper/GatewayMapper.xml
+2
-1
TDLLogMapper.xml
src/main/resources/mapper/TDLLogMapper.xml
+10
-0
No files found.
src/main/java/com/example/tdl/domain/vo/AddCompanyVo.java
View file @
563d88ca
...
@@ -19,31 +19,11 @@ public class AddCompanyVo {
...
@@ -19,31 +19,11 @@ public class AddCompanyVo {
private
String
img
;
private
String
img
;
private
String
roleName
;
private
String
themeColors
;
public
String
getRoleName
()
{
return
roleName
;
}
public
void
setRoleName
(
String
roleName
)
{
this
.
roleName
=
roleName
;
}
public
String
getAlias
()
{
return
alias
;
}
public
void
setAlias
(
String
alias
)
{
this
.
alias
=
alias
;
}
public
String
getImg
()
{
private
String
roleName
;
return
img
;
}
public
void
setImg
(
String
img
)
{
private
String
fontColors
;
this
.
img
=
img
;
}
public
String
getCompanyNo
()
{
public
String
getCompanyNo
()
{
return
companyNo
;
return
companyNo
;
...
@@ -61,6 +41,14 @@ public class AddCompanyVo {
...
@@ -61,6 +41,14 @@ public class AddCompanyVo {
this
.
companyName
=
companyName
;
this
.
companyName
=
companyName
;
}
}
public
String
getAlias
()
{
return
alias
;
}
public
void
setAlias
(
String
alias
)
{
this
.
alias
=
alias
;
}
public
String
getCountry
()
{
public
String
getCountry
()
{
return
country
;
return
country
;
}
}
...
@@ -100,4 +88,36 @@ public class AddCompanyVo {
...
@@ -100,4 +88,36 @@ public class AddCompanyVo {
public
void
setManager
(
String
manager
)
{
public
void
setManager
(
String
manager
)
{
this
.
manager
=
manager
;
this
.
manager
=
manager
;
}
}
public
String
getImg
()
{
return
img
;
}
public
void
setImg
(
String
img
)
{
this
.
img
=
img
;
}
public
String
getThemeColors
()
{
return
themeColors
;
}
public
void
setThemeColors
(
String
themeColors
)
{
this
.
themeColors
=
themeColors
;
}
public
String
getRoleName
()
{
return
roleName
;
}
public
void
setRoleName
(
String
roleName
)
{
this
.
roleName
=
roleName
;
}
public
String
getFontColors
()
{
return
fontColors
;
}
public
void
setFontColors
(
String
fontColors
)
{
this
.
fontColors
=
fontColors
;
}
}
}
src/main/java/com/example/tdl/domain/vo/ResultCompanyVo.java
View file @
563d88ca
...
@@ -19,21 +19,9 @@ public class ResultCompanyVo {
...
@@ -19,21 +19,9 @@ public class ResultCompanyVo {
private
String
img
;
private
String
img
;
public
String
getAlias
()
{
private
String
themeColors
;
return
alias
;
}
public
void
setAlias
(
String
alias
)
{
this
.
alias
=
alias
;
}
public
String
getImg
()
{
private
String
fontColors
;
return
img
;
}
public
void
setImg
(
String
img
)
{
this
.
img
=
img
;
}
public
String
getCompanyNo
()
{
public
String
getCompanyNo
()
{
return
companyNo
;
return
companyNo
;
...
@@ -51,6 +39,14 @@ public class ResultCompanyVo {
...
@@ -51,6 +39,14 @@ public class ResultCompanyVo {
this
.
companyName
=
companyName
;
this
.
companyName
=
companyName
;
}
}
public
String
getAlias
()
{
return
alias
;
}
public
void
setAlias
(
String
alias
)
{
this
.
alias
=
alias
;
}
public
String
getCountry
()
{
public
String
getCountry
()
{
return
country
;
return
country
;
}
}
...
@@ -90,4 +86,28 @@ public class ResultCompanyVo {
...
@@ -90,4 +86,28 @@ public class ResultCompanyVo {
public
void
setManager
(
String
manager
)
{
public
void
setManager
(
String
manager
)
{
this
.
manager
=
manager
;
this
.
manager
=
manager
;
}
}
public
String
getImg
()
{
return
img
;
}
public
void
setImg
(
String
img
)
{
this
.
img
=
img
;
}
public
String
getThemeColors
()
{
return
themeColors
;
}
public
void
setThemeColors
(
String
themeColors
)
{
this
.
themeColors
=
themeColors
;
}
public
String
getFontColors
()
{
return
fontColors
;
}
public
void
setFontColors
(
String
fontColors
)
{
this
.
fontColors
=
fontColors
;
}
}
}
src/main/java/com/example/tdl/domain/vo/UpdateCompanyVo.java
View file @
563d88ca
...
@@ -17,6 +17,10 @@ public class UpdateCompanyVo {
...
@@ -17,6 +17,10 @@ public class UpdateCompanyVo {
private
String
manager
;
private
String
manager
;
private
String
themeColors
;
private
String
fontColors
;
public
String
getAlias
()
{
public
String
getAlias
()
{
return
alias
;
return
alias
;
}
}
...
@@ -80,4 +84,20 @@ public class UpdateCompanyVo {
...
@@ -80,4 +84,20 @@ public class UpdateCompanyVo {
public
void
setManager
(
String
manager
)
{
public
void
setManager
(
String
manager
)
{
this
.
manager
=
manager
;
this
.
manager
=
manager
;
}
}
public
String
getThemeColors
()
{
return
themeColors
;
}
public
void
setThemeColors
(
String
themeColors
)
{
this
.
themeColors
=
themeColors
;
}
public
String
getFontColors
()
{
return
fontColors
;
}
public
void
setFontColors
(
String
fontColors
)
{
this
.
fontColors
=
fontColors
;
}
}
}
src/main/java/com/example/tdl/domain/vo/UserNameVo.java
View file @
563d88ca
...
@@ -12,6 +12,12 @@ public class UserNameVo {
...
@@ -12,6 +12,12 @@ public class UserNameVo {
private
String
companyAlias
;
private
String
companyAlias
;
private
String
themeColors
;
private
String
companyNo
;
private
String
fontColors
;
public
UserNameVo
()
{
public
UserNameVo
()
{
}
}
...
@@ -23,6 +29,25 @@ public class UserNameVo {
...
@@ -23,6 +29,25 @@ public class UserNameVo {
this
.
companyAlias
=
companyAlias
;
this
.
companyAlias
=
companyAlias
;
}
}
public
UserNameVo
(
String
userName
,
String
time
,
String
ipAddress
,
String
companyImg
,
String
companyAlias
,
String
themeColors
,
String
companyNo
,
String
fontColors
)
{
UserName
=
userName
;
this
.
time
=
time
;
this
.
ipAddress
=
ipAddress
;
this
.
companyImg
=
companyImg
;
this
.
companyAlias
=
companyAlias
;
this
.
themeColors
=
themeColors
;
this
.
companyNo
=
companyNo
;
this
.
fontColors
=
fontColors
;
}
public
String
getThemeColors
()
{
return
themeColors
;
}
public
void
setThemeColors
(
String
themeColors
)
{
this
.
themeColors
=
themeColors
;
}
public
String
getCompanyAlias
()
{
public
String
getCompanyAlias
()
{
return
companyAlias
;
return
companyAlias
;
}
}
...
@@ -63,4 +88,20 @@ public class UserNameVo {
...
@@ -63,4 +88,20 @@ public class UserNameVo {
this
.
ipAddress
=
ipAddress
;
this
.
ipAddress
=
ipAddress
;
}
}
public
String
getCompanyNo
()
{
return
companyNo
;
}
public
void
setCompanyNo
(
String
companyNo
)
{
this
.
companyNo
=
companyNo
;
}
public
String
getFontColors
()
{
return
fontColors
;
}
public
void
setFontColors
(
String
fontColors
)
{
this
.
fontColors
=
fontColors
;
}
}
}
src/main/java/com/example/tdl/mapper/TDLLogMapper.java
View file @
563d88ca
...
@@ -23,6 +23,8 @@ public interface TDLLogMapper {
...
@@ -23,6 +23,8 @@ public interface TDLLogMapper {
ResultAlarmVo
getWarehouseByTdl
(
@Param
(
"warehouseNo"
)
String
warehouseNo
,
@Param
(
"TDLSN"
)
String
TDLSN
);
ResultAlarmVo
getWarehouseByTdl
(
@Param
(
"warehouseNo"
)
String
warehouseNo
,
@Param
(
"TDLSN"
)
String
TDLSN
);
ResultAlarmVo
getAlarm
(
@Param
(
"gatewaySN"
)
String
gatewaySN
,
@Param
(
"gatewayType"
)
String
gatewayType
,
@Param
(
"TDLSN"
)
String
TdlSN
);
List
<
WarehouseLogVo
>
getByWarehouse
(
String
warehouseNo
);
List
<
WarehouseLogVo
>
getByWarehouse
(
String
warehouseNo
);
Long
getTimeByWarehouseNo
(
@Param
(
"warehouseNo"
)
String
warehouseNo
,
@Param
(
"gatewaySN"
)
String
gatewaySN
);
Long
getTimeByWarehouseNo
(
@Param
(
"warehouseNo"
)
String
warehouseNo
,
@Param
(
"gatewaySN"
)
String
gatewaySN
);
...
...
src/main/java/com/example/tdl/service/TDLLogService.java
View file @
563d88ca
...
@@ -42,6 +42,9 @@ public class TDLLogService {
...
@@ -42,6 +42,9 @@ public class TDLLogService {
public
ResultAlarmVo
getWarehouseByTdl
(
String
warehouseNo
,
String
TdlSN
){
public
ResultAlarmVo
getWarehouseByTdl
(
String
warehouseNo
,
String
TdlSN
){
return
tdlLogMapper
.
getWarehouseByTdl
(
warehouseNo
,
TdlSN
);
return
tdlLogMapper
.
getWarehouseByTdl
(
warehouseNo
,
TdlSN
);
}
}
public
ResultAlarmVo
getAlarm
(
String
gatewaySN
,
String
gatewayType
,
String
TdlSN
){
return
tdlLogMapper
.
getAlarm
(
gatewaySN
,
gatewayType
,
TdlSN
);
}
public
List
<
WarehouseLogVo
>
getByWarehouse
(
String
warehouseNo
){
public
List
<
WarehouseLogVo
>
getByWarehouse
(
String
warehouseNo
){
return
tdlLogMapper
.
getByWarehouse
(
warehouseNo
);
return
tdlLogMapper
.
getByWarehouse
(
warehouseNo
);
...
...
src/main/java/com/example/tdl/web/CompanyController.java
View file @
563d88ca
...
@@ -126,11 +126,26 @@ public class CompanyController {
...
@@ -126,11 +126,26 @@ public class CompanyController {
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"manager"
));
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"manager"
));
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
// if (!addCompanyVo.getTel().matches("^1[34578]\\d{9}$")){
if
(
StringUtils
.
isEmpty
(
addCompanyVo
.
getThemeColors
())){
// fb.setCode(0);
fb
.
setCode
(
0
);
// fb.setMessage(i18n.getMessage(request,"wrongTel"));
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"themeColors"
));
// return gson.toJson(fb);
return
gson
.
toJson
(
fb
);
// }
}
if
(!
addCompanyVo
.
getThemeColors
().
matches
(
"^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$"
)){
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"wrongThemeColors"
));
return
gson
.
toJson
(
fb
);
}
if
(
StringUtils
.
isEmpty
(
addCompanyVo
.
getFontColors
())){
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"fontColors"
));
return
gson
.
toJson
(
fb
);
}
if
(!
addCompanyVo
.
getFontColors
().
matches
(
"^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$"
)){
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"wrongFontColors"
));
return
gson
.
toJson
(
fb
);
}
if
(
StringUtils
.
isEmpty
(
addCompanyVo
.
getRoleName
())){
if
(
StringUtils
.
isEmpty
(
addCompanyVo
.
getRoleName
())){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"roleName"
));
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"roleName"
));
...
@@ -164,6 +179,8 @@ public class CompanyController {
...
@@ -164,6 +179,8 @@ public class CompanyController {
map
.
put
(
"addressDetail"
,
addCompanyVo
.
getAddressDetail
());
map
.
put
(
"addressDetail"
,
addCompanyVo
.
getAddressDetail
());
map
.
put
(
"tel"
,
addCompanyVo
.
getTel
());
map
.
put
(
"tel"
,
addCompanyVo
.
getTel
());
map
.
put
(
"manager"
,
addCompanyVo
.
getManager
());
map
.
put
(
"manager"
,
addCompanyVo
.
getManager
());
map
.
put
(
"themeColors"
,
addCompanyVo
.
getThemeColors
());
map
.
put
(
"fontColors"
,
addCompanyVo
.
getFontColors
());
map
.
put
(
"img"
,
addCompanyVo
.
getImg
());
map
.
put
(
"img"
,
addCompanyVo
.
getImg
());
map
.
put
(
"parentCompanyNo"
,
user
.
getCompanyNo
());
map
.
put
(
"parentCompanyNo"
,
user
.
getCompanyNo
());
map
.
put
(
"roleName"
,
addCompanyVo
.
getRoleName
());
map
.
put
(
"roleName"
,
addCompanyVo
.
getRoleName
());
...
@@ -243,6 +260,26 @@ public class CompanyController {
...
@@ -243,6 +260,26 @@ public class CompanyController {
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"manager"
));
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"manager"
));
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
StringUtils
.
isEmpty
(
updateCompanyVo
.
getThemeColors
())){
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"themeColors"
));
return
gson
.
toJson
(
fb
);
}
if
(!
updateCompanyVo
.
getThemeColors
().
matches
(
"^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$"
)){
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"wrongThemeColors"
));
return
gson
.
toJson
(
fb
);
}
if
(
StringUtils
.
isEmpty
(
updateCompanyVo
.
getFontColors
())){
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"fontColors"
));
return
gson
.
toJson
(
fb
);
}
if
(!
updateCompanyVo
.
getFontColors
().
matches
(
"^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$"
)){
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"wrongFontColors"
));
return
gson
.
toJson
(
fb
);
}
ResultCompanyVo
resultCompanyVo
=
companyService
.
getByCompanyNo
(
updateCompanyVo
.
getCompanyNo
());
ResultCompanyVo
resultCompanyVo
=
companyService
.
getByCompanyNo
(
updateCompanyVo
.
getCompanyNo
());
if
(
companyService
.
getByCompanyName
(
updateCompanyVo
.
getCompanyName
())!=
null
&&!
resultCompanyVo
.
getCompanyName
().
equals
(
updateCompanyVo
.
getCompanyName
())){
if
(
companyService
.
getByCompanyName
(
updateCompanyVo
.
getCompanyName
())!=
null
&&!
resultCompanyVo
.
getCompanyName
().
equals
(
updateCompanyVo
.
getCompanyName
())){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
...
...
src/main/java/com/example/tdl/web/EquipmentBindingController.java
View file @
563d88ca
...
@@ -68,6 +68,9 @@ public class EquipmentBindingController {
...
@@ -68,6 +68,9 @@ public class EquipmentBindingController {
@Autowired
@Autowired
private
TopicService
topicService
;
private
TopicService
topicService
;
@Autowired
private
TDLLogService
tdlLogService
;
@Autowired
@Autowired
private
I18nController
i18n
;
private
I18nController
i18n
;
...
@@ -159,8 +162,7 @@ public class EquipmentBindingController {
...
@@ -159,8 +162,7 @@ public class EquipmentBindingController {
gpsPeriod
=
5
;
gpsPeriod
=
5
;
gprsPeriod
=
15
;
gprsPeriod
=
15
;
}
}
//开始绑定
ConfigVo
configVo
=
configService
.
getConfig
(
bindingVo
.
getgSN
(),
bindingVo
.
getType
());
//获取gateway下的所有tdl的编号
List
<
Float
>
tempL
=
new
ArrayList
<>();
List
<
Float
>
tempL
=
new
ArrayList
<>();
List
<
Float
>
tempH
=
new
ArrayList
<>();
List
<
Float
>
tempH
=
new
ArrayList
<>();
List
<
Float
>
humiL
=
new
ArrayList
<>();
List
<
Float
>
humiL
=
new
ArrayList
<>();
...
@@ -171,7 +173,22 @@ public class EquipmentBindingController {
...
@@ -171,7 +173,22 @@ public class EquipmentBindingController {
List
<
Float
>
accThreshold
=
new
ArrayList
<>();
List
<
Float
>
accThreshold
=
new
ArrayList
<>();
List
<
Integer
>
timeThreshold
=
new
ArrayList
<>();
List
<
Integer
>
timeThreshold
=
new
ArrayList
<>();
List
<
Integer
>
tiltThreshold
=
new
ArrayList
<>();
List
<
Integer
>
tiltThreshold
=
new
ArrayList
<>();
List
<
String
>
devList
=
new
ArrayList
<>();
ResultAlarmVo
alarmVo
=
alarmService
.
getByType
(
bindingVo
.
getAlarmType
(),
user
.
getCompanyNo
());
ResultAlarmVo
alarmVo
=
alarmService
.
getByType
(
bindingVo
.
getAlarmType
(),
user
.
getCompanyNo
());
if
(!
StringUtils
.
isEmpty
(
configVo
.
getMessage
())){
ConfigCMDVo
config
=
gson
.
fromJson
(
configVo
.
getMessage
(),
ConfigCMDVo
.
class
);
tempL
.
addAll
(
config
.
getTempL
());
tempH
.
addAll
(
config
.
getTempH
());
humiL
.
addAll
(
config
.
getHumiL
());
humiH
.
addAll
(
config
.
getHumiH
());
pressL
.
addAll
(
config
.
getPressL
());
pressH
.
addAll
(
config
.
getPressH
());
sugEnergy
.
addAll
(
config
.
getSugEnergy
());
accThreshold
.
addAll
(
config
.
getAccThreshold
());
timeThreshold
.
addAll
(
config
.
getTimeThreshold
());
tiltThreshold
.
addAll
(
config
.
getTiltThreshold
());
devList
.
addAll
(
config
.
getDevList
());
}
tempL
.
add
(
alarmVo
.
getTemMin
());
tempL
.
add
(
alarmVo
.
getTemMin
());
tempH
.
add
(
alarmVo
.
getTemMax
());
tempH
.
add
(
alarmVo
.
getTemMax
());
humiL
.
add
(
alarmVo
.
getHumidityMin
());
humiL
.
add
(
alarmVo
.
getHumidityMin
());
...
@@ -182,8 +199,9 @@ public class EquipmentBindingController {
...
@@ -182,8 +199,9 @@ public class EquipmentBindingController {
accThreshold
.
add
(
Float
.
valueOf
(
alarmVo
.
getShock
()));
accThreshold
.
add
(
Float
.
valueOf
(
alarmVo
.
getShock
()));
timeThreshold
.
add
(
5
);
timeThreshold
.
add
(
5
);
tiltThreshold
.
add
((
int
)
Double
.
parseDouble
(
alarmVo
.
getTilt
().
toString
()));
tiltThreshold
.
add
((
int
)
Double
.
parseDouble
(
alarmVo
.
getTilt
().
toString
()));
List
<
String
>
devList
=
tdlDeviceService
.
getByGatewaySN
(
bindingVo
.
getgSN
(),
bindingVo
.
getType
());
devList
.
add
(
"TDL-"
+
bindingVo
.
getTDLSN
());
devList
.
add
(
"TDL-"
+
bindingVo
.
getTDLSN
());
//开始绑定
//获取gateway下的所有tdl的编号
ConfigCMDVo
configCMDVo
=
new
ConfigCMDVo
(
"config"
,
gpsPeriod
,
gprsPeriod
,
devList
,
tempL
,
tempH
,
humiL
,
humiH
,
pressL
,
pressH
,
sugEnergy
,
accThreshold
,
timeThreshold
,
tiltThreshold
,
bindingVo
.
getMode
(),
System
.
currentTimeMillis
()/
1000
l
);
ConfigCMDVo
configCMDVo
=
new
ConfigCMDVo
(
"config"
,
gpsPeriod
,
gprsPeriod
,
devList
,
tempL
,
tempH
,
humiL
,
humiH
,
pressL
,
pressH
,
sugEnergy
,
accThreshold
,
timeThreshold
,
tiltThreshold
,
bindingVo
.
getMode
(),
System
.
currentTimeMillis
()/
1000
l
);
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"companyNo"
,
user
.
getCompanyNo
());
map
.
put
(
"companyNo"
,
user
.
getCompanyNo
());
...
@@ -252,14 +270,42 @@ public class EquipmentBindingController {
...
@@ -252,14 +270,42 @@ public class EquipmentBindingController {
TDLSN
=(
String
)
jsonObject
.
get
(
"TDLSN"
);
TDLSN
=(
String
)
jsonObject
.
get
(
"TDLSN"
);
//判断当前tdl是否有网关在使用
//判断当前tdl是否有网关在使用
ResultTDLDeviceVo
resultTDLDeviceVo
=
tdlDeviceService
.
getByTDLSN
(
TDLSN
);
ResultTDLDeviceVo
resultTDLDeviceVo
=
tdlDeviceService
.
getByTDLSN
(
TDLSN
);
List
<
String
>
devList
=
tdlDeviceService
.
getByGatewaySN
(
resultTDLDeviceVo
.
getGatewaySN
(),
resultTDLDeviceVo
.
getGatewayType
());
//
List<String> devList = tdlDeviceService.getByGatewaySN(resultTDLDeviceVo.getGatewaySN(),resultTDLDeviceVo.getGatewayType());
ConfigVo
configVo
=
configService
.
getConfig
(
resultTDLDeviceVo
.
getGatewaySN
(),
resultTDLDeviceVo
.
getGatewayType
());
ConfigVo
configVo
=
configService
.
getConfig
(
resultTDLDeviceVo
.
getGatewaySN
(),
resultTDLDeviceVo
.
getGatewayType
());
ConfigCMDVo
config
=
gson
.
fromJson
(
configVo
.
getMessage
(),
ConfigCMDVo
.
class
);
ConfigCMDVo
config
=
gson
.
fromJson
(
configVo
.
getMessage
(),
ConfigCMDVo
.
class
);
ConfigCMDVo
configCMDVo
;
ConfigCMDVo
configCMDVo
;
List
<
Float
>
tempL
=
config
.
getTempL
();
List
<
Float
>
tempH
=
config
.
getTempH
();
List
<
Float
>
humiL
=
config
.
getHumiL
();
List
<
Float
>
humiH
=
config
.
getHumiH
();
List
<
Integer
>
pressL
=
config
.
getPressL
();
List
<
Integer
>
pressH
=
config
.
getPressH
();
List
<
Integer
>
sugEnergy
=
config
.
getSugEnergy
();
List
<
Float
>
accThreshold
=
config
.
getAccThreshold
();
List
<
Integer
>
timeThreshold
=
config
.
getTimeThreshold
();
List
<
Integer
>
tiltThreshold
=
config
.
getTiltThreshold
();
List
<
String
>
devList
=
config
.
getDevList
();
ResultAlarmVo
alarmVo
=
tdlLogService
.
getAlarm
(
resultTDLDeviceVo
.
getGatewaySN
(),
resultTDLDeviceVo
.
getGatewayType
(),
TDLSN
);
Boolean
boo
=
false
;
Boolean
boo
=
false
;
if
(
devList
.
size
()>
1
){
if
(
devList
.
size
()>
1
){
devList
.
remove
(
"TDL-"
+
TDLSN
);
devList
.
remove
(
"TDL-"
+
TDLSN
);
configCMDVo
=
new
ConfigCMDVo
(
"config"
,
config
.
getGpsPeriod
(),
config
.
getGprsPeriod
(),
devList
,
config
.
getMode
(),
System
.
currentTimeMillis
()/
1000
l
);
tempL
.
remove
(
alarmVo
.
getTemMin
());
tempH
.
remove
(
alarmVo
.
getTemMax
());
humiL
.
remove
(
alarmVo
.
getHumidityMin
());
humiH
.
remove
(
alarmVo
.
getHumidityMax
());
pressL
.
remove
(
0
);
pressH
.
remove
(
0
);
sugEnergy
.
remove
(
0
);
accThreshold
.
remove
(
Float
.
valueOf
(
alarmVo
.
getShock
()));
timeThreshold
.
remove
(
0
);
for
(
int
i
=
0
;
i
<
tiltThreshold
.
size
();
i
++){
if
(
tiltThreshold
.
get
(
i
)
==
(
int
)
Double
.
parseDouble
(
alarmVo
.
getTilt
().
toString
())){
tiltThreshold
.
remove
(
i
);
break
;
}
}
configCMDVo
=
new
ConfigCMDVo
(
"config"
,
config
.
getGpsPeriod
(),
config
.
getGprsPeriod
(),
devList
,
tempL
,
tempH
,
humiL
,
humiH
,
pressL
,
pressH
,
sugEnergy
,
accThreshold
,
timeThreshold
,
tiltThreshold
,
config
.
getMode
(),
System
.
currentTimeMillis
()/
1000
l
);
// configCMDVo = new ConfigCMDVo("config",config.getGpsPeriod(),config.getGprsPeriod(),devList,config.getMode(),System.currentTimeMillis()/1000l);
}
else
{
}
else
{
configCMDVo
=
null
;
configCMDVo
=
null
;
boo
=
true
;
boo
=
true
;
...
...
src/main/java/com/example/tdl/web/RoleController.java
View file @
563d88ca
...
@@ -213,7 +213,8 @@ public class RoleController {
...
@@ -213,7 +213,8 @@ public class RoleController {
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"roleName"
));
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"roleName"
));
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
if
(
roleService
.
getByRoleName
(
updateRoleVo
.
getRoleName
(),
user
.
getCompanyNo
())!=
null
&&!
updateRoleVo
.
getOldRoleName
().
equals
(
updateRoleVo
.
getRoleName
())){
logger
.
info
(
roleService
.
getByRoleName
(
updateRoleVo
.
getRoleName
(),
user
.
getCompanyNo
())
+
"-----"
);
if
(
roleService
.
getByRoleName
(
updateRoleVo
.
getRoleName
(),
user
.
getCompanyNo
())!=
0
&&!
updateRoleVo
.
getOldRoleName
().
equals
(
updateRoleVo
.
getRoleName
())){
fb
.
setCode
(
0
);
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"repeatedRole"
));
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"repeatedRole"
));
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
...
...
src/main/java/com/example/tdl/web/UserController.java
View file @
563d88ca
...
@@ -380,6 +380,7 @@ public class UserController {
...
@@ -380,6 +380,7 @@ public class UserController {
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
//修改密码
//修改密码
@ApiOperation
(
value
=
"修改密码"
,
notes
=
"修改密码"
)
@ApiOperation
(
value
=
"修改密码"
,
notes
=
"修改密码"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -423,7 +424,9 @@ public class UserController {
...
@@ -423,7 +424,9 @@ public class UserController {
@ApiOperation
(
value
=
"获取当前用户的信息"
,
notes
=
"获取用户的信息"
+
@ApiOperation
(
value
=
"获取当前用户的信息"
,
notes
=
"获取用户的信息"
+
"userName:用户名"
+
"userName:用户名"
+
"time:时间"
+
"time:时间"
+
"ipAddres:ip"
)
"ipAddres:ip"
+
"companyAlias:公司简称"
+
"themeColors:主题颜色"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"AccountLanguage"
,
value
=
"language"
,
required
=
false
,
dataType
=
"String"
),
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"AccountLanguage"
,
value
=
"language"
,
required
=
false
,
dataType
=
"String"
),
...
@@ -437,7 +440,11 @@ public class UserController {
...
@@ -437,7 +440,11 @@ public class UserController {
ResultCompanyVo
resultCompanyVo
=
companyService
.
getByCompanyNo
(
userRedisVo
.
getCompanyNo
());
ResultCompanyVo
resultCompanyVo
=
companyService
.
getByCompanyNo
(
userRedisVo
.
getCompanyNo
());
String
img
=
resultCompanyVo
.
getImg
();
String
img
=
resultCompanyVo
.
getImg
();
String
companyAlias
=
resultCompanyVo
.
getAlias
();
String
companyAlias
=
resultCompanyVo
.
getAlias
();
return
new
UserNameVo
(
userRedisVo
.
getUserName
(),
System
.
currentTimeMillis
()
+
""
,
ip
,
img
,
companyAlias
);
// if(resultCompanyVo.getCompanyNo().equals("TM201808097604")){
// return new UserNameVo(userRedisVo.getUserName(),System.currentTimeMillis() +"",ip,companyAlias,img,resultCompanyVo.getThemeColors(),resultCompanyVo.getCompanyNo(),resultCompanyVo.getFontColors());
// }else{
return
new
UserNameVo
(
userRedisVo
.
getUserName
(),
System
.
currentTimeMillis
()
+
""
,
ip
,
img
,
companyAlias
,
resultCompanyVo
.
getThemeColors
(),
resultCompanyVo
.
getCompanyNo
(),
resultCompanyVo
.
getFontColors
());
// }
}
}
...
...
src/main/resources/application-docker.properties
View file @
563d88ca
spring.datasource.url
=
jdbc:mysql://housetest-mysql:3306/tdlCloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
#spring.datasource.url=jdbc:mysql://housetest-mysql:3306/tdlCloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
#spring.datasource.username=root
#spring.datasource.password=37774020
#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#
#
#tdl.redis.host=housetest-redis
#
#server.port=8092
#
## InfluxDB
#spring.influxdb.url=http://housetest-influxdb:8086
spring.datasource.url
=
jdbc:mysql://witcloud-mysql:3306/tdlCloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.username
=
root
spring.datasource.username
=
root
spring.datasource.password
=
37774020
spring.datasource.password
=
37774020
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
tdl.redis.host
=
witcloud-redis
tdl.redis.host
=
housetest-redis
server.port
=
8092
# InfluxDB
# InfluxDB
spring.influxdb.url
=
http://
housetest
-influxdb:8086
spring.influxdb.url
=
http://
witcloud
-influxdb:8086
tdl.mqtt.url
=
ssl://47.96.128.181
tdl.mqtt.port
=
8883
tdl.mqtt.username
=
logistics
tdl.mqtt.password
=
logistics37774020
#spring.datasource.url=jdbc:mysql://witcloud-mysql:3306/tdlCloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
tdl.core.add
=
http://logisticscore-java:8079/witium/addMount
#spring.datasource.username=root
tdl.core.delete
=
http://logisticscore-java:8079/witium/delMount
#spring.datasource.password=37774020
#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
mqtt.userName
=
wtlogistics
#
mqtt.password
=
wtlogistics
#tdl.redis.host=witcloud-redis
\ No newline at end of file
#
## InfluxDB
#spring.influxdb.url=http://witcloud-influxdb:8086
#
#tdl.mqtt.url = ssl://47.96.128.181
#tdl.mqtt.port = 8883
#tdl.mqtt.username = logistics
#tdl.mqtt.password = logistics37774020
#
#tdl.core.add =http://logisticscore-java:8079/witium/addMount
#tdl.core.delete =http://logisticscore-java:8079/witium/delMount
#
#mqtt.userName = wtlogistics
#
mqtt.password
=
wtlogistics
\ No newline at end of file
src/main/resources/application.properties
View file @
563d88ca
spring.datasource.url
=
jdbc:mysql://
47.97.184.225
:3306/tdlcloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.url
=
jdbc:mysql://
192.168.1.16
:3306/tdlcloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.username
=
root
spring.datasource.username
=
root
spring.datasource.password
=
37774020
spring.datasource.password
=
37774020
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
...
@@ -52,7 +52,7 @@ tdl.mqtt.clientcrt = witcd.crt
...
@@ -52,7 +52,7 @@ tdl.mqtt.clientcrt = witcd.crt
# InfluxDB
# InfluxDB
spring.influxdb.username
=
admin
spring.influxdb.username
=
admin
spring.influxdb.password
=
37774020
spring.influxdb.password
=
37774020
spring.influxdb.url
=
http://
47.97.184.225
:8086
spring.influxdb.url
=
http://
192.168.1.16
:8086
spring.influxdb.database
=
original
spring.influxdb.database
=
original
spring.influxdb.retentionPolicy
=
tdl_policy
spring.influxdb.retentionPolicy
=
tdl_policy
spring.influxdb.connent-timeout
=
10
spring.influxdb.connent-timeout
=
10
...
...
src/main/resources/i18n/messages_en.properties
View file @
563d88ca
...
@@ -258,7 +258,7 @@ warehouseProperty2=Walk-in cooler
...
@@ -258,7 +258,7 @@ warehouseProperty2=Walk-in cooler
warehouseProperty3
=
Central Warehouse
warehouseProperty3
=
Central Warehouse
warehouseType1
=
Flat Warehouse
warehouseType1
=
Flat Warehouse
warehouseType2
=
Multi-layered Warehouse
warehouseType2
=
Multi-layered Warehouse
warehouseHardwareLevel1
=
Excelent
warehouseHardwareLevel1
=
Excel
l
ent
warehouseHardwareLevel2
=
Good
warehouseHardwareLevel2
=
Good
warehouseHardwareLevel3
=
Fair
warehouseHardwareLevel3
=
Fair
warehouseHardwareLevel4
=
Poor
warehouseHardwareLevel4
=
Poor
...
@@ -287,4 +287,9 @@ GatewayManagement=Gateway Management
...
@@ -287,4 +287,9 @@ GatewayManagement=Gateway Management
SensorManagement
=
Sensor Management
SensorManagement
=
Sensor Management
AccountManagement
=
Account Management
AccountManagement
=
Account Management
VehicleManagement
=
Vehicle Management
VehicleManagement
=
Vehicle Management
themeColors
=
Theme color cannot be empty
fontColors
=
Font color cannot be empty
postCode
=
Zip code cannot be empty
wrongFontColors
=
The format of the font color cannot be empty
wrongThemeColors
=
The format of the theme color is incorrect
src/main/resources/i18n/messages_ja.properties
View file @
563d88ca
...
@@ -179,3 +179,14 @@ isState=\u30B2\u30FC\u30C8\u30A6\u30A7\u30A4\u306F\u307B\u304B\u306E\u30EB\u30FC
...
@@ -179,3 +179,14 @@ isState=\u30B2\u30FC\u30C8\u30A6\u30A7\u30A4\u306F\u307B\u304B\u306E\u30EB\u30FC
beingUsed
=
\u
30B2
\u
30FC
\u
30C8
\u
30A6
\u
30A7
\u
30A4
\u
304C
\u
4F7F
\u7528\u3055\u
308C
\u3066\u3044\u
307E
\u3059
beingUsed
=
\u
30B2
\u
30FC
\u
30C8
\u
30A6
\u
30A7
\u
30A4
\u
304C
\u
4F7F
\u7528\u3055\u
308C
\u3066\u3044\u
307E
\u3059
updateGatewayCompanySuccess
=
\u
4F1A
\u
793E
\u
306E
\u6210\u
529F
\u3092\u
914D
\u
308B
\u
30B2
\u
30FC
\u
30C8
\u
30A6
\u
30A7
\u
30A4
updateGatewayCompanySuccess
=
\u
4F1A
\u
793E
\u
306E
\u6210\u
529F
\u3092\u
914D
\u
308B
\u
30B2
\u
30FC
\u
30C8
\u
30A6
\u
30A7
\u
30A4
updateGatewayCompanyFailure
=
\u
30B2
\u
30FC
\u
30C8
\u
30A6
\u
30A7
\u
30A4
\u3092\u
4F1A
\u
793E
\u
306B
\u5272\u
308A
\u
5F53
\u3066\u
308B
\u3053\u3068\u
304C
\u3067\u
304D
\u
307E
\u
305B
\u3093\u3067\u3057\u
305F
updateGatewayCompanyFailure
=
\u
30B2
\u
30FC
\u
30C8
\u
30A6
\u
30A7
\u
30A4
\u3092\u
4F1A
\u
793E
\u
306B
\u5272\u
308A
\u
5F53
\u3066\u
308B
\u3053\u3068\u
304C
\u3067\u
304D
\u
307E
\u
305B
\u3093\u3067\u3057\u
305F
fontColors
=
\u
30D5
\u
30A9
\u
30F3
\u
30C8
\u
306E
\u8272\u3092\u
7A7A
\u
306B
\u3059\u
308B
\u3053\u3068\u
306F
\u3067\u
304D
\u
307E
\u
305B
\u3093
themeColors
=
\u
30C6
\u
30FC
\u
30DE
\u
306E
\u8272\u
306F
\u
7A7A
\u3067\u
306F
\u3042\u
308A
\u
307E
\u
305B
\u3093
postCode
=
\u
90F5
\u
4FBF
\u
756A
\u
53F7
\u
306F
\u
7A7A
\u
306B
\u3067\u
304D
\u
307E
\u
305B
\u3093
wrongFontColors
=
\u
30D5
\u
30A9
\u
30F3
\u
30C8
\u
306E
\u8272\u
306E
\u
66F8
\u
5F0F
\u
306F
\u
7A7A
\u
767D
\u
306B
\u3059\u
308B
\u3053\u3068\u
306F
\u3067\u
304D
\u
307E
\u
305B
\u3093
wrongThemeColors
=
\u
30C6
\u
30FC
\u
30DE
\u
306E
\u8272\u
306E
\u
66F8
\u
5F0F
\u
304C
\u
6B63
\u3057\u
304F
\u3042\u
308A
\u
307E
\u
305B
\u3093
day
=
\u
65E5
hour
=
\u6642\u9593
min
=
\u5206
sec
=
\u
4E8C
\u
756A
\u
76EE
repeateAlias
=
\u
4F1A
\u
793E
\u
306E
\u7565\u
8A9E
\u
306F
\u
7E70
\u
308A
\u
8FD4
\u
305B
\u
307E
\u
305B
\u3093
alias
=
\u
4F1A
\u
793E
\u
306E
\u7565\u
8A9E
\u
306F
\u
7A7A
\u3067\u
306F
\u3042\u
308A
\u
307E
\u
305B
\u3093
src/main/resources/i18n/messages_zh_CN.properties
View file @
563d88ca
...
@@ -110,6 +110,10 @@ modifyCompanySuccess = \u4FEE\u6539\u516C\u53F8\u6210\u529F
...
@@ -110,6 +110,10 @@ modifyCompanySuccess = \u4FEE\u6539\u516C\u53F8\u6210\u529F
modifyCompanyFailure
=
\u
4FEE
\u6539\u
516C
\u
53F8
\u5931\u
8D25
modifyCompanyFailure
=
\u
4FEE
\u6539\u
516C
\u
53F8
\u5931\u
8D25
deleteCompanySuccess
=
\u5220\u9664\u
516C
\u
53F8
\u6210\u
529F
deleteCompanySuccess
=
\u5220\u9664\u
516C
\u
53F8
\u6210\u
529F
deleteCompanyFailure
=
\u5220\u9664\u
516C
\u
53F8
\u5931\u
8D25
deleteCompanyFailure
=
\u5220\u9664\u
516C
\u
53F8
\u5931\u
8D25
themeColors
=
\u
4E3B
\u9898\u8272\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
wrongThemeColors
=
\u
4E3B
\u9898\u8272\u7684\u
683C
\u
5F0F
\u
4E0D
\u
6B63
\u
786E
fontColors
=
\u
5B57
\u
4F53
\u
989C
\u8272\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
wrongFontColors
=
\u
5B57
\u
4F53
\u
989C
\u8272\u7684\u
683C
\u
5F0F
\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
#\u7528\u6237\u767B\u5F55
#\u7528\u6237\u767B\u5F55
userName
=
\u7528\u6237\u
540D
\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
userName
=
\u7528\u6237\u
540D
\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
password
=
\u
5BC6
\u7801\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
password
=
\u
5BC6
\u7801\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
...
...
src/main/resources/mapper/CompanyMapper.xml
View file @
563d88ca
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"com.example.tdl.mapper.CompanyMapper"
>
<mapper
namespace=
"com.example.tdl.mapper.CompanyMapper"
>
<!--查询所有公司信息-->
<!--查询所有公司信息-->
<select
id=
"getAll"
resultType=
"com.example.tdl.domain.vo.ResultCompanyVo"
>
<select
id=
"getAll"
resultType=
"com.example.tdl.domain.vo.ResultCompanyVo"
>
SELECT companyNo,companyName,country,city,addressDetail,tel,manager,img,alias
SELECT companyNo,companyName,country,city,addressDetail,tel,manager,img,alias
,themeColors,fontColors
from company
from company
WHERE state=1
WHERE state=1
<if
test=
"companyNo!='TM201803298320'"
>
<if
test=
"companyNo!='TM201803298320'"
>
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
#{addressDetail,mode=IN,jdbcType=VARCHAR},
#{addressDetail,mode=IN,jdbcType=VARCHAR},
#{tel,mode=IN,jdbcType=VARCHAR},
#{tel,mode=IN,jdbcType=VARCHAR},
#{manager,mode=IN,jdbcType=VARCHAR},
#{manager,mode=IN,jdbcType=VARCHAR},
#{themeColors,mode=IN,jdbcType=VARCHAR},
#{fontColors,mode=IN,jdbcType=VARCHAR},
#{img,mode=IN,jdbcType=VARCHAR},
#{img,mode=IN,jdbcType=VARCHAR},
#{parentCompanyNo,mode=IN,jdbcType=VARCHAR},
#{parentCompanyNo,mode=IN,jdbcType=VARCHAR},
#{roleName,mode=IN,jdbcType=VARCHAR},
#{roleName,mode=IN,jdbcType=VARCHAR},
...
@@ -42,7 +44,9 @@
...
@@ -42,7 +44,9 @@
city=#{city,jdbcType=VARCHAR},
city=#{city,jdbcType=VARCHAR},
addressDetail=#{addressDetail,jdbcType=VARCHAR},
addressDetail=#{addressDetail,jdbcType=VARCHAR},
tel=#{tel,jdbcType=VARCHAR},
tel=#{tel,jdbcType=VARCHAR},
manager=#{manager,jdbcType=VARCHAR}
manager=#{manager,jdbcType=VARCHAR},
themeColors=#{themeColors,jdbcType=VARCHAR},
fontColors=#{fontColors,jdbcType=VARCHAR}
WHERE companyNo=#{companyNo,jdbcType=VARCHAR}
WHERE companyNo=#{companyNo,jdbcType=VARCHAR}
</update>
</update>
...
@@ -58,17 +62,17 @@
...
@@ -58,17 +62,17 @@
</delete>
</delete>
<select
id=
"getByCompanyName"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.ResultCompanyVo"
>
<select
id=
"getByCompanyName"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.ResultCompanyVo"
>
SELECT companyNo,companyName,alias,country,city,addressDetail,tel,manager,img
SELECT companyNo,companyName,alias,country,city,addressDetail,tel,manager,img
,themeColors,fontColors
from company WHERE state=1 AND companyName=#{companyName,jdbcType=VARCHAR}
from company WHERE state=1 AND companyName=#{companyName,jdbcType=VARCHAR}
</select>
</select>
<select
id=
"getByCompanyNo"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.ResultCompanyVo"
>
<select
id=
"getByCompanyNo"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.ResultCompanyVo"
>
SELECT companyNo,companyName,alias,country,city,addressDetail,tel,manager,img
SELECT companyNo,companyName,alias,country,city,addressDetail,tel,manager,img
,themeColors,fontColors
from company WHERE state=1 AND companyNo=#{companyNo,jdbcType=VARCHAR}
from company WHERE state=1 AND companyNo=#{companyNo,jdbcType=VARCHAR}
</select>
</select>
<select
id=
"getByAlias"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.ResultCompanyVo"
>
<select
id=
"getByAlias"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.ResultCompanyVo"
>
SELECT companyNo,companyName,alias,country,city,addressDetail,tel,manager,img
SELECT companyNo,companyName,alias,country,city,addressDetail,tel,manager,img
,themeColors,fontColors
from company WHERE state=1 AND alias=#{alias,jdbcType=VARCHAR}
from company WHERE state=1 AND alias=#{alias,jdbcType=VARCHAR}
</select>
</select>
...
...
src/main/resources/mapper/GatewayMapper.xml
View file @
563d88ca
...
@@ -119,10 +119,11 @@
...
@@ -119,10 +119,11 @@
<!--根据仓库编号查询网关信息-->
<!--根据仓库编号查询网关信息-->
<select
id=
"getByWarehouseNo"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.GatewayOnLineVo"
>
<select
id=
"getByWarehouseNo"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.GatewayOnLineVo"
>
SELECT DISTINCT gatewaySN gSN, gatewayType type,
min(createTime)
startTime
SELECT DISTINCT gatewaySN gSN, gatewayType type,
createTime
startTime
from tdl_gateway_log
from tdl_gateway_log
where warehouseNo=#{warehouseNo,jdbcType=VARCHAR}
where warehouseNo=#{warehouseNo,jdbcType=VARCHAR}
and ISNULL(endTime)
and ISNULL(endTime)
GROUP BY gSN
</select>
</select>
<select
id=
"getGatewayType"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.TypeVo"
>
<select
id=
"getGatewayType"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.TypeVo"
>
...
...
src/main/resources/mapper/TDLLogMapper.xml
View file @
563d88ca
...
@@ -42,6 +42,16 @@
...
@@ -42,6 +42,16 @@
and TDLSN = #{TDLSN,jdbcType=VARCHAR}
and TDLSN = #{TDLSN,jdbcType=VARCHAR}
</select>
</select>
<select
id=
"getAlarm"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.ResultAlarmVo"
>
select alarmType,temMax,temMin,humidityMax,humidityMin,tilt,shock,remark
from alarm a,tdl_gateway_log t
where a.id = t.alarm_id
and gatewaySN = #{gatewaySN,jdbcType=VARCHAR}
and gatewayType = #{gatewayType,jdbcType=VARCHAR}
and TDLSN = #{TDLSN,jdbcType=VARCHAR}
and endTime is null
</select>
<select
id=
"getWarehouseByTdl"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.ResultAlarmVo"
>
<select
id=
"getWarehouseByTdl"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.ResultAlarmVo"
>
select alarmType,temMax,temMin,humidityMax,humidityMin,tilt,shock,remark
select alarmType,temMax,temMin,humidityMax,humidityMin,tilt,shock,remark
from alarm a,tdl_gateway_log t
from alarm a,tdl_gateway_log t
...
...
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