Commit 2e3f178e by zhoujunpeng

头寸调拨确认交易修改+头寸销账修改

parent 14b549a0
package com.brilliance.isc.funds.basesel.trncod.service.impl;
import com.brilliance.isc.bo.Busbtn;
import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.bo.Trn;
import com.brilliance.isc.bo.model.Cpdgrp;
//import com.brilliance.isc.bo.remit.CptadvStoreBo;
//import com.brilliance.isc.bo.remit.CptopnStoreBo;
import com.brilliance.isc.bo.model.Ftdgrp;
import com.brilliance.isc.common.cbsmod.service.CbsmodService;
//import com.brilliance.isc.common.component.CpToolComponent;
import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.funds.basesel.common.FtToolComponent;
import com.brilliance.isc.funds.basesel.trncod.consts.ErrorPrompt;
import com.brilliance.isc.funds.common.component.FtToolComponent;
import com.brilliance.isc.funds.basesel.trncod.service.TrncodService;
import com.brilliance.isc.mda.dao.BusbtnMapper;
import com.brilliance.isc.mda.dao.TrnMapper;
import com.brilliance.isc.vo.TrnCodeQueryVo;
import com.brilliance.isc.vo.TrncodVo;
import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.google.common.collect.Lists;
import org.checkerframework.checker.units.qual.C;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@Service
public class TrncodServiceImpl implements TrncodService {
......@@ -52,7 +39,7 @@ public class TrncodServiceImpl implements TrncodService {
public List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo) {
List<TrncodVo> result = Lists.newArrayList();
//获取模型数据
Ftdgrp ftdgrp = ftToolComponent.getCpdgrpByInr(trnCodeQueryVo.getInr());
Ftdgrp ftdgrp = ftToolComponent.getFtdgrpByInr(trnCodeQueryVo.getInr());
String isAllowed = "";
String[] fxTraArray = {"FTTFMT", "FTTFCN","FTTPCN"};
String[] fxButArray = {"资金拆借到期", "资金拆借销账","头寸调拨销账"};
......
package com.brilliance.isc.funds.fttpcm.register.settle;
import com.brilliance.isc.common.glemod.service.GlemodService;
import com.brilliance.isc.bo.model.Ftdgrp;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.setmod.service.SetmodService;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.brilliance.isc.common.transaction.check.TrnmodCheck;import com.brilliance.isc.common.trnmod.service.impl.TrnmodServiceImpl;import com.brilliance.isc.common.trnmod.vo.TrnmodVo;import com.brilliance.isc.funds.common.component.FtToolComponent;import com.brilliance.isc.vo.funds.FtdBizInfoVo;import org.apache.poi.hpsf.Decimal;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Component("fttpcm.settleRegister")
......@@ -23,6 +23,10 @@ public class FttpcmSettleRegister implements ISettleRegister {
@Autowired
private GlemodService glemodService;
@Autowired
private TrnmodServiceImpl trnmodService;
@Autowired
private FtToolComponent ftToolComponent;
@Override
public void registerSettlement(SetmodVo setmodVo) {
......@@ -31,15 +35,7 @@ public class FttpcmSettleRegister implements ISettleRegister {
//dftcreSettleRegister.registerSettlement(setmodVo);
//trtcreSettleRegister.registerSettlement(setmodVo);
// //取得上下文
// IContext ctx = MdaEnv.getContext();
// ctx.setErrorCode(NO_ERROR);
// this.getSetmod().setDocAmt ( this.getFtdgrp().getCbs().getMax().getCur(), this.getFtdgrp().getCbs().getMax().getAmt(), "Disable" );
// this.getSetmod().getSetglg().setglgClrAmount ( "TRN" );
// String dbtKey = NULLSTR;
// String cdtKey = NULLSTR;
// 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" );
......@@ -49,6 +45,24 @@ public class FttpcmSettleRegister implements ISettleRegister {
// }
}
public void transRegister(SetmodVo setmodVo) {
FtdBizInfoVo rec = (FtdBizInfoVo) setmodVo.getRec();
Ftdgrp ftdgrp = ftToolComponent.getFtdgrpByInr(rec.getObjinr());
//取得上下文
setmodVo.setDoccur(ftdgrp.getCbs().getMax().getCur());
setmodVo.setDocamt(ftdgrp.getCbs().getMax().getAmt());
SetglgVo setglg = setmodVo.getSetglg();
setglgService.setglgClrAmount ( setglg,"TRN" );
String dbtKey = 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");
}
}
......@@ -40,33 +40,6 @@ public class FttpcmResource extends AbstractTransactionController<FttpcmStoreVo>
return ResponseSet.simpleSuccess(ref);
}
@PostMapping("/defaultRateN1000")
public ResponseSet defaultRateN1000(@RequestBody FxtfopStoreVo fxtfopStoreVo) {
try {
settleContext.loadSettleSession("FTTPCM","","");
fttpcmTransactionService.defaultRateN1000(fxtfopStoreVo);
return ResponseSet.simpleSuccess(fxtfopStoreVo);
} catch (Exception e) {
throw e;
} finally {
SettleContext.removeUserSession();
}
}
@PostMapping("/defaultCalculateN1100")
public ResponseSet defaultCalculateN1100(@RequestBody FttpcmStoreVo fttpcmStoreVo) {
try {
settleContext.loadSettleSession("FTTPCM","","");
fttpcmTransactionService.defaultCalculateN1100(fttpcmStoreVo);
return ResponseSet.simpleSuccess(fttpcmStoreVo);
} catch (Exception e) {
throw e;
} finally {
SettleContext.removeUserSession();
}
}
}
package com.brilliance.isc.funds.fttpcm.service;
import com.brilliance.isc.bo.Bch;
import com.brilliance.isc.bo.Ftd;
import com.brilliance.isc.bo.Pta;
import com.brilliance.isc.bo.model.Ftacbs;
import com.brilliance.isc.bo.model.Ftdgrp;
......@@ -8,6 +9,7 @@ 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.sysmod.SysmodService;
import com.brilliance.isc.common.transaction.AbstractTransactionService;
......@@ -15,20 +17,22 @@ 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.StringUtils;
import com.brilliance.isc.common.util.I18nUtil;import com.brilliance.isc.common.util.StringUtils;
import com.brilliance.isc.common.vo.BizAmdInfoVo;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.basesel.common.FtToolComponent;
import com.brilliance.isc.funds.common.component.FtToolComponent;
import com.brilliance.isc.funds.bo.funds.FttpcmStoreBo;
import com.brilliance.isc.funds.fttpcm.check.FttpcmValidator;
import com.brilliance.isc.funds.vo.funds.FttpcmStoreVo;
import com.brilliance.isc.funds.vo.funds.FxtfopStoreVo;
;import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
;import com.brilliance.isc.vo.funds.FtdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.Dates;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;import java.math.BigDecimal;import java.util.Map;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.Map;
import java.util.Objects;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
......@@ -59,7 +63,15 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
// @Resource
// private FttpService fttpService;
@PostConstruct
public void regisertService() {
serviceRegisterMaps.put(CommonContants.SETMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNDOC_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.GLEMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNDIA_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNMOD_SERVICE, "Y");
}
@Override
protected void txnSave(FttpcmStoreBo transactionVo){
ruleMtabutSavN500(transactionVo);
......@@ -69,7 +81,7 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
TrnmodVo trnmodVo = transactionHelpService.getTransactionStoreSet().getTrnmodVo();
Ftdgrp ftdgrp = bo.getFtdgrp();
ftToolComponent.getref(ftdgrp);
ftToolComponent.sav(ftdgrp, BigDecimal.ZERO);
ftToolComponent.sav(ftdgrp);
// 2. Build Transaction from FTDGRP
trnmodService.trnSetFromContract(trnmodVo);
cbsSav(bo, trnmodVo);
......@@ -83,24 +95,13 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
Ftacbs cbs = transactionVo.getFtdgrp().getCbs();
String trninr = transactionHelpService.getTrninr();
trnmodService.cbsTrnStore("MAXAMT","AMT1",Dates.today(),cbs.getMax().getCur(),cbs.getMax().getAmt(),MdaUtils.getI18NString("fttpcm","CT000098"),transactionVo.getFtdgrp().getRec(), trninr);
trnmodService.cbsTrnStore("UTLAMT","AMT1",Dates.today(),cbs.getMax().getCur(),cbs.getMax().getAmt(),MdaUtils.getI18NString("fttpcm","CT000094"),transactionVo.getFtdgrp().getRec(), trninr);
trnmodService.cbsTrnStore("OPNAMT","AMT1",Dates.today(),cbs.getMax().getCur(),cbs.getMax().getAmt(),MdaUtils.getI18NString("fttpcm","CT000099"),transactionVo.getFtdgrp().getRec(), trninr);
// trnmodService.troCommit();
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(),I18nUtil.getMessage("funds_fttpcm_000000"),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);
}
@Override
protected Map<String, String> txnCheck(FttpcmStoreBo transactionVo) {
return fttpcmValidator.validate(transactionVo);
}
//trnmodService.troCommit(trnmodVo,);
@Override
protected BizInfoVo buildBizInfo(FttpcmStoreBo transactionVo) {
return null;
}
@Override
public void beforeSave(FttpcmStoreBo transactionVo) {
transactionVo.reset();
......@@ -110,37 +111,69 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
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());
}
@Override
protected Map<String, String> txnCheck(FttpcmStoreBo transactionVo) {
return fttpcmValidator.validate(transactionVo);
}
@Override
protected BizInfoVo buildBizInfo(FttpcmStoreBo transactionVo) {
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, FttpcmStoreBo transactionVo) {
bizInfoVo.setObjinr(transactionVo.getFtdgrp().getRec().getInr());
}
@Override
protected BizAmdInfoVo buildBizAmdInfo(FttpcmStoreBo transactionVo) {
return null;
}
public String getRef(FttpcmStoreVo fttpcmStoreVo) {
fttpcmStoreVo.reset();
PtsptaVo ptsptaVo = fttpcmStoreVo.getFtdgrp().getApl();
if (ptsptaVo == null || StringUtils.isEmpty(ptsptaVo.getPtainr())) {
PtsptaVo ptsptaVo1 = fttpcmStoreVo.getFtdgrp().getBen();
if (ptsptaVo1 == null || StringUtils.isEmpty(ptsptaVo1.getPtainr())) {
return NULLSTR;
}
PtsptaVo ptsptaVo2 = fttpcmStoreVo.getFtdgrp().getTro();
if (ptsptaVo2 == null || StringUtils.isEmpty(ptsptaVo2.getPtainr())) {
return NULLSTR;
}
PtsptaVo ptsptaVo3 = fttpcmStoreVo.getFtdgrp().getTri();
if (ptsptaVo3 == null || StringUtils.isEmpty(ptsptaVo3.getPtainr())) {
return NULLSTR;
}
Pta pta = ptaCacheService.getPtaByInr(ptsptaVo.getPtainr());
Pta pta = ptaCacheService.getPtaByInr(ptsptaVo2.getPtainr());
Bch wrkbch = new Bch();
wrkbch.setInr(pta.getBranchinr());
wrkbch = bchService.selectByPrimaryKey(wrkbch);
if (Objects.isNull(wrkbch)) {
return NULLSTR;
}
SettleContext.getUserSession().setWrkbch(wrkbch);
SettleContext.getUserSession().setWrkbch( SettleContext.getUserSession().getBch());
Ftdgrp ftdgrp = fttpcmStoreVo.getFtdgrp();
ftToolComponent.getref(ftdgrp);
return ftdgrp.getRec().getOwnref();
}
public void defaultCalculateN1100(FttpcmStoreVo fttpcmStoreVo) {
fttpcmStoreVo.reset();
// fttpService.defaultCalculateN1100(fxtfopStoreVo.getFxdgrp(), fxtfopStoreVo.getFxtp());
}
public void defaultRateN1000(FxtfopStoreVo fxtfopStoreVo) {
}
@Override
public FttpcmStoreBo init(FttpcmStoreBo fttpcmStoreBo) {
fttpcmStoreBo.reset();
......@@ -154,11 +187,7 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
*/
public void init1000(FttpcmStoreBo bo) {
bo.getFtdgrp().getCbs().getMax().setCur(xrtmodService.sysiso());
bo.getFtdgrp().getRec().setFttyp("FT");
String extkey = SettleContext.getUserSession().getUsr().getExtkey();
bo.getFtdgrp().getRec().setUsr(extkey);
// bo.getFtdgrp().getCbs().getMax().setCur(xrtmodService.sysiso());
if (bo.getFtdgrp().getRec().getOpndat() ==null ){
bo.getFtdgrp().getRec().setOpndat(Dates.today());
......@@ -167,7 +196,9 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
if (bo.getFtdgrp().getRec().getValdat() ==null ){
bo.getFtdgrp().getRec().setValdat(Dates.today());
}
bo.getFtdgrp().getRec().setFttyp("PT");
String extkey = SettleContext.getUserSession().getUsr().getExtkey();
bo.getFtdgrp().getRec().setUsr(extkey);
}
private void init950(FttpcmStoreBo fttpcmStoreBo) {
......
package com.brilliance.isc.funds.fttpcn.check;
import com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator;
import com.brilliance.isc.funds.bo.funds.FttpcnStoreBo;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;
@Component
public class FttpcnValidator extends AbstractModuleValidator<FttpcnStoreBo>{
@Override
@PostConstruct
public void register() {
super.register();
}
@Override
public Map<String, String> validate(FttpcnStoreBo bo) {
Map<String, String> maps = new HashMap<>();
maps.putAll(super.validate(bo));
return maps;
}
}
package com.brilliance.isc.funds.fttpcn.document;
import com.brilliance.isc.doc.handle.impl.AbstractTransactionDocSet;
import com.brilliance.isc.funds.bo.funds.FttpcnStoreBo;
import org.springframework.stereotype.Component;
@Component("fttpcn.docset")
public class FttpcnDocset extends AbstractTransactionDocSet<FttpcnStoreBo> {
}
package com.brilliance.isc.funds.fttpcn.register.diasav;
import com.brilliance.isc.common.register.diasav.IDiasavRegister;
import com.brilliance.isc.common.trndia.vo.TrndiaVo;
import org.springframework.stereotype.Component;
@Component("fttpcn.diasavRegister")
public class FttpcnDiasavRegister implements IDiasavRegister {
@Override
public void diasav(TrndiaVo trndia) {
}}
package com.brilliance.isc.funds.fttpcn.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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* @program: isc-funds
* @description: Fttpcn 报文注册
* @create: 2024-10-18
*/
@Component("fttpcn.documentRegister")
public class FttpcnDocumentRegister 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.fttpcn.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;
@Component("fttpcn.feeRegister")
public class FttpcnFeeRegister 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.fttpcn.register.settle;
import com.brilliance.isc.bo.model.Ftdgrp;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.setmod.service.SetmodService;import com.brilliance.isc.common.setmod.vo.SetmodVo;
import com.brilliance.isc.funds.common.component.FtToolComponent;import com.brilliance.isc.vo.funds.FtdBizInfoVo;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Component;
@Component("fttpcn.settleRegister")
public class FttpcnSettleRegister implements ISettleRegister{
@Autowired
private SetmodService setmodService;
@Autowired
private SetglgService setglgService;
@Autowired
private DefaultSettleRegister defaultSettleRegister;
@Autowired
private FtToolComponent ftToolComponent;
@Override
public void registerSettlement(SetmodVo setmodVo) {
transRegister(setmodVo);
defaultSettleRegister.registerSettlement(setmodVo);
}
private void transRegister(SetmodVo setmodVo) {
FtdBizInfoVo rec = (FtdBizInfoVo) setmodVo.getRec();
Ftdgrp ftdgrp = ftToolComponent.getFtdgrpByInr(rec.getObjinr());
setmodVo.setDocamt(ftdgrp.getCbs().getOpn2().getAmt());
setglgService.setglgClrAmount ( setmodVo.getSetglg(),"TRN" );
String dbtKey = setglgService.setglgAddAmount(setmodVo.getSetglg(),"TRN","TRI",
setmodVo.getDoccur(),rec.getCanamt(),"", "DBD","C","","");
String cdtKey = setglgService.setglgAddAmount(setmodVo.getSetglg(),"TRN","OWN",
setmodVo.getDoccur(),setmodVo.getDocamt(),"","FTC","C","","");
}
}
package com.brilliance.isc.funds.fttpcn.resource;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.vo.funds.FttpcnStoreVo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/fttpcn")
public class FttpcnResource extends AbstractTransactionController<FttpcnStoreVo> {
}
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.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.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 javax.annotation.Resource;import java.util.Map;
@Service("fttpcn.transaction")
public class FttpcnTransactionServiceImpl extends AbstractTransactionService<FttpcnStoreBo>{
@Resource
private FttpcnValidator fttpcnValidator;
@Resource
private FtToolComponent ftToolComponent;
@Resource
private TrnmodService trnmodService;
@Resource
private TransactionHelpService transactionHelpService;
@Resource
private CbsmodService cbsmodService;
@Resource
private SettleContext settleContext;
@Resource
private SysmodService sysmodService;
@Autowired
SptDataComponent sptDataComponent;
@Autowired
PtsptaToolComponent ptsptaToolComponent;
@Override
protected void txnSave(FttpcnStoreBo transactionVo) {
}
@Override
protected Map<String, String> txnCheck(FttpcnStoreBo transactionVo) {
return fttpcnValidator.validate(transactionVo);
}
@Override
protected BizInfoVo buildBizInfo(FttpcnStoreBo transactionVo) {
return null;
}
@Override
public void beforeSave(FttpcnStoreBo transactionVo) {
}
public void cbsSav(FttpcnStoreBo transactionVo, TrnmodVo trnmodVo){
}
@Override
public FttpcnStoreBo init(FttpcnStoreBo fttpcnStoreBo){
fttpcnStoreBo.reset();
init950(fttpcnStoreBo);
init1000(fttpcnStoreBo);
return fttpcnStoreBo;
}
private void init950(FttpcnStoreBo fttpcmStoreBo){
}
private void init1000(FttpcnStoreBo fttpcmStoreBo){
Fttp fttp = fttpcmStoreBo.getFttp();
// fttp.setPansta();
}
}
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.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FttpcnStoreBo extends BaseTransactionVo{
private Ftdgrp ftdgrp;
private Fttp fttp;
@Override
public void reset() {
super.reset();
if (ftdgrp == null) {
ftdgrp = new Ftdgrp();
}
ftdgrp.reset();
if (fttp == null) {
fttp = new Fttp();
}
fttp.reset();
}
}
......@@ -16,7 +16,7 @@ public interface FttpcmStructMapper extends IBaseStructMapper<FttpcmStoreBo, Ftt
/**
* 此行语句一定要写,StructMapper需要
*/
FxtfcmStructMapper INSTANCE = Mappers.getMapper(FxtfcmStructMapper.class);
FttpcmStructMapper INSTANCE = Mappers.getMapper(FttpcmStructMapper.class);
/**
* Vo转为Bo
......
package com.brilliance.isc.funds.transfer.transaction;
import com.brilliance.isc.funds.bo.funds.FttpcmStoreBo;import com.brilliance.isc.funds.bo.funds.FttpcnStoreBo;
import com.brilliance.isc.funds.vo.funds.FttpcmStoreVo;import com.brilliance.isc.funds.vo.funds.FttpcnStoreVo;
import com.brilliance.isc.transfer.IBaseStructMapper;
import org.mapstruct.Mapper;import org.mapstruct.MappingTarget;import org.mapstruct.Mappings;import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring")
public interface FttpcnStructMapper extends IBaseStructMapper<FttpcnStoreBo, FttpcnStoreVo> {
/**
* 此行语句一定要写,StructMapper需要
*/
FxtfcmStructMapper INSTANCE = Mappers.getMapper(FxtfcmStructMapper.class);
/**
* Vo转为Bo
*
* @param vo
* @return 返回业务Bo
*/
@Override
FttpcnStoreBo voTransferToBo(FttpcnStoreVo vo);
/**
* Vo追加更新至Bo
*
* @param vo
* @param bo
*/
@Override
@Mappings({
})
void voUpdateToBo(FttpcnStoreVo vo, @MappingTarget FttpcnStoreBo bo);
/**
* Bo转为Vo
*
* @param bo
* @return 返回Vo
*/
@Override
FttpcnStoreVo boTransferToVo(FttpcnStoreBo bo);
/**
* bo追加更新至Bo
*
* @param bo
* @param vo
*/
@Override
void boUpdateToVo(FttpcnStoreBo bo, @MappingTarget FttpcnStoreVo vo);
}
package com.brilliance.isc.funds.vo.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.fasterxml.jackson.annotation.JsonIgnoreProperties;import lombok.Data;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FttpcnStoreVo extends BaseTransactionVo{
private Ftdgrp ftdgrp;
private Fttp fttp;
@Override
public void reset() {
super.reset();
if (ftdgrp == null) {
ftdgrp = new Ftdgrp();
}
ftdgrp.reset();
if (fttp == null) {
fttp = new Fttp();
}
fttp.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