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
ea7834df
Commit
ea7834df
authored
Nov 07, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(tcm): 监管删除启停用企业
1.监管删除启停用企业
parent
b29d778a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
26 deletions
+37
-26
TzBaseEnterpriseInfoDto.java
...amos/boot/module/tcm/api/dto/TzBaseEnterpriseInfoDto.java
+3
-0
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+4
-2
EnterpriseManageServiceImpl.java
...ule/tcm/biz/service/impl/EnterpriseManageServiceImpl.java
+25
-23
TzBaseEnterpriseInfoServiceImpl.java
...tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+5
-1
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/dto/TzBaseEnterpriseInfoDto.java
View file @
ea7834df
...
@@ -301,6 +301,9 @@ public class TzBaseEnterpriseInfoDto extends BaseDto {
...
@@ -301,6 +301,9 @@ public class TzBaseEnterpriseInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"企业下人"
)
@ApiModelProperty
(
value
=
"企业下人"
)
List
<
UserPermissionDto
>
userPermissionList
;
List
<
UserPermissionDto
>
userPermissionList
;
@ApiModelProperty
(
value
=
"启停状态"
)
private
String
enableStatus
;
private
String
region
;
private
String
region
;
private
String
fullAddress
;
private
String
fullAddress
;
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
ea7834df
...
@@ -167,6 +167,9 @@
...
@@ -167,6 +167,9 @@
<if
test=
"tzBaseEnterpriseInfoDto.address!=null and tzBaseEnterpriseInfoDto.address!='' "
>
<if
test=
"tzBaseEnterpriseInfoDto.address!=null and tzBaseEnterpriseInfoDto.address!='' "
>
AND address LIKE CONCAT('%', #{tzBaseEnterpriseInfoDto.address},'%')
AND address LIKE CONCAT('%', #{tzBaseEnterpriseInfoDto.address},'%')
</if>
</if>
<if
test=
"tzBaseEnterpriseInfoDto.enableStatus!=null and tzBaseEnterpriseInfoDto.enableStatus!='' "
>
AND is_delete = #{tzBaseEnterpriseInfoDto.enableStatus}
</if>
<if
test=
"tzBaseEnterpriseInfoDto.regulatoryLabels!=null and tzBaseEnterpriseInfoDto.regulatoryLabels!='' "
>
<if
test=
"tzBaseEnterpriseInfoDto.regulatoryLabels!=null and tzBaseEnterpriseInfoDto.regulatoryLabels!='' "
>
AND regulatory_labels LIKE CONCAT('%', #{tzBaseEnterpriseInfoDto.regulatoryLabels},'%')
AND regulatory_labels LIKE CONCAT('%', #{tzBaseEnterpriseInfoDto.regulatoryLabels},'%')
</if>
</if>
...
@@ -192,13 +195,12 @@
...
@@ -192,13 +195,12 @@
<if
test=
"orgCode != null and orgCode != ''"
>
<if
test=
"orgCode != null and orgCode != ''"
>
AND supervise_org_code LIKE CONCAT('%', #{orgCode}, '%')
AND supervise_org_code LIKE CONCAT('%', #{orgCode}, '%')
</if>
</if>
AND is_delete = 0
</where>
</where>
order by
order by
<if
test=
"sort != null"
>
<if
test=
"sort != null"
>
${sort.field} ${sort.sortType},
${sort.field} ${sort.sortType},
</if>
</if>
create_date DESC
,sequence_nbr DESC
create_date DESC
</select>
</select>
<select
id=
"selectByUseUnit"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo"
>
<select
id=
"selectByUseUnit"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo"
>
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/EnterpriseManageServiceImpl.java
View file @
ea7834df
...
@@ -130,27 +130,29 @@ public class EnterpriseManageServiceImpl {
...
@@ -130,27 +130,29 @@ public class EnterpriseManageServiceImpl {
private
void
clearPatrolData
(
TzBaseEnterpriseInfo
enterpriseInfo
)
{
private
void
clearPatrolData
(
TzBaseEnterpriseInfo
enterpriseInfo
)
{
//删除planTask
//删除planTask
List
<
String
>
planTaskIds
=
patrolMapper
.
selectPlanTaskIdsByUseCode
(
enterpriseInfo
.
getUseCode
());
List
<
String
>
planTaskIds
=
patrolMapper
.
selectPlanTaskIdsByUseCode
(
enterpriseInfo
.
getUseCode
());
if
(
planTaskIds
.
size
()
>
5000
)
{
if
(!
planTaskIds
.
isEmpty
()){
int
index
=
5000
;
if
(
planTaskIds
.
size
()
>
5000
)
{
for
(
int
i
=
0
;
i
<
planTaskIds
.
size
();
i
+=
5000
)
{
int
index
=
5000
;
if
(
i
+
5000
>
planTaskIds
.
size
())
{
for
(
int
i
=
0
;
i
<
planTaskIds
.
size
();
i
+=
5000
)
{
index
=
planTaskIds
.
size
()
-
i
;
if
(
i
+
5000
>
planTaskIds
.
size
())
{
index
=
planTaskIds
.
size
()
-
i
;
}
List
<
String
>
subList
=
planTaskIds
.
subList
(
i
,
i
+
index
);
List
<
ESTaskDetailDto
>
maps
=
patrolMapper
.
findAllByTaskNos
(
subList
);
esTaskDetail
.
deleteAll
(
maps
);
List
<
ESPlanTaskListDto
>
esPlanTaskListDtos
=
subList
.
stream
().
map
(
item
->
new
ESPlanTaskListDto
().
setId
(
item
)).
collect
(
Collectors
.
toList
());
esPlanTaskList
.
deleteAll
(
esPlanTaskListDtos
);
patrolMapper
.
deleteAllPlanTaskDetailByTaskNos
(
subList
);
patrolMapper
.
deleteAllPlanTaskById
(
subList
);
}
}
List
<
String
>
subList
=
planTaskIds
.
subList
(
i
,
i
+
index
);
}
else
{
List
<
ESTaskDetailDto
>
maps
=
patrolMapper
.
findAllByTaskNos
(
subList
);
List
<
ESTaskDetailDto
>
maps
=
patrolMapper
.
findAllByTaskNos
(
planTaskIds
);
esTaskDetail
.
deleteAll
(
maps
);
esTaskDetail
.
deleteAll
(
maps
);
List
<
ESPlanTaskListDto
>
esPlanTaskListDtos
=
subList
.
stream
().
map
(
item
->
new
ESPlanTaskListDto
().
setId
(
item
)).
collect
(
Collectors
.
toList
());
List
<
ESPlanTaskListDto
>
esPlanTaskListDtos
=
planTaskIds
.
stream
().
map
(
item
->
new
ESPlanTaskListDto
().
setId
(
item
)).
collect
(
Collectors
.
toList
());
esPlanTaskList
.
deleteAll
(
esPlanTaskListDtos
);
esPlanTaskList
.
deleteAll
(
esPlanTaskListDtos
);
patrolMapper
.
deleteAllPlanTaskDetailByTaskNos
(
subList
);
patrolMapper
.
deleteAllPlanTaskDetailByTaskNos
(
planTaskIds
);
patrolMapper
.
deleteAllPlanTaskById
(
subList
);
patrolMapper
.
deleteAllPlanTaskById
(
planTaskIds
);
}
}
}
else
{
List
<
ESTaskDetailDto
>
maps
=
patrolMapper
.
findAllByTaskNos
(
planTaskIds
);
esTaskDetail
.
deleteAll
(
maps
);
List
<
ESPlanTaskListDto
>
esPlanTaskListDtos
=
planTaskIds
.
stream
().
map
(
item
->
new
ESPlanTaskListDto
().
setId
(
item
)).
collect
(
Collectors
.
toList
());
esPlanTaskList
.
deleteAll
(
esPlanTaskListDtos
);
patrolMapper
.
deleteAllPlanTaskDetailByTaskNos
(
planTaskIds
);
patrolMapper
.
deleteAllPlanTaskById
(
planTaskIds
);
}
}
}
}
...
@@ -160,8 +162,8 @@ public class EnterpriseManageServiceImpl {
...
@@ -160,8 +162,8 @@ public class EnterpriseManageServiceImpl {
}
}
private
void
unlockLoginAccount
(
TzBaseEnterpriseInfo
enterpriseInfo
)
{
private
void
unlockLoginAccount
(
TzBaseEnterpriseInfo
enterpriseInfo
)
{
// Lambda 形式
CompanyModel
companyModel
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
companyClient
.
queryByCompanyCode
(
enterpriseInfo
.
getUseCode
()));
Set
<
AgencyUserModel
>
userModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
agencyUserClient
.
queryByOrgCode
(
enterpriseInfo
.
getOrgCode
(),
null
));
List
<
AgencyUserModel
>
userModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
agencyUserClient
.
queryByCompanyId
(
companyModel
.
getSequenceNbr
(),
null
,
null
,
false
));
if
(!
userModels
.
isEmpty
())
{
if
(!
userModels
.
isEmpty
())
{
List
<
String
>
userIds
=
userModels
.
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
List
<
String
>
userIds
=
userModels
.
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
Privilege
.
agencyUserClient
.
unlockUsers
(
String
.
join
(
","
,
userIds
));
Privilege
.
agencyUserClient
.
unlockUsers
(
String
.
join
(
","
,
userIds
));
...
@@ -177,8 +179,8 @@ public class EnterpriseManageServiceImpl {
...
@@ -177,8 +179,8 @@ public class EnterpriseManageServiceImpl {
}
}
private
void
lockLoginAccount
(
TzBaseEnterpriseInfo
enterpriseInfo
)
{
private
void
lockLoginAccount
(
TzBaseEnterpriseInfo
enterpriseInfo
)
{
// Lambda 形式
CompanyModel
companyModel
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
companyClient
.
queryByCompanyCode
(
enterpriseInfo
.
getUseCode
()));
Set
<
AgencyUserModel
>
userModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
agencyUserClient
.
queryByOrgCode
(
enterpriseInfo
.
getOrgCode
(),
null
));
List
<
AgencyUserModel
>
userModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
agencyUserClient
.
queryByCompanyId
(
companyModel
.
getSequenceNbr
(),
null
,
null
,
false
));
if
(!
userModels
.
isEmpty
())
{
if
(!
userModels
.
isEmpty
())
{
List
<
String
>
userIds
=
userModels
.
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
List
<
String
>
userIds
=
userModels
.
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
Privilege
.
agencyUserClient
.
lockUsers
(
String
.
join
(
","
,
userIds
));
Privilege
.
agencyUserClient
.
lockUsers
(
String
.
join
(
","
,
userIds
));
...
@@ -262,8 +264,8 @@ public class EnterpriseManageServiceImpl {
...
@@ -262,8 +264,8 @@ public class EnterpriseManageServiceImpl {
}
}
private
void
deleteAmosUser
(
TzBaseEnterpriseInfo
e
)
{
private
void
deleteAmosUser
(
TzBaseEnterpriseInfo
e
)
{
// Lambda 形式
CompanyModel
companyModel
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
companyClient
.
queryByCompanyCode
(
e
.
getUseCode
()));
Set
<
AgencyUserModel
>
userModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
agencyUserClient
.
queryByOrgCode
(
e
.
getOrgCode
(),
null
));
List
<
AgencyUserModel
>
userModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
agencyUserClient
.
queryByCompanyId
(
companyModel
.
getSequenceNbr
(),
null
,
null
,
false
));
if
(!
userModels
.
isEmpty
())
{
if
(!
userModels
.
isEmpty
())
{
List
<
String
>
userIds
=
userModels
.
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
List
<
String
>
userIds
=
userModels
.
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
Privilege
.
agencyUserClient
.
multDeleteUser
(
String
.
join
(
","
,
userIds
),
true
);
Privilege
.
agencyUserClient
.
multDeleteUser
(
String
.
join
(
","
,
userIds
),
true
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
View file @
ea7834df
...
@@ -237,7 +237,11 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -237,7 +237,11 @@ public class TzBaseEnterpriseInfoServiceImpl
List
<
RegUnitInfo
>
regUnitInfoList
=
regUnitInfoService
.
lambdaQuery
().
select
(
RegUnitInfo:
:
getUnitCode
,
RegUnitInfo:
:
getAdminLoginPwd
)
List
<
RegUnitInfo
>
regUnitInfoList
=
regUnitInfoService
.
lambdaQuery
().
select
(
RegUnitInfo:
:
getUnitCode
,
RegUnitInfo:
:
getAdminLoginPwd
)
.
eq
(
RegUnitInfo:
:
getName
,
tzBaseEnterpriseInfoDto
.
getUseUnit
()).
list
();
.
eq
(
RegUnitInfo:
:
getName
,
tzBaseEnterpriseInfoDto
.
getUseUnit
()).
list
();
regUnitInfoList
.
forEach
(
info
->
System
.
out
.
println
(
"unitCode="
+
info
.
getUnitCode
()
+
", adminLoginPwd="
+
info
.
getAdminLoginPwd
()));
regUnitInfoList
.
forEach
(
info
->
System
.
out
.
println
(
"unitCode="
+
info
.
getUnitCode
()
+
", adminLoginPwd="
+
info
.
getAdminLoginPwd
()));
return
this
.
baseMapper
.
pageList
(
page
,
tzBaseEnterpriseInfoDto
,
orgCode
,
sortMap
,
officeRegion
);
IPage
<
TzBaseEnterpriseInfoDto
>
page2
=
this
.
baseMapper
.
pageList
(
page
,
tzBaseEnterpriseInfoDto
,
orgCode
,
sortMap
,
officeRegion
);
page2
.
getRecords
().
forEach
(
info
->
{
info
.
setEnableStatus
(
info
.
getIsDelete
()
?
"停用"
:
"启用"
);
});
return
page2
;
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
String
msg
=
ex
.
getMessage
()
==
null
?
""
:
ex
.
getMessage
();
String
msg
=
ex
.
getMessage
()
==
null
?
""
:
ex
.
getMessage
();
if
(
msg
.
contains
(
"eyibc decrypt error"
)
if
(
msg
.
contains
(
"eyibc decrypt error"
)
...
...
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