Commit f70e2d2f by zhoujunpeng

Merge remote-tracking branch 'origin/develop' into develop

parents 51b4b6f9 bee1ec8e
......@@ -38,3 +38,4 @@ build/
workroot/log
workroot/DUMP
logs/*
......@@ -10,3 +10,4 @@ funds_fxtfop_000000=Foreign Exchange Liquidation
funds_fxtfcn_CT000009=Foreign Exchange Liquidation
0136=This contract is overdrawn by {0}
funds_crtcri_000000=Clearing in
funds_crtcr0_000000=付款清算
......@@ -13,3 +13,4 @@ funds_fxtfcn_CT000009=Foreign Exchange Liquidation
fttfcm=资金拆借到期提示:
funds_crtcri_000000=Clearing in
funds_crtcr0_000000=
package com.brilliance.isc.funds.common.component;
import com.brilliance.isc.bo.*;
import com.brilliance.isc.bo.model.Cracbs;
import com.brilliance.isc.bo.model.Crdgrp;
import com.brilliance.isc.bo.model.Crtmod;
import com.brilliance.isc.bo.model.*;
import com.brilliance.isc.common.cbsmod.service.CbsmodService;
import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.exception.CommonServiceException;
import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.common.transaction.help.TransactionServiceSet;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
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.Utils;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.mda.dao.BchMapper;
import com.brilliance.isc.mda.dao.CrdMapper;
import com.brilliance.isc.mda.dao.*;
import com.brilliance.isc.vo.TrncodVo;
import com.brilliance.mda.runtime.mda.Constants;
import com.brilliance.mda.runtime.mda.IStream;
......@@ -28,9 +26,9 @@ import com.brilliance.mda.runtime.mda.util.Streams;
import com.brilliance.mda.runtime.mda.util.Strings;
import com.google.common.collect.ImmutableBiMap;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.lang.reflect.Field;
import java.util.*;
......@@ -46,25 +44,58 @@ import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Component
public class CrToolComponent {
@Autowired
@Resource
private CrdMapper crdMapper;
@Autowired
@Resource
private PtsptaToolComponent ptsptaToolComponent;
@Autowired
@Resource
private CbsmodService cbsmodService;
@Autowired
@Resource
private SysmodService sysmodService;
@Autowired
@Resource
private TrnmodService trnmodService;
@Autowired
@Resource
private BchMapper bchMapper;
@Resource
private CpdMapper cpdMapper;
@Resource
private CptMapper cptMapper;
@Resource
private CndMapper cndMapper;
@Resource
private BcdMapper bcdMapper;
@Resource
private BctMapper bctMapper;
@Resource
private BrdMapper brdMapper;
@Resource
private BrtMapper brtMapper;
@Resource
private LidMapper lidMapper;
@Resource
private LitMapper litMapper;
@Resource
private GidMapper gidMapper;
@Resource
private GitMapper gitMapper;
public Crdgrp getCrdgrpByInr(String inr) {
Crd rec = new Crd();
rec.setInr(inr);
......@@ -238,7 +269,7 @@ public class CrToolComponent {
/**
* source:crtmod.0003.script
*/
public void saveClearingEntry(Crtmod crtmod, TrnmodVo trnmodVo) {
public void saveClearingEntry(Crtmod crtmod, TrnmodVo trnmodVo, BaseTransactionVo bo) {
trnmodVo.reset();
crtmod.reset();
// 根据AutoRegistration创造
......@@ -247,7 +278,7 @@ public class CrToolComponent {
return;
}
//crdgrp
Crdgrp argGrp = crtmod.getCrdgrp();
Crdgrp argGrp = Utils.getFieldValue(bo,"crdgrp");
String argGrpPath = Strings.getLine(parstm, 1);
String argFrm = Strings.getLine(parstm, 2);
String argTxt = Strings.getLine(parstm, 3);
......@@ -321,4 +352,149 @@ public class CrToolComponent {
Streams.streamInsert(parstm, 0, argTxt);
}
public Cpdgrp getCpdgrpByInr(String inr) {
Cpd cpd = new Cpd();
cpd.setInr(inr);
cpd = cpdMapper.selectByPrimaryKey(cpd);
if (cpd == null) {
throw new CommonServiceException("主键" + inr + "找不到CPD数据");
}
Cpdgrp cpdgrp = new Cpdgrp();
cpdgrp.reset();
cpdgrp.setRec(cpd);
Cpt cpt = new Cpt();
cpt.setInr(inr);
cpt = cptMapper.selectByPrimaryKey(cpt);
cpdgrp.setBlk(cpt);
//获取cbs金额信息
Date date = Dates.add(Utils.getMaxDate(), -1);
cbsmodService.cbsGetBalance(cpdgrp.getCbs().getMax(), "CPD", inr, "MAXSUM", "AMT1", date);
cbsmodService.cbsGetBalance(cpdgrp.getCbs().getNom1(), "CPD", inr, "NOMSUM", "AMT1", date);
//获取ptspta信息
storePtsToGrp(cpdgrp, inr, "CPD");
//获取cnd信息
getCndInfo(cpdgrp, inr, "CPD");
return cpdgrp;
}
public void getCndInfo(Cpdgrp cpdgrp, String objInr, String objType) {
List<Cnd> cnds = cndMapper.selectByObjtypAndObjinr(objType, objInr);
if (!MdaUtils.isEmpty(cnds)) {
cpdgrp.setPyebchkey(cnds.get(0).getPyebchkey());
cpdgrp.setPyebchnam(cnds.get(0).getPyebchnam());
}
}
public Bcdgrp getBcdgrpByInr(String inr) {
Bcd rec = new Bcd();
rec.setInr(inr);
rec = bcdMapper.selectByPrimaryKey(rec);
if (rec == null) {
throw new CommonServiceException("主键" + inr + "找不到BCD数据");
}
String objtyp = "BCD";
Bcdgrp bcdgrp = new Bcdgrp();
bcdgrp.reset();
bcdgrp.setRec(rec);
Bct blk = new Bct();
blk.setInr(inr);
blk = bctMapper.selectByPrimaryKey(blk);
bcdgrp.setBlk(blk);
//获取cbs金额信息
Date date = Dates.add(Utils.getMaxDate(), -1);
cbsmodService.cbsGetBalance(bcdgrp.getCbs().getMax(), objtyp, inr, "MAXSUM", "AMT1", date);
cbsmodService.cbsGetBalance(bcdgrp.getCbs().getOpn1(), objtyp, inr, "OPN", "AMT1", date);
//获取ptspta信息
storePtsToGrp(bcdgrp, inr, objtyp);
return bcdgrp;
}
public Brdgrp getBrdgrpByInr(String inr) {
Brd rec = new Brd();
rec.setInr(inr);
rec = brdMapper.selectByPrimaryKey(rec);
if (rec == null) {
throw new CommonServiceException("主键" + inr + "找不到BRD数据");
}
String objtyp = "BRD";
Brdgrp brdgrp = new Brdgrp();
brdgrp.reset();
brdgrp.setRec(rec);
Brt blk = new Brt();
blk.setInr(inr);
blk = brtMapper.selectByPrimaryKey(blk);
brdgrp.setBlk(blk);
//获取cbs金额信息
Date date = Dates.add(Utils.getMaxDate(), -1);
cbsmodService.cbsGetBalance(brdgrp.getCbs().getMax(), objtyp, inr, "MAXSUM", "AMT1", date);
cbsmodService.cbsGetBalance(brdgrp.getCbs().getOpn1(), objtyp, inr, "OPN", "AMT1", date);
//getAamCbsPerDate MAX2/OPN2
cbsmodService.cbsGetBalance(brdgrp.getCbs().getMax2(), objtyp, inr, "MAXSUM", "AMT2", date);
cbsmodService.cbsGetBalance(brdgrp.getCbs().getOpn2(), objtyp, inr, "OPN", "AMT2", date);
//获取ptspta信息
storePtsToGrp(brdgrp, inr, objtyp);
return brdgrp;
}
public Lidgrp getLidgrpByInr(String inr) {
Lid rec = new Lid();
rec.setInr(inr);
rec = lidMapper.selectByPrimaryKey(rec);
if (rec == null) {
throw new CommonServiceException("主键" + inr + "找不到LID数据");
}
String objtyp = "LID";
Lidgrp lidgrp = new Lidgrp();
lidgrp.reset();
lidgrp.setRec(rec);
Lit blk = new Lit();
blk.setInr(inr);
blk = litMapper.selectByPrimaryKey(blk);
lidgrp.setBlk(blk);
//获取cbs金额信息
Date date = Dates.add(Utils.getMaxDate(), -1);
cbsmodService.cbsGetBalance(lidgrp.getCbs().getMax(), objtyp, inr, "MAXSUM", "AMT1", date);
cbsmodService.cbsGetBalance(lidgrp.getCbs().getNom1(), objtyp, inr, "NOMSUM", "AMT1", date);
cbsmodService.cbsGetBalance(lidgrp.getCbs().getOpn1(), objtyp, inr, "OPN", "AMT1", date);
//getAamCbsPerDate MAX2/OPN2
cbsmodService.cbsGetBalance(lidgrp.getCbs().getMax2(), objtyp, inr, "MAXSUM", "AMT2", date);
cbsmodService.cbsGetBalance(lidgrp.getCbs().getOpn2(), objtyp, inr, "OPN", "AMT2", date);
//获取ptspta信息
storePtsToGrp(lidgrp, inr, objtyp);
return lidgrp;
}
public Gidgrp getGidgrpByInr(String inr) {
Gid rec = new Gid();
rec.setInr(inr);
rec = gidMapper.selectByPrimaryKey(rec);
if (rec == null) {
throw new CommonServiceException("主键" + inr + "找不到GID数据");
}
String objtyp = "GID";
Gidgrp gidgrp = new Gidgrp();
gidgrp.reset();
gidgrp.setRec(rec);
Git blk = new Git();
blk.setInr(inr);
blk = gitMapper.selectByPrimaryKey(blk);
gidgrp.setBlk(blk);
//获取cbs金额信息
Date date = Dates.add(Utils.getMaxDate(), -1);
cbsmodService.cbsGetBalance(gidgrp.getCbs().getMax(), objtyp, inr, "MAXSUM", "AMT1", date);
cbsmodService.cbsGetBalance(gidgrp.getCbs().getOpn1(), objtyp, inr, "OPN", "AMT1", date);
cbsmodService.cbsGetBalance(gidgrp.getCbs().getCnf(), objtyp, inr, "CNFSUM", "AMT1", date);
//getAamCbsPerDate MAX2/OPN2
cbsmodService.cbsGetBalance(gidgrp.getCbs().getMax2(), objtyp, inr, "MAXSUM", "AMT2", date);
cbsmodService.cbsGetBalance(gidgrp.getCbs().getOpn2(), objtyp, inr, "OPN", "AMT2", date);
//获取ptspta信息
storePtsToGrp(gidgrp, inr, objtyp);
return gidgrp;
}
}
package com.brilliance.isc.funds.common.component;
import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.vo.model.CbbVo;
import com.brilliance.isc.bo.Cnd;
import com.brilliance.isc.bo.Ftd;
import com.brilliance.isc.bo.Ftt;
import com.brilliance.isc.vo.model.FtdVo;
import com.brilliance.isc.vo.model.FttVo;
import com.brilliance.isc.bo.model.*;
import com.brilliance.isc.vo.model.*;
import com.brilliance.isc.common.cbsmod.service.CbsmodService;
import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.exception.CommonServiceException;
......
package com.brilliance.isc.funds.common.controller;
import com.brilliance.isc.common.api.diary.controller.AbstractDiaryController;
import com.brilliance.isc.common.api.diary.vo.DiaryRequestVo;
import com.brilliance.isc.common.api.diary.vo.DiaryResponseVo;
import com.brilliance.isc.common.trndia.vo.DiaVo;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.funds.CrdBizAmdInfoVo;
import com.brilliance.isc.vo.funds.CrdBizInfoVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Diary组件
*/
@RestController
@RequestMapping("/crd")
public class CrdDiaryController extends AbstractDiaryController<CrdBizInfoVo, CrdBizAmdInfoVo> {
/**
* 试算备忘录入口
*
* @param diaryRequestVo
* @return
*/
@RequestMapping("/trndia/calcDiaries")
@Override
public ResponseSet<DiaryResponseVo> calcDiaries(@RequestBody DiaryRequestVo<CrdBizInfoVo, CrdBizAmdInfoVo> diaryRequestVo) {
return super.calcDiaries(diaryRequestVo);
}
/**
* 计算备忘录状态入口
*
* @param diaVo
* @return
*/
@RequestMapping("/trndia/calculateDiamodflg")
@Override
public ResponseSet<String> calculateDiamodflg(@RequestBody DiaVo diaVo) {
return super.calculateDiamodflg(diaVo);
}
}
package com.brilliance.isc.funds.common.controller;
import com.brilliance.isc.common.api.fee.controller.AbstractFeeDetailController;
import com.brilliance.isc.common.api.fee.vo.FeeDetailRequestVo;
import com.brilliance.isc.common.api.fee.vo.FeeDetailResponseVo;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.funds.CrdBizAmdInfoVo;
import com.brilliance.isc.vo.funds.CrdBizInfoVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 费用组件
*/
@RestController
@RequestMapping("/crd")
public class CrdFeeDetailController extends AbstractFeeDetailController<CrdBizInfoVo, CrdBizAmdInfoVo> {
/**
* 试算费用入口
*
* @param feeDetailRequestVo
* @return
*/
@RequestMapping("/setmod/calcFeeDetail")
@Override
public ResponseSet<FeeDetailResponseVo> calcFeeDetail(@RequestBody FeeDetailRequestVo<CrdBizInfoVo, CrdBizAmdInfoVo> feeDetailRequestVo) {
return super.calcFeeDetail(feeDetailRequestVo);
}
}
package com.brilliance.isc.funds.common.controller;
import com.brilliance.isc.common.api.gle.controller.AbstractGleController;
import com.brilliance.isc.common.api.gle.vo.GlentryRequest;
import com.brilliance.isc.common.api.gle.vo.GlentryResponse;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.funds.CrdBizInfoVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 会计分录组件
*/
@RestController
@RequestMapping("/crd")
public class CrdGleController extends AbstractGleController<CrdBizInfoVo> {
/**
* 会计分录试算入口
*
* @param glentryRequest
* @return ResponseSet<GlentryResponse>
*/
@RequestMapping("/gle/assertGle")
@Override
public ResponseSet<GlentryResponse> generateGlentry(@RequestBody GlentryRequest<CrdBizInfoVo> glentryRequest) {
return super.generateGlentry(glentryRequest);
}
}
package com.brilliance.isc.funds.common.controller;
import com.brilliance.isc.common.api.liaall.controller.AbstractLiaallController;
import com.brilliance.isc.common.api.liaall.vo.LiaallRequest;
import com.brilliance.isc.common.api.liaall.vo.LiaallResponse;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.funds.CrdBizAmdInfoVo;
import com.brilliance.isc.vo.funds.CrdBizInfoVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 表外记账组件
*/
@RestController
@RequestMapping("/crd")
public class CrdLiaallController extends AbstractLiaallController<CrdBizInfoVo, CrdBizAmdInfoVo> {
/**
* 表外记账试算服务
*
* @param liaallRequest
* @return
*/
@RequestMapping("/liaall/assertLiaall")
@Override
public ResponseSet<LiaallResponse> calcLiaall(@RequestBody LiaallRequest<CrdBizInfoVo, CrdBizAmdInfoVo> liaallRequest) {
return super.calcLiaall(liaallRequest);
}
}
package com.brilliance.isc.funds.common.controller;
import com.brilliance.isc.common.api.lim.controller.AbstractLimController;
import com.brilliance.isc.common.api.lim.vo.LimRequest;
import com.brilliance.isc.common.api.lim.vo.LimResponse;
import com.brilliance.isc.common.api.lim.vo.YapinRequest;
import com.brilliance.isc.common.api.lim.vo.YapinResponse;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.funds.CrdBizAmdInfoVo;
import com.brilliance.isc.vo.funds.CrdBizInfoVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 额度组件
*/
@RestController
@RequestMapping("/crd")
public class CrdLimController extends AbstractLimController<CrdBizInfoVo, CrdBizAmdInfoVo> {
/**
* 额度初始化
*
* @param limRequest
* @return
*/
@RequestMapping("/lim/limInit")
@Override
public ResponseSet<LimResponse> limInit(@RequestBody LimRequest<CrdBizInfoVo, CrdBizAmdInfoVo> limRequest) {
return super.limInit(limRequest);
}
/**
* 额度查询入口
*
* @param limRequest
* @return
*/
@RequestMapping("/lim/limQuery")
@Override
public ResponseSet<LimResponse> limQuery(@RequestBody LimRequest<CrdBizInfoVo, CrdBizAmdInfoVo> limRequest) {
return super.limQuery(limRequest);
}
/**
* 额度试算入口
*
* @param limRequest
* @return
*/
@RequestMapping("/lim/limPreCal")
@Override
public ResponseSet<LimResponse> limPreCal(@RequestBody LimRequest<CrdBizInfoVo, CrdBizAmdInfoVo> limRequest) {
return super.limPreCal(limRequest);
}
/**
* 转授权查询
*
* @param limRequest
* @return
*/
@RequestMapping("/lim/limZsqQuery")
@Override
public ResponseSet<LimResponse> limZsqQuery(@RequestBody LimRequest<CrdBizInfoVo, CrdBizAmdInfoVo> limRequest) {
return super.limZsqQuery(limRequest);
}
@RequestMapping("/lim/yapinQuery")
public ResponseSet<YapinResponse> yapinQuery(@RequestBody YapinRequest<CrdBizInfoVo, CrdBizAmdInfoVo> yapinRequest) {
return super.yapinQuery(yapinRequest);
}
}
package com.brilliance.isc.funds.common.controller;
import com.brilliance.isc.common.api.settle.controller.AbstractSettleDetailController;
import com.brilliance.isc.common.api.settle.vo.AccountRequestVo;
import com.brilliance.isc.common.api.settle.vo.AccountResponseVo;
import com.brilliance.isc.common.api.settle.vo.SettleDetailRequestVo;
import com.brilliance.isc.common.api.settle.vo.SettleDetailResponseVo;
import com.brilliance.isc.common.setgll.vo.SetgllVo;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.funds.CrdBizAmdInfoVo;
import com.brilliance.isc.vo.funds.CrdBizInfoVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 账务组件
*/
@RestController
@RequestMapping("/crd")
public class CrdSettleDetailController extends AbstractSettleDetailController<CrdBizInfoVo, CrdBizAmdInfoVo> {
/**
* 试算账务入口
*
* @param settleDetailRequestVo
* @return
*/
@RequestMapping("/setmod/calcSettleDetail")
@Override
public ResponseSet<SettleDetailResponseVo> calcSettleDetail(@RequestBody SettleDetailRequestVo<CrdBizInfoVo, CrdBizAmdInfoVo> settleDetailRequestVo) {
return super.calcSettleDetail(settleDetailRequestVo);
}
/**
* 获取核心账户信息
*
* @param accountRequestVo
* @return
*/
@RequestMapping("/getCoreAcctInfo")
@Override
public ResponseSet<AccountResponseVo> getCoreAccountCode(@RequestBody AccountRequestVo accountRequestVo) {
return super.getCoreAccountCode(accountRequestVo);
}
/**
* 获取账户信息
*
* @param setgllVo
* @return
*/
@RequestMapping("/getAcctInfo")
@Override
public ResponseSet<SetgllVo> getAcctInfo(@RequestBody SetgllVo setgllVo) {
return super.getAcctInfo(setgllVo);
}
}
package com.brilliance.isc.funds.common.controller;
import com.brilliance.isc.common.api.trndoc.controller.AbstractTrndocController;
import com.brilliance.isc.common.api.trndoc.vo.TrndocRequest;
import com.brilliance.isc.common.api.trndoc.vo.TrndocResponse;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.funds.CrdBizAmdInfoVo;
import com.brilliance.isc.vo.funds.CrdBizInfoVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
import java.util.Map;
/**
* 报文面函组件
*/
@RestController
@RequestMapping("/crd")
public class CrdTrndocController extends AbstractTrndocController<CrdBizInfoVo, CrdBizAmdInfoVo> {
/**
* 面函报文试算入口
*
* @param trndoc
* @return
*/
@RequestMapping("/docpan/assertTrndoc")
@Override
public ResponseSet<TrndocResponse> assertTrndoc(@RequestBody TrndocRequest<CrdBizInfoVo, CrdBizAmdInfoVo> trndoc) {
return super.assertTrndoc(trndoc);
}
/**
* 面函报文预览功能
*
* @param paramMap
* @return
* @throws IOException
*/
@RequestMapping("/docpan/showDOCS")
@Override
public ResponseSet<TrndocResponse> showDOCS(@RequestBody Map<String, Object> paramMap) throws IOException {
return super.showDOCS(paramMap);
}
}
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.transaction.help.TransactionHelpService;
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("CRD.cciRegister")
public class CrdCliBanInfo implements CliBanInfo {
@Resource
private TransactionHelpService transactionHelpService;
@Resource
private PtsMapper ptsMapper;
/**
* source:crdlod.0004.script
*/
@Override
public void buildValue(String objinr, String objtyp, List<PtsptaVo> ptsptaVos, Cci cci) {
//getCrdCliBanInfo
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.setCcibanrol("SND");
Optional<Pts> optionalPts2 = ptsList.stream().filter(pts -> cci.getCcibanrol().equalsIgnoreCase(pts.getRol())).findFirst();
if (optionalPts2.isPresent()) {
cci.setCcibanptainr(optionalPts2.get().getPtainr());
}
}
}
package com.brilliance.isc.funds.common.register.cci;
import com.brilliance.isc.bo.Cci;
import com.brilliance.isc.bo.Ftd;
import com.brilliance.isc.bo.Pts;
import com.brilliance.isc.common.register.cci.CliBanInfo;
import com.brilliance.isc.common.transaction.help.TransactionHelpService;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.mda.dao.FtdMapper;
import com.brilliance.isc.mda.dao.PtsMapper;
import com.brilliance.mda.runtime.mda.impl.Argument;
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;
import static com.brilliance.mda.runtime.mda.Constants.NO_ERROR;
@Component("FTD.cciRegister")
public class FtdCliBanInfo implements CliBanInfo{
public class FtdCliBanInfo implements CliBanInfo {
@Resource
private TransactionHelpService transactionHelpService;
@Resource
private PtsMapper ptsMapper;
@Resource
private FtdMapper ftdMapper;
/**
* source:ftdlod.0006.script
*/
@Override
public void buildValue(String objinr, String objtyp, List<PtsptaVo> ptsptaVos, Cci cci) {
//getFxdCliBanInfo
//getFtdCliBanInfo
List<Pts> ptsList = ptsMapper.getPtsByObjInrTyp(objinr, objtyp);
if (CollectionUtils.isEmpty(ptsList)) {
ptsList = new ArrayList<>();
......@@ -37,7 +50,30 @@ public class FtdCliBanInfo implements CliBanInfo{
//! 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");
Ftd ftd=ftdMapper.selectByInr(objinr);
switch(ftd.getFttyp() )
{
case "LI":
case "DI":
cci.setCcicusrol("TRO");
break;
case "LO":
case "DO":
cci.setCcicusrol("TRi");
break;
case "PT":
cci.setCcicusrol("TRO");
break;
default:
}
Optional<Pts> optionalPts = ptsList.stream().filter(pts -> cci.getCcicusrol().equalsIgnoreCase(pts.getRol())).findFirst();
if (optionalPts.isPresent()) {
cci.setCcicusptainr(optionalPts.get().getPtainr());
......@@ -46,4 +82,5 @@ public class FtdCliBanInfo implements CliBanInfo{
cci.setCcibanrol("");
}
}
......@@ -10,15 +10,16 @@ import com.brilliance.isc.common.setmod.service.SetmodService;
import com.brilliance.isc.common.setmod.vo.SetmodVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.crtcri.service.CrtcriTransactionServiceImpl;
import com.brilliance.isc.mda.dao.ActMapper;
import com.brilliance.isc.vo.funds.CrdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
......@@ -46,7 +47,11 @@ public class CrtcriSettleRegister implements ISettleRegister {
@Resource(name = "crtcri.transaction")
CrtcriTransactionServiceImpl fxtsssTransactionService;
CrtcriTransactionServiceImpl crtcriTransactionService;
@Autowired
private ActMapper actMapper;
@Override
public void registerSettlement(SetmodVo setmodVo) {
......@@ -71,14 +76,12 @@ public class CrtcriSettleRegister implements ISettleRegister {
String rol = NULLSTR;
List<PtsptaVo> ptsList = setmodVo.getPtsList();
if (CollectionUtils.isNotEmpty(ptsList)) {
// if (this.getCrdgrp().getAcc().isRolSet()) {
if (ptsptaToolComponent.ptsIsRolSet(ptsList, "ACC")) {
rol = "ACC";
} else {
rol = "SND";
}
}
String dbtKey = setmodService.setGlgAmt(setmodVo, "TRN", rol, setmodVo.getDoccur(), maxAmt, "");
if (!MdaUtils.isEmpty(rec.getForare())) {
......@@ -86,18 +89,22 @@ public class CrtcriSettleRegister implements ISettleRegister {
} else {
// this.getTrnmod().getTrnism().setDefDsp(rol, "D", "NOD" + CR + "VOD");
}
Act rcvact = new Act();
String act = rec.getRcvactExtkey();
Act rcvact = null;
if (MdaUtils.isEmpty(rec.getRcvactInr()) && !MdaUtils.isEmpty(rec.getRcvbchinr())) {
if (MdaUtils.compareTo(rec.getCustyp(), "1") == 0) {
// 对私
rcvact = fxtsssTransactionService.readClearingAct("SP-RIP", rec.getRcvbchinr(), maxCur);
rcvact = crtcriTransactionService.readClearingAct("SP-RIP", rec.getRcvbchinr(), maxCur);
} else {
// 对公
rcvact = fxtsssTransactionService.readClearingAct("SP-RIC", rec.getRcvbchinr(), maxCur);
rcvact = crtcriTransactionService.readClearingAct("SP-RIC", rec.getRcvbchinr(), maxCur);
}
}
if (Objects.nonNull(rcvact)) {
act = rcvact.getExtkey();
}
String cdtKey = setglgService.setglgAddAmount(setglg, "TRN", "OWN", setmodVo.getDoccur(), maxAmt.negate(),
"", "SPC", "A", rcvact.getExtkey(), "");
"", "SPC", "A", act, "");
setmodVo.setFeeclirol(rol);
setmodService.setglgAllValDat(setmodVo, rec.getOpndat(), "D");
}
......
......@@ -2,11 +2,13 @@ package com.brilliance.isc.funds.crtcri.resource;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.bo.funds.CrtcriStoreBo;
import com.brilliance.isc.funds.crtcri.service.CrtcriTransactionServiceImpl;
import com.brilliance.isc.funds.transfer.transaction.CrtcriStructMapper;
import com.brilliance.isc.funds.vo.funds.CrtcriStoreVo;
import com.brilliance.isc.transfer.IStructMapper;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.mda.runtime.mda.CodetableItem;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @program: isc-funds
......@@ -49,10 +52,21 @@ public class CrtcriResource extends AbstractTransactionController<CrtcriStoreVo>
*/
@PostMapping("/getRef")
public ResponseSet<String> getRef(@RequestBody CrtcriStoreVo crtcriStoreVo) {
String ref = crtcriTransactionService.getRef(crtcriStoreVo);
CrtcriStoreBo crtcriStoreBo = crtcriStructMapper.voTransferToBo(crtcriStoreVo);
String ref = crtcriTransactionService.getRef(crtcriStoreBo);
return ResponseSet.simpleSuccess(ref);
}
/**
* 获取业务经办机构
*
* @return
*/
@PostMapping("/getBranchCodeValue")
public Object getBranchCodeValue() {
List<CodetableItem> list = crtcriTransactionService.getBranchCodeValue();
return ResponseSet.simpleSuccess(list);
}
}
package com.brilliance.isc.funds.crtcri.service;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import java.util.List;
import java.util.Map;
/**
* @program: isc-funds
* @ClassName: CrtpService
* @description: crtp清算 公共方法
* @author: huangshunlin
* @create: 2024-10-22 11:24
*/
public interface CrtpService {
void defaultCrdgrpRecOwnusrN1000(BaseTransactionVo bo);
void defaultClearingN1000(BaseTransactionVo bo);
List<Map<String, Object>> setBranchCodeValue();
}
package com.brilliance.isc.funds.crtcri.service.impl;
import com.brilliance.isc.bo.model.Crdgrp;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.common.util.Utils;
import com.brilliance.isc.funds.crtcri.service.CrtpService;
import com.brilliance.isc.mda.dao.PublicMapper;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.google.common.collect.ImmutableBiMap;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* @program: isc-funds
* @ClassName: CrtpServiceImpl
* @description: crtp 清算 公共方法
* @author: huangshunlin
* @create: 2024-10-22 11:25
*/
@Service
public class CrtpServiceImpl implements CrtpService {
@Resource
private SysmodService sysmodService;
@Resource
private PublicMapper publicMapper;
/**
* source:crtp.0002.script
*/
// @Default(target="crdgrp.rec.ownusr",order=1000)
public void defaultCrdgrpRecOwnusrN1000(BaseTransactionVo bo) {
Crdgrp crdgrp = Utils.getFieldValue(bo, "crdgrp");
if (Objects.isNull(crdgrp)) {
return;
}
//! Set OWNUSR if not already set
if (MdaUtils.isEmpty(crdgrp.getRec().getOwnusr())) {
crdgrp.getRec().setOwnusr(SettleContext.getUserSession().getUsr().getExtkey());
}
}
/**
* source:crtp.0007.script
*/
// @Default(value={"crdgrp.rec.clrtyp","crdgrp.rec.trntyp"},order=1000)
public void defaultClearingN1000(BaseTransactionVo bo) {
Crdgrp crdgrp = Utils.getFieldValue(bo, "crdgrp");
if (Objects.isNull(crdgrp)) {
return;
}
// 给汇入清算/汇出清算赋值的清算类型赋值
if (MdaUtils.isEmpty(crdgrp.getRec().getClrtyp())) {
if (sysmodService.sptIsRimLoaded(bo.getSpt().getSta())) {
// 从Register队列进的全部是汇出清算
crdgrp.getRec().setClrtyp("O");
// 自动清算
crdgrp.getRec().setTrntyp("A");
} else {
if (sysmodService.sptIsIncLoaded(bo.getSpt().getSta())) {
// 从Incoming队列进的全部是汇入清算
crdgrp.getRec().setClrtyp("I");
// 自动清算
crdgrp.getRec().setTrntyp("A");
} else {
// 其他情况,根据交易名称判断
if (MdaUtils.compareTo(SettleContext.getTransName(), "CRTCRO") == 0) {
crdgrp.getRec().setClrtyp("O");
} else {
crdgrp.getRec().setClrtyp("I");
}
// 手工清算
crdgrp.getRec().setTrntyp("M");
}
}
}
}
/**
* source:crtp.0006.script
*/
public List<Map<String, Object>> setBranchCodeValue() {
//########################
//!初始化实体机构
//########################
String ety = SettleContext.getUserEty().getExtkey();
String sql = "SELECT INR as val , BRANCH||BCHNAME as txt FROM BCH WHERE bchtyp = '1' AND ETYEXTKEY='" + ety + "'";
// String sql = "SELECT INR as val , BRANCH||BCHNAME as txt FROM BCH WHERE wrkflg = 'X' AND ETYEXTKEY='" + ety + "'";
List<Map<String, Object>> list = publicMapper.dyncQueryMapList(ImmutableBiMap.of("sql", sql));
return list;
}
}
package com.brilliance.isc.funds.crtcro.register.settle;
import com.brilliance.isc.bo.Act;
import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.register.settle.DefaultSettleRegister;
import com.brilliance.isc.common.register.settle.ISettleRegister;
......@@ -11,13 +10,12 @@ import com.brilliance.isc.common.setmod.vo.SetmodVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.crtcro.service.CrtcroTransactionServiceImpl;
import com.brilliance.isc.vo.funds.CrdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
......@@ -55,9 +53,43 @@ public class CrtcroSettleRegister implements ISettleRegister {
}
/**
* source:crtcro.0009.script
* source:crtcro.0002.script
*/
private void transRegister(SetmodVo setmodVo) {
CrdBizInfoVo rec = (CrdBizInfoVo) setmodVo.getRec();
BigDecimal maxAmt = BigDecimal.ZERO;
if (setmodVo.getCbsMap().get("MAX") != null) {
maxAmt = setmodVo.getCbsMap().get("MAX").getAmt();
}
setmodVo.setDocamt(maxAmt);
SetglgVo setglg = setmodVo.getSetglg();
setglgService.setglgClrAmount(setglg, "TRN");
String dbtKey = setglgService.setglgAddAmount(setglg, "TRN", "OWN", setmodVo.getDoccur(), maxAmt, "", "SPD",
"A", rec.getSpcgleAct(), "");
String rol = NULLSTR;
List<PtsptaVo> ptsList = setmodVo.getPtsList();
// if (this.getCrdgrp().getAcc().isRolSet()) {
if (ptsptaToolComponent.ptsIsRolSet(ptsList, "ACC")) {
rol = "ACC";
} else {
rol = "RCV";
}
String cdtKey = setmodService.setGlgAmt(setmodVo, "TRN", rol, setmodVo.getDoccur(), maxAmt.negate(), "");
// TODO this.getTrnmod().getTrnism().setDefDsp(rol, "C", "PAC" + CR + "VOC");
Date valDat = rec.getOpndat();
switch (rec.getRcvobjtyp()) {
case "CPD":
valDat = rec.getValdat();
break;
case "GID":
break;
case "BCD":
break;
case "BRD":
break;
}
setglgService.setglgAddAmtFldValDat(setglg, "TRN", cdtKey, valDat);
}
}
......@@ -2,6 +2,7 @@ package com.brilliance.isc.funds.crtcro.resource;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.bo.funds.CrtcroStoreBo;
import com.brilliance.isc.funds.crtcro.service.CrtcroTransactionServiceImpl;
import com.brilliance.isc.funds.transfer.transaction.CrtcroStructMapper;
import com.brilliance.isc.funds.vo.funds.CrtcroStoreVo;
......@@ -49,7 +50,8 @@ public class CrtcroResource extends AbstractTransactionController<CrtcroStoreVo>
*/
@PostMapping("/getRef")
public ResponseSet<String> getRef(@RequestBody CrtcroStoreVo crtcroStoreVo) {
String ref = crtcroTransactionService.getRef(crtcroStoreVo);
CrtcroStoreBo bo = crtcroStructMapper.voTransferToBo(crtcroStoreVo);
String ref = crtcroTransactionService.getRef(bo);
return ResponseSet.simpleSuccess(ref);
}
......
package com.brilliance.isc.funds.fttfcm.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.FttfcmStoreBo;
import com.brilliance.isc.funds.bo.funds.FxtfcmStoreBo;
import com.brilliance.mda.runtime.mda.util.Dates;
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.*;
/**
* @program: isc-funds
* @ClassName: FttfcmValidator
* @description: 结售汇平盘确认 Fttfcm 校验
* @author: 肖桐
* @create: 2024-10-11 11:28
*/
@Component
public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
@Override
@PostConstruct
public void register(){
super.register();;
}
@Override
public Map<String, String> validate(FttfcmStoreBo vo) {
Map<String, String> maps = new HashMap<>();
maps.putAll(super.validate(vo));
return maps;
}
/**
* source:fttfcm.0018.script
*/
@Validate(path="fttp.mt32m.s30x")
public ValidResult checkFttpMt32mS30xN1000(FttfcmStoreBo bo){
if( ( MdaUtils.compareTo(bo.getFttp().getMt32m().getS22b(),"CONF") == 0 || MdaUtils.compareTo(bo.getFttp().getMt32m().getS22b(),"ROLL") == 0 ) && MdaUtils.isEmpty(bo.getFttp().getMt32m().getS30x()) )
{
return errorMandatory();
}
return null;
}
/**
* source:fttfcm.0022.script
*/
@Validate(path="ftdgrp.cbs.ins.amt")
public ValidResult checkFtdgrpCbsInsAmtN1000(FttfcmStoreBo bo){
if( MdaUtils.compareTo(bo.getFttp().getPansta(),PanStaAdd) == 0 || MdaUtils.compareTo(bo.getFttp().getPansta(),PanStaEdit) == 0 )
{
if( MdaUtils.isEmpty(bo.getFtdgrp().getCbs().getIns().getAmt()) )
{
return errorMandatory();
}
}
return null;
}
/**
* source:fttfcm.0023.script
*/
@Validate(path="ftdgrp.rec.cntfra")
public ValidResult checkFtdgrpRecCntfraN1000(FttfcmStoreBo bo){
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getCntfra()) )
{
return errorMandatory();
}
return null;
}
/**
* source:fttfcm.0024.script
*/
@Validate(path="ftdgrp.rec.matdat")
public ValidResult checkFtdgrpRecMatdatN1000(FttfcmStoreBo bo){
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getMatdat()) )
{
return errorMandatory();
}
else
{
if( ! MdaUtils.isEmpty(bo.getFtdgrp().getRec().getValdat()) && Dates.diff(bo.getFtdgrp().getRec().getValdat(),bo.getFtdgrp().getRec().getMatdat())>0 )
{
return ValidResult.build(false, MdaUtils.getI18NString("fttfcm","CT000008"));
}
}
return null;
}
/**
* source:fttfcm.0025.script
*/
@Validate(path="ftdgrp.rec.rat")
public ValidResult checkFtdgrpRecRatN1000(FttfcmStoreBo bo){
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getRat()) )
{
return errorMandatory();
}
return null;
}
/**
* source:fttfcm.0038.script
*/
@Validate(path="ftdgrp.rec.bnktyp")
public ValidResult checkFtdgrpRecBnktypN1000(FttfcmStoreBo bo){
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getBnktyp()) )
{
return errorMandatory();
}
return null;
}
}
package com.brilliance.isc.funds.fttfcm.document;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.trndoc.vo.DoceotVo;
import com.brilliance.isc.funds.bo.funds.FttfcmStoreBo;
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.Service;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@Service("fttfcm.BuildFtt320l1")
public class BuildFtt320l1 {
public Map<String, Object> build(FttfcmStoreBo 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(FttfcmStoreBo trnBo, DoceotVo doceotVo) {
HashMap<String, Object> map = new HashMap<>();
String title = "";
title = " Formatted outgoing message / mt320 Viewer";
map.put("title", title);
return map;
}
private Map<String, Object> printFooter(FttfcmStoreBo 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.fttfcm.document;
import com.brilliance.isc.common.trndoc.vo.DoceotVo;
import com.brilliance.isc.doc.handle.impl.AbstractTransactionDocSet;
import com.brilliance.isc.funds.bo.funds.FttfcmStoreBo;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@Component("fttfcm.docset")
public class FttfcmDocset extends AbstractTransactionDocSet<FttfcmStoreBo> {
@Resource
private BuildFtt320l1 buildFtt320l1;
@PostConstruct
public void buildMember() {
buildLetterProvider("fttfcm","FTT3201","FTT1991","FTT2991");
//扫描Cortype支持,必须要执行
scanDocCortypSupport();
}
public Map<String,Object> buildExtraMapForLetter(FttfcmStoreBo trnbo, DoceotVo doceotVo){
if (MdaUtils.compareTo(doceotVo.getDocnam(),"FTT3201")==0){
return buildFtt320l1.build(trnbo,doceotVo);
} else {
return new HashMap<>();
}
}
}
package com.brilliance.isc.funds.fttfcm.register.dissav;
import com.brilliance.isc.bo.model.Ftdgrp;
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 com.brilliance.isc.vo.funds.FtdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.Dates;
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.Component;
import java.util.Date;
import static com.brilliance.mda.runtime.mda.Constants.*;
/**
* @program: isc-funds
* @ClassName: FttfcmDiasavRegister
* @description: 结售汇平盘确认 Fttfcm 备忘录注册
* @author: Lenovo
* @create: 2024-10-11 17:30
*/
@Component("fttfcm.diasavRegister")
public class FttfcmDiasavRegister 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) {
FtdBizInfoVo ftdBizInfoVo=(FtdBizInfoVo)trndiaVo.getRec();
//取得上下文
Date date = null;
if (!MdaUtils.isEmpty(ftdBizInfoVo.getMatdat())) {
date = NULLDATE;
if (Dates.diff(ftdBizInfoVo.getMatdat(), Dates.today()) < 3) {
date = Dates.today();
} else {
date = Dates.add(ftdBizInfoVo.getMatdat(), -3);
}
trndiaService.trnDiaSet(trndiaVo, "FTDMAT", date, "EXP", Strings.getText("资金拆借到期提示:", ftdBizInfoVo.getOwnref()), "FTTFMT", DiaToReplace);
}
}
}
\ No newline at end of file
package com.brilliance.isc.funds.fttfcm.register.doc;
import com.brilliance.isc.bo.model.Ftdgrp;
import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.register.document.IDocumentRegister;
import com.brilliance.isc.common.register.document.common.SetmodDocumentRegister;
import com.brilliance.isc.common.trndoc.service.TrndocService;
import com.brilliance.isc.common.trndoc.vo.TrndocVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.common.component.FtToolComponent;
import com.brilliance.isc.funds.fttfcm.service.FttfcmTransactionServiceImpl;
import com.brilliance.isc.vo.funds.FtdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.brilliance.mda.runtime.mda.util.Systems;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import static com.brilliance.mda.runtime.mda.Constants.NO_ERROR;
/**
* @program: isc-funds
* @ClassName: FttfcmDocumentRegister
* @description: 结售汇平盘确认 Fttfcm 报文注册
* @author: Lenovo
* @create: 2024-10-11 17:47
*/
@Component("fttfcm.documentRegister")
public class FttfcmDocumentRegister implements IDocumentRegister {
@Autowired
TrndocService trndocService;
@Resource
PtsptaToolComponent ptsptaToolComponent;
@Autowired
private SetmodDocumentRegister setmodDocumentRegister;
@Resource
FtToolComponent ftToolComponent;
@Override
public void registerDocument(TrndocVo trndoc) {
doRegister(trndoc);
setmodDocumentRegister.registerDocument(trndoc);
//entmodDocumentRegister.registerDocument(trndoc);
}
public void doRegister(TrndocVo trndoc){
FtdBizInfoVo rec = (FtdBizInfoVo) trndoc.getRec();
PtsptaVo troPtspta = ptsptaToolComponent.getPtsFromListByRol(trndoc.getPtsptas(), "TRO");
PtsptaVo triPtspta = ptsptaToolComponent.getPtsFromListByRol(trndoc.getPtsptas(), "TRI");
if( 1==1 )
{
if( ptsptaToolComponent.ptsIsRolSet(troPtspta ))
{
switch( rec.getMsgtyp() )
{
case "320":
trndocService.defDocEot (trndoc, "TRN", "320", "\\FTT320L1", "LET", 0, troPtspta.getPts().getPtainr(), "\\FTDGRP\\REC","MT 320", "TRO", "" );
trndocService.setDocSendFormat(trndoc, "TRN320", "SWT", "MT320");
break;
case "199":
trndocService.defDocEot ( trndoc, "TRN", "199", "\\FTT199L1", "LET", 0, troPtspta.getPts().getPtainr(), "\\FTDGRP\\REC", "MT 199", "TRO", "" );
trndocService.setDocSendFormat(trndoc, "TRN199", "SWT", "MT199");
break;
case "299":
trndocService.defDocEot (trndoc, "TRN", "299", "\\FTT299L1", "LET", 0, troPtspta.getPts().getPtainr(), "\\FTDGRP\\REC", "MT 299", "TRO", "" );
trndocService.setDocSendFormat(trndoc, "TRN299", "SWT", "MT299");
break;
}
}
if( ptsptaToolComponent.ptsIsRolSet(triPtspta) )
{
switch( rec.getMsgtyp() )
{
case "320":
trndocService.defDocEot (trndoc, "TRN", "320", "\\FTT320L1", "LET", 0, triPtspta.getPts().getPtainr(), "\\FTDGRP\\REC","MT 320", "TRI", "" );
trndocService.setDocSendFormat(trndoc, "TRN320", "SWT", "MT320");
break;
case "199":
trndocService.defDocEot (trndoc, "TRN", "199", "\\FTT199L1", "LET", 0, triPtspta.getPts().getPtainr(), "\\FTDGRP\\REC", "MT 199", "TRI", "" );
trndocService.setDocSendFormat(trndoc, "TRN199", "SWT", "MT199");
break;
case "299":
trndocService.defDocEot (trndoc, "TRN", "299", "\\FTT299L1", "LET", 0, triPtspta.getPts().getPtainr(), "\\FTDGRP\\REC", "MT 299", "TRI", "" );
trndocService.setDocSendFormat(trndoc, "TRN299", "SWT", "MT299");
break;
}
}
}
}
}
package com.brilliance.isc.funds.fttfcm.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: FttfcmFeeRegister
* @description: 结售汇平盘确认 Fttfcm 费用注册
* @author: Lenovo
* @create: 2024-10-11 17:36
*/
@Component("fttfcm.feeRegister")
public class FttfcmFeeRegister 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.fttfcm.register.liaall;
import com.brilliance.isc.common.liaall.vo.LiaallVo;
import com.brilliance.isc.common.register.fee.AbstractFeeRegister;
import com.brilliance.isc.common.register.liaall.ILiaallRegister;
import com.brilliance.isc.common.register.liaall.common.LiaallRegister;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @program: isc-funds
* @ClassName: FttfcmLiaallRegister
* @description: 结售汇平盘确认 Fttfcm 表外注册
* @author: Lenovo
* @create: 2024-10-11 17:41
*/
@Component("fttfcm.liaallSetTransaction")
public class FttfcmLiaallRegister implements ILiaallRegister {
@Autowired
private LiaallRegister liaallRegister;
@Override
public void liaallSetTransaction(LiaallVo liaallVo) {
liaallRegister.liaallSetTransaction(liaallVo);
}
}
package com.brilliance.isc.funds.fttfcm.register.settle;
import com.brilliance.isc.bo.model.Ftdgrp;
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.common.vo.PtsptaVo;
import com.brilliance.isc.funds.common.component.FtToolComponent;
import com.brilliance.isc.vo.funds.FtdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.mda.runtime.mda.util.Formats;
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.*;
import static com.brilliance.mda.runtime.mda.Constants.CR;
@Component("fttfcm.settleRegister")
public class FttfcmSettleRegister implements ISettleRegister {
@Autowired
private SetmodService setmodService;
@Autowired
private SetglgService setglgService;
@Autowired
private DefaultSettleRegister defaultSettleRegister;
@Autowired
private GlemodService glemodService;
@Resource
private XrtmodService xrtmodService;
@Resource
private FtToolComponent ftToolComponent;
@Resource
private PtsptaToolComponent ptsptaToolComponent;
@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());
PtsptaVo tri = ptsptaToolComponent.getPtsFromListByRol(setmodVo.getPtsList(), "TRI");
PtsptaVo tro = ptsptaToolComponent.getPtsFromListByRol(setmodVo.getPtsList(), "TRO");
String maxCur=NULLSTR;
BigDecimal maxAmt = BigDecimal.ZERO;
String opn1Cur=NULLSTR;
BigDecimal opn1Amt = BigDecimal.ZERO;
if (setmodVo.getCbsMap().get("MAX") != null) {
maxAmt = setmodVo.getCbsMap().get("MAX").getAmt();
maxCur= setmodVo.getCbsMap().get("MAX").getCur();
}
if (setmodVo.getCbsMap().get("OPN1") != null) {
opn1Amt= setmodVo.getCbsMap().get("OPN1").getAmt();
opn1Cur= setmodVo.getCbsMap().get("OPN1").getCur();
}
setmodVo.setDoccur(maxCur);
setmodVo.setDocamt(maxAmt);
SetglgVo setglg = setmodVo.getSetglg();
setglgService.setglgClrAmount ( setmodVo.getSetglg(),"TRN" );
String acctyp = NULLSTR;
String acc = NULLSTR;
String cdtKey = NULLSTR;
String dbtKey = NULLSTR;
switch( rec.getFttyp() )
{
// 资金拆出
case "LO":
acctyp = "";
acc = "";
if( MdaUtils.compareTo(rec.getBnktyp(),"9") == 0 )
{
acctyp = "FL-FOG";
}
else
{
acctyp = "FL-DO" + rec.getBnktyp();
}
//贷记
cdtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"TRN", "TRI", setmodVo.getDoccur(), maxAmt.negate(), "", "PAC", "C", "", "" );
acc = glemodService.getAvailAcc ( acctyp,setmodVo.getDoccur(), tri.getPts().getPtyinr(), maxAmt );
dbtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"TRN", "TRI",setmodVo.getDoccur(),maxAmt, "", "FLD", "C", acc, "" );
setmodVo.setFeeclirol( "TRI" );
// 定存存出
break;
case "DO":
acctyp = "";
acc = "";
/**
if FTDGRP\\TRI.IsDemestic then
$acctyp = "DB-CLR"
else
$acctyp = "DB-FOG"
endif
**/
if( MdaUtils.compareTo(rec.getBnktyp(),"9") == 0 )
{
acctyp = "DB-FOG";
}
else
{
acctyp = "DB-CLR";
}
cdtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"TRN", "TRI",setmodVo.getDoccur(),maxAmt.negate(), "", "PAC", "C", "", "" );
acc =glemodService.getAvailAcc ( acctyp, setmodVo.getDoccur(),tri.getPts().getPtyinr(), maxAmt );
/**
$DbtKey = SETMOD\\SETGLG.SetglgAddAmount ( "TRN", "TRI", SETMOD\\DOCCUR, FTDGRP\\CBS\\MAX\\AMT, "", "DBD", "A", $acc, "" )
**/
dbtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"TRN", "TRI", setmodVo.getDoccur(),maxAmt, "", "DBD", "C", acc, "" );
setmodVo.setFeeclirol ( "TRI" );
// 资金拆入
break;
case "LI":
acctyp = "";
acc = "";
/**
if FTDGRP\\TRO.IsDemestic then
$acctyp = "FB-DOM"
else
$acctyp = "FB-FOG"
endif
**/
if( MdaUtils.compareTo(rec.getBnktyp(),"9") == 0 )
{
acctyp = "FB-FOG";
}
else
{
acctyp = "FB-DO" + rec.getBnktyp();
}
acc = glemodService.getAvailAcc ( acctyp, setmodVo.getDoccur(),tro.getPts().getPtyinr(), maxAmt.negate() );
//贷记
/**
$CdtKey = SETMOD\\SETGLG.SetglgAddAmount ( "TRN", "TRO", SETMOD\\DOCCUR, -FTDGRP\\CBS\\MAX\\AMT, "", "FBC", "A", $acc, "" )
**/
cdtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"TRN", "TRO", setmodVo.getDoccur(),maxAmt.negate(), "", "FBC", "C", acc, "" );
//借记
dbtKey =setglgService.setglgAddAmount ( setmodVo.getSetglg(),"TRN", "TRO",setmodVo.getDoccur(), maxAmt, "", "FTD", "C", "", "" );
setmodVo.setFeeclirol ( "TRO" );
// 定存吸存
break;
case "DI":
acctyp = "";
acc = "";
/**
if FTDGRP\\TRO.IsDemestic then
$acctyp = "DB-CLR"
else
$acctyp = "DB-FOG"
endif
**/
if( MdaUtils.compareTo(rec.getBnktyp(),"9") == 0 )
{
acctyp = "VO-FOG";
}
else
{
acctyp = "VO-BO" + rec.getBnktyp();
}
acc = glemodService.getAvailAcc ( acctyp, setmodVo.getDoccur(), tro.getPts().getPtyinr(), maxAmt.negate() );
/**
$CdtKey = SETMOD\\SETGLG.SetglgAddAmount ( "TRN", "TRO", SETMOD\\DOCCUR, -FTDGRP\\CBS\\MAX\\AMT, "", "VOC", "A", $acc, "" )
**/
cdtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"TRN", "TRO",setmodVo.getDoccur(), maxAmt.negate(), "", "VOC", "C", acc, "" );
dbtKey =setglgService.setglgAddAmount (setmodVo.getSetglg(), "TRN", "TRO",setmodVo.getDoccur(), maxAmt, "", "FTD", "C", "", "" );
setmodVo.setFeeclirol ( "TRO" );
break;
}
setmodService.setglgAllValDat ( setmodVo, rec.getValdat(), "D" );
}
}
package com.brilliance.isc.funds.fttfcm.register.wfe;
import com.brilliance.isc.common.trnism.service.IWfeRegister;
import com.brilliance.isc.common.trnmod.vo.TrnmodVo;
import com.brilliance.isc.common.wfmmod.service.WfmmodService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Component("fttfcm"+"."+ IWfeRegister.REGISTER_NAME)
public class FttfcmWfeRegister implements IWfeRegister {
@Override
public void wfeRegister(TrnmodVo trnmodVo){
}
}
package com.brilliance.isc.funds.fttfcm.resource;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.bo.funds.FttfcmStoreBo;
import com.brilliance.isc.funds.fttfcm.service.FttfcmTransactionServiceImpl;
import com.brilliance.isc.funds.transfer.transaction.FttfcmStructMapper;
import com.brilliance.isc.funds.vo.funds.FttfcmStoreVo;
import com.brilliance.isc.funds.vo.funds.FxtfopStoreVo;
import com.brilliance.isc.transfer.IStructMapper;
import com.brilliance.isc.vo.ResponseSet;
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: FttfcmResource
* @description: 结售汇平盘确认 Fttfcm 请求入口
* @author: xiaotong
* @create: 2024-10-11 17:09
*/
@RestController
@RequestMapping("/fttfcm")
public class FttfcmResource extends AbstractTransactionController<FttfcmStoreVo> {
@Resource
private FttfcmStructMapper fttfcmStructMapper;
public IStructMapper getStructMapper() {
return fttfcmStructMapper;
}
@Resource
FttfcmTransactionServiceImpl fttfcmTransactionService;
/**
* 根据结售汇类型 等获取业务参号
*
* @param FttfcmStoreVo
* @return
*/
@PostMapping("/getRef")
public ResponseSet<String> getRef(@RequestBody FttfcmStoreVo fttfcmStoreVo) {
String ref = fttfcmTransactionService.getRef(fttfcmStoreVo);
return ResponseSet.simpleSuccess(ref);
}
}
package com.brilliance.isc.funds.fttfcn.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.FttfcnStoreBo;
import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import static com.brilliance.mda.runtime.mda.Constants.PanStaAdd;
import static com.brilliance.mda.runtime.mda.Constants.PanStaEdit;
/**
* @program: isc-funds
* @ClassName: FttfcnValidator
* @description: 结售汇平盘确认 fttfcn 校验
* @author: 肖桐
* @create: 2024-10-11 11:28
*/
@Component
public class FttfcnValidator extends AbstractModuleValidator <FttfcnStoreBo>{
@Override
@PostConstruct
public void register(){
super.register();;
}
@Override
public Map<String, String> validate(FttfcnStoreBo vo) {
Map<String, String> maps = new HashMap<>();
maps.putAll(super.validate(vo));
return maps;
}
/**
* source:fttfcn.0022.script
*/
@Validate(path="canamt")
public ValidResult checkFtdgrpCbsInsAmtN1000(FttfcnStoreBo bo){
if (bo.getCanamt().compareTo(bo.getFtdgrp().getCbs().getOpn2().getAmt())>0 ) {
return ValidResult.build(false, "实际销账金额不能大于待销账金额!");
}
return null;
}
}
package com.brilliance.isc.funds.fttfcn.document;
import com.brilliance.isc.common.trndoc.vo.DoceotVo;
import com.brilliance.isc.doc.handle.impl.AbstractTransactionDocSet;
import com.brilliance.isc.funds.bo.funds.FttfcnStoreBo;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@Component("fttfcn.docset")
public class FttfcnDocset extends AbstractTransactionDocSet<FttfcnStoreBo> {
}
package com.brilliance.isc.funds.fttfcn.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 com.brilliance.isc.vo.funds.FtdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.Dates;
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.Component;
import java.util.Date;
import static com.brilliance.mda.runtime.mda.Constants.DiaToReplace;
import static com.brilliance.mda.runtime.mda.Constants.NULLDATE;
/**
* @program: isc-funds
* @ClassName: FttfcnDiasavRegister
* @description: 结售汇平盘确认 fttfcn 备忘录注册
* @author: Lenovo
* @create: 2024-10-11 17:30
*/
@Component("fttfcn.diasavRegister")
public class FttfcnDiasavRegister implements IDiasavRegister {
@Autowired
private TrndiaService trndiaService;
@Autowired
private LiaallDiasavRegister liaallDiasavRegister;
@Autowired
private LiaallDiasavZZZRegister liaallDiasavZZZRegister;
@Autowired
private TrtcreDiasavRegister trtcreDiasavRegister;
@Autowired
private DftcreDiasavRegister dftcreDiasavRegister;
@Override
public void diasav(TrndiaVo trndia) {
trnDiasav(trndia);
liaallDiasavRegister.diasav(trndia);
liaallDiasavZZZRegister.diasav(trndia);
trtcreDiasavRegister.diasav(trndia);
dftcreDiasavRegister.diasav(trndia);
}
private void trnDiasav(TrndiaVo trndiaVo) {
}
}
\ No newline at end of file
package com.brilliance.isc.funds.fttfcn.register.doc;
import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.register.document.IDocumentRegister;
import com.brilliance.isc.common.register.document.common.SetmodDocumentRegister;
import com.brilliance.isc.common.trndoc.service.TrndocService;
import com.brilliance.isc.common.trndoc.vo.TrndocVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.common.component.FtToolComponent;
import com.brilliance.isc.vo.funds.FtdBizInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* @program: isc-funds
* @ClassName: FttfcnDocumentRegister
* @description: 结售汇平盘确认 fttfcn 报文注册
* @author: Lenovo
* @create: 2024-10-11 17:47
*/
@Component("fttfcn.documentRegister")
public class FttfcnDocumentRegister implements IDocumentRegister {
@Autowired
TrndocService trndocService;
@Resource
PtsptaToolComponent ptsptaToolComponent;
@Autowired
private SetmodDocumentRegister setmodDocumentRegister;
@Resource
FtToolComponent ftToolComponent;
@Override
public void registerDocument(TrndocVo trndoc) {
doRegister(trndoc);
setmodDocumentRegister.registerDocument(trndoc);
//entmodDocumentRegister.registerDocument(trndoc);
}
public void doRegister(TrndocVo trndoc){
}
}
package com.brilliance.isc.funds.fttfcn.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: FttfcnFeeRegister
* @description: 结售汇平盘确认 fttfcn 费用注册
* @author: Lenovo
* @create: 2024-10-11 17:36
*/
@Component("fttfcn.feeRegister")
public class FttfcnFeeRegister 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.fttfcn.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: FttfcnLiaallRegister
* @description: 结售汇平盘确认 fttfcn 表外注册
* @author: Lenovo
* @create: 2024-10-11 17:41
*/
@Component("fttfcn.liaallSetTransaction")
public class FttfcnLiaallRegister implements ILiaallRegister {
@Autowired
private LiaallRegister liaallRegister;
@Override
public void liaallSetTransaction(LiaallVo liaallVo) {
liaallRegister.liaallSetTransaction(liaallVo);
}
}
package com.brilliance.isc.funds.fttfcn.register.settle;
import com.brilliance.isc.bo.model.Ftdgrp;
import com.brilliance.isc.bo.model.Fxdgrp;
import com.brilliance.isc.common.cbsmod.service.XrtmodService;
import com.brilliance.isc.common.component.PtsptaToolComponent;
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.common.vo.PtsptaVo;
import com.brilliance.isc.funds.common.component.FtToolComponent;
import com.brilliance.isc.vo.funds.FtdBizInfoVo;
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;
import java.math.BigDecimal;
import static com.brilliance.mda.runtime.mda.Constants.NO_ERROR;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Component("fttfcn.settleRegister")
public class FttfcnSettleRegister implements ISettleRegister {
@Autowired
private SetmodService setmodService;
@Autowired
private SetglgService setglgService;
@Autowired
private DefaultSettleRegister defaultSettleRegister;
@Autowired
private GlemodService glemodService;
@Resource
private XrtmodService xrtmodService;
@Resource
private FtToolComponent ftToolComponent;
@Resource
private PtsptaToolComponent ptsptaToolComponent;
@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.setDoccur(ftdgrp.getCbs().getMax().getCur());
setmodVo.setDocamt(rec.getCanamt());
SetglgVo setglg = setmodVo.getSetglg();
setglgService.setglgClrAmount ( setglg,"TRN" );
String cact = glemodService.getAvailAcc ( "FT-FXR", setmodVo.getDoccur(), "", ftdgrp.getCbs().getMax().getAmt() );
String cdtKey = setglgService.setglgAddAmount ( setglg,"TRN", "OWN", setmodVo.getDoccur(), rec.getCanamt().negate(), "", "FTC", "C", cact, "" );
String dbtKey = NULLSTR;
if( MdaUtils.compareTo(ftdgrp.getRec().getFttyp(),"LI") == 0 || MdaUtils.compareTo(ftdgrp.getRec().getFttyp(),"DI") == 0 )
{
dbtKey =setglgService.setglgAddAmount ( setglg,"TRN", "TRO", setmodVo.getDoccur(), rec.getCanamt(), "", "DBD", "C", "", "" );
}
else
{
dbtKey = setglgService.setglgAddAmount ( setglg,"TRN", "TRI", setmodVo.getDoccur(), rec.getCanamt(), "", "DBD", "C", "", "" );
}
}
}
package com.brilliance.isc.funds.fttfcn.register.wfe;
import com.brilliance.isc.common.trnism.service.IWfeRegister;
import com.brilliance.isc.common.trnmod.vo.TrnmodVo;
import org.springframework.stereotype.Component;
@Component("fttfcn"+"."+ IWfeRegister.REGISTER_NAME)
public class FttfcnWfeRegister implements IWfeRegister {
@Override
public void wfeRegister(TrnmodVo trnmodVo){
}
}
package com.brilliance.isc.funds.fttfcn.resource;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.fttfcn.service.FttfcnTransactionServiceImpl;
import com.brilliance.isc.funds.transfer.transaction.FttfcnStructMapper;
import com.brilliance.isc.funds.vo.funds.FttfcnStoreVo;
import com.brilliance.isc.transfer.IStructMapper;
import com.brilliance.isc.vo.ResponseSet;
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: FttfcnResource
* @description: 结售汇平盘确认 fttfcn 请求入口
* @author: xiaotong
* @create: 2024-10-11 17:09
*/
@RestController
@RequestMapping("/fttfcn")
public class FttfcnResource extends AbstractTransactionController<FttfcnStoreVo> {
@Resource
private FttfcnStructMapper fttfcnStructMapper;
public IStructMapper getStructMapper() {
return fttfcnStructMapper;
}
@Resource
FttfcnTransactionServiceImpl fttfcnTransactionService;
}
......@@ -2,6 +2,7 @@ package com.brilliance.isc.funds.fxtssb.resource;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.bo.funds.FxtssbStoreBo;
import com.brilliance.isc.funds.fxtssb.service.FxtssbTransactionServiceImpl;
import com.brilliance.isc.funds.transfer.transaction.FxtssbStructMapper;
import com.brilliance.isc.funds.vo.funds.FxtssbStoreVo;
......@@ -52,7 +53,8 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo>
*/
@PostMapping("/getRef")
public ResponseSet<String> getRef(@RequestBody FxtssbStoreVo fxtssbStoreVo) {
String ref = fxtssbTransactionService.getRef(fxtssbStoreVo);
FxtssbStoreBo fxtssbStoreBo = fxtssbStructMapper.voTransferToBo(fxtssbStoreVo);
String ref = fxtssbTransactionService.getRef(fxtssbStoreBo);
return ResponseSet.simpleSuccess(ref);
}
......@@ -60,7 +62,8 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo>
public ResponseSet defaultAccountsN1000(@RequestBody FxtssbStoreVo fxtssbStoreVo) {
try {
settleContext.loadSettleSession("FXTSSB","","");
Map<String, List<String>> codeSet = fxtssbTransactionService.defaultAccountsN1000(fxtssbStoreVo);
FxtssbStoreBo fxtssbStoreBo = fxtssbStructMapper.voTransferToBo(fxtssbStoreVo);
Map<String, List<String>> codeSet = fxtssbTransactionService.defaultAccountsN1000(fxtssbStoreBo);
ResponseSet success = ResponseSet.simpleSuccess(fxtssbStoreVo);
success.setCodeSet(codeSet);
return success;
......@@ -75,7 +78,8 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo>
public ResponseSet defaultRateN1000(@RequestBody FxtssbStoreVo fxtssbStoreVo) {
try {
settleContext.loadSettleSession("FXTSSB","","");
fxtssbTransactionService.defaultRateN1000(fxtssbStoreVo);
FxtssbStoreBo fxtssbStoreBo = fxtssbStructMapper.voTransferToBo(fxtssbStoreVo);
fxtssbTransactionService.defaultRateN1000(fxtssbStoreBo);
return ResponseSet.simpleSuccess(fxtssbStoreVo);
} catch (Exception e) {
throw e;
......@@ -89,7 +93,8 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo>
public ResponseSet defaultCalculateN1100(@RequestBody FxtssbStoreVo fxtssbStoreVo) {
try {
settleContext.loadSettleSession("FXTSSB","","");
fxtssbTransactionService.defaultCalculateN1100(fxtssbStoreVo);
FxtssbStoreBo fxtssbStoreBo = fxtssbStructMapper.voTransferToBo(fxtssbStoreVo);
fxtssbTransactionService.defaultCalculateN1100(fxtssbStoreBo);
return ResponseSet.simpleSuccess(fxtssbStoreVo);
} catch (Exception e) {
throw e;
......
......@@ -2,6 +2,7 @@ package com.brilliance.isc.funds.fxtsss.resource;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.bo.funds.FxtsssStoreBo;
import com.brilliance.isc.funds.fxtsss.service.FxtsssTransactionServiceImpl;
import com.brilliance.isc.funds.transfer.transaction.FxtsssStructMapper;
import com.brilliance.isc.funds.vo.funds.FxtsssStoreVo;
......@@ -51,7 +52,8 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo>
*/
@PostMapping("/getRef")
public ResponseSet<String> getRef(@RequestBody FxtsssStoreVo fxtsssStoreVo) {
String ref = fxtsssTransactionService.getRef(fxtsssStoreVo);
FxtsssStoreBo fxtsssStoreBo = fxtsssStructMapper.voTransferToBo(fxtsssStoreVo);
String ref = fxtsssTransactionService.getRef(fxtsssStoreBo);
return ResponseSet.simpleSuccess(ref);
}
......@@ -59,7 +61,8 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo>
public ResponseSet defaultAccountsN1000(@RequestBody FxtsssStoreVo fxtsssStoreVo) {
try {
settleContext.loadSettleSession("FXTSSS", "", "");
Map<String, List<String>> codeSet = fxtsssTransactionService.defaultAccountsN1000(fxtsssStoreVo);
FxtsssStoreBo fxtsssStoreBo = fxtsssStructMapper.voTransferToBo(fxtsssStoreVo);
Map<String, List<String>> codeSet = fxtsssTransactionService.defaultAccountsN1000(fxtsssStoreBo);
ResponseSet success = ResponseSet.simpleSuccess(fxtsssStoreVo);
success.setCodeSet(codeSet);
return success;
......@@ -74,7 +77,8 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo>
public ResponseSet defaultRateN1000(@RequestBody FxtsssStoreVo fxtsssStoreVo) {
try {
settleContext.loadSettleSession("FXTSSS", "", "");
fxtsssTransactionService.defaultRateN1000(fxtsssStoreVo);
FxtsssStoreBo fxtsssStoreBo = fxtsssStructMapper.voTransferToBo(fxtsssStoreVo);
fxtsssTransactionService.defaultRateN1000(fxtsssStoreBo);
return ResponseSet.simpleSuccess(fxtsssStoreVo);
} catch (Exception e) {
throw e;
......@@ -88,7 +92,8 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo>
public ResponseSet defaultCalculateN1100(@RequestBody FxtsssStoreVo fxtsssStoreVo) {
try {
settleContext.loadSettleSession("FXTSSS", "", "");
fxtsssTransactionService.defaultCalculateN1100(fxtsssStoreVo);
FxtsssStoreBo fxtsssStoreBo = fxtsssStructMapper.voTransferToBo(fxtsssStoreVo);
fxtsssTransactionService.defaultCalculateN1100(fxtsssStoreBo);
return ResponseSet.simpleSuccess(fxtsssStoreVo);
} catch (Exception e) {
throw e;
......
......@@ -4,7 +4,7 @@ import com.brilliance.isc.bo.Act;
import com.brilliance.isc.bo.Smh;
import com.brilliance.isc.bo.Spt;
import com.brilliance.isc.bo.model.*;
import com.brilliance.isc.common.nosmod.vo.Nosmod;
import com.brilliance.isc.common.nosmod.bo.Nosmod;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
......
......@@ -4,8 +4,8 @@ import com.brilliance.isc.bo.Act;
import com.brilliance.isc.bo.Gle;
import com.brilliance.isc.bo.Smh;
import com.brilliance.isc.bo.Trn;
import com.brilliance.isc.bo.model.Crdgrp;
import com.brilliance.isc.bo.model.Crtmod;
import com.brilliance.isc.bo.model.*;
import com.brilliance.isc.common.nosmod.bo.Nosmod;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
......@@ -62,6 +62,8 @@ public class CrtcroStoreBo extends BaseTransactionVo {
private Crdgrp crdgrp;
private Crtp crtp;
private Crtmod crtmod;
private Trn cretrn;
......@@ -73,6 +75,13 @@ public class CrtcroStoreBo extends BaseTransactionVo {
private Gle spcgle;
private Act pacact;
private Cpdgrp cpdgrp;
private Gidgrp gidgrp;
private Bcdgrp bcdgrp;
private Brdgrp brdgrp;
private Lidgrp lidgrp;
private Nosmod nosmod;
@Override
public void reset() {
......@@ -81,6 +90,10 @@ public class CrtcroStoreBo extends BaseTransactionVo {
crdgrp = new Crdgrp();
}
crdgrp.reset();
if (crtp == null) {
crtp = new Crtp();
}
crtp.reset();
if (crtmod == null) {
crtmod = new Crtmod();
......@@ -104,5 +117,31 @@ public class CrtcroStoreBo extends BaseTransactionVo {
if (pacact == null) {
pacact = new Act();
}
if (cpdgrp == null) {
cpdgrp = new Cpdgrp();
}
cpdgrp.reset();
if (gidgrp == null) {
gidgrp = new Gidgrp();
}
gidgrp.reset();
if (bcdgrp == null) {
bcdgrp = new Bcdgrp();
}
bcdgrp.reset();
if (brdgrp == null) {
brdgrp = new Brdgrp();
}
brdgrp.reset();
if (lidgrp == null) {
lidgrp = new Lidgrp();
}
lidgrp.reset();
if (nosmod == null) {
nosmod = new Nosmod();
}
nosmod.reset();
}
}
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;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FttfcmStoreBo extends BaseTransactionVo {
String narblk=NULLSTR;
String relref=NULLSTR;
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();
}
}
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.mda.runtime.mda.util.Decimals;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import java.math.BigDecimal;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FttfcnStoreBo extends BaseTransactionVo {
private BigDecimal canamt= Decimals.ZERO_SCALE2;
boolean clsflg = true;
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();
}
}
package com.brilliance.isc.funds.transfer.transaction;
import com.brilliance.isc.funds.bo.funds.FttfcmStoreBo;
import com.brilliance.isc.funds.vo.funds.FttfcmStoreVo;
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 FttfcmStructMapper extends IBaseStructMapper<FttfcmStoreBo, FttfcmStoreVo> {
/**
* 此行语句一定要写,StructMapper需要
*/
FttfcmStructMapper INSTANCE = Mappers.getMapper(FttfcmStructMapper.class);
/**
* Vo转为Bo
*
* @param vo
* @return 返回业务Bo
*/
@Override
FttfcmStoreBo voTransferToBo(FttfcmStoreVo vo);
/**
* Vo追加更新至Bo
*
* @param vo
* @param bo
*/
@Override
@Mappings({
})
void voUpdateToBo(FttfcmStoreVo vo, @MappingTarget FttfcmStoreBo bo);
/**
* Bo转为Vo
*
* @param bo
* @return 返回Vo
*/
@Override
FttfcmStoreVo boTransferToVo(FttfcmStoreBo bo);
/**
* bo追加更新至Bo
*
* @param bo
* @param vo
*/
@Override
void boUpdateToVo(FttfcmStoreBo bo, @MappingTarget FttfcmStoreVo vo);
}
package com.brilliance.isc.funds.transfer.transaction;
import com.brilliance.isc.funds.bo.funds.FttfcnStoreBo;
import com.brilliance.isc.funds.vo.funds.FttfcnStoreVo;
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 FttfcnStructMapper extends IBaseStructMapper<FttfcnStoreBo, FttfcnStoreVo> {
/**
* 此行语句一定要写,StructMapper需要
*/
FttfcnStructMapper INSTANCE = Mappers.getMapper(FttfcnStructMapper.class);
/**
* Vo转为Bo
*
* @param vo
* @return 返回业务Bo
*/
@Override
FttfcnStoreBo voTransferToBo(FttfcnStoreVo vo);
/**
* Vo追加更新至Bo
*
* @param vo
* @param bo
*/
@Override
@Mappings({
})
void voUpdateToBo(FttfcnStoreVo vo, @MappingTarget FttfcnStoreBo bo);
/**
* Bo转为Vo
*
* @param bo
* @return 返回Vo
*/
@Override
FttfcnStoreVo boTransferToVo(FttfcnStoreBo bo);
/**
* bo追加更新至Bo
*
* @param bo
* @param vo
*/
@Override
void boUpdateToVo(FttfcnStoreBo bo, @MappingTarget FttfcnStoreVo vo);
}
package com.brilliance.isc.funds.vo.funds;
import com.brilliance.isc.bo.Act;
import com.brilliance.isc.bo.Smh;
import com.brilliance.isc.bo.Spt;
import com.brilliance.isc.bo.model.Cpdgrp;
import com.brilliance.isc.bo.model.Crdgrp;
import com.brilliance.isc.bo.model.Crtp;
import com.brilliance.isc.common.nosmod.vo.Nosmod;
import com.brilliance.isc.bo.SptVo;
import com.brilliance.isc.common.nosmod.vo.NosmodVo;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.vo.funds.CrdgrpVo;
import com.brilliance.isc.vo.funds.CrtpVo;
import com.brilliance.isc.vo.manager.ActVo;
import com.brilliance.isc.vo.model.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
......@@ -30,21 +29,21 @@ public class CrtcriStoreVo extends BaseTransactionVo {
//Object Type of Associated Contract Optional (max=6)
private String rcvobjtyp = NULLSTR;
private Crdgrp crdgrp;
private CrdgrpVo crdgrp;
private Crtp crtp;
private CrtpVo crtp;
private Smh smh;
private Smh corsmh;
private Act sndact;
private ActVo sndact;
private Act aplact;
private ActVo aplact;
private Act rcvact;
private ActVo rcvact;
private Spt crtspt;
private SptVo crtspt;
private Bodgrp bodgrp;
......@@ -66,19 +65,19 @@ public class CrtcriStoreVo extends BaseTransactionVo {
// private Cldgrp cldgrp;
private Cpdgrp cpdgrp;
private CpdgrpVo cpdgrp;
private Nosmod nosmod;
private NosmodVo nosmod;
@Override
public void reset() {
super.reset();
if (crdgrp == null) {
crdgrp = new Crdgrp();
crdgrp = new CrdgrpVo();
}
crdgrp.reset();
if (crtp == null) {
crtp = new Crtp();
crtp = new CrtpVo();
}
crtp.reset();
......@@ -89,19 +88,19 @@ public class CrtcriStoreVo extends BaseTransactionVo {
corsmh = new Smh();
}
if (sndact == null) {
sndact = new Act();
sndact = new ActVo();
}
if (aplact == null) {
aplact = new Act();
aplact = new ActVo();
}
if (rcvact == null) {
rcvact = new Act();
rcvact = new ActVo();
}
if (crtspt == null) {
crtspt = new Spt();
crtspt = new SptVo();
}
if (bodgrp == null) {
......@@ -137,12 +136,12 @@ public class CrtcriStoreVo extends BaseTransactionVo {
}
gidgrp.reset();
if (cpdgrp == null) {
cpdgrp = new Cpdgrp();
cpdgrp = new CpdgrpVo();
}
cpdgrp.reset();
// private Cldgrp cldgrp;
if (nosmod == null) {
nosmod = new Nosmod();
nosmod = new NosmodVo();
}
nosmod.reset();
}
......
package com.brilliance.isc.funds.vo.funds;
import com.brilliance.isc.bo.Act;
import com.brilliance.isc.bo.Gle;
import com.brilliance.isc.bo.Smh;
import com.brilliance.isc.bo.Trn;
import com.brilliance.isc.bo.model.Crdgrp;
import com.brilliance.isc.bo.model.Crtmod;
import com.brilliance.isc.bo.model.Cpdgrp;
import com.brilliance.isc.common.nosmod.vo.NosmodVo;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.common.vo.GleVo;
import com.brilliance.isc.model.act.ActVO;
import com.brilliance.isc.vo.funds.CrdgrpVo;
import com.brilliance.isc.vo.funds.CrtmodVo;
import com.brilliance.isc.vo.manager.SmhVo;
import com.brilliance.isc.vo.manager.TrnVo;
import com.brilliance.isc.vo.model.Bcdgrp;
import com.brilliance.isc.vo.model.Brdgrp;
import com.brilliance.isc.vo.model.Gidgrp;
import com.brilliance.isc.vo.model.Lidgrp;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
......@@ -60,35 +67,41 @@ public class CrtcroStoreVo extends BaseTransactionVo {
//Status I-INCOMING, O-OUTGOING, N-NOTNEED (max=1)
private String clrsta = NULLSTR;
private Crdgrp crdgrp;
private CrdgrpVo crdgrp;
private Crtmod crtmod;
private CrtmodVo crtmod;
private Trn cretrn;
private TrnVo cretrn;
private Smh cresmh;
private Smh bndsmh;
private Gle spcgle;
private GleVo spcgle;
private Act pacact;
private ActVO pacact;
private Cpdgrp cpdgrp;
private Gidgrp gidgrp;
private Bcdgrp bcdgrp;
private Brdgrp brdgrp;
private Lidgrp lidgrp;
private NosmodVo nosmod;
@Override
public void reset() {
super.reset();
if (crdgrp == null) {
crdgrp = new Crdgrp();
crdgrp = new CrdgrpVo();
}
crdgrp.reset();
if (crtmod == null) {
crtmod = new Crtmod();
crtmod = new CrtmodVo();
}
crtmod.reset();
if (cretrn == null) {
cretrn = new Trn();
cretrn = new TrnVo();
}
if (cresmh == null) {
......@@ -99,10 +112,35 @@ public class CrtcroStoreVo extends BaseTransactionVo {
bndsmh = new Smh();
}
if (spcgle == null) {
spcgle = new Gle();
spcgle = new GleVo();
}
if (pacact == null) {
pacact = new Act();
pacact = new ActVO();
}
if (cpdgrp == null) {
cpdgrp = new Cpdgrp();
}
cpdgrp.reset();
if (gidgrp == null) {
gidgrp = new Gidgrp();
}
gidgrp.reset();
if (bcdgrp == null) {
bcdgrp = new Bcdgrp();
}
bcdgrp.reset();
if (brdgrp == null) {
brdgrp = new Brdgrp();
}
brdgrp.reset();
if (lidgrp == null) {
lidgrp = new Lidgrp();
}
lidgrp.reset();
if (nosmod == null) {
nosmod = new NosmodVo();
}
nosmod.reset();
}
}
package com.brilliance.isc.funds.vo.funds;
import com.brilliance.isc.vo.model.FtdgrpVo;
import com.brilliance.isc.vo.model.FttpVo;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FttfcmStoreVo extends BaseTransactionVo {
String narblk=NULLSTR;
String relref=NULLSTR;
private FtdgrpVo ftdgrp;
private FttpVo fttp;
@Override
public void reset() {
super.reset();
if (ftdgrp == null) {
ftdgrp = new FtdgrpVo();
}
ftdgrp.reset();
if (fttp == null) {
fttp = new FttpVo();
}
fttp.reset();
}
}
package com.brilliance.isc.funds.vo.funds;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.vo.model.FtdgrpVo;
import com.brilliance.isc.vo.model.FttpVo;
import com.brilliance.mda.runtime.mda.util.Decimals;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import java.math.BigDecimal;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FttfcnStoreVo extends BaseTransactionVo {
BigDecimal canamt= Decimals.ZERO_SCALE2;
boolean clsflg = true;
private FtdgrpVo ftdgrp;
private FttpVo fttp;
@Override
public void reset() {
super.reset();
if (ftdgrp == null) {
ftdgrp = new FtdgrpVo();
}
ftdgrp.reset();
if (fttp == null) {
fttp = new FttpVo();
}
fttp.reset();
}
}
......@@ -3,6 +3,8 @@ package com.brilliance.isc.funds.vo.funds;
import com.brilliance.isc.bo.model.Fxdgrp;
import com.brilliance.isc.bo.model.Fxtp;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.vo.funds.FxdgrpVo;
import com.brilliance.isc.vo.funds.FxtpVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
......@@ -17,20 +19,20 @@ import lombok.Data;
@JsonIgnoreProperties(ignoreUnknown = true)
public class FxtssbStoreVo extends BaseTransactionVo {
private Fxdgrp fxdgrp;
private FxdgrpVo fxdgrp;
private Fxtp fxtp;
private FxtpVo fxtp;
@Override
public void reset() {
super.reset();
if (fxdgrp == null) {
fxdgrp = new Fxdgrp();
fxdgrp = new FxdgrpVo();
}
fxdgrp.reset();
if (fxtp == null) {
fxtp = new Fxtp();
fxtp = new FxtpVo();
}
fxtp.reset();
}
......
package com.brilliance.isc.funds.vo.funds;
import com.brilliance.isc.bo.model.Fxdgrp;
import com.brilliance.isc.bo.model.Fxtp;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.vo.funds.FxdgrpVo;
import com.brilliance.isc.vo.funds.FxtpVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
......@@ -16,20 +16,20 @@ import lombok.Data;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FxtsssStoreVo extends BaseTransactionVo {
private Fxdgrp fxdgrp;
private FxdgrpVo fxdgrp;
private Fxtp fxtp;
private FxtpVo fxtp;
@Override
public void reset() {
super.reset();
if (fxdgrp == null) {
fxdgrp = new Fxdgrp();
fxdgrp = new FxdgrpVo();
}
fxdgrp.reset();
if (fxtp == null) {
fxtp = new Fxtp();
fxtp = new FxtpVo();
}
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