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
1c47f394
Commit
1c47f394
authored
Oct 12, 2024
by
jianglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开发fxtfop交易
parent
2b742cbc
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
782 additions
and
0 deletions
+782
-0
FxtfopValidator.java
...om/brilliance/isc/funds/fxtfop/check/FxtfopValidator.java
+30
-0
FxtfopDocSet.java
...om/brilliance/isc/funds/fxtfop/document/FxtfopDocSet.java
+33
-0
FxtfopDiasavRegister.java
...sc/funds/fxtfop/register/diasav/FxtfopDiasavRegister.java
+45
-0
FxtfopDocumentRegister.java
...isc/funds/fxtfop/register/doc/FxtfopDocumentRegister.java
+26
-0
FxtfopFeeRegister.java
...ance/isc/funds/fxtfop/register/fee/FxtfopFeeRegister.java
+26
-0
FxtfopSettleRegister.java
...sc/funds/fxtfop/register/settle/FxtfopSettleRegister.java
+89
-0
FxtfopResource.java
.../brilliance/isc/funds/fxtfop/resource/FxtfopResource.java
+85
-0
FxtfopTransactionServiceImpl.java
...sc/funds/fxtfop/service/FxtfopTransactionServiceImpl.java
+312
-0
FxtfopStoreBo.java
...java/com/brilliance/isc/funds/bo/funds/FxtfopStoreBo.java
+35
-0
FxtfopStructMapper.java
...ce/isc/funds/transfer/transaction/FxtfopStructMapper.java
+64
-0
FxtfopStoreVo.java
...java/com/brilliance/isc/funds/vo/funds/FxtfopStoreVo.java
+37
-0
No files found.
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/check/FxtfopValidator.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
check
;
import
com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator
;
import
com.brilliance.isc.funds.bo.funds.FxtfopStoreBo
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
import
java.util.HashMap
;
import
java.util.Map
;
@Component
public
class
FxtfopValidator
extends
AbstractModuleValidator
<
FxtfopStoreBo
>
{
@Override
@PostConstruct
public
void
register
()
{
super
.
register
();
}
@Override
public
Map
<
String
,
String
>
validate
(
FxtfopStoreBo
vo
)
{
Map
<
String
,
String
>
maps
=
new
HashMap
<>();
maps
.
putAll
(
super
.
validate
(
vo
));
return
maps
;
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/document/FxtfopDocSet.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
document
;
import
com.brilliance.isc.doc.handle.impl.AbstractTransactionDocSet
;
import
com.brilliance.isc.funds.bo.funds.FxtfopStoreBo
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
/**
* @program: isc-funds
* @ClassName: FxtfopDocSet
* @description: 即期结汇 Fxtfop 面函
* @author: huangshunlin
* @create: 2024-10-08 15:39
*/
@Component
(
"fxtfop.docset"
)
public
class
FxtfopDocSet
extends
AbstractTransactionDocSet
<
FxtfopStoreBo
>
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FxtfopDocSet
.
class
);
/**
* 构建需要支持的面函组件
*/
@PostConstruct
public
void
buildMember
()
{
//扫描Cortype支持,必须要执行
scanDocCortypSupport
();
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/register/diasav/FxtfopDiasavRegister.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
register
.
diasav
;
import
com.brilliance.isc.common.register.diasav.IDiasavRegister
;
import
com.brilliance.isc.common.register.diasav.common.DftcreDiasavRegister
;
import
com.brilliance.isc.common.register.diasav.common.LiaallDiasavRegister
;
import
com.brilliance.isc.common.register.diasav.common.LiaallDiasavZZZRegister
;
import
com.brilliance.isc.common.register.diasav.common.TrtcreDiasavRegister
;
import
com.brilliance.isc.common.trndia.service.TrndiaService
;
import
com.brilliance.isc.common.trndia.vo.TrndiaVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
/**
* @program: isc-funds
* @ClassName: FxtfopDiasavRegister
* @description: 即期结汇 Fxtfop 备忘录注册
* @author: huangshunlin
* @create: 2024-10-08 15:39
*/
@Component
(
"fxtfop.diasavRegister"
)
public
class
FxtfopDiasavRegister
implements
IDiasavRegister
{
@Autowired
private
TrndiaService
trndiaService
;
@Autowired
private
LiaallDiasavRegister
liaallDiasavRegister
;
@Autowired
private
LiaallDiasavZZZRegister
liaallDiasavZZZRegister
;
@Autowired
private
TrtcreDiasavRegister
trtcreDiasavRegister
;
@Autowired
private
DftcreDiasavRegister
dftcreDiasavRegister
;
@Override
public
void
diasav
(
TrndiaVo
trndia
)
{
trnDiasav
(
trndia
);
liaallDiasavRegister
.
diasav
(
trndia
);
liaallDiasavZZZRegister
.
diasav
(
trndia
);
trtcreDiasavRegister
.
diasav
(
trndia
);
dftcreDiasavRegister
.
diasav
(
trndia
);
}
private
void
trnDiasav
(
TrndiaVo
trndiaVo
)
{
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/register/doc/FxtfopDocumentRegister.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
register
.
doc
;
import
com.brilliance.isc.common.register.document.IDocumentRegister
;
import
com.brilliance.isc.common.trndoc.vo.TrndocVo
;
import
org.springframework.stereotype.Component
;
/**
* @program: isc-funds
* @ClassName: FxtfopDocumentRegister
* @description: 即期结汇 Fxtfop 面函注册
* @author: huangshunlin
* @create: 2024-10-08 15:39
*/
@Component
(
"fxtfop.documentRegister"
)
public
class
FxtfopDocumentRegister
implements
IDocumentRegister
{
@Override
public
void
registerDocument
(
TrndocVo
trndoc
)
{
doRegister
(
trndoc
);
}
public
void
doRegister
(
TrndocVo
trndoc
)
{
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/register/fee/FxtfopFeeRegister.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
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
(
"fxtfop.feeRegister"
)
public
class
FxtfopFeeRegister
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/fxtfop/register/settle/FxtfopSettleRegister.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
register
.
settle
;
import
com.brilliance.isc.common.register.settle.DefaultSettleRegister
;
import
com.brilliance.isc.common.register.settle.ISettleRegister
;
import
com.brilliance.isc.common.register.settle.common.DftcreSettleRegister
;
import
com.brilliance.isc.common.register.settle.common.TrtcreSettleRegister
;
import
com.brilliance.isc.common.setglg.service.SetglgService
;
import
com.brilliance.isc.common.glemod.service.GlemodService
;
import
com.brilliance.isc.common.setglg.vo.SetglgVo
;
import
com.brilliance.isc.common.setmod.service.SetmodService
;
import
com.brilliance.isc.common.setmod.vo.SetmodVo
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
com.brilliance.mda.runtime.mda.util.Strings
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.math.BigDecimal
;
import
static
com
.
brilliance
.
mda
.
runtime
.
mda
.
Constants
.
NULLSTR
;
@Component
(
"fxtfop.settleRegister"
)
public
class
FxtfopSettleRegister
implements
ISettleRegister
{
@Autowired
private
SetmodService
setmodService
;
@Autowired
private
SetglgService
setglgService
;
@Autowired
private
DefaultSettleRegister
defaultSettleRegister
;
@Autowired
private
GlemodService
glemodService
;
@Override
public
void
registerSettlement
(
SetmodVo
setmodVo
)
{
transRegister
(
setmodVo
);
defaultSettleRegister
.
registerSettlement
(
setmodVo
);
//dftcreSettleRegister.registerSettlement(setmodVo);
//trtcreSettleRegister.registerSettlement(setmodVo);
}
/**
* source:fxtfop.0010.script
*/
private
void
transRegister
(
SetmodVo
setmodVo
)
{
//取得上下文
FxdBizInfoVo
rec
=
(
FxdBizInfoVo
)
setmodVo
.
getRec
();
String
maxCur
=
NULLSTR
;
BigDecimal
maxAmt
=
BigDecimal
.
ZERO
;
String
nom1Cur
=
NULLSTR
;
BigDecimal
nom1Amt
=
BigDecimal
.
ZERO
;
if
(
setmodVo
.
getCbsMap
().
get
(
"MAX"
)
!=
null
)
{
maxAmt
=
setmodVo
.
getCbsMap
().
get
(
"MAX"
).
getAmt
();
maxCur
=
setmodVo
.
getCbsMap
().
get
(
"MAX"
).
getCur
();
}
if
(
setmodVo
.
getCbsMap
().
get
(
"NOM1"
)
!=
null
)
{
nom1Amt
=
setmodVo
.
getCbsMap
().
get
(
"NOM1"
).
getAmt
();
nom1Cur
=
setmodVo
.
getCbsMap
().
get
(
"NOM1"
).
getCur
();
}
setmodVo
.
setDoccur
(
maxCur
);
setmodVo
.
setDocamt
(
maxAmt
);
setmodVo
.
setOpnamt
(
maxAmt
);
SetglgVo
setglg
=
setmodVo
.
getSetglg
();
setglgService
.
setglgClrAmount
(
setglg
,
"TRN"
);
setglgService
.
setglgClrAmount
(
setglg
,
"SET"
);
String
act1
=
NULLSTR
;
String
ddtKey
=
NULLSTR
;
String
act4
=
NULLSTR
;
String
cbtKey
=
NULLSTR
;
if
(
!
MdaUtils
.
isEmpty
(
nom1Amt
)
&&
!
MdaUtils
.
isEmpty
(
rec
.
getFxtyp
()
))
{
//D 281101
act1
=
glemodService
.
getAvailAcc
(
"FX-EXS"
,
maxCur
,
""
,
setmodVo
.
getSetamt
());
ddtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"TRN"
,
"OWN"
,
maxCur
,
setmodVo
.
getSetamt
(),
""
,
"FXD"
,
"C"
,
act1
,
""
);
//C:281105
act4
=
glemodService
.
getAvailAcc
(
"FX-ELQ"
,
maxCur
,
""
,
setmodVo
.
getSetamt
()
);
cbtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"SET"
,
"OWN"
,
maxCur
,
setmodVo
.
getSetamt
().
negate
(),
"SET"
,
"FXC"
,
"F"
,
act4
,
"SET"
);
}
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/resource/FxtfopResource.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
resource
;
import
com.brilliance.isc.common.context.SettleContext
;
import
com.brilliance.isc.common.transaction.controller.AbstractTransactionController
;
import
com.brilliance.isc.funds.fxtfop.service.FxtfopTransactionServiceImpl
;
import
com.brilliance.isc.funds.transfer.transaction.FxtfopStructMapper
;
import
com.brilliance.isc.funds.vo.funds.FxtfopStoreVo
;
import
com.brilliance.isc.funds.vo.funds.FxtssbStoreVo
;
import
com.brilliance.isc.transfer.IStructMapper
;
import
com.brilliance.isc.vo.ResponseSet
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @program: isc-funds
* @ClassName: FxtfopResource
* @description: 即期结汇 Fxtfop 请求入口
* @author: huangshunlin
* @create: 2024-10-08 15:34
*/
@RestController
@RequestMapping
(
"/fxtfop"
)
@Api
(
"外币兑换登记"
)
public
class
FxtfopResource
extends
AbstractTransactionController
<
FxtfopStoreVo
>
{
@Resource
private
FxtfopStructMapper
fxtfopStructMapper
;
public
IStructMapper
getStructMapper
()
{
return
fxtfopStructMapper
;
}
@Resource
(
name
=
"fxtfop.transaction"
)
FxtfopTransactionServiceImpl
fxtfopTransactionService
;
@Autowired
private
SettleContext
settleContext
;
/**
* 根据结售汇类型 等获取业务参号
*
* @param fxtfopStoreVo
* @return
*/
@PostMapping
(
"/getRef"
)
public
ResponseSet
<
String
>
getRef
(
@RequestBody
FxtfopStoreVo
fxtfopStoreVo
)
{
String
ref
=
fxtfopTransactionService
.
getRef
(
fxtfopStoreVo
);
return
ResponseSet
.
simpleSuccess
(
ref
);
}
@PostMapping
(
"/defaultRateN1000"
)
public
ResponseSet
defaultRateN1000
(
@RequestBody
FxtfopStoreVo
fxtfopStoreVo
)
{
try
{
settleContext
.
loadSettleSession
(
"FXTFOP"
,
""
,
""
);
fxtfopTransactionService
.
defaultRateN1000
(
fxtfopStoreVo
);
return
ResponseSet
.
simpleSuccess
(
fxtfopStoreVo
);
}
catch
(
Exception
e
)
{
throw
e
;
}
finally
{
SettleContext
.
removeUserSession
();
}
}
@PostMapping
(
"/defaultCalculateN1100"
)
public
ResponseSet
defaultCalculateN1100
(
@RequestBody
FxtfopStoreVo
fxtfopStoreVo
)
{
try
{
settleContext
.
loadSettleSession
(
"FXTFOP"
,
""
,
""
);
fxtfopTransactionService
.
defaultCalculateN1100
(
fxtfopStoreVo
);
return
ResponseSet
.
simpleSuccess
(
fxtfopStoreVo
);
}
catch
(
Exception
e
)
{
throw
e
;
}
finally
{
SettleContext
.
removeUserSession
();
}
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/service/FxtfopTransactionServiceImpl.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
service
;
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
;
import
com.brilliance.isc.common.cache.pta.PtaCacheService
;
import
com.brilliance.isc.common.cbsmod.service.CbsmodService
;
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.sysmod.SysmodService
;
import
com.brilliance.isc.common.transaction.AbstractTransactionService
;
import
com.brilliance.isc.common.transaction.help.TransactionHelpService
;
import
com.brilliance.isc.common.transaction.help.TransactionServiceSet
;
import
com.brilliance.isc.common.trnmod.service.TrnmodService
;
import
com.brilliance.isc.common.trnmod.vo.TrnmodVo
;
import
com.brilliance.isc.common.util.I18nUtil
;
import
com.brilliance.isc.common.util.StringUtils
;
import
com.brilliance.isc.common.vo.BizAmdInfoVo
;
import
com.brilliance.isc.common.vo.BizInfoVo
;
import
com.brilliance.isc.common.vo.PtsptaVo
;
import
com.brilliance.isc.funds.bo.funds.FxtfopStoreBo
;
import
com.brilliance.isc.funds.common.component.FxToolComponent
;
import
com.brilliance.isc.funds.fxtfop.check.FxtfopValidator
;
import
com.brilliance.isc.funds.fxtlop.service.FxtpService
;
import
com.brilliance.isc.funds.fxtfop.check.FxtfopValidator
;
import
com.brilliance.isc.funds.vo.funds.FxtfopStoreVo
;
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.impl.Argument
;
import
com.brilliance.mda.runtime.mda.util.Dates
;
import
com.brilliance.mda.runtime.mda.util.Decimals
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
org.apache.poi.ss.formula.functions.Today
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.Map
;
import
java.util.Objects
;
import
static
com
.
brilliance
.
mda
.
runtime
.
mda
.
Constants
.
NULLSTR
;
/**
* @program: isc-funds
* @ClassName: FxtfopTransactionServiceImpl
* @description: 即期结汇 Fxtfop 业务处理
* @author: huangshunlin
* @create: 2024-10-08 15:35
*/
@Service
(
"fxtfop.transaction"
)
public
class
FxtfopTransactionServiceImpl
extends
AbstractTransactionService
<
FxtfopStoreBo
>
{
@Resource
private
FxtfopValidator
fxtfopValidator
;
@Resource
private
XrtmodService
xrtmodService
;
@Resource
private
SysmodService
sysmodService
;
@Resource
private
FxToolComponent
fxToolComponent
;
@Resource
private
TransactionHelpService
transactionHelpService
;
@Resource
private
SettleContext
settleContext
;
@Resource
private
CbsmodService
cbsmodService
;
@Resource
private
TrnmodService
trnmodService
;
@Resource
private
GlemodService
glemodService
;
@Autowired
private
PtaCacheService
ptaCacheService
;
@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
.
GLEMOD_SERVICE
,
"Y"
);
//serviceRegisterMaps.put(CommonContants.TRNDIA_SERVICE, "Y");
serviceRegisterMaps
.
put
(
CommonContants
.
TRNMOD_SERVICE
,
"Y"
);
}
@Override
protected
void
txnSave
(
FxtfopStoreBo
transactionVo
)
{
ruleMtabutSavN500
(
transactionVo
);
}
public
void
ruleMtabutSavN500
(
FxtfopStoreBo
bo
)
{
TrnmodVo
trnmodVo
=
transactionHelpService
.
getTransactionStoreSet
().
getTrnmodVo
();
Fxdgrp
fxdgrp
=
bo
.
getFxdgrp
();
fxToolComponent
.
getref
(
fxdgrp
);
fxToolComponent
.
sav
(
fxdgrp
,
BigDecimal
.
ZERO
);
// 2. Build Transaction from FTDGRP
trnmodService
.
trnSetFromContract
(
trnmodVo
);
cbsSav
(
bo
,
trnmodVo
);
}
@Override
protected
Map
<
String
,
String
>
txnCheck
(
FxtfopStoreBo
transactionVo
)
{
return
fxtfopValidator
.
validate
(
transactionVo
);
}
@Override
protected
BizInfoVo
buildBizInfo
(
FxtfopStoreBo
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
;
}
@Override
protected
BizAmdInfoVo
buildBizAmdInfo
(
FxtfopStoreBo
transactionVo
)
{
return
null
;
}
@Override
public
FxtfopStoreBo
init
(
FxtfopStoreBo
fxtfopStoreBo
)
{
fxtfopStoreBo
.
reset
();
init950
(
fxtfopStoreBo
);
init1000
(
fxtfopStoreBo
);
return
fxtfopStoreBo
;
}
/**
* source:fxtfop.0001.script
*/
public
void
init1000
(
FxtfopStoreBo
bo
)
{
bo
.
getFxtp
().
setFrgchk
(
"X"
);
bo
.
getFxdgrp
().
getCbs
().
getNom1
().
setCur
(
xrtmodService
.
sysiso
());
bo
.
getFxdgrp
().
getRec
().
setFxtyp
(
"FB"
);
String
extkey
=
SettleContext
.
getUserSession
().
getUsr
().
getExtkey
();
bo
.
getFxdgrp
().
getRec
().
setUsr
(
extkey
);
if
(
bo
.
getFxdgrp
().
getRec
().
getOpndat
()
==
null
){
bo
.
getFxdgrp
().
getRec
().
setOpndat
(
Dates
.
today
());
}
if
(
bo
.
getFxdgrp
().
getRec
().
getValdat
()
==
null
){
bo
.
getFxdgrp
().
getRec
().
setValdat
(
Dates
.
today
());
}
}
private
void
init950
(
FxtfopStoreBo
fxtfopStoreBo
)
{
}
@Override
public
void
beforeSave
(
FxtfopStoreBo
transactionVo
)
{
transactionVo
.
reset
();
Fxdgrp
fxdgrp
=
transactionVo
.
getFxdgrp
();
TransactionServiceSet
transactionServiceSet
=
transactionHelpService
.
getTransactionStoreSet
();
transactionServiceSet
.
setRec
(
fxdgrp
.
getRec
());
transactionServiceSet
.
setBlk
(
fxdgrp
.
getBlk
());
transactionServiceSet
.
setTransactionVo
(
transactionVo
);
fxToolComponent
.
collectCbsMap
(
transactionServiceSet
,
""
,
fxdgrp
.
getCbs
(),
"max"
,
"nom1"
);
fxToolComponent
.
collectPtsList
(
transactionServiceSet
,
fxdgrp
,
null
);
settleContext
.
loadSettleSession
(
transactionVo
.
getTransName
(),
transactionVo
.
getUserId
(),
buildBizInfo
(
transactionVo
),
transactionServiceSet
.
getPtsList
());
}
@Override
protected
void
updateBizInfoVo
(
BizInfoVo
bizInfoVo
,
FxtfopStoreBo
transactionVo
)
{
bizInfoVo
.
setObjinr
(
transactionVo
.
getFxdgrp
().
getRec
().
getInr
());
}
/**
* source:fxtfop.0003.script
*/
public
void
cbsSav
(
FxtfopStoreBo
transactionVo
,
TrnmodVo
trnmodVo
)
{
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
(),
"Foreign Exchange Liquidation"
,
transactionVo
.
getFxdgrp
(),
trninr
);
trnmodService
.
cbsTrnStore
(
"NOMAMT"
,
"AMT1"
,
Dates
.
today
(),
cbs
.
getNom1
().
getCur
(),
cbs
.
getNom1
().
getAmt
(),
I18nUtil
.
getMessage
(
"funds_fxtfop_000000"
),
transactionVo
.
getFxdgrp
(),
trninr
);
if
(
"FS"
.
equals
(
transactionVo
.
getFxdgrp
().
getRec
().
getFxtyp
())
||
"FB"
.
equals
(
transactionVo
.
getFxdgrp
().
getRec
().
getFxtyp
())){
trnmodService
.
cbsTrnStore
(
"OPNAMT"
,
"AMT1"
,
Dates
.
today
(),
cbs
.
getMax
().
getCur
(),
cbs
.
getMax
().
getAmt
(),
I18nUtil
.
getMessage
(
"funds_fxtfop_000000"
),
transactionVo
.
getFxdgrp
(),
trninr
);
}
}
public
String
getRef
(
FxtfopStoreVo
fxtfopStoreVo
)
{
fxtfopStoreVo
.
reset
();
PtsptaVo
ptsptaVo
=
fxtfopStoreVo
.
getFxdgrp
().
getApl
();
if
(
ptsptaVo
==
null
||
StringUtils
.
isEmpty
(
ptsptaVo
.
getPtainr
()))
{
return
NULLSTR
;
}
Pta
pta
=
ptaCacheService
.
getPtaByInr
(
ptsptaVo
.
getPtainr
());
Bch
wrkbch
=
new
Bch
();
wrkbch
.
setInr
(
pta
.
getBranchinr
());
wrkbch
=
bchService
.
selectByPrimaryKey
(
wrkbch
);
if
(
Objects
.
isNull
(
wrkbch
))
{
return
NULLSTR
;
}
SettleContext
.
getUserSession
().
setWrkbch
(
wrkbch
);
Fxdgrp
fxdgrp
=
fxtfopStoreVo
.
getFxdgrp
();
fxToolComponent
.
getref
(
fxdgrp
);
return
fxdgrp
.
getRec
().
getOwnref
();
}
/**
* source:fxtfop.0008.script
*/
public
void
defaultRateN1000
(
FxtfopStoreVo
vo
){
vo
.
reset
();
String
rmbRat
=
NULLSTR
;
BigDecimal
buyRat
=
null
;
BigDecimal
selRat
=
null
;
BigDecimal
midRat
=
null
;
BigDecimal
buyRat1
=
null
;
BigDecimal
baseunit
=
null
;
Cbb
max
=
vo
.
getFxdgrp
().
getCbs
().
getMax
();
Fxd
rec
=
vo
.
getFxdgrp
().
getRec
();
Pts
pts
=
vo
.
getFxdgrp
().
getApl
().
getPts
();
if
(
!
MdaUtils
.
isEmpty
(
rec
.
getFxtyp
())
&&
!
MdaUtils
.
isEmpty
(
vo
.
getFxdgrp
().
getCbs
().
getMax
().
getCur
())
)
{
/**
CBSMOD\\XRTMOD.getratCebTim ( FXDGRP\\CBS\\MAX\\CUR, SYSISO, Today, $RmbRat, $BuyRat, $SelRat, $MidRat, $BuyRat1 )
**/
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
>
buyRat1Box
=
new
Argument
<
BigDecimal
>();
xrtmodService
.
getratCebTim
(
vo
.
getFxdgrp
().
getCbs
().
getMax
().
getCur
(),
vo
.
getFxdgrp
().
getCbs
().
getNom1
().
getCur
(),
Dates
.
today
(),
rmbRatBox
,
buyRatBox
,
selRatBox
,
midRatBox
,
buyRat1Box
);
rmbRat
=
rmbRatBox
.
value
;
buyRat
=
buyRatBox
.
value
;
selRat
=
selRatBox
.
value
;
midRat
=
midRatBox
.
value
;
buyRat1
=
buyRat1Box
.
value
;
if
(
!
rec
.
isModified
(
"midrat"
)
)
{
baseunit
=
xrtmodService
.
crossRatebas
(
vo
.
getFxdgrp
().
getCbs
().
getMax
().
getCur
(),
vo
.
getFxdgrp
().
getCbs
().
getNom1
().
getCur
()
);
if
(
MdaUtils
.
compareTo
(
baseunit
,
1
)<
0
)
{
rec
.
setMidrat
(
midRat
);
}
else
{
rec
.
setMidrat
(
Decimals
.
mul
(
midRat
,
baseunit
));
}
}
}
else
{
rec
.
setRat
(
BigDecimal
.
ZERO
);
rec
.
setMidrat
(
BigDecimal
.
ZERO
);
}
}
public
void
defaultCalculateN1100
(
FxtfopStoreVo
fxtfopStoreVo
)
{
fxtfopStoreVo
.
reset
();
fxtpService
.
defaultCalculateN1100
(
fxtfopStoreVo
.
getFxdgrp
(),
fxtfopStoreVo
.
getFxtp
());
}
}
isc-funds-entity/src/main/java/com/brilliance/isc/funds/bo/funds/FxtfopStoreBo.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
bo
.
funds
;
import
com.brilliance.isc.bo.model.Fxdgrp
;
import
com.brilliance.isc.bo.model.Fxtp
;
import
com.brilliance.isc.common.transaction.vo.BaseTransactionVo
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
lombok.Data
;
/**
* @program: isc-funds
* @ClassName: FxtsssStoreBo
* @description: 即期结汇bo
* @author: huangshunlin
* @create: 2024-10-08 15:51
*/
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
FxtfopStoreBo
extends
BaseTransactionVo
{
private
Fxdgrp
fxdgrp
;
private
Fxtp
fxtp
;
@Override
public
void
reset
()
{
super
.
reset
();
if
(
fxdgrp
==
null
)
{
fxdgrp
=
new
Fxdgrp
();
}
fxdgrp
.
reset
();
if
(
fxtp
==
null
)
{
fxtp
=
new
Fxtp
();
}
fxtp
.
reset
();
}
}
isc-funds-entity/src/main/java/com/brilliance/isc/funds/transfer/transaction/FxtfopStructMapper.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
transfer
.
transaction
;
import
com.brilliance.isc.funds.bo.funds.FxtfopStoreBo
;
import
com.brilliance.isc.funds.vo.funds.FxtfopStoreVo
;
import
com.brilliance.isc.transfer.IBaseStructMapper
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.MappingTarget
;
import
org.mapstruct.Mappings
;
import
org.mapstruct.factory.Mappers
;
/**
* @program: isc-funds
* @ClassName: FxtssbStructMapper
* @description: 即期结汇转换Fxtssb Bo、Vo之间的转换处理类。如果有很复杂的函数,则可以用适配器模式重写
* @author: huangshunlin
* @create: 2024-10-08 15:27
*/
@Mapper
(
componentModel
=
"spring"
)
public
interface
FxtfopStructMapper
extends
IBaseStructMapper
<
FxtfopStoreBo
,
FxtfopStoreVo
>
{
/**
* 此行语句一定要写,StructMapper需要
*/
FxtfopStructMapper
INSTANCE
=
Mappers
.
getMapper
(
FxtfopStructMapper
.
class
);
/**
* Vo转为Bo
*
* @param vo
* @return 返回业务Bo
*/
@Override
FxtfopStoreBo
voTransferToBo
(
FxtfopStoreVo
vo
);
/**
* Vo追加更新至Bo
*
* @param vo
* @param bo
*/
@Override
@Mappings
({
})
void
voUpdateToBo
(
FxtfopStoreVo
vo
,
@MappingTarget
FxtfopStoreBo
bo
);
/**
* Bo转为Vo
*
* @param bo
* @return 返回Vo
*/
@Override
FxtfopStoreVo
boTransferToVo
(
FxtfopStoreBo
bo
);
/**
* bo追加更新至Bo
*
* @param bo
* @param vo
*/
@Override
void
boUpdateToVo
(
FxtfopStoreBo
bo
,
@MappingTarget
FxtfopStoreVo
vo
);
}
isc-funds-entity/src/main/java/com/brilliance/isc/funds/vo/funds/FxtfopStoreVo.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
vo
.
funds
;
import
com.brilliance.isc.bo.model.Fxdgrp
;
import
com.brilliance.isc.bo.model.Fxtp
;
import
com.brilliance.isc.common.transaction.vo.BaseTransactionVo
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
lombok.Data
;
/**
* @program: isc-funds
* @ClassName: FxtssbStoreVo
* @description: 即期结汇bo
* @author: huangshunlin
* @create: 2024-10-08 15:26
*/
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
FxtfopStoreVo
extends
BaseTransactionVo
{
private
Fxdgrp
fxdgrp
;
private
Fxtp
fxtp
;
@Override
public
void
reset
()
{
super
.
reset
();
if
(
fxdgrp
==
null
)
{
fxdgrp
=
new
Fxdgrp
();
}
fxdgrp
.
reset
();
if
(
fxtp
==
null
)
{
fxtp
=
new
Fxtp
();
}
fxtp
.
reset
();
}
}
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