Commit d89775c7 by zhoujunpeng

Ftdmapper修改

parent 8c5cddb0
......@@ -8,8 +8,10 @@ import com.brilliance.isc.bo.model.*;
import com.brilliance.isc.common.cbsmod.service.CbsmodService;
import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.exception.CommonServiceException;
import com.brilliance.isc.common.sysmod.SysmodService;import com.brilliance.isc.common.transaction.help.TransactionServiceSet;
import com.brilliance.isc.common.trnmod.service.TrnmodService;import com.brilliance.isc.common.util.StringUtils;
import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.common.transaction.help.TransactionServiceSet;
import com.brilliance.isc.common.trnmod.service.TrnmodService;
import com.brilliance.isc.common.util.StringUtils;
import com.brilliance.isc.common.util.Utils;
import com.brilliance.isc.common.vo.PtsptaVo;
......@@ -37,7 +39,7 @@ public class FtToolComponent {
@Autowired
private TrnmodService trnmodService;
@Autowired
private FtdselMapper ftdselMapper;
private FtdMapper ftdselMapper;
@Autowired
private CbbMapper cbbMapper;
@Autowired
......@@ -196,83 +198,6 @@ public class FtToolComponent {
ptspta.setAdrblk(ptsptas.getPts().getAdrblk());
return ptspta;
}
public static void isFTTrnAllowed(Ftdgrp ftdgrp, TrncodVo trncodVo) {
ftdgrp.reset();
String trnNam = trncodVo.getInifrm().toUpperCase();
String errOpnY = "Selected foreign exchange is already opened.";
String errOpnN = "No foreign exchange selected.";
String errClsY = "Selected foreign exchange has been closed.";
String errQuoY = "Selected foreign exchange has been quoted.";
String errQuoN = "Selected foreign exchange has not quoted yet.";
String errSigY = "Sight exchange cannot settle at maturity.";
String errCnfY = "Selected foreign exchange has been confirmed.";
String errCnfN = "Selected foreign exchange has not been confirmed.";
String errAccN = "There is no amount in transit.";
String errZJB = "此交易只能资金部经办!";
String errYYB = "此交易只能营运部经办!";
String errHO = "Only Headoffice can quote.";
String errRel = "The former registration transaction(FXTSOP/FXTBOP) not released yet.";
String errSetY = "Selected foreign exchange has been settled.";
String errLB = "";
if ("FXTLOP".equals(trnNam)||"FXTFOP".equals(trnNam)||"FXTDEP".equals(trnNam)) {
if (!StringUtils.isEmpty(ftdgrp.getRec().getInr())){
trncodVo.setDisResult(errOpnY);
trncodVo.setIsAllowed("N");
}
}
if ("FXTLCM".equals(trnNam)||"FXTFCM".equals(trnNam)||"FXTDEM".equals(trnNam)) {
if (StringUtils.isEmpty(ftdgrp.getRec().getInr())){
trncodVo.setDisResult(errOpnN);
trncodVo.setIsAllowed("N");
}else if(Objects.nonNull(ftdgrp.getRec().getCnfdat())){
trncodVo.setDisResult(errCnfY);
trncodVo.setIsAllowed("N");
}
if(Objects.nonNull(ftdgrp.getRec().getClsdat())){
trncodVo.setDisResult(errClsY);
trncodVo.setIsAllowed("N");
}
}
if ("FXTLCN".equals(trnNam)||"FXTSUC".equals(trnNam)||"FXTFCN".equals(trnNam)||"FXTDEN".equals(trnNam)) {
if (StringUtils.isEmpty(ftdgrp.getRec().getInr())){
trncodVo.setDisResult(errOpnN);
trncodVo.setIsAllowed("N");
}else if(ftdgrp.getCbs().getOpn2().getAmt().compareTo(BigDecimal.valueOf(0)) <= 0){
trncodVo.setDisResult(errAccN);
trncodVo.setIsAllowed("N");
}
if(Objects.nonNull(ftdgrp.getRec().getClsdat())){
trncodVo.setDisResult(errClsY);
trncodVo.setIsAllowed("N");
}
if(Objects.isNull(ftdgrp.getRec().getCnfdat())){
trncodVo.setDisResult(errCnfN);
trncodVo.setIsAllowed("N");
}
}
if(MdaUtils.isEmpty(trnNam)) {
String msgTxt = "The selected transaction cannot be started under the selected F/X.";
trncodVo.setDisResult(msgTxt);
trncodVo.setIsAllowed("N");
}
if(Strings.isEmpty(trncodVo.getDisResult())){
trncodVo.setIsAllowed("Y");
}
}
public void sav(Ftdgrp ftdgrp) {
trnmodService.trnStoreContract(ftdgrp);
......@@ -297,7 +222,7 @@ public class FtToolComponent {
}
public static void isFXTrnAllowed(Ftdgrp ftdgrp, TrncodVo trncodVo)
public static void isFTTrnAllowed(Ftdgrp ftdgrp, TrncodVo trncodVo)
{
ftdgrp.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