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
d9b8c6d5
Commit
d9b8c6d5
authored
Mar 30, 2020
by
郑建
Committed by
zhengjian
Mar 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
量子魔方6.6第二期
parent
049c8206
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
0 deletions
+71
-0
FundModuleController.java
...p/asset/distribution/controller/FundModuleController.java
+34
-0
FundConfigCondition.java
...t/distribution/model/entity/fund/FundConfigCondition.java
+29
-0
IFundModuleService.java
...sset/distribution/service/funding/IFundModuleService.java
+8
-0
No files found.
src/main/java/com/quantgroup/asset/distribution/controller/FundModuleController.java
View file @
d9b8c6d5
package
com
.
quantgroup
.
asset
.
distribution
.
controller
;
package
com
.
quantgroup
.
asset
.
distribution
.
controller
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
com.quantgroup.asset.distribution.model.entity.fund.FundConfigCondition
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -109,6 +112,15 @@ public class FundModuleController {
...
@@ -109,6 +112,15 @@ public class FundModuleController {
return
findChannelFundConfigCommon
(
configId
,
2
);
return
findChannelFundConfigCommon
(
configId
,
2
);
}
}
@RequestMapping
(
"/simulation/conditions"
)
public
GlobalResponse
allConditions
(
Long
configId
){
return
fundConfigConditions
(
configId
);
}
@RequestMapping
(
"/simulation/result"
)
public
GlobalResponse
simulationResult
(
List
<
FundConfigCondition
>
configConditions
,
Long
configId
){
return
simulation
(
configConditions
,
configId
);
}
private
GlobalResponse
saveChannelFundsConfigCommon
(
Integer
type
,
Long
id
,
String
bizChannel
,
String
funds
,
String
remarks
,
private
GlobalResponse
saveChannelFundsConfigCommon
(
Integer
type
,
Long
id
,
String
bizChannel
,
String
funds
,
String
remarks
,
String
auditor
,
String
proposer
,
int
oldOrNew
)
{
String
auditor
,
String
proposer
,
int
oldOrNew
)
{
...
@@ -182,4 +194,26 @@ public class FundModuleController {
...
@@ -182,4 +194,26 @@ public class FundModuleController {
log
.
info
(
"资方模块接口, 根据id获取资方配置, configId : {} 耗时 : {}, response : {}"
,
configId
,
stopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
),
JSON
.
toJSONString
(
response
));
log
.
info
(
"资方模块接口, 根据id获取资方配置, configId : {} 耗时 : {}, response : {}"
,
configId
,
stopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
),
JSON
.
toJSONString
(
response
));
return
response
;
return
response
;
}
}
private
GlobalResponse
fundConfigConditions
(
Long
configId
){
log
.
info
(
"资方模块接口,根据id获取所有案例, configId : {}"
,
configId
);
if
(
configId
==
null
)
{
return
GlobalResponse
.
create
(
FundModuleResponse
.
ID_IS_EMPTY
);
}
Stopwatch
stopwatch
=
Stopwatch
.
createStarted
();
GlobalResponse
response
=
fundModuleService
.
getAllConditionsOfFundConfig
(
configId
);
log
.
info
(
"资方模块接口,根据id获取所有案例, configId : {} 耗时 : {}, response : {}"
,
configId
,
stopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
),
JSON
.
toJSONString
(
response
));
return
response
;
}
private
GlobalResponse
simulation
(
List
<
FundConfigCondition
>
configConditions
,
Long
configId
){
log
.
info
(
"资方模块接口,根据案例进行空泡, configConditions : {}"
,
configConditions
);
if
(
CollectionUtils
.
isEmpty
(
configConditions
))
{
return
GlobalResponse
.
create
(
FundModuleResponse
.
ID_IS_EMPTY
);
}
Stopwatch
stopwatch
=
Stopwatch
.
createStarted
();
GlobalResponse
response
=
fundModuleService
.
simulationCases
(
configConditions
,
configId
);
log
.
info
(
"资方模块接口,根据id获取所有案例, configConditions : {} 耗时 : {}, response : {}"
,
configConditions
,
stopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
),
JSON
.
toJSONString
(
response
));
return
response
;
}
}
}
src/main/java/com/quantgroup/asset/distribution/model/entity/fund/FundConfigCondition.java
0 → 100644
View file @
d9b8c6d5
package
com
.
quantgroup
.
asset
.
distribution
.
model
.
entity
.
fund
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
public
class
FundConfigCondition
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
conditionTempId
;
private
List
<
Condition
>
condition
;
private
Result
result
;
@Data
public
static
class
Condition
{
private
String
conditionCode
;
private
String
conditionName
;
private
String
conditionValue
;
}
@Data
public
static
class
Result
{
private
Boolean
success
;
private
String
fundInfo
;
}
}
src/main/java/com/quantgroup/asset/distribution/service/funding/IFundModuleService.java
View file @
d9b8c6d5
package
com
.
quantgroup
.
asset
.
distribution
.
service
.
funding
;
package
com
.
quantgroup
.
asset
.
distribution
.
service
.
funding
;
import
com.quantgroup.asset.distribution.config.annotation.HandleException
;
import
com.quantgroup.asset.distribution.model.entity.fund.FundConfigCondition
;
import
com.quantgroup.asset.distribution.model.response.GlobalResponse
;
import
com.quantgroup.asset.distribution.model.response.GlobalResponse
;
import
java.util.List
;
/**
/**
* 资方模块Service
* 资方模块Service
* @author liwenbin
* @author liwenbin
...
@@ -99,4 +103,8 @@ public interface IFundModuleService {
...
@@ -99,4 +103,8 @@ public interface IFundModuleService {
* @return
* @return
*/
*/
public
GlobalResponse
audit
(
Long
id
,
Integer
auditStatus
);
public
GlobalResponse
audit
(
Long
id
,
Integer
auditStatus
);
GlobalResponse
getAllConditionsOfFundConfig
(
Long
configId
);
GlobalResponse
simulationCases
(
List
<
FundConfigCondition
>
configConditions
,
Long
configId
);
}
}
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