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
2644dea7
Commit
2644dea7
authored
Aug 05, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改健康状态指数分析
parent
a271270c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
12 deletions
+47
-12
TdInfoQueryController.java
...ot/module/jxiop/biz/controller/TdInfoQueryController.java
+47
-12
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 @
2644dea7
...
@@ -78,10 +78,12 @@ public class TdInfoQueryController extends BaseController {
...
@@ -78,10 +78,12 @@ public class TdInfoQueryController extends BaseController {
@Autowired
@Autowired
UserEmpowerMapper
userEmpowerMapper
;
UserEmpowerMapper
userEmpowerMapper
;
private
SimpleDateFormat
hhmmss
=
new
SimpleDateFormat
(
"HH:mm:ss"
);
private
SimpleDateFormat
hhmmss
=
new
SimpleDateFormat
(
"HH:mm:ss"
);
private
SimpleDateFormat
mmss
=
new
SimpleDateFormat
(
"mm:ss"
);
private
SimpleDateFormat
mmss
=
new
SimpleDateFormat
(
"mm:ss"
);
private
SimpleDateFormat
ss
=
new
SimpleDateFormat
(
"ss"
);
private
SimpleDateFormat
ss
=
new
SimpleDateFormat
(
"ss"
);
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/getFanHealthIndexInfo"
)
@PostMapping
(
value
=
"/getFanHealthIndexInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"分页查询健康指数信息 - 风电"
,
notes
=
"分页查询健康指数信息 - 风电"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"分页查询健康指数信息 - 风电"
,
notes
=
"分页查询健康指数信息 - 风电"
)
...
@@ -98,28 +100,36 @@ public class TdInfoQueryController extends BaseController {
...
@@ -98,28 +100,36 @@ public class TdInfoQueryController extends BaseController {
}
}
dto
.
setOrgCode
(
orgCode
);
dto
.
setOrgCode
(
orgCode
);
String
time
=
""
;
Date
currentDate
=
new
Date
()
;
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
Date
d
=
new
Date
();
String
startDate
=
dto
.
getStart
Date
();
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
))
{
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
time
=
hhmmss
.
format
(
d
);
startDate
=
startDate
+
" "
+
hhmmss
.
format
(
currentDate
);
}
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
))
{
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
time
=
mmss
.
format
(
d
);
startDate
=
startDate
+
":"
+
mmss
.
format
(
currentDate
);
}
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
))
{
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
time
=
ss
.
format
(
d
);
startDate
=
startDate
+
":"
+
ss
.
format
(
currentDate
);
}
}
String
startDate
=
dto
.
getStartDate
();
startDate
=
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
?
startDate
+
" "
+
time
:
startDate
+
":"
+
time
;
Date
date
=
DateUtils
.
dateParse
(
startDate
,
DATE_TIME_PATTERN
);
Date
date
=
DateUtils
.
dateParse
(
startDate
,
DATE_TIME_PATTERN
);
String
startDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
);
String
startDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setStartDate
(
startDateString
);
dto
.
setStartDate
(
startDateString
);
}
}
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getEndDate
()))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getEndDate
()))
{
String
endDate
=
dto
.
getEndDate
();
String
endDate
=
dto
.
getEndDate
();
endDate
=
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
?
endDate
+
" "
+
time
:
endDate
+
":"
+
time
;
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
endDate
=
endDate
+
" "
+
hhmmss
.
format
(
currentDate
);
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
endDate
=
endDate
+
":"
+
mmss
.
format
(
currentDate
);
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
endDate
=
endDate
+
":"
+
ss
.
format
(
currentDate
);
}
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
String
endDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
);
String
endDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setEndDate
(
endDateString
);
dto
.
setEndDate
(
endDateString
);
...
@@ -188,14 +198,39 @@ public class TdInfoQueryController extends BaseController {
...
@@ -188,14 +198,39 @@ public class TdInfoQueryController extends BaseController {
orgCode
=
stdUserEmpower
.
getAmosOrgCode
().
get
(
0
)+
"%"
;
orgCode
=
stdUserEmpower
.
getAmosOrgCode
().
get
(
0
)+
"%"
;
}
}
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
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
startDate
=
startDate
+
" "
+
hhmmss
.
format
(
currentDate
);
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
startDate
=
startDate
+
":"
+
mmss
.
format
(
currentDate
);
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
startDate
=
startDate
+
":"
+
ss
.
format
(
currentDate
);
}
Date
date
=
DateUtils
.
dateParse
(
startDate
,
DATE_TIME_PATTERN
);
Date
date
=
DateUtils
.
dateParse
(
startDate
,
DATE_TIME_PATTERN
);
String
startDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
);
String
startDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setStartDate
(
startDateString
);
dto
.
setStartDate
(
startDateString
);
}
}
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getEndDate
()))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getEndDate
()))
{
String
endDate
=
dto
.
getEndDate
();
String
endDate
=
dto
.
getEndDate
();
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
endDate
=
endDate
+
" "
+
hhmmss
.
format
(
currentDate
);
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
endDate
=
endDate
+
":"
+
mmss
.
format
(
currentDate
);
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
endDate
=
endDate
+
":"
+
ss
.
format
(
currentDate
);
}
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
String
endDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
);
String
endDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setEndDate
(
endDateString
);
dto
.
setEndDate
(
endDateString
);
...
...
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