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
4c50dd96
Commit
4c50dd96
authored
Oct 10, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:审核绑定
parent
37692330
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
29 deletions
+30
-29
AuditApiServiceImpl.java
.../manage/service/service/out/impl/AuditApiServiceImpl.java
+30
-29
AuditController.java
...com/gic/haoban/manage/web/controller/AuditController.java
+0
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditApiServiceImpl.java
View file @
4c50dd96
...
...
@@ -46,7 +46,7 @@ import java.util.stream.Collectors;
*/
@Service
public
class
AuditApiServiceImpl
implements
AuditApiService
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
AuditApiService
.
class
);
@Autowired
...
...
@@ -68,19 +68,19 @@ public class AuditApiServiceImpl implements AuditApiService {
@Autowired
private
ClerkService
clerkService
;
@Autowired
private
PowerService
powerService
;
private
PowerService
powerService
;
@Autowired
private
StoreWidgetService
storeWidgetService
;
private
StoreWidgetService
storeWidgetService
;
@Override
public
Page
<
AuditDTO
>
page
(
Integer
auditType
,
String
search
,
String
wxEnterpriseId
,
String
enterpriseId
,
Integer
auditStatus
,
Integer
auditFlag
,
BasePageInfo
pageInfo
,
String
clerkId
)
{
List
<
String
>
storeIdList
=
this
.
getStoreIdList
(
enterpriseId
,
clerkId
)
;
String
enterpriseId
,
Integer
auditStatus
,
Integer
auditFlag
,
BasePageInfo
pageInfo
,
String
clerkId
)
{
List
<
String
>
storeIdList
=
this
.
getStoreIdList
(
enterpriseId
,
clerkId
);
PageHelper
.
startPage
(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
com
.
github
.
pagehelper
.
Page
<
TabHaobanAudit
>
page
=
new
com
.
github
.
pagehelper
.
Page
<
TabHaobanAudit
>();
page
=
auditMapper
.
page
(
wxEnterpriseId
,
auditType
,
storeIdList
,
search
,
enterpriseId
,
auditStatus
,
auditFlag
);
page
=
auditMapper
.
page
(
wxEnterpriseId
,
auditType
,
storeIdList
,
search
,
enterpriseId
,
auditStatus
,
auditFlag
);
if
(
CollectionUtil
.
isNotEmpty
(
page
.
getResult
()))
{
List
<
String
>
commitStaffIds
=
page
.
getResult
().
stream
().
filter
(
item
->
StringUtils
.
isBlank
(
item
.
getCommitStaffName
())).
map
(
s
->
s
.
getCommitStaffId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
commitStaffIds
=
page
.
getResult
().
stream
().
filter
(
item
->
StringUtils
.
isBlank
(
item
.
getCommitStaffName
())).
map
(
s
->
s
.
getCommitStaffId
()).
collect
(
Collectors
.
toList
());
logger
.
info
(
JSON
.
toJSONString
(
commitStaffIds
));
if
(
CollectionUtil
.
isNotEmpty
(
commitStaffIds
))
{
List
<
TabHaobanStaff
>
staffList
=
staffMapper
.
listByIds
(
commitStaffIds
);
...
...
@@ -166,6 +166,7 @@ public class AuditApiServiceImpl implements AuditApiService {
staffClerkRelation
.
setStoreId
(
tab
.
getCommitStoreId
());
staffClerkRelation
.
setWxEnterpriseId
(
tab
.
getWxEnterpriseId
());
staffClerkRelation
.
setStaffId
(
obj
.
getStaffId
());
staffClerkRelation
.
setManageFlag
(
clerkDTO
.
getClerkType
()
==
2
?
1
:
0
);
ServiceResponse
serviceResponse
=
staffClerkRelationApiService
.
wxBindStaffClerk
(
staffClerkRelation
,
optStaffId
,
ChannelCodeEnum
.
AUDIT_BIND
.
getCode
());
if
(!
serviceResponse
.
isSuccess
())
{
return
serviceResponse
.
getMessage
();
...
...
@@ -206,7 +207,7 @@ public class AuditApiServiceImpl implements AuditApiService {
if
(
StringUtils
.
isNotBlank
(
batchId
))
{
insertBatchLog
(
batchId
,
AuditRsultType
.
success
.
getCode
(),
tab
);
}
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
optStaffId
,
obj
.
getClerkId
(),
ChannelCodeEnum
.
AUDIT_UNBIND
.
getCode
());
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
optStaffId
,
obj
.
getClerkId
(),
ChannelCodeEnum
.
AUDIT_UNBIND
.
getCode
());
staffDepartmentRelatedApiService
.
sendClerkDel
(
obj
.
getClerkName
(),
obj
.
getClerkCode
(),
tab
.
getCommitStoreId
(),
1
,
""
);
}
else
if
(
auditType
==
AuditType
.
CLERK_UNBIND
.
getCode
())
{
//解绑申请,无需审核,直接通过
...
...
@@ -268,8 +269,8 @@ public class AuditApiServiceImpl implements AuditApiService {
tab
.
setCommitStaffImg
(
staff
.
getHeadImg
());
tab
.
setCommitStaffName
(
staff
.
getStaffName
());
tab
.
setCommitStoreId
(
commitStoreId
);
StoreDTO
store
=
this
.
storeService
.
getStore
(
commitStoreId
)
;
if
(
null
!=
store
)
{
StoreDTO
store
=
this
.
storeService
.
getStore
(
commitStoreId
)
;
if
(
null
!=
store
)
{
tab
.
setCommitStoreName
(
store
.
getStoreName
());
}
tab
.
setCommitTime
(
new
Date
());
...
...
@@ -454,30 +455,30 @@ public class AuditApiServiceImpl implements AuditApiService {
List
<
TabHaobanAudit
>
list
=
auditMapper
.
judgeHavePhoneNumberOrCode
(
enterpriseId
,
clerkCode
,
phoneNumber
);
return
!
CollectionUtil
.
isEmpty
(
list
);
}
@Override
public
int
getAuditCount
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
)
{
public
int
getAuditCount
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
)
{
// 如果null,说明是所有门店
List
<
String
>
storeIdList
=
this
.
getStoreIdList
(
enterpriseId
,
clerkId
)
;
return
this
.
auditMapper
.
getAuditCount
(
wxEnterpriseId
,
enterpriseId
,
storeIdList
)
;
List
<
String
>
storeIdList
=
this
.
getStoreIdList
(
enterpriseId
,
clerkId
);
return
this
.
auditMapper
.
getAuditCount
(
wxEnterpriseId
,
enterpriseId
,
storeIdList
)
;
}
@SuppressWarnings
(
"unchecked"
)
public
List
<
String
>
getStoreIdList
(
String
enterpriseId
,
String
clerkId
)
{
EnterpriseSettingDTO
enterpriseSetting
=
enterpriseService
.
getEnterpriseSettingByEnterpriseId
(
enterpriseId
)
;
logger
.
info
(
"门店权限,getEnableAccessControl={},{}"
,
enterpriseSetting
.
getEnableAccessControl
(),
enterpriseId
);
public
List
<
String
>
getStoreIdList
(
String
enterpriseId
,
String
clerkId
)
{
EnterpriseSettingDTO
enterpriseSetting
=
enterpriseService
.
getEnterpriseSettingByEnterpriseId
(
enterpriseId
)
;
logger
.
info
(
"门店权限,getEnableAccessControl={},{}"
,
enterpriseSetting
.
getEnableAccessControl
(),
enterpriseId
);
if
(
enterpriseSetting
.
getEnableAccessControl
()
!=
null
&&
enterpriseSetting
.
getEnableAccessControl
()
==
1
)
{
String
storeWidgetKey
=
this
.
powerService
.
getStoreWidgetId
(
new
Date
()
,
clerkId
)
;
logger
.
info
(
"权限控制-启用,创建人管辖门店的组件={}"
,
storeWidgetKey
);
StoreWidgetDTO
widget
=
this
.
storeWidgetService
.
getStoreWidgetBykey
(
storeWidgetKey
)
;
if
(
null
==
widget
||
widget
.
getSelectType
()==
0
)
{
logger
.
info
(
"权限控制-启用,超管={}"
,
clerkId
);
return
null
;
String
storeWidgetKey
=
this
.
powerService
.
getStoreWidgetId
(
new
Date
()
,
clerkId
)
;
logger
.
info
(
"权限控制-启用,创建人管辖门店的组件={}"
,
storeWidgetKey
);
StoreWidgetDTO
widget
=
this
.
storeWidgetService
.
getStoreWidgetBykey
(
storeWidgetKey
);
if
(
null
==
widget
||
widget
.
getSelectType
()
==
0
)
{
logger
.
info
(
"权限控制-启用,超管={}"
,
clerkId
);
return
null
;
}
List
<
String
>
storeIdList
=
new
ArrayList
<>()
;
storeIdList
.
add
(
"-1-1"
)
;
List
<
String
>
storeIdList
=
new
ArrayList
<>();
storeIdList
.
add
(
"-1-1"
);
Page
<
StoreDTO
>
page
=
new
Page
<
StoreDTO
>(
1
,
Integer
.
MAX_VALUE
);
page
=
storeWidgetService
.
getStoreWidgetStore
(
storeWidgetKey
,
null
,
enterpriseId
,
page
);
page
=
storeWidgetService
.
getStoreWidgetStore
(
storeWidgetKey
,
null
,
enterpriseId
,
page
);
if
(
page
!=
null
&&
CollectionUtils
.
isNotEmpty
(
page
.
getResult
()))
{
List
<
StoreDTO
>
list
=
page
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
...
...
@@ -486,9 +487,9 @@ public class AuditApiServiceImpl implements AuditApiService {
}
}
}
return
storeIdList
;
return
storeIdList
;
}
return
null
;
return
null
;
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/AuditController.java
View file @
4c50dd96
This diff is collapsed.
Click to expand it.
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