Commit a4726e76 by jianglong

新增FXTFCM交易

parent 4b48cf1e
......@@ -2,3 +2,4 @@
funds_fxtssb_000000=Settlement
funds_fxtsss_000000=Settlement
funds_fxtfop_000000=Foreign Exchange Liquidation
\ No newline at end of file
0002=This field is mandatory
funds_fxtssb_000000=Settlement
funds_fxtsss_000000=Settlement
funds_fxtfop_000000=Foreign Exchange Liquidation
......@@ -23,7 +23,9 @@ public class FtdselController {
@RequestMapping("/query")
public ResponseSet list(@RequestBody FtdVo vo) {
return ResponseSet.simpleSuccess(ftdselService.query(vo));
return ResponseSet.simpleSuccess(
ftdselService.query(vo)
);
}
/**
* 处理按钮查看能够进行的交易
......
......@@ -72,8 +72,8 @@ public class FxToolComponent {
fxdgrp.setBlk(blk);
//获取cbs金额信息
Date date = Dates.add(Utils.getMaxDate(), -1);
cbsmodService.cbsGetBalance(fxdgrp.getCbs().getMax(), "CPD", inr, "MAXSUM", "AMT1", date);
cbsmodService.cbsGetBalance(fxdgrp.getCbs().getNom1(), "CPD", inr, "NOMSUM", "AMT1", date);
cbsmodService.cbsGetBalance(fxdgrp.getCbs().getMax(), "FXD", inr, "MAXSUM", "AMT1", date);
cbsmodService.cbsGetBalance(fxdgrp.getCbs().getNom1(), "FXD", inr, "NOMSUM", "AMT1", date);
//获取ptspta信息
storePtsToGrp(fxdgrp, inr, "FXD");
return fxdgrp;
......
package com.brilliance.isc.funds.fxtfcm.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.FxtfcmStoreBo;
import com.brilliance.isc.funds.bo.funds.FxtlopStoreBo;
import com.brilliance.isc.funds.vo.funds.FxtfcmStoreVo;
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: FxtfcmValidator
......@@ -73,4 +81,6 @@ public class FxtfcmValidator extends AbstractModuleValidator <FxtfcmStoreBo>{
}
return null;
}
}
package com.brilliance.isc.funds.fxtfcm.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("fxtfcm.settleRegister")
public class FxtfcmSettleRegister implements ISettleRegister {
......@@ -26,6 +34,16 @@ public class FxtfcmSettleRegister implements ISettleRegister {
@Autowired
private GlemodService glemodService;
@Resource
private XrtmodService xrtmodService;
@Resource
private FxToolComponent fxToolComponent;
@Resource
private PtsptaToolComponent ptsptaToolComponent;
@Override
public void registerSettlement(SetmodVo setmodVo) {
transRegister(setmodVo);
......@@ -33,69 +51,89 @@ public class FxtfcmSettleRegister implements ISettleRegister {
}
private void transRegister(SetmodVo setmodVo) {
// FxdBizInfoVo rec = (FxdBizInfoVo) setmodVo.getRec();
//
// setglgService.setglgClrAmount ( setmodVo.getSetglg(),"TRN" );
// setglgService.setglgClrAmount ( setmodVo.getSetglg(),"SET" );
// //!==============================================
// //2、付出外币资金:
// //借:281105外汇买卖对外平盘 (A外币)
// //贷:112306/1125存放境内/外同业 (A外币)
// //!==============================================
// String act1 = null;
// String dbtKey = null;
// String acctyp = null;
// String acc = null;
// String cdtKey = null;
// BigDecimal baseunit = null;
// if( ! MdaUtils.isEmpty(rec.getFxtyp()) )
// {
// //#卖出确认
// //D:281105(A外币)
// act1 = glemodService.getAvailAcc ( "FT-FCR", this.getFxdgrp().getCbs().getNom1().getCur(), "", this, setmodVo.getSetamt() );
// dbtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"SET", "APL", this.getSetmod().getDoccur(), setmodVo.getSetamt(), "SET", "FTD", "F", act1, "SET" );
// /**
// $Act1 = SETMOD\\GLEMOD.GetAvailAcc ( "FX-ELQ", FXDGRP\\CBS\\MAX\\CUR, "", self, SETMOD\\SETAMT )
// $DbtKey = \\SETMOD\\SETGLG.SetglgAddAmount ( "SET", "OWN", SETMOD\\DOCCUR, SETMOD\\SETAMT, "SET", "FXD", "F", $Act1, "SET" )
//
// **/
// // cz modify 增加中间中间账户
// if( this.getFxdgrp().getAct().isRolSet() )
// {
// if( this.getFxdgrp().getAct().isDemestic() )
// {
// acctyp = "DB-CLR";
// 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(), "", "DBC", "C", acc, "" );
// }
FxdBizInfoVo rec = (FxdBizInfoVo) setmodVo.getRec();
Fxdgrp fxdgrp = fxToolComponent.getFxdgrpByInr(rec.getObjinr());
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();
}
SetglgVo setglg = setmodVo.getSetglg();
setglgService.setglgClrAmount ( setmodVo.getSetglg(),"TRN" );
setglgService.setglgClrAmount ( setmodVo.getSetglg(),"SET" );
//!==============================================
//2、付出外币资金:
//借:281105外汇买卖对外平盘 (A外币)
//贷:112306/1125存放境内/外同业 (A外币)
//!==============================================
String act1 = null;
String dbtKey = null;
String acctyp = null;
String acc = null;
String cdtKey = null;
BigDecimal baseunit = null;
if( ! MdaUtils.isEmpty(rec.getFxtyp()) )
{
//#卖出确认
//D:281105(A外币)
act1 = glemodService.getAvailAcc ( "FX-SPR", nom1Cur, "", setmodVo.getSetamt() );
dbtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"SET", "APL", nom1Cur, setmodVo.getSetamt(), "SET", "FTD", "F", act1, "SET" );
/**
$Act1 = SETMOD\\GLEMOD.GetAvailAcc ( "FX-ELQ", FXDGRP\\CBS\\MAX\\CUR, "", self, SETMOD\\SETAMT )
$DbtKey = \\SETMOD\\SETGLG.SetglgAddAmount ( "SET", "OWN", SETMOD\\DOCCUR, SETMOD\\SETAMT, "SET", "FXD", "F", $Act1, "SET" )
**/
// cz modify 增加中间中间账户
if( ptsptaToolComponent.ptsIsRolSet(fxdgrp.getAct()) )
{
if( 1==1 )
{
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
// {
// if( this.getFxdgrp().getApl().isDemestic() )
// {
// acctyp = "DB-CLR";
// 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(), "", "DBC", "C", acc, "" );
// }
}
else
{
if( 1==1 )
{
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, "" );
// }
// }
// //C:112306/1125外币
// //如果ACT未赋值,则APL为我行的账户行
// setglgService.setglgAddAmtFldAccCur ( setmodVo.getSetglg(),"SET", dbtKey, this.getFxdgrp().getCbs().getNom1().getCur() );
// baseunit = Dynamic.crossRatebas( this.getFxdgrp().getCbs().getMax().getCur(), this.getFxdgrp().getCbs().getNom1().getCur() );
// setglgService.setglgAddAmtFldExtRat ( "SET", dbtKey, Decimals.mul(1.00,baseunit), this.getFxdgrp().getRec().getRat() );
// }
// this.getSetmod().setglgAllValDat ( this.getFxdgrp().getRec().getValdat(), "D" );
}
//C:112306/1125外币
//如果ACT未赋值,则APL为我行的账户行
setglgService.setglgAddAmtFldAccCur ( setmodVo.getSetglg(),"SET", dbtKey, nom1Cur );
baseunit = xrtmodService.crossRatebas( maxCur, nom1Cur );
setglgService.setglgAddAmtFldExtRat ( setmodVo.getSetglg(),"SET", dbtKey, Decimals.mul(1.00,baseunit), fxdgrp.getRec().getRat() );
}
//setglgService.setglgAllValDat ( fxdgrp.getRec().getValdat(), "D" );
}
}
package com.brilliance.isc.funds.fxtfcm.service;
import com.brilliance.isc.funds.bo.funds.FxtfcmStoreBo;
public interface FxtfcmService {
void initFxtfcm(FxtfcmStoreBo fxtfcmStoreBo);
void defaultFxtfcm (FxtfcmStoreBo fxtfcmStoreBo);
}
package com.brilliance.isc.funds.fxtfcm.service.Impl;
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.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.transaction.AbstractTransactionService;
import com.brilliance.isc.common.transaction.help.TransactionHelpService;
import com.brilliance.isc.common.transaction.help.TransactionServiceSet;
......@@ -13,23 +19,28 @@ import com.brilliance.isc.common.trnmod.vo.TrnmodVo;
import com.brilliance.isc.common.vo.BizAmdInfoVo;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.funds.bo.funds.FxtfcmStoreBo;
import com.brilliance.isc.funds.bo.funds.FxtlopStoreBo;
import com.brilliance.isc.funds.common.component.FxToolComponent;
import com.brilliance.isc.funds.fxtfcm.check.FxtfcmValidator;
import com.brilliance.isc.funds.fxtfcm.service.FxtfcmService;
import com.brilliance.isc.funds.fxtlop.check.FxtlopValidator;
import com.brilliance.isc.funds.fxtlop.service.FxtlopService;
import com.brilliance.isc.funds.fxtlop.service.FxtpService;
import com.brilliance.isc.funds.vo.funds.FxtfcmStoreVo;
import com.brilliance.isc.mda.dao.PtyratMapper;
import com.brilliance.isc.vo.funds.FxdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.brilliance.isc.mda.dao.ActMapper;
import com.brilliance.isc.common.component.SptDataComponent;
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: FxtfcmTransactionServiceImpl
......@@ -42,13 +53,15 @@ import java.util.Map;
public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<FxtfcmStoreBo> {
@Resource
private FxtfcmValidator fxtfcmValidator;
@Autowired
private FxtfcmService fxtfcmService;
// @Autowired
// private FxtfcmService fxtfcmService;
@Resource
private FxToolComponent fxToolComponent;
@Resource
private TrnmodService trnmodService;
@Resource
private XrtmodService xrtmodService;
@Resource
private TransactionHelpService transactionHelpService;
@Resource
private CbsmodService cbsmodService;
......@@ -56,6 +69,26 @@ public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<Fxt
private LiaallService liaallService;
@Resource
private SettleContext settleContext;
@Autowired
private PtaCacheService ptaCacheService;
@Resource
private BchService bchService;
@Resource
private PtyratMapper ptyratMapper;
@Resource
private ActMapper actMapper;
@Resource
private SetmodService setmodService;
@Resource
private FxtpService fxtpService;
@Autowired
SptDataComponent sptDataComponent;
@PostConstruct
public void regisertService() {
......@@ -64,12 +97,13 @@ public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<Fxt
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");
// 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
......@@ -86,6 +120,18 @@ public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<Fxt
protected BizInfoVo buildBizInfo(FxtfcmStoreBo 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;
}
......@@ -97,15 +143,33 @@ public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<Fxt
@Override
public FxtfcmStoreBo init(FxtfcmStoreBo fxtfcmStoreBo) {
fxtfcmStoreBo.reset();
fxtfcmService.initFxtfcm(fxtfcmStoreBo);
fxtfcmService.defaultFxtfcm(fxtfcmStoreBo);
String fxdinr = fxtfcmStoreBo.getFxdgrp().getRec().getInr();
if (sptDataComponent.needMergeSptData(fxtfcmStoreBo)) {
fxdinr = fxtfcmStoreBo.getSpt().getObjinr();
}
Fxdgrp fxdgrpVo = fxToolComponent.getFxdgrpByInr(fxdinr);
fxtfcmStoreBo.setFxdgrp(fxdgrpVo);
init950(fxtfcmStoreBo);
init1000(fxtfcmStoreBo);
return fxtfcmStoreBo;
}
private void init950(FxtfcmStoreBo fxtfcmStoreBo) {
}
private void init1000(FxtfcmStoreBo fxtfcmStoreBo) {
String extkey = SettleContext.getUserSession().getUsr().getExtkey();
fxtfcmStoreBo.getFxdgrp().getRec().setOwnusr(extkey);
}
@Override
public void beforeSave(FxtfcmStoreBo transactionVo) {
transactionVo.reset();
Fxdgrp fxdgrp = transactionVo.getFxdgrp();
TransactionServiceSet transactionServiceSet = transactionHelpService.getTransactionStoreSet();
transactionServiceSet.setRec(fxdgrp.getRec());
transactionServiceSet.setBlk(fxdgrp.getBlk());
......@@ -117,50 +181,87 @@ public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<Fxt
@Override
protected void updateBizInfoVo(BizInfoVo bizInfoVo, FxtfcmStoreBo transactionVo) {
bizInfoVo.setObjinr(transactionVo.getFxdgrp().getRec().getInr());
}
public void ruleMtabutSavN500(FxtfcmStoreBo transactionVo) {
public void ruleMtabutSavN500(FxtfcmStoreBo bo) {
TrnmodVo trnmodVo = transactionHelpService.getTransactionStoreSet().getTrnmodVo();
fxToolComponent.getref(transactionVo.getFxdgrp());
fxToolComponent.getref(bo.getFxdgrp());
// 1. Create (rsp. update) Contract (incl. Texts)
transactionVo.getFxdgrp().getRec().setCnfdat( Dates.today());
if( MdaUtils.compareTo(transactionVo.getFxdgrp().getCbs().getOpn2().getAmt(),0) == 0 )
bo.getFxdgrp().getRec().setCnfdat( Dates.today());
if( MdaUtils.compareTo(bo.getFxdgrp().getCbs().getOpn2().getAmt(),0) == 0 )
{
transactionVo.getFxdgrp().getRec().setClsdat( Dates.today());
bo.getFxdgrp().getRec().setClsdat( Dates.today());
}
transactionVo.getFxdgrp().setAcc(transactionVo.getAplacc());
fxToolComponent.sav(transactionVo.getFxdgrp(), BigDecimal.ZERO);
bo.getFxdgrp().setAcc(bo.getAplacc());
fxToolComponent.sav(bo.getFxdgrp(), BigDecimal.ZERO);
// 2. Build Transaction from FTDGRP
trnmodService.trnSetFromContract ( trnmodVo);
cbsSav(transactionVo,trnmodVo);
cbsSav(bo,trnmodVo);
// save documents
//TODO
//记录116台账
//transactionVo.getNosmod().savNostro();
}
public void cbsSav(FxtfcmStoreBo transactionVo, TrnmodVo trnmodVo) {
cbsmodService.cbsTrnSetNew("TRN",trnmodVo.getTrn().getInr());
//#cgl
//平盘登记后产生4条CBB,MAX,NOM,OPN,OPN2
//后续两个交易分别消OPN和OPN2
String trninr = transactionHelpService.getTrninr();
trnmodService.cbsTrnStore("MAXAMT","AMT1",Dates.today(),transactionVo.getFxdgrp().getCbs().getMax().getCur(),transactionVo.getFxdgrp().getCbs().getMax().getAmt(),MdaUtils.getI18NString("fxtlop","CT000000"),transactionVo.getFxdgrp(),trninr);
trnmodService.cbsTrnStore("NOMAMT","AMT1",Dates.today(),transactionVo.getFxdgrp().getCbs().getNom1().getCur(),transactionVo.getFxdgrp().getCbs().getNom1().getAmt(),MdaUtils.getI18NString("fxtlop","CT000001"),transactionVo.getFxdgrp(),trninr);
/**
if FXDGRP\\REC\\FXTYP.is ( "LB" ) or FXDGRP\\REC\\FXTYP.is ( "LS" ) then
//liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall());
}
public List<String> defaultAcc2N1000(FxtfcmStoreVo 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;
}
**/
/**
if FXDGRP\\REC\\FXTYP.is ( "LB" ) then
* source:fxtfcm.0009.script
*/
**/
if( MdaUtils.compareTo(transactionVo.getFxdgrp().getRec().getFxtyp(),"LB")== 0 || MdaUtils.compareTo(transactionVo.getFxdgrp().getRec().getFxtyp(),"LS")== 0 )
public List<String> defaultAcc1N1000(FxtfcmStoreVo 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()) )
{
trnmodService.cbsTrnStore("OPNAMT","AMT1",Dates.today(),transactionVo.getFxdgrp().getCbs().getMax().getCur(),transactionVo.getFxdgrp().getCbs().getMax().getAmt(),MdaUtils.getI18NString("fxtlop","CT000002"),transactionVo.getFxdgrp(),trninr);
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));
}
}
liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall());
//Platform.cbsTrnCommit();
else
{
vo.setAcc1(NULLSTR);
}
return actLst;
}
}
package com.brilliance.isc.funds.fxtfcm.service.Impl;
import com.brilliance.isc.funds.bo.funds.FxtfcmStoreBo;
import com.brilliance.isc.funds.fxtfcm.service.FxtfcmService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@Service
public class FxtfcmServiceImpl implements FxtfcmService {
private static final Logger logger = LoggerFactory.getLogger(FxtfcmServiceImpl.class);
@Override
public void initFxtfcm(FxtfcmStoreBo fxtfcmStoreBo) {
initFxtfcm950(fxtfcmStoreBo);
initFxtfcm1000(fxtfcmStoreBo);
}
private void initFxtfcm950(FxtfcmStoreBo fxtfcmStoreBo) {
}
private void initFxtfcm1000(FxtfcmStoreBo fxtfcmStoreBo) {
// if( Platform.checkUsrBranch("1") )
// {
// this.getFxtp().setPansta( PanStaShow);
// this.getFxtp().getAplp().setPansta( PanStaShow);
// this.getAplaccp().setPansta( PanStaEdit);
// this.getFxtp().getActp().setPansta( PanStaEdit);
// Systems.resetVisible(this.getFxtp(),"ovwp");
// Systems.setActivePanel(this.getCnfp());
// // FXDGRP\\CBS\\NOM1\\CUR = SYSISO
// Systems.resetEnabled(this.getFxtp(),"amtp");
// Systems.setValues(this.getFxdgrp().getRec(),"fxtyp","FB" + CR + "FS");
// }
// else
// {
// this.getFxtp().setPansta( PanStaShow);
// this.getFxtp().getAplp().setPansta( PanStaShow);
// this.getAplaccp().setPansta( PanStaShow);
// this.getFxtp().getActp().setPansta( PanStaShow);
// Systems.resetVisible(this.getFxtp(),"ovwp");
// Systems.setActivePanel(this.getCnfp());
// Systems.resetEnabled(this,"cnfp");
// // FXDGRP\\CBS\\NOM1\\CUR = SYSISO
// Systems.resetEnabled(this.getFxtp(),"amtp");
// }
}
@Override
public void defaultFxtfcm(FxtfcmStoreBo fxtfcmStoreBo) {
}
}
package com.brilliance.isc.funds.fxtfop.check;
import com.brilliance.isc.bo.Fxd;
import com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator;
import com.brilliance.isc.common.transaction.newcheck.ValidResult;
import com.brilliance.isc.common.transaction.newcheck.Validate;
import com.brilliance.isc.funds.bo.funds.FxtfopStoreBo;
import com.brilliance.isc.funds.bo.funds.FxtssbStoreBo;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
......@@ -26,5 +31,70 @@ public class FxtfopValidator extends AbstractModuleValidator<FxtfopStoreBo> {
return maps;
}
/**
* source:fxtfop.0011.script
*/
@Validate(path="fxdgrp.rec.opndat")
public ValidResult checkFxdgrpRecOpndatN1000(FxtfopStoreBo bo){
Fxd rec = bo.getFxdgrp().getRec();
if( MdaUtils.isEmpty(rec.getOpndat()) )
{
return errorMandatory();
}
return null;
}
/**
* source:fxtfop.0012.script
*/
@Validate(path="fxdgrp.rec.valdat")
public ValidResult checkFxdgrpRecValdatN1000(FxtfopStoreBo bo){
Fxd rec = bo.getFxdgrp().getRec();
if( MdaUtils.isEmpty(rec.getValdat()) )
{
return errorMandatory();
}
return null;
}
/**
* source:fxtfop.0013.script
*/
@Validate(path="fxdgrp.rec.rat")
public ValidResult checkFxdgrpRecRatN1000(FxtfopStoreBo bo){
Fxd rec = bo.getFxdgrp().getRec();
if( MdaUtils.isEmpty(rec.getRat()) )
{
return errorMandatory();
}
return null;
}
/**
* source:fxtfop.0014.script
*/
@Validate(path="fxdgrp.apl.pts.extkey")
public ValidResult checkFxdgrpAplPtsExtkeyN1000(FxtfopStoreBo bo){
if( MdaUtils.isEmpty(bo.getFxdgrp().getApl().getPts().getExtkey()) )
{
return errorMandatory();
}
return null;
}
}
......@@ -218,11 +218,11 @@ public class FxtfopTransactionServiceImpl extends AbstractTransactionService<Fxt
cbsmodService.cbsTrnSetNew("TRN", trnmodVo.getTrn().getInr());
Fxacbs cbs = transactionVo.getFxdgrp().getCbs();
String trninr = transactionHelpService.getTrninr();
trnmodService.cbsTrnStore("MAXAMT", "AMT1", Dates.today(), cbs.getMax().getCur(), cbs.getMax().getAmt(), "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);
trnmodService.cbsTrnStore("MAXAMT", "AMT1", Dates.today(), cbs.getMax().getCur(), cbs.getMax().getAmt(), "funds_fxtfop_000000", transactionVo.getFxdgrp().getRec(), trninr);
trnmodService.cbsTrnStore("NOMAMT", "AMT1", Dates.today(), cbs.getNom1().getCur(), cbs.getNom1().getAmt(), I18nUtil.getMessage("funds_fxtfop_000000"), transactionVo.getFxdgrp().getRec(), 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);
trnmodService.cbsTrnStore("OPNAMT", "AMT1", Dates.today(), cbs.getMax().getCur(), cbs.getMax().getAmt(), I18nUtil.getMessage("funds_fxtfop_000000"), transactionVo.getFxdgrp().getRec(), trninr);
}
}
......
......@@ -2,7 +2,9 @@ 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.bo.model.Mt30m;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
......@@ -16,12 +18,25 @@ import lombok.Data;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FxtfcmStoreVo extends BaseTransactionVo {
//APLACC's Account
private String acc2= null;
//OWNACC's Account
private String acc1= null;
//发送MT300
private String swtflg= null;
//XMLPanel fxt300l1的内置block
private String fxt300l1blk= null;
private Fxdgrp fxdgrp;
//private Fxtmod fxtmod;
private Fxtp fxtp;
private Mt30m mt30m;
private PtsptaVo aplacc;
@Override
public void reset() {
super.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