Commit d800ca57 by xiaotong

FXTLOP交易代码逻辑迁移

parent c39891d3
package com.brilliance.isc.funds.fxtlop.check;
import com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator;
import com.brilliance.isc.common.transaction.newcheck.ValidResult;
import com.brilliance.isc.common.transaction.newcheck.Validate;
import com.brilliance.isc.funds.bo.funds.FxtlopStoreBo;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
......@@ -32,5 +36,51 @@ public class FxtlopValidator extends AbstractModuleValidator<FxtlopStoreBo> {
return maps;
}
/**
* source:fxtlop.0011.script
*/
@Validate(path="fxdgrp.rec.opndat")
public ValidResult checkFxdgrpRecOpndatN1000(FxtlopStoreBo vo){
if( MdaUtils.isEmpty(vo.getFxdgrp().getRec().getOpndat()) )
{
return errorMandatory();
}
return null;
}
/**
* source:fxtlop.0012.script
*/
@Validate(path="fxdgrp.rec.valdat")
public ValidResult checkFxdgrpRecValdatN1000(FxtlopStoreBo vo){
if( MdaUtils.isEmpty(vo.getFxdgrp().getRec().getValdat()) )
{
return errorMandatory();
}
return null;
}
/**
* source:fxtlop.0013.script
*/
@Validate(path="fxdgrp.rec.rat")
public ValidResult checkFxdgrpRecRatN1000(FxtlopStoreBo vo){
if( MdaUtils.isEmpty(vo.getFxdgrp().getRec().getRat()) )
{
return errorMandatory();
}
return null;
}
/**
* source:fxtlop.0014.script
*/
@Validate(path="fxdgrp.apl.pts.extkey")
public ValidResult checkFxdgrpAplPtsExtkeyN1000(FxtlopStoreBo vo){
if( MdaUtils.isEmpty(vo.getFxdgrp().getApl().getPts().getExtkey()) )
{
return errorMandatory();
}
return null;
}
}
package com.brilliance.isc.funds.fxtlop.register.fee;
import com.brilliance.isc.common.liaall.service.LiaallService;
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;
import javax.swing.text.Document;
@Component("fxtlop.feeRegister")
public class FxtlopFeeRegister 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.fxtlop.register.liaall;
import com.brilliance.isc.common.liaall.service.LiaallService;
import com.brilliance.isc.common.liaall.vo.LiaallVo;
import com.brilliance.isc.common.register.liaall.ILiaallRegister;
import com.brilliance.isc.common.register.liaall.common.LiaallRegister;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component("fxtlop.liaallSetTransaction")
public class FxtlopLiaallRegister implements ILiaallRegister {
@Autowired
private LiaallRegister liaallSetRegister;
@Override
public void liaallSetTransaction(LiaallVo liaallVo) {
liaallSetRegister.liaallSetTransaction(liaallVo);
}
}
package com.brilliance.isc.funds.fxtlop.register.settle;
import com.brilliance.isc.common.glemod.service.GlemodService;
import com.brilliance.isc.common.register.settle.DefaultSettleRegister;
import com.brilliance.isc.common.register.settle.ISettleRegister;
import com.brilliance.isc.common.setglg.service.SetglgService;
import com.brilliance.isc.common.setmod.service.SetmodService;
import com.brilliance.isc.common.setmod.vo.SetmodVo;
import com.brilliance.isc.vo.funds.FxdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.brilliance.mda.runtime.mda.util.Strings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component("fxtlop.settleRegister")
public class FxtlopSettleRegister implements ISettleRegister {
@Autowired
private SetmodService setmodService;
@Autowired
private SetglgService setglgService;
@Autowired
private DefaultSettleRegister defaultSettleRegister;
@Autowired
private GlemodService glemodService;
@Override
public void registerSettlement(SetmodVo setmodVo) {
transRegister(setmodVo);
defaultSettleRegister.registerSettlement(setmodVo);
}
private void transRegister(SetmodVo setmodVo) {
FxdBizInfoVo rec = (FxdBizInfoVo) setmodVo.getRec();
//this.getSetmod().setDocAmt ( this.getFxdgrp().getCbs().getMax().getCur(), this.getFxdgrp().getCbs().getMax().getAmt(), "Disable" );
//this.getSetmod().setOpnAmt ( this.getFxdgrp().getCbs().getMax().getAmt() );
setglgService.setglgClrAmount ( setmodVo.getSetglg(),"TRN" );
setglgService.setglgClrAmount ( setmodVo.getSetglg(),"SET" );
//平盘登记交易不产生分录
//补记外币结转账务
//###############################
//!买入
//!
//!1、结转:从代客即期结售汇科目(外币)结转到结售汇平盘科目:
//!借:281110结售汇对外平盘 (外币)
//!贷:281106代客即期结售汇 (外币)
//!------------------------------
//!卖出
//!
//!1、结转:从代客即期结售汇科目(外币)结转到结售汇平盘科目:
//!借:281106代客即期结售汇 (外币)
//!贷:281110结售汇对外平盘 (外币)
//###############################
String act1 = null;
String ddtKey = null;
String act4 = null;
String cbtKey = null;
if( ! MdaUtils.isEmpty(rec.getFxtyp()) )
{
//买入登记
if( MdaUtils.compareTo(Strings.mid(rec.getFxtyp(),2,1),"B") == 0 )
{
//D 281110
act1 = glemodService.getAvailAcc ( "FX-SLQ", setmodVo.getDoccur(), "", setmodVo.getSetamt() );
ddtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"TRN", "OWN", setmodVo.getDoccur(), setmodVo.getSetamt(), "", "FXD", "C", act1, "" );
//C:281106
act4 = glemodService.getAvailAcc ( "FX-UTL", setmodVo.getDoccur(), "", setmodVo.getSetamt() );
cbtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"SET", "OWN", setmodVo.getDoccur(), setmodVo.getSetamt().negate(), "SET", "FXC", "F", act4, "SET" );
}
else
{
//卖出登记
//D:281106
act4 = glemodService.getAvailAcc ( "FX-UTL", setmodVo.getDoccur(), "", setmodVo.getSetamt() );
ddtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"SET", "OWN", setmodVo.getDoccur(), setmodVo.getSetamt(), "SET", "FXD", "F", act4, "SET" );
//C 281110
act1 = glemodService.getAvailAcc ( "FX-SLQ", setmodVo.getDoccur(), "", setmodVo.getSetamt() );
cbtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"TRN", "OWN", setmodVo.getDoccur(), setmodVo.getSetamt().negate(), "", "FXC", "C", act1, "" );
}
}
}
}
package com.brilliance.isc.funds.fxtlop.register.wfe;
import com.brilliance.isc.common.transaction.help.TransactionHelpService;
import com.brilliance.isc.common.trnism.service.IWfeRegister;
import com.brilliance.isc.common.trnmod.vo.TrnmodVo;
import com.brilliance.isc.common.wfmmod.service.WfmmodService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Component("fxtlop"+"."+ IWfeRegister.REGISTER_NAME)
public class FxtlopWfeRegister implements IWfeRegister {
@Resource
private WfmmodService wfmmodService;
@Resource
private TransactionHelpService transactionHelpService;
@Override
public void wfeRegister(TrnmodVo trnmodVo) {
}
}
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