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
64d86fd7
Commit
64d86fd7
authored
Jul 10, 2025
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增企业资质更新逻辑
parent
d9633e8d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
1 deletion
+59
-1
BaseEnterpriseUpdate.java
...common/biz/refresh/commonUpdate/BaseEnterpriseUpdate.java
+42
-0
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+9
-1
EnterpriseRefreshHandler.java
...ule/tcm/biz/refresh/handler/EnterpriseRefreshHandler.java
+8
-0
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
0 → 100644
View file @
64d86fd7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
refresh
.
commonUpdate
;
import
com.yeejoin.amos.boot.module.common.api.entity.EsBaseEnterpriseInfo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Component
@Slf4j
@RequiredArgsConstructor
public
class
BaseEnterpriseUpdate
{
public
final
String
jyjcjg
=
"检验检测机构"
;
public
final
String
jcdw
=
"检测单位"
;
public
final
String
jydw
=
"检验单位"
;
public
final
String
jyjgCode
=
"1233-1"
;
public
final
String
jcjgCode
=
"1233-2"
;
public
String
updateJyjcUnitType
(
String
oldUnitType
,
List
<
EsBaseEnterpriseInfo
.
License
>
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
();
// 如果资质中不含有检验和检测资质,则不更新单位类型
if
(
jcjgCount
==
0
&&
jyjgCount
==
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
(
jcjgCount
>
0
)
{
afterType
.
append
(
"#"
).
append
(
jcdw
);
}
if
(
jyjgCount
>
0
)
{
afterType
.
append
(
"#"
).
append
(
jydw
);
}
return
oldUnitType
+
afterType
;
}
}
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 @
64d86fd7
...
...
@@ -29,6 +29,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.ESEquipmentInfo;
import
com.yeejoin.amos.boot.module.common.api.entity.EsBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.common.api.entity.EsUserInfo
;
import
com.yeejoin.amos.boot.module.common.api.entity.TzsUserPermission
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.commonUpdate.BaseEnterpriseUpdate
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeEqDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PieLineEquipContraptionDto
;
...
...
@@ -39,8 +40,8 @@ import com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.handler.strategy.ProblemHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgInspectionDetectionInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.refresh.StatisticsDataUpdateService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgInspectionDetectionInfoService
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipWaitRefreshDataQualityScore
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ProjectWaitRefreshDataQualityScore
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.RefreshDataDto
;
...
...
@@ -56,6 +57,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StopWatch
;
import
org.thymeleaf.util.ListUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
...
@@ -141,6 +143,8 @@ public class DataHandlerServiceImpl {
private
final
IdxBizJgRegisterInfoMapper
registerInfoMapper
;
private
final
BaseEnterpriseUpdate
baseEnterpriseUpdate
;
/**
* 安装告知压力管道历史数据修复-详情中的设备列表修改为汇总表格式
...
...
@@ -1437,6 +1441,10 @@ public class DataHandlerServiceImpl {
return
esLicense
;
}).
collect
(
Collectors
.
toList
());
esBaseEnterpriseInfo
.
setLicenses
(
licenses
);
if
((
enterpriseInfo
.
getUnitType
().
contains
(
baseEnterpriseUpdate
.
jyjcjg
)
||
enterpriseInfo
.
getUnitType
().
contains
(
baseEnterpriseUpdate
.
jydw
)
||
enterpriseInfo
.
getUnitType
().
contains
(
baseEnterpriseUpdate
.
jcdw
))
&&
!
ListUtils
.
isEmpty
(
licenses
))
{
String
newUnitType
=
baseEnterpriseUpdate
.
updateJyjcUnitType
(
enterpriseInfo
.
getUnitType
(),
licenses
);
esBaseEnterpriseInfo
.
setUnitType
(
newUnitType
);
}
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 @
64d86fd7
...
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.EsUserInfo;
import
com.yeejoin.amos.boot.module.common.api.entity.TzsDataRefreshMessage
;
import
com.yeejoin.amos.boot.module.common.api.service.IDataRefreshHandler
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.commonUpdate.BaseEnterpriseUpdate
;
import
com.yeejoin.amos.boot.module.common.biz.utils.RefreshDataUtils
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseUnitLicence
;
...
...
@@ -20,6 +21,7 @@ import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
org.thymeleaf.util.ListUtils
;
import
java.util.List
;
import
java.util.Optional
;
...
...
@@ -40,6 +42,8 @@ public class EnterpriseRefreshHandler implements IDataRefreshHandler {
private
final
EsUserInfoDao
esUserInfoDao
;
private
final
BaseEnterpriseUpdate
baseEnterpriseUpdate
;
@Override
public
String
supportType
()
{
return
"enterprise"
;
...
...
@@ -74,6 +78,10 @@ public class EnterpriseRefreshHandler implements IDataRefreshHandler {
return
esLicense
;
}).
collect
(
Collectors
.
toList
());
esBaseEnterpriseInfo
.
setLicenses
(
licenses
);
if
((
enterpriseInfo
.
getUnitType
().
contains
(
baseEnterpriseUpdate
.
jyjcjg
)
||
enterpriseInfo
.
getUnitType
().
contains
(
baseEnterpriseUpdate
.
jydw
)
||
enterpriseInfo
.
getUnitType
().
contains
(
baseEnterpriseUpdate
.
jcdw
))
&&
!
ListUtils
.
isEmpty
(
licenses
))
{
String
newUnitType
=
baseEnterpriseUpdate
.
updateJyjcUnitType
(
enterpriseInfo
.
getUnitType
(),
licenses
);
esBaseEnterpriseInfo
.
setUnitType
(
newUnitType
);
}
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