Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
b2236f4f
Commit
b2236f4f
authored
Aug 08, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
c508638c
c9497306
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
54 deletions
+26
-54
TdInfoQueryController.java
...ot/module/jxiop/biz/controller/TdInfoQueryController.java
+26
-54
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TdInfoQueryController.java
View file @
b2236f4f
...
...
@@ -305,42 +305,26 @@ public class TdInfoQueryController extends BaseController {
}
dto
.
setOrgCode
(
orgCode
);
Date
currentDate
=
new
Date
();
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
String
startDate
=
dto
.
getStartDate
();
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
startDate
=
startDate
+
" 00:00:00"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
startDate
=
startDate
+
":00:00"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
startDate
=
startDate
+
":00"
;
if
(
startDate
.
length
()
==
10
)
{
Date
date
=
DateUtils
.
dateParse
(
startDate
+
" 00:00:00"
,
DATE_TIME_PATTERN
);
dto
.
setStartDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
));
}
else
{
Date
date
=
DateUtils
.
dateParse
(
startDate
,
DATE_TIME_PATTERN
);
dto
.
setStartDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
));
}
Date
date
=
DateUtils
.
dateParse
(
startDate
,
DATE_TIME_PATTERN
);
String
startDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setStartDate
(
startDateString
);
}
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getEndDate
()))
{
String
endDate
=
dto
.
getEndDate
();
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
endDate
=
endDate
+
" 00:00:00"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
endDate
=
endDate
+
":00:00"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
endDate
=
endDate
+
":00"
;
if
(
endDate
.
length
()
==
10
)
{
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
+
" 23:59:59"
,
DATE_TIME_PATTERN
);
dto
.
setEndDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
));
}
else
{
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
dto
.
setEndDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
));
}
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
String
endDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setEndDate
(
endDateString
);
}
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getSortsString
()))
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
...
...
@@ -389,41 +373,29 @@ public class TdInfoQueryController extends BaseController {
}
dto
.
setOrgCode
(
orgCode
);
Date
currentDate
=
new
Date
();
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
String
startDate
=
dto
.
getStartDate
();
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
startDate
=
startDate
+
" 00:00:00.000"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
startDate
=
startDate
+
":00:00.000"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
startDate
=
startDate
+
":00.000"
;
if
(
startDate
.
length
()
==
10
)
{
Date
date
=
DateUtils
.
dateParse
(
startDate
+
" 00:00:00"
,
DATE_TIME_PATTERN
);
dto
.
setStartDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
));
}
else
{
Date
date
=
DateUtils
.
dateParse
(
startDate
,
DATE_TIME_PATTERN
);
dto
.
setStartDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
));
}
Date
date
=
DateUtils
.
dateParse
(
startDate
,
"yyyy-MM-dd HH:mm:ss.SSS"
);
String
startDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
"yyyy-MM-dd HH:mm:ss.SSS"
);
dto
.
setStartDate
(
startDateString
);
}
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getEndDate
()))
{
String
endDate
=
dto
.
getEndDate
();
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
endDate
=
endDate
+
" 00:00:00:000"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
endDate
=
endDate
+
":00:00:000"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
endDate
=
endDate
+
":00:000"
;
if
(
endDate
.
length
()
==
10
)
{
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
+
" 23:59:59"
,
DATE_TIME_PATTERN
);
dto
.
setEndDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
));
}
else
{
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
dto
.
setEndDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
));
}
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
String
endDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setEndDate
(
endDateString
);
}
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getSortsString
()))
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
try
{
...
...
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