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
392b493a
Commit
392b493a
authored
Aug 08, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改风电预警列表和光伏预警列表筛选条件
parent
fd0adc5c
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 @
392b493a
...
@@ -305,42 +305,26 @@ public class TdInfoQueryController extends BaseController {
...
@@ -305,42 +305,26 @@ public class TdInfoQueryController extends BaseController {
}
}
dto
.
setOrgCode
(
orgCode
);
dto
.
setOrgCode
(
orgCode
);
Date
currentDate
=
new
Date
();
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
String
startDate
=
dto
.
getStartDate
();
String
startDate
=
dto
.
getStartDate
();
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
if
(
startDate
.
length
()
==
10
)
{
startDate
=
startDate
+
" 00:00:00"
;
Date
date
=
DateUtils
.
dateParse
(
startDate
+
" 00:00:00"
,
DATE_TIME_PATTERN
);
}
dto
.
setStartDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
));
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
}
else
{
startDate
=
startDate
+
":00:00"
;
Date
date
=
DateUtils
.
dateParse
(
startDate
,
DATE_TIME_PATTERN
);
}
dto
.
setStartDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
));
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
startDate
=
startDate
+
":00"
;
}
}
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
()))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getEndDate
()))
{
String
endDate
=
dto
.
getEndDate
();
String
endDate
=
dto
.
getEndDate
();
if
(
endDate
.
length
()
==
10
)
{
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
+
" 23:59:59"
,
DATE_TIME_PATTERN
);
endDate
=
endDate
+
" 00:00:00"
;
dto
.
setEndDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
));
}
}
else
{
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
endDate
=
endDate
+
":00:00"
;
dto
.
setEndDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
));
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
endDate
=
endDate
+
":00"
;
}
}
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
()))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getSortsString
()))
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
ObjectMapper
objectMapper
=
new
ObjectMapper
();
...
@@ -389,41 +373,29 @@ public class TdInfoQueryController extends BaseController {
...
@@ -389,41 +373,29 @@ public class TdInfoQueryController extends BaseController {
}
}
dto
.
setOrgCode
(
orgCode
);
dto
.
setOrgCode
(
orgCode
);
Date
currentDate
=
new
Date
();
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
String
startDate
=
dto
.
getStartDate
();
String
startDate
=
dto
.
getStartDate
();
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
if
(
startDate
.
length
()
==
10
)
{
startDate
=
startDate
+
" 00:00:00.000"
;
Date
date
=
DateUtils
.
dateParse
(
startDate
+
" 00:00:00"
,
DATE_TIME_PATTERN
);
}
dto
.
setStartDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
));
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
}
else
{
startDate
=
startDate
+
":00:00.000"
;
Date
date
=
DateUtils
.
dateParse
(
startDate
,
DATE_TIME_PATTERN
);
}
dto
.
setStartDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
));
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
startDate
=
startDate
+
":00.000"
;
}
}
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
()))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getEndDate
()))
{
String
endDate
=
dto
.
getEndDate
();
String
endDate
=
dto
.
getEndDate
();
if
(
endDate
.
length
()
==
10
)
{
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
+
" 23:59:59"
,
DATE_TIME_PATTERN
);
endDate
=
endDate
+
" 00:00:00:000"
;
dto
.
setEndDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
));
}
}
else
{
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
endDate
=
endDate
+
":00:00:000"
;
dto
.
setEndDate
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
));
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
endDate
=
endDate
+
":00:000"
;
}
}
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
()))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getSortsString
()))
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
ObjectMapper
objectMapper
=
new
ObjectMapper
();
try
{
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