Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
a6be62e5
Commit
a6be62e5
authored
May 13, 2020
by
tangzhaoqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审批组、自定义审批 重名约束
parent
592b1ce7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+9
-7
No files found.
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
a6be62e5
...
...
@@ -116,7 +116,7 @@ public class SpmkController {
@ApiOperationSupport
(
order
=
1
)
public
Result
<
Object
>
saveAtg
(
@RequestBody
SpmkApprovalTemplateG
spmkApprovalTemplateG
){
if
(
spmkApprovalTemplateG
.
selectCount
(
Wrappers
.
lambdaQuery
(
spmkApprovalTemplateG
)
if
(
spmkApprovalTemplateG
.
selectCount
(
new
QueryWrapper
<
SpmkApprovalTemplateG
>().
lambda
(
)
.
eq
(
SpmkApprovalTemplateG:
:
getName
,
spmkApprovalTemplateG
.
getName
()))
>
0
)
{
return
ResultUtil
.
error
(
"审批模板组名重复!"
);
}
...
...
@@ -186,7 +186,7 @@ public class SpmkController {
at
.
setFroms
(
ObjectUtil
.
serialize
((
List
<
JSONObject
>)
spmkApprovalTemplateDto
.
getFroms
()));
at
.
setRouter
(
ObjectUtil
.
serialize
(
spmkApprovalTemplateDto
.
getRouter
()));
if
(
at
.
selectCount
(
Wrappers
.
lambdaQuery
(
at
)
if
(
at
.
selectCount
(
new
QueryWrapper
<
SpmkApprovalTemplate
>().
lambda
(
)
.
eq
(
SpmkApprovalTemplate:
:
getName
,
at
.
getName
()))
>
0
)
{
return
ResultUtil
.
error
(
"审批模板名重复!"
);
}
...
...
@@ -253,8 +253,9 @@ public class SpmkController {
@ApiOperationSupport
(
order
=
9
)
public
Result
<
Object
>
saveAg
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SpmkApprovalG
spmkApprovalG
){
if
(
spmkApprovalG
.
selectCount
(
Wrappers
.
lambdaQuery
(
spmkApprovalG
)
.
eq
(
SpmkApprovalG:
:
getName
,
spmkApprovalG
.
getName
()))
>
0
)
{
if
(
spmkApprovalG
.
selectCount
(
new
QueryWrapper
<
SpmkApprovalG
>().
lambda
()
.
eq
(
SpmkApprovalG:
:
getName
,
spmkApprovalG
.
getName
())
.
eq
(
SpmkApprovalG:
:
getOrgCode
,
userBean
.
getOrgCode
()))
>
0
)
{
return
ResultUtil
.
error
(
"审批组名重复!"
);
}
...
...
@@ -325,7 +326,7 @@ public class SpmkController {
@ApiOperation
(
value
=
"13.新增或编辑-自定义审批"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-自定义审批"
)
@ApiOperationSupport
(
order
=
13
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
<
Object
>
saveCa
(
@RequestBody
SpmkCustomApprovalDto
spmkCustomApprovalDto
)
throws
Exception
{
public
Result
<
Object
>
saveCa
(
@
CurrentUser
UserBean
userBean
,
@
RequestBody
SpmkCustomApprovalDto
spmkCustomApprovalDto
)
throws
Exception
{
Integer
approvalGId
=
spmkCustomApprovalDto
.
getApprovalGId
();
if
(
ObjectUtil
.
isNull
(
approvalGId
))
return
ResultUtil
.
error
(
"操作失败!-1"
);
...
...
@@ -334,8 +335,9 @@ public class SpmkController {
BeanUtil
.
copyProperties
(
spmkCustomApprovalDto
,
ca
,
"froms"
,
"router"
,
"initiatorConfigs"
);
if
(
ca
.
selectCount
(
Wrappers
.
lambdaQuery
(
ca
)
.
eq
(
SpmkCustomApproval:
:
getName
,
ca
.
getName
()))
>
0
)
{
if
(
ca
.
selectCount
(
new
QueryWrapper
<
SpmkCustomApproval
>().
lambda
()
.
eq
(
SpmkCustomApproval:
:
getName
,
ca
.
getName
())
.
eq
(
SpmkCustomApproval:
:
getOrgCode
,
userBean
.
getOrgCode
()))
>
0
)
{
return
ResultUtil
.
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