Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
bb3b97d1
Commit
bb3b97d1
authored
Nov 08, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
td相关bug修改
parent
94b3da55
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
TdInfoQueryController.java
...ot/module/jxiop/biz/controller/TdInfoQueryController.java
+9
-5
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 @
bb3b97d1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
cn.hutool.core.
date.Dat
eUtil
;
import
cn.hutool.core.
text.CharSequenc
eUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
...
...
@@ -58,17 +58,18 @@ public class TdInfoQueryController {
@PostMapping
(
value
=
"/getFanHealthIndexInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"分页查询健康指数信息 - 风电"
,
notes
=
"分页查询健康指数信息 - 风电"
)
public
ResponseModel
<
Page
<
FanHealthIndex
>>
getFanHealthIndexInfo
(
@RequestBody
FanHealthIndexDto
dto
)
throws
ParseException
{
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
String
startDate
=
dto
.
getStartDate
();
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
();
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
String
endDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setStartDate
(
endDateString
);
}
Page
<
FanHealthIndex
>
resultPage
=
new
Page
<>(
dto
.
getCurrent
(),
dto
.
getSize
());
dto
.
setCurrent
((
dto
.
getCurrent
()
-
1
)
*
dto
.
getSize
());
List
<
Map
<
String
,
String
>>
orderWeight
=
dto
.
getSorts
().
stream
().
sorted
(
Comparator
.
comparing
(
t
->
Integer
.
parseInt
(
t
.
get
(
"orderWeight"
)))).
collect
(
Collectors
.
toList
());
...
...
@@ -91,15 +92,18 @@ public class TdInfoQueryController {
@PostMapping
(
value
=
"/getPvHealthIndexInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"分页查询健康指数信息 - 光伏"
,
notes
=
"分页查询健康指数信息 - 光伏"
)
public
ResponseModel
<
Page
<
PvHealthIndex
>>
getPvHealthIndexInfo
(
@RequestBody
PvHealthIndexDto
dto
)
throws
ParseException
{
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
String
startDate
=
dto
.
getStartDate
();
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
();
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
String
endDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setStartDate
(
endDateString
);
}
Page
<
PvHealthIndex
>
resultPage
=
new
Page
<>(
dto
.
getCurrent
(),
dto
.
getSize
());
dto
.
setCurrent
((
dto
.
getCurrent
()
-
1
)
*
dto
.
getSize
());
...
...
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