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
36fc2579
Commit
36fc2579
authored
Oct 08, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-haoban-role' into developer
parents
a7a1ffef
5bd9f51c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
104 additions
and
45 deletions
+104
-45
HaobanMenuApiService.java
.../haoban/manage/api/service/role/HaobanMenuApiService.java
+2
-2
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+11
-3
HaobanMenuApiServiceImpl.java
...rvice/service/out/impl/role/HaobanMenuApiServiceImpl.java
+7
-5
HaobanRoleController.java
...ic/haoban/manage/web/controller/HaobanRoleController.java
+4
-4
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+80
-31
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/role/HaobanMenuApiService.java
View file @
36fc2579
...
...
@@ -15,10 +15,10 @@ public interface HaobanMenuApiService {
/**
* 添加
*
* @param haobanMenuDTO haoban菜单dto
* @param haobanMenuDTO
List
haoban菜单dto
* @return {@link ServiceResponse}
*/
ServiceResponse
add
(
HaobanMenuQDTO
haobanMenuDTO
);
ServiceResponse
add
(
List
<
HaobanMenuQDTO
>
haobanMenuDTOList
);
ServiceResponse
addList
(
List
<
HaobanMenuQDTO
>
haobanMenuDTOList
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
36fc2579
...
...
@@ -286,7 +286,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
private
ServiceResponse
getManageFlagBind
(
StaffClerkRelationDTO
staffClerkRelation
)
{
boolean
bindFlag
=
staffClerkRelationService
.
getBindByStaffIdAndEnterpriseId
(
staffClerkRelation
.
get
Wx
EnterpriseId
(),
staffClerkRelation
.
getStaffId
());
boolean
bindFlag
=
staffClerkRelationService
.
getBindByStaffIdAndEnterpriseId
(
staffClerkRelation
.
getEnterpriseId
(),
staffClerkRelation
.
getStaffId
());
if
(
bindFlag
)
{
return
ServiceResponse
.
failure
(
"3"
,
"该员工已经绑定,不允许绑定区经/督导"
);
}
...
...
@@ -470,8 +470,12 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
else
if
(
type
==
3
)
{
//店长任务重新分配
Integer
clerkType
=
clerkDTO
.
getClerkType
();
if
(
clerkType
==
null
)
{
logger
.
error
(
"导购类型为空:{}"
,
clerkId
);
return
;
}
logger
.
info
(
"店长任务重新分配,clerkId:{},clerkType:{}"
,
clerkId
,
clerkType
);
if
(
clerkType
!=
null
&&
clerkType
==
1
)
{
if
(
clerkType
==
1
)
{
//发消息处理新增店长,任务重新分配问题
try
{
logger
.
info
(
"待分配任务重分配======>{}"
,
clerkId
);
...
...
@@ -485,8 +489,12 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
catch
(
Exception
e
)
{
logger
.
error
(
"任务重新分配问题发送消息队列出错"
,
e
);
}
}
hmQrcodeService
.
updateClerkNameByClerkId
(
enterpriseId
,
clerkId
,
clerkDTO
.
getClerkName
(),
clerkDTO
.
getClerkCode
());
}
else
if
(
clerkType
==
2
)
{
logger
.
info
(
"区经变更为导购,解绑:{}"
,
clerkId
);
//解绑
staffClerkRelationService
.
delBind
(
clerkId
,
"-1"
,
ChannelCodeEnum
.
GIC_CLERK_DEL_UNBIND
.
getCode
());
}
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/role/HaobanMenuApiServiceImpl.java
View file @
36fc2579
...
...
@@ -21,13 +21,15 @@ public class HaobanMenuApiServiceImpl implements HaobanMenuApiService {
@Override
public
ServiceResponse
add
(
HaobanMenuQDTO
haobanMenuDTO
)
{
TabHaobanMenu
tabHaobanMenu
=
haobanMenuService
.
queryById
(
haobanMenuDTO
.
getMenuCode
());
public
ServiceResponse
add
(
List
<
HaobanMenuQDTO
>
haobanMenuDTOList
)
{
for
(
HaobanMenuQDTO
haobanMenuQDTO
:
haobanMenuDTOList
)
{
TabHaobanMenu
tabHaobanMenu
=
haobanMenuService
.
queryById
(
haobanMenuQDTO
.
getMenuCode
());
if
(
tabHaobanMenu
!=
null
)
{
haobanMenuService
.
update
(
EntityUtil
.
changeEntityNew
(
TabHaobanMenu
.
class
,
haobanMenuDTO
));
return
ServiceResponse
.
success
();
haobanMenuService
.
update
(
EntityUtil
.
changeEntityNew
(
TabHaobanMenu
.
class
,
haobanMenuQDTO
));
continue
;
}
haobanMenuService
.
insert
(
EntityUtil
.
changeEntityNew
(
TabHaobanMenu
.
class
,
haobanMenuQDTO
));
}
haobanMenuService
.
insert
(
EntityUtil
.
changeEntityNew
(
TabHaobanMenu
.
class
,
haobanMenuDTO
));
return
ServiceResponse
.
success
();
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/HaobanRoleController.java
View file @
36fc2579
...
...
@@ -167,17 +167,17 @@ public class HaobanRoleController extends WebBaseController {
/**
* 新增单个菜单
* @param haobanMenuQDTO
* @param haobanMenuQDTO
List
* @return
*/
@RequestMapping
(
value
=
"/add-menuCode"
,
method
=
RequestMethod
.
POST
)
@IgnoreLogin
@com
.
gic
.
web
.
common
.
ano
.
IgnoreLogin
public
RestResponse
addMenu
(
@RequestBody
HaobanMenuQDTO
haobanMenuQDTO
)
{
if
(
haobanMenuQDTO
==
null
)
{
public
RestResponse
addMenu
(
@RequestBody
List
<
HaobanMenuQDTO
>
haobanMenuQDTOList
)
{
if
(
CollectionUtils
.
isEmpty
(
haobanMenuQDTOList
)
)
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_2
.
getCode
()),
HaoBanErrCode
.
ERR_2
.
getMsg
());
}
haobanMenuApiService
.
add
(
haobanMenuQDTO
);
haobanMenuApiService
.
add
(
haobanMenuQDTO
List
);
return
RestResponse
.
successResult
();
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
36fc2579
...
...
@@ -144,9 +144,18 @@ public class ClerkController extends WebBaseController {
}
//门店成员列表
/**
* 门店成员列表
*
* @param basePageInfo
* @param clerkId
* @param enterpriseId
* @param storeId
* @param manageFlag
* @return
*/
@RequestMapping
(
"/store-clerks"
)
public
HaobanResponse
storeClerks
(
BasePageInfo
basePageInfo
,
String
clerkId
,
String
enterpriseId
,
String
storeId
,
Integer
manageFlag
)
{
public
HaobanResponse
storeClerks
(
BasePageInfo
basePageInfo
,
String
clerkId
,
String
enterpriseId
,
String
storeId
,
Integer
manageFlag
)
{
WellDoneLoginDTO
loginUser
=
this
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
List
<
String
>
storeIds
=
new
ArrayList
<>();
...
...
@@ -188,9 +197,12 @@ public class ClerkController extends WebBaseController {
}
resultList
.
add
(
vo
);
}
Map
<
String
,
Object
>
ret
=
new
HashMap
<>();
ret
.
put
(
"clerkList"
,
resultList
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
ret
);
Page
<
StoreClerkVO
>
page
=
new
Page
();
page
.
setCurrentPage
(
clerkDTOPage
.
getCurrentPage
());
page
.
setPageSize
(
clerkDTOPage
.
getPageSize
());
page
.
setTotalCount
(
clerkDTOPage
.
getTotalCount
());
page
.
setResult
(
resultList
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
page
);
}
//门店成员列表
...
...
@@ -777,6 +789,8 @@ public class ClerkController extends WebBaseController {
}
/**
* 未绑定导购列表
*
* @param enterpriseIdList
* @param storeIdList
* @param staffId
...
...
@@ -820,7 +834,15 @@ public class ClerkController extends WebBaseController {
Collectors
.
collectingAndThen
(
Collectors
.
toCollection
(()
->
new
TreeSet
<>(
Comparator
.
comparing
(
n
->
n
.
getClerkId
()))),
ArrayList:
:
new
));
}
//绑定
/**
* 绑定好办
*
* @param clerkId
* @param staffId
* @param auditType
* @param manageFlag
* @return
*/
@HttpLimit
@RequestMapping
(
"bind-staff"
)
public
HaobanResponse
bindStaff
(
String
clerkId
,
String
staffId
,
Integer
auditType
,
Integer
manageFlag
)
{
...
...
@@ -973,27 +995,16 @@ public class ClerkController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
//门店导购列表
/**
* 门店导购列表
*
* @param storeId
* @param enterpriseId
* @return
*/
@RequestMapping
(
"store-clerk-list"
)
public
HaobanResponse
storeClerkList
(
String
storeId
,
String
enterpriseId
,
Integer
manageFlag
,
String
clerkId
,
BasePageInfo
basePageInfo
)
{
WellDoneLoginDTO
loginUser
=
this
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
List
<
String
>
storeIds
=
new
ArrayList
<>();
if
(
manageFlag
!=
null
&&
manageFlag
==
1
)
{
List
<
String
>
roleStoreIds
=
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
);
storeIds
.
addAll
(
roleStoreIds
);
}
else
{
storeIds
.
add
(
storeId
);
}
if
(
CollectionUtils
.
isEmpty
(
storeIds
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10009
);
}
if
(
storeIds
.
contains
(
"-1"
))
{
storeIds
=
null
;
}
Page
<
ClerkDTO
>
clerkDTOPage
=
clerkService
.
pageClerkByNameOrCode
(
enterpriseId
,
null
,
storeIds
,
basePageInfo
.
getPageNum
(),
basePageInfo
.
getPageSize
());
List
<
ClerkDTO
>
list
=
clerkDTOPage
.
getResult
();
public
HaobanResponse
storeClerkList
(
String
storeId
,
String
enterpriseId
)
{
List
<
ClerkDTO
>
list
=
clerkService
.
listClerkByNameOrCode
(
enterpriseId
,
null
,
Collections
.
singletonList
(
storeId
));
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10016
);
}
...
...
@@ -1020,10 +1031,45 @@ public class ClerkController extends WebBaseController {
map
.
put
(
"bindList"
,
bindList
);
map
.
put
(
"unBindList"
,
unBindList
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
map
);
}
/**
* 查询区经列表
* @param enterpriseId
* @return
*/
@RequestMapping
(
"clerk-manage-list"
)
public
RestResponse
<
List
<
BindClerkVO
>>
clerkManageList
(
String
enterpriseId
)
{
List
<
ClerkDTO
>
list
=
clerkService
.
listClerkEnableHaoban
(
Collections
.
singletonList
(
enterpriseId
),
null
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_10016
.
getCode
()),
HaoBanErrCode
.
ERR_10016
.
getMsg
());
}
Set
<
String
>
clerkCodeList
=
list
.
stream
().
map
(
ClerkDTO:
:
getClerkCode
).
collect
(
Collectors
.
toSet
());
List
<
StaffClerkRelationDTO
>
bindRelationList
=
staffClerkRelationApiService
.
listBindCode
(
enterpriseId
,
clerkCodeList
);
Map
<
String
,
StaffClerkRelationDTO
>
bindCodeMap
=
bindRelationList
.
stream
().
collect
(
Collectors
.
toMap
(
StaffClerkRelationDTO:
:
getClerkCode
,
s
->
s
));
List
<
BindClerkVO
>
bindList
=
new
ArrayList
<>();
for
(
ClerkDTO
dto
:
list
)
{
BindClerkVO
vo
=
EntityUtil
.
changeEntityByJSON
(
BindClerkVO
.
class
,
dto
);
if
(
bindCodeMap
.
containsKey
(
dto
.
getClerkCode
()))
{
String
staffId
=
bindCodeMap
.
get
(
dto
.
getClerkCode
()).
getStaffId
();
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
staffId
);
vo
.
setStaffId
(
staffId
);
vo
.
setNationCode
(
dto
.
getNationcode
());
vo
.
setPhoneNumber
(
dto
.
getPhoneNumber
());
vo
.
setStaffName
(
staffDTO
==
null
?
""
:
staffDTO
.
getStaffName
());
bindList
.
add
(
vo
);
}
}
return
RestResponse
.
successResult
(
bindList
);
}
//门店列表
/**
* 门店列表
*
* @param staffId
* @param wxEnterpriseId
* @return
*/
@RequestMapping
(
"staff-store-list"
)
public
HaobanResponse
staffStoreList
(
String
staffId
,
String
wxEnterpriseId
)
{
if
(
StringUtils
.
isAnyBlank
(
staffId
,
wxEnterpriseId
))
{
...
...
@@ -1068,14 +1114,18 @@ public class ClerkController extends WebBaseController {
}
//刷新导购信息
/**
* 刷新导购信息
*
* @param clerkId
* @return
*/
@RequestMapping
(
"/fresh-clerk-info"
)
public
HaobanResponse
freshClerkInfo
(
String
clerkId
,
String
wxEnterpriseId
)
{
public
HaobanResponse
freshClerkInfo
(
String
clerkId
)
{
StaffClerkRelationDTO
staffRelation
=
staffClerkRelationApiService
.
getByClerkId
(
clerkId
);
if
(
staffRelation
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10006
);
}
// staffApiService.wxGetAdd(staffRelation.getWxUserId(), wxEnterpriseId);
String
staffId
=
staffRelation
.
getStaffId
();
StaffDTO
staff
=
staffApiService
.
selectById
(
staffId
);
if
(
staff
==
null
)
{
...
...
@@ -1110,7 +1160,6 @@ public class ClerkController extends WebBaseController {
clerk
.
setClerkGender
(
sex
.
toString
());
}
clerkService
.
updateClerk
(
clerk
);
return
resultResponse
(
HaoBanErrCode
.
ERR_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