Commit b7ea5ad8 by huangshunlin

汇入/汇出清算

parent 5050b135
...@@ -10,3 +10,4 @@ funds_fxtfop_000000=Foreign Exchange Liquidation ...@@ -10,3 +10,4 @@ funds_fxtfop_000000=Foreign Exchange Liquidation
funds_fxtfcn_CT000009=Foreign Exchange Liquidation funds_fxtfcn_CT000009=Foreign Exchange Liquidation
0136=This contract is overdrawn by {0} 0136=This contract is overdrawn by {0}
funds_crtcri_000000=Clearing in funds_crtcri_000000=Clearing in
funds_crtcr0_000000=付款清算
...@@ -13,3 +13,4 @@ funds_fxtfcn_CT000009=Foreign Exchange Liquidation ...@@ -13,3 +13,4 @@ funds_fxtfcn_CT000009=Foreign Exchange Liquidation
fttfcm=资金拆借到期提示: fttfcm=资金拆借到期提示:
funds_crtcri_000000=Clearing in funds_crtcri_000000=Clearing in
funds_crtcr0_000000=
package com.brilliance.isc.funds.common.component; package com.brilliance.isc.funds.common.component;
import com.brilliance.isc.bo.*; import com.brilliance.isc.bo.*;
import com.brilliance.isc.bo.model.Cracbs; import com.brilliance.isc.bo.model.*;
import com.brilliance.isc.bo.model.Crdgrp;
import com.brilliance.isc.bo.model.Crtmod;
import com.brilliance.isc.common.cbsmod.service.CbsmodService; import com.brilliance.isc.common.cbsmod.service.CbsmodService;
import com.brilliance.isc.common.component.PtsptaToolComponent; import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.context.SettleContext; import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.exception.CommonServiceException; import com.brilliance.isc.common.exception.CommonServiceException;
import com.brilliance.isc.common.sysmod.SysmodService; import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.common.transaction.help.TransactionServiceSet; 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.service.TrnmodService;
import com.brilliance.isc.common.trnmod.vo.TrnmodVo; import com.brilliance.isc.common.trnmod.vo.TrnmodVo;
import com.brilliance.isc.common.util.StringUtils; import com.brilliance.isc.common.util.StringUtils;
import com.brilliance.isc.common.util.Utils; import com.brilliance.isc.common.util.Utils;
import com.brilliance.isc.common.vo.PtsptaVo; import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.mda.dao.BchMapper; import com.brilliance.isc.mda.dao.*;
import com.brilliance.isc.mda.dao.CrdMapper;
import com.brilliance.isc.vo.TrncodVo; import com.brilliance.isc.vo.TrncodVo;
import com.brilliance.mda.runtime.mda.Constants; import com.brilliance.mda.runtime.mda.Constants;
import com.brilliance.mda.runtime.mda.IStream; import com.brilliance.mda.runtime.mda.IStream;
...@@ -28,9 +26,9 @@ import com.brilliance.mda.runtime.mda.util.Streams; ...@@ -28,9 +26,9 @@ import com.brilliance.mda.runtime.mda.util.Streams;
import com.brilliance.mda.runtime.mda.util.Strings; import com.brilliance.mda.runtime.mda.util.Strings;
import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableBiMap;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.*; import java.util.*;
...@@ -46,25 +44,58 @@ import static com.brilliance.mda.runtime.mda.Constants.NULLSTR; ...@@ -46,25 +44,58 @@ import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Component @Component
public class CrToolComponent { public class CrToolComponent {
@Autowired @Resource
private CrdMapper crdMapper; private CrdMapper crdMapper;
@Autowired @Resource
private PtsptaToolComponent ptsptaToolComponent; private PtsptaToolComponent ptsptaToolComponent;
@Autowired @Resource
private CbsmodService cbsmodService; private CbsmodService cbsmodService;
@Autowired @Resource
private SysmodService sysmodService; private SysmodService sysmodService;
@Autowired @Resource
private TrnmodService trnmodService; private TrnmodService trnmodService;
@Autowired @Resource
private BchMapper bchMapper; 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) { public Crdgrp getCrdgrpByInr(String inr) {
Crd rec = new Crd(); Crd rec = new Crd();
rec.setInr(inr); rec.setInr(inr);
...@@ -238,7 +269,7 @@ public class CrToolComponent { ...@@ -238,7 +269,7 @@ public class CrToolComponent {
/** /**
* source:crtmod.0003.script * source:crtmod.0003.script
*/ */
public void saveClearingEntry(Crtmod crtmod, TrnmodVo trnmodVo) { public void saveClearingEntry(Crtmod crtmod, TrnmodVo trnmodVo, BaseTransactionVo bo) {
trnmodVo.reset(); trnmodVo.reset();
crtmod.reset(); crtmod.reset();
// 根据AutoRegistration创造 // 根据AutoRegistration创造
...@@ -247,7 +278,7 @@ public class CrToolComponent { ...@@ -247,7 +278,7 @@ public class CrToolComponent {
return; return;
} }
//crdgrp //crdgrp
Crdgrp argGrp = crtmod.getCrdgrp(); Crdgrp argGrp = Utils.getFieldValue(bo,"crdgrp");
String argGrpPath = Strings.getLine(parstm, 1); String argGrpPath = Strings.getLine(parstm, 1);
String argFrm = Strings.getLine(parstm, 2); String argFrm = Strings.getLine(parstm, 2);
String argTxt = Strings.getLine(parstm, 3); String argTxt = Strings.getLine(parstm, 3);
...@@ -321,4 +352,149 @@ public class CrToolComponent { ...@@ -321,4 +352,149 @@ public class CrToolComponent {
Streams.streamInsert(parstm, 0, argTxt); 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; ...@@ -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.setmod.vo.SetmodVo;
import com.brilliance.isc.common.vo.PtsptaVo; import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.crtcri.service.CrtcriTransactionServiceImpl; 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.isc.vo.funds.CrdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.MdaUtils; import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Objects;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR; import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
...@@ -46,7 +47,11 @@ public class CrtcriSettleRegister implements ISettleRegister { ...@@ -46,7 +47,11 @@ public class CrtcriSettleRegister implements ISettleRegister {
@Resource(name = "crtcri.transaction") @Resource(name = "crtcri.transaction")
CrtcriTransactionServiceImpl fxtsssTransactionService; CrtcriTransactionServiceImpl crtcriTransactionService;
@Autowired
private ActMapper actMapper;
@Override @Override
public void registerSettlement(SetmodVo setmodVo) { public void registerSettlement(SetmodVo setmodVo) {
...@@ -71,14 +76,12 @@ public class CrtcriSettleRegister implements ISettleRegister { ...@@ -71,14 +76,12 @@ public class CrtcriSettleRegister implements ISettleRegister {
String rol = NULLSTR; String rol = NULLSTR;
List<PtsptaVo> ptsList = setmodVo.getPtsList(); List<PtsptaVo> ptsList = setmodVo.getPtsList();
if (CollectionUtils.isNotEmpty(ptsList)) {
// if (this.getCrdgrp().getAcc().isRolSet()) { // if (this.getCrdgrp().getAcc().isRolSet()) {
if (ptsptaToolComponent.ptsIsRolSet(ptsList, "ACC")) { if (ptsptaToolComponent.ptsIsRolSet(ptsList, "ACC")) {
rol = "ACC"; rol = "ACC";
} else { } else {
rol = "SND"; rol = "SND";
} }
}
String dbtKey = setmodService.setGlgAmt(setmodVo, "TRN", rol, setmodVo.getDoccur(), maxAmt, ""); String dbtKey = setmodService.setGlgAmt(setmodVo, "TRN", rol, setmodVo.getDoccur(), maxAmt, "");
if (!MdaUtils.isEmpty(rec.getForare())) { if (!MdaUtils.isEmpty(rec.getForare())) {
...@@ -86,18 +89,22 @@ public class CrtcriSettleRegister implements ISettleRegister { ...@@ -86,18 +89,22 @@ public class CrtcriSettleRegister implements ISettleRegister {
} else { } else {
// this.getTrnmod().getTrnism().setDefDsp(rol, "D", "NOD" + CR + "VOD"); // 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.isEmpty(rec.getRcvactInr()) && !MdaUtils.isEmpty(rec.getRcvbchinr())) {
if (MdaUtils.compareTo(rec.getCustyp(), "1") == 0) { if (MdaUtils.compareTo(rec.getCustyp(), "1") == 0) {
// 对私 // 对私
rcvact = fxtsssTransactionService.readClearingAct("SP-RIP", rec.getRcvbchinr(), maxCur); rcvact = crtcriTransactionService.readClearingAct("SP-RIP", rec.getRcvbchinr(), maxCur);
} else { } 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(), String cdtKey = setglgService.setglgAddAmount(setglg, "TRN", "OWN", setmodVo.getDoccur(), maxAmt.negate(),
"", "SPC", "A", rcvact.getExtkey(), ""); "", "SPC", "A", act, "");
setmodVo.setFeeclirol(rol); setmodVo.setFeeclirol(rol);
setmodService.setglgAllValDat(setmodVo, rec.getOpndat(), "D"); setmodService.setglgAllValDat(setmodVo, rec.getOpndat(), "D");
} }
......
...@@ -2,11 +2,13 @@ package com.brilliance.isc.funds.crtcri.resource; ...@@ -2,11 +2,13 @@ package com.brilliance.isc.funds.crtcri.resource;
import com.brilliance.isc.common.context.SettleContext; import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController; 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.crtcri.service.CrtcriTransactionServiceImpl;
import com.brilliance.isc.funds.transfer.transaction.CrtcriStructMapper; import com.brilliance.isc.funds.transfer.transaction.CrtcriStructMapper;
import com.brilliance.isc.funds.vo.funds.CrtcriStoreVo; import com.brilliance.isc.funds.vo.funds.CrtcriStoreVo;
import com.brilliance.isc.transfer.IStructMapper; import com.brilliance.isc.transfer.IStructMapper;
import com.brilliance.isc.vo.ResponseSet; import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.mda.runtime.mda.CodetableItem;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
* @program: isc-funds * @program: isc-funds
...@@ -49,10 +52,21 @@ public class CrtcriResource extends AbstractTransactionController<CrtcriStoreVo> ...@@ -49,10 +52,21 @@ public class CrtcriResource extends AbstractTransactionController<CrtcriStoreVo>
*/ */
@PostMapping("/getRef") @PostMapping("/getRef")
public ResponseSet<String> getRef(@RequestBody CrtcriStoreVo crtcriStoreVo) { 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 ResponseSet.simpleSuccess(ref);
} }
/**
* 获取业务经办机构
*
* @return
*/
@PostMapping("/getBranchCodeValue")
public Object getBranchCodeValue() {
List<CodetableItem> list = crtcriTransactionService.getBranchCodeValue();
return ResponseSet.simpleSuccess(list);
}
} }
package com.brilliance.isc.funds.crtcri.service;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import java.util.List;
import java.util.Map;
/**
* @program: isc-funds
* @ClassName: CrtpService
* @description: crtp清算 公共方法
* @author: huangshunlin
* @create: 2024-10-22 11:24
*/
public interface CrtpService {
void defaultCrdgrpRecOwnusrN1000(BaseTransactionVo bo);
void defaultClearingN1000(BaseTransactionVo bo);
List<Map<String, Object>> setBranchCodeValue();
}
package com.brilliance.isc.funds.crtcri.service.impl;
import com.brilliance.isc.bo.model.Crdgrp;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.common.util.Utils;
import com.brilliance.isc.funds.crtcri.service.CrtpService;
import com.brilliance.isc.mda.dao.PublicMapper;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.google.common.collect.ImmutableBiMap;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* @program: isc-funds
* @ClassName: CrtpServiceImpl
* @description: crtp 清算 公共方法
* @author: huangshunlin
* @create: 2024-10-22 11:25
*/
@Service
public class CrtpServiceImpl implements CrtpService {
@Resource
private SysmodService sysmodService;
@Resource
private PublicMapper publicMapper;
/**
* source:crtp.0002.script
*/
// @Default(target="crdgrp.rec.ownusr",order=1000)
public void defaultCrdgrpRecOwnusrN1000(BaseTransactionVo bo) {
Crdgrp crdgrp = Utils.getFieldValue(bo, "crdgrp");
if (Objects.isNull(crdgrp)) {
return;
}
//! Set OWNUSR if not already set
if (MdaUtils.isEmpty(crdgrp.getRec().getOwnusr())) {
crdgrp.getRec().setOwnusr(SettleContext.getUserSession().getUsr().getExtkey());
}
}
/**
* source:crtp.0007.script
*/
// @Default(value={"crdgrp.rec.clrtyp","crdgrp.rec.trntyp"},order=1000)
public void defaultClearingN1000(BaseTransactionVo bo) {
Crdgrp crdgrp = Utils.getFieldValue(bo, "crdgrp");
if (Objects.isNull(crdgrp)) {
return;
}
// 给汇入清算/汇出清算赋值的清算类型赋值
if (MdaUtils.isEmpty(crdgrp.getRec().getClrtyp())) {
if (sysmodService.sptIsRimLoaded(bo.getSpt().getSta())) {
// 从Register队列进的全部是汇出清算
crdgrp.getRec().setClrtyp("O");
// 自动清算
crdgrp.getRec().setTrntyp("A");
} else {
if (sysmodService.sptIsIncLoaded(bo.getSpt().getSta())) {
// 从Incoming队列进的全部是汇入清算
crdgrp.getRec().setClrtyp("I");
// 自动清算
crdgrp.getRec().setTrntyp("A");
} else {
// 其他情况,根据交易名称判断
if (MdaUtils.compareTo(SettleContext.getTransName(), "CRTCRO") == 0) {
crdgrp.getRec().setClrtyp("O");
} else {
crdgrp.getRec().setClrtyp("I");
}
// 手工清算
crdgrp.getRec().setTrntyp("M");
}
}
}
}
/**
* source:crtp.0006.script
*/
public List<Map<String, Object>> setBranchCodeValue() {
//########################
//!初始化实体机构
//########################
String ety = SettleContext.getUserEty().getExtkey();
String sql = "SELECT INR as val , BRANCH||BCHNAME as txt FROM BCH WHERE bchtyp = '1' AND ETYEXTKEY='" + ety + "'";
// String sql = "SELECT INR as val , BRANCH||BCHNAME as txt FROM BCH WHERE wrkflg = 'X' AND ETYEXTKEY='" + ety + "'";
List<Map<String, Object>> list = publicMapper.dyncQueryMapList(ImmutableBiMap.of("sql", sql));
return list;
}
}
package com.brilliance.isc.funds.crtcro.register.settle; 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.component.PtsptaToolComponent;
import com.brilliance.isc.common.register.settle.DefaultSettleRegister; import com.brilliance.isc.common.register.settle.DefaultSettleRegister;
import com.brilliance.isc.common.register.settle.ISettleRegister; import com.brilliance.isc.common.register.settle.ISettleRegister;
...@@ -11,13 +10,12 @@ import com.brilliance.isc.common.setmod.vo.SetmodVo; ...@@ -11,13 +10,12 @@ import com.brilliance.isc.common.setmod.vo.SetmodVo;
import com.brilliance.isc.common.vo.PtsptaVo; import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.crtcro.service.CrtcroTransactionServiceImpl; import com.brilliance.isc.funds.crtcro.service.CrtcroTransactionServiceImpl;
import com.brilliance.isc.vo.funds.CrdBizInfoVo; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
import java.util.List; import java.util.List;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR; import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
...@@ -55,9 +53,43 @@ public class CrtcroSettleRegister implements ISettleRegister { ...@@ -55,9 +53,43 @@ public class CrtcroSettleRegister implements ISettleRegister {
} }
/** /**
* source:crtcro.0009.script * source:crtcro.0002.script
*/ */
private void transRegister(SetmodVo setmodVo) { 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; ...@@ -2,6 +2,7 @@ package com.brilliance.isc.funds.crtcro.resource;
import com.brilliance.isc.common.context.SettleContext; import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController; 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.crtcro.service.CrtcroTransactionServiceImpl;
import com.brilliance.isc.funds.transfer.transaction.CrtcroStructMapper; import com.brilliance.isc.funds.transfer.transaction.CrtcroStructMapper;
import com.brilliance.isc.funds.vo.funds.CrtcroStoreVo; import com.brilliance.isc.funds.vo.funds.CrtcroStoreVo;
...@@ -49,7 +50,8 @@ public class CrtcroResource extends AbstractTransactionController<CrtcroStoreVo> ...@@ -49,7 +50,8 @@ public class CrtcroResource extends AbstractTransactionController<CrtcroStoreVo>
*/ */
@PostMapping("/getRef") @PostMapping("/getRef")
public ResponseSet<String> getRef(@RequestBody CrtcroStoreVo crtcroStoreVo) { 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); return ResponseSet.simpleSuccess(ref);
} }
......
...@@ -2,6 +2,7 @@ package com.brilliance.isc.funds.fxtssb.resource; ...@@ -2,6 +2,7 @@ package com.brilliance.isc.funds.fxtssb.resource;
import com.brilliance.isc.common.context.SettleContext; import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController; 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.fxtssb.service.FxtssbTransactionServiceImpl;
import com.brilliance.isc.funds.transfer.transaction.FxtssbStructMapper; import com.brilliance.isc.funds.transfer.transaction.FxtssbStructMapper;
import com.brilliance.isc.funds.vo.funds.FxtssbStoreVo; import com.brilliance.isc.funds.vo.funds.FxtssbStoreVo;
...@@ -52,7 +53,8 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo> ...@@ -52,7 +53,8 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo>
*/ */
@PostMapping("/getRef") @PostMapping("/getRef")
public ResponseSet<String> getRef(@RequestBody FxtssbStoreVo fxtssbStoreVo) { 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); return ResponseSet.simpleSuccess(ref);
} }
...@@ -60,7 +62,8 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo> ...@@ -60,7 +62,8 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo>
public ResponseSet defaultAccountsN1000(@RequestBody FxtssbStoreVo fxtssbStoreVo) { public ResponseSet defaultAccountsN1000(@RequestBody FxtssbStoreVo fxtssbStoreVo) {
try { try {
settleContext.loadSettleSession("FXTSSB","",""); 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); ResponseSet success = ResponseSet.simpleSuccess(fxtssbStoreVo);
success.setCodeSet(codeSet); success.setCodeSet(codeSet);
return success; return success;
...@@ -75,7 +78,8 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo> ...@@ -75,7 +78,8 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo>
public ResponseSet defaultRateN1000(@RequestBody FxtssbStoreVo fxtssbStoreVo) { public ResponseSet defaultRateN1000(@RequestBody FxtssbStoreVo fxtssbStoreVo) {
try { try {
settleContext.loadSettleSession("FXTSSB","",""); settleContext.loadSettleSession("FXTSSB","","");
fxtssbTransactionService.defaultRateN1000(fxtssbStoreVo); FxtssbStoreBo fxtssbStoreBo = fxtssbStructMapper.voTransferToBo(fxtssbStoreVo);
fxtssbTransactionService.defaultRateN1000(fxtssbStoreBo);
return ResponseSet.simpleSuccess(fxtssbStoreVo); return ResponseSet.simpleSuccess(fxtssbStoreVo);
} catch (Exception e) { } catch (Exception e) {
throw e; throw e;
...@@ -89,7 +93,8 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo> ...@@ -89,7 +93,8 @@ public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo>
public ResponseSet defaultCalculateN1100(@RequestBody FxtssbStoreVo fxtssbStoreVo) { public ResponseSet defaultCalculateN1100(@RequestBody FxtssbStoreVo fxtssbStoreVo) {
try { try {
settleContext.loadSettleSession("FXTSSB","",""); settleContext.loadSettleSession("FXTSSB","","");
fxtssbTransactionService.defaultCalculateN1100(fxtssbStoreVo); FxtssbStoreBo fxtssbStoreBo = fxtssbStructMapper.voTransferToBo(fxtssbStoreVo);
fxtssbTransactionService.defaultCalculateN1100(fxtssbStoreBo);
return ResponseSet.simpleSuccess(fxtssbStoreVo); return ResponseSet.simpleSuccess(fxtssbStoreVo);
} catch (Exception e) { } catch (Exception e) {
throw e; throw e;
......
...@@ -2,6 +2,7 @@ package com.brilliance.isc.funds.fxtsss.resource; ...@@ -2,6 +2,7 @@ package com.brilliance.isc.funds.fxtsss.resource;
import com.brilliance.isc.common.context.SettleContext; import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController; 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.fxtsss.service.FxtsssTransactionServiceImpl;
import com.brilliance.isc.funds.transfer.transaction.FxtsssStructMapper; import com.brilliance.isc.funds.transfer.transaction.FxtsssStructMapper;
import com.brilliance.isc.funds.vo.funds.FxtsssStoreVo; import com.brilliance.isc.funds.vo.funds.FxtsssStoreVo;
...@@ -51,7 +52,8 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo> ...@@ -51,7 +52,8 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo>
*/ */
@PostMapping("/getRef") @PostMapping("/getRef")
public ResponseSet<String> getRef(@RequestBody FxtsssStoreVo fxtsssStoreVo) { 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); return ResponseSet.simpleSuccess(ref);
} }
...@@ -59,7 +61,8 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo> ...@@ -59,7 +61,8 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo>
public ResponseSet defaultAccountsN1000(@RequestBody FxtsssStoreVo fxtsssStoreVo) { public ResponseSet defaultAccountsN1000(@RequestBody FxtsssStoreVo fxtsssStoreVo) {
try { try {
settleContext.loadSettleSession("FXTSSS", "", ""); 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); ResponseSet success = ResponseSet.simpleSuccess(fxtsssStoreVo);
success.setCodeSet(codeSet); success.setCodeSet(codeSet);
return success; return success;
...@@ -74,7 +77,8 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo> ...@@ -74,7 +77,8 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo>
public ResponseSet defaultRateN1000(@RequestBody FxtsssStoreVo fxtsssStoreVo) { public ResponseSet defaultRateN1000(@RequestBody FxtsssStoreVo fxtsssStoreVo) {
try { try {
settleContext.loadSettleSession("FXTSSS", "", ""); settleContext.loadSettleSession("FXTSSS", "", "");
fxtsssTransactionService.defaultRateN1000(fxtsssStoreVo); FxtsssStoreBo fxtsssStoreBo = fxtsssStructMapper.voTransferToBo(fxtsssStoreVo);
fxtsssTransactionService.defaultRateN1000(fxtsssStoreBo);
return ResponseSet.simpleSuccess(fxtsssStoreVo); return ResponseSet.simpleSuccess(fxtsssStoreVo);
} catch (Exception e) { } catch (Exception e) {
throw e; throw e;
...@@ -88,7 +92,8 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo> ...@@ -88,7 +92,8 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo>
public ResponseSet defaultCalculateN1100(@RequestBody FxtsssStoreVo fxtsssStoreVo) { public ResponseSet defaultCalculateN1100(@RequestBody FxtsssStoreVo fxtsssStoreVo) {
try { try {
settleContext.loadSettleSession("FXTSSS", "", ""); settleContext.loadSettleSession("FXTSSS", "", "");
fxtsssTransactionService.defaultCalculateN1100(fxtsssStoreVo); FxtsssStoreBo fxtsssStoreBo = fxtsssStructMapper.voTransferToBo(fxtsssStoreVo);
fxtsssTransactionService.defaultCalculateN1100(fxtsssStoreBo);
return ResponseSet.simpleSuccess(fxtsssStoreVo); return ResponseSet.simpleSuccess(fxtsssStoreVo);
} catch (Exception e) { } catch (Exception e) {
throw e; throw e;
......
...@@ -4,7 +4,7 @@ import com.brilliance.isc.bo.Act; ...@@ -4,7 +4,7 @@ import com.brilliance.isc.bo.Act;
import com.brilliance.isc.bo.Smh; import com.brilliance.isc.bo.Smh;
import com.brilliance.isc.bo.Spt; import com.brilliance.isc.bo.Spt;
import com.brilliance.isc.bo.model.*; 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.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data; import lombok.Data;
......
...@@ -4,8 +4,8 @@ import com.brilliance.isc.bo.Act; ...@@ -4,8 +4,8 @@ import com.brilliance.isc.bo.Act;
import com.brilliance.isc.bo.Gle; import com.brilliance.isc.bo.Gle;
import com.brilliance.isc.bo.Smh; import com.brilliance.isc.bo.Smh;
import com.brilliance.isc.bo.Trn; import com.brilliance.isc.bo.Trn;
import com.brilliance.isc.bo.model.Crdgrp; import com.brilliance.isc.bo.model.*;
import com.brilliance.isc.bo.model.Crtmod; import com.brilliance.isc.common.nosmod.bo.Nosmod;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo; import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
...@@ -62,6 +62,8 @@ public class CrtcroStoreBo extends BaseTransactionVo { ...@@ -62,6 +62,8 @@ public class CrtcroStoreBo extends BaseTransactionVo {
private Crdgrp crdgrp; private Crdgrp crdgrp;
private Crtp crtp;
private Crtmod crtmod; private Crtmod crtmod;
private Trn cretrn; private Trn cretrn;
...@@ -73,6 +75,13 @@ public class CrtcroStoreBo extends BaseTransactionVo { ...@@ -73,6 +75,13 @@ public class CrtcroStoreBo extends BaseTransactionVo {
private Gle spcgle; private Gle spcgle;
private Act pacact; private Act pacact;
private Cpdgrp cpdgrp;
private Gidgrp gidgrp;
private Bcdgrp bcdgrp;
private Brdgrp brdgrp;
private Lidgrp lidgrp;
private Nosmod nosmod;
@Override @Override
public void reset() { public void reset() {
...@@ -81,6 +90,10 @@ public class CrtcroStoreBo extends BaseTransactionVo { ...@@ -81,6 +90,10 @@ public class CrtcroStoreBo extends BaseTransactionVo {
crdgrp = new Crdgrp(); crdgrp = new Crdgrp();
} }
crdgrp.reset(); crdgrp.reset();
if (crtp == null) {
crtp = new Crtp();
}
crtp.reset();
if (crtmod == null) { if (crtmod == null) {
crtmod = new Crtmod(); crtmod = new Crtmod();
...@@ -104,5 +117,31 @@ public class CrtcroStoreBo extends BaseTransactionVo { ...@@ -104,5 +117,31 @@ public class CrtcroStoreBo extends BaseTransactionVo {
if (pacact == null) { if (pacact == null) {
pacact = new Act(); 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; package com.brilliance.isc.funds.vo.funds;
import com.brilliance.isc.bo.Act;
import com.brilliance.isc.bo.Smh; import com.brilliance.isc.bo.Smh;
import com.brilliance.isc.bo.Spt; import com.brilliance.isc.bo.SptVo;
import com.brilliance.isc.bo.model.Cpdgrp; import com.brilliance.isc.common.nosmod.vo.NosmodVo;
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.common.transaction.vo.BaseTransactionVo; 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.brilliance.isc.vo.model.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data; import lombok.Data;
...@@ -30,21 +29,21 @@ public class CrtcriStoreVo extends BaseTransactionVo { ...@@ -30,21 +29,21 @@ public class CrtcriStoreVo extends BaseTransactionVo {
//Object Type of Associated Contract Optional (max=6) //Object Type of Associated Contract Optional (max=6)
private String rcvobjtyp = NULLSTR; private String rcvobjtyp = NULLSTR;
private Crdgrp crdgrp; private CrdgrpVo crdgrp;
private Crtp crtp; private CrtpVo crtp;
private Smh smh; private Smh smh;
private Smh corsmh; 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; private Bodgrp bodgrp;
...@@ -66,19 +65,19 @@ public class CrtcriStoreVo extends BaseTransactionVo { ...@@ -66,19 +65,19 @@ public class CrtcriStoreVo extends BaseTransactionVo {
// private Cldgrp cldgrp; // private Cldgrp cldgrp;
private Cpdgrp cpdgrp; private CpdgrpVo cpdgrp;
private Nosmod nosmod; private NosmodVo nosmod;
@Override @Override
public void reset() { public void reset() {
super.reset(); super.reset();
if (crdgrp == null) { if (crdgrp == null) {
crdgrp = new Crdgrp(); crdgrp = new CrdgrpVo();
} }
crdgrp.reset(); crdgrp.reset();
if (crtp == null) { if (crtp == null) {
crtp = new Crtp(); crtp = new CrtpVo();
} }
crtp.reset(); crtp.reset();
...@@ -89,19 +88,19 @@ public class CrtcriStoreVo extends BaseTransactionVo { ...@@ -89,19 +88,19 @@ public class CrtcriStoreVo extends BaseTransactionVo {
corsmh = new Smh(); corsmh = new Smh();
} }
if (sndact == null) { if (sndact == null) {
sndact = new Act(); sndact = new ActVo();
} }
if (aplact == null) { if (aplact == null) {
aplact = new Act(); aplact = new ActVo();
} }
if (rcvact == null) { if (rcvact == null) {
rcvact = new Act(); rcvact = new ActVo();
} }
if (crtspt == null) { if (crtspt == null) {
crtspt = new Spt(); crtspt = new SptVo();
} }
if (bodgrp == null) { if (bodgrp == null) {
...@@ -137,12 +136,12 @@ public class CrtcriStoreVo extends BaseTransactionVo { ...@@ -137,12 +136,12 @@ public class CrtcriStoreVo extends BaseTransactionVo {
} }
gidgrp.reset(); gidgrp.reset();
if (cpdgrp == null) { if (cpdgrp == null) {
cpdgrp = new Cpdgrp(); cpdgrp = new CpdgrpVo();
} }
cpdgrp.reset(); cpdgrp.reset();
// private Cldgrp cldgrp; // private Cldgrp cldgrp;
if (nosmod == null) { if (nosmod == null) {
nosmod = new Nosmod(); nosmod = new NosmodVo();
} }
nosmod.reset(); nosmod.reset();
} }
......
package com.brilliance.isc.funds.vo.funds; 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.Smh;
import com.brilliance.isc.bo.Trn; import com.brilliance.isc.bo.model.Cpdgrp;
import com.brilliance.isc.bo.model.Crdgrp; import com.brilliance.isc.common.nosmod.vo.NosmodVo;
import com.brilliance.isc.bo.model.Crtmod;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo; 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.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data; import lombok.Data;
...@@ -60,35 +67,41 @@ public class CrtcroStoreVo extends BaseTransactionVo { ...@@ -60,35 +67,41 @@ public class CrtcroStoreVo extends BaseTransactionVo {
//Status I-INCOMING, O-OUTGOING, N-NOTNEED (max=1) //Status I-INCOMING, O-OUTGOING, N-NOTNEED (max=1)
private String clrsta = NULLSTR; 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 cresmh;
private Smh bndsmh; 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 @Override
public void reset() { public void reset() {
super.reset(); super.reset();
if (crdgrp == null) { if (crdgrp == null) {
crdgrp = new Crdgrp(); crdgrp = new CrdgrpVo();
} }
crdgrp.reset(); crdgrp.reset();
if (crtmod == null) { if (crtmod == null) {
crtmod = new Crtmod(); crtmod = new CrtmodVo();
} }
crtmod.reset(); crtmod.reset();
if (cretrn == null) { if (cretrn == null) {
cretrn = new Trn(); cretrn = new TrnVo();
} }
if (cresmh == null) { if (cresmh == null) {
...@@ -99,10 +112,35 @@ public class CrtcroStoreVo extends BaseTransactionVo { ...@@ -99,10 +112,35 @@ public class CrtcroStoreVo extends BaseTransactionVo {
bndsmh = new Smh(); bndsmh = new Smh();
} }
if (spcgle == null) { if (spcgle == null) {
spcgle = new Gle(); spcgle = new GleVo();
} }
if (pacact == null) { 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; ...@@ -3,6 +3,8 @@ package com.brilliance.isc.funds.vo.funds;
import com.brilliance.isc.bo.model.Fxdgrp; import com.brilliance.isc.bo.model.Fxdgrp;
import com.brilliance.isc.bo.model.Fxtp; import com.brilliance.isc.bo.model.Fxtp;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo; 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 com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data; import lombok.Data;
...@@ -17,20 +19,20 @@ import lombok.Data; ...@@ -17,20 +19,20 @@ import lombok.Data;
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
public class FxtssbStoreVo extends BaseTransactionVo { public class FxtssbStoreVo extends BaseTransactionVo {
private Fxdgrp fxdgrp; private FxdgrpVo fxdgrp;
private Fxtp fxtp; private FxtpVo fxtp;
@Override @Override
public void reset() { public void reset() {
super.reset(); super.reset();
if (fxdgrp == null) { if (fxdgrp == null) {
fxdgrp = new Fxdgrp(); fxdgrp = new FxdgrpVo();
} }
fxdgrp.reset(); fxdgrp.reset();
if (fxtp == null) { if (fxtp == null) {
fxtp = new Fxtp(); fxtp = new FxtpVo();
} }
fxtp.reset(); fxtp.reset();
} }
......
package com.brilliance.isc.funds.vo.funds; 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.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 com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data; import lombok.Data;
...@@ -16,20 +16,20 @@ import lombok.Data; ...@@ -16,20 +16,20 @@ import lombok.Data;
@Data @Data
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
public class FxtsssStoreVo extends BaseTransactionVo { public class FxtsssStoreVo extends BaseTransactionVo {
private Fxdgrp fxdgrp; private FxdgrpVo fxdgrp;
private Fxtp fxtp; private FxtpVo fxtp;
@Override @Override
public void reset() { public void reset() {
super.reset(); super.reset();
if (fxdgrp == null) { if (fxdgrp == null) {
fxdgrp = new Fxdgrp(); fxdgrp = new FxdgrpVo();
} }
fxdgrp.reset(); fxdgrp.reset();
if (fxtp == null) { if (fxtp == null) {
fxtp = new Fxtp(); fxtp = new FxtpVo();
} }
fxtp.reset(); 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