Commit 2e3f178e by zhoujunpeng

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

parent 14b549a0
package com.brilliance.isc.funds.basesel.trncod.service.impl; package com.brilliance.isc.funds.basesel.trncod.service.impl;
import com.brilliance.isc.bo.Busbtn;
import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.bo.Trn;
import com.brilliance.isc.bo.model.Cpdgrp;
//import com.brilliance.isc.bo.remit.CptadvStoreBo;
//import com.brilliance.isc.bo.remit.CptopnStoreBo;
import com.brilliance.isc.bo.model.Ftdgrp; import com.brilliance.isc.bo.model.Ftdgrp;
import com.brilliance.isc.common.cbsmod.service.CbsmodService; import com.brilliance.isc.common.cbsmod.service.CbsmodService;
//import com.brilliance.isc.common.component.CpToolComponent;
import com.brilliance.isc.common.sysmod.SysmodService; import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.funds.basesel.common.FtToolComponent; import com.brilliance.isc.funds.common.component.FtToolComponent;
import com.brilliance.isc.funds.basesel.trncod.consts.ErrorPrompt;
import com.brilliance.isc.funds.basesel.trncod.service.TrncodService; import com.brilliance.isc.funds.basesel.trncod.service.TrncodService;
import com.brilliance.isc.mda.dao.BusbtnMapper; import com.brilliance.isc.mda.dao.BusbtnMapper;
import com.brilliance.isc.mda.dao.TrnMapper; import com.brilliance.isc.mda.dao.TrnMapper;
import com.brilliance.isc.vo.TrnCodeQueryVo; import com.brilliance.isc.vo.TrnCodeQueryVo;
import com.brilliance.isc.vo.TrncodVo; import com.brilliance.isc.vo.TrncodVo;
import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import org.checkerframework.checker.units.qual.C;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
@Service @Service
public class TrncodServiceImpl implements TrncodService { public class TrncodServiceImpl implements TrncodService {
...@@ -52,7 +39,7 @@ public class TrncodServiceImpl implements TrncodService { ...@@ -52,7 +39,7 @@ public class TrncodServiceImpl implements TrncodService {
public List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo) { public List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo) {
List<TrncodVo> result = Lists.newArrayList(); List<TrncodVo> result = Lists.newArrayList();
//获取模型数据 //获取模型数据
Ftdgrp ftdgrp = ftToolComponent.getCpdgrpByInr(trnCodeQueryVo.getInr()); Ftdgrp ftdgrp = ftToolComponent.getFtdgrpByInr(trnCodeQueryVo.getInr());
String isAllowed = ""; String isAllowed = "";
String[] fxTraArray = {"FTTFMT", "FTTFCN","FTTPCN"}; String[] fxTraArray = {"FTTFMT", "FTTFCN","FTTPCN"};
String[] fxButArray = {"资金拆借到期", "资金拆借销账","头寸调拨销账"}; String[] fxButArray = {"资金拆借到期", "资金拆借销账","头寸调拨销账"};
......
package com.brilliance.isc.funds.fttpcm.register.settle; package com.brilliance.isc.funds.fttpcm.register.settle;
import com.brilliance.isc.common.glemod.service.GlemodService; import com.brilliance.isc.bo.model.Ftdgrp;import com.brilliance.isc.common.glemod.service.GlemodService;
import com.brilliance.isc.common.register.settle.DefaultSettleRegister; import com.brilliance.isc.common.register.settle.DefaultSettleRegister;
import com.brilliance.isc.common.register.settle.ISettleRegister; import com.brilliance.isc.common.register.settle.ISettleRegister;
import com.brilliance.isc.common.setglg.service.SetglgService; import com.brilliance.isc.common.setglg.service.SetglgService;
import com.brilliance.isc.common.setmod.service.SetmodService; import com.brilliance.isc.common.setglg.vo.SetglgVo;import com.brilliance.isc.common.setmod.service.SetmodService;
import com.brilliance.isc.common.setmod.vo.SetmodVo; import com.brilliance.isc.common.setmod.vo.SetmodVo;
import org.springframework.beans.factory.annotation.Autowired; import com.brilliance.isc.common.transaction.check.TrnmodCheck;import com.brilliance.isc.common.trnmod.service.impl.TrnmodServiceImpl;import com.brilliance.isc.common.trnmod.vo.TrnmodVo;import com.brilliance.isc.funds.common.component.FtToolComponent;import com.brilliance.isc.vo.funds.FtdBizInfoVo;import org.apache.poi.hpsf.Decimal;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Component("fttpcm.settleRegister") @Component("fttpcm.settleRegister")
...@@ -23,6 +23,10 @@ public class FttpcmSettleRegister implements ISettleRegister { ...@@ -23,6 +23,10 @@ public class FttpcmSettleRegister implements ISettleRegister {
@Autowired @Autowired
private GlemodService glemodService; private GlemodService glemodService;
@Autowired
private TrnmodServiceImpl trnmodService;
@Autowired
private FtToolComponent ftToolComponent;
@Override @Override
public void registerSettlement(SetmodVo setmodVo) { public void registerSettlement(SetmodVo setmodVo) {
...@@ -31,15 +35,7 @@ public class FttpcmSettleRegister implements ISettleRegister { ...@@ -31,15 +35,7 @@ public class FttpcmSettleRegister implements ISettleRegister {
//dftcreSettleRegister.registerSettlement(setmodVo); //dftcreSettleRegister.registerSettlement(setmodVo);
//trtcreSettleRegister.registerSettlement(setmodVo); //trtcreSettleRegister.registerSettlement(setmodVo);
// //取得上下文
// IContext ctx = MdaEnv.getContext();
// ctx.setErrorCode(NO_ERROR);
// this.getSetmod().setDocAmt ( this.getFtdgrp().getCbs().getMax().getCur(), this.getFtdgrp().getCbs().getMax().getAmt(), "Disable" );
// this.getSetmod().getSetglg().setglgClrAmount ( "TRN" );
// String dbtKey = NULLSTR;
// String cdtKey = NULLSTR;
// if( Platform.checkUsrBranch("2") ) // if( Platform.checkUsrBranch("2") )
// {
// dbtKey = this.getSetmod().setGlgAmt ( "TRN", "OWN", this.getSetmod().getDoccur(), this.getFtdgrp().getCbs().getMax().getAmt(), "" ); // dbtKey = this.getSetmod().setGlgAmt ( "TRN", "OWN", this.getSetmod().getDoccur(), this.getFtdgrp().getCbs().getMax().getAmt(), "" );
// cdtKey = this.getSetmod().setGlgAmt ( "TRN", "TRO", this.getSetmod().getDoccur(), this.getFtdgrp().getCbs().getMax().getAmt().negate(), "" ); // cdtKey = this.getSetmod().setGlgAmt ( "TRN", "TRO", this.getSetmod().getDoccur(), this.getFtdgrp().getCbs().getMax().getAmt().negate(), "" );
// this.getTrnmod().getTrnism().setDefDsp ( "OWN", "D", "FTD" + CR + "DRD" ); // this.getTrnmod().getTrnism().setDefDsp ( "OWN", "D", "FTD" + CR + "DRD" );
...@@ -49,6 +45,24 @@ public class FttpcmSettleRegister implements ISettleRegister { ...@@ -49,6 +45,24 @@ public class FttpcmSettleRegister implements ISettleRegister {
// } // }
} }
public void transRegister(SetmodVo setmodVo) { public void transRegister(SetmodVo setmodVo) {
FtdBizInfoVo rec = (FtdBizInfoVo) setmodVo.getRec();
Ftdgrp ftdgrp = ftToolComponent.getFtdgrpByInr(rec.getObjinr());
//取得上下文
setmodVo.setDoccur(ftdgrp.getCbs().getMax().getCur());
setmodVo.setDocamt(ftdgrp.getCbs().getMax().getAmt());
SetglgVo setglg = setmodVo.getSetglg();
setglgService.setglgClrAmount ( setglg,"TRN" );
String dbtKey = NULLSTR;
String cdtKey = NULLSTR;
dbtKey = setmodService.setGlgAmt ( setmodVo,"OWN","D",setmodVo.getDoccur(),ftdgrp.getCbs().getMax().getAmt(), "FTD");
cdtKey = setmodService.setGlgAmt ( setmodVo,"TRN", "C", setmodVo.getDoccur(), ftdgrp.getCbs().getMax().getAmt(), "PAC" );
// trnmodVo.getTrnism().setDefDsp("OWN", "D", "FTD" + "\r" + "DRD");
// trnmodVo.getTrnism().setDefDsp("TRO", "C", "PAC" + "\r" + "DRC");
setmodVo.setFeeclirol("TRO");
// setmodVo.setglgAllValDat(rec.getValdat(), "D");
} }
} }
...@@ -40,33 +40,6 @@ public class FttpcmResource extends AbstractTransactionController<FttpcmStoreVo> ...@@ -40,33 +40,6 @@ public class FttpcmResource extends AbstractTransactionController<FttpcmStoreVo>
return ResponseSet.simpleSuccess(ref); return ResponseSet.simpleSuccess(ref);
} }
@PostMapping("/defaultRateN1000")
public ResponseSet defaultRateN1000(@RequestBody FxtfopStoreVo fxtfopStoreVo) {
try {
settleContext.loadSettleSession("FTTPCM","","");
fttpcmTransactionService.defaultRateN1000(fxtfopStoreVo);
return ResponseSet.simpleSuccess(fxtfopStoreVo);
} catch (Exception e) {
throw e;
} finally {
SettleContext.removeUserSession();
}
}
@PostMapping("/defaultCalculateN1100")
public ResponseSet defaultCalculateN1100(@RequestBody FttpcmStoreVo fttpcmStoreVo) {
try {
settleContext.loadSettleSession("FTTPCM","","");
fttpcmTransactionService.defaultCalculateN1100(fttpcmStoreVo);
return ResponseSet.simpleSuccess(fttpcmStoreVo);
} catch (Exception e) {
throw e;
} finally {
SettleContext.removeUserSession();
}
}
} }
package com.brilliance.isc.funds.fttpcn.check;
import com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator;
import com.brilliance.isc.funds.bo.funds.FttpcnStoreBo;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;
@Component
public class FttpcnValidator extends AbstractModuleValidator<FttpcnStoreBo>{
@Override
@PostConstruct
public void register() {
super.register();
}
@Override
public Map<String, String> validate(FttpcnStoreBo bo) {
Map<String, String> maps = new HashMap<>();
maps.putAll(super.validate(bo));
return maps;
}
}
package com.brilliance.isc.funds.fttpcn.document;
import com.brilliance.isc.doc.handle.impl.AbstractTransactionDocSet;
import com.brilliance.isc.funds.bo.funds.FttpcnStoreBo;
import org.springframework.stereotype.Component;
@Component("fttpcn.docset")
public class FttpcnDocset extends AbstractTransactionDocSet<FttpcnStoreBo> {
}
package com.brilliance.isc.funds.fttpcn.register.diasav;
import com.brilliance.isc.common.register.diasav.IDiasavRegister;
import com.brilliance.isc.common.trndia.vo.TrndiaVo;
import org.springframework.stereotype.Component;
@Component("fttpcn.diasavRegister")
public class FttpcnDiasavRegister implements IDiasavRegister {
@Override
public void diasav(TrndiaVo trndia) {
}}
package com.brilliance.isc.funds.fttpcn.register.doc;
import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.register.document.IDocumentRegister;
import com.brilliance.isc.common.register.document.common.SetmodDocumentRegister;
import com.brilliance.isc.common.trndoc.service.TrndocService;
import com.brilliance.isc.common.trndoc.vo.TrndocVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* @program: isc-funds
* @description: Fttpcn 报文注册
* @create: 2024-10-18
*/
@Component("fttpcn.documentRegister")
public class FttpcnDocumentRegister implements IDocumentRegister {
@Autowired
TrndocService trndocService;
@Resource
PtsptaToolComponent ptsptaToolComponent;
@Autowired
private SetmodDocumentRegister setmodDocumentRegister;
@Override
public void registerDocument(TrndocVo trndoc) {
doRegister(trndoc);
setmodDocumentRegister.registerDocument(trndoc);
//entmodDocumentRegister.registerDocument(trndoc);
}
public void doRegister(TrndocVo trndoc){
}
}
package com.brilliance.isc.funds.fttpcn.register.fee;
import com.brilliance.isc.common.register.fee.AbstractFeeRegister;import com.brilliance.isc.common.register.fee.common.DocumentFeeRegister;
import com.brilliance.isc.common.register.fee.common.LiaallFeeRegister;
import com.brilliance.isc.common.register.fee.common.SetmodFeeRegister;
import com.brilliance.isc.common.setfeg.service.SetfegService;
import com.brilliance.isc.common.setmod.vo.SetmodVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component("fttpcn.feeRegister")
public class FttpcnFeeRegister extends AbstractFeeRegister {
@Autowired
private SetfegService setfegService;
@Autowired
private DocumentFeeRegister documentFeeRegister;
@Autowired
private LiaallFeeRegister liaallFeeRegister;
@Autowired
private SetmodFeeRegister setmodFeeRegister;
@Override
public void registerSettlement(SetmodVo setmodVo) {
setmodFeeRegister.registerSettlement(setmodVo);
documentFeeRegister.registerSettlement(setmodVo);
liaallFeeRegister.registerSettlement(setmodVo);
}
}
package com.brilliance.isc.funds.fttpcn.register.settle;
import com.brilliance.isc.bo.model.Ftdgrp;import com.brilliance.isc.common.register.settle.DefaultSettleRegister;import com.brilliance.isc.common.register.settle.ISettleRegister;
import com.brilliance.isc.common.setglg.service.SetglgService;import com.brilliance.isc.common.setmod.service.SetmodService;import com.brilliance.isc.common.setmod.vo.SetmodVo;
import com.brilliance.isc.funds.common.component.FtToolComponent;import com.brilliance.isc.vo.funds.FtdBizInfoVo;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Component;
@Component("fttpcn.settleRegister")
public class FttpcnSettleRegister implements ISettleRegister{
@Autowired
private SetmodService setmodService;
@Autowired
private SetglgService setglgService;
@Autowired
private DefaultSettleRegister defaultSettleRegister;
@Autowired
private FtToolComponent ftToolComponent;
@Override
public void registerSettlement(SetmodVo setmodVo) {
transRegister(setmodVo);
defaultSettleRegister.registerSettlement(setmodVo);
}
private void transRegister(SetmodVo setmodVo) {
FtdBizInfoVo rec = (FtdBizInfoVo) setmodVo.getRec();
Ftdgrp ftdgrp = ftToolComponent.getFtdgrpByInr(rec.getObjinr());
setmodVo.setDocamt(ftdgrp.getCbs().getOpn2().getAmt());
setglgService.setglgClrAmount ( setmodVo.getSetglg(),"TRN" );
String dbtKey = setglgService.setglgAddAmount(setmodVo.getSetglg(),"TRN","TRI",
setmodVo.getDoccur(),rec.getCanamt(),"", "DBD","C","","");
String cdtKey = setglgService.setglgAddAmount(setmodVo.getSetglg(),"TRN","OWN",
setmodVo.getDoccur(),setmodVo.getDocamt(),"","FTC","C","","");
}
}
package com.brilliance.isc.funds.fttpcn.resource;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.vo.funds.FttpcnStoreVo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/fttpcn")
public class FttpcnResource extends AbstractTransactionController<FttpcnStoreVo> {
}
package com.brilliance.isc.funds.fttpcn.service;
import com.brilliance.isc.bo.model.Fttp;import com.brilliance.isc.common.cbsmod.service.CbsmodService;import com.brilliance.isc.common.component.PtsptaToolComponent;import com.brilliance.isc.common.component.SptDataComponent;import com.brilliance.isc.common.context.SettleContext;import com.brilliance.isc.common.sysmod.SysmodService;import com.brilliance.isc.common.transaction.AbstractTransactionService;
import com.brilliance.isc.common.transaction.help.TransactionHelpService;import com.brilliance.isc.common.trnmod.service.TrnmodService;import com.brilliance.isc.common.trnmod.vo.TrnmodVo;import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.funds.bo.funds.FttpcnStoreBo;import com.brilliance.isc.funds.common.component.FtToolComponent;import com.brilliance.isc.funds.fttpcn.check.FttpcnValidator;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Service;
import javax.annotation.Resource;import java.util.Map;
@Service("fttpcn.transaction")
public class FttpcnTransactionServiceImpl extends AbstractTransactionService<FttpcnStoreBo>{
@Resource
private FttpcnValidator fttpcnValidator;
@Resource
private FtToolComponent ftToolComponent;
@Resource
private TrnmodService trnmodService;
@Resource
private TransactionHelpService transactionHelpService;
@Resource
private CbsmodService cbsmodService;
@Resource
private SettleContext settleContext;
@Resource
private SysmodService sysmodService;
@Autowired
SptDataComponent sptDataComponent;
@Autowired
PtsptaToolComponent ptsptaToolComponent;
@Override
protected void txnSave(FttpcnStoreBo transactionVo) {
}
@Override
protected Map<String, String> txnCheck(FttpcnStoreBo transactionVo) {
return fttpcnValidator.validate(transactionVo);
}
@Override
protected BizInfoVo buildBizInfo(FttpcnStoreBo transactionVo) {
return null;
}
@Override
public void beforeSave(FttpcnStoreBo transactionVo) {
}
public void cbsSav(FttpcnStoreBo transactionVo, TrnmodVo trnmodVo){
}
@Override
public FttpcnStoreBo init(FttpcnStoreBo fttpcnStoreBo){
fttpcnStoreBo.reset();
init950(fttpcnStoreBo);
init1000(fttpcnStoreBo);
return fttpcnStoreBo;
}
private void init950(FttpcnStoreBo fttpcmStoreBo){
}
private void init1000(FttpcnStoreBo fttpcmStoreBo){
Fttp fttp = fttpcmStoreBo.getFttp();
// fttp.setPansta();
}
}
package com.brilliance.isc.funds.bo.funds;
import com.brilliance.isc.bo.model.Ftdgrp;import com.brilliance.isc.bo.model.Fttp;import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FttpcnStoreBo extends BaseTransactionVo{
private Ftdgrp ftdgrp;
private Fttp fttp;
@Override
public void reset() {
super.reset();
if (ftdgrp == null) {
ftdgrp = new Ftdgrp();
}
ftdgrp.reset();
if (fttp == null) {
fttp = new Fttp();
}
fttp.reset();
}
}
...@@ -16,7 +16,7 @@ public interface FttpcmStructMapper extends IBaseStructMapper<FttpcmStoreBo, Ftt ...@@ -16,7 +16,7 @@ public interface FttpcmStructMapper extends IBaseStructMapper<FttpcmStoreBo, Ftt
/** /**
* 此行语句一定要写,StructMapper需要 * 此行语句一定要写,StructMapper需要
*/ */
FxtfcmStructMapper INSTANCE = Mappers.getMapper(FxtfcmStructMapper.class); FttpcmStructMapper INSTANCE = Mappers.getMapper(FttpcmStructMapper.class);
/** /**
* Vo转为Bo * Vo转为Bo
......
package com.brilliance.isc.funds.transfer.transaction;
import com.brilliance.isc.funds.bo.funds.FttpcmStoreBo;import com.brilliance.isc.funds.bo.funds.FttpcnStoreBo;
import com.brilliance.isc.funds.vo.funds.FttpcmStoreVo;import com.brilliance.isc.funds.vo.funds.FttpcnStoreVo;
import com.brilliance.isc.transfer.IBaseStructMapper;
import org.mapstruct.Mapper;import org.mapstruct.MappingTarget;import org.mapstruct.Mappings;import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring")
public interface FttpcnStructMapper extends IBaseStructMapper<FttpcnStoreBo, FttpcnStoreVo> {
/**
* 此行语句一定要写,StructMapper需要
*/
FxtfcmStructMapper INSTANCE = Mappers.getMapper(FxtfcmStructMapper.class);
/**
* Vo转为Bo
*
* @param vo
* @return 返回业务Bo
*/
@Override
FttpcnStoreBo voTransferToBo(FttpcnStoreVo vo);
/**
* Vo追加更新至Bo
*
* @param vo
* @param bo
*/
@Override
@Mappings({
})
void voUpdateToBo(FttpcnStoreVo vo, @MappingTarget FttpcnStoreBo bo);
/**
* Bo转为Vo
*
* @param bo
* @return 返回Vo
*/
@Override
FttpcnStoreVo boTransferToVo(FttpcnStoreBo bo);
/**
* bo追加更新至Bo
*
* @param bo
* @param vo
*/
@Override
void boUpdateToVo(FttpcnStoreBo bo, @MappingTarget FttpcnStoreVo vo);
}
package com.brilliance.isc.funds.vo.funds;
import com.brilliance.isc.bo.model.Ftdgrp;import com.brilliance.isc.bo.model.Fttp;import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;import com.fasterxml.jackson.annotation.JsonIgnoreProperties;import lombok.Data;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FttpcnStoreVo extends BaseTransactionVo{
private Ftdgrp ftdgrp;
private Fttp fttp;
@Override
public void reset() {
super.reset();
if (ftdgrp == null) {
ftdgrp = new Ftdgrp();
}
ftdgrp.reset();
if (fttp == null) {
fttp = new Fttp();
}
fttp.reset();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment