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
758aa43c
Commit
758aa43c
authored
Mar 14, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):西安数据导入接口修改
parent
d230bab0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
9 deletions
+20
-9
XiAnDataDockServiceImpl.java
...oin/amos/api/openapi/service/XiAnDataDockServiceImpl.java
+1
-0
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+19
-9
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/service/XiAnDataDockServiceImpl.java
View file @
758aa43c
...
@@ -298,6 +298,7 @@ public class XiAnDataDockServiceImpl {
...
@@ -298,6 +298,7 @@ public class XiAnDataDockServiceImpl {
if
(
this
.
checkEquCodeUniqueness
(
data
.
getEquCode
())){
if
(
this
.
checkEquCodeUniqueness
(
data
.
getEquCode
())){
data
.
setOriginalEquCode
(
data
.
getEquCode
());
data
.
setOriginalEquCode
(
data
.
getEquCode
());
data
.
setEquCodeType
(
"2"
);
data
.
setEquCodeType
(
"2"
);
data
.
setEquCode
(
""
);
}
}
}
else
{
}
else
{
data
.
setEquCode
(
""
);
data
.
setEquCode
(
""
);
...
...
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/DataDockServiceImpl.java
View file @
758aa43c
...
@@ -116,7 +116,17 @@ public class DataDockServiceImpl {
...
@@ -116,7 +116,17 @@ public class DataDockServiceImpl {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
xiAnSaveEquipmentData
(
List
<
Map
<
String
,
Object
>>
equLists
)
{
public
boolean
xiAnSaveEquipmentData
(
List
<
Map
<
String
,
Object
>>
equLists
)
{
CompletableFuture
.
allOf
(
equLists
.
stream
().
map
(
equ
->
CompletableFuture
.
runAsync
(()
->
saveEquipmentDataInTransaction
(
equ
,
"jg_his_xa"
,
null
))).
toArray
(
CompletableFuture
[]::
new
)).
join
();
String
appKey
=
RequestContext
.
getAppKey
();
String
product
=
RequestContext
.
getProduct
();
String
token
=
RequestContext
.
getToken
();
CompletableFuture
.
allOf
(
equLists
.
stream
().
map
(
equ
->
CompletableFuture
.
runAsync
(()
->
{
RequestContext
.
setAppKey
(
appKey
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setToken
(
token
);
saveEquipmentDataInTransaction
(
equ
,
"jg_his_xa"
,
null
);
})).
toArray
(
CompletableFuture
[]::
new
)
).
join
();
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
...
@@ -350,17 +360,17 @@ public class DataDockServiceImpl {
...
@@ -350,17 +360,17 @@ public class DataDockServiceImpl {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
// 提取 companyCode
String
companyCode
=
"1"
.
equals
(
equ
.
get
(
"equCodeType"
))
String
companyCode
=
Optional
.
ofNullable
(
equ
.
get
(
"equCodeType"
))
?
String
.
valueOf
(
equ
.
get
(
"equCode"
))
.
filter
(
type
->
Objects
.
equals
(
type
,
1
)).
flatMap
(
type
->
Optional
.
ofNullable
(
equ
.
get
(
"equCode"
))
:
String
.
valueOf
(
equ
.
get
(
"originalEquCode"
));
.
map
(
String:
:
valueOf
).
map
(
String:
:
trim
)
.
filter
(
code
->
code
.
length
()
>=
9
)
.
map
(
code
->
code
.
substring
(
3
,
9
)))
.
orElse
(
""
);
companyCode
=
companyCode
.
trim
();
if
(
companyCode
.
length
()
>
9
)
{
companyCode
=
companyCode
.
substring
(
4
,
10
);
}
// 直接获取公司名称
// 直接获取公司名称
String
companyName
=
countyMap
.
get
(
companyCode
);
String
companyName
=
countyMap
.
get
(
companyCode
);
if
(
companyName
!=
null
)
{
if
(
companyName
!=
null
&&
!
companyName
.
trim
().
isEmpty
()
)
{
supervisionInfo
.
setOrgBranchCode
(
companyCode
);
supervisionInfo
.
setOrgBranchCode
(
companyCode
);
supervisionInfo
.
setOrgBranchName
(
companyName
);
supervisionInfo
.
setOrgBranchName
(
companyName
);
}
else
{
}
else
{
...
...
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