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
08932d09
Commit
08932d09
authored
Apr 14, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
转换时间
parent
ca903819
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
DateUtils.java
.../java/com/yeejoin/equipmanage/common/utils/DateUtils.java
+1
-1
TopographyController.java
.../yeejoin/equipmanage/controller/TopographyController.java
+8
-3
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/DateUtils.java
View file @
08932d09
...
@@ -23,7 +23,7 @@ public class DateUtils {
...
@@ -23,7 +23,7 @@ public class DateUtils {
public
static
final
String
YEAR_PATTERN
=
"yyyy"
;
public
static
final
String
YEAR_PATTERN
=
"yyyy"
;
public
static
final
String
MINUTE_ONLY_PATTERN
=
"mm"
;
public
static
final
String
MINUTE_ONLY_PATTERN
=
"mm"
;
public
static
final
String
HOUR_ONLY_PATTERN
=
"HH"
;
public
static
final
String
HOUR_ONLY_PATTERN
=
"HH"
;
public
static
final
String
DATE_TIME_T_PATTERN
=
"yyyy-MM-dd'T'HH:mm:ss"
;
public
static
final
String
DATE_TIME_T_PATTERN
=
"yyyy-MM-dd'T'HH:mm:ss
.SSS'Z'
"
;
/**
/**
* 获取当前时间
* 获取当前时间
*
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/TopographyController.java
View file @
08932d09
...
@@ -31,6 +31,7 @@ import org.springframework.data.domain.Page;
...
@@ -31,6 +31,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.DateTimeUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -866,11 +867,13 @@ public class TopographyController extends AbstractBaseController {
...
@@ -866,11 +867,13 @@ public class TopographyController extends AbstractBaseController {
List
<
Date
>
dates
=
new
ArrayList
<>();
List
<
Date
>
dates
=
new
ArrayList
<>();
for
(
IotDataVO
vo
:
timeList
)
{
for
(
IotDataVO
vo
:
timeList
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_T_PATTERN
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_T_PATTERN
);
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
);
logger
.
info
(
"返回时间===================================("
+
vo
.
getValue
()
+
") ======================================="
);
logger
.
info
(
"返回时间===================================("
+
vo
.
getValue
()
+
") ======================================="
);
Date
date
=
sdf
.
parse
(
String
.
valueOf
(
vo
.
getValue
()));
Date
date
=
sdf
.
parse
(
String
.
valueOf
(
vo
.
getValue
()));
sdf
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"Asia/Shanghai"
));
sdf
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"UTC"
));
String
time
=
sdf
.
format
(
date
);
// String time= sdf.format(date);
dates
.
add
(
sdf
.
parse
(
time
));
String
time
=
DateTimeUtil
.
format
(
date
,
DateTimeUtil
.
ISO_DATE_HOUR24_MIN_SEC
);
dates
.
add
(
sdf1
.
parse
(
time
));
logger
.
info
(
"返回时间===================================("
+
sdf
.
parse
(
String
.
valueOf
(
vo
.
getValue
()))
+
") ======================================="
);
logger
.
info
(
"返回时间===================================("
+
sdf
.
parse
(
String
.
valueOf
(
vo
.
getValue
()))
+
") ======================================="
);
}
}
List
<
EquipmentSpecificIndex
>
indexes
=
equipmentSpecificIndexMapper
.
getEquipmentSpeIndexByIotCodeAndTrend
(
iotCode
);
List
<
EquipmentSpecificIndex
>
indexes
=
equipmentSpecificIndexMapper
.
getEquipmentSpeIndexByIotCodeAndTrend
(
iotCode
);
...
@@ -928,4 +931,6 @@ public class TopographyController extends AbstractBaseController {
...
@@ -928,4 +931,6 @@ public class TopographyController extends AbstractBaseController {
}
}
}
}
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