Commit 83b56deb by xiaotong

fxtlcm代码迁移

parent a4726e76
package com.brilliance.isc.funds.fxtlcm.check;
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.FxtlcmStoreBo;
import com.brilliance.isc.funds.bo.funds.FxtlcmStoreBo;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;
/**
* @program: isc-funds
* @ClassName: FxtlcmValidator
* @description: 结售汇平盘确认 Fxtlcm 校验
* @author: 肖桐
* @create: 2024-10-14 14:12
*/
@Component
public class FxtlcmValidator extends AbstractModuleValidator <FxtlcmStoreBo>{
@Override
@PostConstruct
public void register(){
super.register();;
}
@Override
public Map<String, String> validate(FxtlcmStoreBo vo) {
Map<String, String> maps = new HashMap<>();
maps.putAll(super.validate(vo));
return maps;
}
/**
* source:Fxtlcm.0023.script
*/
@Validate(path="fxdgrp.apl.pts.ref")
public ValidResult checkFxdgrpAplPtsRefN1000(FxtlcmStoreBo vo){
if( ! MdaUtils.isEmpty(vo.getSwtflg()) && ( MdaUtils.compareTo(vo.getMt30m().getS22a(),"AMND") == 0 || MdaUtils.compareTo(vo.getMt30m().getS22a(),"CANC") == 0 ) )
{
if( MdaUtils.isEmpty(vo.getFxdgrp().getApl().getPts().getRef()) )
{
return errorMandatory();
}
}
return null;
}
/**
* source:Fxtlcm.0024.script
*/
@Validate(path="mt30m.rbc.pts.extkey")
public ValidResult checkMt30mRbcPtsExtkeyN1000(FxtlcmStoreBo vo){
if( ! MdaUtils.isEmpty(vo.getSwtflg()) && MdaUtils.isEmpty(vo.getMt30m().getRbc().getPts().getExtkey()) )
{
return errorMandatory();
}
return null;
}
/**
* source:Fxtlcm.0025.script
*/
@Validate(path="mt30m.owc.pts.extkey")
public ValidResult checkMt30mOwcPtsExtkeyN1000(FxtlcmStoreBo vo){
if( ! MdaUtils.isEmpty(vo.getSwtflg()) && MdaUtils.isEmpty(vo.getMt30m().getOwc().getPts().getExtkey()) )
{
return errorMandatory();
}
return null;
}
}
package com.brilliance.isc.funds.fxtlcm.document;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.trndoc.vo.DoceotVo;
import com.brilliance.isc.funds.bo.funds.FxtlcmStoreBo;
import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.Formats;
import com.brilliance.mda.runtime.mda.util.Strings;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* @program: isc-funds
* @ClassName: BuildFxt300s1
* @description: 组装MT300报文
* @author: Lenovo
* @create: 2024-10-14 14:43
*/
@Component("fxtlcm.docset")
public class BuildFxt300s1 {
public Map<String, Object> build(FxtlcmStoreBo trnBo, DoceotVo doceotVo) {
HashMap map = new HashMap();
map.putAll(printHeader(trnBo, doceotVo));
//map.putAll(printBody(trnBo, doceotVo));
map.putAll(printFooter(trnBo, doceotVo));
return map;
}
private Map<String, Object> printHeader(FxtlcmStoreBo trnBo, DoceotVo doceotVo) {
HashMap<String, Object> map = new HashMap<>();
String title = "";
title = " Formatted outgoing message / mt300 Viewer";
map.put("title", title);
return map;
}
private Map<String, Object> printFooter(FxtlcmStoreBo trnBo, DoceotVo doceotVo) {
HashMap<String, Object> map = new HashMap<>();
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
String format = sdf.format(new Date());
String footer = Strings.getText("Diary printed by $1 on $2 at $3 during the change",
SettleContext.getUserSession().getUsr().getExtkey(), Formats.fmtDateLong(Dates.today()), format);
map.put("footer", footer);
return map;
}
}
package com.brilliance.isc.funds.fxtlcm.document;
import com.brilliance.isc.common.trndoc.vo.DoceotVo;
import com.brilliance.isc.doc.handle.impl.AbstractTransactionDocSet;
import com.brilliance.isc.funds.bo.funds.FxtfcmStoreBo;
import com.brilliance.isc.funds.bo.funds.FxtlcmStoreBo;
import com.brilliance.isc.funds.fxtfcm.document.BuildFxt300l1;
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;
/**
* @program: isc-funds
* @ClassName: FxtlcmDocset
* @description:
* @author: Lenovo
* @create: 2024-10-14 15:14
*/
@Component("fxtLcm.docset")
public class FxtlcmDocset extends AbstractTransactionDocSet<FxtlcmStoreBo> {
@Resource
private BuildFxt300s1 buildFxt300s1;
@PostConstruct
public void buildMember() {
buildLetterProvider("fxtlcm","FXT3001");
//扫描Cortype支持,必须要执行
scanDocCortypSupport();
}
public Map<String,Object> buildExtraMapForLetter(FxtlcmStoreBo trnbo, DoceotVo doceotVo){
if (MdaUtils.compareTo(doceotVo.getDocnam(),"FXT3001")==0){
return buildFxt300s1.build(trnbo,doceotVo);
} else {
return new HashMap<>();
}
}
}
package com.brilliance.isc.funds.fxtlcm.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: FxtlcmDissavRegister
* @description: 结售汇平盘确认 Fxtlcm 备忘录注册
* @author: Lenovo
* @create: 2024-10-14 15:19
*/
@Component("fxtlcm.diasavRegister")
public class FxtlcmDiasavRegister 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) {
}
}
package com.brilliance.isc.funds.fxtlcm.register.doc;
import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.register.document.IDocumentRegister;
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: FxtlcmDocumentRegister
* @description: 结售汇平盘确认 Fxtlcm 报文注册
* @author: Lenovo
* @create: 2024-10-14 15:22
*/
@Component("fxtlcm.documentRegister")
public class FxtlcmDocumentRegister implements IDocumentRegister {
@Autowired
TrndocService trndocService;
@Resource
PtsptaToolComponent ptsptaToolComponent;
@Override
public void registerDocument(TrndocVo trndoc) {
doRegister(trndoc);
}
public void doRegister(TrndocVo trndoc){
FxdBizInfoVo rec = (FxdBizInfoVo) trndoc.getRec();
PtsptaVo aplVo = ptsptaToolComponent.getPtsFromListByRol(trndoc.getPtsptas(), "APL");
if (!MdaUtils.isEmpty(rec.getSwtflg())) {
trndocService.defDocEot(trndoc, "TRN", "300", "\\FXT300L1", "LET", 0, aplVo.getPts().getPtainr(), "\\FXDGRP\\REC", "MT 300", "TRO", "");
}
}
}
package com.brilliance.isc.funds.fxtlcm.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: FxtlcmFeeRegister
* @description: 结售汇平盘确认 Fxtlcm 费用注册
* @author: Lenovo
* @create: 2024-10-14 15:25
*/
@Component("fxtlcm.feeRegister")
public class FxtlcmFeeRegister 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.fxtlcm.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;
/**
* @program: isc-funds
* @ClassName: FxtlcmLiaallRegister
* @description: 结售汇平盘确认 Fxtlcm 表外注册
* @author: Lenovo
* @create: 2024-10-14 15:31
*/
@Component("fxtlcm.liaallSetTransaction")
public class FxtlcmLiaallRegister implements ILiaallRegister {
@Autowired
private LiaallRegister liaallRegister;
@Override
public void liaallSetTransaction(LiaallVo liaallVo) {
liaallRegister.liaallSetTransaction(liaallVo);
}
}
package com.brilliance.isc.funds.fxtlcm.register.wfe;
import com.brilliance.isc.common.trnism.service.IWfeRegister;
import com.brilliance.isc.common.trnmod.vo.TrnmodVo;
import org.springframework.stereotype.Component;
/**
* @program: isc-funds
* @ClassName: FxtlcmWfeRegister
* @description: 结售汇平盘确认 Fxtlcm 报文面函注册
* @author: Lenovo
* @create: 2024-10-14 15:35
*/
@Component("fxtlcm"+"."+ IWfeRegister.REGISTER_NAME)
public class FxtlcmWfeRegister implements IWfeRegister {
@Override
public void wfeRegister(TrnmodVo trnmodVo){
}
}
package com.brilliance.isc.funds.fxtlcm.resource;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.fxtlcm.service.impl.FxtlcmTransactionServiceImpl;
import com.brilliance.isc.funds.transfer.transaction.FxtlcmStructMapper;
import com.brilliance.isc.funds.vo.funds.FxtlcmStoreVo;
import com.brilliance.isc.transfer.IStructMapper;
import com.brilliance.isc.vo.ResponseSet;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @program: isc-funds
* @ClassName: FxtlcmResource
* @description:结售汇平盘确认 Fxtlcm
* @author: Lenovo
* @create: 2024-10-14 13:57
*/
@RestController
@RequestMapping("/fxtlcm")
@Api("结售汇平盘确认")
public class FxtlcmResource extends AbstractTransactionController<FxtlcmStoreVo> {
@Resource
private FxtlcmStructMapper fxtlcmStructMapper;
public IStructMapper getStructMapper() {
return fxtlcmStructMapper;
}
@Resource(name = "fxtlcm.transaction")
FxtlcmTransactionServiceImpl fxtlcmTransactionService;
@Autowired
private SettleContext settleContext;
@PostMapping("/getRef")
public ResponseSet<String> getRef(@RequestBody FxtlcmStoreVo fxtlcmStoreVo) {
String ref = fxtlcmTransactionService.getRef(fxtlcmStoreVo);
return ResponseSet.simpleSuccess(fxtlcmStoreVo);
}
}
package com.brilliance.isc.funds.fxtlcm.service.impl;
import com.brilliance.isc.bo.Bch;
import com.brilliance.isc.bo.Fxd;
import com.brilliance.isc.bo.Pta;
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.gmgf.service.GmgfService;
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;
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.vo.BizAmdInfoVo;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.bo.funds.FxtlcmStoreBo;
import com.brilliance.isc.funds.common.component.FxToolComponent;
import com.brilliance.isc.funds.fxtlcm.check.FxtlcmValidator;
import com.brilliance.isc.funds.vo.funds.FxtlcmStoreVo;
import com.brilliance.isc.vo.funds.FxdBizInfoVo;
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 java.util.Objects;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
/**
* @program: isc-funds
* @ClassName: FxtlcmTransactionServiceImpl
* @description: 结售汇平盘登记Fxtlcm 业务处理
* @author: Lenovo
* @create: 2024-10-14 11:53
*/
@Service("fxtlcm.transaction")
public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<FxtlcmStoreBo> {
@Resource
private FxtlcmValidator fxtlcmValidator;
@Resource
private FxToolComponent fxToolComponent;
@Resource
private TrnmodService trnmodService;
@Resource
private TransactionHelpService transactionHelpService;
@Resource
private SettleContext settleContext;
@Autowired
private PtaCacheService ptaCacheService;
@Resource
private BchService bchService;
@PostConstruct
public void regisertService() {
serviceRegisterMaps.put(CommonContants.SETMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNDOC_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.GLEMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNDIA_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.UMDMOD_SERVICE, "N");
serviceRegisterMaps.put(CommonContants.LIMMOD_SERVICE, "N");
serviceRegisterMaps.put(CommonContants.BOPSET_RMB_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.BOPSET_SZSB_BOPREM_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.BOPSET_CFABOP_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.FANXIQIAN_SERVICE, "Y");
}
@Override
protected void txnSave(FxtlcmStoreBo transactionVo) {
ruleMtabutSavN500(transactionVo);
}
@Override
protected Map<String, String> txnCheck(FxtlcmStoreBo transactionVo) {
return fxtlcmValidator.validate(transactionVo);
}
@Override
protected BizInfoVo buildBizInfo(FxtlcmStoreBo 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;
}
@Override
protected BizAmdInfoVo buildBizAmdInfo(FxtlcmStoreBo transactionVo) {
return null;
}
@Override
public FxtlcmStoreBo init(FxtlcmStoreBo fxtlcmStoreBo) {
fxtlcmStoreBo.reset();
initFxtlcm(fxtlcmStoreBo);
//fxtlopService.defaultFxtlop(fxtlopStoreBo);
return fxtlcmStoreBo;
}
public void initFxtlcm(FxtlcmStoreBo fxtlcmStoreBo){
Fxdgrp fxdgrp = fxtlcmStoreBo.getFxdgrp();
fxdgrp = fxToolComponent.getFxdgrpByInr(fxtlcmStoreBo.getFxdgrp().getRec().getInr());
fxtlcmStoreBo.setFxdgrp(fxdgrp);
}
@Override
public void beforeSave(FxtlcmStoreBo transactionVo) {
transactionVo.reset();
Fxdgrp fxdgrp = transactionVo.getFxdgrp();
TransactionServiceSet transactionServiceSet = transactionHelpService.getTransactionStoreSet();
transactionServiceSet.setRec(fxdgrp.getRec());
transactionServiceSet.setBlk(fxdgrp.getBlk());
transactionServiceSet.setTransactionVo(transactionVo);
fxToolComponent.collectCbsMap(transactionServiceSet, "", fxdgrp.getCbs(), "max", "nom1", "opn1", "opn2");
fxToolComponent.collectPtsList(transactionServiceSet, fxdgrp, null);
settleContext.loadSettleSession(transactionVo.getTransName(), transactionVo.getUserId(), buildBizInfo(transactionVo), transactionServiceSet.getPtsList());
}
@Override
protected void updateBizInfoVo(BizInfoVo bizInfoVo, FxtlcmStoreBo transactionVo) {
}
public void ruleMtabutSavN500(FxtlcmStoreBo transactionVo){
TrnmodVo trnmodVo = transactionHelpService.getTransactionStoreSet().getTrnmodVo();
fxToolComponent.getref(transactionVo.getFxdgrp());
// 1. Create (rsp. update) Contract (incl. Texts)
fxToolComponent.sav(transactionVo.getFxdgrp(), BigDecimal.ZERO);
// 2. Build Transaction from FTDGRP
trnmodService.trnSetFromContract ( trnmodVo);
cbsSav(transactionVo, trnmodVo);
// save documents
}
public void cbsSav(FxtlcmStoreBo 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().getRec(),trninr);
// trnmodService.cbsTrnStore("NOMAMT","AMT1",Dates.today(),transactionVo.getFxdgrp().getCbs().getNom1().getCur(),transactionVo.getFxdgrp().getCbs().getNom1().getAmt(),MdaUtils.getI18NString("fxtlop","CT000001"),transactionVo.getFxdgrp().getRec(),trninr);
// /**
// if FXDGRP\\REC\\FXTYP.is ( "LB" ) or FXDGRP\\REC\\FXTYP.is ( "LS" ) then
//
// **/
// /**
// if FXDGRP\\REC\\FXTYP.is ( "LB" ) then
//
// **/
// if( MdaUtils.compareTo(transactionVo.getFxdgrp().getRec().getFxtyp(),"LB")== 0 || MdaUtils.compareTo(transactionVo.getFxdgrp().getRec().getFxtyp(),"LS")== 0 )
// {
// trnmodService.cbsTrnStore("OPNAMT","AMT1",Dates.today(),transactionVo.getFxdgrp().getCbs().getMax().getCur(),transactionVo.getFxdgrp().getCbs().getMax().getAmt(),MdaUtils.getI18NString("fxtlop","CT000002"),transactionVo.getFxdgrp().getRec(),trninr);
// }
// if ( !MdaUtils.isEmpty( transactionHelpService.getTransactionStoreSet().getLiaall())) {
// liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall());
// }
// //Platform.cbsTrnCommit();
}
public String getRef(FxtlcmStoreVo fxtlcmStoreVo) {
fxtlcmStoreVo.reset();
PtsptaVo ptsptaVo = fxtlcmStoreVo.getFxdgrp().getApl();
if (ptsptaVo == null || StringUtils.isEmpty(ptsptaVo.getPtainr())) {
return NULLSTR;
}
Pta pta = ptaCacheService.getPtaByInr(ptsptaVo.getPtainr());
Bch wrkbch = new Bch();
wrkbch.setInr(pta.getBranchinr());
wrkbch = bchService.selectByPrimaryKey(wrkbch);
if (Objects.isNull(wrkbch)) {
return NULLSTR;
}
SettleContext.getUserSession().setWrkbch(wrkbch);
Fxdgrp fxdgrp = fxtlcmStoreVo.getFxdgrp();
fxToolComponent.getref(fxdgrp);
return fxdgrp.getRec().getOwnref();
}
}
......@@ -97,8 +97,8 @@ public class FxtselServiceImpl implements FxtselService {
Fxdgrp fxdgrp=new Fxdgrp();
fxdgrp = fxToolComponent.getFxdgrpByInr(trnCodeQueryVo.getInr());
String[] fxTraArray = {"FXTFCM", "FXTLCN"};
String[] fxButArray = {"外币兑换平盘确认", "外币兑换平盘销账"};
String[] fxTraArray = {"FXTFCM", "FXTLCN","FXTLCM"};
String[] fxButArray = {"外币兑换平盘确认", "外币兑换平盘销账","结售汇平盘确认"};
String isAllowed = "";
for (int i = 0; i < fxTraArray.length; i++) {
TrncodVo trncodVo = new TrncodVo(fxTraArray[i], fxButArray[i], isAllowed,"Y","");
......
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.isc.vo.model.GmgfVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
/**
* @program: isc-funds
* @ClassName: FxtlcmStoreBo
* @description: 结售汇平盘确认bo
* @author: Lenovo
* @create: 2024-10-14 11:41
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FxtlcmStoreBo 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 Fxtp fxtp;
private Mt30m mt30m;
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.FxtlcmStoreBo;
import com.brilliance.isc.funds.bo.funds.FxtlopStoreBo;
import com.brilliance.isc.funds.vo.funds.FxtlcmStoreVo;
import com.brilliance.isc.funds.vo.funds.FxtlopStoreVo;
import com.brilliance.isc.transfer.IBaseStructMapper;
import com.sun.javaws.jnl.RContentDesc;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
/**
* @program: isc-funds
* @ClassName: FxtlcmStructMapper
* @description: 结售汇平盘确认转换Fxtlcm Bo、Vo之间的转换处理类。如果有很复杂的函数,则可以用适配器模式重写
* @author: Lenovo
* @create: 2024-10-14 11:44
*/
@Mapper(componentModel = "spring")
public interface FxtlcmStructMapper extends IBaseStructMapper<FxtlcmStoreBo, FxtlcmStoreVo> {
/**
* 此行语句一定要写,StructMapper需要
*/
FxtlcmStructMapper INSTANCE = Mappers.getMapper(FxtlcmStructMapper.class);
/**
* Vo转为Bo
*
* @param vo
* @return 返回业务Bo
*/
@Override
FxtlcmStoreBo voTransferToBo(FxtlcmStoreVo vo);
/**
* Vo追加更新至Bo
*
* @param vo
* @param bo
*/
@Override
@Mappings({
})
void voUpdateToBo(FxtlcmStoreVo vo, @MappingTarget FxtlcmStoreBo bo);
/**
* Bo转为Vo
*
* @param bo
* @return 返回Vo
*/
@Override
FxtlcmStoreVo boTransferToVo(FxtlcmStoreBo bo);
/**
* bo追加更新至Bo
*
* @param bo
* @param vo
*/
@Override
void boUpdateToVo(FxtlcmStoreBo bo, @MappingTarget FxtlcmStoreVo 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.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;
/**
* @program: isc-funds
* @ClassName: FxtlcmStoreVo
* @description: 结售汇平盘确认vo
* @author: Lenovo
* @create: 2024-10-14 11:38
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FxtlcmStoreVo 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 Fxtp fxtp;
private Mt30m mt30m;
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