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
6be234b3
Commit
6be234b3
authored
May 31, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审批加企微参数
parent
22ce39e1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
47 deletions
+13
-47
AuditApiService.java
...va/com/gic/haoban/manage/api/service/AuditApiService.java
+1
-1
TabHaobanAuditMapper.java
...aoban/manage/service/dao/mapper/TabHaobanAuditMapper.java
+3
-2
AuditApiServiceImpl.java
.../manage/service/service/out/impl/AuditApiServiceImpl.java
+3
-3
TabHaobanAuditMapper.xml
...ervice/src/main/resources/mapper/TabHaobanAuditMapper.xml
+2
-39
AuditController.java
...com/gic/haoban/manage/web/controller/AuditController.java
+4
-2
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/AuditApiService.java
View file @
6be234b3
...
...
@@ -43,5 +43,5 @@ public interface AuditApiService {
boolean
judgeHavePhoneNumberOrCode
(
String
enterpriseId
,
String
clerkCode
,
String
phoneNumber
);
int
getAuditCount
(
String
enterpriseId
,
String
clerkId
)
;
int
getAuditCount
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanAuditMapper.java
View file @
6be234b3
...
...
@@ -15,7 +15,7 @@ public interface TabHaobanAuditMapper {
int
updateByPrimaryKeySelective
(
TabHaobanAudit
record
);
Page
<
TabHaobanAudit
>
page
(
@Param
(
"auditType"
)
Integer
auditType
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
,
@Param
(
"searchParams"
)
String
search
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"auditStatus"
)
Integer
auditStatus
,
@Param
(
"auditFlag"
)
Integer
auditFlag
);
Page
<
TabHaobanAudit
>
page
(
@Param
(
"
wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"
auditType"
)
Integer
auditType
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
,
@Param
(
"searchParams"
)
String
search
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"auditStatus"
)
Integer
auditStatus
,
@Param
(
"auditFlag"
)
Integer
auditFlag
);
List
<
TabHaobanAudit
>
listByStoreId
(
String
storeId
);
...
...
@@ -29,5 +29,5 @@ public interface TabHaobanAuditMapper {
List
<
TabHaobanAudit
>
judgeHavePhoneNumberOrCode
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkCode"
)
String
clerkCode
,
@Param
(
"phoneNumber"
)
String
phoneNumber
);
int
getAuditCount
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
)
;
int
getAuditCount
(
@Param
(
"
wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"
enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
)
;
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditApiServiceImpl.java
View file @
6be234b3
...
...
@@ -96,7 +96,7 @@ public class AuditApiServiceImpl implements AuditApiService {
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
(
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
());
logger
.
info
(
JSON
.
toJSONString
(
commitStaffIds
));
...
...
@@ -480,10 +480,10 @@ public class AuditApiServiceImpl implements AuditApiService {
return
!
CollectionUtil
.
isEmpty
(
list
);
}
public
int
getAuditCount
(
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
(
enterpriseId
,
storeIdList
)
;
return
this
.
auditMapper
.
getAuditCount
(
wxEnterpriseId
,
enterpriseId
,
storeIdList
)
;
}
@SuppressWarnings
(
"unchecked"
)
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanAuditMapper.xml
View file @
6be234b3
...
...
@@ -141,7 +141,7 @@
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_audit
where
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
where
wx_enterprise_id=#{wxEnterpriseId} and enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
<if
test =
"auditType != null"
>
and audit_type = #{auditType,jdbcType=INTEGER}
</if>
...
...
@@ -161,43 +161,6 @@
order by commit_time desc
</select>
<select
id=
"pageForStoreIdsAndstaffIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_audit
where 1=1
<if
test =
"wxEnterpriseId != null"
>
and wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</if>
<if
test =
"enterpriseId != null and enterpriseId !=''"
>
and enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
</if>
<if
test =
"auditType != null"
>
and audit_type = #{auditType,jdbcType=INTEGER}
</if>
<if
test =
"auditFlag != null and auditFlag == 0"
>
and audit_status = 0
</if>
<if
test =
"auditFlag != null and auditFlag != 0"
>
and audit_status in (1,2,4,5)
</if>
<if
test =
"auditStatus != null"
>
and audit_status = #{auditStatus,jdbcType=INTEGER}
</if>
and ( commit_store_id in
<foreach
collection=
"storeIds"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
or commit_staff_id in
<foreach
collection=
"staffIds"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
)
order by commit_time desc
</select>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
...
...
@@ -284,7 +247,7 @@
</select>
<select
id=
"getAuditCount"
resultType=
"int"
>
select count(*) from tab_haoban_audit where enterprise_id=#{enterpriseId}
select count(*) from tab_haoban_audit where
wx_enterprise_id=#{wxEnterpriseId} and
enterprise_id=#{enterpriseId}
<if
test=
"null != storeIds"
>
and
( commit_store_id in
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/AuditController.java
View file @
6be234b3
...
...
@@ -72,13 +72,14 @@ public class AuditController extends WebBaseController{
}
//分页查找
@RequestMapping
(
"find-page"
)
public
HaobanResponse
findPage
(
String
wxEnterpriseId
,
String
search
,
BasePageInfo
pageInfo
,
Integer
auditType
,
Integer
auditStatus
,
Integer
auditFlag
)
{
public
HaobanResponse
findPage
(
String
search
,
BasePageInfo
pageInfo
,
Integer
auditType
,
Integer
auditStatus
,
Integer
auditFlag
)
{
if
(
auditFlag
==
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
()
;
String
enterpriseId
=
loginUser
.
getEnterpriseId
()
;
String
clerkId
=
AuthWebRequestUtil
.
getLoginUser
().
getClerkId
()
;
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
()
;
Page
<
AuditDTO
>
page
=
auditApiService
.
page
(
auditType
,
search
,
wxEnterpriseId
,
enterpriseId
,
auditStatus
,
auditFlag
,
pageInfo
,
clerkId
);
List
<
AuditDTO
>
list
=
page
.
getResult
();
List
<
String
>
storeIds
=
list
.
stream
().
map
(
s
->
s
.
getCommitStoreId
()).
collect
(
Collectors
.
toList
());
...
...
@@ -241,7 +242,8 @@ public class AuditController extends WebBaseController{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
String
eid
=
login
.
getEnterpriseId
()
;
String
clerkId
=
login
.
getClerkId
()
;
int
count
=
this
.
auditApiService
.
getAuditCount
(
eid
,
clerkId
)
;
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
()
;
int
count
=
this
.
auditApiService
.
getAuditCount
(
wxEnterpriseId
,
eid
,
clerkId
)
;
return
this
.
success
(
count
)
;
}
}
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