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
bd202ced
Commit
bd202ced
authored
Oct 17, 2024
by
jianglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增FXTFCN交易
parent
bbadda55
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1101 additions
and
18 deletions
+1101
-18
messages_en_US.properties
...ds-boot/src/main/resources/i18n/messages_en_US.properties
+5
-2
messages_zh_CN.properties
...ds-boot/src/main/resources/i18n/messages_zh_CN.properties
+3
-0
FxToolComponent.java
...rilliance/isc/funds/common/component/FxToolComponent.java
+2
-0
FxtfcmSettleRegister.java
...sc/funds/fxtfcm/register/settle/FxtfcmSettleRegister.java
+15
-14
FxtfcmTransactionServiceImpl.java
...sc/funds/fxtfcm/service/FxtfcmTransactionServiceImpl.java
+5
-1
FxtfcnValidator.java
...om/brilliance/isc/funds/fxtfcn/check/FxtfcnValidator.java
+87
-0
FxtfcnDocset.java
...om/brilliance/isc/funds/fxtfcn/document/FxtfcnDocset.java
+18
-0
FxtfcnDiasavRegister.java
...sc/funds/fxtfcn/register/dissav/FxtfcnDiasavRegister.java
+46
-0
FxtfcnDocumentRegister.java
...isc/funds/fxtfcn/register/doc/FxtfcnDocumentRegister.java
+44
-0
FxtfcnFeeRegister.java
...ance/isc/funds/fxtfcn/register/fee/FxtfcnFeeRegister.java
+39
-0
FxtfcnLiaallRegister.java
...sc/funds/fxtfcn/register/liaall/FxtfcnLiaallRegister.java
+28
-0
FxtfcnSettleRegister.java
...sc/funds/fxtfcn/register/settle/FxtfcnSettleRegister.java
+146
-0
FxtfcnWfeRegister.java
...ance/isc/funds/fxtfcn/register/wfe/FxtfcnWfeRegister.java
+17
-0
FxtfcnResource.java
.../brilliance/isc/funds/fxtfcn/resource/FxtfcnResource.java
+31
-0
FxtfcnTransactionServiceImpl.java
...sc/funds/fxtfcn/service/FxtfcnTransactionServiceImpl.java
+385
-0
FxtfopLiaallRegister.java
...sc/funds/fxtfop/register/liaall/FxtfopLiaallRegister.java
+19
-0
FxtfopTransactionServiceImpl.java
...sc/funds/fxtfop/service/FxtfopTransactionServiceImpl.java
+10
-0
FxtselServiceImpl.java
...ance/isc/funds/fxtsel/service/impl/FxtselServiceImpl.java
+1
-1
FxtfcnStoreBo.java
...java/com/brilliance/isc/funds/bo/funds/FxtfcnStoreBo.java
+70
-0
FxtfcnStructMapper.java
...ce/isc/funds/transfer/transaction/FxtfcnStructMapper.java
+63
-0
FxtfcnStoreVo.java
...java/com/brilliance/isc/funds/vo/funds/FxtfcnStoreVo.java
+67
-0
No files found.
isc-funds-boot/src/main/resources/i18n/messages_en_US.properties
View file @
bd202ced
...
...
@@ -2,4 +2,7 @@
funds_fxtssb_000000
=
Settlement
funds_fxtsss_000000
=
Settlement
funds_fxtfop_000000
=
Foreign Exchange Liquidation
\ No newline at end of file
funds_fxtfop_000000
=
Foreign Exchange Liquidation
funds_fxtfcn_CT000009
=
Foreign Exchange Liquidation
\ No newline at end of file
isc-funds-boot/src/main/resources/i18n/messages_zh_CN.properties
View file @
bd202ced
...
...
@@ -5,3 +5,5 @@ funds_fxtsss_000000=Settlement
funds_fxtfop_000000
=
Foreign Exchange Liquidation
funds_fxtfcn_CT000009
=
Foreign Exchange Liquidation
0136
=
This contract is overdrawn by {0}
\ No newline at end of file
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/component/FxToolComponent.java
View file @
bd202ced
...
...
@@ -74,6 +74,8 @@ public class FxToolComponent {
Date
date
=
Dates
.
add
(
Utils
.
getMaxDate
(),
-
1
);
cbsmodService
.
cbsGetBalance
(
fxdgrp
.
getCbs
().
getMax
(),
"FXD"
,
inr
,
"MAXSUM"
,
"AMT1"
,
date
);
cbsmodService
.
cbsGetBalance
(
fxdgrp
.
getCbs
().
getNom1
(),
"FXD"
,
inr
,
"NOMSUM"
,
"AMT1"
,
date
);
cbsmodService
.
cbsGetBalance
(
fxdgrp
.
getCbs
().
getOpn1
(),
"FXD"
,
inr
,
"OPN"
,
"AMT1"
,
date
);
cbsmodService
.
cbsGetBalance
(
fxdgrp
.
getCbs
().
getOpn2
(),
"FXD"
,
inr
,
"OPN2"
,
"AMT1"
,
date
);
//获取ptspta信息
storePtsToGrp
(
fxdgrp
,
inr
,
"FXD"
);
return
fxdgrp
;
...
...
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfcm/register/settle/FxtfcmSettleRegister.java
View file @
bd202ced
...
...
@@ -104,33 +104,33 @@ public class FxtfcmSettleRegister implements ISettleRegister {
if
(
ptsptaToolComponent
.
ptsIsRolSet
(
fxdgrp
.
getAct
())
)
{
if
(
ptsptaToolComponent
.
ptsIsRolSet
(
fxdgrp
.
getAct
())
)
if
(
ptsptaToolComponent
.
IsDemestic
(
fxdgrp
.
getAct
())
)
{
acctyp
=
"DB-CLR"
;
acc
=
glemodService
.
getAvailAcc
(
acctyp
,
maxCur
,
fxdgrp
.
getAct
().
getPts
().
getPtyinr
(),
setmodVo
.
getSetamt
()
);
cdtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"SET"
,
"APL"
,
maxCur
,
setmodVo
.
getSetamt
().
negate
(),
""
,
"DBC"
,
"C"
,
acc
,
""
);
}
//
else
//
{
//
acctyp = "DB-FOG";
// acc = this.getSetmod().getGlemod().getAvailAcc ( acctyp, this.getSetmod().getDoccur(), this.getFxdgrp().getAct().getPts().getPtyinr(), this
, setmodVo.getSetamt() );
// cdtKey = this.getSetmod().getSetglg().setglgAddAmount ( "SET", "APL", this.getSetmod().getDoccur()
, setmodVo.getSetamt().negate(), "", "PAC", "C", acc, "" );
//
}
else
{
acctyp
=
"DB-FOG"
;
acc
=
glemodService
.
getAvailAcc
(
acctyp
,
maxCur
,
fxdgrp
.
getAct
().
getPts
().
getPtyinr
()
,
setmodVo
.
getSetamt
()
);
cdtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"SET"
,
"APL"
,
maxCur
,
setmodVo
.
getSetamt
().
negate
(),
""
,
"PAC"
,
"C"
,
acc
,
""
);
}
}
else
{
if
(
ptsptaToolComponent
.
ptsIsRolSet
(
fxdgrp
.
getApl
())
)
if
(
ptsptaToolComponent
.
IsDemestic
(
fxdgrp
.
getApl
())
)
{
acctyp
=
"DB-CLR"
;
acc
=
glemodService
.
getAvailAcc
(
acctyp
,
maxCur
,
fxdgrp
.
getApl
().
getPts
().
getPtyinr
(),
setmodVo
.
getSetamt
()
);
cdtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"SET"
,
"APL"
,
maxCur
,
setmodVo
.
getSetamt
().
negate
(),
""
,
"DBC"
,
"C"
,
acc
,
""
);
}
//
else
//
{
//
acctyp = "DB-FOG";
// acc = this.getSetmod().getGlemod().getAvailAcc ( acctyp, this.getSetmod().getDoccur(), this.getFxdgrp().getApl().getPts().getPtyinr(), this,
setmodVo.getSetamt() );
// cdtKey = this.getSetmod().getSetglg().setglgAddAmount ( "SET", "APL", this.getSetmod().getDoccur()
, setmodVo.getSetamt().negate(), "", "PAC", "C", acc, "" );
//
}
else
{
acctyp
=
"DB-FOG"
;
acc
=
glemodService
.
getAvailAcc
(
acctyp
,
maxCur
,
fxdgrp
.
getApl
().
getPts
().
getPtyinr
(),
setmodVo
.
getSetamt
()
);
cdtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"SET"
,
"APL"
,
maxCur
,
setmodVo
.
getSetamt
().
negate
(),
""
,
"PAC"
,
"C"
,
acc
,
""
);
}
}
//C:112306/1125外币
//如果ACT未赋值,则APL为我行的账户行
...
...
@@ -139,5 +139,6 @@ public class FxtfcmSettleRegister implements ISettleRegister {
setglgService
.
setglgAddAmtFldExtRat
(
setmodVo
.
getSetglg
(),
"SET"
,
dbtKey
,
Decimals
.
mul
(
1.00
,
baseunit
),
fxdgrp
.
getRec
().
getRat
()
);
}
//setglgService.setglgAllValDat ( fxdgrp.getRec().getValdat(), "D" );
setmodService
.
setglgAllValDat
(
setmodVo
,
fxdgrp
.
getRec
().
getValdat
(),
"D"
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfcm/service/FxtfcmTransactionServiceImpl.java
View file @
bd202ced
...
...
@@ -3,6 +3,7 @@ package com.brilliance.isc.funds.fxtfcm.service;
import
com.brilliance.isc.bo.Act
;
import
com.brilliance.isc.bo.Fxd
;
import
com.brilliance.isc.bo.model.Fxdgrp
;
import
com.brilliance.isc.bo.model.Lidgrp
;
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
;
...
...
@@ -75,6 +76,8 @@ public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<Fxt
@Resource
private
BchService
bchService
;
@Resource
private
PtyratMapper
ptyratMapper
;
...
...
@@ -151,7 +154,6 @@ public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<Fxt
Fxdgrp
fxdgrpVo
=
fxToolComponent
.
getFxdgrpByInr
(
fxdinr
);
fxtfcmStoreBo
.
setFxdgrp
(
fxdgrpVo
);
init950
(
fxtfcmStoreBo
);
init1000
(
fxtfcmStoreBo
);
return
fxtfcmStoreBo
;
...
...
@@ -207,7 +209,9 @@ public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<Fxt
public
void
cbsSav
(
FxtfcmStoreBo
transactionVo
,
TrnmodVo
trnmodVo
)
{
cbsmodService
.
cbsTrnSetNew
(
"TRN"
,
trnmodVo
.
getTrn
().
getInr
());
//liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall());
cbsmodService
.
cbsTrnCommit
();
}
...
...
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfcn/check/FxtfcnValidator.java
0 → 100644
View file @
bd202ced
package
com
.
brilliance
.
isc
.
funds
.
fxtfcn
.
check
;
import
com.brilliance.isc.bo.Act
;
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.common.util.Utils
;
import
com.brilliance.isc.funds.bo.funds.FxtfcnStoreBo
;
import
com.brilliance.isc.funds.bo.funds.FxtlopStoreBo
;
import
com.brilliance.isc.funds.vo.funds.FxtfcnStoreVo
;
import
com.brilliance.isc.funds.vo.funds.FxtfopStoreVo
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
brilliance
.
mda
.
runtime
.
mda
.
Constants
.
NULLSTR
;
/**
* @program: isc-funds
* @ClassName: FxtfcnValidator
* @description: 结售汇平盘确认 Fxtfcn 校验
* @author: 肖桐
* @create: 2024-10-11 11:28
*/
@Component
public
class
FxtfcnValidator
extends
AbstractModuleValidator
<
FxtfcnStoreBo
>{
@Override
@PostConstruct
public
void
register
(){
super
.
register
();;
}
@Override
public
Map
<
String
,
String
>
validate
(
FxtfcnStoreBo
vo
)
{
Map
<
String
,
String
>
maps
=
new
HashMap
<>();
maps
.
putAll
(
super
.
validate
(
vo
));
return
maps
;
}
/**
* source:fxtfcn.0007.script
*/
@Validate
(
path
=
"canamt"
)
public
ValidResult
checkCanamtN1000
(
FxtfcnStoreBo
bo
){
if
(
MdaUtils
.
compareTo
(
bo
.
getCanamt
(),
bo
.
getFxdgrp
().
getCbs
().
getNom1
().
getAmt
())>
0
)
{
return
ValidResult
.
build
(
false
,
"实际销账金额不能大于待销账金额!"
);
}
return
null
;
}
/**
* source:fxtfcn.0011.script
*/
@Validate
(
path
=
"fxdgrp.act.pts.extkey"
)
public
ValidResult
checkActN1000
(
FxtfcnStoreBo
bo
){
if
(
MdaUtils
.
compareTo
(
bo
.
getFxdgrp
().
getAct
().
getPts
().
getPtyinr
(),
bo
.
getOldactinr
())
!=
0
)
{
if
(
MdaUtils
.
compareTo
(
bo
.
getOldactinr
(),
"NONE"
)
==
0
&&
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getAct
().
getPts
().
getPtyinr
())
)
{
}
else
{
return
ValidResult
.
build
(
false
,
"账户行不一致,无法销账!"
);
}
}
return
null
;
}
//TODO
//收报才会有relcur, relamt,先去除此校验
@Validate
(
path
=
"fxdgrp.cbs.nom1.amt"
)
public
ValidResult
checkNom1AmtN1000
(
FxtfcnStoreBo
bo
){
// if( ( MdaUtils.compareTo(bo.getRelcur(),bo.getFxdgrp().getCbs().getNom1().getCur()) != 0 || MdaUtils.compareTo(bo.getRelamt(),bo.getFxdgrp().getCbs().getNom1().getAmt()) != 0 ) )
// {
// return ValidResult.build(false, "金额不一致或没有绑定报文,无法销账!");
// }
return
null
;
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfcn/document/FxtfcnDocset.java
0 → 100644
View file @
bd202ced
package
com
.
brilliance
.
isc
.
funds
.
fxtfcn
.
document
;
import
com.brilliance.isc.common.trndoc.vo.DoceotVo
;
import
com.brilliance.isc.doc.handle.impl.AbstractTransactionDocSet
;
import
com.brilliance.isc.funds.bo.funds.FxtfcnStoreBo
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.Resource
;
import
java.util.HashMap
;
import
java.util.Map
;
@Component
(
"fxtfcn.docset"
)
public
class
FxtfcnDocset
extends
AbstractTransactionDocSet
<
FxtfcnStoreBo
>
{
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfcn/register/dissav/FxtfcnDiasavRegister.java
0 → 100644
View file @
bd202ced
package
com
.
brilliance
.
isc
.
funds
.
fxtfcn
.
register
.
dissav
;
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: FxtfcnDiasavRegister
* @description: 结售汇平盘确认 Fxtfcn 备忘录注册
* @author: Lenovo
* @create: 2024-10-11 17:30
*/
@Component
(
"fxtfcn.diasavRegister"
)
public
class
FxtfcnDiasavRegister
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
)
{
}
}
\ No newline at end of file
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfcn/register/doc/FxtfcnDocumentRegister.java
0 → 100644
View file @
bd202ced
package
com
.
brilliance
.
isc
.
funds
.
fxtfcn
.
register
.
doc
;
import
com.brilliance.isc.common.component.PtsptaToolComponent
;
import
com.brilliance.isc.common.register.document.IDocumentRegister
;
import
com.brilliance.isc.common.register.document.common.SetmodDocumentRegister
;
import
com.brilliance.isc.common.trndoc.service.TrndocService
;
import
com.brilliance.isc.common.trndoc.vo.TrndocVo
;
import
com.brilliance.isc.common.vo.PtsptaVo
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
/**
* @program: isc-funds
* @ClassName: FxtfcnDocumentRegister
* @description: 结售汇平盘确认 Fxtfcn 报文注册
* @author: Lenovo
* @create: 2024-10-11 17:47
*/
@Component
(
"fxtfcn.documentRegister"
)
public
class
FxtfcnDocumentRegister
implements
IDocumentRegister
{
@Autowired
TrndocService
trndocService
;
@Resource
PtsptaToolComponent
ptsptaToolComponent
;
@Autowired
private
SetmodDocumentRegister
setmodDocumentRegister
;
@Override
public
void
registerDocument
(
TrndocVo
trndoc
)
{
doRegister
(
trndoc
);
setmodDocumentRegister
.
registerDocument
(
trndoc
);
//entmodDocumentRegister.registerDocument(trndoc);
}
public
void
doRegister
(
TrndocVo
trndoc
){
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfcn/register/fee/FxtfcnFeeRegister.java
0 → 100644
View file @
bd202ced
package
com
.
brilliance
.
isc
.
funds
.
fxtfcn
.
register
.
fee
;
import
com.brilliance.isc.common.register.fee.AbstractFeeRegister
;
import
com.brilliance.isc.common.register.fee.common.DocumentFeeRegister
;
import
com.brilliance.isc.common.register.fee.common.LiaallFeeRegister
;
import
com.brilliance.isc.common.register.fee.common.SetmodFeeRegister
;
import
com.brilliance.isc.common.setfeg.service.SetfegService
;
import
com.brilliance.isc.common.setmod.vo.SetmodVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
/**
* @program: isc-funds
* @ClassName: FxtfcnFeeRegister
* @description: 结售汇平盘确认 Fxtfcn 费用注册
* @author: Lenovo
* @create: 2024-10-11 17:36
*/
@Component
(
"fxtfcn.feeRegister"
)
public
class
FxtfcnFeeRegister
extends
AbstractFeeRegister
{
@Autowired
private
SetfegService
setfegService
;
@Autowired
private
DocumentFeeRegister
documentFeeRegister
;
@Autowired
private
LiaallFeeRegister
liaallFeeRegister
;
@Autowired
private
SetmodFeeRegister
setmodFeeRegister
;
@Override
public
void
registerSettlement
(
SetmodVo
setmodVo
)
{
setmodFeeRegister
.
registerSettlement
(
setmodVo
);
documentFeeRegister
.
registerSettlement
(
setmodVo
);
liaallFeeRegister
.
registerSettlement
(
setmodVo
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfcn/register/liaall/FxtfcnLiaallRegister.java
0 → 100644
View file @
bd202ced
package
com
.
brilliance
.
isc
.
funds
.
fxtfcn
.
register
.
liaall
;
import
com.brilliance.isc.common.liaall.vo.LiaallVo
;
import
com.brilliance.isc.common.register.fee.AbstractFeeRegister
;
import
com.brilliance.isc.common.register.liaall.ILiaallRegister
;
import
com.brilliance.isc.common.register.liaall.common.LiaallRegister
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
/**
* @program: isc-funds
* @ClassName: FxtfcnLiaallRegister
* @description: 结售汇平盘确认 Fxtfcn 表外注册
* @author: Lenovo
* @create: 2024-10-11 17:41
*/
@Component
(
"fxtfcn.liaallSetTransaction"
)
public
class
FxtfcnLiaallRegister
implements
ILiaallRegister
{
@Autowired
private
LiaallRegister
liaallRegister
;
@Override
public
void
liaallSetTransaction
(
LiaallVo
liaallVo
)
{
liaallRegister
.
liaallSetTransaction
(
liaallVo
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfcn/register/settle/FxtfcnSettleRegister.java
0 → 100644
View file @
bd202ced
package
com
.
brilliance
.
isc
.
funds
.
fxtfcn
.
register
.
settle
;
import
com.brilliance.isc.bo.model.Fxdgrp
;
import
com.brilliance.isc.common.cbsmod.service.XrtmodService
;
import
com.brilliance.isc.common.glemod.service.GlemodService
;
import
com.brilliance.isc.common.register.settle.DefaultSettleRegister
;
import
com.brilliance.isc.common.register.settle.ISettleRegister
;
import
com.brilliance.isc.common.setglg.service.SetglgService
;
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.funds.common.component.FxToolComponent
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
com.brilliance.mda.runtime.mda.util.Decimals
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
com.brilliance.isc.common.component.PtsptaToolComponent
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
static
com
.
brilliance
.
mda
.
runtime
.
mda
.
Constants
.
NULLSTR
;
@Component
(
"fxtfcn.settleRegister"
)
public
class
FxtfcnSettleRegister
implements
ISettleRegister
{
@Autowired
private
SetmodService
setmodService
;
@Autowired
private
SetglgService
setglgService
;
@Autowired
private
DefaultSettleRegister
defaultSettleRegister
;
@Autowired
private
GlemodService
glemodService
;
@Resource
private
XrtmodService
xrtmodService
;
@Resource
private
FxToolComponent
fxToolComponent
;
@Resource
private
PtsptaToolComponent
ptsptaToolComponent
;
@Override
public
void
registerSettlement
(
SetmodVo
setmodVo
)
{
transRegister
(
setmodVo
);
defaultSettleRegister
.
registerSettlement
(
setmodVo
);
}
private
void
transRegister
(
SetmodVo
setmodVo
)
{
FxdBizInfoVo
rec
=
(
FxdBizInfoVo
)
setmodVo
.
getRec
();
Fxdgrp
fxdgrp
=
fxToolComponent
.
getFxdgrpByInr
(
rec
.
getObjinr
());
//取得上下文
setmodVo
.
setDoccur
(
rec
.
getCancur
());
setmodVo
.
setDocamt
(
rec
.
getCanamt
());
SetglgVo
setglg
=
setmodVo
.
getSetglg
();
setglgService
.
setglgClrAmount
(
setglg
,
"TRN"
);
//如果ACT角色未赋值,则APL为我行账户行
String
acctyp
=
NULLSTR
;
String
act1
=
NULLSTR
;
String
cdtKey
=
NULLSTR
;
String
act2
=
NULLSTR
;
if
(
ptsptaToolComponent
.
ptsIsRolSet
(
fxdgrp
.
getAct
())
)
{
//D: 114(或116)外币
if
(
ptsptaToolComponent
.
IsDemestic
(
fxdgrp
.
getAct
())
)
{
acctyp
=
"DB-CLR"
;
act1
=
glemodService
.
getAvailAcc
(
acctyp
,
setmodVo
.
getDoccur
(),
fxdgrp
.
getAct
().
getPts
().
getPtyinr
(),
setmodVo
.
getSetamt
()
);
cdtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"TRN"
,
"APL"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSetamt
().
negate
(),
""
,
"DBD"
,
"C"
,
act1
,
""
);
}
else
{
acctyp
=
"DB-FOG"
;
act2
=
glemodService
.
getAvailAcc
(
acctyp
,
setmodVo
.
getDoccur
(),
fxdgrp
.
getAct
().
getPts
().
getPtyinr
(),
setmodVo
.
getSetamt
()
);
cdtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"TRN"
,
"APL"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSetamt
(),
""
,
"DBD"
,
"C"
,
act2
,
""
);
}
}
else
{
//D: 114(或116)外币
if
(
ptsptaToolComponent
.
IsDemestic
(
fxdgrp
.
getApl
())
)
{
acctyp
=
"DB-CLR"
;
act1
=
glemodService
.
getAvailAcc
(
acctyp
,
setmodVo
.
getDoccur
(),
fxdgrp
.
getApl
().
getPts
().
getPtyinr
(),
setmodVo
.
getSetamt
()
);
cdtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"TRN"
,
"APL"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSetamt
().
negate
(),
""
,
"DBD"
,
"C"
,
act1
,
""
);
}
else
{
acctyp
=
"DB-FOG"
;
act2
=
glemodService
.
getAvailAcc
(
acctyp
,
setmodVo
.
getDoccur
(),
fxdgrp
.
getApl
().
getPts
().
getPtyinr
(),
setmodVo
.
getSetamt
()
);
cdtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"TRN"
,
"APL"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSetamt
(),
""
,
"DBD"
,
"C"
,
act2
,
""
);
}
}
//C:13903外币
/**
$Act2 = SETMOD\\GLEMOD.GetAvailAcc ( "FT-FXR", SETMOD\\DOCCUR, "", self, SETMOD\\SETAMT )
**/
act2
=
glemodService
.
getAvailAcc
(
"FT-FCR"
,
setmodVo
.
getDoccur
(),
""
,
setmodVo
.
getSetamt
()
);
cdtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"TRN"
,
"OWN"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSetamt
().
negate
(),
""
,
"FTC"
,
"C"
,
act2
,
""
);
//###############################
//!买入
//!
//贷:281101代客即期外汇买卖 (A外币)
//借:281105外汇买卖对外平盘 (A外币)
//!------------------------------
//!卖出
//!
//!
//借:281105外汇买卖对外平盘 (B外币)
//贷:281101代客即期外汇买卖 (B外币)
//###############################
//D 281105
String
act3
=
glemodService
.
getAvailAcc
(
"FX-ELQ"
,
setmodVo
.
getDoccur
(),
""
,
setmodVo
.
getSetamt
()
);
/**
$DdtKey = \\SETMOD\\SETGLG.SetglgAddAmount ( "TRN", "OWN", SETMOD\\DOCCUR, SETMOD\\SETAMT, "", "FXD", "C", $Act3, "" )
**/
String
ddtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"TRN"
,
"OWN"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSetamt
(),
""
,
"FXD"
,
"A"
,
act3
,
""
);
//C:281101
String
act4
=
glemodService
.
getAvailAcc
(
"FX-EXS"
,
setmodVo
.
getDoccur
(),
""
,
setmodVo
.
getSetamt
()
);
/**
$CbtKey = SETMOD\\SETGLG.SetglgAddAmount ( "SET", "OWN", SETMOD\\DOCCUR, -SETMOD\\SETAMT, "SET", "FXC", "F", $Act4, "SET" )
**/
String
cbtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"TRN"
,
"OWN"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSetamt
().
negate
(),
""
,
"FXC"
,
"A"
,
act4
,
""
);
/**
endif
**/
setmodService
.
setglgAllValDat
(
setmodVo
,
fxdgrp
.
getRec
().
getValdat
(),
"D"
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfcn/register/wfe/FxtfcnWfeRegister.java
0 → 100644
View file @
bd202ced
package
com
.
brilliance
.
isc
.
funds
.
fxtfcn
.
register
.
wfe
;
import
com.brilliance.isc.common.trnism.service.IWfeRegister
;
import
com.brilliance.isc.common.trnmod.vo.TrnmodVo
;
import
com.brilliance.isc.common.wfmmod.service.WfmmodService
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
@Component
(
"fxtfcn"
+
"."
+
IWfeRegister
.
REGISTER_NAME
)
public
class
FxtfcnWfeRegister
implements
IWfeRegister
{
@Override
public
void
wfeRegister
(
TrnmodVo
trnmodVo
){
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfcn/resource/FxtfcnResource.java
0 → 100644
View file @
bd202ced
package
com
.
brilliance
.
isc
.
funds
.
fxtfcn
.
resource
;
import
com.brilliance.isc.common.transaction.controller.AbstractTransactionController
;
import
com.brilliance.isc.funds.bo.funds.FxtfcnStoreBo
;
import
com.brilliance.isc.funds.transfer.transaction.FxtfcnStructMapper
;
import
com.brilliance.isc.funds.vo.funds.FxtfcnStoreVo
;
import
com.brilliance.isc.transfer.IStructMapper
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @program: isc-funds
* @ClassName: FxtfcnResource
* @description: 结售汇平盘确认 Fxtfcn 请求入口
* @author: xiaotong
* @create: 2024-10-11 17:09
*/
@RestController
@RequestMapping
(
"/fxtfcn"
)
public
class
FxtfcnResource
extends
AbstractTransactionController
<
FxtfcnStoreVo
>
{
@Resource
private
FxtfcnStructMapper
fxtfcnStructMapper
;
public
IStructMapper
getStructMapper
()
{
return
fxtfcnStructMapper
;
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfcn/service/FxtfcnTransactionServiceImpl.java
0 → 100644
View file @
bd202ced
package
com
.
brilliance
.
isc
.
funds
.
fxtfcn
.
service
;
import
com.brilliance.isc.bo.Act
;
import
com.brilliance.isc.bo.Fxd
;
import
com.brilliance.isc.bo.model.Fxdgrp
;
import
com.brilliance.isc.bo.Smh
;
import
com.brilliance.isc.bo.Pty
;
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.liaall.service.LiaallService
;
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.vo.BizAmdInfoVo
;
import
com.brilliance.isc.common.vo.BizInfoVo
;
import
com.brilliance.isc.funds.bo.funds.FxtfcnStoreBo
;
import
com.brilliance.isc.funds.common.component.FxToolComponent
;
import
com.brilliance.isc.funds.fxtfcn.check.FxtfcnValidator
;
import
com.brilliance.isc.funds.fxtlop.service.FxtpService
;
import
com.brilliance.isc.funds.vo.funds.FxtfcnStoreVo
;
import
com.brilliance.isc.mda.dao.PtyratMapper
;
import
com.brilliance.isc.mda.dao.SmhMapper
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
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
com.brilliance.mda.runtime.mda.util.Strings
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.brilliance.isc.mda.dao.ActMapper
;
import
com.brilliance.isc.mda.dao.PtyMapper
;
import
com.brilliance.isc.common.component.SptDataComponent
;
import
com.brilliance.isc.common.component.PtsptaToolComponent
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
brilliance
.
mda
.
runtime
.
mda
.
Constants
.
NULLSTR
;
/**
* @program: isc-funds
* @ClassName: FxtfcnTransactionServiceImpl
* @description: 结售汇平盘确认 Fxtfcn 业务处理
* @author: xiaotong
* @create: 2024-10-11 15:20
*/
@Service
(
"fxtfcn.transaction"
)
public
class
FxtfcnTransactionServiceImpl
extends
AbstractTransactionService
<
FxtfcnStoreBo
>
{
@Resource
private
FxtfcnValidator
fxtfcnValidator
;
// @Autowired
// private FxtfcnService fxtfcnService;
@Resource
private
FxToolComponent
fxToolComponent
;
@Resource
private
TrnmodService
trnmodService
;
@Resource
private
XrtmodService
xrtmodService
;
@Resource
private
TransactionHelpService
transactionHelpService
;
@Resource
private
CbsmodService
cbsmodService
;
@Resource
private
LiaallService
liaallService
;
@Resource
private
SettleContext
settleContext
;
@Autowired
private
PtaCacheService
ptaCacheService
;
@Resource
private
BchService
bchService
;
@Resource
private
PtyratMapper
ptyratMapper
;
@Resource
private
SmhMapper
smhMapper
;
@Resource
private
ActMapper
actMapper
;
@Resource
private
PtyMapper
ptyMapper
;
@Resource
private
SetmodService
setmodService
;
@Resource
private
FxtpService
fxtpService
;
@Resource
private
SysmodService
sysmodService
;
@Autowired
SptDataComponent
sptDataComponent
;
@Autowired
PtsptaToolComponent
ptsptaToolComponent
;
@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"
);
// serviceRegisterMaps.put(CommonContants.UMDMOD_SERVICE, "N");
// serviceRegisterMaps.put(CommonContants.LIMMOD_SERVICE, "Y");
// serviceRegisterMaps.put(CommonContants.BOPSET_RMB_SERVICE, "Y");
// serviceRegisterMaps.put(CommonContants.BOPSET_SZSB_BOPREM_SERVICE, "Y");
// serviceRegisterMaps.put(CommonContants.BOPSET_CFABOP_SERVICE, "Y");
// serviceRegisterMaps.put(CommonContants.FANXIQIAN_SERVICE, "Y");
}
@Override
protected
void
txnSave
(
FxtfcnStoreBo
transactionVo
)
{
ruleMtabutSavN500
(
transactionVo
);
}
@Override
protected
Map
<
String
,
String
>
txnCheck
(
FxtfcnStoreBo
transactionVo
)
{
return
fxtfcnValidator
.
validate
(
transactionVo
);
}
@Override
protected
BizInfoVo
buildBizInfo
(
FxtfcnStoreBo
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
());
bizInfoVo
.
setCancur
(
transactionVo
.
getCancur
());
bizInfoVo
.
setCanamt
(
transactionVo
.
getCanamt
());
return
bizInfoVo
;
}
@Override
protected
BizAmdInfoVo
buildBizAmdInfo
(
FxtfcnStoreBo
transactionVo
)
{
return
null
;
}
@Override
public
FxtfcnStoreBo
init
(
FxtfcnStoreBo
fxtfcnStoreBo
)
{
fxtfcnStoreBo
.
reset
();
String
fxdinr
=
fxtfcnStoreBo
.
getFxdgrp
().
getRec
().
getInr
();
if
(
sptDataComponent
.
needMergeSptData
(
fxtfcnStoreBo
))
{
fxdinr
=
fxtfcnStoreBo
.
getSpt
().
getObjinr
();
}
Fxdgrp
fxdgrpVo
=
fxToolComponent
.
getFxdgrpByInr
(
fxdinr
);
fxtfcnStoreBo
.
setFxdgrp
(
fxdgrpVo
);
init950
(
fxtfcnStoreBo
);
init1000
(
fxtfcnStoreBo
);
return
fxtfcnStoreBo
;
}
private
void
init950
(
FxtfcnStoreBo
fxtfcnStoreBo
)
{
Fxdgrp
fxdgrp
=
fxtfcnStoreBo
.
getFxdgrp
();
if
(
!
fxtfcnStoreBo
.
isModified
(
"canamt"
)){
fxtfcnStoreBo
.
setCanamt
(
fxdgrp
.
getCbs
().
getNom1
().
getAmt
());
}
if
(
!
fxtfcnStoreBo
.
isModified
(
"cancur"
)){
fxtfcnStoreBo
.
setCancur
(
fxdgrp
.
getCbs
().
getNom1
().
getCur
());
}
if
(
!
fxtfcnStoreBo
.
isModified
(
"canamtuse"
)){
fxtfcnStoreBo
.
setCanamtuse
(
fxdgrp
.
getCbs
().
getOpn2
().
getAmt
());
}
if
(
!
fxtfcnStoreBo
.
isModified
(
"cancuruse"
)){
fxtfcnStoreBo
.
setCancuruse
(
fxdgrp
.
getCbs
().
getOpn2
().
getCur
());
}
if
(
MdaUtils
.
isEmpty
(
fxdgrp
.
getRec
().
getOpndat
())){
fxdgrp
.
getRec
().
setOpndat
(
Dates
.
today
());
}
}
private
void
init1000
(
FxtfcnStoreBo
fxtfcnStoreBo
)
{
if
(
MdaUtils
.
isEmpty
(
fxtfcnStoreBo
.
getOldactinr
())
)
{
if
(
!
MdaUtils
.
isEmpty
(
fxtfcnStoreBo
.
getFxdgrp
().
getAct
().
getPts
().
getPtyinr
())
)
{
fxtfcnStoreBo
.
setOldactinr
(
fxtfcnStoreBo
.
getFxdgrp
().
getAct
().
getPts
().
getPtyinr
());
}
else
{
fxtfcnStoreBo
.
setOldactinr
(
"NONE"
);
}
}
String
extKey
=
NULLSTR
;
String
relCur
=
NULLSTR
;
BigDecimal
relAmt
=
Decimals
.
ZERO_SCALE2
;
String
f21
=
NULLSTR
;
String
inr
=
NULLSTR
;
if
(
sysmodService
.
sptIsIncLoaded
(
fxtfcnStoreBo
.
getSpt
().
getSta
())
)
{
Smh
smh
=
smhMapper
.
getSmhInfoBySptSmhinr
(
fxtfcnStoreBo
.
getSpt
().
getSmhinr
());
// 通过报文进来,读取报文发报行
if
(
smh
!=
null
){
extKey
=
smh
.
getSndkey
();
relCur
=
smh
.
getRelcur
();
relAmt
=
smh
.
getRelamt
();
//todo
//f21 =smh.getF21();
}
fxtfcnStoreBo
.
setRelcur
(
relCur
);
fxtfcnStoreBo
.
setRelamt
(
relAmt
);
fxtfcnStoreBo
.
setF21
(
f21
);
if
(
!
MdaUtils
.
isEmpty
(
extKey
)
)
{
if
(
Strings
.
len
(
extKey
)
==
12
)
{
extKey
=
Strings
.
mid
(
extKey
,
1
,
8
)
+
Strings
.
mid
(
extKey
,
10
);
}
Pty
pty
=
ptyMapper
.
selectByExtkey
(
extKey
);
inr
=
""
;
inr
=
pty
.
getInr
();
if
(
!
MdaUtils
.
isEmpty
(
inr
)
&&
MdaUtils
.
compareTo
(
fxtfcnStoreBo
.
getOldactinr
(),
inr
)
!=
0
)
{
fxtfcnStoreBo
.
getFxdgrp
().
setAct
(
ptsptaToolComponent
.
getPtsptaFromPtyINR
(
inr
));
}
}
}
fxtfcnStoreBo
.
setAplacc
(
fxtfcnStoreBo
.
getFxdgrp
().
getAcc
());
}
@Override
public
void
beforeSave
(
FxtfcnStoreBo
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"
,
"opn1"
,
"opn2"
);
fxToolComponent
.
collectPtsList
(
transactionServiceSet
,
fxdgrp
,
null
);
settleContext
.
loadSettleSession
(
transactionVo
.
getTransName
(),
transactionVo
.
getUserId
(),
buildBizInfo
(
transactionVo
),
transactionServiceSet
.
getPtsList
());
}
@Override
protected
void
updateBizInfoVo
(
BizInfoVo
bizInfoVo
,
FxtfcnStoreBo
transactionVo
)
{
bizInfoVo
.
setObjinr
(
transactionVo
.
getFxdgrp
().
getRec
().
getInr
());
}
public
void
ruleMtabutSavN500
(
FxtfcnStoreBo
bo
)
{
TrnmodVo
trnmodVo
=
transactionHelpService
.
getTransactionStoreSet
().
getTrnmodVo
();
fxToolComponent
.
getref
(
bo
.
getFxdgrp
());
// 1. Create (rsp. update) Contract (incl. Texts)
bo
.
getFxdgrp
().
getRec
().
setCnfdat
(
Dates
.
today
());
if
(
MdaUtils
.
compareTo
(
bo
.
getFxdgrp
().
getCbs
().
getOpn1
().
getAmt
(),
0
)
==
0
&&
MdaUtils
.
compareTo
(
bo
.
getCanamt
(),
bo
.
getFxdgrp
().
getCbs
().
getOpn2
().
getAmt
())
==
0
)
{
bo
.
getFxdgrp
().
getRec
().
setClsdat
(
Dates
.
today
());
}
fxToolComponent
.
sav
(
bo
.
getFxdgrp
(),
Decimals
.
ZERO_SCALE2
);
// 2. Build Transaction from FTDGRP
trnmodService
.
trnSetFromContract
(
trnmodVo
);
cbsSav
(
bo
,
trnmodVo
);
// save documents
//记录116台账
//todo
//this.getNosmod().savNostro();
fxToolComponent
.
getref
(
bo
.
getFxdgrp
());
// 1. Create (rsp. update) Contract (incl. Texts)
bo
.
getFxdgrp
().
getRec
().
setCnfdat
(
Dates
.
today
());
if
(
MdaUtils
.
compareTo
(
bo
.
getFxdgrp
().
getCbs
().
getOpn2
().
getAmt
(),
0
)
==
0
)
{
bo
.
getFxdgrp
().
getRec
().
setClsdat
(
Dates
.
today
());
}
bo
.
getFxdgrp
().
setAcc
(
bo
.
getAplacc
());
fxToolComponent
.
sav
(
bo
.
getFxdgrp
(),
BigDecimal
.
ZERO
);
// 2. Build Transaction from FTDGRP
trnmodService
.
trnSetFromContract
(
trnmodVo
);
cbsSav
(
bo
,
trnmodVo
);
// save documents
//TODO
//记录116台账
//transactionVo.getNosmod().savNostro();
}
public
void
cbsSav
(
FxtfcnStoreBo
transactionVo
,
TrnmodVo
trnmodVo
)
{
String
trninr
=
transactionHelpService
.
getTrninr
();
cbsmodService
.
cbsTrnSetNew
(
"TRN"
,
trninr
);
trnmodService
.
cbsTrnStore
(
"OPNAMT"
,
"AMT1"
,
Dates
.
today
(),
transactionVo
.
getCancuruse
(),
transactionVo
.
getCanamtuse
().
negate
(),
I18nUtil
.
getMessage
(
"funds_fxtfcn_CT000009"
),
transactionVo
.
getFxdgrp
().
getRec
(),
trninr
);
//liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall());
}
public
List
<
String
>
defaultAcc2N1000
(
FxtfcnStoreVo
vo
){
vo
.
reset
();
Fxd
rec
=
vo
.
getFxdgrp
().
getRec
();
List
<
String
>
actLst
=
new
ArrayList
<>();
if
(
!
MdaUtils
.
isEmpty
(
vo
.
getFxdgrp
().
getCbs
().
getMax
().
getCur
())
&&
!
MdaUtils
.
isEmpty
(
vo
.
getAplacc
().
getPts
().
getPtyinr
())
)
{
String
sql
=
"WHERE CUR = '"
+
vo
.
getFxdgrp
().
getCbs
().
getMax
().
getCur
()
+
"' AND SERPTYINR = '"
+
vo
.
getAplacc
().
getPts
().
getPtyinr
()
+
"' AND TYP = 'DB'"
;
List
<
String
>
actList
=
actMapper
.
getSerAccByConditionSql
(
sql
);
if
(
!
vo
.
isModified
(
"acc2"
)
&&
actLst
.
size
()>
0
)
{
vo
.
setAcc2
(
actLst
.
get
(
1
));
}
}
else
{
vo
.
setAcc2
(
NULLSTR
);
}
return
actLst
;
}
/**
* source:fxtfcn.0009.script
*/
public
List
<
String
>
defaultAcc1N1000
(
FxtfcnStoreVo
vo
){
vo
.
reset
();
Fxd
rec
=
vo
.
getFxdgrp
().
getRec
();
List
<
String
>
actLst
=
new
ArrayList
<>();
if
(
!
MdaUtils
.
isEmpty
(
vo
.
getFxdgrp
().
getCbs
().
getMax
().
getCur
())
&&
!
MdaUtils
.
isEmpty
(
vo
.
getFxdgrp
().
getAct
().
getPts
().
getPtyinr
())
)
{
String
sql
=
"WHERE CUR = '"
+
vo
.
getFxdgrp
().
getCbs
().
getMax
().
getCur
()
+
"' AND SERPTYINR = '"
+
vo
.
getFxdgrp
().
getAct
().
getPts
().
getPtyinr
()
+
"' AND TYP = 'DB'"
;
List
<
String
>
actList
=
actMapper
.
getSerAccByConditionSql
(
sql
);
if
(
!
vo
.
isModified
(
"acc1"
)
&&
actLst
.
size
()>
0
)
{
vo
.
setAcc1
(
actLst
.
get
(
1
));
}
}
else
{
vo
.
setAcc1
(
NULLSTR
);
}
return
actLst
;
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/register/liaall/FxtfopLiaallRegister.java
0 → 100644
View file @
bd202ced
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
register
.
liaall
;
import
com.brilliance.isc.common.liaall.vo.LiaallVo
;
import
com.brilliance.isc.common.register.liaall.ILiaallRegister
;
import
com.brilliance.isc.common.register.liaall.common.LiaallRegister
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
@Component
(
"fxtfop.liaallSetTransaction"
)
public
class
FxtfopLiaallRegister
implements
ILiaallRegister
{
@Autowired
private
LiaallRegister
liaallSetRegister
;
@Override
public
void
liaallSetTransaction
(
LiaallVo
liaallVo
)
{
liaallSetRegister
.
liaallSetTransaction
(
liaallVo
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/service/FxtfopTransactionServiceImpl.java
View file @
bd202ced
...
...
@@ -10,6 +10,7 @@ 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.liaall.service.LiaallService
;
import
com.brilliance.isc.common.setmod.service.SetmodService
;
import
com.brilliance.isc.common.sysmod.SysmodService
;
import
com.brilliance.isc.common.transaction.AbstractTransactionService
;
...
...
@@ -68,6 +69,9 @@ public class FxtfopTransactionServiceImpl extends AbstractTransactionService<Fxt
private
SysmodService
sysmodService
;
@Resource
private
LiaallService
liaallService
;
@Resource
private
FxToolComponent
fxToolComponent
;
...
...
@@ -223,8 +227,14 @@ public class FxtfopTransactionServiceImpl extends AbstractTransactionService<Fxt
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
().
getRec
(),
trninr
);
//todo
//只用来模拟插入OPN2以便测试FXTFCN ,实际查看FXTFOP没有使用OPN2,所以FXTFCN应不会使用
//trnmodService.cbsTrnStore("OPNAMT", "AMT2", Dates.today(), cbs.getMax().getCur(), cbs.getMax().getAmt(), I18nUtil.getMessage("funds_fxtfop_000000"), transactionVo.getFxdgrp().getRec(), trninr);
}
//liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall());
cbsmodService
.
cbsTrnCommit
();
}
...
...
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtsel/service/impl/FxtselServiceImpl.java
View file @
bd202ced
...
...
@@ -97,7 +97,7 @@ public class FxtselServiceImpl implements FxtselService {
Fxdgrp
fxdgrp
=
new
Fxdgrp
();
fxdgrp
=
fxToolComponent
.
getFxdgrpByInr
(
trnCodeQueryVo
.
getInr
());
String
[]
fxTraArray
=
{
"FXTFCM"
,
"FXT
L
CN"
,
"FXTLCM"
};
String
[]
fxTraArray
=
{
"FXTFCM"
,
"FXT
F
CN"
,
"FXTLCM"
};
String
[]
fxButArray
=
{
"外币兑换平盘确认"
,
"外币兑换平盘销账"
,
"结售汇平盘确认"
};
String
isAllowed
=
""
;
for
(
int
i
=
0
;
i
<
fxTraArray
.
length
;
i
++)
{
...
...
isc-funds-entity/src/main/java/com/brilliance/isc/funds/bo/funds/FxtfcnStoreBo.java
0 → 100644
View file @
bd202ced
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.bo.model.Mt30m
;
import
com.brilliance.isc.common.transaction.vo.BaseTransactionVo
;
import
com.brilliance.isc.common.vo.PtsptaVo
;
import
com.brilliance.mda.runtime.mda.util.Decimals
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
static
com
.
brilliance
.
mda
.
runtime
.
mda
.
Constants
.
NULLSTR
;
/**
* @program: isc-funds
* @ClassName: FxtfcnStoreBo
* @description: 结售汇平盘确认bo
* @author: xiaotong
* @create: 2024-10-11 11:42
*/
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
FxtfcnStoreBo
extends
BaseTransactionVo
{
//Cancel Amount
private
BigDecimal
canamt
=
Decimals
.
ZERO_SCALE2
;
//Cancel Currency
private
String
cancur
=
NULLSTR
;
//Old Account Bank Inr
private
String
oldactinr
=
NULLSTR
;
//Related Currency
private
String
relcur
=
NULLSTR
;
//Related Amount
private
BigDecimal
relamt
=
Decimals
.
ZERO_SCALE2
;
//Reference
private
String
f21
=
NULLSTR
;
//APLACC's Account
private
String
acc2
=
NULLSTR
;
//OWNACC's Account
private
String
acc1
=
NULLSTR
;
//Cancel Amount
private
BigDecimal
canamtuse
=
Decimals
.
ZERO_SCALE2
;
//Cancel Currency
private
String
cancuruse
=
NULLSTR
;
private
Fxdgrp
fxdgrp
;
//private Fxtmod fxtmod;
private
Fxtp
fxtp
;
private
PtsptaVo
aplacc
;
@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/FxtfcnStructMapper.java
0 → 100644
View file @
bd202ced
package
com
.
brilliance
.
isc
.
funds
.
transfer
.
transaction
;
import
com.brilliance.isc.funds.bo.funds.FxtfcnStoreBo
;
import
com.brilliance.isc.funds.vo.funds.FxtfcnStoreVo
;
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: FxtfcnStructMapper
* @description:
* @author: xiaotong
* @create: 2024-10-11 17:17
*/
@Mapper
(
componentModel
=
"spring"
)
public
interface
FxtfcnStructMapper
extends
IBaseStructMapper
<
FxtfcnStoreBo
,
FxtfcnStoreVo
>
{
/**
* 此行语句一定要写,StructMapper需要
*/
FxtfcnStructMapper
INSTANCE
=
Mappers
.
getMapper
(
FxtfcnStructMapper
.
class
);
/**
* Vo转为Bo
*
* @param vo
* @return 返回业务Bo
*/
@Override
FxtfcnStoreBo
voTransferToBo
(
FxtfcnStoreVo
vo
);
/**
* Vo追加更新至Bo
*
* @param vo
* @param bo
*/
@Override
@Mappings
({
})
void
voUpdateToBo
(
FxtfcnStoreVo
vo
,
@MappingTarget
FxtfcnStoreBo
bo
);
/**
* Bo转为Vo
*
* @param bo
* @return 返回Vo
*/
@Override
FxtfcnStoreVo
boTransferToVo
(
FxtfcnStoreBo
bo
);
/**
* bo追加更新至Bo
*
* @param bo
* @param vo
*/
@Override
void
boUpdateToVo
(
FxtfcnStoreBo
bo
,
@MappingTarget
FxtfcnStoreVo
vo
);
}
isc-funds-entity/src/main/java/com/brilliance/isc/funds/vo/funds/FxtfcnStoreVo.java
0 → 100644
View file @
bd202ced
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.brilliance.isc.common.vo.PtsptaVo
;
import
com.brilliance.mda.runtime.mda.util.Decimals
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
static
com
.
brilliance
.
mda
.
runtime
.
mda
.
Constants
.
NULLSTR
;
/**
* @program: isc-funds
* @ClassName: FxtfcmStoreVo
* @description: 结售汇平盘确认bo
* @author: xiaotong
* @create: 2024-10-11 11:42
*/
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
FxtfcnStoreVo
extends
BaseTransactionVo
{
//Cancel Amount
private
BigDecimal
canamt
=
Decimals
.
ZERO_SCALE2
;
//Cancel Currency
private
String
cancur
=
NULLSTR
;
//Old Account Bank Inr
private
String
oldactinr
=
NULLSTR
;
//Related Currency
private
String
relcur
=
NULLSTR
;
//Related Amount
private
BigDecimal
relamt
=
Decimals
.
ZERO_SCALE2
;
//Reference
private
String
f21
=
NULLSTR
;
//APLACC's Account
private
String
acc2
=
NULLSTR
;
//OWNACC's Account
private
String
acc1
=
NULLSTR
;
//Cancel Amount
private
BigDecimal
canamtuse
=
Decimals
.
ZERO_SCALE2
;
//Cancel Currency
private
String
cancuruse
=
NULLSTR
;
private
Fxdgrp
fxdgrp
;
//private Fxtmod fxtmod;
private
Fxtp
fxtp
;
private
PtsptaVo
aplacc
;
@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