Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
811c6fb6
Commit
811c6fb6
authored
Feb 26, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
20295831
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
DepartmentContoller.java
...gic/haoban/manage/web/controller/DepartmentContoller.java
+20
-2
DepartmentAddQO.java
...in/java/com/gic/haoban/manage/web/qo/DepartmentAddQO.java
+10
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/DepartmentContoller.java
View file @
811c6fb6
...
...
@@ -198,6 +198,11 @@ public class DepartmentContoller extends WebBaseController{
if
(
dto
.
getIsStore
()
==
1
)
{
continue
;
}
Integer
type
=
departmentAddQO
.
getType
();
Integer
isStore
=
0
;
if
(
type
!=
null
&&
type
==
3
){
isStore
=
1
;
}
DepartmentDTO
department
=
new
DepartmentDTO
();
department
.
setParentDepartmentId
(
parentId
);
//department.setWxDepartmentId(dto.getWxDepartmentId());
...
...
@@ -205,7 +210,11 @@ public class DepartmentContoller extends WebBaseController{
department
.
setDepartmentName
(
departmentAddQO
.
getDepartmentName
());
department
.
setChainId
(
dto
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
dto
.
getDepartmentId
());
department
.
setChainName
(
dto
.
getChainName
()
+
Constant
.
NAME_SEPARATOR
+
dto
.
getDepartmentName
());
department
.
setIsStore
(
departmentAddQO
.
getStoreFlag
());
if
(
departmentAddQO
.
getStoreFlag
()
!=
null
){
department
.
setIsStore
(
departmentAddQO
.
getStoreFlag
());
}
else
{
department
.
setIsStore
(
isStore
);
}
department
.
setSort
(
departmentAddQO
.
getSort
());
department
.
setLevel
(
dto
.
getLevel
()
+
1
);
department
.
setRelatedId
(
departmentAddQO
.
getRelatedId
());
...
...
@@ -351,7 +360,11 @@ public class DepartmentContoller extends WebBaseController{
if
(
StringUtils
.
isNotBlank
(
sonDepartment
))
{
List
<
DepartmentAddQO
>
list
=
JSONArray
.
parseArray
(
sonDepartment
,
DepartmentAddQO
.
class
);
for
(
DepartmentAddQO
departmentAddQO
:
list
)
{
Integer
type
=
departmentAddQO
.
getType
();
Integer
isStore
=
0
;
if
(
type
!=
null
&&
type
==
3
){
isStore
=
1
;
}
String
sonParentId
=
""
;
DepartmentDTO
dto
=
departmentApiService
.
selectById
(
parentId
);
if
(
dto
==
null
||
dto
.
getStatusFlag
()
==
0
)
{
...
...
@@ -373,6 +386,11 @@ public class DepartmentContoller extends WebBaseController{
department
.
setSort
(
departmentAddQO
.
getSort
());
department
.
setIsStore
(
departmentAddQO
.
getStoreFlag
());
department
.
setLevel
(
dto
.
getLevel
()
+
1
);
if
(
departmentAddQO
.
getStoreFlag
()
!=
null
){
department
.
setIsStore
(
departmentAddQO
.
getStoreFlag
());
}
else
{
department
.
setIsStore
(
isStore
);
}
department
.
setRelatedId
(
departmentAddQO
.
getRelatedId
());
HaobanResponse
hr
=
departmentApiService
.
add
(
department
);
if
(
hr
.
getErrorCode
()
!=
1
)
{
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/qo/DepartmentAddQO.java
View file @
811c6fb6
...
...
@@ -21,6 +21,8 @@ public class DepartmentAddQO implements Serializable {
private
Boolean
addFlag
;
private
Integer
sort
;
private
Integer
type
;
public
String
getDepartmentName
()
{
return
departmentName
;
...
...
@@ -96,6 +98,14 @@ public class DepartmentAddQO implements Serializable {
public
void
setAddFlag
(
Boolean
addFlag
)
{
this
.
addFlag
=
addFlag
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
...
...
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