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
4871e6a1
Commit
4871e6a1
authored
May 28, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e4806b26
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
152 additions
and
1 deletions
+152
-1
AuditApiService.java
...va/com/gic/haoban/manage/api/service/AuditApiService.java
+3
-1
StaffClerkRelationApiService.java
...oban/manage/api/service/StaffClerkRelationApiService.java
+4
-0
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+3
-0
StaffClerkRelationService.java
...ban/manage/service/service/StaffClerkRelationService.java
+4
-0
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+17
-0
AuditApiServiceImpl.java
.../manage/service/service/out/impl/AuditApiServiceImpl.java
+10
-0
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+9
-0
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+11
-0
AuditController.java
...com/gic/haoban/manage/web/controller/AuditController.java
+89
-0
HaoBanErrCode.java
...java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
+2
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/AuditApiService.java
View file @
4871e6a1
...
...
@@ -32,5 +32,7 @@ public interface AuditApiService {
Page
<
AuditDTO
>
pageStoreListByParams
(
String
storeId
,
BasePageInfo
pageInfo
,
Integer
auditType
,
Integer
auditStatus
);
AuditDTO
findById
(
String
auditId
);
void
update
(
AuditDTO
audit
);
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffClerkRelationApiService.java
View file @
4871e6a1
...
...
@@ -25,5 +25,9 @@ public interface StaffClerkRelationApiService {
* @return
*/
public
ServiceResponse
bindStaffClerk
(
StaffClerkRelationDTO
staffClerkRelationDTO
);
StaffClerkRelationDTO
getByCodeAndEnterpriseId
(
String
clerkCode
,
String
enterpriseId
);
String
insert
(
StaffClerkRelationDTO
staffClerkRelation
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
View file @
4871e6a1
...
...
@@ -47,4 +47,6 @@ public interface TabHaobanStaffClerkRelationMapper {
* @return
*/
TabHaobanStaffClerkRelation
getBindByClerkId
(
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
TabHaobanStaffClerkRelation
getByCodeAndEnterpriseId
(
@Param
(
"clerkCode"
)
String
clerkCode
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffClerkRelationService.java
View file @
4871e6a1
...
...
@@ -39,5 +39,9 @@ public interface StaffClerkRelationService {
* @return
*/
public
StaffClerkRelationDTO
getBindByClerkId
(
String
clerkId
,
String
wxEnterpriseId
);
StaffClerkRelationDTO
getByCodeAndEnterpriseId
(
String
clerkCode
,
String
enterpriseId
);
String
insert
(
StaffClerkRelationDTO
staffClerkRelation
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
4871e6a1
...
...
@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
...
...
@@ -67,4 +68,20 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
TabHaobanStaffClerkRelation
relation
=
mapper
.
getBindByClerkId
(
clerkId
,
wxEnterpriseId
);
return
EntityUtil
.
changeEntityByJSON
(
StaffClerkRelationDTO
.
class
,
relation
);
}
@Override
public
StaffClerkRelationDTO
getByCodeAndEnterpriseId
(
String
clerkCode
,
String
enterpriseId
)
{
return
EntityUtil
.
changeEntityByJSON
(
StaffClerkRelationDTO
.
class
,
mapper
.
getByCodeAndEnterpriseId
(
clerkCode
,
enterpriseId
));
}
@Override
public
String
insert
(
StaffClerkRelationDTO
staffClerkRelation
)
{
String
uuid
=
StringUtil
.
randomUUID
();
staffClerkRelation
.
setStaffClerkRelationId
(
uuid
);
staffClerkRelation
.
setCreateTime
(
new
Date
());
staffClerkRelation
.
setUpdateTime
(
new
Date
());
staffClerkRelation
.
setStatusFlag
(
1
);
TabHaobanStaffClerkRelation
relation
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaffClerkRelation
.
class
,
staffClerkRelation
);
mapper
.
insert
(
relation
);
return
uuid
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditApiServiceImpl.java
View file @
4871e6a1
...
...
@@ -390,4 +390,14 @@ public class AuditApiServiceImpl implements AuditApiService{
tabHaobanBatchAuditLogMapper
.
insert
(
batTab
);
}
@Override
public
AuditDTO
findById
(
String
auditId
)
{
return
EntityUtil
.
changeEntityByJSON
(
AuditDTO
.
class
,
auditMapper
.
selectByPrimaryKey
(
auditId
));
}
@Override
public
void
update
(
AuditDTO
audit
)
{
audit
.
setUpdateTime
(
new
Date
());
auditMapper
.
updateByPrimaryKeySelective
(
EntityUtil
.
changeEntityByJSON
(
TabHaobanAudit
.
class
,
audit
));
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
4871e6a1
...
...
@@ -104,4 +104,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
staffClerkRelatinService
.
bind
(
staffClerkRelationDTO
);
return
response
;
}
@Override
public
StaffClerkRelationDTO
getByCodeAndEnterpriseId
(
String
clerkCode
,
String
enterpriseId
)
{
return
staffClerkRelatinService
.
getByCodeAndEnterpriseId
(
clerkCode
,
enterpriseId
);
}
@Override
public
String
insert
(
StaffClerkRelationDTO
staffClerkRelation
)
{
return
staffClerkRelatinService
.
insert
(
staffClerkRelation
);
}
}
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
4871e6a1
...
...
@@ -211,4 +211,14 @@
from tab_haoban_staff_clerk_relation
where clerk_id = #{clerkId,jdbcType=VARCHAR} and wx_enterprise_id=#{wxEnterpriseId} and status=1
</select>
<select
id=
"getByCodeAndEnterpriseId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_clerk_relation
where staff_id = #{staffId,jdbcType=VARCHAR}
and status_flag = 1
and enterprise_id = #{enterpriseId}
and clerk_code = #{clerkCode}
</select>
</mapper>
\ No newline at end of file
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/AuditController.java
View file @
4871e6a1
...
...
@@ -20,8 +20,15 @@ import com.gic.haoban.base.api.common.BasePageInfo;
import
com.gic.haoban.base.api.common.PageResult2
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.communicate.api.service.SyncHaobanToGicServiceApi
;
import
com.gic.haoban.manage.api.dto.AuditDTO
;
import
com.gic.haoban.manage.api.dto.ClerkMainStoreRelatedDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.service.AuditApiService
;
import
com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.vo.AuditVO
;
...
...
@@ -34,6 +41,15 @@ public class AuditController extends WebBaseController{
@Autowired
private
AuditApiService
auditApiService
;
@Autowired
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
@Autowired
private
StaffApiService
staffApiService
;
@Autowired
private
SyncHaobanToGicServiceApi
syncHaobanToGicServiceApi
;
@RequestMapping
(
"clerk-apply-list"
)
public
HaobanResponse
staffStoreList
(
String
staffId
,
String
wxEnterpriseId
,
BasePageInfo
pageInfo
){
if
(
StringUtils
.
isAnyBlank
(
staffId
,
wxEnterpriseId
)){
...
...
@@ -109,5 +125,78 @@ public class AuditController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
pageResult2
);
}
@RequestMapping
(
"clerk-audit"
)
public
HaobanResponse
clerkAudit
(
String
auditId
,
String
auditReason
,
Integer
auditStatus
,
String
wxEnterpriseId
,
String
staffId
){
if
(
StringUtils
.
isAnyBlank
(
auditId
,
wxEnterpriseId
)){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
if
(
auditStatus
==
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
AuditDTO
audit
=
auditApiService
.
findById
(
auditId
);
if
(
audit
==
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10017
);
}
StaffDTO
staff
=
staffApiService
.
selectById
(
staffId
);
if
(
staff
!=
null
){
audit
.
setAuditName
(
staff
.
getStaffName
());
}
if
(
auditStatus
==
1
){
String
oldValue
=
audit
.
getOldValue
();
String
clerkCode
=
""
;
String
enterpriseId
=
""
;
String
clerkId
=
""
;
String
wxUserId
=
""
;
String
phoneNumber
=
""
;
String
nationCode
=
""
;
Integer
sex
=
null
;
JSONObject
json
=
JSON
.
parseObject
(
oldValue
);
clerkCode
=
json
.
getString
(
"clerkCode"
);
enterpriseId
=
json
.
getString
(
"enterpriseId"
);
clerkId
=
json
.
getString
(
"clerkId"
);
wxUserId
=
json
.
getString
(
"wxUserId"
);
sex
=
json
.
getInteger
(
"sex"
);
phoneNumber
=
json
.
getString
(
"phoneNumber"
);
nationCode
=
json
.
getString
(
"nationCode"
);
String
storeId
=
audit
.
getCommitStoreId
();
if
(
audit
.
getAuditType
()
==
2
){
StaffClerkRelationDTO
staffClerkRelation
=
staffClerkRelationApiService
.
getByCodeAndEnterpriseId
(
clerkCode
,
enterpriseId
);
if
(
staffClerkRelation
!=
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_111117
);
}
else
{
staffClerkRelation
=
new
StaffClerkRelationDTO
();
staffClerkRelation
.
setEnterpriseId
(
enterpriseId
);
staffClerkRelation
.
setClerkCode
(
clerkCode
);
staffClerkRelation
.
setClerkId
(
clerkId
);
staffClerkRelation
.
setStoreId
(
storeId
);
staffClerkRelation
.
setWxEnterpriseId
(
wxEnterpriseId
);
staffClerkRelation
.
setWxUserId
(
wxUserId
);
staffClerkRelationApiService
.
insert
(
staffClerkRelation
);
audit
.
setAuditStatus
(
1
);
}
}
if
(
audit
.
getAuditType
()
==
3
){
boolean
flag
=
syncHaobanToGicServiceApi
.
syncClerkToGicClerkAdd
(
storeId
,
clerkCode
,
sex
,
staff
.
getStaffName
(),
phoneNumber
,
nationCode
,
null
);
if
(!
flag
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10010
);
}
audit
.
setAuditStatus
(
1
);
}
if
(
audit
.
getAuditType
()
==
4
){
syncHaobanToGicServiceApi
.
delGicClerk
(
clerkId
);
audit
.
setAuditStatus
(
1
);
}
}
else
if
(
auditStatus
==
2
){
audit
.
setAuditStatus
(
2
);
}
else
if
(
auditStatus
==
3
){
audit
.
setAuditStatus
(
3
);
}
auditApiService
.
update
(
audit
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
View file @
4871e6a1
...
...
@@ -201,6 +201,8 @@ public enum HaoBanErrCode {
ERR_10015
(
10015
,
"素材不存在"
),
ERR_10016
(
10016
,
"导购不存在"
),
ERR_10017
(
10017
,
"审核记录不存在"
),
ERR_999
(
999
,
"操作失败"
),
...
...
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