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
9e8b5712
Commit
9e8b5712
authored
Apr 17, 2020
by
huangZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
81e2e297
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
0 deletions
+62
-0
StaffController.java
...com/gic/haoban/manage/web/controller/StaffController.java
+52
-0
StaffVO.java
...b/src/main/java/com/gic/haoban/manage/web/vo/StaffVO.java
+10
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/StaffController.java
View file @
9e8b5712
...
...
@@ -12,8 +12,15 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.DepartmentService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.PageResult
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
...
...
@@ -32,6 +39,7 @@ import com.gic.haoban.manage.web.auth.AuthRequestUtil;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.qo.StaffEditJsonQO
;
import
com.gic.haoban.manage.web.vo.LoginVO
;
import
com.gic.haoban.manage.web.vo.StaffVO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
...
...
@@ -51,6 +59,10 @@ public class StaffController extends WebBaseController{
private
WxEnterpriseApiService
wxEnterpriseApiService
;
@Autowired
private
WxApplicationApiService
wxApplicationApiService
;
@Autowired
private
ClerkService
clerkService
;
@Autowired
private
StoreService
storeService
;
@RequestMapping
(
"staff-add"
)
public
HaobanResponse
staffAdd
(
StaffDTO
staffDTO
,
String
departmentIds
){
...
...
@@ -195,4 +207,44 @@ public class StaffController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
@RequestMapping
(
"get-clerk-info"
)
public
HaobanResponse
getClerkInfo
(
String
clerkId
){
StaffVO
staffVO
=
new
StaffVO
();
ClerkDTO
clerk
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
clerk
!=
null
)
{
String
storeId
=
clerk
.
getStoreId
();
StoreDTO
storeDTO
=
storeService
.
getStore
(
storeId
);
staffVO
.
setStaffName
(
clerk
.
getClerkName
());
staffVO
.
setNationCode
(
clerk
.
getNationcode
());
staffVO
.
setPhoneNumber
(
clerk
.
getPhoneNumber
());
staffVO
.
setPostion
(
clerk
.
getPositionName
());
staffVO
.
setHeadImg
(
clerk
.
getHeadImgUrl
());
staffVO
.
setDepartmentName
(
storeDTO
==
null
?
""
:
storeDTO
.
getStoreName
());
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
staffVO
);
}
@RequestMapping
(
"get-staff-info"
)
public
HaobanResponse
getStaffInfo
(
String
staffId
){
StaffVO
staffVO
=
new
StaffVO
();
StaffDTO
staff
=
staffApiService
.
selectById
(
staffId
);
if
(
staff
!=
null
)
{
List
<
StaffDepartmentRelatedDTO
>
list
=
staffDepartmentRelatedApiService
.
listByStaffId
(
staffId
);
staffVO
.
setStaffName
(
staff
.
getStaffName
());
staffVO
.
setNationCode
(
staff
.
getNationCode
());
staffVO
.
setPhoneNumber
(
staff
.
getPhoneNumber
());
staffVO
.
setPostion
(
staff
.
getPostion
());
staffVO
.
setHeadImg
(
staff
.
getHeadImg
());
if
(
CollectionUtil
.
isNotEmpty
(
list
)){
String
departmentId
=
list
.
get
(
0
).
getDepartmentId
();
DepartmentDTO
departmentDTO
=
departmentApiService
.
selectById
(
departmentId
);
if
(
departmentDTO
!=
null
){
staffVO
.
setDepartmentName
(
departmentDTO
.
getDepartmentName
());
}
}
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
staffVO
);
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/StaffVO.java
View file @
9e8b5712
...
...
@@ -21,6 +21,16 @@ public class StaffVO implements Serializable{
private
String
departmentName
;
private
String
headImg
;
public
String
getHeadImg
()
{
return
headImg
;
}
public
void
setHeadImg
(
String
headImg
)
{
this
.
headImg
=
headImg
;
}
public
String
getStaffName
()
{
return
staffName
;
}
...
...
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