Commit c5ceeae2 by zhoujunpeng

Fttpcm修正

parent f852228c
......@@ -46,7 +46,7 @@ public class FttfmtSettleRegister implements ISettleRegister {
}
private void transRegister(SetmodVo setmodVo) {
setmodVo.setDocamt(setmodVo.getCbsMap().get("MAX").getAmt());
setmodVo.setDocamt(setmodVo.getCbsMap().get("OPN2").getAmt());
setmodVo.setDoccur(setmodVo.getCbsMap().get("MAX").getCur());
SetglgVo setglgVo = setmodVo.getSetglg();
setglgService.setglgClrAmount(setglgVo, "TRN");
......@@ -120,7 +120,7 @@ public class FttfmtSettleRegister implements ISettleRegister {
dsp,"C",acc1,"");
// ftdgrp.getCbs().getIns().getAmt() => getIntamt()
dbtKey2 = setglgService.setglgAddAmount(setglgVo,"TRN","TRO",setmodVo.getDoccur(),
ftdgrp.getCbs().getIns().getAmt(), "","FBD","C","","");
ftdgrp.getCbs().getIns().getAmt(), "","FID","C","","");
cdtKey = setglgService.setglgAddAmount(setglgVo,"TRN","TRO",setmodVo.getDoccur(),setmodVo.getSetamt().negate(),"",
"PAC","C","","");
......
package com.brilliance.isc.funds.fttpcm.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.*;
import com.brilliance.isc.common.trndoc.service.TrndocService;
import com.brilliance.isc.common.trndoc.vo.TrndocVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.common.component.FtToolComponent;
import com.brilliance.isc.vo.funds.FtdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.MdaUtils;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Component("fttpcm.documentRegister")
public class FttpcmDocumentRegister implements IDocumentRegister {
@Autowired
TrndocService trndocService;
@Resource
PtsptaToolComponent ptsptaToolComponent;
@Autowired
private SetmodDocumentRegister setmodDocumentRegister;
@Autowired
private SetglgDocumentRegister2 setglgDocumentRegister;
@Override
public void registerDocument(TrndocVo trndoc) {
doRegister(trndoc);
setglgDocumentRegister.registerDocument(trndoc);
}
public void doRegister(TrndocVo trndoc) {
FtdBizInfoVo rec = (FtdBizInfoVo) trndoc.getRec();
PtsptaVo troPtspta = ptsptaToolComponent.getPtsFromListByRol(trndoc.getPtsptas(), "TRO");
if (MdaUtils.compareTo(rec.getMsgtyp(), "199") == 0){
trndocService.defDocEot ( trndoc, "TRN", "199", "\\FTT199L1", "LET", 0, troPtspta.getPts().getPtainr(),
"\\FTDGRP\\REC", "MT 199", "TRO", "" );
trndocService.setDocSendFormat(trndoc, "TRN199", "SWT", "MT199");
}
}
}
......@@ -44,10 +44,10 @@ public class FttpcmSettleRegister implements ISettleRegister {
String dbtKey = NULLSTR;
String cdtKey = NULLSTR;
dbtKey = setglgService.setglgAddAmount(setglg,"TRN","OWN",setmodVo.getDoccur(),setmodVo.getDocamt(),"","FTD","C","","");
cdtKey = setglgService.setglgAddAmount(setglg,"TRN","TRO",setmodVo.getDoccur(),setmodVo.getDocamt(),"","FTD","C","","");
dbtKey = setglgService.setglgAddAmount(setglg,"TRN","OWN",setmodVo.getDoccur(),setmodVo.getDocamt(),"","FTD","C","","DRD");
cdtKey = setglgService.setglgAddAmount(setglg,"TRN","TRO",setmodVo.getDoccur(),setmodVo.getDocamt().negate(),"","PAC","C","","DRC");
setmodVo.setFeeclirol("TRO");
setmodVo.setFeeclirol("TRO");
}
}
......@@ -35,8 +35,8 @@ public class FttpcmResource extends AbstractTransactionController<FttpcmStoreVo>
@Autowired
private SettleContext settleContext;
@PostMapping("/getRef")
public ResponseSet<String> getRef(@RequestBody FttpcmStoreVo fttpcmStoreVo) {
String ref = fttpcmTransactionService.getRef(fttpcmStoreVo);
public ResponseSet<String> getRef(@RequestBody FttpcmStoreBo fttpcmStoreBo) {
String ref = fttpcmTransactionService.getRef(fttpcmStoreBo);
return ResponseSet.simpleSuccess(ref);
}
......
......@@ -17,22 +17,22 @@ 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.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.common.component.FtToolComponent;
import com.brilliance.isc.funds.bo.funds.FttpcmStoreBo;
import com.brilliance.isc.funds.fttpcm.check.FttpcmValidator;
import com.brilliance.isc.funds.vo.funds.FttpcmStoreVo;
;import com.brilliance.isc.vo.funds.FtdBizInfoVo;
import com.brilliance.isc.vo.funds.FtdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.math.BigDecimal;import java.util.Map;
import java.util.Map;
import java.util.Objects;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
......@@ -128,13 +128,10 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
bizInfoVo.setObjinr(rec.getInr());
bizInfoVo.setOwnref(rec.getOwnref());
bizInfoVo.setFttyp(rec.getFttyp());
bizInfoVo.setRat(rec.getRat());
bizInfoVo.setBranchInr(rec.getBranchinr());
bizInfoVo.setEtyextkey(rec.getEtyextkey());
bizInfoVo.setBranchInr(rec.getBranchinr());
bizInfoVo.setValdat(rec.getValdat());
bizInfoVo.setMsgtyp(transactionVo.getFttp().getMsgtyp());
bizInfoVo.setSwftyp(rec.getSwftyp());
return bizInfoVo;
}
@Override
......@@ -147,17 +144,17 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
return null;
}
public String getRef(FttpcmStoreVo fttpcmStoreVo) {
fttpcmStoreVo.reset();
PtsptaVo ptsptaVo1 = fttpcmStoreVo.getFtdgrp().getBen();
public String getRef(FttpcmStoreBo fttpcmStoreBo) {
fttpcmStoreBo.reset();
PtsptaVo ptsptaVo1 = fttpcmStoreBo.getFtdgrp().getBen();
if (ptsptaVo1 == null || StringUtils.isEmpty(ptsptaVo1.getPtainr())) {
return NULLSTR;
}
PtsptaVo ptsptaVo2 = fttpcmStoreVo.getFtdgrp().getTro();
PtsptaVo ptsptaVo2 = fttpcmStoreBo.getFtdgrp().getTro();
if (ptsptaVo2 == null || StringUtils.isEmpty(ptsptaVo2.getPtainr())) {
return NULLSTR;
}
PtsptaVo ptsptaVo3 = fttpcmStoreVo.getFtdgrp().getTri();
PtsptaVo ptsptaVo3 = fttpcmStoreBo.getFtdgrp().getTri();
if (ptsptaVo3 == null || StringUtils.isEmpty(ptsptaVo3.getPtainr())) {
return NULLSTR;
}
......@@ -169,7 +166,7 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
return NULLSTR;
}
SettleContext.getUserSession().setWrkbch( SettleContext.getUserSession().getBch());
Ftdgrp ftdgrp = fttpcmStoreVo.getFtdgrp();
Ftdgrp ftdgrp = fttpcmStoreBo.getFtdgrp();
ftToolComponent.getref(ftdgrp);
return ftdgrp.getRec().getOwnref();
......@@ -185,11 +182,15 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
public void init1000(FttpcmStoreBo bo) {
// bo.getFtdgrp().getCbs().getMax().setCur(xrtmodService.sysiso());
if( ! sysmodService.sptIsAnyLoaded(bo.getSpt().getSta()) ){
bo.getFttp().setMsgtyp( "202");
bo.getFtdgrp().getRec().setSwftyp("202");
}
if ( MdaUtils.compareTo(bo.getFtdgrp().getRec().getSwftyp(), "202") == 0){
bo.getFtdgrp().getRec().setSwftyp("202");
}
if ( MdaUtils.compareTo(bo.getFtdgrp().getRec().getSwftyp(), "103")==0){
bo.getFtdgrp().getRec().setSwftyp("103");
}
if (bo.getFtdgrp().getRec().getOpndat() ==null ){
bo.getFtdgrp().getRec().setOpndat(Dates.today());
}
......@@ -205,4 +206,51 @@ public class FttpcmTransactionServiceImpl extends AbstractTransactionService<Ftt
private void init950(FttpcmStoreBo fttpcmStoreBo) {
}
// @Default(target="fttp.troact",order=1200)
// public boolean defaultFttpTroactN1200(){
// String actLst = NULLSTR;
// if( ! MdaUtils.isEmpty(this.getFtdgrp().getCbs().getMax().getCur()) && ! MdaUtils.isEmpty(this.getFtdgrp().getTro().getPts().getPtyinr()) )
// {
// actLst = Platform.actGetNostroAccount(this.getFtdgrp().getCbs().getMax().getCur(),this.getFtdgrp().getTro().getPts().getPtyinr());
// Systems.setValues(this.getFttp(),"troact",actLst);
// if( ! Systems.isModified(this.getFttp(),"troact") )
// {
// this.getFttp().setTroact( Systems.getValues(this.getFttp(),"troact"));
// }
// }
// else
// {
// this.getFttp().setTroact(NULLSTR);
// }
//
//
// return true;
// }
//
// /**
// * source:fttpcm.0010.script
// */
// @Default(target="fttp.triact",order=1200)
// public boolean defaultFttpTriactN1200(){
// IContext ctx = MdaEnv.getContext();
//
// String actLst = NULLSTR;
// if( ! MdaUtils.isEmpty(this.getFtdgrp().getCbs().getMax().getCur()) && ! MdaUtils.isEmpty(this.getFtdgrp().getTri().getPts().getPtyinr()) )
// {
// actLst = Platform.actGetNostroAccount(this.getFtdgrp().getCbs().getMax().getCur(),this.getFtdgrp().getTri().getPts().getPtyinr());
// Systems.setValues(this.getFttp(),"triact",actLst);
// if( ! Systems.isModified(this.getFttp(),"triact") )
// {
// this.getFttp().setTriact( Systems.getValues(this.getFttp(),"triact"));
// }
// }
// else
// {
// this.getFttp().setTriact(NULLSTR);
// }
//
//
// return true;
// }
}
......@@ -11,7 +11,6 @@ import lombok.Data;
public class FttpcmStoreBo extends BaseTransactionVo {
private Ftdgrp ftdgrp;
private SetmodVo setmodVo;
private Fttp fttp;
@Override
public void reset(){
......@@ -24,10 +23,5 @@ public class FttpcmStoreBo extends BaseTransactionVo {
if (fttp == null){
fttp = new Fttp();
}
fttp.reset();
if (setmodVo == null){
setmodVo = new SetmodVo();
}
setmodVo.reset();
}
}
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.bo.model.Fxdgrp;
import com.brilliance.isc.bo.model.Fxtp;
import com.brilliance.isc.common.setmod.vo.SetmodVo;import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.vo.model.FtdgrpVo;
import com.brilliance.isc.vo.model.FttpVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
......@@ -12,26 +10,21 @@ import lombok.Data;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FttpcmStoreVo extends BaseTransactionVo {
private Ftdgrp ftdgrp;
private FtdgrpVo ftdgrp;
private Fttp fttp;
private SetmodVo setmodVo;
private FttpVo fttp;
@Override
public void reset() {
super.reset();
if (ftdgrp == null) {
ftdgrp = new Ftdgrp();
ftdgrp = new FtdgrpVo();
}
ftdgrp.reset();
if (fttp == null) {
fttp = new Fttp();
fttp = new FttpVo();
}
fttp.reset();
if (setmodVo == null){
setmodVo = new SetmodVo();
}
setmodVo.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