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
d75633da
Commit
d75633da
authored
May 10, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审批条数
parent
b0b6de5a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
52 deletions
+83
-52
AuditApiService.java
...va/com/gic/haoban/manage/api/service/AuditApiService.java
+47
-45
TabHaobanAuditMapper.java
...aoban/manage/service/dao/mapper/TabHaobanAuditMapper.java
+2
-2
AuditApiServiceImpl.java
.../manage/service/service/out/impl/AuditApiServiceImpl.java
+11
-2
TabHaobanAuditMapper.xml
...ervice/src/main/resources/mapper/TabHaobanAuditMapper.xml
+12
-2
AuditController.java
...com/gic/haoban/manage/web/controller/AuditController.java
+11
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/AuditApiService.java
View file @
d75633da
package
com
.
gic
.
haoban
.
manage
.
api
.
service
;
import
java.util.List
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.manage.api.dto.AuditDTO
;
import
com.gic.haoban.manage.api.dto.BatchAuditLogDTO
;
/**
* Created by tgs on 2020/2/9.
*/
public
interface
AuditApiService
{
Page
<
AuditDTO
>
page
(
Integer
auditType
,
String
search
,
String
wxEnterpriseId
,
String
enterpriseId
,
Integer
auditStatus
,
Integer
auditFlag
,
BasePageInfo
pageInfo
);
String
audit
(
String
batchId
,
String
auditId
,
String
aduitName
,
String
optStaffId
);
void
refuse
(
String
auditId
,
String
auditReason
,
String
aduitStaffId
,
String
aduitName
);
int
save
(
Integer
auditType
,
String
wxEnterpriseId
,
String
enterpriseId
,
String
commitStaffId
,
String
commitStoreId
,
String
changeField
,
String
oldValue
,
String
newValue
);
void
editStoreInfo
(
String
storeId
,
String
changeField
,
String
oldValue
,
String
newValue
);
List
<
AuditDTO
>
listByStoreId
(
String
storeId
);
AuditDTO
findByStoreIdAndChangeField
(
String
storeId
,
String
changeField
);
void
insert
(
AuditDTO
audit
);
Page
<
AuditDTO
>
listByStaffId
(
String
staffId
,
Integer
auditType
,
Integer
auditStatus
,
BasePageInfo
pageInfo
);
Page
<
AuditDTO
>
pageStoreListByParams
(
String
storeId
,
BasePageInfo
pageInfo
,
Integer
auditType
,
Integer
auditStatus
);
AuditDTO
findById
(
String
auditId
);
void
update
(
AuditDTO
audit
);
List
<
BatchAuditLogDTO
>
listBatchLog
(
String
batchId
);
AuditDTO
findByBindRelatedIdAndAuditType
(
String
relatedId
,
int
auditType
);
boolean
judgeHavePhoneNumberOrCode
(
String
enterpriseId
,
String
clerkCode
,
String
phoneNumber
);
}
package
com
.
gic
.
haoban
.
manage
.
api
.
service
;
import
java.util.List
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.manage.api.dto.AuditDTO
;
import
com.gic.haoban.manage.api.dto.BatchAuditLogDTO
;
/**
* Created by tgs on 2020/2/9.
*/
public
interface
AuditApiService
{
Page
<
AuditDTO
>
page
(
Integer
auditType
,
String
search
,
String
wxEnterpriseId
,
String
enterpriseId
,
Integer
auditStatus
,
Integer
auditFlag
,
BasePageInfo
pageInfo
,
String
clerkId
);
String
audit
(
String
batchId
,
String
auditId
,
String
aduitName
,
String
optStaffId
);
void
refuse
(
String
auditId
,
String
auditReason
,
String
aduitStaffId
,
String
aduitName
);
int
save
(
Integer
auditType
,
String
wxEnterpriseId
,
String
enterpriseId
,
String
commitStaffId
,
String
commitStoreId
,
String
changeField
,
String
oldValue
,
String
newValue
);
void
editStoreInfo
(
String
storeId
,
String
changeField
,
String
oldValue
,
String
newValue
);
List
<
AuditDTO
>
listByStoreId
(
String
storeId
);
AuditDTO
findByStoreIdAndChangeField
(
String
storeId
,
String
changeField
);
void
insert
(
AuditDTO
audit
);
Page
<
AuditDTO
>
listByStaffId
(
String
staffId
,
Integer
auditType
,
Integer
auditStatus
,
BasePageInfo
pageInfo
);
Page
<
AuditDTO
>
pageStoreListByParams
(
String
storeId
,
BasePageInfo
pageInfo
,
Integer
auditType
,
Integer
auditStatus
);
AuditDTO
findById
(
String
auditId
);
void
update
(
AuditDTO
audit
);
List
<
BatchAuditLogDTO
>
listBatchLog
(
String
batchId
);
AuditDTO
findByBindRelatedIdAndAuditType
(
String
relatedId
,
int
auditType
);
boolean
judgeHavePhoneNumberOrCode
(
String
enterpriseId
,
String
clerkCode
,
String
phoneNumber
);
int
getAuditCount
(
String
enterpriseId
,
String
clerkId
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanAuditMapper.java
View file @
d75633da
...
...
@@ -23,7 +23,6 @@ public interface TabHaobanAuditMapper {
Page
<
TabHaobanAudit
>
page
(
@Param
(
"auditType"
)
Integer
auditType
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"auditStatus"
)
Integer
auditStatus
,
@Param
(
"auditFlag"
)
Integer
auditFlag
);
Page
<
TabHaobanAudit
>
pageForStoreIdsAndstaffIds
(
@Param
(
"auditType"
)
Integer
auditType
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"auditStatus"
)
Integer
auditStatus
,
@Param
(
"auditFlag"
)
Integer
auditFlag
);
List
<
TabHaobanAudit
>
listByStoreId
(
String
storeId
);
...
...
@@ -37,5 +36,5 @@ public interface TabHaobanAuditMapper {
List
<
TabHaobanAudit
>
judgeHavePhoneNumberOrCode
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkCode"
)
String
clerkCode
,
@Param
(
"phoneNumber"
)
String
phoneNumber
);
int
getAuditCount
(
String
enterpriseId
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
)
;
int
getAuditCount
(
@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 @
d75633da
...
...
@@ -30,6 +30,8 @@ import com.gic.haoban.manage.service.entity.TabHaobanAudit;
import
com.gic.haoban.manage.service.entity.TabHaobanBatchAuditLog
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.github.pagehelper.PageHelper
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -72,9 +74,8 @@ public class AuditApiServiceImpl implements AuditApiService {
@Override
public
Page
<
AuditDTO
>
page
(
Integer
auditType
,
String
search
,
String
wxEnterpriseId
,
String
enterpriseId
,
Integer
auditStatus
,
Integer
auditFlag
,
BasePageInfo
pageInfo
)
{
String
enterpriseId
,
Integer
auditStatus
,
Integer
auditFlag
,
BasePageInfo
pageInfo
,
String
clerkId
)
{
//部门关联表修改,服务层调整
List
<
String
>
departmentIds
=
new
ArrayList
<>();
List
<
String
>
staffIds
=
new
ArrayList
<>();
List
<
String
>
storeIds
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotEmpty
(
search
))
{
...
...
@@ -503,5 +504,13 @@ public class AuditApiServiceImpl implements AuditApiService {
List
<
TabHaobanAudit
>
list
=
auditMapper
.
judgeHavePhoneNumberOrCode
(
enterpriseId
,
clerkCode
,
phoneNumber
);
return
!
CollectionUtil
.
isEmpty
(
list
);
}
public
int
getAuditCount
(
String
enterpriseId
,
String
clerkId
)
{
List
<
String
>
storeIdList
=
null
;
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
storeIdList
=
null
;
}
return
this
.
auditMapper
.
getAuditCount
(
enterpriseId
,
storeIdList
)
;
}
}
haoban-manage3-service/src/main/resources/mapper/TabHaobanAuditMapper.xml
View file @
d75633da
...
...
@@ -444,8 +444,17 @@
)
</select>
<select
id=
"getAuditCount"
>
<select
id=
"getAuditCount"
resultType=
"int"
>
select count(*) from tab_haoban_audit where enterprise_id=#{enterpriseId}
<if
test=
"null != storeIds"
>
and
( commit_store_id in
<foreach
collection=
"storeIds"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
)
and audit_status = 0
</if>
</select>
</mapper>
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/AuditController.java
View file @
d75633da
...
...
@@ -79,7 +79,8 @@ public class AuditController extends WebBaseController{
if
(
StringUtils
.
isAnyBlank
(
wxEnterpriseId
)){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
Page
<
AuditDTO
>
page
=
auditApiService
.
page
(
auditType
,
search
,
wxEnterpriseId
,
enterpriseId
,
auditStatus
,
auditFlag
,
pageInfo
);
String
clerkId
=
AuthWebRequestUtil
.
getLoginUser
().
getClerkId
()
;
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
());
String
[]
array
=
storeIds
.
toArray
(
new
String
[
storeIds
.
size
()]);
...
...
@@ -236,4 +237,13 @@ public class AuditController extends WebBaseController{
List
<
BatchAuditLogDTO
>
list
=
auditApiService
.
listBatchLog
(
batchId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
list
);
}
@RequestMapping
(
"get-audit-count"
)
public
HaobanResponse
getAuditCount
()
{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
String
eid
=
login
.
getEnterpriseId
()
;
String
clerkId
=
login
.
getClerkId
()
;
int
count
=
this
.
auditApiService
.
getAuditCount
(
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