Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
987fa649
Commit
987fa649
authored
Jul 03, 2024
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(经销商人员管理): Add 用户是否有业务操作记录的字段用于前端判断
parent
4b7a5874
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
UserDataJBDto.java
.../yeejoin/amos/boot/module/hygf/api/dto/UserDataJBDto.java
+4
-0
UserDataZHDto.java
.../yeejoin/amos/boot/module/hygf/api/dto/UserDataZHDto.java
+4
-0
PersonnelBusinessServiceImpl.java
...e/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
+35
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/UserDataJBDto.java
View file @
987fa649
...
...
@@ -29,4 +29,8 @@ public class UserDataJBDto {
private
String
nowAddress
;
private
String
politicalOutlook
;
private
String
nativePlace
;
/**
* 是否有业务操作
*/
private
Boolean
hasOperationRecords
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/UserDataZHDto.java
View file @
987fa649
...
...
@@ -16,4 +16,8 @@ public class UserDataZHDto {
private
String
password
;
private
String
rePassword
;
private
List
<
Long
>
role
;
/**
* 是否有业务操作
*/
private
Boolean
hasOperationRecords
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
View file @
987fa649
...
...
@@ -494,9 +494,44 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
userDataJBDto
.
setPosition
(
JSONArray
.
parseArray
(
publicAgencyUse
.
getPosition
(),
String
.
class
));
userDataJBDto
.
setRegionalCompaniesSeq
(
personnelBusines
.
getRegionalCompaniesSeq
()!=
null
?
personnelBusines
.
getRegionalCompaniesSeq
().
toString
():
null
);
userDataJBDto
.
setAmosUnitId
(
personnelBusines
.
getAmosUnitId
());
Boolean
hasOperationRecords
=
hasOperationRecords
(
id
);
userDataZHDto
.
setHasOperationRecords
(
hasOperationRecords
);
userDataJBDto
.
setHasOperationRecords
(
hasOperationRecords
);
return
new
UserDataDto
(
userDataZHDto
,
userDataJBDto
,
userDataZZDto
);
}
/**
* 用户是否有业务操作
*
*
* @param id id
* @return {@link Boolean}
* @author yangyang
* @throws
* @date 2024/7/3 16:24
*/
public
Boolean
hasOperationRecords
(
String
id
)
{
if
(
StringUtils
.
isEmpty
(
id
))
{
return
false
;
}
Boolean
operateRecord
=
false
;
String
userId
=
personnelBusinessMapper
.
selectUserInfo
(
Long
.
parseLong
(
id
));
//添加校验,如果业务表里面有相关的用户id不能删除
List
<
String
>
tableName
=
personnelBusinessMapper
.
selectHygfTableName
();
if
(
CollectionUtil
.
isNotEmpty
(
tableName
))
{
for
(
String
table
:
tableName
)
{
int
count
=
personnelBusinessMapper
.
countByUserId
(
table
,
userId
);
if
(
count
>
0
)
{
operateRecord
=
true
;
break
;
}
}
}
return
operateRecord
;
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
deleteAllBySequenceNbr
(
Long
sequenceNbr
)
{
...
...
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