Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asset-distribution
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data-spider
asset-distribution
Commits
2c052e2f
Commit
2c052e2f
authored
Apr 03, 2020
by
zhengjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
6.6-2
parent
57754bd8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
15 deletions
+22
-15
FundModuleController.java
...p/asset/distribution/controller/FundModuleController.java
+2
-2
IApprovalLogService.java
...et/distribution/service/approval/IApprovalLogService.java
+1
-2
ApprovalLogServiceImpl.java
...ibution/service/approval/impl/ApprovalLogServiceImpl.java
+16
-8
IFundModuleService.java
...sset/distribution/service/funding/IFundModuleService.java
+1
-1
FundModuleServiceImpl.java
...tribution/service/funding/impl/FundModuleServiceImpl.java
+2
-2
No files found.
src/main/java/com/quantgroup/asset/distribution/controller/FundModuleController.java
View file @
2c052e2f
...
...
@@ -63,7 +63,7 @@ public class FundModuleController {
}
@RequestMapping
(
"/get_audit_infos"
)
public
GlobalResponse
getAuditInfos
(
String
targetName
,
Integer
auditStatus
,
Integer
auditType
,
Integer
auditTarget
,
String
applyStartTime
,
String
applyEndTime
,
String
user
,
Integer
pageNum
,
Integer
pageSize
)
{
public
GlobalResponse
getAuditInfos
(
String
targetName
,
Integer
auditStatus
,
Integer
auditType
,
Integer
auditTarget
,
String
applyStartTime
,
String
applyEndTime
,
String
user
,
Integer
pageNum
,
Integer
pageSize
,
Integer
sortMode
)
{
log
.
info
(
"资方模块接口, 获取审批列表开始, targetName : {}, auditStatus : {}, auditType : {}, auditTarget : {}, applyStartTime : {}, applyEndTime : {}, user : {}, pageNum : {}, pageSize : {}"
,
targetName
,
auditStatus
,
auditType
,
auditTarget
,
applyStartTime
,
applyEndTime
,
user
,
pageNum
,
pageSize
);
if
(
pageNum
==
null
||
pageSize
==
null
)
{
return
GlobalResponse
.
create
(
FundModuleResponse
.
PAGEING_CONDITIONS_IS_EMPTY
);
...
...
@@ -72,7 +72,7 @@ public class FundModuleController {
return
GlobalResponse
.
create
(
FundModuleResponse
.
USER_IS_EMPTY
);
}
Stopwatch
stopwatch
=
Stopwatch
.
createStarted
();
GlobalResponse
response
=
fundModuleService
.
getAuditInfos
(
targetName
,
auditStatus
,
auditType
,
auditTarget
,
applyStartTime
,
applyEndTime
,
user
,
pageNum
,
pageSize
);
GlobalResponse
response
=
fundModuleService
.
getAuditInfos
(
targetName
,
auditStatus
,
auditType
,
auditTarget
,
applyStartTime
,
applyEndTime
,
user
,
pageNum
,
pageSize
,
sortMode
);
log
.
info
(
"资方模块接口, 获取审批列表结束, targetName : {}, auditStatus : {}, auditType : {}, auditTarget : {}, applyStartTime : {}, applyEndTime : {}, user : {}, pageNum : {}, pageSize : {}, 耗时 : {}, response : {}"
,
targetName
,
auditStatus
,
auditType
,
auditTarget
,
applyStartTime
,
applyEndTime
,
user
,
pageNum
,
pageSize
,
stopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
),
JSON
.
toJSONString
(
response
));
return
response
;
}
...
...
src/main/java/com/quantgroup/asset/distribution/service/approval/IApprovalLogService.java
View file @
2c052e2f
...
...
@@ -40,11 +40,10 @@ public interface IApprovalLogService {
* @return
*/
public
Map
<
String
,
Object
>
getApprovalLogs
(
String
targetName
,
Integer
auditStatus
,
Integer
auditType
,
Integer
auditTarget
,
String
applyStartTime
,
String
applyEndTime
,
String
user
,
Integer
pageNum
,
Integer
pageSize
);
String
applyStartTime
,
String
applyEndTime
,
String
user
,
Integer
pageNum
,
Integer
pageSize
,
Integer
sortMode
);
/**
* 审批接口
* @param id 审批记录id
* @param auditStatus
*/
public
void
audit
(
ApprovalLog
approvalLog
,
Integer
auditStatus
);
...
...
src/main/java/com/quantgroup/asset/distribution/service/approval/impl/ApprovalLogServiceImpl.java
View file @
2c052e2f
...
...
@@ -6,19 +6,17 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.CriteriaQuery
;
import
javax.persistence.criteria.Order
;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Root
;
import
javax.persistence.criteria.*
;
import
com.quantgroup.asset.distribution.service.funding.IFundModuleChannelFundConfigNewService
;
import
com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFundConfigNew
;
import
org.apache.commons.lang3.StringUtils
;
import
org.hibernate.jpa.criteria.predicate.InPredicate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -61,9 +59,15 @@ public class ApprovalLogServiceImpl implements IApprovalLogService{
@Override
public
Map
<
String
,
Object
>
getApprovalLogs
(
String
targetName
,
Integer
auditStatus
,
Integer
auditType
,
Integer
auditTarget
,
String
applyStartTime
,
String
applyEndTime
,
String
user
,
Integer
pageNum
,
Integer
pageSize
)
{
Integer
pageSize
,
Integer
sortMode
)
{
// 分页条件
Pageable
pageable
=
new
PageRequest
(
pageNum
<
0
?
0
:
pageNum
,
pageSize
);
Pageable
pageable
;
if
(
sortMode
==
1
){
Sort
sort
=
new
Sort
(
Sort
.
Direction
.
ASC
,
"audit_status"
).
and
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"audit_time"
));
pageable
=
new
PageRequest
(
pageNum
<
0
?
0
:
pageNum
,
pageSize
,
sort
);
}
else
{
pageable
=
new
PageRequest
(
pageNum
<
0
?
0
:
pageNum
,
pageSize
);
}
Specification
<
ApprovalLog
>
specification
=
new
Specification
<
ApprovalLog
>()
{
@Override
public
Predicate
toPredicate
(
Root
<
ApprovalLog
>
root
,
CriteriaQuery
<?>
query
,
CriteriaBuilder
cb
)
{
...
...
@@ -72,6 +76,10 @@ public class ApprovalLogServiceImpl implements IApprovalLogService{
predicatesAnd
.
add
(
cb
.
equal
(
root
.
get
(
"enable"
),
true
));
if
(
auditStatus
!=
null
){
predicatesAnd
.
add
(
cb
.
equal
(
root
.
get
(
"auditStatus"
),
auditStatus
));
}
else
{
if
(
sortMode
==
1
){
predicatesAnd
.
add
(
cb
.
in
(
root
.
get
(
"auditStatus"
)).
value
(
0
).
value
(
1
));
}
}
if
(
auditType
!=
null
){
predicatesAnd
.
add
(
cb
.
equal
(
root
.
get
(
"auditType"
),
auditType
));
...
...
src/main/java/com/quantgroup/asset/distribution/service/funding/IFundModuleService.java
View file @
2c052e2f
...
...
@@ -80,7 +80,7 @@ public interface IFundModuleService {
* @param pageSize
* @return
*/
public
GlobalResponse
getAuditInfos
(
String
targetName
,
Integer
auditStatus
,
Integer
auditType
,
Integer
auditTarget
,
String
applyStartTime
,
String
applyEndTime
,
String
user
,
Integer
pageNum
,
Integer
pageSize
);
public
GlobalResponse
getAuditInfos
(
String
targetName
,
Integer
auditStatus
,
Integer
auditType
,
Integer
auditTarget
,
String
applyStartTime
,
String
applyEndTime
,
String
user
,
Integer
pageNum
,
Integer
pageSize
,
Integer
sortMode
);
/**
* 根据Id获取资方配置
...
...
src/main/java/com/quantgroup/asset/distribution/service/funding/impl/FundModuleServiceImpl.java
View file @
2c052e2f
...
...
@@ -149,8 +149,8 @@ public class FundModuleServiceImpl implements IFundModuleService{
@HandleException
@Override
public
GlobalResponse
getAuditInfos
(
String
targetName
,
Integer
auditStatus
,
Integer
auditType
,
Integer
auditTarget
,
String
applyStartTime
,
String
applyEndTime
,
String
user
,
Integer
pageNum
,
Integer
pageSize
)
{
Map
<
String
,
Object
>
result
=
approvalLogService
.
getApprovalLogs
(
targetName
,
auditStatus
,
auditType
,
auditTarget
,
applyStartTime
,
applyEndTime
,
user
,
pageNum
,
pageSize
);
String
applyStartTime
,
String
applyEndTime
,
String
user
,
Integer
pageNum
,
Integer
pageSize
,
Integer
sortMode
)
{
Map
<
String
,
Object
>
result
=
approvalLogService
.
getApprovalLogs
(
targetName
,
auditStatus
,
auditType
,
auditTarget
,
applyStartTime
,
applyEndTime
,
user
,
pageNum
,
pageSize
,
sortMode
);
if
(
result
.
size
()
==
0
)
{
return
GlobalResponse
.
create
(
FundModuleResponse
.
HAS_NO_DATA
);
}
...
...
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