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
941d7052
Commit
941d7052
authored
Feb 27, 2025
by
hezhuozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求】管道变更/单位变更
parent
438bb612
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+18
-3
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
View file @
941d7052
...
...
@@ -57,6 +57,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.SimpleDateFormat
;
import
java.time.Instant
;
import
java.time.ZoneId
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
...
...
@@ -2132,8 +2135,8 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
}
public
Map
<
String
,
Map
<
String
,
Object
>>
detailsByProjectContraption
(
String
sequenceNbr
)
{
String
[]
jsonFields
=
{
"
PRODUCT_PHOTO"
,
"OTHER_ACCESSORIES"
,
"PRODUCT_QUALIFICATION_CERTIFICATE"
,
"START_LATITUDE_LONGITUDE
"
,
"
END_LATITUDE_LONGITUDE
"
};
String
[]
jsonFields
=
{
"
productPhoto"
,
"otherAccessories"
,
"productQualificationCertificate"
,
"startLatitudeLongitude
"
,
"
endLatitudeLongitude
"
};
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
new
HashMap
<>();
if
(
StringUtils
.
isEmpty
(
sequenceNbr
))
{
resultMap
.
put
(
"equipInfo"
,
Collections
.
emptyMap
());
...
...
@@ -2170,7 +2173,19 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
.
map
(
map
->
{
commonServiceImpl
.
convertStringToJsonobject
(
map
,
jsonFields
);
List
<
JSONObject
>
pipelineList
=
new
ArrayList
<>();
changeRegistrationUnitEqs
.
forEach
(
item
->
pipelineList
.
add
(
JSON
.
parseObject
(
item
.
getDeviceInfo
())));
changeRegistrationUnitEqs
.
forEach
(
item
->
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
item
.
getDeviceInfo
());
if
(
jsonObject
.
containsKey
(
"uscDate"
)&&!
StringUtils
.
isEmpty
(
jsonObject
.
get
(
"uscDate"
))){
// 转换为 Instant 并指定时区(默认系统时区)
Instant
instant
=
Instant
.
ofEpochMilli
(
Long
.
parseLong
(
jsonObject
.
getString
(
"uscDate"
)));
ZoneId
zoneId
=
ZoneId
.
systemDefault
();
// 定义日期格式
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)
.
withZone
(
zoneId
);
jsonObject
.
put
(
"uscDate"
,
formatter
.
format
(
instant
));
}
pipelineList
.
add
(
jsonObject
);
});
map
.
put
(
"pipelineList"
,
pipelineList
);
return
map
;
}).
orElse
(
Collections
.
emptyMap
());
...
...
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