Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
isc-funds
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
isc-v3.1-tmp
isc-funds
Commits
230cc0d3
Commit
230cc0d3
authored
Oct 11, 2024
by
huangshunlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mapperPackage 路径调整,即期结汇保存
parent
eb3a9e72
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
865 additions
and
22 deletions
+865
-22
application.yml
isc-funds-boot/src/main/resources/application.yml
+1
-1
BchController.java
...brilliance/isc/funds/common/controller/BchController.java
+29
-0
BopcodController.java
...lliance/isc/funds/common/controller/BopcodController.java
+26
-0
FxdDiaryController.java
...iance/isc/funds/common/controller/FxdDiaryController.java
+45
-0
FxdFeeDetailController.java
...e/isc/funds/common/controller/FxdFeeDetailController.java
+33
-0
FxdGleController.java
...lliance/isc/funds/common/controller/FxdGleController.java
+32
-0
FxdLiaallController.java
...ance/isc/funds/common/controller/FxdLiaallController.java
+33
-0
FxdLimController.java
...lliance/isc/funds/common/controller/FxdLimController.java
+77
-0
FxdSettleDetailController.java
...sc/funds/common/controller/FxdSettleDetailController.java
+62
-0
FxdTrndocController.java
...ance/isc/funds/common/controller/FxdTrndocController.java
+48
-0
FxdCliBanInfo.java
...illiance/isc/funds/common/register/cci/FxdCliBanInfo.java
+53
-0
FxtpService.java
.../com/brilliance/isc/funds/fxtlop/service/FxtpService.java
+4
-0
FxtpServiceImpl.java
...liance/isc/funds/fxtlop/service/impl/FxtpServiceImpl.java
+107
-5
FxtssbValidator.java
...om/brilliance/isc/funds/fxtssb/check/FxtssbValidator.java
+93
-2
FxtssbFeeRegister.java
...ance/isc/funds/fxtssb/register/fee/FxtssbFeeRegister.java
+26
-0
FxtssbResource.java
.../brilliance/isc/funds/fxtssb/resource/FxtssbResource.java
+39
-4
FxtssbTransactionServiceImpl.java
...sc/funds/fxtssb/service/FxtssbTransactionServiceImpl.java
+157
-10
No files found.
isc-funds-boot/src/main/resources/application.yml
View file @
230cc0d3
...
...
@@ -67,7 +67,7 @@ envConfig:
serializer
:
kryo
env
:
mapperPackage
:
com.brilliance.isc.
core.
mda.dao
mapperPackage
:
com.brilliance.isc.mda.dao
global
:
ignoreUrls
:
...
...
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/controller/BchController.java
0 → 100644
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
common
.
controller
;
import
com.brilliance.isc.bo.Bch
;
import
com.brilliance.isc.common.api.bch.service.BchService
;
import
com.brilliance.isc.vo.ResponseSet
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RequestMapping
(
"/bch"
)
public
class
BchController
{
@Autowired
private
BchService
bchService
;
@RequestMapping
(
"/getBranchListByownExtKey"
)
public
ResponseSet
<
List
<
Bch
>>
getBranchListByownExtKey
(
@RequestBody
Map
<
String
,
Object
>
body
)
{
String
ownExtKey
=
body
.
get
(
"ownExtKey"
).
toString
();
List
<
Bch
>
bchList
=
new
ArrayList
<>();
return
new
ResponseSet
(
bchService
.
listAllByOwnExtKey
(
ownExtKey
));
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/controller/BopcodController.java
0 → 100644
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
common
.
controller
;
import
com.brilliance.isc.bo.Bopcod
;
import
com.brilliance.isc.common.api.bopcod.BopcodService
;
import
com.brilliance.isc.vo.ResponseSet
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RequestMapping
(
"/bopcod"
)
public
class
BopcodController
{
@Autowired
private
BopcodService
bopcodService
;
@RequestMapping
(
"/getBopcodList"
)
public
ResponseSet
<
List
<
Bopcod
>>
getBopcodList
(
@RequestBody
Map
<
String
,
Object
>
body
){
String
iotyp
=
body
.
get
(
"iotyp"
).
toString
();
return
new
ResponseSet
(
bopcodService
.
getBopcodList
(
iotyp
));
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/controller/FxdDiaryController.java
0 → 100644
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
common
.
controller
;
import
com.brilliance.isc.common.api.diary.controller.AbstractDiaryController
;
import
com.brilliance.isc.common.api.diary.vo.DiaryRequestVo
;
import
com.brilliance.isc.common.api.diary.vo.DiaryResponseVo
;
import
com.brilliance.isc.common.trndia.vo.DiaVo
;
import
com.brilliance.isc.vo.ResponseSet
;
import
com.brilliance.isc.vo.funds.FxdBizAmdInfoVo
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* Diary组件
*/
@RestController
@RequestMapping
(
"/fxd"
)
public
class
FxdDiaryController
extends
AbstractDiaryController
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
{
/**
* 试算备忘录入口
*
* @param diaryRequestVo
* @return
*/
@RequestMapping
(
"/trndia/calcDiaries"
)
@Override
public
ResponseSet
<
DiaryResponseVo
>
calcDiaries
(
@RequestBody
DiaryRequestVo
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
diaryRequestVo
)
{
return
super
.
calcDiaries
(
diaryRequestVo
);
}
/**
* 计算备忘录状态入口
*
* @param diaVo
* @return
*/
@RequestMapping
(
"/trndia/calculateDiamodflg"
)
@Override
public
ResponseSet
<
String
>
calculateDiamodflg
(
@RequestBody
DiaVo
diaVo
)
{
return
super
.
calculateDiamodflg
(
diaVo
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/controller/FxdFeeDetailController.java
0 → 100644
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
common
.
controller
;
import
com.brilliance.isc.common.api.fee.controller.AbstractFeeDetailController
;
import
com.brilliance.isc.common.api.fee.vo.FeeDetailRequestVo
;
import
com.brilliance.isc.common.api.fee.vo.FeeDetailResponseVo
;
import
com.brilliance.isc.vo.ResponseSet
;
import
com.brilliance.isc.vo.funds.FxdBizAmdInfoVo
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 费用组件
*/
@RestController
@RequestMapping
(
"/fxd"
)
public
class
FxdFeeDetailController
extends
AbstractFeeDetailController
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
{
/**
* 试算费用入口
*
* @param feeDetailRequestVo
* @return
*/
@RequestMapping
(
"/setmod/calcFeeDetail"
)
@Override
public
ResponseSet
<
FeeDetailResponseVo
>
calcFeeDetail
(
@RequestBody
FeeDetailRequestVo
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
feeDetailRequestVo
)
{
return
super
.
calcFeeDetail
(
feeDetailRequestVo
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/controller/FxdGleController.java
0 → 100644
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
common
.
controller
;
import
com.brilliance.isc.common.api.gle.controller.AbstractGleController
;
import
com.brilliance.isc.common.api.gle.vo.GlentryRequest
;
import
com.brilliance.isc.common.api.gle.vo.GlentryResponse
;
import
com.brilliance.isc.vo.ResponseSet
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 会计分录组件
*/
@RestController
@RequestMapping
(
"/fxd"
)
public
class
FxdGleController
extends
AbstractGleController
<
FxdBizInfoVo
>
{
/**
* 会计分录试算入口
*
* @param glentryRequest
* @return ResponseSet<GlentryResponse>
*/
@RequestMapping
(
"/gle/assertGle"
)
@Override
public
ResponseSet
<
GlentryResponse
>
generateGlentry
(
@RequestBody
GlentryRequest
<
FxdBizInfoVo
>
glentryRequest
)
{
return
super
.
generateGlentry
(
glentryRequest
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/controller/FxdLiaallController.java
0 → 100644
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
common
.
controller
;
import
com.brilliance.isc.common.api.liaall.controller.AbstractLiaallController
;
import
com.brilliance.isc.common.api.liaall.vo.LiaallRequest
;
import
com.brilliance.isc.common.api.liaall.vo.LiaallResponse
;
import
com.brilliance.isc.vo.ResponseSet
;
import
com.brilliance.isc.vo.funds.FxdBizAmdInfoVo
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 表外记账组件
*/
@RestController
@RequestMapping
(
"/fxd"
)
public
class
FxdLiaallController
extends
AbstractLiaallController
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
{
/**
* 表外记账试算服务
*
* @param liaallRequest
* @return
*/
@RequestMapping
(
"/liaall/assertLiaall"
)
@Override
public
ResponseSet
<
LiaallResponse
>
calcLiaall
(
@RequestBody
LiaallRequest
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
liaallRequest
)
{
return
super
.
calcLiaall
(
liaallRequest
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/controller/FxdLimController.java
0 → 100644
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
common
.
controller
;
import
com.brilliance.isc.common.api.lim.controller.AbstractLimController
;
import
com.brilliance.isc.common.api.lim.vo.LimRequest
;
import
com.brilliance.isc.common.api.lim.vo.LimResponse
;
import
com.brilliance.isc.common.api.lim.vo.YapinRequest
;
import
com.brilliance.isc.common.api.lim.vo.YapinResponse
;
import
com.brilliance.isc.vo.ResponseSet
;
import
com.brilliance.isc.vo.funds.FxdBizAmdInfoVo
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 额度组件
*/
@RestController
@RequestMapping
(
"/fxd"
)
public
class
FxdLimController
extends
AbstractLimController
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
{
/**
* 额度初始化
*
* @param limRequest
* @return
*/
@RequestMapping
(
"/lim/limInit"
)
@Override
public
ResponseSet
<
LimResponse
>
limInit
(
@RequestBody
LimRequest
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
limRequest
)
{
return
super
.
limInit
(
limRequest
);
}
/**
* 额度查询入口
*
* @param limRequest
* @return
*/
@RequestMapping
(
"/lim/limQuery"
)
@Override
public
ResponseSet
<
LimResponse
>
limQuery
(
@RequestBody
LimRequest
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
limRequest
)
{
return
super
.
limQuery
(
limRequest
);
}
/**
* 额度试算入口
*
* @param limRequest
* @return
*/
@RequestMapping
(
"/lim/limPreCal"
)
@Override
public
ResponseSet
<
LimResponse
>
limPreCal
(
@RequestBody
LimRequest
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
limRequest
)
{
return
super
.
limPreCal
(
limRequest
);
}
/**
* 转授权查询
*
* @param limRequest
* @return
*/
@RequestMapping
(
"/lim/limZsqQuery"
)
@Override
public
ResponseSet
<
LimResponse
>
limZsqQuery
(
@RequestBody
LimRequest
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
limRequest
)
{
return
super
.
limZsqQuery
(
limRequest
);
}
@RequestMapping
(
"/lim/yapinQuery"
)
public
ResponseSet
<
YapinResponse
>
yapinQuery
(
@RequestBody
YapinRequest
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
yapinRequest
)
{
return
super
.
yapinQuery
(
yapinRequest
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/controller/FxdSettleDetailController.java
0 → 100644
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
common
.
controller
;
import
com.brilliance.isc.common.api.settle.controller.AbstractSettleDetailController
;
import
com.brilliance.isc.common.api.settle.vo.AccountRequestVo
;
import
com.brilliance.isc.common.api.settle.vo.AccountResponseVo
;
import
com.brilliance.isc.common.api.settle.vo.SettleDetailRequestVo
;
import
com.brilliance.isc.common.api.settle.vo.SettleDetailResponseVo
;
import
com.brilliance.isc.common.setgll.vo.SetgllVo
;
import
com.brilliance.isc.vo.ResponseSet
;
import
com.brilliance.isc.vo.funds.FxdBizAmdInfoVo
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 账务组件
*/
@RestController
@RequestMapping
(
"/fxd"
)
public
class
FxdSettleDetailController
extends
AbstractSettleDetailController
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
{
/**
* 试算账务入口
*
* @param settleDetailRequestVo
* @return
*/
@RequestMapping
(
"/setmod/calcSettleDetail"
)
@Override
public
ResponseSet
<
SettleDetailResponseVo
>
calcSettleDetail
(
@RequestBody
SettleDetailRequestVo
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
settleDetailRequestVo
)
{
return
super
.
calcSettleDetail
(
settleDetailRequestVo
);
}
/**
* 获取核心账户信息
*
* @param accountRequestVo
* @return
*/
@RequestMapping
(
"/getCoreAcctInfo"
)
@Override
public
ResponseSet
<
AccountResponseVo
>
getCoreAccountCode
(
@RequestBody
AccountRequestVo
accountRequestVo
)
{
return
super
.
getCoreAccountCode
(
accountRequestVo
);
}
/**
* 获取账户信息
*
* @param setgllVo
* @return
*/
@RequestMapping
(
"/getAcctInfo"
)
@Override
public
ResponseSet
<
SetgllVo
>
getAcctInfo
(
@RequestBody
SetgllVo
setgllVo
)
{
return
super
.
getAcctInfo
(
setgllVo
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/controller/FxdTrndocController.java
0 → 100644
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
common
.
controller
;
import
com.brilliance.isc.common.api.trndoc.controller.AbstractTrndocController
;
import
com.brilliance.isc.common.api.trndoc.vo.TrndocRequest
;
import
com.brilliance.isc.common.api.trndoc.vo.TrndocResponse
;
import
com.brilliance.isc.vo.ResponseSet
;
import
com.brilliance.isc.vo.funds.FxdBizAmdInfoVo
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.io.IOException
;
import
java.util.Map
;
/**
* 报文面函组件
*/
@RestController
@RequestMapping
(
"/fxd"
)
public
class
FxdTrndocController
extends
AbstractTrndocController
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
{
/**
* 面函报文试算入口
*
* @param trndoc
* @return
*/
@RequestMapping
(
"/docpan/assertTrndoc"
)
@Override
public
ResponseSet
<
TrndocResponse
>
assertTrndoc
(
@RequestBody
TrndocRequest
<
FxdBizInfoVo
,
FxdBizAmdInfoVo
>
trndoc
)
{
return
super
.
assertTrndoc
(
trndoc
);
}
/**
* 面函报文预览功能
*
* @param paramMap
* @return
* @throws IOException
*/
@RequestMapping
(
"/docpan/showDOCS"
)
@Override
public
ResponseSet
<
TrndocResponse
>
showDOCS
(
@RequestBody
Map
<
String
,
Object
>
paramMap
)
throws
IOException
{
return
super
.
showDOCS
(
paramMap
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/register/cci/FxdCliBanInfo.java
0 → 100644
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
common
.
register
.
cci
;
import
com.brilliance.isc.bo.Cci
;
import
com.brilliance.isc.bo.Pts
;
import
com.brilliance.isc.common.register.cci.CliBanInfo
;
import
com.brilliance.isc.common.transaction.help.TransactionHelpService
;
import
com.brilliance.isc.common.vo.PtsptaVo
;
import
com.brilliance.isc.mda.dao.PtsMapper
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Optional
;
@Component
(
"FXD.cciRegister"
)
public
class
FxdCliBanInfo
implements
CliBanInfo
{
@Resource
private
TransactionHelpService
transactionHelpService
;
@Resource
private
PtsMapper
ptsMapper
;
/**
* source:fxdlod.0006.script
*/
@Override
public
void
buildValue
(
String
objinr
,
String
objtyp
,
List
<
PtsptaVo
>
ptsptaVos
,
Cci
cci
)
{
//getFxdCliBanInfo
List
<
Pts
>
ptsList
=
ptsMapper
.
getPtsByObjInrTyp
(
objinr
,
objtyp
);
if
(
CollectionUtils
.
isEmpty
(
ptsList
))
{
ptsList
=
new
ArrayList
<>();
for
(
PtsptaVo
ptsptaVo
:
ptsptaVos
)
{
ptsList
.
add
(
ptsptaVo
.
getPts
());
}
}
if
(
CollectionUtils
.
isEmpty
(
ptsList
))
{
return
;
}
//! Defines role of the bank and the customer of the passed contract and PTAINR of the role as well
//! The passed contract has to be loaded completely
// role can be set dynamically dependent on the contract context
cci
.
setCcicusrol
(
"APL"
);
Optional
<
Pts
>
optionalPts
=
ptsList
.
stream
().
filter
(
pts
->
cci
.
getCcicusrol
().
equalsIgnoreCase
(
pts
.
getRol
())).
findFirst
();
if
(
optionalPts
.
isPresent
())
{
cci
.
setCcicusptainr
(
optionalPts
.
get
().
getPtainr
());
}
cci
.
setCcibanptainr
(
""
);
cci
.
setCcibanrol
(
""
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtlop/service/FxtpService.java
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
fxtlop
.
service
;
import
com.brilliance.isc.bo.model.Fxdgrp
;
import
com.brilliance.isc.bo.model.Fxtp
;
import
com.brilliance.isc.funds.bo.funds.FxtlopStoreBo
;
public
interface
FxtpService
{
void
initFxtp
(
FxtlopStoreBo
fxtlopStoreBo
);
void
defaultFxtp
(
FxtlopStoreBo
fxtlopStoreBo
);
void
defaultCalculateN1100
(
Fxdgrp
fxdgrp
,
Fxtp
fxtp
);
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtlop/service/impl/FxtpServiceImpl.java
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
fxtlop
.
service
.
impl
;
import
com.brilliance.isc.bo.Cbb
;
import
com.brilliance.isc.bo.Cur
;
import
com.brilliance.isc.bo.Fxd
;
import
com.brilliance.isc.bo.model.Fxdgrp
;
import
com.brilliance.isc.bo.model.Fxtp
;
import
com.brilliance.isc.common.cbsmod.service.XrtmodService
;
import
com.brilliance.isc.common.context.SettleContext
;
import
com.brilliance.isc.funds.bo.funds.FxtlopStoreBo
;
import
com.brilliance.isc.funds.fxtlop.service.FxtpService
;
import
com.brilliance.isc.mda.dao.CurMapper
;
import
com.brilliance.mda.runtime.mda.util.Decimals
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
org.apache.xmlbeans.impl.xb.xsdschema.Public
;
import
com.brilliance.mda.runtime.mda.util.Strings
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.Objects
;
import
static
com
.
brilliance
.
mda
.
runtime
.
mda
.
Constants
.
NULLSTR
;
@Service
public
class
FxtpServiceImpl
implements
FxtpService
{
@Resource
private
XrtmodService
xrtmodService
;
@Resource
private
CurMapper
curMapper
;
@Override
public
void
initFxtp
(
FxtlopStoreBo
fxtlopStoreBo
){
public
void
initFxtp
(
FxtlopStoreBo
fxtlopStoreBo
)
{
}
@Override
public
void
defaultFxtp
(
FxtlopStoreBo
fxtlopStoreBo
){
public
void
defaultFxtp
(
FxtlopStoreBo
fxtlopStoreBo
)
{
String
frame
=
SettleContext
.
getTransName
();
if
(
MdaUtils
.
compareTo
(
frame
,
"FXTSOP"
)
!=
0
&&
MdaUtils
.
compareTo
(
frame
,
"FXTBOP"
)
!=
0
&&
MdaUtils
.
compareTo
(
frame
,
"FXTEOP"
)
!=
0
)
{
if
(
MdaUtils
.
compareTo
(
frame
,
"FXTSOP"
)
!=
0
&&
MdaUtils
.
compareTo
(
frame
,
"FXTBOP"
)
!=
0
&&
MdaUtils
.
compareTo
(
frame
,
"FXTEOP"
)
!=
0
)
{
// //! Read USRGET\\USR according to USR.
// if( MdaUtils.compareTo(fxtlopStoreBo.getUsrget().getUsr().getExtkey(),fxtlopStoreBo.getFxdgrp().getRec().getUsr()) != 0 )
// {
...
...
@@ -76,4 +95,87 @@ public class FxtpServiceImpl implements FxtpService {
}
/**
* source:fxtp.0013.script
*/
@Override
// @Default(value={"fxdgrp.cbs.max.amt","fxdgrp.cbs.nom1.amt"},order=1100)
public
void
defaultCalculateN1100
(
Fxdgrp
fxdgrp
,
Fxtp
fxtp
)
{
fxdgrp
.
reset
();
fxtp
.
reset
();
Fxd
rec
=
fxdgrp
.
getRec
();
Cbb
max
=
fxdgrp
.
getCbs
().
getMax
();
Cbb
nom1
=
fxdgrp
.
getCbs
().
getNom1
();
int
bas
=
0
;
String
sql
=
NULLSTR
;
BigDecimal
baseunit
=
null
;
if
(
MdaUtils
.
compareTo
(
fxtp
.
getCalflg
(),
""
)
==
0
)
{
if
(
MdaUtils
.
compareTo
(
fxtp
.
getFrgchk
(),
"X"
)
==
0
)
{
//换算外币
if
(!
MdaUtils
.
isEmpty
(
rec
.
getRat
())
&&
!
MdaUtils
.
isEmpty
(
nom1
.
getCur
()))
{
if
(
Strings
.
pos
(
"-RUB-JPY-KRW-"
,
max
.
getCur
())
>
0
&&
Strings
.
pos
(
"-FXTLOP-FXTLCM-FXTLCN-"
,
SettleContext
.
getTransName
())
>
0
)
{
if
(
MdaUtils
.
compareTo
(
rec
.
getRat
(),
0
)
>
0
)
{
nom1
.
setAmt
(
xrtmodService
.
amtRnd
(
Decimals
.
div
(
max
.
getAmt
(),
rec
.
getRat
()),
nom1
.
getCur
()));
}
}
else
{
nom1
.
setAmt
(
xrtmodService
.
amtRnd
(
Decimals
.
mul
(
max
.
getAmt
(),
rec
.
getRat
()),
nom1
.
getCur
()));
Cur
queryCur
=
new
Cur
();
queryCur
.
setCod
(
max
.
getCur
());
Cur
cur
=
curMapper
.
selectByCod
(
queryCur
);
// sql = "SELECT BAS FROM CUR WHERE COD = '" + fxdgrp.getCbs().getMax().getCur() + "'";
if
(
Objects
.
nonNull
(
cur
))
{
bas
=
cur
.
getBas
();
}
else
{
bas
=
1
;
}
baseunit
=
xrtmodService
.
crossRatebas
(
max
.
getCur
(),
nom1
.
getCur
());
if
(
MdaUtils
.
compareTo
(
baseunit
,
bas
)
>=
0
)
{
nom1
.
setAmt
(
Decimals
.
div
(
nom1
.
getAmt
(),
bas
));
}
else
{
if
(
MdaUtils
.
compareTo
(
baseunit
,
1
)
<
0
)
{
nom1
.
setAmt
(
Decimals
.
div
(
nom1
.
getAmt
(),
bas
));
}
else
{
nom1
.
setAmt
(
Decimals
.
div
(
nom1
.
getAmt
(),
baseunit
));
}
}
}
}
else
{
nom1
.
setAmt
(
new
BigDecimal
(
0
));
}
}
else
{
if
(
MdaUtils
.
compareTo
(
fxtp
.
getCnychk
(),
"X"
)
==
0
)
{
//换算人民币
if
(!
MdaUtils
.
isEmpty
(
rec
.
getRat
())
&&
!
MdaUtils
.
isEmpty
(
max
.
getCur
()))
{
max
.
setAmt
(
xrtmodService
.
amtRnd
(
Decimals
.
div
(
nom1
.
getAmt
(),
rec
.
getRat
()),
max
.
getCur
()));
Cur
queryCur
=
new
Cur
();
queryCur
.
setCod
(
max
.
getCur
());
Cur
cur
=
curMapper
.
selectByCod
(
queryCur
);
// sql = "SELECT BAS FROM CUR WHERE COD = '" + fxdgrp.getCbs().getMax().getCur() + "'";
if
(
Objects
.
nonNull
(
cur
))
{
bas
=
cur
.
getBas
();
}
else
{
bas
=
1
;
}
max
.
setAmt
(
Decimals
.
mul
(
max
.
getAmt
(),
bas
));
}
else
{
max
.
setAmt
(
new
BigDecimal
(
0
));
}
}
}
}
else
{
if
(!
MdaUtils
.
isEmpty
(
rec
.
getRat
())
&&
!
MdaUtils
.
isEmpty
(
max
.
getCur
()))
{
max
.
setAmt
(
xrtmodService
.
amtRnd
(
Decimals
.
div
(
nom1
.
getAmt
(),
rec
.
getRat
()),
max
.
getCur
()));
Cur
queryCur
=
new
Cur
();
queryCur
.
setCod
(
max
.
getCur
());
Cur
cur
=
curMapper
.
selectByCod
(
queryCur
);
// sql = "SELECT BAS FROM CUR WHERE COD = '" + fxdgrp.getCbs().getMax().getCur() + "'";
if
(
Objects
.
nonNull
(
cur
))
{
bas
=
cur
.
getBas
();
}
else
{
bas
=
1
;
}
nom1
.
setAmt
(
Decimals
.
mul
(
nom1
.
getAmt
(),
bas
));
}
else
{
max
.
setAmt
(
new
BigDecimal
(
0
));
}
}
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtssb/check/FxtssbValidator.java
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
fxtssb
.
check
;
import
com.brilliance.isc.bo.Fxd
;
import
com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator
;
import
com.brilliance.isc.common.transaction.newcheck.ValidResult
;
import
com.brilliance.isc.common.transaction.newcheck.Validate
;
import
com.brilliance.isc.funds.bo.funds.FxtssbStoreBo
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
com.brilliance.mda.runtime.mda.util.Strings
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
...
...
@@ -26,11 +31,97 @@ public class FxtssbValidator extends AbstractModuleValidator<FxtssbStoreBo> {
}
@Override
public
Map
<
String
,
String
>
validate
(
FxtssbStoreBo
v
o
)
{
public
Map
<
String
,
String
>
validate
(
FxtssbStoreBo
b
o
)
{
Map
<
String
,
String
>
maps
=
new
HashMap
<>();
maps
.
putAll
(
super
.
validate
(
v
o
));
maps
.
putAll
(
super
.
validate
(
b
o
));
return
maps
;
}
/**
* source:fxtssb.0017.script
*/
@Validate
(
path
=
"fxdgrp.rec.trnman"
)
public
ValidResult
checkFxdgrpRecTrnmanN1000
(
FxtssbStoreBo
bo
)
{
if
(
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getRec
().
getTrnman
()))
{
return
errorMandatory
();
}
return
null
;
}
/**
* source:fxtssb.0018.script
*/
@Validate
(
path
=
"fxdgrp.rec.trdint"
)
public
ValidResult
checkFxdgrpRecTrdintN1000
(
FxtssbStoreBo
bo
)
{
Fxd
rec
=
bo
.
getFxdgrp
().
getRec
();
if
(
MdaUtils
.
compareTo
(
Strings
.
mid
(
rec
.
getFxtyp
(),
2
,
1
),
"B"
)
==
0
&&
MdaUtils
.
isEmpty
(
rec
.
getTrdint
()))
{
return
errorMandatory
();
}
return
null
;
}
/**
* source:fxtssb.0019.script
*/
@Validate
(
path
=
"fxdgrp.rec.trdout"
)
public
ValidResult
checkFxdgrpRecTrdoutN1000
(
FxtssbStoreBo
bo
)
{
Fxd
rec
=
bo
.
getFxdgrp
().
getRec
();
if
(
MdaUtils
.
compareTo
(
Strings
.
mid
(
rec
.
getFxtyp
(),
2
,
1
),
"S"
)
==
0
&&
MdaUtils
.
isEmpty
(
rec
.
getTrdout
()))
{
return
errorMandatory
();
}
return
null
;
}
/**
* source:fxtssb.0020.script
*/
@Validate
(
path
=
"fxdgrp.rec.acc"
)
public
ValidResult
checkFxdgrpRecAccN1000
(
FxtssbStoreBo
bo
)
{
if
(
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getRec
().
getAcc
()))
{
return
errorMandatory
();
}
return
null
;
}
/**
* source:fxtssb.0021.script
*/
@Validate
(
path
=
"fxdgrp.rec.acc2"
)
public
ValidResult
checkFxdgrpRecAcc2N1000
(
FxtssbStoreBo
bo
)
{
if
(
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getRec
().
getAcc2
()))
{
return
errorMandatory
();
}
return
null
;
}
/**
* source:fxtssb.0027.script
*/
@Validate
(
path
=
"fxdgrp.rec.dsp"
)
public
ValidResult
checkFxdgrpRecDspN1000
(
FxtssbStoreBo
bo
)
{
if
(
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getRec
().
getDsp
()))
{
return
errorMandatory
();
}
return
null
;
}
/**
* source:fxtssb.0028.script
*/
@Validate
(
path
=
"fxdgrp.rec.dsp2"
)
public
ValidResult
checkFxdgrpRecDsp2N1000
(
FxtssbStoreBo
bo
)
{
if
(
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getRec
().
getDsp2
()))
{
return
errorMandatory
();
}
return
null
;
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtssb/register/fee/FxtssbFeeRegister.java
0 → 100644
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
fxtssb
.
register
.
fee
;
import
com.brilliance.isc.common.register.fee.AbstractFeeRegister
;
import
com.brilliance.isc.common.register.fee.common.SetmodFeeRegister
;
import
com.brilliance.isc.common.setmod.vo.SetmodVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
@Component
(
"fxtssb.feeRegister"
)
public
class
FxtssbFeeRegister
extends
AbstractFeeRegister
{
@Autowired
private
SetmodFeeRegister
setmodFeeRegister
;
@Override
public
void
registerSettlement
(
SetmodVo
setmodVo
)
{
transRegister
(
setmodVo
);
setmodFeeRegister
.
registerSettlement
(
setmodVo
);
}
private
void
transRegister
(
SetmodVo
setmodVo
)
{
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtssb/resource/FxtssbResource.java
View file @
230cc0d3
...
...
@@ -58,10 +58,45 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo>
@PostMapping
(
"/defaultAccountsN1000"
)
public
ResponseSet
defaultAccountsN1000
(
@RequestBody
FxtssbStoreVo
fxtssbStoreVo
)
{
Map
<
String
,
List
<
String
>>
codeSet
=
fxtssbTransactionService
.
defaultAccountsN1000
(
fxtssbStoreVo
);
ResponseSet
success
=
ResponseSet
.
simpleSuccess
(
fxtssbStoreVo
);
success
.
setCodeSet
(
codeSet
);
return
success
;
try
{
settleContext
.
loadSettleSession
(
"FXTSSB"
,
""
,
""
);
Map
<
String
,
List
<
String
>>
codeSet
=
fxtssbTransactionService
.
defaultAccountsN1000
(
fxtssbStoreVo
);
ResponseSet
success
=
ResponseSet
.
simpleSuccess
(
fxtssbStoreVo
);
success
.
setCodeSet
(
codeSet
);
return
success
;
}
catch
(
Exception
e
)
{
throw
e
;
}
finally
{
SettleContext
.
removeUserSession
();
}
}
@PostMapping
(
"/defaultRateN1000"
)
public
ResponseSet
defaultRateN1000
(
@RequestBody
FxtssbStoreVo
fxtssbStoreVo
)
{
try
{
settleContext
.
loadSettleSession
(
"FXTSSB"
,
""
,
""
);
fxtssbTransactionService
.
defaultRateN1000
(
fxtssbStoreVo
);
return
ResponseSet
.
simpleSuccess
(
fxtssbStoreVo
);
}
catch
(
Exception
e
)
{
throw
e
;
}
finally
{
SettleContext
.
removeUserSession
();
}
}
@PostMapping
(
"/defaultCalculateN1100"
)
public
ResponseSet
defaultCalculateN1100
(
@RequestBody
FxtssbStoreVo
fxtssbStoreVo
)
{
try
{
settleContext
.
loadSettleSession
(
"FXTSSB"
,
""
,
""
);
fxtssbTransactionService
.
defaultCalculateN1100
(
fxtssbStoreVo
);
return
ResponseSet
.
simpleSuccess
(
fxtssbStoreVo
);
}
catch
(
Exception
e
)
{
throw
e
;
}
finally
{
SettleContext
.
removeUserSession
();
}
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtssb/service/FxtssbTransactionServiceImpl.java
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
fxtssb
.
service
;
import
com.brilliance.isc.bo.Bch
;
import
com.brilliance.isc.bo.Pta
;
import
com.brilliance.isc.bo.*
;
import
com.brilliance.isc.bo.model.Fxacbs
;
import
com.brilliance.isc.bo.model.Fxdgrp
;
import
com.brilliance.isc.common.api.bch.service.BchService
;
...
...
@@ -11,6 +10,8 @@ import com.brilliance.isc.common.cbsmod.service.XrtmodService;
import
com.brilliance.isc.common.contants.CommonContants
;
import
com.brilliance.isc.common.context.SettleContext
;
import
com.brilliance.isc.common.glemod.service.GlemodService
;
import
com.brilliance.isc.common.setmod.service.SetmodService
;
import
com.brilliance.isc.common.setmod.vo.SetmodVo
;
import
com.brilliance.isc.common.sysmod.SysmodService
;
import
com.brilliance.isc.common.transaction.AbstractTransactionService
;
import
com.brilliance.isc.common.transaction.help.TransactionHelpService
;
...
...
@@ -24,16 +25,15 @@ import com.brilliance.isc.common.vo.BizInfoVo;
import
com.brilliance.isc.common.vo.PtsptaVo
;
import
com.brilliance.isc.funds.bo.funds.FxtssbStoreBo
;
import
com.brilliance.isc.funds.common.component.FxToolComponent
;
import
com.brilliance.isc.funds.fxtlop.service.FxtpService
;
import
com.brilliance.isc.funds.fxtssb.check.FxtssbValidator
;
import
com.brilliance.isc.funds.vo.funds.FxtssbStoreVo
;
import
com.brilliance.isc.mda.dao.PtyratMapper
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
com.brilliance.mda.runtime.mda.IStream
;
import
com.brilliance.mda.runtime.mda.impl.Argument
;
import
com.brilliance.mda.runtime.mda.impl.StreamImpl
;
import
com.brilliance.mda.runtime.mda.util.Dates
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
com.brilliance.mda.runtime.mda.util.Streams
;
import
com.brilliance.mda.runtime.mda.util.Strings
;
import
com.brilliance.mda.runtime.mda.util.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -89,10 +89,20 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
@Resource
private
BchService
bchService
;
@Resource
private
PtyratMapper
ptyratMapper
;
@Resource
private
SetmodService
setmodService
;
@Resource
private
FxtpService
fxtpService
;
@PostConstruct
public
void
regisertService
()
{
serviceRegisterMaps
.
put
(
CommonContants
.
SETMOD_SERVICE
,
"Y"
);
serviceRegisterMaps
.
put
(
CommonContants
.
TRNDOC_SERVICE
,
"
Y
"
);
serviceRegisterMaps
.
put
(
CommonContants
.
TRNDOC_SERVICE
,
"
N
"
);
serviceRegisterMaps
.
put
(
CommonContants
.
GLEMOD_SERVICE
,
"Y"
);
serviceRegisterMaps
.
put
(
CommonContants
.
TRNMOD_SERVICE
,
"Y"
);
}
...
...
@@ -133,6 +143,18 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
protected
BizInfoVo
buildBizInfo
(
FxtssbStoreBo
transactionVo
)
{
FxdBizInfoVo
bizInfoVo
=
new
FxdBizInfoVo
();
bizInfoVo
.
setObjtyp
(
"FXD"
);
Fxd
rec
=
transactionVo
.
getFxdgrp
().
getRec
();
bizInfoVo
.
setObjinr
(
rec
.
getInr
());
bizInfoVo
.
setOwnref
(
rec
.
getOwnref
());
bizInfoVo
.
setFxtyp
(
rec
.
getFxtyp
());
bizInfoVo
.
setAcc
(
rec
.
getAcc
());
bizInfoVo
.
setAcc2
(
rec
.
getAcc2
());
bizInfoVo
.
setDsp
(
rec
.
getDsp
());
bizInfoVo
.
setDsp2
(
rec
.
getDsp2
());
bizInfoVo
.
setTrdint
(
rec
.
getTrdint
());
bizInfoVo
.
setTrdout
(
rec
.
getTrdout
());
bizInfoVo
.
setTrnman
(
rec
.
getTrnman
());
bizInfoVo
.
setRat
(
rec
.
getRat
());
return
bizInfoVo
;
}
...
...
@@ -167,6 +189,8 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
bo
.
getFxdgrp
().
getRec
().
setOpndat
(
Dates
.
today
());
//这笔结售汇业务的起息日,系统默认为成交日,可以根据业务实际情况修改。
bo
.
getFxdgrp
().
getRec
().
setValdat
(
bo
.
getFxdgrp
().
getRec
().
getOpndat
());
//换算外币
bo
.
getFxtp
().
setFrgchk
(
"X"
);
}
...
...
@@ -199,10 +223,10 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
cbsmodService
.
cbsTrnSetNew
(
"TRN"
,
trnmodVo
.
getTrn
().
getInr
());
Fxacbs
cbs
=
transactionVo
.
getFxdgrp
().
getCbs
();
String
trninr
=
transactionHelpService
.
getTrninr
();
trnmodService
.
cbsTrnStore
(
"MAXAMT"
,
"AMT1"
,
Dates
.
today
(),
cbs
.
getMax
().
getCur
(),
cbs
.
getMax
().
getAmt
(),
I18nUtil
.
getMessage
(
"funds_fxtssb_000000"
),
transactionVo
.
getFxdgrp
(),
trninr
);
trnmodService
.
cbsTrnStore
(
"MAXAMT"
,
"AMT1"
,
Dates
.
today
(),
cbs
.
getMax
().
getCur
(),
cbs
.
getMax
().
getAmt
(),
I18nUtil
.
getMessage
(
"funds_fxtssb_000000"
),
transactionVo
.
getFxdgrp
()
.
getRec
()
,
trninr
);
if
(!
MdaUtils
.
isEmpty
(
cbs
.
getNom1
().
getAmt
()))
{
trnmodService
.
cbsTrnStore
(
"NOMAMT"
,
"AMT1"
,
Dates
.
today
(),
cbs
.
getNom1
().
getCur
(),
cbs
.
getNom1
().
getAmt
(),
I18nUtil
.
getMessage
(
"funds_fxtssb_000000"
),
transactionVo
.
getFxdgrp
(),
trninr
);
trnmodService
.
cbsTrnStore
(
"UTLAMT"
,
"AMT1"
,
Dates
.
today
(),
cbs
.
getMax
().
getCur
(),
cbs
.
getMax
().
getAmt
(),
I18nUtil
.
getMessage
(
"funds_fxtssb_000000"
),
transactionVo
.
getFxdgrp
(),
trninr
);
trnmodService
.
cbsTrnStore
(
"NOMAMT"
,
"AMT1"
,
Dates
.
today
(),
cbs
.
getNom1
().
getCur
(),
cbs
.
getNom1
().
getAmt
(),
I18nUtil
.
getMessage
(
"funds_fxtssb_000000"
),
transactionVo
.
getFxdgrp
()
.
getRec
()
,
trninr
);
trnmodService
.
cbsTrnStore
(
"UTLAMT"
,
"AMT1"
,
Dates
.
today
(),
cbs
.
getMax
().
getCur
(),
cbs
.
getMax
().
getAmt
(),
I18nUtil
.
getMessage
(
"funds_fxtssb_000000"
),
transactionVo
.
getFxdgrp
()
.
getRec
()
,
trninr
);
}
}
...
...
@@ -290,4 +314,127 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
fxToolComponent
.
getref
(
fxdgrp
);
return
fxdgrp
.
getRec
().
getOwnref
();
}
/**
* source:fxtssb.0005.script
* fxdgrp.cbs.max.cur 外币币种
* fxdgrp.apl.pts.ptyinr 申请人
* fxdgrp.rec.fxtyp 结售汇类型 SB:即期结售汇
* fxtp.cshflg 钞汇标志 1:现汇 2:现钞
* fxtp.quoflg Quote Flag
*/
public
void
defaultRateN1000
(
FxtssbStoreVo
vo
)
{
vo
.
reset
();
String
rmbRat
=
NULLSTR
;
BigDecimal
buyRat
=
null
;
BigDecimal
selRat
=
null
;
BigDecimal
midRat
=
null
;
BigDecimal
buy1Rat
=
null
;
String
selTyp
=
NULLSTR
;
BigDecimal
selPreRat
=
null
;
String
buyTyp
=
NULLSTR
;
BigDecimal
buyPreRat
=
null
;
String
setCur
=
NULLSTR
;
BigDecimal
setAmt
=
BigDecimal
.
ZERO
;
BigDecimal
favRat
=
BigDecimal
.
ZERO
;
Cbb
max
=
vo
.
getFxdgrp
().
getCbs
().
getMax
();
Fxd
rec
=
vo
.
getFxdgrp
().
getRec
();
Pts
pts
=
vo
.
getFxdgrp
().
getApl
().
getPts
();
if
(
MdaUtils
.
isEmpty
(
vo
.
getFxtp
().
getQuoflg
())
&&
!
MdaUtils
.
isEmpty
(
rec
.
getFxtyp
())
&&
!
MdaUtils
.
isEmpty
(
pts
.
getPtyinr
()))
{
// Systems.setEnabled(vo.getFxdgrp().getRec(), "rat");
Argument
<
String
>
rmbRatBox
=
new
Argument
<
String
>();
Argument
<
BigDecimal
>
buyRatBox
=
new
Argument
<
BigDecimal
>();
Argument
<
BigDecimal
>
selRatBox
=
new
Argument
<
BigDecimal
>();
Argument
<
BigDecimal
>
midRatBox
=
new
Argument
<
BigDecimal
>();
Argument
<
BigDecimal
>
buy1RatBox
=
new
Argument
<
BigDecimal
>();
xrtmodService
.
getratCebTim
(
max
.
getCur
(),
xrtmodService
.
sysiso
(),
Dates
.
today
(),
rmbRatBox
,
buyRatBox
,
selRatBox
,
midRatBox
,
buy1RatBox
);
rmbRat
=
rmbRatBox
.
value
;
buyRat
=
buyRatBox
.
value
;
selRat
=
selRatBox
.
value
;
midRat
=
midRatBox
.
value
;
buy1Rat
=
buy1RatBox
.
value
;
Ptyrat
ptyrat
=
ptyratMapper
.
getPtyratByPtyinrAndCur
(
pts
.
getPtyinr
(),
max
.
getCur
());
if
(
Objects
.
nonNull
(
ptyrat
))
{
selTyp
=
ptyrat
.
getSeltyp
();
selPreRat
=
ptyrat
.
getBuyrat
();
buyTyp
=
ptyrat
.
getBuytyp
();
buyPreRat
=
ptyrat
.
getBuyrat
();
}
// 如果没有优惠,则根据配置文件来进行优惠
setCur
=
max
.
getCur
();
SetmodVo
setmodVo
=
buildSetmodVo
(
vo
);
setAmt
=
setmodService
.
getSettlementAmount
(
setmodVo
,
setCur
);
// 默认都是按照点数优惠
if
(
MdaUtils
.
compareTo
(
setAmt
,
0
)
>
0
)
{
buyTyp
=
"1"
;
selTyp
=
"1"
;
/* TODO setusd.ini 未提供 暂时注释
favRat = vo.getFxtp().getFavorRatePoint(setCur, setAmt);
if (MdaUtils.compareTo(favRat, buyPreRat) > 0) {
buyPreRat = favRat;
}
if (MdaUtils.compareTo(favRat, selPreRat) > 0) {
selPreRat = favRat;
}*/
}
if
(!
rec
.
isModified
(
"rat"
))
{
if
(
MdaUtils
.
compareTo
(
Strings
.
mid
(
rec
.
getFxtyp
(),
2
,
1
),
"B"
)
==
0
)
{
if
(
MdaUtils
.
compareTo
(
vo
.
getFxtp
().
getCshflg
(),
"2"
)
==
0
)
{
rec
.
setRat
(
buy1Rat
);
}
else
{
switch
(
buyTyp
)
{
case
"1"
:
rec
.
setRat
(
Decimals
.
add
(
buyRat
,
Decimals
.
div
(
buyPreRat
,
10000
)));
break
;
case
"2"
:
rec
.
setRat
(
Decimals
.
add
(
buyRat
,
Decimals
.
div
(
Decimals
.
mul
(
buyRat
,
buyPreRat
),
100
)));
break
;
default
:
rec
.
setRat
(
buyRat
);
}
}
}
else
{
switch
(
Strings
.
trim
(
selTyp
))
{
case
"1"
:
rec
.
setRat
(
Decimals
.
sub
(
selRat
,
Decimals
.
div
(
selPreRat
,
10000
)));
break
;
case
"2"
:
rec
.
setRat
(
Decimals
.
sub
(
selRat
,
Decimals
.
div
(
Decimals
.
mul
(
selRat
,
selPreRat
),
100
)));
break
;
default
:
rec
.
setRat
(
selRat
);
}
}
}
rec
.
setRat
(
Numerics
.
round
(
rec
.
getRat
(),
4
));
rec
.
setMidrat
(
Numerics
.
round
(
midRat
,
4
));
}
else
{
// Systems.resetEnabled(rec, "rat");
rec
.
setRat
(
BigDecimal
.
ZERO
);
rec
.
setMidrat
(
BigDecimal
.
ZERO
);
}
}
private
SetmodVo
buildSetmodVo
(
FxtssbStoreVo
vo
)
{
SetmodVo
setmodVo
=
new
SetmodVo
();
Map
cbsMap
=
new
HashMap
();
Cbb
max
=
vo
.
getFxdgrp
().
getCbs
().
getMax
();
cbsMap
.
put
(
"MAX"
,
max
);
setmodVo
.
setCbsMap
(
cbsMap
);
List
<
PtsptaVo
>
ptsList
=
new
ArrayList
();
PtsptaVo
apl
=
vo
.
getFxdgrp
().
getApl
();
ptsList
.
add
(
apl
);
setmodVo
.
setPtsList
(
ptsList
);
FxdBizInfoVo
bizInfoVo
=
new
FxdBizInfoVo
();
bizInfoVo
.
setObjtyp
(
"FXD"
);
setmodVo
.
setRec
(
bizInfoVo
);
return
setmodVo
;
}
public
void
defaultCalculateN1100
(
FxtssbStoreVo
fxtssbStoreVo
)
{
fxtssbStoreVo
.
reset
();
fxtpService
.
defaultCalculateN1100
(
fxtssbStoreVo
.
getFxdgrp
(),
fxtssbStoreVo
.
getFxtp
());
}
}
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