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
8d54989a
Commit
8d54989a
authored
Jun 02, 2020
by
huangZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
7b948e96
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
46 deletions
+38
-46
StaffClerkRelationApiService.java
...oban/manage/api/service/StaffClerkRelationApiService.java
+6
-0
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+3
-0
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+9
-0
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+11
-0
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+9
-46
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffClerkRelationApiService.java
View file @
8d54989a
...
@@ -41,5 +41,11 @@ public interface StaffClerkRelationApiService {
...
@@ -41,5 +41,11 @@ public interface StaffClerkRelationApiService {
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
List
<
String
>
clerkIds
);
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
List
<
String
>
clerkIds
);
/**
* 导购列表
* @param storeId
* @return
*/
List
<
StaffClerkRelationDTO
>
listByStoreId
(
String
storeId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
View file @
8d54989a
...
@@ -57,4 +57,6 @@ public interface TabHaobanStaffClerkRelationMapper {
...
@@ -57,4 +57,6 @@ public interface TabHaobanStaffClerkRelationMapper {
List
<
TabHaobanStaffClerkRelation
>
listByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
);
List
<
TabHaobanStaffClerkRelation
>
listByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
);
List
<
TabHaobanStaffClerkRelation
>
listByStoreId
(
@Param
(
"storeId"
)
String
storeId
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
8d54989a
...
@@ -136,4 +136,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -136,4 +136,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
List
<
StaffClerkRelationDTO
>
result
=
EntityUtil
.
changeEntityListByJSON
(
StaffClerkRelationDTO
.
class
,
list
);
List
<
StaffClerkRelationDTO
>
result
=
EntityUtil
.
changeEntityListByJSON
(
StaffClerkRelationDTO
.
class
,
list
);
return
result
;
return
result
;
}
}
@Override
public
List
<
StaffClerkRelationDTO
>
listByStoreId
(
String
storeId
)
{
List
<
TabHaobanStaffClerkRelation
>
list
=
tabHaobanStaffClerkRelationMapper
.
listByStoreId
(
storeId
);
if
(
CollectionUtil
.
isEmpty
(
list
)){
return
new
ArrayList
<
StaffClerkRelationDTO
>();
}
List
<
StaffClerkRelationDTO
>
result
=
EntityUtil
.
changeEntityListByJSON
(
StaffClerkRelationDTO
.
class
,
list
);
return
result
;
}
}
}
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
8d54989a
...
@@ -252,4 +252,14 @@
...
@@ -252,4 +252,14 @@
</foreach>
</foreach>
</select>
</select>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_clerk_relation
where status_flag=1
and store_id = #{storeId,jdbcType=VARCHAR}
</select>
</mapper>
</mapper>
\ No newline at end of file
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
8d54989a
...
@@ -171,71 +171,34 @@ public class ClerkController extends WebBaseController{
...
@@ -171,71 +171,34 @@ public class ClerkController extends WebBaseController{
}
}
//选择成员列表
//选择成员列表
@RequestMapping
(
"/staff-list"
)
@RequestMapping
(
"/staff-list"
)
public
HaobanResponse
staffList
(
String
department
Id
)
{
public
HaobanResponse
staffList
(
String
store
Id
)
{
if
(
StringUtils
.
isAnyBlank
(
department
Id
)){
if
(
StringUtils
.
isAnyBlank
(
store
Id
)){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
}
List
<
StaffDepartmentRelatedDTO
>
list
=
staffDepartmentRelatedApiService
.
listByDepartmentId
(
departmentId
);
List
<
StaffClerkRelationDTO
>
list
=
staffClerkRelationApiService
.
listByStoreId
(
storeId
);
Map
<
String
,
StaffDepartmentRelatedDTO
>
relatedMap
=
com
.
gic
.
commons
.
util
.
CollectionUtil
.
toMap
(
list
,
"staffId"
);
List
<
String
>
staffIds
=
list
.
stream
().
map
(
s
->
s
.
getStaffId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
staffIds
=
list
.
stream
().
map
(
s
->
s
.
getStaffId
()).
collect
(
Collectors
.
toList
());
List
<
StaffDTO
>
resultlist
=
staffApiService
.
listByIds
(
staffIds
);
List
<
StaffDTO
>
resultlist
=
staffApiService
.
listByIds
(
staffIds
);
DepartmentDTO
departmentDTO
=
departmentApiService
.
selectById
(
departmentId
);
Map
<
String
,
StaffClerkRelationDTO
>
map
=
com
.
gic
.
commons
.
util
.
CollectionUtil
.
toMap
(
list
,
"staffId"
);
String
storeId
=
departmentDTO
.
getRelatedId
();
int
size
=
0
;
int
size
=
0
;
if
(
resultlist
!=
null
){
if
(
resultlist
!=
null
){
size
=
resultlist
.
size
();
size
=
resultlist
.
size
();
}
}
for
(
StaffDTO
dto
:
resultlist
){
for
(
StaffDTO
dto
:
resultlist
){
StaffDepartmentRelatedDTO
related
=
relatedMap
.
get
(
dto
.
getStaffId
());
StaffClerkRelationDTO
staffClerkRelationDTO
=
map
.
get
(
dto
.
getStaffId
());
if
(
related
!=
null
){
dto
.
setClerkCode
(
staffClerkRelationDTO
.
getClerkCode
());
dto
.
setStaffDepartmentRelatedId
(
related
.
getStaffDepartmentRelatedId
());
if
(
org
.
apache
.
commons
.
lang
.
StringUtils
.
isNotBlank
(
related
.
getClerkCode
())){
dto
.
setBindFlag
(
1
);
dto
.
setClerkCode
(
related
.
getClerkCode
());
if
(
size
<
20
){
if
(
size
<
20
){
ClerkDTO
clerk
=
clerkService
.
getClerkByClerkCode
(
departmentDTO
.
getEnterpriseId
(),
related
.
getClerkCode
());
ClerkDTO
clerk
=
clerkService
.
getClerkByClerkCode
(
staffClerkRelationDTO
.
getEnterpriseId
(),
staffClerkRelationDTO
.
getClerkCode
());
if
(
clerk
!=
null
){
if
(
clerk
!=
null
){
long
memberCount
=
distributeApiService
.
getClerkMemberCount
(
department
DTO
.
getEnterpriseId
(),
clerk
.
getClerkId
(),
storeId
);
long
memberCount
=
distributeApiService
.
getClerkMemberCount
(
staffClerkRelation
DTO
.
getEnterpriseId
(),
clerk
.
getClerkId
(),
storeId
);
logger
.
info
(
"【获取会员数】enterpriseId={},clerkId={},storeId={},count={}"
,
department
DTO
.
getEnterpriseId
(),
clerk
.
getClerkId
(),
storeId
,
memberCount
);
logger
.
info
(
"【获取会员数】enterpriseId={},clerkId={},storeId={},count={}"
,
staffClerkRelation
DTO
.
getEnterpriseId
(),
clerk
.
getClerkId
(),
storeId
,
memberCount
);
dto
.
setMemberCount
(
memberCount
);
dto
.
setMemberCount
(
memberCount
);
}
}
else
{
}
else
{
dto
.
setMemberCount
(
0
);
dto
.
setMemberCount
(
0
);
}
}
}
else
{
}
else
{
dto
.
setBindFlag
(
0
);
dto
.
setMemberCount
(
0
);
dto
.
setMemberCount
(
0
);
}
}
}
else
{
dto
.
setBindFlag
(
0
);
}
}
//查找店长clerkType
if
(
StringUtils
.
isEmpty
(
storeId
)){
}
else
{
String
storeClerkCode
=
""
;
StoreDTO
storeDTO
=
storeService
.
getStore
(
storeId
);
if
(
storeDTO
!=
null
){
String
clerkId
=
storeDTO
.
getClerkId
();
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
clerkDTO
!=
null
){
storeClerkCode
=
clerkDTO
.
getClerkCode
();
}
}
}
if
(
StringUtils
.
isNotBlank
(
storeClerkCode
)){
for
(
StaffDTO
dto
:
resultlist
){
if
(
storeClerkCode
.
equals
(
dto
.
getClerkCode
())){
dto
.
setClerkType
(
1
);
}
}
}
}
logger
.
info
(
"result ClerkCode =================>{}"
,
JSONObject
.
toJSONString
(
resultlist
));
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
resultlist
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
resultlist
);
}
}
...
...
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