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
QianQiXiang
haoban-manage3.0
Commits
965c095c
Commit
965c095c
authored
Mar 02, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
6fac16f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletions
+36
-1
DepartmentDTO.java
...ain/java/com/gic/haoban/manage/api/dto/DepartmentDTO.java
+10
-0
DepartmentContoller.java
...gic/haoban/manage/web/controller/DepartmentContoller.java
+26
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/DepartmentDTO.java
View file @
965c095c
...
...
@@ -44,6 +44,8 @@ public class DepartmentDTO implements Serializable {
private
Integer
bindFlag
;
private
String
relatedCode
;
private
String
gicEnterpriseName
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -206,6 +208,14 @@ public class DepartmentDTO implements Serializable {
public
void
setRelatedCode
(
String
relatedCode
)
{
this
.
relatedCode
=
relatedCode
;
}
public
String
getGicEnterpriseName
()
{
return
gicEnterpriseName
;
}
public
void
setGicEnterpriseName
(
String
gicEnterpriseName
)
{
this
.
gicEnterpriseName
=
gicEnterpriseName
;
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/DepartmentContoller.java
View file @
965c095c
...
...
@@ -16,8 +16,11 @@ import org.springframework.web.bind.annotation.RestController;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.gic.api.base.commons.Page
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.GicTreeDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreGroupDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.StoreGroupService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
...
...
@@ -52,6 +55,9 @@ public class DepartmentContoller extends WebBaseController{
private
StoreService
storeService
;
@Autowired
private
StaffApiService
staffApiService
;
@Autowired
private
EnterpriseService
enterpriseService
;
@RequestMapping
(
"department-list"
)
public
HaobanResponse
departmentList
(
String
parentId
,
BasePageInfo
pageInfo
,
String
keyWord
)
{
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getSessionUser
();
...
...
@@ -102,9 +108,28 @@ public class DepartmentContoller extends WebBaseController{
list
.
add
(
dto
);
}
for
(
DepartmentDTO
departmentDTO
:
list
)
{
if
(
StringUtils
.
isBlank
(
departmentDTO
.
getRelatedId
())){
String
relatedId
=
departmentDTO
.
getRelatedId
();
if
(
StringUtils
.
isBlank
(
relatedId
)){
departmentDTO
.
setBindFlag
(
0
);
}
else
{
String
gicEnterpriseName
=
""
;
String
gicEnterpriseId
=
""
;
if
(
departmentDTO
.
getIsStore
()
==
1
){
StoreDTO
store
=
storeService
.
getStore
(
relatedId
);
if
(
store
!=
null
){
gicEnterpriseId
=
store
.
getEnterpriseId
();
}
}
else
{
StoreGroupDTO
department
=
storeGroupService
.
getStoreGroupById
(
relatedId
);
if
(
department
!=
null
){
gicEnterpriseId
=
department
.
getEnterpriseId
();
}
}
EnterpriseDTO
enterprise
=
enterpriseService
.
getEnterpriseById
(
gicEnterpriseId
);
if
(
enterprise
!=
null
){
gicEnterpriseName
=
enterprise
.
getEnterpriseName
();
}
departmentDTO
.
setGicEnterpriseName
(
gicEnterpriseName
);
departmentDTO
.
setBindFlag
(
1
);
}
}
...
...
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