Commit 3b0ddfc8 by zhoujunpeng

头寸调拨确认交易修改

parent bf59b139
...@@ -2,7 +2,7 @@ package com.brilliance.isc.funds.basesel.ftdsel.service.impl; ...@@ -2,7 +2,7 @@ package com.brilliance.isc.funds.basesel.ftdsel.service.impl;
import com.brilliance.isc.bo.FtdVo; import com.brilliance.isc.bo.FtdVo;
import com.brilliance.isc.funds.basesel.ftdsel.service.FtdselService; import com.brilliance.isc.funds.basesel.ftdsel.service.FtdselService;
import com.brilliance.isc.mda.dao.FtdselMapper; import com.brilliance.isc.mda.dao.FtdMapper;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -13,13 +13,13 @@ import java.util.List; ...@@ -13,13 +13,13 @@ import java.util.List;
@Service @Service
public class FtdselServiceImpl implements FtdselService { public class FtdselServiceImpl implements FtdselService {
@Resource @Resource
private FtdselMapper ftdselMapper; private FtdMapper ftdMapper;
@Override @Override
public PageInfo<FtdVo> query(FtdVo vo) { public PageInfo<FtdVo> query(FtdVo vo) {
//搜索 //搜索
PageHelper.startPage(vo.getPageNo(), vo.getPageSize(), null).setReasonable(true); PageHelper.startPage(vo.getPageNo(), vo.getPageSize(), null).setReasonable(true);
List<FtdVo> list = ftdselMapper.query(vo); List<FtdVo> list = ftdMapper.query(vo);
return new PageInfo<>(list); return new PageInfo<>(list);
......
...@@ -12,7 +12,7 @@ import com.brilliance.isc.common.trnmod.service.TrnmodService;import com.brillia ...@@ -12,7 +12,7 @@ import com.brilliance.isc.common.trnmod.service.TrnmodService;import com.brillia
import com.brilliance.isc.common.util.Utils; import com.brilliance.isc.common.util.Utils;
import com.brilliance.isc.common.vo.PtsptaVo; import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.mda.dao.FtdselMapper; import com.brilliance.isc.mda.dao.FtdMapper;
import com.brilliance.isc.mda.dao.CbbMapper; import com.brilliance.isc.mda.dao.CbbMapper;
import com.brilliance.isc.mda.dao.CndMapper; import com.brilliance.isc.mda.dao.CndMapper;
...@@ -38,7 +38,7 @@ public class FtToolComponent { ...@@ -38,7 +38,7 @@ public class FtToolComponent {
@Autowired @Autowired
private TrnmodService trnmodService; private TrnmodService trnmodService;
@Autowired @Autowired
private FtdselMapper ftdselMapper; private FtdMapper ftdMapper;
@Autowired @Autowired
private CbbMapper cbbMapper; private CbbMapper cbbMapper;
@Autowired @Autowired
...@@ -54,7 +54,7 @@ public class FtToolComponent { ...@@ -54,7 +54,7 @@ public class FtToolComponent {
Ftd ftd = new Ftd(); Ftd ftd = new Ftd();
ftd.setInr(inr); ftd.setInr(inr);
ftd = ftdselMapper.selectByPrimaryKey(ftd); ftd = ftdMapper.selectByPrimaryKey(ftd);
if (ftd == null) { if (ftd == null) {
throw new CommonServiceException("主键" + inr + "找不到FTD数据"); throw new CommonServiceException("主键" + inr + "找不到FTD数据");
} }
...@@ -254,7 +254,7 @@ public class FtToolComponent { ...@@ -254,7 +254,7 @@ public class FtToolComponent {
} }
} }
public void sav(Ftdgrp ftdgrp) { public void sav(Ftdgrp ftdgrp,BigDecimal cshpct) {
trnmodService.trnStoreContract(ftdgrp); trnmodService.trnStoreContract(ftdgrp);
} }
} }
......
package com.brilliance.isc.funds.common.register.cci;
import com.brilliance.isc.bo.Cci;
import com.brilliance.isc.bo.Pts;
import com.brilliance.isc.common.register.cci.CliBanInfo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.mda.dao.PtsMapper;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
@Component("FTD.cciRegister")
public class FtdCliBanInfo implements CliBanInfo{
@Resource
private PtsMapper ptsMapper;
@Override
public void buildValue(String objinr, String objtyp, List<PtsptaVo> ptsptaVos, Cci cci) {
//getFxdCliBanInfo
List<Pts> ptsList = ptsMapper.getPtsByObjInrTyp(objinr, objtyp);
if (CollectionUtils.isEmpty(ptsList)) {
ptsList = new ArrayList<>();
for (PtsptaVo ptsptaVo : ptsptaVos) {
ptsList.add(ptsptaVo.getPts());
}
}
if (CollectionUtils.isEmpty(ptsList)) {
return;
}
//! Defines role of the bank and the customer of the passed contract and PTAINR of the role as well
//! The passed contract has to be loaded completely
// role can be set dynamically dependent on the contract context
cci.setCcicusrol("APL");
Optional<Pts> optionalPts = ptsList.stream().filter(pts -> cci.getCcicusrol().equalsIgnoreCase(pts.getRol())).findFirst();
if (optionalPts.isPresent()) {
cci.setCcicusptainr(optionalPts.get().getPtainr());
}
cci.setCcibanptainr("");
cci.setCcibanrol("");
}
}
...@@ -29,22 +29,22 @@ public class FttpcmValidator extends AbstractModuleValidator<FttpcmStoreBo> { ...@@ -29,22 +29,22 @@ public class FttpcmValidator extends AbstractModuleValidator<FttpcmStoreBo> {
/** /**
* source:fttpcm.0016.script * source:fttpcm.0016.script
*/ */
@Validate(path="setmod.setglg.setgll") // @Validate(path="setmod.setglg.setgll")
public boolean checkSetmodSetglgSetgllN1000(){ // public boolean checkSetmodSetglgSetgllN1000(){
// IContext ctx = MdaEnv.getContext(); //// IContext ctx = MdaEnv.getContext();
////
//// for(int i = 1;i <= Grids.gridCount(this.getSetmod().getSetglg().getSetgll());i++)
//// {
//// if( MdaUtils.compareTo(this.getSetmod().getSetglg().getSetgll().getElement(i).getSftmt(),"103") == 0 )
//// {
//// if( MdaUtils.isEmpty(this.getSetmod().getSetglg().getSetgll().getElement(i).getSetgrp().getBei().getPts().getExtkey()) )
//// {
//// ctx.setFieldError(this,"setmod.setglg.setgll[i].setgrp.bei.pts.extkey",MdaUtils.getI18NString("fttpcm","CT000100"));
//// }
//// }
//// }
// //
// for(int i = 1;i <= Grids.gridCount(this.getSetmod().getSetglg().getSetgll());i++) // return true;
// { // }
// if( MdaUtils.compareTo(this.getSetmod().getSetglg().getSetgll().getElement(i).getSftmt(),"103") == 0 )
// {
// if( MdaUtils.isEmpty(this.getSetmod().getSetglg().getSetgll().getElement(i).getSetgrp().getBei().getPts().getExtkey()) )
// {
// ctx.setFieldError(this,"setmod.setglg.setgll[i].setgrp.bei.pts.extkey",MdaUtils.getI18NString("fttpcm","CT000100"));
// }
// }
// }
return true;
}
} }
...@@ -32,37 +32,22 @@ public class FttpcmSettleRegister implements ISettleRegister { ...@@ -32,37 +32,22 @@ public class FttpcmSettleRegister implements ISettleRegister {
public void registerSettlement(SetmodVo setmodVo) { public void registerSettlement(SetmodVo setmodVo) {
transRegister(setmodVo); transRegister(setmodVo);
defaultSettleRegister.registerSettlement(setmodVo); defaultSettleRegister.registerSettlement(setmodVo);
//dftcreSettleRegister.registerSettlement(setmodVo);
//trtcreSettleRegister.registerSettlement(setmodVo);
// if( Platform.checkUsrBranch("2") )
// dbtKey = this.getSetmod().setGlgAmt ( "TRN", "OWN", this.getSetmod().getDoccur(), this.getFtdgrp().getCbs().getMax().getAmt(), "" );
// cdtKey = this.getSetmod().setGlgAmt ( "TRN", "TRO", this.getSetmod().getDoccur(), this.getFtdgrp().getCbs().getMax().getAmt().negate(), "" );
// this.getTrnmod().getTrnism().setDefDsp ( "OWN", "D", "FTD" + CR + "DRD" );
// this.getTrnmod().getTrnism().setDefDsp ( "TRO", "C", "PAC" + CR + "DRC" );
// this.getSetmod().setFeeCliRol ( "TRO" );
// this.getSetmod().setglgAllValDat ( this.getFtdgrp().getRec().getValdat(), "D" );
// }
} }
public void transRegister(SetmodVo setmodVo) { public void transRegister(SetmodVo setmodVo) {
FtdBizInfoVo rec = (FtdBizInfoVo) setmodVo.getRec(); FtdBizInfoVo rec = (FtdBizInfoVo) setmodVo.getRec();
Ftdgrp ftdgrp = ftToolComponent.getFtdgrpByInr(rec.getObjinr()); // Ftdgrp ftdgrp = ftToolComponent.getFtdgrpByInr(rec.getObjinr());
//取得上下文 setmodVo.setDoccur(setmodVo.getCbsMap().get("MAX").getCur());
setmodVo.setDoccur(ftdgrp.getCbs().getMax().getCur()); setmodVo.setDocamt(setmodVo.getCbsMap().get("MAX").getAmt());
setmodVo.setDocamt(ftdgrp.getCbs().getMax().getAmt());
SetglgVo setglg = setmodVo.getSetglg(); SetglgVo setglg = setmodVo.getSetglg();
setglgService.setglgClrAmount ( setglg,"TRN" ); setglgService.setglgClrAmount ( setglg,"TRN" );
String dbtKey = NULLSTR; String dbtKey = NULLSTR;
String cdtKey = NULLSTR; String cdtKey = NULLSTR;
dbtKey = setmodService.setGlgAmt ( setmodVo,"OWN","D",setmodVo.getDoccur(),ftdgrp.getCbs().getMax().getAmt(), "FTD");
cdtKey = setmodService.setGlgAmt ( setmodVo,"TRN", "C", setmodVo.getDoccur(), ftdgrp.getCbs().getMax().getAmt(), "PAC" );
// trnmodVo.getTrnism().setDefDsp("OWN", "D", "FTD" + "\r" + "DRD");
// trnmodVo.getTrnism().setDefDsp("TRO", "C", "PAC" + "\r" + "DRC");
setmodVo.setFeeclirol("TRO");
// setmodVo.setglgAllValDat(rec.getValdat(), "D");
dbtKey = setglgService.setglgAddAmount(setglg,"TRN","OWN",setmodVo.getDoccur(),setmodVo.getDocamt(),"","FTD","D","","");
cdtKey = setglgService.setglgAddAmount(setglg,"TRN","TRO",setmodVo.getDoccur(),setmodVo.getDocamt(),"","FTD","C","","");
setmodVo.setFeeclirol("TRO");
} }
} }
...@@ -32,7 +32,7 @@ import org.springframework.stereotype.Service; ...@@ -32,7 +32,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Map; import java.math.BigDecimal;import java.util.Map;
import java.util.Objects; import java.util.Objects;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR; import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
...@@ -79,9 +79,9 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt ...@@ -79,9 +79,9 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
public void ruleMtabutSavN500(FttpcmStoreBo bo) { public void ruleMtabutSavN500(FttpcmStoreBo bo) {
TrnmodVo trnmodVo = transactionHelpService.getTransactionStoreSet().getTrnmodVo(); TrnmodVo trnmodVo = transactionHelpService.getTransactionStoreSet().getTrnmodVo();
Ftdgrp ftdgrp = bo.getFtdgrp(); ftToolComponent.getref(bo.getFtdgrp());
ftToolComponent.getref(ftdgrp); bo.getFtdgrp().getRec().setCnfdat(Dates.today());
ftToolComponent.sav(ftdgrp); ftToolComponent.sav(bo.getFtdgrp(),BigDecimal.ZERO);
// 2. Build Transaction from FTDGRP // 2. Build Transaction from FTDGRP
trnmodService.trnSetFromContract(trnmodVo); trnmodService.trnSetFromContract(trnmodVo);
cbsSav(bo, trnmodVo); cbsSav(bo, trnmodVo);
...@@ -93,13 +93,11 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt ...@@ -93,13 +93,11 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
//取得上下文 //取得上下文
cbsmodService.cbsTrnSetNew("TRN", trnmodVo.getTrn().getInr()); cbsmodService.cbsTrnSetNew("TRN", trnmodVo.getTrn().getInr());
Ftacbs cbs = transactionVo.getFtdgrp().getCbs(); Ftacbs cbs = transactionVo.getFtdgrp().getCbs();
String trninr = transactionHelpService.getTrninr(); String trninr = transactionHelpService.getTrninr();;
trnmodService.cbsTrnStore("MAXAMT","AMT1",Dates.today(),cbs.getMax().getCur(),cbs.getMax().getAmt(),"Funds Transfer",transactionVo.getFtdgrp().getRec(), trninr);
trnmodService.cbsTrnStore("MAXAMT","AMT1",Dates.today(),cbs.getMax().getCur(),cbs.getMax().getAmt(),I18nUtil.getMessage("funds_fttpcm_000000"),transactionVo.getFtdgrp().getRec(), trninr); trnmodService.cbsTrnStore("UTLAMT","AMT1",Dates.today(),cbs.getMax().getCur(),cbs.getMax().getAmt(),"Funds Transfer",transactionVo.getFtdgrp().getRec(), trninr);
trnmodService.cbsTrnStore("UTLAMT","AMT1",Dates.today(),cbs.getMax().getCur(),cbs.getMax().getAmt(),I18nUtil.getMessage("funds_fttpcm_000000"),transactionVo.getFtdgrp().getRec(), trninr); trnmodService.cbsTrnStore("OPNAMT","AMT1",Dates.today(),cbs.getMax().getCur(),cbs.getMax().getAmt(),"Funds Transfer",transactionVo.getFtdgrp().getRec(), trninr);
trnmodService.cbsTrnStore("OPNAMT","AMT1",Dates.today(),cbs.getMax().getCur(),cbs.getMax().getAmt(),I18nUtil.getMessage("funds_fttpcm_000000"),transactionVo.getFtdgrp().getRec(), trninr); cbsmodService.cbsTrnCommit();
//trnmodService.troCommit(trnmodVo,);
} }
@Override @Override
......
...@@ -2,12 +2,20 @@ package com.brilliance.isc.funds.fttpcn.resource; ...@@ -2,12 +2,20 @@ package com.brilliance.isc.funds.fttpcn.resource;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController; import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.vo.funds.FttpcnStoreVo; import com.brilliance.isc.funds.transfer.transaction.FttpcnStructMapper;import com.brilliance.isc.funds.vo.funds.FttpcnStoreVo;
import org.springframework.web.bind.annotation.RequestMapping; import com.brilliance.isc.transfer.IStructMapper;import io.swagger.annotations.Api;import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;import javax.annotation.Resource;
@RestController @RestController
@RequestMapping("/fttpcn") @RequestMapping("/fttpcn")
@Api("头寸调拨交易销账")
public class FttpcnResource extends AbstractTransactionController<FttpcnStoreVo> { public class FttpcnResource extends AbstractTransactionController<FttpcnStoreVo> {
@Resource
private FttpcnStructMapper fttpcnStructMapper;
public IStructMapper getStructMapper()
{
return fttpcnStructMapper;
}
} }
package com.brilliance.isc.funds.fttpcn.service; package com.brilliance.isc.funds.fttpcn.service;
import com.brilliance.isc.bo.model.Fttp;import com.brilliance.isc.common.cbsmod.service.CbsmodService;import com.brilliance.isc.common.component.PtsptaToolComponent;import com.brilliance.isc.common.component.SptDataComponent;import com.brilliance.isc.common.context.SettleContext;import com.brilliance.isc.common.sysmod.SysmodService;import com.brilliance.isc.common.transaction.AbstractTransactionService; import com.brilliance.isc.bo.Ftd;
import com.brilliance.isc.common.transaction.help.TransactionHelpService;import com.brilliance.isc.common.trnmod.service.TrnmodService;import com.brilliance.isc.common.trnmod.vo.TrnmodVo;import com.brilliance.isc.common.vo.BizInfoVo; import com.brilliance.isc.bo.Pty;import com.brilliance.isc.bo.Smh;import com.brilliance.isc.bo.model.Ftacbs;
import com.brilliance.isc.funds.bo.funds.FttpcnStoreBo;import com.brilliance.isc.funds.common.component.FtToolComponent;import com.brilliance.isc.funds.fttpcn.check.FttpcnValidator;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Service; import com.brilliance.isc.bo.model.Ftdgrp;
import javax.annotation.Resource;import java.util.Map; import com.brilliance.isc.bo.model.Fttp;
import com.brilliance.isc.common.cbsmod.service.CbsmodService;
import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.component.SptDataComponent;
import com.brilliance.isc.common.contants.CommonContants;import com.brilliance.isc.common.context.SettleContext;
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.vo.BizAmdInfoVo;import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.funds.bo.funds.FttpcmStoreBo;import com.brilliance.isc.funds.bo.funds.FttpcnStoreBo;
import com.brilliance.isc.funds.common.component.FtToolComponent;
import com.brilliance.isc.funds.fttpcn.check.FttpcnValidator;
import com.brilliance.isc.mda.dao.PtyMapper;import com.brilliance.isc.mda.dao.SmhMapper;import com.brilliance.isc.vo.funds.FtdBizInfoVo;
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 javax.annotation.PostConstruct;import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Map;import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;import static com.brilliance.mda.runtime.mda.Constants.PanStaShow;
@Service("fttpcn.transaction") @Service("fttpcn.transaction")
...@@ -27,13 +48,31 @@ public class FttpcnTransactionServiceImpl extends AbstractTransactionService<Ftt ...@@ -27,13 +48,31 @@ public class FttpcnTransactionServiceImpl extends AbstractTransactionService<Ftt
SptDataComponent sptDataComponent; SptDataComponent sptDataComponent;
@Autowired @Autowired
PtsptaToolComponent ptsptaToolComponent; PtsptaToolComponent ptsptaToolComponent;
@Resource
private SmhMapper smhMapper;
@Resource
private PtyMapper ptyMapper;
@PostConstruct
public void regisertService() {
serviceRegisterMaps.put(CommonContants.SETMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNDOC_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.GLEMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNDIA_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNMOD_SERVICE, "Y");
}
@Override @Override
protected void txnSave(FttpcnStoreBo transactionVo) { protected void txnSave(FttpcnStoreBo transactionVo) {
ruleMtabutSavN500(transactionVo);
} }
public void ruleMtabutSavN500(FttpcnStoreBo fttpcnStoreBo){
TrnmodVo trnmodVo = transactionHelpService.getTransactionStoreSet().getTrnmodVo();
ftToolComponent.getref(fttpcnStoreBo.getFtdgrp());
ftToolComponent.sav(fttpcnStoreBo.getFtdgrp(),BigDecimal.ZERO);
trnmodService.trnSetFromContract(trnmodVo);
cbsSav(fttpcnStoreBo, trnmodVo);
}
@Override @Override
protected Map<String, String> txnCheck(FttpcnStoreBo transactionVo) { protected Map<String, String> txnCheck(FttpcnStoreBo transactionVo) {
return fttpcnValidator.validate(transactionVo); return fttpcnValidator.validate(transactionVo);
...@@ -41,32 +80,83 @@ public class FttpcnTransactionServiceImpl extends AbstractTransactionService<Ftt ...@@ -41,32 +80,83 @@ public class FttpcnTransactionServiceImpl extends AbstractTransactionService<Ftt
@Override @Override
protected BizInfoVo buildBizInfo(FttpcnStoreBo transactionVo) { protected BizInfoVo buildBizInfo(FttpcnStoreBo transactionVo) {
return null; FtdBizInfoVo bizInfoVo = new FtdBizInfoVo();
bizInfoVo.setObjtyp("FTD");
Ftd rec = transactionVo.getFtdgrp().getRec();
bizInfoVo.setObjinr(rec.getInr());
bizInfoVo.setOwnref(rec.getOwnref());
bizInfoVo.setFttyp(rec.getFttyp());
bizInfoVo.setRat(rec.getRat());
bizInfoVo.setBranchInr(rec.getBranchinr());
bizInfoVo.setEtyextkey(rec.getEtyextkey());
bizInfoVo.setAmt(rec.getAmt());
bizInfoVo.setBranchInr(rec.getBranchinr());
return bizInfoVo;
} }
@Override
protected void updateBizInfoVo(BizInfoVo bizInfoVo, FttpcnStoreBo transactionVo) {
bizInfoVo.setObjinr(transactionVo.getFtdgrp().getRec().getInr());
}
@Override
protected BizAmdInfoVo buildBizAmdInfo(FttpcnStoreBo transactionVo) {
return null;
}
@Override @Override
public void beforeSave(FttpcnStoreBo transactionVo) { public void beforeSave(FttpcnStoreBo transactionVo) {
transactionVo.reset();
Ftdgrp ftdgrp = transactionVo.getFtdgrp();
TransactionServiceSet transactionServiceSet = transactionHelpService.getTransactionStoreSet();
transactionServiceSet.setRec(ftdgrp.getRec());
transactionServiceSet.setBlk(ftdgrp.getBlk());
transactionServiceSet.setTransactionVo(transactionVo);
ftToolComponent.collectCbsMap(transactionServiceSet, "", ftdgrp.getCbs(), "max");
ftToolComponent.collectPtsList(transactionServiceSet, ftdgrp, null);
settleContext.loadSettleSession(transactionVo.getTransName(), transactionVo.getUserId(), buildBizInfo(transactionVo), transactionServiceSet.getPtsList());
} }
public void cbsSav(FttpcnStoreBo transactionVo, TrnmodVo trnmodVo){ public void cbsSav(FttpcnStoreBo transactionVo, TrnmodVo trnmodVo){
String trninr = transactionHelpService.getTrninr();
cbsmodService.cbsTrnSetNew("TRN",trninr);
Ftacbs cbs = transactionVo.getFtdgrp().getCbs();
trnmodService.cbsTrnStore("OPNAMT","AMT1",Dates.today(),cbs.getOpn2().getCur(),
transactionVo.getCanamt().negate(),"Position Transfer",transactionVo.getFtdgrp().getRec(), trninr);
cbsmodService.cbsTrnCommit();
} }
@Override @Override
public FttpcnStoreBo init(FttpcnStoreBo fttpcnStoreBo){ public FttpcnStoreBo init(FttpcnStoreBo fttpcnStoreBo){
fttpcnStoreBo.reset(); fttpcnStoreBo.reset();
String ftdInr = fttpcnStoreBo.getFtdgrp().getRec().getInr();
if(sptDataComponent.needMergeSptData(fttpcnStoreBo)){
ftdInr = fttpcnStoreBo.getSpt().getObjinr();
}
Ftdgrp ftdgrp = ftToolComponent.getFtdgrpByInr(ftdInr);
fttpcnStoreBo.setFtdgrp(ftdgrp);
init950(fttpcnStoreBo); init950(fttpcnStoreBo);
init1000(fttpcnStoreBo); init1000(fttpcnStoreBo);
return fttpcnStoreBo; return fttpcnStoreBo;
} }
private void init950(FttpcnStoreBo fttpcmStoreBo){ private void init950(FttpcnStoreBo fttpcmStoreBo){
Ftdgrp ftdgrp = fttpcmStoreBo.getFtdgrp();
// if(!fttpcmStoreBo.isModified("canamt")){
// fttpcmStoreBo.setCanamt(ftdgrp.getCbs().getMax().getAmt());
// }
// if (!fttpcmStoreBo.isModified("cancur")){
// fttpcmStoreBo.setCancur(ftdgrp.getCbs().getMax().getCur());
// }
} }
private void init1000(FttpcnStoreBo fttpcmStoreBo){ private void init1000(FttpcnStoreBo fttpcnStoreBo){
Fttp fttp = fttpcmStoreBo.getFttp(); Fttp fttp = fttpcnStoreBo.getFttp();
// fttp.setPansta(); String extkey = SettleContext.getUserSession().getUsr().getExtkey();
fttpcnStoreBo.getFtdgrp().getRec().setOwnusr(extkey);
fttp.setPansta(PanStaShow);
} }
......
...@@ -3,14 +3,20 @@ package com.brilliance.isc.funds.bo.funds; ...@@ -3,14 +3,20 @@ package com.brilliance.isc.funds.bo.funds;
import com.brilliance.isc.bo.model.Ftdgrp;import com.brilliance.isc.bo.model.Fttp;import com.brilliance.isc.common.transaction.vo.BaseTransactionVo; import com.brilliance.isc.bo.model.Ftdgrp;import com.brilliance.isc.bo.model.Fttp;import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.brilliance.mda.runtime.mda.util.Decimals;import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data; import lombok.Data;import java.math.BigDecimal;import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Data @Data
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
public class FttpcnStoreBo extends BaseTransactionVo{ public class FttpcnStoreBo extends BaseTransactionVo{
//Cancel Amount
private BigDecimal canamt = Decimals.ZERO_SCALE2;
private String oldactinr= NULLSTR;
//Cancel Currency
private String cancur= NULLSTR;
private Ftdgrp ftdgrp; private Ftdgrp ftdgrp;
private Fttp fttp; private Fttp fttp;
......
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