Commit bd202ced by jianglong

新增FXTFCN交易

parent bbadda55
......@@ -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
......@@ -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
......@@ -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;
......
......@@ -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" );
}
}
......@@ -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();
}
......
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;
}
}
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> {
}
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
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){
}
}
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);
}
}
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);
}
}
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" );
}
}
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){
}
}
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;
}
}
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);
}
}
......@@ -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();
}
......
......@@ -97,7 +97,7 @@ public class FxtselServiceImpl implements FxtselService {
Fxdgrp fxdgrp=new Fxdgrp();
fxdgrp = fxToolComponent.getFxdgrpByInr(trnCodeQueryVo.getInr());
String[] fxTraArray = {"FXTFCM", "FXTLCN","FXTLCM"};
String[] fxTraArray = {"FXTFCM", "FXTFCN","FXTLCM"};
String[] fxButArray = {"外币兑换平盘确认", "外币兑换平盘销账","结售汇平盘确认"};
String isAllowed = "";
for (int i = 0; i < fxTraArray.length; i++) {
......
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();
}
}
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);
}
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();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment