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
70891324
Commit
70891324
authored
Jun 03, 2020
by
huangZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
e064d6c7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletions
+30
-1
AuditApiServiceImpl.java
.../manage/service/service/out/impl/AuditApiServiceImpl.java
+16
-0
AuditController.java
...com/gic/haoban/manage/web/controller/AuditController.java
+14
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditApiServiceImpl.java
View file @
70891324
...
...
@@ -172,6 +172,13 @@ public class AuditApiServiceImpl implements AuditApiService{
auditMapper
.
updateByPrimaryKeySelective
(
tab
);
return
"0"
;
}
else
{
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
obj
.
getClerkId
());
if
(
clerkDTO
==
null
){
tab
.
setAuditStatus
(
5
);
tab
.
setAuditReason
(
"gic已删除该导购"
);
auditMapper
.
updateByPrimaryKeySelective
(
tab
);
return
"0"
;
}
else
{
staffClerkRelation
=
new
StaffClerkRelationDTO
();
staffClerkRelation
.
setEnterpriseId
(
tab
.
getEnterpriseId
());
staffClerkRelation
.
setClerkCode
(
obj
.
getClerkCode
());
...
...
@@ -181,6 +188,7 @@ public class AuditApiServiceImpl implements AuditApiService{
staffClerkRelation
.
setWxUserId
(
obj
.
getWxUserId
());
staffClerkRelationApiService
.
insert
(
staffClerkRelation
);
}
}
if
(
org
.
apache
.
commons
.
lang
.
StringUtils
.
isNotBlank
(
batchId
)){
insertBatchLog
(
batchId
,
AuditRsultType
.
success
.
getCode
(),
tab
);
}
...
...
@@ -190,6 +198,13 @@ public class AuditApiServiceImpl implements AuditApiService{
//门店导购新增
String
oldValue
=
tab
.
getOldValue
();
AuditStaffDTO
obj
=
JSONObject
.
parseObject
(
oldValue
,
AuditStaffDTO
.
class
);
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
obj
.
getClerkId
());
if
(
clerkDTO
==
null
){
tab
.
setAuditStatus
(
5
);
tab
.
setAuditReason
(
"gic已删除该导购"
);
auditMapper
.
updateByPrimaryKeySelective
(
tab
);
return
"0"
;
}
else
{
boolean
flag
=
syncHaobanToGicServiceApi
.
syncClerkToGicClerkAdd
(
tab
.
getCommitStoreId
(),
obj
.
getClerkCode
(),
obj
.
getSex
(),
obj
.
getStaffName
(),
obj
.
getPhoneNumber
(),
obj
.
getNationCode
(),
null
);
if
(!
flag
){
//失败
...
...
@@ -206,6 +221,7 @@ public class AuditApiServiceImpl implements AuditApiService{
}
staffDepartmentRelatedApiService
.
sendClerkAdd
(
obj
.
getClerkId
(),
obj
.
getClerkCode
(),
1
,
""
);
}
}
}
else
if
(
auditType
==
AuditType
.
CLERK_DEL
.
getCode
()){
//门店导购删除
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/AuditController.java
View file @
70891324
...
...
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
...
...
@@ -209,6 +210,11 @@ public class AuditController extends WebBaseController{
if
(
staffClerkRelation
!=
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_111117
);
}
else
{
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
clerkDTO
==
null
){
audit
.
setAuditStatus
(
5
);
audit
.
setAuditReason
(
"gic已删除该导购"
);
}
else
{
staffClerkRelation
=
new
StaffClerkRelationDTO
();
staffClerkRelation
.
setEnterpriseId
(
enterpriseId
);
staffClerkRelation
.
setClerkCode
(
clerkCode
);
...
...
@@ -218,12 +224,18 @@ public class AuditController extends WebBaseController{
staffClerkRelation
.
setWxUserId
(
wxUserId
);
staffClerkRelationApiService
.
insert
(
staffClerkRelation
);
audit
.
setAuditStatus
(
1
);
}
//发送消息
staffDepartmentRelatedApiService
.
sendClerkBind
(
clerkId
,
clerkCode
,
auditStatus
,
auditReason
);
}
}
}
if
(
audit
.
getAuditType
()
==
AuditType
.
CLERK_ADD
.
getCode
()){
//导购新增
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
clerkDTO
==
null
){
audit
.
setAuditStatus
(
5
);
audit
.
setAuditReason
(
"gic已删除该导购"
);
}
else
{
boolean
flag
=
syncHaobanToGicServiceApi
.
syncClerkToGicClerkAdd
(
storeId
,
clerkCode
,
sex
,
staff
.
getStaffName
(),
phoneNumber
,
nationCode
,
null
);
if
(!
flag
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10010
);
...
...
@@ -231,6 +243,7 @@ public class AuditController extends WebBaseController{
audit
.
setAuditStatus
(
1
);
staffDepartmentRelatedApiService
.
sendClerkAdd
(
clerkId
,
clerkCode
,
auditStatus
,
auditReason
);
}
}
if
(
audit
.
getAuditType
()
==
AuditType
.
CLERK_DEL
.
getCode
()){
//导购删除
syncHaobanToGicServiceApi
.
delGicClerk
(
clerkId
);
...
...
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