Commit b7ea5ad8 by huangshunlin

汇入/汇出清算

parent 5050b135
......@@ -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.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());
}
}
}
......@@ -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,13 +76,11 @@ 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";
}
if (ptsptaToolComponent.ptsIsRolSet(ptsList, "ACC")) {
rol = "ACC";
} else {
rol = "SND";
}
String dbtKey = setmodService.setGlgAmt(setmodVo, "TRN", rol, setmodVo.getDoccur(), maxAmt, "");
......@@ -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);
}
}
......@@ -3,17 +3,16 @@ package com.brilliance.isc.funds.crtcri.service;
import cn.hutool.core.bean.BeanUtil;
import com.brilliance.isc.bo.*;
import com.brilliance.isc.bo.model.Crdgrp;
import com.brilliance.isc.bo.model.Crtp;
import com.brilliance.isc.common.api.bch.service.BchService;
import com.brilliance.isc.common.cache.pta.PtaCacheService;
import com.brilliance.isc.common.cache.pty.PtyCacheService;
import com.brilliance.isc.common.cbsmod.service.CbsmodService;
import com.brilliance.isc.common.cbsmod.service.XrtmodService;
import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.contants.CommonContants;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.glemod.service.GlemodService;
import com.brilliance.isc.common.nosmod.NosmodService;
import com.brilliance.isc.common.ordmod.service.OrdmodService;
import com.brilliance.isc.common.setmod.service.SetmodService;
import com.brilliance.isc.common.setmod.vo.SetmodVo;
import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.common.transaction.AbstractTransactionService;
......@@ -30,9 +29,9 @@ import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.bo.funds.CrtcriStoreBo;
import com.brilliance.isc.funds.common.component.CrToolComponent;
import com.brilliance.isc.funds.crtcri.check.CrtcriValidator;
import com.brilliance.isc.funds.vo.funds.CrtcriStoreVo;
import com.brilliance.isc.mda.dao.*;
import com.brilliance.isc.vo.funds.FxdBizInfoVo;
import com.brilliance.isc.vo.funds.CrdBizInfoVo;
import com.brilliance.mda.runtime.mda.CodetableItem;
import com.brilliance.mda.runtime.mda.IStream;
import com.brilliance.mda.runtime.mda.impl.Argument;
import com.brilliance.mda.runtime.mda.impl.StreamImpl;
......@@ -46,9 +45,11 @@ import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
......@@ -69,8 +70,6 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
@Resource
private CrtcriValidator crtcriValidator;
@Resource
private XrtmodService xrtmodService;
@Resource
private SysmodService sysmodService;
......@@ -90,8 +89,6 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
@Resource
private TrnmodService trnmodService;
@Resource
private GlemodService glemodService;
@Autowired
private PtaCacheService ptaCacheService;
......@@ -99,12 +96,6 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
@Resource
private BchService bchService;
@Resource
private PtyratMapper ptyratMapper;
@Resource
private SetmodService setmodService;
@Resource
private ActMapper actMapper;
......@@ -134,9 +125,15 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
@Resource
private PublicMapper publicMapper;
@Autowired
@Resource
private NosmodService nosmodService;
@Resource
private PtyCacheService ptyCacheService;
@Resource
private CrtpService crtpService;
@PostConstruct
public void regisertService() {
serviceRegisterMaps.put(CommonContants.SETMOD_SERVICE, "Y");
......@@ -208,8 +205,20 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
@Override
protected BizInfoVo buildBizInfo(CrtcriStoreBo transactionVo) {
FxdBizInfoVo bizInfoVo = new FxdBizInfoVo();
Crd rec = transactionVo.getCrdgrp().getRec();
Crtp crtp = transactionVo.getCrtp();
CrdBizInfoVo bizInfoVo = new CrdBizInfoVo();
bizInfoVo.setObjinr(rec.getInr());
bizInfoVo.setObjtyp("CRD");
bizInfoVo.setForare(crtp.getForare());
bizInfoVo.setOpndat(rec.getOpndat());
bizInfoVo.setRcvbchinr(rec.getRcvbchinr());
bizInfoVo.setCustyp(rec.getCustyp());
bizInfoVo.setRcvactInr(transactionVo.getRcvact().getInr());
bizInfoVo.setRcvactExtkey(transactionVo.getRcvact().getExtkey());
bizInfoVo.setRcvobjtyp(rec.getRcvobjtyp());
Cpd cpd = transactionVo.getCpdgrp().getRec();
bizInfoVo.setValdat(cpd.getValdat());
return bizInfoVo;
}
......@@ -236,7 +245,7 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
if (sysmodService.sptIsIncLoaded(bo.getSpt().getSta())) {
bo.getCrdgrp().getCbs().getMax().setCur(bo.getSpt().getRelcur());
bo.getCrdgrp().getCbs().getMax().setAmt(bo.getSpt().getRelamt());
// TODO bo.getCrdgrp().getRec().setMsgact(bo.getSpt().getAct59());
bo.getCrdgrp().getRec().setMsgact(bo.getSpt().getAct59());
bo.getCrdgrp().getRec().setMsgref(bo.getSpt().getObjref());
bo.getCrdgrp().getRec().setClrtyp("I");
bo.getCrdgrp().getRec().setTrntyp("A");
......@@ -251,7 +260,7 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
bo.getCrdgrp().getRec().setErrmsg("根据主键" + bo.getSpt().getSmhinr() + "未找到表记录");
} else {
bo.setSmh(smh);
// bo.getCrdgrp().getRec().setRcvbic(bo.getSmh().getRcvkey());
bo.getCrdgrp().getRec().setRcvbic(bo.getSmh().getRcvkey());
bo.getCrdgrp().getRec().setMsgtyp(bo.getSmh().getMsgtyp());
bo.getCrdgrp().getRec().setMsginr(bo.getSmh().getInr());
if (!MdaUtils.isEmpty(bo.getSmh().getGrpinr())) {
......@@ -270,7 +279,8 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
}
}
} else {
MdaUtils.clear(bo.getCorsmh());
// MdaUtils.clear(bo.getCorsmh());
bo.setCorsmh(new Smh());
}
}
if (MdaUtils.isEmpty(bo.getCrdgrp().getRec().getSta())) {
......@@ -300,6 +310,9 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
*/
private void init950(CrtcriStoreBo crtcriStoreBo) {
crtcriStoreBo.setClrsta("I");
String extkey = SettleContext.getUserSession().getUsr().getExtkey();
crtcriStoreBo.getCrdgrp().getRec().setOwnusr(extkey);
defaultCrdgrpRecCustypN1000(crtcriStoreBo);
}
@Override
......@@ -322,31 +335,17 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
}
public String getRef(CrtcriStoreVo crtcriStoreVo) {
crtcriStoreVo.reset();
PtsptaVo ptsptaVo = crtcriStoreVo.getCrdgrp().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;
public String getRef(CrtcriStoreBo bo) {
bo.reset();
if (Objects.isNull(SettleContext.getUserSession().getWrkbch()) || StringUtils.isEmpty(SettleContext.getUserSession().getWrkbch().getInr())) {
SettleContext.getUserSession().setWrkbch(SettleContext.getUserSession().getBch());
}
SettleContext.getUserSession().setWrkbch(wrkbch);
Crdgrp crdgrp = crtcriStoreVo.getCrdgrp();
Crdgrp crdgrp = bo.getCrdgrp();
crToolComponent.getref(crdgrp);
return crdgrp.getRec().getOwnref();
}
private SetmodVo buildSetmodVo(CrtcriStoreVo vo) {
SetmodVo setmodVo = new SetmodVo();
return setmodVo;
}
/**
* source:crtcri.0008.script
......@@ -357,7 +356,16 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
* @return
*/
public Act readClearingAct(String trmTyp, String bchInr, String cur) {
String sql = "select * from act WHERE HOLPTYINR = (SELECT PTYINR FROM BCH WHERE INR = '" + bchInr
// String sql = "select * from act WHERE HOLPTYINR = (SELECT PTYINR FROM BCH WHERE INR = '" + bchInr
// + "') AND (CUR = ' ' OR CUR = '" + cur + "') AND TRMTYP = '"
// + trmTyp + "' AND ACCTYP = 'O'";
Bch bch = new Bch();
bch.setInr(bchInr);
Bch dbBch = bchMapper.selectByPrimaryKey(bch);
if (Objects.isNull(dbBch)) {
return new Act();
}
String sql = "select * from act WHERE HOLPTYINR in (SELECT inr FROM pty WHERE extkey = '" + dbBch.getSwfcod()
+ "') AND (CUR = ' ' OR CUR = '" + cur + "') AND TRMTYP = '"
+ trmTyp + "' AND ACCTYP = 'O'";
List<Act> actList = actMapper.dyncRead(ImmutableBiMap.of("sql", sql));
......@@ -368,7 +376,8 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
int pos = Strings.pos(rcvact.getExtkey(), "A");
if (pos > 0) {
// text = Codetables.getCodeValueText(bo.getCrdgrp().getRec(), "rcvbchinr", bo.getCrdgrp().getRec().getRcvbchinr());
String text = "";
// BRANCH || BCHNAME
String text = dbBch.getBranch() + dbBch.getBchname();
rcvact.setExtkey(Strings.mid(rcvact.getExtkey(), 1, pos - 1) +
Strings.mid(text, 1, 4) + Strings.mid(rcvact.getExtkey(), pos + 4));
}
......@@ -641,20 +650,19 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
return;
}
}
// 如果下发行没有权限经办业务,则转到它的上级经办机构 TODO bch 没有 wrkflg
String sql = "SELECT WRKFLG, BCHKEY FROM BCH WHERE INR = '" + bo.getCrdgrp().getRec().getRcvbchinr() + "'";
String wrkFlg = "";
// 如果下发行没有权限经办业务,则转到它的上级经办机构 原代码的wrkflg 对应BCHTYP (1:经办行)
String sql = "SELECT BCHTYP, BCHKEY FROM BCH WHERE INR = '" + bo.getCrdgrp().getRec().getRcvbchinr() + "'";
String bchtyp = "";
String bchKey = "";
List<Bch> bchList = bchMapper.dyncRead(ImmutableBiMap.of("sql", sql));
if (CollectionUtils.isNotEmpty(bchList)) {
// wrkFlg = bchList.get(0).getWrkflg();
bchtyp = bchList.get(0).getBchtyp();
bchKey = bchList.get(0).getBchkey();
}
String wrkInr = NULLSTR;
if (MdaUtils.isEmpty(wrkFlg)) {
sql = "SELECT INR FROM BCH WHERE BRANCH = '" + bchKey + "'";
if (MdaUtils.isEmpty(bchtyp) || MdaUtils.compareTo(bchtyp, "1") != 0) {
// sql = "SELECT INR FROM BCH WHERE BRANCH = '" + bchKey + "'";
sql = "SELECT INR FROM BCH WHERE bchtyp='1' and BRANCH = '" + bchKey + "'";
List<Bch> list = bchMapper.dyncRead(ImmutableBiMap.of("sql", sql));
if (CollectionUtils.isNotEmpty(list)) {
wrkInr = list.get(0).getInr();
......@@ -664,11 +672,13 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
// 取得下发行的清算账号
if (MdaUtils.compareTo(bo.getCrdgrp().getRec().getCustyp(), "1") == 0) {
// 对私
readClearingAct("SP-RIP", bo.getCrdgrp().getRec().getRcvbchinr(), maxCur);
Act act = readClearingAct("SP-RIP", bo.getCrdgrp().getRec().getRcvbchinr(), maxCur);
bo.setRcvact(act);
} else {
bo.getCrdgrp().getRec().setCustyp("0");
// 对公
readClearingAct("SP-RIC", bo.getCrdgrp().getRec().getRcvbchinr(), maxCur);
Act act = readClearingAct("SP-RIC", bo.getCrdgrp().getRec().getRcvbchinr(), maxCur);
bo.setRcvact(act);
}
}
......@@ -720,13 +730,6 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
}
/**
* source:crtcri.0005.script
*/
public void setBranchCodeValue() {
String sql = "SELECT INR, BRANCH||BCHNAME FROM BCH WHERE WRKFLG = 'X'";
}
/**
* source:crtcri.0020.script
......@@ -791,6 +794,58 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
sysmodService.sptSaveEntry(bo.getCrtspt(), Utils.getFieldValue(mod, "REC"), sta, clrStm, "");
}
/**
* source:crtcri.0021.script
*/
public void defaultCrdgrpRecCustypN1000(CrtcriStoreBo bo) {
if (MdaUtils.compareTo(bo.getCrdgrp().getRec().getRcvobjtyp(), "CPD") != 0) {
bo.getCrdgrp().getRec().setCustyp("0");
}
}
/**
* source:crtcri.0016.script
*/
public void defaultCrdgrpRecNamN1000(CrtcriStoreBo bo) {
//! Default name of contract; usually contract amount and information about the client is used
if (!bo.getCrdgrp().getRec().isModified("nam")) {
if (MdaUtils.compareTo(bo.getCrdgrp().getRec().getClrtyp(), "O") == 0) {
// Dynamic.ptsmodGetPtyOfPtspta(bo.getCrdgrp().getRcv(), bo.getTrnmod().getPtsmod().getPty());
//根据前一个参数里的pta的ptyinr 读取出pty 放到 ptsmod的pty下
// Pty dbPty = ptyCacheService.getPtyById(bo.getCrdgrp().getRcv().getPta().getPtyinr());
String nam = bo.getCrdgrp().getRec().getMsgtyp() + " " + bo.getCrdgrp().getCbs().getMax().getCur() + " "
+ Formats.fmtAmount(bo.getCrdgrp().getCbs().getMax().getAmt(), bo.getCrdgrp().getCbs().getMax().getCur())
+ " " + bo.getCrdgrp().getRec().getRcvobjtyp() + "/" + bo.getCrdgrp().getRcv().getPts().getNam();
bo.getCrdgrp().getRec().setNam(Strings.mid(nam, 1, 40));
} else {
// Dynamic.ptsmodGetPtyOfPtspta(bo.getCrdgrp().getSnd(), bo.getTrnmod().getPtsmod().getPty());
// Pty dbPty = ptyCacheService.getPtyById(bo.getCrdgrp().getSnd().getPta().getPtyinr());
String nam = bo.getCrdgrp().getRec().getMsgtyp() + " " + bo.getCrdgrp().getCbs().getMax().getCur() + " "
+ Formats.fmtAmount(bo.getCrdgrp().getCbs().getMax().getAmt(), bo.getCrdgrp().getCbs().getMax().getCur())
+ " " + bo.getCrdgrp().getRec().getRcvobjtyp() + "/" + bo.getCrdgrp().getSnd().getPta().getNam();
bo.getCrdgrp().getRec().setNam(Strings.mid(nam, 1, 40));
}
}
}
public List<CodetableItem> getBranchCodeValue() {
List<Map<String, Object>> list = crtpService.setBranchCodeValue();
List<CodetableItem> collect = new ArrayList<>();
if (CollectionUtils.isNotEmpty(list)) {
collect = list.stream().map(item -> {
String val = (String) item.get("VAL");
String txt = (String) item.get("TXT");
return new CodetableItem(txt, val);
}).collect(Collectors.toList());
}
return collect;
}
}
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.crtcro.service;
import com.brilliance.isc.bo.Bch;
import com.brilliance.isc.bo.Pta;
import com.brilliance.isc.bo.model.Crdgrp;
import cn.hutool.core.bean.BeanUtil;
import com.brilliance.isc.bo.*;
import com.brilliance.isc.bo.model.*;
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.component.PtsptaToolComponent;
import com.brilliance.isc.common.contants.CommonContants;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.glemod.service.GlemodService;
import com.brilliance.isc.common.setmod.service.SetmodService;
import com.brilliance.isc.common.exception.CommonServiceException;
import com.brilliance.isc.common.nosmod.NosmodService;
import com.brilliance.isc.common.setmod.vo.SetmodVo;
import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.common.transaction.AbstractTransactionService;
......@@ -18,22 +18,28 @@ 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.I18nUtil;
import com.brilliance.isc.common.util.StringUtils;
import com.brilliance.isc.common.vo.BizAmdInfoVo;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.bo.funds.CrtcroStoreBo;
import com.brilliance.isc.funds.common.component.CrToolComponent;
import com.brilliance.isc.funds.crtcro.check.CrtcroValidator;
import com.brilliance.isc.funds.vo.funds.CrtcroStoreVo;
import com.brilliance.isc.mda.dao.ActMapper;
import com.brilliance.isc.mda.dao.PtyratMapper;
import com.brilliance.isc.vo.funds.FxdBizInfoVo;
import com.brilliance.isc.mda.dao.GleMapper;
import com.brilliance.isc.mda.dao.PtyMapper;
import com.brilliance.isc.mda.dao.SmhMapper;
import com.brilliance.isc.vo.funds.CrdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.google.common.collect.ImmutableBiMap;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Objects;
......@@ -53,15 +59,18 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
private CrtcroValidator crtcroValidator;
@Resource
private XrtmodService xrtmodService;
@Resource
private SysmodService sysmodService;
@Resource
private CrToolComponent crToolComponent;
@Resource
private ActMapper actMapper;
@Resource
private PtsptaToolComponent ptsptaToolComponent;
@Resource
private TransactionHelpService transactionHelpService;
@Resource
......@@ -73,24 +82,24 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
@Resource
private TrnmodService trnmodService;
@Resource
private GlemodService glemodService;
@Autowired
private PtaCacheService ptaCacheService;
@Resource
private BchService bchService;
@Resource
private PtyratMapper ptyratMapper;
@Autowired
private NosmodService nosmodService;
@Resource
private SetmodService setmodService;
private SmhMapper smhMapper;
@Resource
private GleMapper gleMapper;
@Resource
private ActMapper actMapper;
private PtyMapper ptyMapper;
@PostConstruct
public void regisertService() {
......@@ -107,12 +116,34 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
ruleMtabutSavN500(transactionVo);
}
/**
* source:crtcro.0020.script
*/
public void ruleMtabutSavN500(CrtcroStoreBo bo) {
Crdgrp crdgrp = bo.getCrdgrp();
crToolComponent.getref(crdgrp);
// 1. Create (rsp. update) Contract (incl. Texts)
// change state
bo.getCrdgrp().getRec().setSta("D");
crToolComponent.sav(crdgrp);
// 2. Build Transaction from CRDGRP
TrnmodVo trnmodVo = transactionHelpService.getTransactionStoreSet().getTrnmodVo();
trnmodService.trnSetFromContract(trnmodVo);
cbsSav(bo);
SetmodVo setmodVo = transactionHelpService.getTransactionStoreSet().getSetmodVo();
nosmodService.savNostro(bo.getNosmod(), setmodVo, trnmodVo);
}
private void cbsSav(CrtcroStoreBo bo, TrnmodVo trnmodVo) {
/**
* source:crtcro.0021.script
*/
private void cbsSav(CrtcroStoreBo bo) {
TrnmodVo trnmodVo = transactionHelpService.getTransactionStoreSet().getTrnmodVo();
String trninr = transactionHelpService.getTrninr();
cbsmodService.cbsTrnSetNew("TRN", trninr);
trnmodService.cbsTrnStore("MAXAMT", "AMT1", Dates.today(), bo.getCrdgrp().getCbs().getMax().getCur(), bo.getCrdgrp().getCbs().getMax().getAmt()
, I18nUtil.getMessage("funds_crtcr0_000000"), bo.getCrdgrp().getRec(), trninr);
}
@Override
......@@ -122,8 +153,20 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
@Override
protected BizInfoVo buildBizInfo(CrtcroStoreBo transactionVo) {
FxdBizInfoVo bizInfoVo = new FxdBizInfoVo();
Crd rec = transactionVo.getCrdgrp().getRec();
Crtp crtp = transactionVo.getCrtp();
CrdBizInfoVo bizInfoVo = new CrdBizInfoVo();
bizInfoVo.setObjinr(rec.getInr());
bizInfoVo.setObjtyp("CRD");
bizInfoVo.setForare(crtp.getForare());
bizInfoVo.setOpndat(rec.getOpndat());
bizInfoVo.setRcvbchinr(rec.getRcvbchinr());
bizInfoVo.setCustyp(rec.getCustyp());
String act = transactionVo.getSpcgle().getAct();
bizInfoVo.setSpcgleAct(act);
bizInfoVo.setRcvobjtyp(rec.getRcvobjtyp());
Cpd cpd = transactionVo.getCpdgrp().getRec();
bizInfoVo.setValdat(cpd.getValdat());
return bizInfoVo;
}
......@@ -135,6 +178,7 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
@Override
public CrtcroStoreBo init(CrtcroStoreBo crtcroStoreBo) {
crtcroStoreBo.reset();
init950(crtcroStoreBo);
init1000(crtcroStoreBo);
return crtcroStoreBo;
}
......@@ -143,11 +187,144 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
* source:crtcro.0001.script
*/
public void init1000(CrtcroStoreBo bo) {
// 不让Break
// Systems.resetVisible(bo.getMtabut(), "pen");
// Systems.setValues(bo.getCrdgrp().getRec(), "rcvobjtyp", "CPD" + CR + "BCD" + CR + "BRD" + CR + "GID");
String msgTyp = NULLSTR;
String ptyInr = NULLSTR;
if (sysmodService.sptIsRimLoaded(bo.getSpt().getSta())) {
// 汇出清算通过Register队列进入
bo.getCrdgrp().getRec().setClrtyp("O");
bo.getCrdgrp().getRec().setCredat(Dates.today());
bo.getCrdgrp().getRec().setOpndat(Dates.today());
bo.getCrdgrp().getRec().setSptinr(bo.getSpt().getInr());
// 查找TRN记录
bo.getCretrn().setInr(bo.getSpt().getCreobjinr());
Trn dbTrn = (Trn) sysmodService.sdbRead(bo.getCretrn());
if (Objects.isNull(dbTrn)) {
throw new CommonServiceException("根据Creobjinr:" + bo.getSpt().getCreobjinr() + "找不到TRN数据");
}
bo.setCretrn(dbTrn);
bo.getCrdgrp().getRec().setRcvobjtyp(bo.getCretrn().getObjtyp());
bo.getCrdgrp().getRec().setRcvobjinr(bo.getCretrn().getObjinr());
bo.getCrdgrp().getRec().setRcvbchinr(bo.getCretrn().getBchkeyinr());
bo.getCrdgrp().getRec().setMsgref(bo.getCretrn().getOwnref());
// 查找SMH记录(202)
bo.getBndsmh().setInr(bo.getSpt().getSmhinr());
Smh dbSmh = (Smh) sysmodService.sdbRead(bo.getBndsmh());
if (Objects.isNull(dbSmh)) {
throw new CommonServiceException("根据Smhinr:" + bo.getSpt().getSmhinr() + "找不到SMH数据");
}
bo.setBndsmh(dbSmh);
// ctx.getDaoSession().dbRead(bo.getBndsmh(), bo.getSpt().getSmhinr(), "INR");
bo.getCrdgrp().getRec().setBndinr(bo.getBndsmh().getInr());
bo.getCrdgrp().getRec().setBndtyp(bo.getBndsmh().getMsgtyp());
// 查找绑定这笔202的其他SWIFT报文信息
switch (bo.getCrdgrp().getRec().getRcvobjtyp()) {
case "CPD":
// Platform.getCPdGrp(this.getCpdgrp(),this.getCrdgrp().getRec().getRcvobjinr());
Cpdgrp dbCpdgrp = crToolComponent.getCpdgrpByInr(bo.getCrdgrp().getRec().getRcvobjinr());
bo.setCpdgrp(dbCpdgrp);
// 汇出汇款发103+202
if (MdaUtils.compareTo(bo.getCpdgrp().getRec().getSwftyp(), "COV") == 0) {
msgTyp = "103";
}
break;
case "BCD":
msgTyp = "400";
// Platform.getBcdGrp(bo.getBcdgrp(), bo.getCrdgrp().getRec().getRcvobjinr());
Bcdgrp dbBcdgrp = crToolComponent.getBcdgrpByInr(bo.getCrdgrp().getRec().getRcvobjinr());
bo.setBcdgrp(dbBcdgrp);
break;
case "BRD":
msgTyp = "756";
// Platform.getBrdGrp(bo.getBrdgrp(), bo.getCrdgrp().getRec().getRcvobjinr());
// Platform.getLidGrp(bo.getLidgrp(), bo.getBrdgrp().getRec().getPntinr());
Brdgrp dbBrdgrp = crToolComponent.getBrdgrpByInr(bo.getCrdgrp().getRec().getRcvobjinr());
bo.setBrdgrp(dbBrdgrp);
Lidgrp dbLidgrp = crToolComponent.getLidgrpByInr(bo.getBrdgrp().getRec().getPntinr());
bo.setLidgrp(dbLidgrp);
break;
case "GID":
msgTyp = "";
// Platform.getGidGrp(bo.getGidgrp(), bo.getCrdgrp().getRec().getRcvobjinr());
Gidgrp dbGidgrp = crToolComponent.getGidgrpByInr(bo.getCrdgrp().getRec().getRcvobjinr());
bo.setGidgrp(dbGidgrp);
break;
default:
msgTyp = "";
}
if (!MdaUtils.isEmpty(msgTyp)) {
// ctx.getDaoSession().dbRead(bo.getCresmh(), "WHERE TRNTYP = 'TRN' AND TRNINR = '" + bo.getBndsmh().getTrninr() + "' AND MSGTYP = '" + msgTyp + "'");
List<Smh> smhList = smhMapper.selectByTrninrAndMsgtyp(bo.getBndsmh().getTrninr(), msgTyp);
if (CollectionUtils.isEmpty(smhList)) {
// 找不到,可能发了999
// ctx.getDaoSession().dbRead(bo.getCresmh(), "WHERE TRNTYP = 'TRN' AND TRNINR = '" + bo.getBndsmh().getTrninr() + "' AND MSGTYP = '999'");
List<Smh> smhList2 = smhMapper.selectByTrninrAndMsgtyp(bo.getBndsmh().getTrninr(), "999");
if (CollectionUtils.isNotEmpty(smhList2)) {
bo.setCresmh(smhList2.get(0));
}
} else {
bo.setCresmh(smhList.get(0));
}
bo.getCrdgrp().getRec().setMsginr(bo.getCresmh().getInr());
bo.getCrdgrp().getRec().setMsgtyp(bo.getCresmh().getMsgtyp());
} else {
// CRTP\\ACCP\\PANSTA = PanStaShow
// Platform.setModuleContent(bo.getCresmh(), bo.getBndsmh());
Smh smh = MdaUtils.deepClone(bo.getBndsmh());
bo.setCresmh(smh);
// MdaUtils.clear(bo.getBndsmh());
bo.setBndsmh(new Smh());
bo.getCrdgrp().getRec().setBndinr(NULLSTR);
bo.getCrdgrp().getRec().setBndtyp(NULLSTR);
bo.getCrdgrp().getRec().setMsginr(bo.getCresmh().getInr());
bo.getCrdgrp().getRec().setMsgtyp(bo.getCresmh().getMsgtyp());
}
// 读取前手交易的清算汇出账务信息
// ctx.getDaoSession().dbRead(bo.getSpcgle(), "WHERE TRNINR = '" + bo.getCretrn().getInr() + "' AND DBTCDT = 'C' AND ( DBTDFT ='SP-ROC' OR DBTDFT = 'SP-ROP') ");
Gle gle = gleMapper.selectSpcGLeByTrninr(bo.getCretrn().getInr());
bo.setSpcgle(gle);
if (MdaUtils.compareTo(bo.getSpcgle().getDbtdft(), "SP-ROP") == 0) {
bo.getCrdgrp().getRec().setCustyp("1");
} else {
bo.getCrdgrp().getRec().setCustyp("0");
}
bo.getCrdgrp().getCbs().getMax().setCur(bo.getSpcgle().getCur());
bo.getCrdgrp().getCbs().getMax().setAmt(bo.getSpcgle().getAmt());
// 将收报行信息赋值到PTSPTA中
if (!MdaUtils.isEmpty(bo.getCresmh().getSndkey())) {
// 说明有主报文(103/400/756)
Pty crePty = ptyMapper.selectByExtkey(bo.getCresmh().getSndkey());
ptsptaToolComponent.ptsmodGetPtsptaFromPtyINR(bo.getCrdgrp().getRcv(), crePty.getInr());
if (!MdaUtils.isEmpty(bo.getBndsmh().getSndkey())) {
// 副报文(202)读取到账户行中
Pty bndPty = ptyMapper.selectByExtkey(bo.getBndsmh().getSndkey());
ptsptaToolComponent.ptsmodGetPtsptaFromPtyINR(bo.getCrdgrp().getAcc(), bndPty.getInr());
}
}
// 读取同业账户116信息
if (!MdaUtils.isEmpty(bo.getCrdgrp().getAcc().getPts().getPtyinr())) {
ptyInr = bo.getCrdgrp().getAcc().getPts().getPtyinr();
} else {
ptyInr = bo.getCrdgrp().getRcv().getPts().getPtyinr();
}
// readAct(bo.getSysmod().getBch().getPtyinr(), ptyInr, bo.getPacact());
String maxCur = bo.getCrdgrp().getCbs().getMax().getCur();
readAct("", ptyInr, bo.getPacact(), maxCur);
// if (Objects.isNull(bo.getPacact()) || StringUtils.isEmpty(bo.getPacact().getInr())) {
// MdaUtils.clear(bo.getPacact());
// }
}
}
private void init950(CrtcroStoreBo crtcroStoreBo) {
crtcroStoreBo.setClrsta("O");
String extkey = SettleContext.getUserSession().getUsr().getExtkey();
crtcroStoreBo.getCrdgrp().getRec().setOwnusr(extkey);
}
@Override
......@@ -170,30 +347,30 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
}
public String getRef(CrtcroStoreVo crtcroStoreVo) {
crtcroStoreVo.reset();
PtsptaVo ptsptaVo = crtcroStoreVo.getCrdgrp().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;
public String getRef(CrtcroStoreBo bo) {
bo.reset();
if (Objects.isNull(SettleContext.getUserSession().getWrkbch()) || StringUtils.isEmpty(SettleContext.getUserSession().getWrkbch().getInr())) {
SettleContext.getUserSession().setWrkbch(SettleContext.getUserSession().getBch());
}
SettleContext.getUserSession().setWrkbch(wrkbch);
Crdgrp crdgrp = crtcroStoreVo.getCrdgrp();
Crdgrp crdgrp = bo.getCrdgrp();
crToolComponent.getref(crdgrp);
return crdgrp.getRec().getOwnref();
}
private SetmodVo buildSetmodVo(CrtcroStoreVo vo) {
SetmodVo setmodVo = new SetmodVo();
return setmodVo;
/**
* source:crtcro.0006.script
*
* @param holPtyInr
* @param serPtyInr
* @param act
* @param cur this.getCrdgrp().getCbs().getMax().getCur()
*/
public void readAct(String holPtyInr, String serPtyInr, Act act, String cur) {
String sql = "SELECT * from act WHERE HOLPTYINR = '" + holPtyInr + "' AND SERPTYINR = '" + serPtyInr + "' AND CUR = '" + cur + "' AND TYP = 'DB'";
List<Act> actList = actMapper.dyncRead(ImmutableBiMap.of("sql", sql));
if (CollectionUtils.isNotEmpty(actList)) {
BeanUtil.copyProperties(actList.get(0), act);
}
}
}
......@@ -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;
......
......@@ -110,8 +110,8 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
@Override
protected void txnSave(FxtssbStoreBo transactionVo) {
ruleMtabutSavN500(transactionVo);
protected void txnSave(FxtssbStoreBo bo) {
ruleMtabutSavN500(bo);
}
public void ruleMtabutSavN500(FxtssbStoreBo bo) {
......@@ -135,15 +135,15 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
}
@Override
protected Map<String, String> txnCheck(FxtssbStoreBo transactionVo) {
return fxtssbValidator.validate(transactionVo);
protected Map<String, String> txnCheck(FxtssbStoreBo bo) {
return fxtssbValidator.validate(bo);
}
@Override
protected BizInfoVo buildBizInfo(FxtssbStoreBo transactionVo) {
protected BizInfoVo buildBizInfo(FxtssbStoreBo bo) {
FxdBizInfoVo bizInfoVo = new FxdBizInfoVo();
bizInfoVo.setObjtyp("FXD");
Fxd rec = transactionVo.getFxdgrp().getRec();
Fxd rec = bo.getFxdgrp().getRec();
bizInfoVo.setObjinr(rec.getInr());
bizInfoVo.setOwnref(rec.getOwnref());
bizInfoVo.setFxtyp(rec.getFxtyp());
......@@ -159,7 +159,7 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
}
@Override
protected BizAmdInfoVo buildBizAmdInfo(FxtssbStoreBo transactionVo) {
protected BizAmdInfoVo buildBizAmdInfo(FxtssbStoreBo bo) {
return null;
}
......@@ -178,7 +178,7 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
bo.getFxdgrp().getCbs().getNom1().setCur(xrtmodService.sysiso());
// MAXAMT = 200000.00
// Systems.setValues(fxtssbStoreVo.getFxdgrp().getRec(), "fxtyp", "SB");
// Systems.setValues(bo.getFxdgrp().getRec(), "fxtyp", "SB");
//结售汇类型 SB:即期结汇
bo.getFxdgrp().getRec().setFxtyp("SB");
String extkey = SettleContext.getUserSession().getUsr().getExtkey();
......@@ -199,107 +199,107 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
}
@Override
public void beforeSave(FxtssbStoreBo transactionVo) {
transactionVo.reset();
Fxdgrp fxdgrp = transactionVo.getFxdgrp();
public void beforeSave(FxtssbStoreBo bo) {
bo.reset();
Fxdgrp fxdgrp = bo.getFxdgrp();
TransactionServiceSet transactionServiceSet = transactionHelpService.getTransactionStoreSet();
transactionServiceSet.setRec(fxdgrp.getRec());
transactionServiceSet.setBlk(fxdgrp.getBlk());
transactionServiceSet.setTransactionVo(transactionVo);
transactionServiceSet.setTransactionVo(bo);
fxToolComponent.collectCbsMap(transactionServiceSet, "", fxdgrp.getCbs(), "max", "nom1", "opn1", "opn2");
fxToolComponent.collectPtsList(transactionServiceSet, fxdgrp, null);
settleContext.loadSettleSession(transactionVo.getTransName(), transactionVo.getUserId(), buildBizInfo(transactionVo), transactionServiceSet.getPtsList());
settleContext.loadSettleSession(bo.getTransName(), bo.getUserId(), buildBizInfo(bo), transactionServiceSet.getPtsList());
}
@Override
protected void updateBizInfoVo(BizInfoVo bizInfoVo, FxtssbStoreBo transactionVo) {
bizInfoVo.setObjinr(transactionVo.getFxdgrp().getRec().getInr());
protected void updateBizInfoVo(BizInfoVo bizInfoVo, FxtssbStoreBo bo) {
bizInfoVo.setObjinr(bo.getFxdgrp().getRec().getInr());
}
/**
* source:fxtssb.0003.script
*/
public void cbsSav(FxtssbStoreBo transactionVo, TrnmodVo trnmodVo) {
public void cbsSav(FxtssbStoreBo bo, TrnmodVo trnmodVo) {
cbsmodService.cbsTrnSetNew("TRN", trnmodVo.getTrn().getInr());
Fxacbs cbs = transactionVo.getFxdgrp().getCbs();
Fxacbs cbs = bo.getFxdgrp().getCbs();
String trninr = transactionHelpService.getTrninr();
trnmodService.cbsTrnStore("MAXAMT", "AMT1", Dates.today(), cbs.getMax().getCur(), cbs.getMax().getAmt(), I18nUtil.getMessage("funds_fxtssb_000000"), transactionVo.getFxdgrp().getRec(), trninr);
trnmodService.cbsTrnStore("MAXAMT", "AMT1", Dates.today(), cbs.getMax().getCur(), cbs.getMax().getAmt(), I18nUtil.getMessage("funds_fxtssb_000000"), bo.getFxdgrp().getRec(), trninr);
if (!MdaUtils.isEmpty(cbs.getNom1().getAmt())) {
trnmodService.cbsTrnStore("NOMAMT", "AMT1", Dates.today(), cbs.getNom1().getCur(), cbs.getNom1().getAmt(), I18nUtil.getMessage("funds_fxtssb_000000"), transactionVo.getFxdgrp().getRec(), trninr);
trnmodService.cbsTrnStore("UTLAMT", "AMT1", Dates.today(), cbs.getMax().getCur(), cbs.getMax().getAmt(), I18nUtil.getMessage("funds_fxtssb_000000"), transactionVo.getFxdgrp().getRec(), trninr);
trnmodService.cbsTrnStore("NOMAMT", "AMT1", Dates.today(), cbs.getNom1().getCur(), cbs.getNom1().getAmt(), I18nUtil.getMessage("funds_fxtssb_000000"), bo.getFxdgrp().getRec(), trninr);
trnmodService.cbsTrnStore("UTLAMT", "AMT1", Dates.today(), cbs.getMax().getCur(), cbs.getMax().getAmt(), I18nUtil.getMessage("funds_fxtssb_000000"), bo.getFxdgrp().getRec(), trninr);
}
}
/**
* source:fxtssb.0022.script
*/
public Map<String, List<String>> defaultAccountsN1000(FxtssbStoreVo fxtssbStoreVo) {
fxtssbStoreVo.reset();
public Map<String, List<String>> defaultAccountsN1000(FxtssbStoreBo bo) {
bo.reset();
String trnTyp = NULLSTR;
String accLst = NULLSTR;
IStream accStm = new StreamImpl();
String acc2Lst = NULLSTR;
IStream acc2Stm = new StreamImpl();
Map<String, List<String>> map = new HashMap();
if (!MdaUtils.isEmpty(fxtssbStoreVo.getFxdgrp().getCbs().getMax().getCur()) && !MdaUtils.isEmpty(fxtssbStoreVo.getFxdgrp().getApl().getPts().getPtyinr())) {
if (!MdaUtils.isEmpty(fxtssbStoreVo.getFxdgrp().getRec().getDsp())) {
trnTyp = fxtssbStoreVo.getFxdgrp().getRec().getDsp();
if (!MdaUtils.isEmpty(bo.getFxdgrp().getCbs().getMax().getCur()) && !MdaUtils.isEmpty(bo.getFxdgrp().getApl().getPts().getPtyinr())) {
if (!MdaUtils.isEmpty(bo.getFxdgrp().getRec().getDsp())) {
trnTyp = bo.getFxdgrp().getRec().getDsp();
if (MdaUtils.compareTo(trnTyp, "CA") == 0) {
trnTyp = "LO-TT2";
}
if (MdaUtils.compareTo(trnTyp, "SP") == 0 || MdaUtils.compareTo(trnTyp, "HA") == 0) {
accLst = glemodService.getAvailAcc(trnTyp, fxtssbStoreVo.getFxdgrp().getCbs().getMax().getCur(), "", fxtssbStoreVo.getFxdgrp().getCbs().getMax().getAmt());
accLst = glemodService.getAvailAcc(trnTyp, bo.getFxdgrp().getCbs().getMax().getCur(), "", bo.getFxdgrp().getCbs().getMax().getAmt());
} else {
accLst = glemodService.getAvailAcc(trnTyp, fxtssbStoreVo.getFxdgrp().getCbs().getMax().getCur(), fxtssbStoreVo.getFxdgrp().getApl().getPts().getPtyinr(), fxtssbStoreVo.getFxdgrp().getCbs().getMax().getAmt());
accLst = glemodService.getAvailAcc(trnTyp, bo.getFxdgrp().getCbs().getMax().getCur(), bo.getFxdgrp().getApl().getPts().getPtyinr(), bo.getFxdgrp().getCbs().getMax().getAmt());
}
// Systems.setValues(fxtssbStoreVo.getFxdgrp().getRec(), "acc", accLst);
// Systems.setValues(bo.getFxdgrp().getRec(), "acc", accLst);
if (StringUtils.isNotEmpty(accLst)) {
String[] split = accLst.split("[\\n]|\\r\\n");
map.put("accLst", new ArrayList<>(Arrays.asList(split)));
}
if (!fxtssbStoreVo.getFxdgrp().getRec().isModified("acc")) {
if (!bo.getFxdgrp().getRec().isModified("acc")) {
if (!MdaUtils.isEmpty(accLst)) {
Streams.streamClear(accStm);
Streams.streamSet(accStm, accLst);
fxtssbStoreVo.getFxdgrp().getRec().setAcc(Strings.getLine(accStm, 1));
bo.getFxdgrp().getRec().setAcc(Strings.getLine(accStm, 1));
}
}
// Systems.setEnabled(fxtssbStoreVo.getFxdgrp().getRec(), "acc");
// Systems.setEnabled(bo.getFxdgrp().getRec(), "acc");
} else {
// Dynamic.disableAndClearField(MdaDriver.getDatafield(fxtssbStoreVo.getFxdgrp().getRec(), "acc"));
fxtssbStoreVo.getFxdgrp().getRec().setAcc(NULLSTR);
// Dynamic.disableAndClearField(MdaDriver.getDatafield(bo.getFxdgrp().getRec(), "acc"));
bo.getFxdgrp().getRec().setAcc(NULLSTR);
}
if (!MdaUtils.isEmpty(fxtssbStoreVo.getFxdgrp().getRec().getDsp2())) {
if (MdaUtils.compareTo(fxtssbStoreVo.getFxdgrp().getRec().getDsp2(), "SP") == 0) {
acc2Lst = glemodService.getAvailAcc(fxtssbStoreVo.getFxdgrp().getRec().getDsp2(), "CNY", "", BigDecimal.ONE);
if (!MdaUtils.isEmpty(bo.getFxdgrp().getRec().getDsp2())) {
if (MdaUtils.compareTo(bo.getFxdgrp().getRec().getDsp2(), "SP") == 0) {
acc2Lst = glemodService.getAvailAcc(bo.getFxdgrp().getRec().getDsp2(), "CNY", "", BigDecimal.ONE);
} else {
acc2Lst = glemodService.getAvailAcc(fxtssbStoreVo.getFxdgrp().getRec().getDsp2(), "CNY", fxtssbStoreVo.getFxdgrp().getApl().getPts().getPtyinr(), BigDecimal.ONE);
acc2Lst = glemodService.getAvailAcc(bo.getFxdgrp().getRec().getDsp2(), "CNY", bo.getFxdgrp().getApl().getPts().getPtyinr(), BigDecimal.ONE);
}
// Systems.setValues(fxtssbStoreVo.getFxdgrp().getRec(), "acc2", acc2Lst);
// Systems.setValues(bo.getFxdgrp().getRec(), "acc2", acc2Lst);
if (StringUtils.isNotEmpty(acc2Lst)) {
String[] split = acc2Lst.split("[\\n]|\\r\\n");
map.put("acc2Lst", new ArrayList<>(Arrays.asList(split)));
}
if (!fxtssbStoreVo.getFxdgrp().getRec().isModified("acc2")) {
if (!bo.getFxdgrp().getRec().isModified("acc2")) {
if (!MdaUtils.isEmpty(acc2Lst)) {
Streams.streamClear(acc2Stm);
Streams.streamSet(acc2Stm, acc2Lst);
fxtssbStoreVo.getFxdgrp().getRec().setAcc2(Strings.getLine(acc2Stm, 1));
bo.getFxdgrp().getRec().setAcc2(Strings.getLine(acc2Stm, 1));
}
}
// Systems.setEnabled(fxtssbStoreVo.getFxdgrp().getRec(), "acc2");
// Systems.setEnabled(bo.getFxdgrp().getRec(), "acc2");
} else {
// Dynamic.disableAndClearField(MdaDriver.getDatafield(fxtssbStoreVo.getFxdgrp().getRec(), "acc2"));
fxtssbStoreVo.getFxdgrp().getRec().setAcc2(NULLSTR);
// Dynamic.disableAndClearField(MdaDriver.getDatafield(bo.getFxdgrp().getRec(), "acc2"));
bo.getFxdgrp().getRec().setAcc2(NULLSTR);
}
}
return map;
}
public String getRef(FxtssbStoreVo fxtssbStoreVo) {
fxtssbStoreVo.reset();
PtsptaVo ptsptaVo = fxtssbStoreVo.getFxdgrp().getApl();
public String getRef(FxtssbStoreBo bo) {
bo.reset();
PtsptaVo ptsptaVo = bo.getFxdgrp().getApl();
if (ptsptaVo == null || StringUtils.isEmpty(ptsptaVo.getPtainr())) {
return NULLSTR;
}
......@@ -311,7 +311,7 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
return NULLSTR;
}
SettleContext.getUserSession().setWrkbch(wrkbch);
Fxdgrp fxdgrp = fxtssbStoreVo.getFxdgrp();
Fxdgrp fxdgrp = bo.getFxdgrp();
fxToolComponent.getref(fxdgrp);
return fxdgrp.getRec().getOwnref();
}
......@@ -325,7 +325,7 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
* fxtp.cshflg 钞汇标志 1:现汇 2:现钞
* fxtp.quoflg Quote Flag
*/
public void defaultRateN1000(FxtssbStoreVo vo) {
public void defaultRateN1000(FxtssbStoreBo vo) {
vo.reset();
String rmbRat = NULLSTR;
BigDecimal buyRat = null;
......@@ -418,7 +418,7 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
}
}
private SetmodVo buildSetmodVo(FxtssbStoreVo vo) {
private SetmodVo buildSetmodVo(FxtssbStoreBo vo) {
SetmodVo setmodVo = new SetmodVo();
Map cbsMap = new HashMap();
Cbb max = vo.getFxdgrp().getCbs().getMax();
......@@ -434,8 +434,8 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
return setmodVo;
}
public void defaultCalculateN1100(FxtssbStoreVo fxtssbStoreVo) {
fxtssbStoreVo.reset();
fxtpService.defaultCalculateN1100(fxtssbStoreVo.getFxdgrp(), fxtssbStoreVo.getFxtp());
public void defaultCalculateN1100(FxtssbStoreBo bo) {
bo.reset();
fxtpService.defaultCalculateN1100(bo.getFxdgrp(), bo.getFxtp());
}
}
......@@ -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;
......
......@@ -24,10 +24,10 @@ 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.FxtsssStoreBo;
import com.brilliance.isc.funds.bo.funds.FxtsssStoreBo;
import com.brilliance.isc.funds.common.component.FxToolComponent;
import com.brilliance.isc.funds.fxtlop.service.FxtpService;
import com.brilliance.isc.funds.fxtsss.check.FxtsssValidator;
import com.brilliance.isc.funds.vo.funds.FxtsssStoreVo;
import com.brilliance.isc.mda.dao.PtyratMapper;
import com.brilliance.isc.vo.funds.FxdBizInfoVo;
import com.brilliance.mda.runtime.mda.IStream;
......@@ -109,8 +109,8 @@ public class FxtsssTransactionServiceImpl extends AbstractTransactionService<Fxt
@Override
protected void txnSave(FxtsssStoreBo transactionVo) {
ruleMtabutSavN500(transactionVo);
protected void txnSave(FxtsssStoreBo bo) {
ruleMtabutSavN500(bo);
}
public void ruleMtabutSavN500(FxtsssStoreBo bo) {
......@@ -144,15 +144,15 @@ public class FxtsssTransactionServiceImpl extends AbstractTransactionService<Fxt
}
@Override
protected Map<String, String> txnCheck(FxtsssStoreBo transactionVo) {
return fxtsssValidator.validate(transactionVo);
protected Map<String, String> txnCheck(FxtsssStoreBo bo) {
return fxtsssValidator.validate(bo);
}
@Override
protected BizInfoVo buildBizInfo(FxtsssStoreBo transactionVo) {
protected BizInfoVo buildBizInfo(FxtsssStoreBo bo) {
FxdBizInfoVo bizInfoVo = new FxdBizInfoVo();
bizInfoVo.setObjtyp("FXD");
Fxd rec = transactionVo.getFxdgrp().getRec();
Fxd rec = bo.getFxdgrp().getRec();
bizInfoVo.setObjinr(rec.getInr());
bizInfoVo.setOwnref(rec.getOwnref());
bizInfoVo.setFxtyp(rec.getFxtyp());
......@@ -168,15 +168,15 @@ public class FxtsssTransactionServiceImpl extends AbstractTransactionService<Fxt
}
@Override
protected BizAmdInfoVo buildBizAmdInfo(FxtsssStoreBo transactionVo) {
protected BizAmdInfoVo buildBizAmdInfo(FxtsssStoreBo bo) {
return null;
}
@Override
public FxtsssStoreBo init(FxtsssStoreBo fxtsssStoreBo) {
fxtsssStoreBo.reset();
init1000(fxtsssStoreBo);
return fxtsssStoreBo;
public FxtsssStoreBo init(FxtsssStoreBo bo) {
bo.reset();
init1000(bo);
return bo;
}
/**
......@@ -186,7 +186,7 @@ public class FxtsssTransactionServiceImpl extends AbstractTransactionService<Fxt
bo.getFxdgrp().getCbs().getNom1().setCur(xrtmodService.sysiso());
// MAXAMT = 200000.00
// Systems.setValues(fxtsssStoreVo.getFxdgrp().getRec(), "fxtyp", "SB");
// Systems.setValues(bo.getFxdgrp().getRec(), "fxtyp", "SB");
//结售汇类型 SS:即期售汇
bo.getFxdgrp().getRec().setFxtyp("SS");
String extkey = SettleContext.getUserSession().getUsr().getExtkey();
......@@ -203,99 +203,98 @@ public class FxtsssTransactionServiceImpl extends AbstractTransactionService<Fxt
}
private void init950(FxtsssStoreBo fxtsssStoreBo) {
private void init950(FxtsssStoreBo bo) {
}
@Override
public void beforeSave(FxtsssStoreBo transactionVo) {
transactionVo.reset();
transactionVo.reset();
Fxdgrp fxdgrp = transactionVo.getFxdgrp();
public void beforeSave(FxtsssStoreBo bo) {
bo.reset();
bo.reset();
Fxdgrp fxdgrp = bo.getFxdgrp();
TransactionServiceSet transactionServiceSet = transactionHelpService.getTransactionStoreSet();
transactionServiceSet.setRec(fxdgrp.getRec());
transactionServiceSet.setBlk(fxdgrp.getBlk());
transactionServiceSet.setTransactionVo(transactionVo);
transactionServiceSet.setTransactionVo(bo);
fxToolComponent.collectCbsMap(transactionServiceSet, "", fxdgrp.getCbs(), "max", "nom1", "opn1", "opn2");
fxToolComponent.collectPtsList(transactionServiceSet, fxdgrp, null);
settleContext.loadSettleSession(transactionVo.getTransName(), transactionVo.getUserId(), buildBizInfo(transactionVo), transactionServiceSet.getPtsList());
settleContext.loadSettleSession(bo.getTransName(), bo.getUserId(), buildBizInfo(bo), transactionServiceSet.getPtsList());
}
@Override
protected void updateBizInfoVo(BizInfoVo bizInfoVo, FxtsssStoreBo transactionVo) {
bizInfoVo.setObjinr(transactionVo.getFxdgrp().getRec().getInr());
protected void updateBizInfoVo(BizInfoVo bizInfoVo, FxtsssStoreBo bo) {
bizInfoVo.setObjinr(bo.getFxdgrp().getRec().getInr());
}
/**
* source:fxtsss.0022.script
*/
public Map<String, List<String>> defaultAccountsN1000(FxtsssStoreVo fxtsssStoreVo) {
fxtsssStoreVo.reset();
public Map<String, List<String>> defaultAccountsN1000(FxtsssStoreBo bo) {
bo.reset();
String trnTyp = NULLSTR;
String accLst = NULLSTR;
IStream accStm = new StreamImpl();
String acc2Lst = NULLSTR;
IStream acc2Stm = new StreamImpl();
Map<String, List<String>> map = new HashMap();
if (!MdaUtils.isEmpty(fxtsssStoreVo.getFxdgrp().getCbs().getMax().getCur()) && !MdaUtils.isEmpty(fxtsssStoreVo.getFxdgrp().getApl().getPts().getPtyinr())) {
if (!MdaUtils.isEmpty(fxtsssStoreVo.getFxdgrp().getRec().getDsp())) {
trnTyp = fxtsssStoreVo.getFxdgrp().getRec().getDsp();
if (!MdaUtils.isEmpty(bo.getFxdgrp().getCbs().getMax().getCur()) && !MdaUtils.isEmpty(bo.getFxdgrp().getApl().getPts().getPtyinr())) {
if (!MdaUtils.isEmpty(bo.getFxdgrp().getRec().getDsp())) {
trnTyp = bo.getFxdgrp().getRec().getDsp();
if (MdaUtils.compareTo(trnTyp, "CA") == 0) {
trnTyp = "LO-TT2";
}
if (MdaUtils.compareTo(trnTyp, "SP") == 0 || MdaUtils.compareTo(trnTyp, "HA") == 0) {
accLst = glemodService.getAvailAcc(trnTyp, fxtsssStoreVo.getFxdgrp().getCbs().getMax().getCur(), "", fxtsssStoreVo.getFxdgrp().getCbs().getMax().getAmt());
accLst = glemodService.getAvailAcc(trnTyp, bo.getFxdgrp().getCbs().getMax().getCur(), "", bo.getFxdgrp().getCbs().getMax().getAmt());
} else {
accLst = glemodService.getAvailAcc(trnTyp, fxtsssStoreVo.getFxdgrp().getCbs().getMax().getCur(), fxtsssStoreVo.getFxdgrp().getApl().getPts().getPtyinr(), fxtsssStoreVo.getFxdgrp().getCbs().getMax().getAmt());
accLst = glemodService.getAvailAcc(trnTyp, bo.getFxdgrp().getCbs().getMax().getCur(), bo.getFxdgrp().getApl().getPts().getPtyinr(), bo.getFxdgrp().getCbs().getMax().getAmt());
}
// Systems.setValues(fxtsssStoreVo.getFxdgrp().getRec(), "acc", accLst);
// Systems.setValues(bo.getFxdgrp().getRec(), "acc", accLst);
if (StringUtils.isNotEmpty(accLst)) {
String[] split = accLst.split("[\\n]|\\r\\n");
map.put("accLst", new ArrayList<>(Arrays.asList(split)));
}
if (!fxtsssStoreVo.getFxdgrp().getRec().isModified("acc")) {
if (!bo.getFxdgrp().getRec().isModified("acc")) {
if (!MdaUtils.isEmpty(accLst)) {
Streams.streamClear(accStm);
Streams.streamSet(accStm, accLst);
fxtsssStoreVo.getFxdgrp().getRec().setAcc(Strings.getLine(accStm, 1));
bo.getFxdgrp().getRec().setAcc(Strings.getLine(accStm, 1));
}
}
// Systems.setEnabled(fxtsssStoreVo.getFxdgrp().getRec(), "acc");
// Systems.setEnabled(bo.getFxdgrp().getRec(), "acc");
} else {
// Dynamic.disableAndClearField(MdaDriver.getDatafield(fxtsssStoreVo.getFxdgrp().getRec(), "acc"));
fxtsssStoreVo.getFxdgrp().getRec().setAcc(NULLSTR);
// Dynamic.disableAndClearField(MdaDriver.getDatafield(bo.getFxdgrp().getRec(), "acc"));
bo.getFxdgrp().getRec().setAcc(NULLSTR);
}
if (!MdaUtils.isEmpty(fxtsssStoreVo.getFxdgrp().getRec().getDsp2())) {
if (MdaUtils.compareTo(fxtsssStoreVo.getFxdgrp().getRec().getDsp2(), "SP") == 0) {
acc2Lst = glemodService.getAvailAcc(fxtsssStoreVo.getFxdgrp().getRec().getDsp2(), "CNY", "", BigDecimal.ONE);
if (!MdaUtils.isEmpty(bo.getFxdgrp().getRec().getDsp2())) {
if (MdaUtils.compareTo(bo.getFxdgrp().getRec().getDsp2(), "SP") == 0) {
acc2Lst = glemodService.getAvailAcc(bo.getFxdgrp().getRec().getDsp2(), "CNY", "", BigDecimal.ONE);
} else {
acc2Lst = glemodService.getAvailAcc(fxtsssStoreVo.getFxdgrp().getRec().getDsp2(), "CNY", fxtsssStoreVo.getFxdgrp().getApl().getPts().getPtyinr(), BigDecimal.ONE);
acc2Lst = glemodService.getAvailAcc(bo.getFxdgrp().getRec().getDsp2(), "CNY", bo.getFxdgrp().getApl().getPts().getPtyinr(), BigDecimal.ONE);
}
// Systems.setValues(fxtsssStoreVo.getFxdgrp().getRec(), "acc2", acc2Lst);
// Systems.setValues(bo.getFxdgrp().getRec(), "acc2", acc2Lst);
if (StringUtils.isNotEmpty(acc2Lst)) {
String[] split = acc2Lst.split("[\\n]|\\r\\n");
map.put("acc2Lst", new ArrayList<>(Arrays.asList(split)));
}
if (!fxtsssStoreVo.getFxdgrp().getRec().isModified("acc2")) {
if (!bo.getFxdgrp().getRec().isModified("acc2")) {
if (!MdaUtils.isEmpty(acc2Lst)) {
Streams.streamClear(acc2Stm);
Streams.streamSet(acc2Stm, acc2Lst);
fxtsssStoreVo.getFxdgrp().getRec().setAcc2(Strings.getLine(acc2Stm, 1));
bo.getFxdgrp().getRec().setAcc2(Strings.getLine(acc2Stm, 1));
}
}
// Systems.setEnabled(fxtsssStoreVo.getFxdgrp().getRec(), "acc2");
// Systems.setEnabled(bo.getFxdgrp().getRec(), "acc2");
} else {
// Dynamic.disableAndClearField(MdaDriver.getDatafield(fxtsssStoreVo.getFxdgrp().getRec(), "acc2"));
fxtsssStoreVo.getFxdgrp().getRec().setAcc2(NULLSTR);
// Dynamic.disableAndClearField(MdaDriver.getDatafield(bo.getFxdgrp().getRec(), "acc2"));
bo.getFxdgrp().getRec().setAcc2(NULLSTR);
}
}
return map;
}
public String getRef(FxtsssStoreVo fxtsssStoreVo) {
fxtsssStoreVo.reset();
PtsptaVo ptsptaVo = fxtsssStoreVo.getFxdgrp().getApl();
public String getRef(FxtsssStoreBo bo) {
bo.reset();
PtsptaVo ptsptaVo = bo.getFxdgrp().getApl();
if (ptsptaVo == null || StringUtils.isEmpty(ptsptaVo.getPtainr())) {
return NULLSTR;
}
......@@ -307,7 +306,7 @@ public class FxtsssTransactionServiceImpl extends AbstractTransactionService<Fxt
return NULLSTR;
}
SettleContext.getUserSession().setWrkbch(wrkbch);
Fxdgrp fxdgrp = fxtsssStoreVo.getFxdgrp();
Fxdgrp fxdgrp = bo.getFxdgrp();
fxToolComponent.getref(fxdgrp);
return fxdgrp.getRec().getOwnref();
}
......@@ -321,8 +320,8 @@ public class FxtsssTransactionServiceImpl extends AbstractTransactionService<Fxt
* fxtp.cshflg 钞汇标志 1:现汇 2:现钞
* fxtp.quoflg Quote Flag
*/
public void defaultRateN1000(FxtsssStoreVo vo) {
vo.reset();
public void defaultRateN1000(FxtsssStoreBo bo) {
bo.reset();
String rmbRat = NULLSTR;
BigDecimal buyRat = null;
BigDecimal selRat = null;
......@@ -335,12 +334,12 @@ public class FxtsssTransactionServiceImpl extends AbstractTransactionService<Fxt
String setCur = NULLSTR;
BigDecimal setAmt = BigDecimal.ZERO;
BigDecimal favRat = BigDecimal.ZERO;
Cbb max = vo.getFxdgrp().getCbs().getMax();
Fxd rec = vo.getFxdgrp().getRec();
Pts pts = vo.getFxdgrp().getApl().getPts();
if (MdaUtils.isEmpty(vo.getFxtp().getQuoflg())
Cbb max = bo.getFxdgrp().getCbs().getMax();
Fxd rec = bo.getFxdgrp().getRec();
Pts pts = bo.getFxdgrp().getApl().getPts();
if (MdaUtils.isEmpty(bo.getFxtp().getQuoflg())
&& !MdaUtils.isEmpty(rec.getFxtyp()) && !MdaUtils.isEmpty(pts.getPtyinr())) {
// Systems.setEnabled(vo.getFxdgrp().getRec(), "rat");
// Systems.setEnabled(bo.getFxdgrp().getRec(), "rat");
Argument<String> rmbRatBox = new Argument<String>();
Argument<BigDecimal> buyRatBox = new Argument<BigDecimal>();
Argument<BigDecimal> selRatBox = new Argument<BigDecimal>();
......@@ -361,14 +360,14 @@ public class FxtsssTransactionServiceImpl extends AbstractTransactionService<Fxt
}
// 如果没有优惠,则根据配置文件来进行优惠
setCur = max.getCur();
SetmodVo setmodVo = buildSetmodVo(vo);
SetmodVo setmodVo = buildSetmodbo(bo);
setAmt = setmodService.getSettlementAmount(setmodVo, setCur);
// 默认都是按照点数优惠
if (MdaUtils.compareTo(setAmt, 0) > 0) {
buyTyp = "1";
selTyp = "1";
/* TODO setusd.ini 未提供 暂时注释
favRat = vo.getFxtp().getFavorRatePoint(setCur, setAmt);
favRat = bo.getFxtp().getFaborRatePoint(setCur, setAmt);
if (MdaUtils.compareTo(favRat, buyPreRat) > 0) {
buyPreRat = favRat;
}
......@@ -378,7 +377,7 @@ public class FxtsssTransactionServiceImpl extends AbstractTransactionService<Fxt
}
if (!rec.isModified("rat")) {
if (MdaUtils.compareTo(Strings.mid(rec.getFxtyp(), 2, 1), "B") == 0) {
if (MdaUtils.compareTo(vo.getFxtp().getCshflg(), "2") == 0) {
if (MdaUtils.compareTo(bo.getFxtp().getCshflg(), "2") == 0) {
rec.setRat(buy1Rat);
} else {
switch (buyTyp) {
......@@ -414,14 +413,14 @@ public class FxtsssTransactionServiceImpl extends AbstractTransactionService<Fxt
}
}
private SetmodVo buildSetmodVo(FxtsssStoreVo vo) {
private SetmodVo buildSetmodbo(FxtsssStoreBo bo) {
SetmodVo setmodVo = new SetmodVo();
Map cbsMap = new HashMap();
Cbb max = vo.getFxdgrp().getCbs().getMax();
Cbb max = bo.getFxdgrp().getCbs().getMax();
cbsMap.put("MAX", max);
setmodVo.setCbsMap(cbsMap);
List<PtsptaVo> ptsList = new ArrayList();
PtsptaVo apl = vo.getFxdgrp().getApl();
PtsptaVo apl = bo.getFxdgrp().getApl();
ptsList.add(apl);
setmodVo.setPtsList(ptsList);
FxdBizInfoVo bizInfoVo = new FxdBizInfoVo();
......@@ -430,8 +429,8 @@ public class FxtsssTransactionServiceImpl extends AbstractTransactionService<Fxt
return setmodVo;
}
public void defaultCalculateN1100(FxtsssStoreVo fxtsssStoreVo) {
fxtsssStoreVo.reset();
fxtpService.defaultCalculateN1100(fxtsssStoreVo.getFxdgrp(), fxtsssStoreVo.getFxtp());
public void defaultCalculateN1100(FxtsssStoreBo bo) {
bo.reset();
fxtpService.defaultCalculateN1100(bo.getFxdgrp(), bo.getFxtp());
}
}
......@@ -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.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();
}
}
......@@ -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