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
7c6a13b9
Commit
7c6a13b9
authored
Feb 15, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部门调整
parent
8248b4d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
18 deletions
+12
-18
DepartmentContoller.java
...gic/haoban/manage/web/controller/DepartmentContoller.java
+11
-18
dubbo-haoban-manage-web.xml
...3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
+1
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/DepartmentContoller.java
View file @
7c6a13b9
...
...
@@ -10,8 +10,10 @@ import org.springframework.web.bind.annotation.RestController;
import
com.alibaba.fastjson.JSONArray
;
import
com.gic.api.base.commons.Page
;
import
com.gic.enterprise.api.dto.GicTreeDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.DepartmentService
;
import
com.gic.enterprise.api.service.StoreGroupService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.Constant
;
...
...
@@ -34,6 +36,9 @@ public class DepartmentContoller extends WebBaseController{
@Autowired
private
StoreService
storeService
;
@Autowired
private
StoreGroupService
storeGroupService
;
@RequestMapping
(
"department-list"
)
public
HaobanResponse
departmentList
(
String
parentId
)
{
List
<
DepartmentDTO
>
list
=
departmentApiService
.
listByParentId
(
parentId
);
...
...
@@ -183,32 +188,20 @@ public class DepartmentContoller extends WebBaseController{
public
HaobanResponse
unbindDepartmentList
(
String
departmentId
,
String
enterpriseId
)
{
List
<
String
>
list
=
new
ArrayList
<
String
>();
list
.
add
(
departmentId
);
List
<
com
.
gic
.
enterprise
.
api
.
dto
.
DepartmentDTO
>
departmentList
=
departmentService
.
getDeptmentByPids
(
list
);
List
<
StoreDTO
>
storeList
=
storeService
.
listStoreByStoreGroupId
(
departmentId
);
List
<
GicTreeDTO
>
departmentList
=
storeGroupService
.
listGicTree
(
enterpriseId
,
null
,
departmentId
);
List
<
DepartmentDTO
>
dtoList
=
new
ArrayList
<
DepartmentDTO
>();
for
(
com
.
gic
.
enterprise
.
api
.
dto
.
Department
DTO
departmentDTO
:
departmentList
)
{
DepartmentDTO
dto
=
departmentApiService
.
selectByRelatedId
(
departmentDTO
.
get
Depart
Id
());
for
(
GicTree
DTO
departmentDTO
:
departmentList
)
{
DepartmentDTO
dto
=
departmentApiService
.
selectByRelatedId
(
departmentDTO
.
getId
());
if
(
dto
==
null
)
{
DepartmentDTO
unBindDTO
=
new
DepartmentDTO
();
unBindDTO
.
setRelatedId
(
departmentDTO
.
get
Depart
Id
());
unBindDTO
.
setIsStore
(
0
);
unBindDTO
.
setDepartmentName
(
departmentDTO
.
get
Depart
Name
());
unBindDTO
.
setRelatedId
(
departmentDTO
.
getId
());
unBindDTO
.
setIsStore
(
departmentDTO
.
getType
()
);
unBindDTO
.
setDepartmentName
(
departmentDTO
.
getName
());
dtoList
.
add
(
unBindDTO
);
}
}
for
(
StoreDTO
storeDTO
:
storeList
)
{
DepartmentDTO
dto
=
departmentApiService
.
selectByRelatedId
(
storeDTO
.
getStoreId
());
if
(
dto
==
null
)
{
DepartmentDTO
unBindDTO
=
new
DepartmentDTO
();
unBindDTO
.
setRelatedId
(
storeDTO
.
getStoreId
());
unBindDTO
.
setIsStore
(
0
);
unBindDTO
.
setDepartmentName
(
storeDTO
.
getStoreName
());
dtoList
.
add
(
unBindDTO
);
}
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
dtoList
);
}
...
...
haoban-manage3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
View file @
7c6a13b9
...
...
@@ -28,4 +28,5 @@
<dubbo:reference
interface=
"com.gic.enterprise.api.service.StoreService"
id=
"storeService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.DepartmentService"
id=
"departmentService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.DepartmentApiService"
id=
"departmentApiService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.StoreGroupService"
id=
"storeGroupService"
/>
</beans>
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