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
d105c9aa
Commit
d105c9aa
authored
Jul 10, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(综合搜索):数据同步调整
1.检验单位、检测单位分开
parent
8300c84a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
16 deletions
+26
-16
BaseEnterpriseUpdate.java
...common/biz/refresh/commonUpdate/BaseEnterpriseUpdate.java
+16
-14
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+5
-1
EnterpriseRefreshHandler.java
...ule/tcm/biz/refresh/handler/EnterpriseRefreshHandler.java
+5
-1
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/refresh/commonUpdate/BaseEnterpriseUpdate.java
View file @
d105c9aa
...
...
@@ -6,7 +6,10 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.stereotype.Component
;
import
org.thymeleaf.util.ListUtils
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
@Component
@Slf4j
...
...
@@ -14,8 +17,8 @@ import java.util.List;
public
class
BaseEnterpriseUpdate
{
public
final
String
jyjcjg
=
"检验检测机构"
;
public
final
String
jcdw
=
"检测单位"
;
public
final
String
jydw
=
"检验单位"
;
public
final
String
jcdw
=
"检测单位"
;
public
final
String
jyjgCode
=
"1233-1"
;
public
final
String
jcjgCode
=
"1233-2"
;
...
...
@@ -23,25 +26,24 @@ public class BaseEnterpriseUpdate {
// 如果单位类型中包含检验检测机构、检测单位、检验单位,且有资质信息,则更新单位类型
if
((
oldUnitType
.
contains
(
jyjcjg
)
||
oldUnitType
.
contains
(
jydw
)
||
oldUnitType
.
contains
(
jcdw
))
&&
!
ListUtils
.
isEmpty
(
unitLicences
))
{
long
jyjgCount
=
unitLicences
.
stream
().
filter
(
e
->
e
.
getCertTypeCode
().
equals
(
jyjgCode
)).
count
();
long
jcjgCount
=
unitLicences
.
stream
().
filter
(
e
->
e
.
getCertTypeCode
().
equals
(
jcjgCode
)).
count
();
StringBuilder
afterType
=
new
StringBuilder
();
long
jydwCount
=
unitLicences
.
stream
().
filter
(
e
->
jyjgCode
.
equals
(
e
.
getCertTypeCode
())
||
jydw
.
equals
(
e
.
getCertType
())).
count
();
long
jcdwCount
=
unitLicences
.
stream
().
filter
(
e
->
jcjgCode
.
equals
(
e
.
getCertTypeCode
())
||
jcdw
.
equals
(
e
.
getCertType
())).
count
();
// 如果资质中不含有检验和检测资质,则不更新单位类型
if
(
j
cjgCount
==
0
&&
jyjg
Count
==
0
)
{
if
(
j
ydwCount
==
0
&&
jcdw
Count
==
0
)
{
return
oldUnitType
;
}
// 处理旧的单位类型
oldUnitType
=
oldUnitType
.
replace
(
jyjcjg
,
""
).
replace
(
jcdw
,
""
).
replace
(
jydw
,
""
);
oldUnitType
=
oldUnitType
.
replace
(
"##"
,
"#"
);
oldUnitType
=
oldUnitType
.
startsWith
(
"#"
)
?
oldUnitType
.
substring
(
1
)
:
oldUnitType
;
oldUnitType
=
oldUnitType
.
endsWith
(
"#"
)
?
oldUnitType
.
substring
(
0
,
oldUnitType
.
length
()
-
1
)
:
oldUnitType
;
if
(
j
cjg
Count
>
0
)
{
afterType
.
append
(
"#"
).
append
(
jc
dw
);
Set
<
String
>
units
=
Arrays
.
stream
(
oldUnitType
.
split
(
"#"
)).
collect
(
Collectors
.
toSet
()
);
units
.
remove
(
jyjcjg
);
units
.
remove
(
jydw
)
;
units
.
remove
(
jcdw
)
;
if
(
j
ydw
Count
>
0
)
{
units
.
add
(
jy
dw
);
}
if
(
j
yjg
Count
>
0
)
{
afterType
.
append
(
"#"
).
append
(
jy
dw
);
if
(
j
cdw
Count
>
0
)
{
units
.
add
(
jc
dw
);
}
return
oldUnitType
+
afterType
;
return
String
.
join
(
"#"
,
units
)
;
}
else
{
return
oldUnitType
;
}
...
...
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/DataHandlerServiceImpl.java
View file @
d105c9aa
...
...
@@ -1440,7 +1440,11 @@ public class DataHandlerServiceImpl {
return
esLicense
;
}).
collect
(
Collectors
.
toList
());
esBaseEnterpriseInfo
.
setLicenses
(
licenses
);
esBaseEnterpriseInfo
.
setUnitType
(
baseEnterpriseUpdate
.
updateJyjcUnitType
(
enterpriseInfo
.
getUnitType
(),
licenses
));
try
{
esBaseEnterpriseInfo
.
setUnitType
(
baseEnterpriseUpdate
.
updateJyjcUnitType
(
enterpriseInfo
.
getUnitType
(),
licenses
));
}
catch
(
Exception
e
)
{
log
.
error
(
"单位类型转换失败:{}"
,
enterpriseInfo
,
e
);
}
return
esBaseEnterpriseInfo
;
}).
collect
(
Collectors
.
toList
());
enterpriseInfoDao
.
saveAll
(
esBaseEnterpriseInfos
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/refresh/handler/EnterpriseRefreshHandler.java
View file @
d105c9aa
...
...
@@ -77,7 +77,11 @@ public class EnterpriseRefreshHandler implements IDataRefreshHandler {
return
esLicense
;
}).
collect
(
Collectors
.
toList
());
esBaseEnterpriseInfo
.
setLicenses
(
licenses
);
esBaseEnterpriseInfo
.
setUnitType
(
baseEnterpriseUpdate
.
updateJyjcUnitType
(
enterpriseInfo
.
getUnitType
(),
licenses
));
try
{
esBaseEnterpriseInfo
.
setUnitType
(
baseEnterpriseUpdate
.
updateJyjcUnitType
(
enterpriseInfo
.
getUnitType
(),
licenses
));
}
catch
(
Exception
e
)
{
log
.
error
(
"单位类型转换失败:{}"
,
enterpriseInfo
,
e
);
}
enterpriseInfoDao
.
save
(
esBaseEnterpriseInfo
);
// 人员更新冗余的单位信息
List
<
TzsUserInfo
>
userOfOneUnit
=
userInfoMapper
.
selectList
(
new
LambdaQueryWrapper
<
TzsUserInfo
>().
eq
(
TzsUserInfo:
:
getUnitCode
,
enterpriseInfo
.
getUseUnitCode
()).
eq
(
BaseEntity:
:
getIsDelete
,
false
).
select
(
BaseEntity:
:
getSequenceNbr
));
...
...
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