Commit dd008b0f by jianglong

修改ftxlcm

parent 504b3031
...@@ -29,9 +29,9 @@ public class FxtlcmValidator extends AbstractModuleValidator <FxtlcmStoreBo>{ ...@@ -29,9 +29,9 @@ public class FxtlcmValidator extends AbstractModuleValidator <FxtlcmStoreBo>{
} }
@Override @Override
public Map<String, String> validate(FxtlcmStoreBo vo) { public Map<String, String> validate(FxtlcmStoreBo bo) {
Map<String, String> maps = new HashMap<>(); Map<String, String> maps = new HashMap<>();
maps.putAll(super.validate(vo)); maps.putAll(super.validate(bo));
return maps; return maps;
} }
...@@ -39,10 +39,10 @@ public class FxtlcmValidator extends AbstractModuleValidator <FxtlcmStoreBo>{ ...@@ -39,10 +39,10 @@ public class FxtlcmValidator extends AbstractModuleValidator <FxtlcmStoreBo>{
* source:Fxtlcm.0023.script * source:Fxtlcm.0023.script
*/ */
@Validate(path="fxdgrp.apl.pts.ref") @Validate(path="fxdgrp.apl.pts.ref")
public ValidResult checkFxdgrpAplPtsRefN1000(FxtlcmStoreBo vo){ public ValidResult checkFxdgrpAplPtsRefN1000(FxtlcmStoreBo bo){
if( ! MdaUtils.isEmpty(vo.getSwtflg()) && ( MdaUtils.compareTo(vo.getMt30m().getS22a(),"AMND") == 0 || MdaUtils.compareTo(vo.getMt30m().getS22a(),"CANC") == 0 ) ) if( ! MdaUtils.isEmpty(bo.getSwtflg()) && ( MdaUtils.compareTo(bo.getMt30m().getS22a(),"AMND") == 0 || MdaUtils.compareTo(bo.getMt30m().getS22a(),"CANC") == 0 ) )
{ {
if( MdaUtils.isEmpty(vo.getFxdgrp().getApl().getPts().getRef()) ) if( MdaUtils.isEmpty(bo.getFxdgrp().getApl().getPts().getRef()) )
{ {
return errorMandatory(); return errorMandatory();
} }
...@@ -54,8 +54,8 @@ public class FxtlcmValidator extends AbstractModuleValidator <FxtlcmStoreBo>{ ...@@ -54,8 +54,8 @@ public class FxtlcmValidator extends AbstractModuleValidator <FxtlcmStoreBo>{
* source:Fxtlcm.0024.script * source:Fxtlcm.0024.script
*/ */
@Validate(path="mt30m.rbc.pts.extkey") @Validate(path="mt30m.rbc.pts.extkey")
public ValidResult checkMt30mRbcPtsExtkeyN1000(FxtlcmStoreBo vo){ public ValidResult checkMt30mRbcPtsExtkeyN1000(FxtlcmStoreBo bo){
if( ! MdaUtils.isEmpty(vo.getSwtflg()) && MdaUtils.isEmpty(vo.getMt30m().getRbc().getPts().getExtkey()) ) if( ! MdaUtils.isEmpty(bo.getSwtflg()) && MdaUtils.isEmpty(bo.getMt30m().getRbc().getPts().getExtkey()) )
{ {
return errorMandatory(); return errorMandatory();
} }
...@@ -66,8 +66,8 @@ public class FxtlcmValidator extends AbstractModuleValidator <FxtlcmStoreBo>{ ...@@ -66,8 +66,8 @@ public class FxtlcmValidator extends AbstractModuleValidator <FxtlcmStoreBo>{
* source:Fxtlcm.0025.script * source:Fxtlcm.0025.script
*/ */
@Validate(path="mt30m.owc.pts.extkey") @Validate(path="mt30m.owc.pts.extkey")
public ValidResult checkMt30mOwcPtsExtkeyN1000(FxtlcmStoreBo vo){ public ValidResult checkMt30mOwcPtsExtkeyN1000(FxtlcmStoreBo bo){
if( ! MdaUtils.isEmpty(vo.getSwtflg()) && MdaUtils.isEmpty(vo.getMt30m().getOwc().getPts().getExtkey()) ) if( ! MdaUtils.isEmpty(bo.getSwtflg()) && MdaUtils.isEmpty(bo.getMt30m().getOwc().getPts().getExtkey()) )
{ {
return errorMandatory(); return errorMandatory();
} }
......
...@@ -48,21 +48,27 @@ public class FxtlcmSettleRegister implements ISettleRegister { ...@@ -48,21 +48,27 @@ public class FxtlcmSettleRegister implements ISettleRegister {
private void transRegister(SetmodVo setmodVo) { private void transRegister(SetmodVo setmodVo) {
FxdBizInfoVo rec = (FxdBizInfoVo) setmodVo.getRec(); FxdBizInfoVo rec = (FxdBizInfoVo) setmodVo.getRec();
String maxCur=NULLSTR;
BigDecimal maxAmt = BigDecimal.ZERO; BigDecimal maxAmt = BigDecimal.ZERO;
String nom1Cur=NULLSTR;
BigDecimal nom1Amt = BigDecimal.ZERO; BigDecimal nom1Amt = BigDecimal.ZERO;
if (setmodVo.getCbsMap().get("MAX") != null) { if (setmodVo.getCbsMap().get("MAX") != null) {
maxCur=setmodVo.getCbsMap().get("MAX").getCur();
maxAmt = setmodVo.getCbsMap().get("MAX").getAmt(); maxAmt = setmodVo.getCbsMap().get("MAX").getAmt();
} }
String nom1Cur = NULLSTR;
if (setmodVo.getCbsMap().get("NOM1") != null) { if (setmodVo.getCbsMap().get("NOM1") != null) {
nom1Amt = setmodVo.getCbsMap().get("NOM1").getAmt(); nom1Amt = setmodVo.getCbsMap().get("NOM1").getAmt();
nom1Cur = setmodVo.getCbsMap().get("NOM1").getCur(); nom1Cur = setmodVo.getCbsMap().get("NOM1").getCur();
} }
setmodVo.setDoccur(maxCur);
setmodVo.setDocamt(maxAmt); setmodVo.setDocamt(maxAmt);
setmodVo.setOpnamt(maxAmt); setmodVo.setOpnamt(maxAmt);
SetglgVo setglg = setmodVo.getSetglg(); SetglgVo setglg = setmodVo.getSetglg();
setglgService.setglgClrAmount ( setmodVo.getSetglg(),"TRN" ); setglgService.setglgClrAmount ( setglg,"TRN" );
setglgService.setglgClrAmount ( setmodVo.getSetglg(),"SET" ); setglgService.setglgClrAmount ( setglg,"SET" );
//!============================================== //!==============================================
//!卖出:D:139(CNY) C:4250305(CNY) //!卖出:D:139(CNY) C:4250305(CNY)
//! D:4250305外币 C:114(116)外币 //! D:4250305外币 C:114(116)外币
...@@ -198,6 +204,6 @@ public class FxtlcmSettleRegister implements ISettleRegister { ...@@ -198,6 +204,6 @@ public class FxtlcmSettleRegister implements ISettleRegister {
**/ **/
} }
} }
//this.getSetmod().setglgAllValDat ( this.getFxdgrp().getRec().getValdat(), "D" ); setmodService.setglgAllValDat (setmodVo,rec.getValdat(), "D" );
} }
} }
...@@ -22,11 +22,16 @@ import com.brilliance.isc.common.util.StringUtils; ...@@ -22,11 +22,16 @@ import com.brilliance.isc.common.util.StringUtils;
import com.brilliance.isc.common.vo.BizAmdInfoVo; import com.brilliance.isc.common.vo.BizAmdInfoVo;
import com.brilliance.isc.common.vo.BizInfoVo; import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.common.vo.PtsptaVo; import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.bo.funds.FttfcmStoreBo;
import com.brilliance.isc.funds.bo.funds.FxtlcmStoreBo; import com.brilliance.isc.funds.bo.funds.FxtlcmStoreBo;
import com.brilliance.isc.funds.common.component.FxToolComponent; import com.brilliance.isc.funds.common.component.FxToolComponent;
import com.brilliance.isc.funds.fxtlcm.check.FxtlcmValidator; import com.brilliance.isc.funds.fxtlcm.check.FxtlcmValidator;
import com.brilliance.isc.funds.transfer.transaction.FttfcmStructMapper;
import com.brilliance.isc.funds.transfer.transaction.FxtlcmStructMapper;
import com.brilliance.isc.funds.vo.funds.FttfcmStoreVo;
import com.brilliance.isc.funds.vo.funds.FxtlcmStoreVo; import com.brilliance.isc.funds.vo.funds.FxtlcmStoreVo;
import com.brilliance.isc.vo.funds.FxdBizInfoVo; import com.brilliance.isc.vo.funds.FxdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.Dates;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -63,6 +68,15 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -63,6 +68,15 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt
@Resource @Resource
private BchService bchService; private BchService bchService;
@Resource
private LiaallService liaallService;
@Resource
private CbsmodService cbsmodService;
@Autowired
private FxtlcmStructMapper fxtlcmStructMapper;
@PostConstruct @PostConstruct
public void regisertService() { public void regisertService() {
serviceRegisterMaps.put(CommonContants.SETMOD_SERVICE, "Y"); serviceRegisterMaps.put(CommonContants.SETMOD_SERVICE, "Y");
...@@ -104,6 +118,7 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -104,6 +118,7 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt
bizInfoVo.setTrdout(rec.getTrdout()); bizInfoVo.setTrdout(rec.getTrdout());
bizInfoVo.setTrnman(rec.getTrnman()); bizInfoVo.setTrnman(rec.getTrnman());
bizInfoVo.setRat(rec.getRat()); bizInfoVo.setRat(rec.getRat());
bizInfoVo.setValdat(rec.getValdat());
return bizInfoVo; return bizInfoVo;
} }
...@@ -122,6 +137,8 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -122,6 +137,8 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt
public void initFxtlcm(FxtlcmStoreBo fxtlcmStoreBo){ public void initFxtlcm(FxtlcmStoreBo fxtlcmStoreBo){
Fxdgrp fxdgrp = fxtlcmStoreBo.getFxdgrp(); Fxdgrp fxdgrp = fxtlcmStoreBo.getFxdgrp();
String fxdinr = fxdgrp.getRec().getInr();
fxdgrp = fxToolComponent.getFxdgrpByInr(fxtlcmStoreBo.getFxdgrp().getRec().getInr()); fxdgrp = fxToolComponent.getFxdgrpByInr(fxtlcmStoreBo.getFxdgrp().getRec().getInr());
fxtlcmStoreBo.setFxdgrp(fxdgrp); fxtlcmStoreBo.setFxdgrp(fxdgrp);
} }
...@@ -147,18 +164,31 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -147,18 +164,31 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt
public void ruleMtabutSavN500(FxtlcmStoreBo transactionVo){ public void ruleMtabutSavN500(FxtlcmStoreBo transactionVo){
TrnmodVo trnmodVo = transactionHelpService.getTransactionStoreSet().getTrnmodVo(); TrnmodVo trnmodVo = transactionHelpService.getTransactionStoreSet().getTrnmodVo();
Fxdgrp fxdgrp=transactionVo.getFxdgrp();
fxToolComponent.getref(transactionVo.getFxdgrp()); fxToolComponent.getref(transactionVo.getFxdgrp());
//# 1. Create (rsp. update) Contract (incl. Texts)
fxdgrp.getRec().setCnfdat(Dates.today());
if (fxdgrp.getCbs().getOpn2().getAmt().compareTo(BigDecimal.ZERO)==0){
fxdgrp.getRec().setClsdat(Dates.today());
}
fxdgrp.setAcc(transactionVo.getAplacc());
// 1. Create (rsp. update) Contract (incl. Texts) // 1. Create (rsp. update) Contract (incl. Texts)
fxToolComponent.sav(transactionVo.getFxdgrp(), BigDecimal.ZERO); fxToolComponent.sav(transactionVo.getFxdgrp(), BigDecimal.ZERO);
// 2. Build Transaction from FTDGRP // 2. Build Transaction from FTDGRP
trnmodService.trnSetFromContract ( trnmodVo); trnmodService.trnSetFromContract ( trnmodVo);
cbsSav(transactionVo, trnmodVo); cbsSav(transactionVo, trnmodVo);
// save documents // save documents
// #记录116台账
// NOSMOD.savNostro
} }
public void cbsSav(FxtlcmStoreBo transactionVo, TrnmodVo trnmodVo) { public void cbsSav(FxtlcmStoreBo transactionVo, TrnmodVo trnmodVo) {
// cbsmodService.cbsTrnSetNew("TRN",trnmodVo.getTrn().getInr()); cbsmodService.cbsTrnSetNew("TRN",trnmodVo.getTrn().getInr());
// //#cgl // //#cgl
// //平盘登记后产生4条CBB,MAX,NOM,OPN,OPN2 // //平盘登记后产生4条CBB,MAX,NOM,OPN,OPN2
// //后续两个交易分别消OPN和OPN2 // //后续两个交易分别消OPN和OPN2
...@@ -180,12 +210,19 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -180,12 +210,19 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt
// if ( !MdaUtils.isEmpty( transactionHelpService.getTransactionStoreSet().getLiaall())) { // if ( !MdaUtils.isEmpty( transactionHelpService.getTransactionStoreSet().getLiaall())) {
// liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall()); // liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall());
// } // }
// //Platform.cbsTrnCommit(); liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall());
cbsmodService.cbsTrnCommit();
} }
public String getRef(FxtlcmStoreVo fxtlcmStoreVo) { public String getRef(FxtlcmStoreVo fxtlcmStoreVo) {
fxtlcmStoreVo.reset(); FxtlcmStoreBo fxtlcmStoreBo= fxtlcmStructMapper.voTransferToBo(fxtlcmStoreVo);
PtsptaVo ptsptaVo = fxtlcmStoreVo.getFxdgrp().getApl(); return getRef(fxtlcmStoreBo);
}
public String getRef(FxtlcmStoreBo fxtlcmStoreBo) {
fxtlcmStoreBo.reset();
PtsptaVo ptsptaVo = fxtlcmStoreBo.getFxdgrp().getApl();
if (ptsptaVo == null || StringUtils.isEmpty(ptsptaVo.getPtainr())) { if (ptsptaVo == null || StringUtils.isEmpty(ptsptaVo.getPtainr())) {
return NULLSTR; return NULLSTR;
} }
...@@ -197,7 +234,7 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -197,7 +234,7 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt
return NULLSTR; return NULLSTR;
} }
SettleContext.getUserSession().setWrkbch(wrkbch); SettleContext.getUserSession().setWrkbch(wrkbch);
Fxdgrp fxdgrp = fxtlcmStoreVo.getFxdgrp(); Fxdgrp fxdgrp = fxtlcmStoreBo.getFxdgrp();
fxToolComponent.getref(fxdgrp); fxToolComponent.getref(fxdgrp);
return fxdgrp.getRec().getOwnref(); return fxdgrp.getRec().getOwnref();
} }
......
...@@ -259,21 +259,21 @@ public class FxtlopTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -259,21 +259,21 @@ public class FxtlopTransactionServiceImpl extends AbstractTransactionService<Fxt
} }
private SetmodVo buildSetmodVo(FxtlopStoreVo vo) { // private SetmodVo buildSetmodVo(FxtlopStoreVo vo) {
SetmodVo setmodVo = new SetmodVo(); // SetmodVo setmodVo = new SetmodVo();
Map cbsMap = new HashMap(); // Map cbsMap = new HashMap();
Cbb max = vo.getFxdgrp().getCbs().getMax(); // Cbb max = vo.getFxdgrp().getCbs().getMax();
cbsMap.put("MAX", max); // cbsMap.put("MAX", max);
setmodVo.setCbsMap(cbsMap); // setmodVo.setCbsMap(cbsMap);
List<PtsptaVo> ptsList = new ArrayList(); // List<PtsptaVo> ptsList = new ArrayList();
PtsptaVo apl = vo.getFxdgrp().getApl(); // PtsptaVo apl = vo.getFxdgrp().getApl();
ptsList.add(apl); // ptsList.add(apl);
setmodVo.setPtsList(ptsList); // setmodVo.setPtsList(ptsList);
FxdBizInfoVo bizInfoVo = new FxdBizInfoVo(); // FxdBizInfoVo bizInfoVo = new FxdBizInfoVo();
bizInfoVo.setObjtyp("FXD"); // bizInfoVo.setObjtyp("FXD");
setmodVo.setRec(bizInfoVo); // setmodVo.setRec(bizInfoVo);
return setmodVo; // return setmodVo;
} // }
public void defaultCalculateN1100(FxtlopStoreVo fxtlopStoreVo) { public void defaultCalculateN1100(FxtlopStoreVo fxtlopStoreVo) {
fxtlopStoreVo.reset(); fxtlopStoreVo.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