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
085162c5
Commit
085162c5
authored
Aug 06, 2019
by
zhuangzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改仓库firefox下载失败问题;
2.修改mqtt判断是否重发的逻辑 3.运输历史数据下载加上网关的序列号
parent
99417b9c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
151 additions
and
347 deletions
+151
-347
WarehouseExcel.java
src/main/java/com/example/tdl/common/WarehouseExcel.java
+8
-2
WarehouseTimeAndDataVo.java
...ava/com/example/tdl/domain/vo/WarehouseTimeAndDataVo.java
+8
-0
WarehouseVo.java
src/main/java/com/example/tdl/domain/vo/WarehouseVo.java
+24
-0
MqttListener.java
src/main/java/com/example/tdl/mqtt/MqttListener.java
+0
-300
AliyunOSSClientUtil.java
src/main/java/com/example/tdl/util/AliyunOSSClientUtil.java
+1
-1
DataController.java
src/main/java/com/example/tdl/web/DataController.java
+7
-3
DownloadController.java
src/main/java/com/example/tdl/web/DownloadController.java
+5
-1
WarehouseController.java
src/main/java/com/example/tdl/web/WarehouseController.java
+81
-32
application.properties
src/main/resources/application.properties
+5
-5
messages_en.properties
src/main/resources/i18n/messages_en.properties
+5
-3
messages_ja.properties
src/main/resources/i18n/messages_ja.properties
+5
-0
messages_zh_CN.properties
src/main/resources/i18n/messages_zh_CN.properties
+2
-0
No files found.
src/main/java/com/example/tdl/common/WarehouseExcel.java
View file @
085162c5
...
...
@@ -67,7 +67,13 @@ public class WarehouseExcel {
//设置列的格式
cell1
.
setCellStyle
(
rowStyle1
);
//将标题添加到列中
cell1
.
setCellValue
(
new
HSSFRichTextString
(
resultWarehouseNoAndTDLSNAndTimeVo
.
getWarehouseNo
()+
"仓库温湿度观测记录表-"
+
resultWarehouseNoAndTDLSNAndTimeVo
.
getTDLSN
()));
if
(
request
.
getHeader
(
"AccountLanguage"
).
equals
(
"en"
)){
cell1
.
setCellValue
(
new
HSSFRichTextString
(
resultWarehouseNoAndTDLSNAndTimeVo
.
getWarehouseNo
()+
"Warehouse temperature and humidity historic data -"
+
resultWarehouseNoAndTDLSNAndTimeVo
.
getTDLSN
()));
}
else
if
(
request
.
getHeader
(
"AccountLanguage "
).
equals
(
"jp"
)){
cell1
.
setCellValue
(
new
HSSFRichTextString
(
resultWarehouseNoAndTDLSNAndTimeVo
.
getWarehouseNo
()+
"倉庫の温度および湿度の観測記録-"
+
resultWarehouseNoAndTDLSNAndTimeVo
.
getTDLSN
()));
}
else
{
cell1
.
setCellValue
(
new
HSSFRichTextString
(
resultWarehouseNoAndTDLSNAndTimeVo
.
getWarehouseNo
()+
"仓库温湿度观测记录表-"
+
resultWarehouseNoAndTDLSNAndTimeVo
.
getTDLSN
()));
}
}
//设置行高
row1
.
setHeight
((
short
)
(
30
*
20
));
...
...
@@ -87,7 +93,7 @@ public class WarehouseExcel {
//设置列的格式
cell2
.
setCellStyle
(
rowStyle2
);
//将标题添加到列中
cell2
.
setCellValue
(
i18n
.
getMessage
(
request
,
"year"
)+
":201
8"
);
cell2
.
setCellValue
(
i18n
.
getMessage
(
request
,
"year"
)+
":201
9"
);
}
sheet
.
addMergedRegion
(
new
CellRangeAddress
(
1
,
1
,
0
,
2
));
for
(
int
n
=
3
;
n
<
6
;
n
++)
{
...
...
src/main/java/com/example/tdl/domain/vo/WarehouseTimeAndDataVo.java
View file @
085162c5
...
...
@@ -6,6 +6,14 @@ public class WarehouseTimeAndDataVo {
private
String
value
;
public
WarehouseTimeAndDataVo
()
{
}
public
WarehouseTimeAndDataVo
(
String
time
,
String
value
)
{
this
.
time
=
time
;
this
.
value
=
value
;
}
public
String
getTime
()
{
return
time
;
}
...
...
src/main/java/com/example/tdl/domain/vo/WarehouseVo.java
0 → 100644
View file @
085162c5
package
com
.
example
.
tdl
.
domain
.
vo
;
public
class
WarehouseVo
{
private
String
offset
;
private
String
warehouseNo
;
public
String
getOffset
()
{
return
offset
;
}
public
void
setOffset
(
String
offset
)
{
this
.
offset
=
offset
;
}
public
String
getWarehouseNo
()
{
return
warehouseNo
;
}
public
void
setWarehouseNo
(
String
warehouseNo
)
{
this
.
warehouseNo
=
warehouseNo
;
}
}
src/main/java/com/example/tdl/mqtt/MqttListener.java
View file @
085162c5
This diff is collapsed.
Click to expand it.
src/main/java/com/example/tdl/util/AliyunOSSClientUtil.java
View file @
085162c5
...
...
@@ -390,7 +390,7 @@ public class AliyunOSSClientUtil {
putResult
=
ossClient
.
putObject
(
BACKET_NAME
,
FOLDER3
+
fileName
,
is
,
metadata
);
}
else
if
(
fileName
.
contains
(
"CHN"
)){
putResult
=
ossClient
.
putObject
(
BACKET_NAME
,
FOLDER6
+
fileName
,
is
,
metadata
);
}
else
if
(
fileName
.
contains
(
"仓库温湿度观测记录"
)
||
fileName
.
contains
(
"Warehouse
temperature and humidity historic d
ata"
)||
fileName
.
contains
(
"倉庫の温度および湿度の観測記録"
)){
}
else
if
(
fileName
.
contains
(
"仓库温湿度观测记录"
)
||
fileName
.
contains
(
"Warehouse
D
ata"
)||
fileName
.
contains
(
"倉庫の温度および湿度の観測記録"
)){
putResult
=
ossClient
.
putObject
(
BACKET_NAME
,
FOLDER5
+
fileName
,
is
,
metadata
);
}
else
if
(
fileName
.
contains
(
"报警日志数据"
)){
putResult
=
ossClient
.
putObject
(
BACKET_NAME
,
FOLDER7
+
fileName
,
is
,
metadata
);
...
...
src/main/java/com/example/tdl/web/DataController.java
View file @
085162c5
...
...
@@ -568,7 +568,7 @@ public class DataController {
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"AccountLanguage"
,
value
=
"language"
,
required
=
true
,
dataType
=
"String"
),
})
public
String
downLoadfForABB
(
@RequestBody
TransportationNoVo
transportationNo
,
HttpServletRequest
request
){
public
String
downLoadfForABB
(
@RequestBody
TransportationNoVo
transportationNo
,
HttpServletRequest
request
){
UserRedisVo
user
=
gson
.
fromJson
(
tokenRedisService
.
get
(
"TOKEN_"
+
request
.
getHeader
(
"Account_token"
)),
UserRedisVo
.
class
);
ResultCircuitVo
resultCircuitVo
=
circuitService
.
getByTransportationNo
(
transportationNo
.
getTransportationNo
(),
user
.
getCompanyNo
());
if
(
resultCircuitVo
==
null
)
{
...
...
@@ -649,7 +649,11 @@ public class DataController {
}
QueryResult
queryResult
=
influxDBTemplate
.
query
(
new
Query
(
sqls
,
database
));
File
[]
srcFiles
=
new
File
[
devList
.
size
()];
File
zipFile
=
new
File
(
"./export/"
+
transportationNo
.
getTransportationNo
()+
i18n
.
getMessage
(
request
,
"data"
)+
".zip"
);
File
myPath
=
new
File
(
"./export/"
);
if
(
!
myPath
.
exists
()){
//若此目录不存在,则创建之
myPath
.
mkdir
();
}
File
zipFile
=
new
File
(
"./export/"
+
transportationNo
.
getTransportationNo
()+
"_"
+
gatewayVo
.
getgSN
()+
i18n
.
getMessage
(
request
,
"data"
)+
".zip"
);
if
(
queryResult
.
getResults
().
get
(
0
).
getSeries
().
get
(
0
)
!=
null
)
{
for
(
int
i
=
0
;
i
<
devList
.
size
();
i
++){
String
address
=
"./export/"
;
...
...
@@ -692,7 +696,7 @@ public class DataController {
}
zipFile
.
delete
();
fb
.
setCode
(
1
);
fb
.
setMessage
(
"https://tdlcloud.oss-cn-shanghai.aliyuncs.com/circuit/"
+
transportationNo
.
getTransportationNo
()+
i18n
.
getMessage
(
request
,
"data"
)+
".zip"
);
fb
.
setMessage
(
"https://tdlcloud.oss-cn-shanghai.aliyuncs.com/circuit/"
+
transportationNo
.
getTransportationNo
()
+
"_"
+
gatewayVo
.
getgSN
()
+
i18n
.
getMessage
(
request
,
"data"
)+
".zip"
);
return
gson
.
toJson
(
fb
);
}
else
{
fb
.
setCode
(
0
);
...
...
src/main/java/com/example/tdl/web/DownloadController.java
View file @
085162c5
...
...
@@ -122,6 +122,10 @@ public class DownloadController {
continue
;
}
String
fileName
=
downloadForWarehouseVo
.
getWarehouseNo
()
+
i18n
.
getMessage
(
request
,
"warehousedata"
)+
"-"
+
resultWarehouseNoAndTDLSNAndTimeVo
.
getTDLSN
();
File
myPath
=
new
File
(
"./export/"
);
if
(
!
myPath
.
exists
()){
//若此目录不存在,则创建之
myPath
.
mkdir
();
}
srcFiles
[
a
]
=
new
File
(
"./export/"
+
fileName
+
".xls"
)
;
List
<
DownloadWarehouseVo
>
downloadWarehouseVos
=
getWarehouseData
(
queryResults
,
downloadForWarehouseVo
.
getOffset
());
for
(
int
i
=
0
;
i
<
downloadWarehouseVos
.
size
();
i
++)
{
...
...
@@ -150,7 +154,7 @@ public class DownloadController {
e
.
printStackTrace
();
logger
.
info
(
e
.
toString
());
fb
.
setCode
(
0
);
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"
fileUpload
"
));
fb
.
setMessage
(
i18n
.
getMessage
(
request
,
"
downloadfail
"
));
return
gson
.
toJson
(
fb
);
}
}
...
...
src/main/java/com/example/tdl/web/WarehouseController.java
View file @
085162c5
This diff is collapsed.
Click to expand it.
src/main/resources/application.properties
View file @
085162c5
#spring.datasource.url=jdbc:mysql://47.97.184.225:3306/tdlcloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
#
spring.datasource.url=jdbc:mysql://47.110.153.44:3306/tdlcloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.url
=
jdbc:mysql://172.16.1.13:3306/tdlcloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.url
=
jdbc:mysql://47.110.153.44:3306/tdlcloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
#
spring.datasource.url=jdbc:mysql://172.16.1.13: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
...
...
@@ -41,7 +41,7 @@ logging.config=classpath:logback.xml
# Mqtt
tdl.mqtt.url
=
ssl://172.16.1.
11
tdl.mqtt.url
=
ssl://172.16.1.
24
tdl.mqtt.port
=
8883
tdl.mqtt.username
=
ugen
tdl.mqtt.password
=
ugen
...
...
@@ -58,8 +58,8 @@ tdl.mqtt.clientpwd =
spring.influxdb.username
=
admin
spring.influxdb.password
=
37774020
#spring.influxdb.url=http://47.97.184.225:8086
#
spring.influxdb.url=http://47.110.153.44:8086
spring.influxdb.url
=
http://172.16.1.24:8086
spring.influxdb.url
=
http://47.110.153.44:8086
#
spring.influxdb.url=http://172.16.1.24:8086
spring.influxdb.database
=
original
spring.influxdb.retentionPolicy
=
tdl_policy
spring.influxdb.connent-timeout
=
10
...
...
src/main/resources/i18n/messages_en.properties
View file @
085162c5
...
...
@@ -276,8 +276,8 @@ wrongThemeColors=The format of the theme color is incorrect
comPictureDimension
=
Width*Height150*200
warePictureDimension
=
Width*Height150*120
truckPictureDimension
=
Width*Height90*60
data
=
Transport
d
ata
warehousedata
=
Warehouse
temperature and humidity historic d
ata
data
=
Transport
D
ata
warehousedata
=
Warehouse
D
ata
temMaxLimit
=
The upper temperature limit is 85
\u2103
temMinLimit
=
The lower temperature limit is -25
\u2103
humidityMaxLimit
=
The upper humidity limit is 100%
...
...
@@ -379,4 +379,6 @@ SensorAssignment=Sensor Assignment
AlarmAnalysis
=
Alarm Analysis
AlarmAnalysisDetail
=
Alarm Analysis Detail
AlarmAnalysisQuery
=
Alarm Analysis Query
usedgateway
=
The gateway has been used.
\ No newline at end of file
usedgateway
=
The gateway has been used.
fileUpload
=
File upload failed
downloadfail
=
File download failed
\ No newline at end of file
src/main/resources/i18n/messages_ja.properties
View file @
085162c5
...
...
@@ -199,6 +199,9 @@ humidityMaxLimit=\u6E7F\u5EA6\u306E\u4E0A\u9650\u306F100\uFF05\u3092\u8D85\u3048
temMinLimit
=
\u
4E0B
\u9650\u
6E29
\u
5EA6
\u
306F-25
\u2103\u
4EE5
\u
4E0B
\u
306B
\u3067\u
304D
\u
307E
\u
305B
\u3093
temMaxLimit
=
\u
4E0A
\u9650\u
6E29
\u
5EA6
\u
306F85
\u2103\u3092\u
8D85
\u3048\u
308B
\u3053\u3068\u
306F
\u3067\u
304D
\u
307E
\u
305B
\u3093
fileUpload
=
\u
30D5
\u
30A1
\u
30A4
\u
30EB
\u
306E
\u
30A2
\u
30C3
\u
30D7
\u
30ED
\u
30FC
\u
30C9
\u
304C
\u5931\u6557\u3059\u
308B
downloadfail
=
\u
30D5
\u
30A1
\u
30A4
\u
30EB
\u
306E
\u
30C0
\u
30A6
\u
30F3
\u
30ED
\u
30FC
\u
30C9
\u5931\u6557
DataOverview
=
Data Overview
TransportationState
=
Transportation State
WarehouseStatus
=
Warehouse Status
...
...
@@ -220,3 +223,5 @@ RegionManagement=Region Management
VehicleManagement
=
Vehicle Management
GatewayManagement
=
Gateway Management
SensorManagement
=
Sensor Management
src/main/resources/i18n/messages_zh_CN.properties
View file @
085162c5
...
...
@@ -412,4 +412,6 @@ AlarmAnalysis=\u62A5\u8B66\u5206\u6790
AlarmAnalysisQuery
=
\u
62A5
\u
8B66
\u5206\u6790\u
67E5
\u
8BE2
AlarmAnalysisDetail
=
\u
62A5
\u
8B66
\u5206\u6790\u
8BE6
\u
60C5
downloadfail
=
\u6587\u
4EF6
\u
4E0B
\u
8F7D
\u5931\u
8D25
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