Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
Overview
Overview
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
base_platform_enterprise
gic-platform-auth
Commits
5ef38f66
Commit
5ef38f66
authored
Sep 02, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
受审项
parent
06bfb93b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
16 deletions
+21
-16
AuditorAuditedGroupRelServiceImpl.java
.../auth/service/impl/AuditorAuditedGroupRelServiceImpl.java
+15
-13
AuditorController.java
...n/java/com/gic/auth/web/controller/AuditorController.java
+5
-2
AuditorQO.java
...auth-web/src/main/java/com/gic/auth/web/qo/AuditorQO.java
+1
-1
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/AuditorAuditedGroupRelServiceImpl.java
View file @
5ef38f66
...
...
@@ -35,20 +35,22 @@ public class AuditorAuditedGroupRelServiceImpl implements AuditorAuditedGroupRel
@Override
public
void
addOrUpdateRel
(
Integer
enterpriseId
,
Integer
auditorId
,
List
<
Integer
>
auditedGroupIdList
)
{
// 把所有auditorId的关联status设置为0
tabAuditorAuditedGroupRelMapper
.
delByAuditorId
(
auditorId
);
// 插入不存在的关联
for
(
Integer
auditedGroupId
:
auditedGroupIdList
)
{
TabAuditorAuditedGroupRel
itemRel
=
new
TabAuditorAuditedGroupRel
();
itemRel
.
setEnterpriseId
(
enterpriseId
);
itemRel
.
setAuditorId
(
auditorId
);
itemRel
.
setAuditedGroupId
(
auditedGroupId
);
itemRel
.
setStatus
(
GlobalInfo
.
DATA_STATUS_NORMAL
);
itemRel
.
setCreateTime
(
new
Date
());
tabAuditorAuditedGroupRelMapper
.
insertSelectiveByNotExist
(
itemRel
);
if
(
CollectionUtils
.
isNotEmpty
(
auditedGroupIdList
))
{
// 把所有auditorId的关联status设置为0
tabAuditorAuditedGroupRelMapper
.
delByAuditorId
(
auditorId
);
// 插入不存在的关联
for
(
Integer
auditedGroupId
:
auditedGroupIdList
)
{
TabAuditorAuditedGroupRel
itemRel
=
new
TabAuditorAuditedGroupRel
();
itemRel
.
setEnterpriseId
(
enterpriseId
);
itemRel
.
setAuditorId
(
auditorId
);
itemRel
.
setAuditedGroupId
(
auditedGroupId
);
itemRel
.
setStatus
(
GlobalInfo
.
DATA_STATUS_NORMAL
);
itemRel
.
setCreateTime
(
new
Date
());
tabAuditorAuditedGroupRelMapper
.
insertSelectiveByNotExist
(
itemRel
);
}
// 把所有auditedGroup关联status都设置为1
tabAuditorAuditedGroupRelMapper
.
updateStatusByAuditedGroupIds
(
enterpriseId
,
auditorId
,
auditedGroupIdList
);
}
// 把所有auditedGroup关联status都设置为1
tabAuditorAuditedGroupRelMapper
.
updateStatusByAuditedGroupIds
(
enterpriseId
,
auditorId
,
auditedGroupIdList
);
}
@Override
...
...
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/AuditorController.java
View file @
5ef38f66
...
...
@@ -14,6 +14,7 @@ import com.gic.enterprise.dto.ProjectDTO;
import
com.gic.enterprise.service.ProjectApiService
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -47,8 +48,10 @@ public class AuditorController {
auditorDTO
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
List
<
Integer
>
projectItemList
=
Stream
.
of
(
auditorQO
.
getProjectItems
().
split
(
GlobalInfo
.
FLAG_COMMA
)).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
auditorDTO
.
setProjectItemList
(
projectItemList
);
List
<
Integer
>
auditedGroupIdList
=
Stream
.
of
(
auditorQO
.
getAuditedGroupIds
().
split
(
GlobalInfo
.
FLAG_COMMA
)).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
auditorDTO
.
setAuditedGroupIdList
(
auditedGroupIdList
);
if
(
StringUtils
.
isNotBlank
(
auditorQO
.
getAuditedGroupIds
()))
{
List
<
Integer
>
auditedGroupIdList
=
Stream
.
of
(
auditorQO
.
getAuditedGroupIds
().
split
(
GlobalInfo
.
FLAG_COMMA
)).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
auditorDTO
.
setAuditedGroupIdList
(
auditedGroupIdList
);
}
ServiceResponse
<
String
>
response
=
auditorApiService
.
saveOrUpdateAuditor
(
auditorDTO
);
if
(
response
.
isSuccess
())
{
LogUtils
.
createLog
((
auditorQO
.
getAuditorId
()
==
null
?
"新增"
:
"修改"
)
+
"审核员"
,
auditorQO
.
getAuditorName
());
...
...
gic-platform-auth-web/src/main/java/com/gic/auth/web/qo/AuditorQO.java
View file @
5ef38f66
...
...
@@ -49,7 +49,7 @@ public class AuditorQO {
/**
* 受审组id
*/
@NotBlank
(
message
=
"受审组不能为空"
,
groups
=
SaveValid
.
class
)
//
@NotBlank(message = "受审组不能为空", groups = SaveValid.class)
private
String
auditedGroupIds
;
public
Integer
getAuditorId
()
{
...
...
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