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
95295847
Commit
95295847
authored
Nov 12, 2024
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中屏-设备总览-设备详情-详细信息,涉及到日期字段,时间格式调整为年-月-日,去掉时分秒显示
parent
eb2022ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
DPSubServiceImpl.java
...t/module/statistcs/biz/service/impl/DPSubServiceImpl.java
+13
-0
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/DPSubServiceImpl.java
View file @
95295847
...
...
@@ -33,6 +33,8 @@ import javax.script.Invocable;
import
javax.script.ScriptEngine
;
import
javax.script.ScriptEngineManager
;
import
java.net.URI
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.IntStream
;
...
...
@@ -632,6 +634,17 @@ public class DPSubServiceImpl {
jsonObject
.
put
(
"value"
,
(!
ValidationUtil
.
isEmpty
(
lnglatSelect
.
getString
(
"latitude"
))
&&
!
ValidationUtil
.
isEmpty
(
lnglatSelect
.
getString
(
"longitude"
)))
?
String
.
format
(
"[%s,%s]"
,
lnglatSelect
.
getString
(
"latitude"
),
lnglatSelect
.
getString
(
"longitude"
))
:
lnglatSelect
.
getString
(
"address"
));
}
}
else
if
(
"dateTime"
.
equals
(
xObj
.
getString
(
"componentKey"
)))
{
if
(!
ValidationUtil
.
isEmpty
(
value
))
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
visualParams
.
getString
(
"format"
));
Date
date
=
null
;
try
{
date
=
sdf
.
parse
(
ValidationUtil
.
validateString
(
value
));
}
catch
(
ParseException
e
)
{
throw
new
RuntimeException
(
e
);
}
jsonObject
.
put
(
"value"
,
sdf
.
format
(
date
));
}
}
else
if
(
"checkbox"
.
equals
(
xObj
.
getString
(
"componentKey"
)))
{
ResponseModel
checkboxResult
=
this
.
getApiResult
(
visualParams
.
getJSONObject
(
"api"
),
null
);
if
(!
ValidationUtil
.
isEmpty
(
checkboxResult
)
&&
checkboxResult
.
getStatus
()
==
200
&&
!
ValidationUtil
.
isEmpty
(
value
))
{
...
...
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