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
c99c172a
Commit
c99c172a
authored
May 29, 2020
by
huangZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
d20891d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
22 deletions
+18
-22
AuditSettingApiServiceImpl.java
.../service/service/out/impl/AuditSettingApiServiceImpl.java
+5
-1
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+13
-21
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditSettingApiServiceImpl.java
View file @
c99c172a
...
...
@@ -47,7 +47,11 @@ public class AuditSettingApiServiceImpl implements AuditSettingApiService{
String
wxEnterpriseId
)
{
TabHaobanAuditSetting
tab
=
auditSettingMapper
.
findSetting
(
wxEnterpriseId
);
if
(
tab
==
null
){
return
null
;
AuditSettingDTO
dto
=
new
AuditSettingDTO
();
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setAuditFlag
(
1
);
dto
.
setClerkChangeFlag
(
0
);
return
dto
;
}
AuditSettingDTO
dto
=
EntityUtil
.
changeEntity
(
AuditSettingDTO
.
class
,
tab
);
return
dto
;
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
c99c172a
...
...
@@ -35,6 +35,7 @@ import com.gic.haoban.common.utils.GooglePhoneNumberUtil;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.communicate.api.service.SyncHaobanToGicServiceApi
;
import
com.gic.haoban.manage.api.dto.AuditDTO
;
import
com.gic.haoban.manage.api.dto.AuditSettingDTO
;
import
com.gic.haoban.manage.api.dto.ClerkMainStoreRelatedDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.EnterpriseDetailDTO
;
...
...
@@ -44,6 +45,7 @@ import com.gic.haoban.manage.api.dto.StaffDTO;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.service.AuditApiService
;
import
com.gic.haoban.manage.api.service.AuditSettingApiService
;
import
com.gic.haoban.manage.api.service.BindApiService
;
import
com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
...
...
@@ -98,6 +100,9 @@ public class ClerkController extends WebBaseController{
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
@Autowired
private
ClerkNewService
clerkNewService
;
@Autowired
private
AuditSettingApiService
auditSettingApiService
;
//导购列表
@RequestMapping
(
"/clerk-list"
)
public
HaobanResponse
clerkList
(
String
storeId
,
String
bindFlag
,
String
departmentId
)
{
...
...
@@ -288,7 +293,6 @@ public class ClerkController extends WebBaseController{
String
nationcode
=
staffDTO
.
getNationCode
();
String
postion
=
staffDTO
.
getPostion
();
Integer
sex
=
staffDTO
.
getSex
();
staffDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
if
(
StringUtils
.
isBlank
(
staffName
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10004
);
}
...
...
@@ -307,42 +311,34 @@ public class ClerkController extends WebBaseController{
com
.
gic
.
enterprise
.
api
.
dto
.
StoreDTO
store
=
storeService
.
getStoreByIdNoStatus
(
storeId
);
//校验手机是否唯一
if
(
store
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_
400001
);
return
resultResponse
(
HaoBanErrCode
.
ERR_
10009
);
}
ClerkDTO
clerk
=
clerkService
.
getClerkByCodeNoDel
(
store
.
getEnterpriseId
(),
clerkCode
);
logger
.
info
(
"【新增店员】clerk={}"
,
JSON
.
toJSONString
(
clerk
));
if
(
clerk
!=
null
){
DepartmentDTO
department
=
departmentApiService
.
selectByRelatedId
(
storeId
);
if
(
department
==
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_400001
);
}
//StaffDepartmentRelatedDTO staffRelated = staffApiService.getDepartmentIdAndCode(department.getDepartmentId(), clerkCode);
if
(
null
!=
clerk
&&
StringUtils
.
isNotBlank
(
clerk
.
getPhoneNumber
())
&&
!
"--"
.
equals
(
clerk
.
getPhoneNumber
())){
return
resultResponse
(
HaoBanErrCode
.
ERR_10013
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_10013
);
}
if
(
version
==
1
){
boolean
needAudit
=
true
;
if
(
needAudit
){
AuditSettingDTO
dto
=
auditSettingApiService
.
findSettingByWxEnterpriseId
(
wxEnterpriseId
);
if
(
dto
.
getClerkChangeFlag
()
==
1
){
//需要审核
StaffDTO
staff
=
staffApiService
.
selectById
(
staffDTO
.
getStaffId
());
//是否需要审核
AuditDTO
audit
=
new
AuditDTO
();
audit
.
setCommitName
(
clerk
.
getClerkName
()
);
audit
.
setCommitName
(
staffName
);
audit
.
setCommitStaffId
(
staffDTO
.
getStaffId
());
audit
.
setCommitStaffImg
(
staff
.
getHeadImg
());
audit
.
setCommitStoreId
(
clerk
.
getStoreId
()
);
audit
.
setCommitStoreId
(
storeId
);
audit
.
setCommitStoreName
(
store
.
getStoreName
());
audit
.
setAuditStatus
(
0
);
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"clerkCode"
,
clerkCode
);
json
.
put
(
"clerkName"
,
clerk
.
getClerkName
()
);
json
.
put
(
"clerkName"
,
staffName
);
json
.
put
(
"headPic"
,
staff
.
getHeadImg
());
json
.
put
(
"sex"
,
sex
);
json
.
put
(
"postion"
,
postion
);
audit
.
setOldValue
(
json
.
toJSONString
());
audit
.
setCommitTime
(
new
Date
());
audit
.
setAuditType
(
3
);
auditApiService
.
insert
(
audit
);
...
...
@@ -350,14 +346,10 @@ public class ClerkController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
// if(clerk != null && StringUtils.isNotBlank(clerk.getPhoneNumber())){
// syncHaobanToGicServiceApi.syncHaobanClerkPhoneNumberToGic(clerk.getClerkId(), phoneNumber);
// }else{
boolean
flag
=
syncHaobanToGicServiceApi
.
syncClerkToGicClerkAdd
(
storeId
,
clerkCode
,
sex
,
staffName
,
phoneNumber
,
nationcode
,
postion
);
if
(!
flag
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10010
);
}
// }
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