Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
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
liqin
chnmuseum-party
Commits
2143a69a
Commit
2143a69a
authored
Apr 26, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://111.203.232.171:8888/lee/chnmuseum-party
into dev
parents
300a9409
239b0400
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
TOrganController.java
...a/cn/chnmuseum/party/web/controller/TOrganController.java
+13
-4
No files found.
src/main/java/cn/chnmuseum/party/web/controller/TOrganController.java
View file @
2143a69a
...
...
@@ -27,7 +27,10 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* <pre>
...
...
@@ -56,7 +59,7 @@ public class TOrganController extends BaseController {
public
Map
<
String
,
Object
>
add
(
TOrgan
organ
)
{
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
QueryWrapper
<
TOrgan
>
ew
=
new
QueryWrapper
<>();
if
(
StringUtils
.
isBlank
(
organ
.
getParentId
())){
if
(
StringUtils
.
isBlank
(
organ
.
getParentId
()))
{
organ
.
setParentId
(
"0"
);
}
if
(
StringUtils
.
isNoneBlank
(
organ
.
getName
().
trim
()))
{
...
...
@@ -64,12 +67,12 @@ public class TOrganController extends BaseController {
ew
.
eq
(
"is_deleted"
,
0
);
ew
.
eq
(
"name"
,
organ
.
getName
());
List
<
TOrgan
>
list
=
this
.
tOrganService
.
list
(
ew
);
if
(
list
!=
null
&&
list
.
size
()
>
0
&&
list
.
get
(
0
)!=
null
)
{
if
(
list
!=
null
&&
list
.
size
()
>
0
&&
list
.
get
(
0
)
!=
null
)
{
resultMap
.
put
(
"resultCode"
,
"400"
);
resultMap
.
put
(
"message"
,
"机构名称不能重复!"
);
return
resultMap
;
}
}
else
{
}
else
{
resultMap
.
put
(
"resultCode"
,
"400"
);
resultMap
.
put
(
"message"
,
"机构名称不能为空!"
);
return
resultMap
;
...
...
@@ -102,6 +105,12 @@ public class TOrganController extends BaseController {
@MethodLog
(
operModule
=
OperModule
.
ORG
,
operType
=
OperType
.
UPDATE
)
public
Map
<
String
,
Object
>
updateTOrgan
(
TOrgan
tOrgan
)
{
try
{
if
(
tOrgan
.
getParentId
()
!=
null
&&
tOrgan
.
getId
()
!=
null
&&
tOrgan
.
getId
().
equals
(
tOrgan
.
getParentId
()))
{
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>(
2
);
resultMap
.
put
(
"resultCode"
,
"400"
);
resultMap
.
put
(
"message"
,
"父级机构不能是自己!"
);
return
resultMap
;
}
if
(
StringUtils
.
isBlank
(
tOrgan
.
getName
().
trim
()))
{
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"resultCode"
,
"400"
);
...
...
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