Commit f9d8b414 by jianglong

Merge branch 'develop' of http://114.115.138.98:8900/isc-v3.1/isc-funds into develop

parents dd008b0f 2909c2db
...@@ -2,12 +2,28 @@ ...@@ -2,12 +2,28 @@
funds_fxtssb_000000=Settlement funds_fxtssb_000000=Settlement
funds_fxtsss_000000=Settlement funds_fxtsss_000000=Settlement
funds_fxtsqo_000000=Settlement funds_fxtsqo_000000=Settlement
funds_fxtsqo_000001=远期结售汇交割提示:{0} funds_fxtsqo_000001=\u8fdc\u671f\u7ed3\u552e\u6c47\u4ea4\u5272\u63d0\u793a:{0}
funds_fxtsqo_000002=The clearing amount has to be positive. funds_fxtsqo_000002=The clearing amount has to be positive.
funds_fxtsqo_000003=非汇款业务请输入业务编号 funds_fxtsqo_000003=\u975e\u6c47\u6b3e\u4e1a\u52a1\u8bf7\u8f93\u5165\u4e1a\u52a1\u7f16\u53f7
funds_fxtsqo_000004={0} funds_fxtsqo_000004={0}
funds_fxtfop_000000=Foreign Exchange Liquidation funds_fxtfop_000000=Foreign Exchange Liquidation
funds_fxtfcn_CT000009=Foreign Exchange Liquidation funds_fxtfcn_CT000009=Foreign Exchange Liquidation
0136=This contract is overdrawn by {0} 0136=This contract is overdrawn by {0}
funds_fttfcm_000000=\u8d77\u606f\u65e5\u4e0d\u80fd\u5927\u4e8e\u5230\u671f\u65e5
funds_crtcri_000000=Clearing in funds_crtcri_000000=Clearing in
funds_crtcr0_000000=付款清算 funds_crtcr0_000000=\u4ed8\u6b3e\u6e05\u7b97
funds_inffxd_000000=Selected foreign exchange is already opened.
funds_inffxd_000001=No foreign exchange selected.
funds_inffxd_000002=Selected foreign exchange has been closed.
funds_inffxd_000003=Selected foreign exchange has been quoted.
funds_inffxd_000004=Selected foreign exchange has not quoted yet.
funds_inffxd_000005=Sight exchange cannot settle at maturity.
funds_inffxd_000006=Selected foreign exchange has been confirmed.
funds_inffxd_000007=Selected foreign exchange has not been confirmed.
funds_inffxd_000008=There is no amount in transit.
funds_inffxd_000009=\u6b64\u4ea4\u6613\u53ea\u80fd\u8d44\u91d1\u90e8\u7ecf\u529e\uff01
funds_inffxd_000010=\u6b64\u4ea4\u6613\u53ea\u80fd\u8425\u8fd0\u90e8\u7ecf\u529e\uff01
funds_inffxd_000011=Only Headoffice can quote.
funds_inffxd_000012=The former registration transaction(FXTSOP/FXTBOP) not released yet.
funds_inffxd_000013=Selected foreign exchange has been settled.
funds_inffxd_000014=The selected transaction cannot be started under the selected Foreign Exchange.
...@@ -2,15 +2,28 @@ ...@@ -2,15 +2,28 @@
funds_fxtssb_000000=Settlement funds_fxtssb_000000=Settlement
funds_fxtsss_000000=Settlement funds_fxtsss_000000=Settlement
funds_fxtsqo_000000=Settlement funds_fxtsqo_000000=Settlement
funds_fxtsqo_000001=Զ�ڽ��ۻ㽻����ʾ:{0} funds_fxtsqo_000001=\u8fdc\u671f\u7ed3\u552e\u6c47\u4ea4\u5272\u63d0\u793a:{0}
funds_fxtsqo_000002=The clearing amount has to be positive. funds_fxtsqo_000002=The clearing amount has to be positive.
funds_fxtsqo_000003=�ǻ��ҵ��������ҵ���� funds_fxtsqo_000003=\u975e\u6c47\u6b3e\u4e1a\u52a1\u8bf7\u8f93\u5165\u4e1a\u52a1\u7f16\u53f7
funds_fxtsqo_000004={0} funds_fxtsqo_000004={0}
funds_fxtfop_000000=Foreign Exchange Liquidation funds_fxtfop_000000=Foreign Exchange Liquidation
funds_fxtfcn_CT000009=Foreign Exchange Liquidation funds_fxtfcn_CT000009=Foreign Exchange Liquidation
0136=This contract is overdrawn by {0} 0136=This contract is overdrawn by {0}
funds_fttfcm_000000=\u8d77\u606f\u65e5\u4e0d\u80fd\u5927\u4e8e\u5230\u671f\u65e5
fttfcm=资金拆借到期提示:
funds_crtcri_000000=Clearing in funds_crtcri_000000=Clearing in
funds_crtcr0_000000= funds_crtcr0_000000=\u4ed8\u6b3e\u6e05\u7b97
funds_inffxd_000000=Selected foreign exchange is already opened.
funds_inffxd_000001=No foreign exchange selected.
funds_inffxd_000002=Selected foreign exchange has been closed.
funds_inffxd_000003=Selected foreign exchange has been quoted.
funds_inffxd_000004=Selected foreign exchange has not quoted yet.
funds_inffxd_000005=Sight exchange cannot settle at maturity.
funds_inffxd_000006=Selected foreign exchange has been confirmed.
funds_inffxd_000007=Selected foreign exchange has not been confirmed.
funds_inffxd_000008=There is no amount in transit.
funds_inffxd_000009=\u6b64\u4ea4\u6613\u53ea\u80fd\u8d44\u91d1\u90e8\u7ecf\u529e\uff01
funds_inffxd_000010=\u6b64\u4ea4\u6613\u53ea\u80fd\u8425\u8fd0\u90e8\u7ecf\u529e\uff01
funds_inffxd_000011=Only Headoffice can quote.
funds_inffxd_000012=The former registration transaction(FXTSOP/FXTBOP) not released yet.
funds_inffxd_000013=Selected foreign exchange has been settled.
funds_inffxd_000014=The selected transaction cannot be started under the selected Foreign Exchange.
...@@ -3,7 +3,6 @@ package com.brilliance.isc.funds.common.component; ...@@ -3,7 +3,6 @@ package com.brilliance.isc.funds.common.component;
import com.brilliance.isc.bo.Cbb; import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.bo.Fxd; import com.brilliance.isc.bo.Fxd;
import com.brilliance.isc.bo.Fxt; import com.brilliance.isc.bo.Fxt;
import com.brilliance.isc.bo.model.Cpacbs;
import com.brilliance.isc.bo.model.Fxacbs; import com.brilliance.isc.bo.model.Fxacbs;
import com.brilliance.isc.bo.model.Fxdgrp; import com.brilliance.isc.bo.model.Fxdgrp;
import com.brilliance.isc.common.cbsmod.service.CbsmodService; import com.brilliance.isc.common.cbsmod.service.CbsmodService;
...@@ -13,18 +12,21 @@ import com.brilliance.isc.common.exception.CommonServiceException; ...@@ -13,18 +12,21 @@ import com.brilliance.isc.common.exception.CommonServiceException;
import com.brilliance.isc.common.sysmod.SysmodService; import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.common.transaction.help.TransactionServiceSet; import com.brilliance.isc.common.transaction.help.TransactionServiceSet;
import com.brilliance.isc.common.trnmod.service.TrnmodService; import com.brilliance.isc.common.trnmod.service.TrnmodService;
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.util.Utils; import com.brilliance.isc.common.util.Utils;
import com.brilliance.isc.common.vo.PtsptaVo; import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.mda.dao.FxdMapper; import com.brilliance.isc.mda.dao.FxdMapper;
import com.brilliance.isc.mda.dao.FxtMapper; import com.brilliance.isc.mda.dao.FxtMapper;
import com.brilliance.isc.mda.dao.PublicMapper;
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.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils; import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.brilliance.mda.runtime.mda.util.Strings; import com.brilliance.mda.runtime.mda.util.Strings;
import org.springframework.beans.factory.annotation.Autowired; import com.google.common.collect.ImmutableBiMap;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -32,29 +34,32 @@ import java.util.HashMap; ...@@ -32,29 +34,32 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import static com.brilliance.mda.runtime.mda.Constants.CR;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR; import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Component @Component
public class FxToolComponent { public class FxToolComponent {
@Autowired @Resource
private FxdMapper fxdMapper; private FxdMapper fxdMapper;
@Autowired @Resource
private FxtMapper fxtMapper; private FxtMapper fxtMapper;
@Autowired @Resource
private PtsptaToolComponent ptsptaToolComponent; private PtsptaToolComponent ptsptaToolComponent;
@Autowired @Resource
private CbsmodService cbsmodService; private CbsmodService cbsmodService;
@Autowired @Resource
private SysmodService sysmodService; private SysmodService sysmodService;
@Autowired @Resource
private TrnmodService trnmodService; private TrnmodService trnmodService;
@Resource
private PublicMapper publicMapper;
public Fxdgrp getFxdgrpByInr(String inr) { public Fxdgrp getFxdgrpByInr(String inr) {
Fxd rec = new Fxd(); Fxd rec = new Fxd();
...@@ -231,9 +236,9 @@ public class FxToolComponent { ...@@ -231,9 +236,9 @@ public class FxToolComponent {
public String getFxdInrByOwnref(String ownref) { public String getFxdInrByOwnref(String ownref) {
Fxd fxd= fxdMapper.selectByOwnref(ownref); Fxd fxd = fxdMapper.selectByOwnref(ownref);
if (fxd !=null && StringUtils.isNotEmpty(fxd.getInr())) { if (fxd != null && StringUtils.isNotEmpty(fxd.getInr())) {
return fxd.getInr(); return fxd.getInr();
} else { } else {
return null; return null;
...@@ -242,9 +247,7 @@ public class FxToolComponent { ...@@ -242,9 +247,7 @@ public class FxToolComponent {
} }
public static void isFXTrnAllowed(Fxdgrp fxdgrp, TrncodVo trncodVo) {
public static void isFXTrnAllowed(Fxdgrp fxdgrp, TrncodVo trncodVo)
{
fxdgrp.reset(); fxdgrp.reset();
String trnNam = trncodVo.getInifrm().toUpperCase(); String trnNam = trncodVo.getInifrm().toUpperCase();
...@@ -257,34 +260,33 @@ public class FxToolComponent { ...@@ -257,34 +260,33 @@ public class FxToolComponent {
String errCnfY = "Selected foreign exchange has been confirmed."; String errCnfY = "Selected foreign exchange has been confirmed.";
String errCnfN = "Selected foreign exchange has not been confirmed."; String errCnfN = "Selected foreign exchange has not been confirmed.";
String errAccN = "There is no amount in transit."; String errAccN = "There is no amount in transit.";
String errZJB = "此交易只能资金部经办!"; String errZJB = "此交易只能资金部经办!";
String errYYB = "此交易只能营运部经办!"; String errYYB = "此交易只能营运部经办!";
String errHO = "Only Headoffice can quote."; String errHO = "Only Headoffice can quote.";
String errRel = "The former registration transaction(FXTSOP/FXTBOP) not released yet."; String errRel = "The former registration transaction(FXTSOP/FXTBOP) not released yet.";
String errSetY = "Selected foreign exchange has been settled."; String errSetY = "Selected foreign exchange has been settled.";
String errLB = ""; String errLB = "";
if ("FXTLOP".equals(trnNam) || "FXTFOP".equals(trnNam) || "FXTDEP".equals(trnNam)) {
if ("FXTLOP".equals(trnNam)||"FXTFOP".equals(trnNam)||"FXTDEP".equals(trnNam)) { if (!StringUtils.isEmpty(fxdgrp.getRec().getInr())) {
if (!StringUtils.isEmpty(fxdgrp.getRec().getInr())){
trncodVo.setDisResult(errOpnY); trncodVo.setDisResult(errOpnY);
trncodVo.setIsAllowed("N"); trncodVo.setIsAllowed("N");
} }
} }
if ("FXTLCM".equals(trnNam)||"FXTFCM".equals(trnNam)||"FXTDEM".equals(trnNam)) { if ("FXTLCM".equals(trnNam) || "FXTFCM".equals(trnNam) || "FXTDEM".equals(trnNam)) {
if (StringUtils.isEmpty(fxdgrp.getRec().getInr())){ if (StringUtils.isEmpty(fxdgrp.getRec().getInr())) {
trncodVo.setDisResult(errOpnN); trncodVo.setDisResult(errOpnN);
trncodVo.setIsAllowed("N"); trncodVo.setIsAllowed("N");
}else if(Objects.nonNull(fxdgrp.getRec().getCnfdat())){ } else if (Objects.nonNull(fxdgrp.getRec().getCnfdat())) {
trncodVo.setDisResult(errCnfY); trncodVo.setDisResult(errCnfY);
trncodVo.setIsAllowed("N"); trncodVo.setIsAllowed("N");
} }
if(Objects.nonNull(fxdgrp.getRec().getClsdat())){ if (Objects.nonNull(fxdgrp.getRec().getClsdat())) {
trncodVo.setDisResult(errClsY); trncodVo.setDisResult(errClsY);
trncodVo.setIsAllowed("N"); trncodVo.setIsAllowed("N");
} }
...@@ -299,21 +301,21 @@ public class FxToolComponent { ...@@ -299,21 +301,21 @@ public class FxToolComponent {
} }
if ("FXTLCN".equals(trnNam)||"FXTSUC".equals(trnNam)||"FXTFCN".equals(trnNam)||"FXTDEN".equals(trnNam)) { if ("FXTLCN".equals(trnNam) || "FXTSUC".equals(trnNam) || "FXTFCN".equals(trnNam) || "FXTDEN".equals(trnNam)) {
if (StringUtils.isEmpty(fxdgrp.getRec().getInr())){ if (StringUtils.isEmpty(fxdgrp.getRec().getInr())) {
trncodVo.setDisResult(errOpnN); trncodVo.setDisResult(errOpnN);
trncodVo.setIsAllowed("N"); trncodVo.setIsAllowed("N");
}else if(fxdgrp.getCbs().getOpn2().getAmt().compareTo(BigDecimal.valueOf(0)) <= 0){ } else if (fxdgrp.getCbs().getOpn2().getAmt().compareTo(BigDecimal.valueOf(0)) <= 0) {
trncodVo.setDisResult(errAccN); trncodVo.setDisResult(errAccN);
trncodVo.setIsAllowed("N"); trncodVo.setIsAllowed("N");
} }
if(Objects.nonNull(fxdgrp.getRec().getClsdat())){ if (Objects.nonNull(fxdgrp.getRec().getClsdat())) {
trncodVo.setDisResult(errClsY); trncodVo.setDisResult(errClsY);
trncodVo.setIsAllowed("N"); trncodVo.setIsAllowed("N");
} }
if(Objects.isNull(fxdgrp.getRec().getCnfdat())){ if (Objects.isNull(fxdgrp.getRec().getCnfdat())) {
trncodVo.setDisResult(errCnfN); trncodVo.setDisResult(errCnfN);
trncodVo.setIsAllowed("N"); trncodVo.setIsAllowed("N");
} }
...@@ -321,14 +323,388 @@ public class FxToolComponent { ...@@ -321,14 +323,388 @@ public class FxToolComponent {
} }
if(MdaUtils.isEmpty(trnNam)) { if (MdaUtils.isEmpty(trnNam)) {
String msgTxt = "The selected transaction cannot be started under the selected F/X."; String msgTxt = "The selected transaction cannot be started under the selected F/X.";
trncodVo.setDisResult(msgTxt); trncodVo.setDisResult(msgTxt);
trncodVo.setIsAllowed("N"); trncodVo.setIsAllowed("N");
} }
if(Strings.isEmpty(trncodVo.getDisResult())){ if (Strings.isEmpty(trncodVo.getDisResult())) {
trncodVo.setIsAllowed("Y"); trncodVo.setIsAllowed("Y");
} }
} }
/**
* source:fxdlod.0011.script
*/
public void isFXTrnAllowed2(Fxdgrp argFxdGrp, TrncodVo trncodVo) {
//! Defines, which transaction can be executed based on the passed contract.
//! The passed contract has to be loaded completely.
//! If the Transaction is allowed ArgRes returns an empty value.
//! otherwise ArgRes will hold an Errormessage.
// normally the decision, if a transaction is allowed, is based on the
// following 3 information:
// - contract loaded (ArgLidGrp\\rec\\inr not empty)
// - contract opened (ArgLidGrp\\rec\\opndat not empty)
// - contract not closed (ArgLidGrp\\rec\\clsdat empty)
// Initially set the return values to allowed and no errormessage.
argFxdGrp.reset();
String trnNam = trncodVo.getInifrm();
boolean res = true;
// Initialize the variables used to assemble errormessage
// Attention: MagTxt maximum size is 5 rows with 80 digits per row
String msgTxt = "";
String cr = "";
//Errortexts
String errOpnY = I18nUtil.getMessage("funds_inffxd_000000");
String errOpnN = I18nUtil.getMessage("funds_inffxd_000001");
String errClsY = I18nUtil.getMessage("funds_inffxd_000002");
String errQuoY = I18nUtil.getMessage("funds_inffxd_000003");
String errQuoN = I18nUtil.getMessage("funds_inffxd_000004");
String errSigY = I18nUtil.getMessage("funds_inffxd_000005");
String errCnfY = I18nUtil.getMessage("funds_inffxd_000006");
String errCnfN = I18nUtil.getMessage("funds_inffxd_000007");
String errAccN = I18nUtil.getMessage("funds_inffxd_000008");
String errZJB = I18nUtil.getMessage("funds_inffxd_000009");
String errYYB = I18nUtil.getMessage("funds_inffxd_000010");
String errHO = I18nUtil.getMessage("funds_inffxd_000011");
String errRel = I18nUtil.getMessage("funds_inffxd_000012");
String errSetY = I18nUtil.getMessage("funds_inffxd_000013");
String errLB = "";
// All transactions should be listed in the select case.
// A condition might inhibit the usage of the contract with the specified
// transaction by either setting $Res to false or by setting an errormessage
// into ArgRes.
switch (Strings.toUpper(trnNam)) {
case "FXTSOP":
case "FXTBOP":
case "FXTSSS":
case "FXTSSB":
case "FXTSUS":
case "FXTSUB":
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnY;
cr = CR;
res = false;
}
/**
if CheckUsrBranch( "1" ) then # 结售汇登记交易只能营运部做
$MsgTxt = $MsgTxt + $CR + $ErrYYB
$CR = CR
$res = FALSE
endif
**/
break;
case "FXTSQO":
if (MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnN;
cr = CR;
res = false;
}
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getClsdat())) {
msgTxt = msgTxt + cr + errClsY;
cr = CR;
res = false;
}
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getRat())) {
msgTxt = msgTxt + cr + errQuoY;
cr = CR;
res = false;
}
/**
if not CheckUsrBranch( "1" ) then # 结售汇报价交易只能资金部做
$MsgTxt = $MsgTxt + $CR + $ErrZJB
$CR = CR
$res = FALSE
endif
if \\SYSMOD\\BCH\\LEV <> "0" then
$MsgTxt = $MsgTxt + $CR + $ErrHO
$CR = CR
$res = FALSE
endif
**/
if (!checkRelStatus(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errRel;
cr = CR;
res = false;
}
break;
case "FXTSST":
case "FXTSCN":
if (MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnN;
cr = CR;
res = false;
} else {
if (MdaUtils.compareTo(Strings.mid(argFxdGrp.getRec().getFxtyp(), 1, 1), "S") == 0) {
msgTxt = msgTxt + cr + errSigY;
cr = CR;
res = false;
}
}
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getClsdat())) {
msgTxt = msgTxt + cr + errClsY;
cr = CR;
res = false;
}
if (MdaUtils.isEmpty(argFxdGrp.getRec().getRat())) {
msgTxt = msgTxt + cr + errQuoN;
cr = CR;
res = false;
}
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getCnfdat())) {
msgTxt = msgTxt + cr + errSetY;
cr = CR;
res = false;
}
/**
if not CheckUsrBranch( "2" ) then # 结售汇到期、撤销交易只能营运部做
$MsgTxt = $MsgTxt + $CR + $ErrYYB
$CR = CR
$res = FALSE
endif
**/
break;
case "FXTEOP":
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnY;
cr = CR;
res = false;
}
/**
if CheckUsrBranch( "1" ) then # 代客外汇买卖登记交易只能营运部做
$MsgTxt = $MsgTxt + $CR + $ErrYYB
$CR = CR
$res = FALSE
endif
**/
break;
case "FXTEQO":
/**
if not IsEmpty( ArgFxdGrp\\Rec\\Inr ) then
$MsgTxt = $MsgTxt + $CR + $ErrOpnY
$CR = CR
$res = FALSE
endif
**/
if (MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnN;
cr = CR;
res = false;
}
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getClsdat())) {
msgTxt = msgTxt + cr + errClsY;
cr = CR;
res = false;
}
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getRat())) {
msgTxt = msgTxt + cr + errQuoY;
cr = CR;
res = false;
}
if (!checkUsrBranch("1")) { // 代客外汇买卖报价交易只能资金部做
msgTxt = msgTxt + cr + errZJB;
cr = CR;
res = false;
}
if (!checkRelStatus(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errRel;
cr = CR;
res = false;
}
break;
case "FXTLEP":
if (MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnN;
cr = CR;
res = false;
} else {
if (MdaUtils.compareTo(argFxdGrp.getCbs().getOpn1().getAmt(), 0) == 0) {
msgTxt = msgTxt + cr + errLB;
cr = CR;
res = false;
}
}
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getClsdat())) {
msgTxt = msgTxt + cr + errClsY;
cr = CR;
res = false;
}
if (!checkRelStatus(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errRel;
cr = CR;
res = false;
}
break;
case "FXTLOP":
case "FXTFOP":
case "FXTDEP":
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnY;
cr = CR;
res = false;
}
break;
case "FXTLCM":
case "FXTFCM":
case "FXTDEM":
if (MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnN;
cr = CR;
res = false;
} else {
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getCnfdat())) {
msgTxt = msgTxt + cr + errCnfY;
cr = CR;
res = false;
}
}
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getClsdat())) {
msgTxt = msgTxt + cr + errClsY;
cr = CR;
res = false;
}
if (!checkUsrBranch("2")) { // 结售汇平盘确认交易只能营运部做
msgTxt = msgTxt + cr + errYYB;
cr = CR;
res = false;
}
break;
case "FXTLCN":
case "FXTSUC":
case "FXTFCN":
case "FXTDEN":
if (MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnN;
cr = CR;
res = false;
} else {
if (MdaUtils.compareTo(argFxdGrp.getCbs().getOpn2().getAmt(), 0) <= 0) {
msgTxt = msgTxt + cr + errAccN;
cr = CR;
res = false;
}
/**
if ( ArgFxdGrp\\Rec\\FxTyp == "LB" and ArgFxdGrp\\Cbs\\Opn1\\Amt > 0 ) or ArgFxdGrp\\Cbs\\Opn2\\Amt <= 0 then
$MsgTxt = $MsgTxt + $CR + $ErrLB
$CR = CR
$res = FALSE
endif
**/
}
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getClsdat())) {
msgTxt = msgTxt + cr + errClsY;
cr = CR;
res = false;
}
if (MdaUtils.isEmpty(argFxdGrp.getRec().getCnfdat())) {
msgTxt = msgTxt + cr + errCnfN;
cr = CR;
res = false;
}
/**
if not CheckUsrBranch( "2" ) then # 结售汇平盘销账交易只能营运部做
$MsgTxt = $MsgTxt + $CR + $ErrYYB
$CR = CR
$res = FALSE
endif
**/
//代客外汇买卖平盘
break;
case "FXTLER":
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnY;
cr = CR;
res = false;
}
break;
case "FXTLEM":
if (MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnN;
cr = CR;
res = false;
} else {
if (MdaUtils.compareTo(argFxdGrp.getCbs().getOpn2().getAmt(), 0) == 0) {
msgTxt = msgTxt + cr + errLB;
cr = CR;
res = false;
}
}
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getClsdat())) {
msgTxt = msgTxt + cr + errClsY;
cr = CR;
res = false;
}
if (!checkRelStatus(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errRel;
cr = CR;
res = false;
}
break;
case "FXTLEN":
if (MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnN;
cr = CR;
res = false;
} else {
//if ( ArgFxdGrp\\Rec\\FxTyp = "LX" and ArgFxdGrp\\Cbs\\Opn1\\Amt > 0 ) or ArgFxdGrp\\Cbs\\Opn2\\Amt <= 0 then
if (MdaUtils.compareTo(argFxdGrp.getCbs().getOpn1().getAmt(), 0) == 0) {
msgTxt = msgTxt + cr + errLB;
cr = CR;
res = false;
}
}
if (!MdaUtils.isEmpty(argFxdGrp.getRec().getClsdat())) {
msgTxt = msgTxt + cr + errClsY;
cr = CR;
res = false;
}
if (!checkRelStatus(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errRel;
cr = CR;
res = false;
}
break;
case "FXTATT":
if (MdaUtils.isEmpty(argFxdGrp.getRec().getInr())) {
msgTxt = msgTxt + cr + errOpnN;
cr = CR;
res = false;
}
break;
}
// If $Res is set to false and no errormessage is set
// set a default errormessage.
if (!res && MdaUtils.isEmpty(msgTxt)) {
msgTxt = I18nUtil.getMessage("funds_inffxd_000014");
}
// Transfer of assembled error message to ArgRes
// argRes.value = msgTxt;
trncodVo.setDisResult(msgTxt);
trncodVo.setIsAllowed(res ? "Y" : "N");
}
/**
* source:sysmod.0257.script
*/
public boolean checkUsrBranch(String bchflg) {
// 检查交易是否为允许的机构经办
// 威海不区分资金部和清算部
return true;
}
/**
* source:fxdlod.0012.script
*/
public boolean checkRelStatus(String objInr) {
String sql = "SELECT count(inr) FROM TRN WHERE RELFLG='W' and INIFRM IN ('FXTSOP', 'FXTBOP', 'FXTSSS', 'FXTSSB', 'FXTSUS', 'FXTSUB') " +
"AND INR IN (SELECT TRNINR FROM TRO WHERE OBJTYP = 'FXD' AND OBJINR='" + objInr + "' )";
int count = publicMapper.dyncCount(ImmutableBiMap.of("sql", sql));
return count <= 0;
}
} }
...@@ -140,7 +140,6 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt ...@@ -140,7 +140,6 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
serviceRegisterMaps.put(CommonContants.TRNDOC_SERVICE, "N"); serviceRegisterMaps.put(CommonContants.TRNDOC_SERVICE, "N");
serviceRegisterMaps.put(CommonContants.GLEMOD_SERVICE, "Y"); serviceRegisterMaps.put(CommonContants.GLEMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNMOD_SERVICE, "Y"); serviceRegisterMaps.put(CommonContants.TRNMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.BOPSET_JSH_SERVICE, "Y");
} }
...@@ -237,6 +236,7 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt ...@@ -237,6 +236,7 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
crtcriStoreBo.reset(); crtcriStoreBo.reset();
init950(crtcriStoreBo); init950(crtcriStoreBo);
init1000(crtcriStoreBo); init1000(crtcriStoreBo);
crtpService.defaultClearingN1000(crtcriStoreBo);
return crtcriStoreBo; return crtcriStoreBo;
} }
...@@ -315,8 +315,6 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt ...@@ -315,8 +315,6 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
*/ */
private void init950(CrtcriStoreBo crtcriStoreBo) { private void init950(CrtcriStoreBo crtcriStoreBo) {
crtcriStoreBo.setClrsta("I"); crtcriStoreBo.setClrsta("I");
String extkey = SettleContext.getUserSession().getUsr().getExtkey();
crtcriStoreBo.getCrdgrp().getRec().setOwnusr(extkey);
defaultCrdgrpRecCustypN1000(crtcriStoreBo); defaultCrdgrpRecCustypN1000(crtcriStoreBo);
} }
......
...@@ -24,6 +24,7 @@ import com.brilliance.isc.common.vo.BizAmdInfoVo; ...@@ -24,6 +24,7 @@ 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.funds.bo.funds.CrtcroStoreBo; import com.brilliance.isc.funds.bo.funds.CrtcroStoreBo;
import com.brilliance.isc.funds.common.component.CrToolComponent; import com.brilliance.isc.funds.common.component.CrToolComponent;
import com.brilliance.isc.funds.crtcri.service.CrtpService;
import com.brilliance.isc.funds.crtcro.check.CrtcroValidator; import com.brilliance.isc.funds.crtcro.check.CrtcroValidator;
import com.brilliance.isc.mda.dao.ActMapper; import com.brilliance.isc.mda.dao.ActMapper;
import com.brilliance.isc.mda.dao.GleMapper; import com.brilliance.isc.mda.dao.GleMapper;
...@@ -31,7 +32,9 @@ import com.brilliance.isc.mda.dao.PtyMapper; ...@@ -31,7 +32,9 @@ import com.brilliance.isc.mda.dao.PtyMapper;
import com.brilliance.isc.mda.dao.SmhMapper; import com.brilliance.isc.mda.dao.SmhMapper;
import com.brilliance.isc.vo.funds.CrdBizInfoVo; import com.brilliance.isc.vo.funds.CrdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.Dates; import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.Formats;
import com.brilliance.mda.runtime.mda.util.MdaUtils; import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.brilliance.mda.runtime.mda.util.Strings;
import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableBiMap;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -101,19 +104,22 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt ...@@ -101,19 +104,22 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
@Resource @Resource
private PtyMapper ptyMapper; private PtyMapper ptyMapper;
@Resource
private CrtpService crtpService;
@PostConstruct @PostConstruct
public void regisertService() { public void regisertService() {
serviceRegisterMaps.put(CommonContants.SETMOD_SERVICE, "Y"); serviceRegisterMaps.put(CommonContants.SETMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNDOC_SERVICE, "N"); serviceRegisterMaps.put(CommonContants.TRNDOC_SERVICE, "N");
serviceRegisterMaps.put(CommonContants.GLEMOD_SERVICE, "Y"); serviceRegisterMaps.put(CommonContants.GLEMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNMOD_SERVICE, "Y"); serviceRegisterMaps.put(CommonContants.TRNMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.BOPSET_JSH_SERVICE, "Y");
} }
@Override @Override
protected void txnSave(CrtcroStoreBo transactionVo) { protected void txnSave(CrtcroStoreBo bo) {
ruleMtabutSavN500(transactionVo); defaultCrdgrpRecNamN1000(bo);
ruleMtabutSavN500(bo);
} }
/** /**
...@@ -139,7 +145,6 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt ...@@ -139,7 +145,6 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
* source:crtcro.0021.script * source:crtcro.0021.script
*/ */
private void cbsSav(CrtcroStoreBo bo) { private void cbsSav(CrtcroStoreBo bo) {
TrnmodVo trnmodVo = transactionHelpService.getTransactionStoreSet().getTrnmodVo();
String trninr = transactionHelpService.getTrninr(); String trninr = transactionHelpService.getTrninr();
cbsmodService.cbsTrnSetNew("TRN", trninr); cbsmodService.cbsTrnSetNew("TRN", trninr);
trnmodService.cbsTrnStore("MAXAMT", "AMT1", Dates.today(), bo.getCrdgrp().getCbs().getMax().getCur(), bo.getCrdgrp().getCbs().getMax().getAmt() trnmodService.cbsTrnStore("MAXAMT", "AMT1", Dates.today(), bo.getCrdgrp().getCbs().getMax().getCur(), bo.getCrdgrp().getCbs().getMax().getAmt()
...@@ -147,14 +152,14 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt ...@@ -147,14 +152,14 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
} }
@Override @Override
protected Map<String, String> txnCheck(CrtcroStoreBo transactionVo) { protected Map<String, String> txnCheck(CrtcroStoreBo bo) {
return crtcroValidator.validate(transactionVo); return crtcroValidator.validate(bo);
} }
@Override @Override
protected BizInfoVo buildBizInfo(CrtcroStoreBo transactionVo) { protected BizInfoVo buildBizInfo(CrtcroStoreBo bo) {
Crd rec = transactionVo.getCrdgrp().getRec(); Crd rec = bo.getCrdgrp().getRec();
Crtp crtp = transactionVo.getCrtp(); Crtp crtp = bo.getCrtp();
CrdBizInfoVo bizInfoVo = new CrdBizInfoVo(); CrdBizInfoVo bizInfoVo = new CrdBizInfoVo();
bizInfoVo.setObjinr(rec.getInr()); bizInfoVo.setObjinr(rec.getInr());
bizInfoVo.setObjtyp("CRD"); bizInfoVo.setObjtyp("CRD");
...@@ -162,25 +167,31 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt ...@@ -162,25 +167,31 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
bizInfoVo.setOpndat(rec.getOpndat()); bizInfoVo.setOpndat(rec.getOpndat());
bizInfoVo.setRcvbchinr(rec.getRcvbchinr()); bizInfoVo.setRcvbchinr(rec.getRcvbchinr());
bizInfoVo.setCustyp(rec.getCustyp()); bizInfoVo.setCustyp(rec.getCustyp());
String act = transactionVo.getSpcgle().getAct(); String act = bo.getSpcgle().getAct();
bizInfoVo.setSpcgleAct(act); bizInfoVo.setSpcgleAct(act);
bizInfoVo.setRcvobjtyp(rec.getRcvobjtyp()); bizInfoVo.setRcvobjtyp(rec.getRcvobjtyp());
Cpd cpd = transactionVo.getCpdgrp().getRec(); Cpd cpd = bo.getCpdgrp().getRec();
bizInfoVo.setValdat(cpd.getValdat()); bizInfoVo.setValdat(cpd.getValdat());
bizInfoVo.setBranchInr(rec.getBranchinr());
bizInfoVo.setBchkeyinr(rec.getBchkeyinr());
bizInfoVo.setOwnref(rec.getOwnref());
return bizInfoVo; return bizInfoVo;
} }
@Override @Override
protected BizAmdInfoVo buildBizAmdInfo(CrtcroStoreBo transactionVo) { protected BizAmdInfoVo buildBizAmdInfo(CrtcroStoreBo bo) {
return null; return null;
} }
@Override @Override
public CrtcroStoreBo init(CrtcroStoreBo crtcroStoreBo) { public CrtcroStoreBo init(CrtcroStoreBo bo) {
crtcroStoreBo.reset(); bo.reset();
init950(crtcroStoreBo); init950(bo);
init1000(crtcroStoreBo); init1000(bo);
return crtcroStoreBo; crtpService.defaultClearingN1000(bo);
crtpService.defaultCrdgrpRecOwnusrN1000(bo);
return bo;
} }
/** /**
...@@ -222,7 +233,7 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt ...@@ -222,7 +233,7 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
// 查找绑定这笔202的其他SWIFT报文信息 // 查找绑定这笔202的其他SWIFT报文信息
switch (bo.getCrdgrp().getRec().getRcvobjtyp()) { switch (bo.getCrdgrp().getRec().getRcvobjtyp()) {
case "CPD": case "CPD":
// Platform.getCPdGrp(this.getCpdgrp(),this.getCrdgrp().getRec().getRcvobjinr()); // Platform.getCPdGrp(bo.getCpdgrp(),bo.getCrdgrp().getRec().getRcvobjinr());
Cpdgrp dbCpdgrp = crToolComponent.getCpdgrpByInr(bo.getCrdgrp().getRec().getRcvobjinr()); Cpdgrp dbCpdgrp = crToolComponent.getCpdgrpByInr(bo.getCrdgrp().getRec().getRcvobjinr());
bo.setCpdgrp(dbCpdgrp); bo.setCpdgrp(dbCpdgrp);
// 汇出汇款发103+202 // 汇出汇款发103+202
...@@ -313,37 +324,36 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt ...@@ -313,37 +324,36 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
String maxCur = bo.getCrdgrp().getCbs().getMax().getCur(); String maxCur = bo.getCrdgrp().getCbs().getMax().getCur();
readAct("", ptyInr, bo.getPacact(), maxCur); readAct("", ptyInr, bo.getPacact(), maxCur);
// if (Objects.isNull(bo.getPacact()) || StringUtils.isEmpty(bo.getPacact().getInr())) { if (Objects.isNull(bo.getPacact()) || StringUtils.isEmpty(bo.getPacact().getInr())) {
// MdaUtils.clear(bo.getPacact()); // MdaUtils.clear(bo.getPacact());
// } bo.setPacact(new Act());
}
} }
} }
private void init950(CrtcroStoreBo crtcroStoreBo) { private void init950(CrtcroStoreBo bo) {
crtcroStoreBo.setClrsta("O"); bo.setClrsta("O");
String extkey = SettleContext.getUserSession().getUsr().getExtkey();
crtcroStoreBo.getCrdgrp().getRec().setOwnusr(extkey);
} }
@Override @Override
public void beforeSave(CrtcroStoreBo transactionVo) { public void beforeSave(CrtcroStoreBo bo) {
transactionVo.reset(); bo.reset();
transactionVo.reset(); bo.reset();
Crdgrp crdgrp = transactionVo.getCrdgrp(); Crdgrp crdgrp = bo.getCrdgrp();
TransactionServiceSet transactionServiceSet = transactionHelpService.getTransactionStoreSet(); TransactionServiceSet transactionServiceSet = transactionHelpService.getTransactionStoreSet();
transactionServiceSet.setRec(crdgrp.getRec()); transactionServiceSet.setRec(crdgrp.getRec());
transactionServiceSet.setTransactionVo(transactionVo); transactionServiceSet.setTransactionVo(bo);
crToolComponent.collectCbsMap(transactionServiceSet, "", crdgrp.getCbs(), "max"); crToolComponent.collectCbsMap(transactionServiceSet, "", crdgrp.getCbs(), "max");
crToolComponent.collectPtsList(transactionServiceSet, crdgrp, null); crToolComponent.collectPtsList(transactionServiceSet, crdgrp, null);
settleContext.loadSettleSession(transactionVo.getTransName(), transactionVo.getUserId(), buildBizInfo(transactionVo), transactionServiceSet.getPtsList()); settleContext.loadSettleSession(bo.getTransName(), bo.getUserId(), buildBizInfo(bo), transactionServiceSet.getPtsList());
} }
@Override @Override
protected void updateBizInfoVo(BizInfoVo bizInfoVo, CrtcroStoreBo transactionVo) { protected void updateBizInfoVo(BizInfoVo bizInfoVo, CrtcroStoreBo bo) {
bizInfoVo.setObjinr(transactionVo.getCrdgrp().getRec().getInr()); bizInfoVo.setObjinr(bo.getCrdgrp().getRec().getInr());
} }
...@@ -363,7 +373,7 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt ...@@ -363,7 +373,7 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
* @param holPtyInr * @param holPtyInr
* @param serPtyInr * @param serPtyInr
* @param act * @param act
* @param cur this.getCrdgrp().getCbs().getMax().getCur() * @param cur bo.getCrdgrp().getCbs().getMax().getCur()
*/ */
public void readAct(String holPtyInr, String serPtyInr, Act act, String cur) { public void readAct(String holPtyInr, String serPtyInr, Act act, String cur) {
String sql = "SELECT * from act WHERE HOLPTYINR = '" + holPtyInr + "' AND SERPTYINR = '" + serPtyInr + "' AND CUR = '" + cur + "' AND TYP = 'DB'"; String sql = "SELECT * from act WHERE HOLPTYINR = '" + holPtyInr + "' AND SERPTYINR = '" + serPtyInr + "' AND CUR = '" + cur + "' AND TYP = 'DB'";
...@@ -373,4 +383,30 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt ...@@ -373,4 +383,30 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
} }
} }
/**
* source:crtcro.0018.script
*/
public void defaultCrdgrpRecNamN1000(CrtcroStoreBo bo) {
//! Default name of contract; usually contract amount and information about the client is used
if (!bo.getCrdgrp().getRec().isModified("nam")) {
if (MdaUtils.compareTo(bo.getCrdgrp().getRec().getClrtyp(), "O") == 0) {
// Dynamic.ptsmodGetPtyOfPtspta(bo.getCrdgrp().getRcv(), bo.getTrnmod().getPtsmod().getPty());
String nam = bo.getCrdgrp().getRec().getMsgtyp() + " " + bo.getCrdgrp().getCbs().getMax().getCur()
+ " " + Formats.fmtAmount(bo.getCrdgrp().getCbs().getMax().getAmt(), bo.getCrdgrp().getCbs().getMax().getCur())
+ " " + bo.getCrdgrp().getRec().getRcvobjtyp() + "/" + bo.getCrdgrp().getRcv().getPts().getNam();
//nam 最多允许存放40个中文
bo.getCrdgrp().getRec().setNam(Strings.mid(nam, 1, 40));
} else {
// Dynamic.ptsmodGetPtyOfPtspta(bo.getCrdgrp().getSnd(), bo.getTrnmod().getPtsmod().getPty());
String nam = bo.getCrdgrp().getRec().getMsgtyp() + " " + bo.getCrdgrp().getCbs().getMax().getCur()
+ " " + Formats.fmtAmount(bo.getCrdgrp().getCbs().getMax().getAmt(), bo.getCrdgrp().getCbs().getMax().getCur())
+ " " + bo.getCrdgrp().getRec().getRcvobjtyp() + "/" + bo.getCrdgrp().getSnd().getPta().getNam();
//nam 最多允许存放40个中文
bo.getCrdgrp().getRec().setNam(Strings.mid(nam, 1, 40));
}
}
}
} }
package com.brilliance.isc.funds.fttfcm.check; package com.brilliance.isc.funds.fttfcm.check;
import com.brilliance.isc.bo.Act;
import com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator; import com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator;
import com.brilliance.isc.common.transaction.newcheck.ValidResult; import com.brilliance.isc.common.transaction.newcheck.ValidResult;
import com.brilliance.isc.common.transaction.newcheck.Validate; import com.brilliance.isc.common.transaction.newcheck.Validate;
import com.brilliance.isc.common.util.Utils; import com.brilliance.isc.common.util.I18nUtil;
import com.brilliance.isc.funds.bo.funds.FttfcmStoreBo; import com.brilliance.isc.funds.bo.funds.FttfcmStoreBo;
import com.brilliance.isc.funds.bo.funds.FxtfcmStoreBo;
import com.brilliance.mda.runtime.mda.util.Dates; import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils; import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import static com.brilliance.mda.runtime.mda.Constants.*; import static com.brilliance.mda.runtime.mda.Constants.PanStaAdd;
import static com.brilliance.mda.runtime.mda.Constants.PanStaEdit;
/** /**
* @program: isc-funds * @program: isc-funds
...@@ -27,12 +24,13 @@ import static com.brilliance.mda.runtime.mda.Constants.*; ...@@ -27,12 +24,13 @@ import static com.brilliance.mda.runtime.mda.Constants.*;
* @create: 2024-10-11 11:28 * @create: 2024-10-11 11:28
*/ */
@Component @Component
public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{ public class FttfcmValidator extends AbstractModuleValidator<FttfcmStoreBo> {
@Override @Override
@PostConstruct @PostConstruct
public void register(){ public void register() {
super.register();; super.register();
;
} }
@Override @Override
...@@ -43,30 +41,25 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{ ...@@ -43,30 +41,25 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
} }
/** /**
* source:fttfcm.0018.script * source:fttfcm.0018.script
*/ */
@Validate(path="fttp.mt32m.s30x") @Validate(path = "fttp.mt32m.s30x")
public ValidResult checkFttpMt32mS30xN1000(FttfcmStoreBo bo){ public ValidResult checkFttpMt32mS30xN1000(FttfcmStoreBo bo) {
if( ( MdaUtils.compareTo(bo.getFttp().getMt32m().getS22b(),"CONF") == 0 || MdaUtils.compareTo(bo.getFttp().getMt32m().getS22b(),"ROLL") == 0 ) && MdaUtils.isEmpty(bo.getFttp().getMt32m().getS30x()) ) if ((MdaUtils.compareTo(bo.getFttp().getMt32m().getS22b(), "CONF") == 0 || MdaUtils.compareTo(bo.getFttp().getMt32m().getS22b(), "ROLL") == 0) && MdaUtils.isEmpty(bo.getFttp().getMt32m().getS30x())) {
{ return errorMandatory();
return errorMandatory();
} }
return null; return null;
} }
/** /**
* source:fttfcm.0022.script * source:fttfcm.0022.script
*/ */
@Validate(path="ftdgrp.cbs.ins.amt") @Validate(path = "ftdgrp.cbs.ins.amt")
public ValidResult checkFtdgrpCbsInsAmtN1000(FttfcmStoreBo bo){ public ValidResult checkFtdgrpCbsInsAmtN1000(FttfcmStoreBo bo) {
if( MdaUtils.compareTo(bo.getFttp().getPansta(),PanStaAdd) == 0 || MdaUtils.compareTo(bo.getFttp().getPansta(),PanStaEdit) == 0 ) if (MdaUtils.compareTo(bo.getFttp().getPansta(), PanStaAdd) == 0 || MdaUtils.compareTo(bo.getFttp().getPansta(), PanStaEdit) == 0) {
{ if (MdaUtils.isEmpty(bo.getFtdgrp().getCbs().getIns().getAmt())) {
if( MdaUtils.isEmpty(bo.getFtdgrp().getCbs().getIns().getAmt()) ) return errorMandatory();
{
return errorMandatory();
} }
} }
...@@ -75,13 +68,12 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{ ...@@ -75,13 +68,12 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
} }
/** /**
* source:fttfcm.0023.script * source:fttfcm.0023.script
*/ */
@Validate(path="ftdgrp.rec.cntfra") @Validate(path = "ftdgrp.rec.cntfra")
public ValidResult checkFtdgrpRecCntfraN1000(FttfcmStoreBo bo){ public ValidResult checkFtdgrpRecCntfraN1000(FttfcmStoreBo bo) {
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getCntfra()) ) if (MdaUtils.isEmpty(bo.getFtdgrp().getRec().getCntfra())) {
{ return errorMandatory();
return errorMandatory();
} }
...@@ -89,21 +81,17 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{ ...@@ -89,21 +81,17 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
} }
/** /**
* source:fttfcm.0024.script * source:fttfcm.0024.script
*/ */
@Validate(path="ftdgrp.rec.matdat") @Validate(path = "ftdgrp.rec.matdat")
public ValidResult checkFtdgrpRecMatdatN1000(FttfcmStoreBo bo){ public ValidResult checkFtdgrpRecMatdatN1000(FttfcmStoreBo bo) {
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getMatdat()) ) if (MdaUtils.isEmpty(bo.getFtdgrp().getRec().getMatdat())) {
{ return errorMandatory();
return errorMandatory(); } else {
} if (!MdaUtils.isEmpty(bo.getFtdgrp().getRec().getValdat()) && Dates.diff(bo.getFtdgrp().getRec().getValdat(), bo.getFtdgrp().getRec().getMatdat()) > 0) {
else return ValidResult.build(false, I18nUtil.getMessage("funds_fttfcm_000000"));
{
if( ! MdaUtils.isEmpty(bo.getFtdgrp().getRec().getValdat()) && Dates.diff(bo.getFtdgrp().getRec().getValdat(),bo.getFtdgrp().getRec().getMatdat())>0 )
{
return ValidResult.build(false, MdaUtils.getI18NString("fttfcm","CT000008"));
} }
} }
...@@ -111,13 +99,12 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{ ...@@ -111,13 +99,12 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
} }
/** /**
* source:fttfcm.0025.script * source:fttfcm.0025.script
*/ */
@Validate(path="ftdgrp.rec.rat") @Validate(path = "ftdgrp.rec.rat")
public ValidResult checkFtdgrpRecRatN1000(FttfcmStoreBo bo){ public ValidResult checkFtdgrpRecRatN1000(FttfcmStoreBo bo) {
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getRat()) ) if (MdaUtils.isEmpty(bo.getFtdgrp().getRec().getRat())) {
{ return errorMandatory();
return errorMandatory();
} }
...@@ -125,13 +112,12 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{ ...@@ -125,13 +112,12 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
} }
/** /**
* source:fttfcm.0038.script * source:fttfcm.0038.script
*/ */
@Validate(path="ftdgrp.rec.bnktyp") @Validate(path = "ftdgrp.rec.bnktyp")
public ValidResult checkFtdgrpRecBnktypN1000(FttfcmStoreBo bo){ public ValidResult checkFtdgrpRecBnktypN1000(FttfcmStoreBo bo) {
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getBnktyp()) ) if (MdaUtils.isEmpty(bo.getFtdgrp().getRec().getBnktyp())) {
{ return errorMandatory();
return errorMandatory();
} }
...@@ -139,6 +125,4 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{ ...@@ -139,6 +125,4 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
} }
} }
package com.brilliance.isc.funds.fxtsel.resource; package com.brilliance.isc.funds.fxtsel.resource;
import com.brilliance.isc.funds.fxtsel.service.FxtselService;
import com.brilliance.isc.vo.ResponseSet; import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.TrnCodeQueryVo; import com.brilliance.isc.vo.TrnCodeQueryVo;
import com.brilliance.isc.vo.funds.FxtselQueryVo; import com.brilliance.isc.vo.funds.FxtselQueryVo;
import com.brilliance.isc.funds.fxtsel.service.FxtselService;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -11,7 +11,6 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -11,7 +11,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.Map; import java.util.Map;
@RestController @RestController
...@@ -21,10 +20,9 @@ public class FxtselResource { ...@@ -21,10 +20,9 @@ public class FxtselResource {
private FxtselService fxtselService; private FxtselService fxtselService;
/* /*
* *
* */ * */
@PostMapping("/list") @PostMapping("/list")
public ResponseSet list(@RequestBody FxtselQueryVo fxtselQueryVo) { public ResponseSet list(@RequestBody FxtselQueryVo fxtselQueryVo) {
return ResponseSet.simpleSuccess(fxtselService.list(fxtselQueryVo)); return ResponseSet.simpleSuccess(fxtselService.list(fxtselQueryVo));
...@@ -45,7 +43,6 @@ public class FxtselResource { ...@@ -45,7 +43,6 @@ public class FxtselResource {
return ResponseSet.simpleSuccess(fxtselService.listdhpp(fxtselQueryVo)); return ResponseSet.simpleSuccess(fxtselService.listdhpp(fxtselQueryVo));
} }
/** /**
* 处理按钮查看能够进行的交易 * 处理按钮查看能够进行的交易
*/ */
...@@ -62,12 +59,11 @@ public class FxtselResource { ...@@ -62,12 +59,11 @@ public class FxtselResource {
} }
/** /**
* 详情页面初始化 * 详情页面初始化
*/ */
@PostMapping("/selectXxdByPrimaryKey") @PostMapping("/selectXxdByPrimaryKey")
public ResponseSet selectXxdByPrimaryKey(@RequestBody Map<String,String> map){ public ResponseSet selectXxdByPrimaryKey(@RequestBody Map<String, String> map) {
return ResponseSet.simpleSuccess(fxtselService.selectXxdByPrimaryKey(map)); return ResponseSet.simpleSuccess(fxtselService.selectXxdByPrimaryKey(map));
} }
} }
......
...@@ -22,4 +22,6 @@ public interface FxtselService { ...@@ -22,4 +22,6 @@ public interface FxtselService {
List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo); List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo);
Object selectXxdByPrimaryKey(Map<String, String> map); Object selectXxdByPrimaryKey(Map<String, String> map);
Object jshDealWithByInr(String inr);
} }
package com.brilliance.isc.funds.fxtsel.service.impl; package com.brilliance.isc.funds.fxtsel.service.impl;
import com.brilliance.isc.bo.Srm;
import com.brilliance.isc.bo.Trn; import com.brilliance.isc.bo.Trn;
import com.brilliance.isc.bo.model.Fxdgrp; import com.brilliance.isc.bo.model.Fxdgrp;
import com.brilliance.isc.bo.model.Lidgrp;
import com.brilliance.isc.bo.model.Ltdgrp;
import com.brilliance.isc.common.sysmod.SysmodService; import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.funds.bo.funds.FxtfopStoreBo; import com.brilliance.isc.funds.bo.funds.FxtfopStoreBo;
import com.brilliance.isc.funds.common.component.FxToolComponent; import com.brilliance.isc.funds.common.component.FxToolComponent;
import com.brilliance.isc.common.util.StringUtils; import com.brilliance.isc.funds.fxtsel.service.FxtselService;
//import com.brilliance.isc.funds.bo.Fxdgrp;
import com.brilliance.isc.mda.dao.FxdMapper; import com.brilliance.isc.mda.dao.FxdMapper;
import com.brilliance.isc.mda.dao.TrnMapper; import com.brilliance.isc.mda.dao.TrnMapper;
import com.brilliance.isc.vo.TrncodVo;
import com.brilliance.isc.vo.funds.FxtselQueryVo;
import com.brilliance.isc.vo.TrnCodeQueryVo; import com.brilliance.isc.vo.TrnCodeQueryVo;
import com.brilliance.isc.vo.TrncodVo;
import com.brilliance.isc.vo.funds.FxdWithPtsCbbResponseVo; import com.brilliance.isc.vo.funds.FxdWithPtsCbbResponseVo;
import com.brilliance.isc.funds.fxtsel.service.FxtselService; import com.brilliance.isc.vo.funds.FxtselQueryVo;
import com.brilliance.mda.runtime.mda.util.MdaUtils; import com.brilliance.mda.runtime.mda.util.Strings;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -28,7 +22,12 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -28,7 +22,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.*; import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
//import com.brilliance.isc.funds.bo.Fxdgrp;
@Service @Service
public class FxtselServiceImpl implements FxtselService { public class FxtselServiceImpl implements FxtselService {
...@@ -49,7 +48,7 @@ public class FxtselServiceImpl implements FxtselService { ...@@ -49,7 +48,7 @@ public class FxtselServiceImpl implements FxtselService {
@Override @Override
public PageInfo list(FxtselQueryVo fxtselQueryVo) { public PageInfo list(FxtselQueryVo fxtselQueryVo) {
PageHelper.startPage(fxtselQueryVo.getPageNumber(),fxtselQueryVo.getPageSize()).setReasonable(true); PageHelper.startPage(fxtselQueryVo.getPageNumber(), fxtselQueryVo.getPageSize()).setReasonable(true);
List<FxdWithPtsCbbResponseVo> fxdList = fxdMapper.queryFxd(fxtselQueryVo); List<FxdWithPtsCbbResponseVo> fxdList = fxdMapper.queryFxd(fxtselQueryVo);
return new PageInfo(fxdList); return new PageInfo(fxdList);
} }
...@@ -57,11 +56,11 @@ public class FxtselServiceImpl implements FxtselService { ...@@ -57,11 +56,11 @@ public class FxtselServiceImpl implements FxtselService {
@Override @Override
public PageInfo listjshpp(FxtselQueryVo fxtselQueryVo) { public PageInfo listjshpp(FxtselQueryVo fxtselQueryVo) {
//FB+FS //FB+FS
List<String> fxtypList=new ArrayList<>(); List<String> fxtypList = new ArrayList<>();
fxtypList.add("LB"); fxtypList.add("LB");
fxtypList.add("LS"); fxtypList.add("LS");
fxtselQueryVo.setFxtypList(fxtypList); fxtselQueryVo.setFxtypList(fxtypList);
PageHelper.startPage(fxtselQueryVo.getPageNumber(),fxtselQueryVo.getPageSize()).setReasonable(true); PageHelper.startPage(fxtselQueryVo.getPageNumber(), fxtselQueryVo.getPageSize()).setReasonable(true);
List<FxdWithPtsCbbResponseVo> fxdList = fxdMapper.queryFxd(fxtselQueryVo); List<FxdWithPtsCbbResponseVo> fxdList = fxdMapper.queryFxd(fxtselQueryVo);
return new PageInfo(fxdList); return new PageInfo(fxdList);
} }
...@@ -69,11 +68,11 @@ public class FxtselServiceImpl implements FxtselService { ...@@ -69,11 +68,11 @@ public class FxtselServiceImpl implements FxtselService {
@Override @Override
public PageInfo listdhpp(FxtselQueryVo fxtselQueryVo) { public PageInfo listdhpp(FxtselQueryVo fxtselQueryVo) {
//FB+FS //FB+FS
List<String> fxtypList=new ArrayList<>(); List<String> fxtypList = new ArrayList<>();
fxtypList.add("FB"); fxtypList.add("FB");
fxtypList.add("FS"); fxtypList.add("FS");
fxtselQueryVo.setFxtypList(fxtypList); fxtselQueryVo.setFxtypList(fxtypList);
PageHelper.startPage(fxtselQueryVo.getPageNumber(),fxtselQueryVo.getPageSize()).setReasonable(true); PageHelper.startPage(fxtselQueryVo.getPageNumber(), fxtselQueryVo.getPageSize()).setReasonable(true);
List<FxdWithPtsCbbResponseVo> fxdList = fxdMapper.queryFxd(fxtselQueryVo); List<FxdWithPtsCbbResponseVo> fxdList = fxdMapper.queryFxd(fxtselQueryVo);
return new PageInfo(fxdList); return new PageInfo(fxdList);
} }
...@@ -81,64 +80,48 @@ public class FxtselServiceImpl implements FxtselService { ...@@ -81,64 +80,48 @@ public class FxtselServiceImpl implements FxtselService {
@Override @Override
public PageInfo listjsh(FxtselQueryVo fxtselQueryVo) { public PageInfo listjsh(FxtselQueryVo fxtselQueryVo) {
//FB+FS //FB+FS
List<String> fxtypList=new ArrayList<>(); List<String> fxtypList = new ArrayList<>();
fxtypList.add("SS"); fxtypList.add("SS");
fxtypList.add("SB"); fxtypList.add("SB");
fxtselQueryVo.setFxtypList(fxtypList); fxtselQueryVo.setFxtypList(fxtypList);
PageHelper.startPage(fxtselQueryVo.getPageNumber(),fxtselQueryVo.getPageSize()).setReasonable(true); PageHelper.startPage(fxtselQueryVo.getPageNumber(), fxtselQueryVo.getPageSize()).setReasonable(true);
List<FxdWithPtsCbbResponseVo> fxdList = fxdMapper.queryFxd(fxtselQueryVo); List<FxdWithPtsCbbResponseVo> fxdList = fxdMapper.queryFxd(fxtselQueryVo);
return new PageInfo(fxdList); return new PageInfo(fxdList);
} }
@Override @Override
public List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo) { public List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo) {
String type=trnCodeQueryVo.getType(); String type = Strings.toUpper(trnCodeQueryVo.getType());
if (type ==null){ String inr = trnCodeQueryVo.getInr();
type=""; if ("JSH".equals(type)) {
//结售汇页签
return jshDealWithByInr(inr);
} }
List<TrncodVo> result = Lists.newArrayList(); List<TrncodVo> result = Lists.newArrayList();
Fxdgrp fxdgrp=new Fxdgrp(); Fxdgrp fxdgrp = fxToolComponent.getFxdgrpByInr(inr);
fxdgrp = fxToolComponent.getFxdgrpByInr(trnCodeQueryVo.getInr()); if ("DHPP".equals(type)) {
if ("dhpp".equals(type.toLowerCase())){
String[] fxTraArray = {"FXTFCM", "FXTFCN"}; String[] fxTraArray = {"FXTFCM", "FXTFCN"};
String[] fxButArray = {"外币兑换平盘确认", "外币兑换平盘销账"}; String[] fxButArray = {"外币兑换平盘确认", "外币兑换平盘销账"};
String isAllowed = ""; String isAllowed = "";
for (int i = 0; i < fxTraArray.length; i++) { for (int i = 0; i < fxTraArray.length; i++) {
TrncodVo trncodVo = new TrncodVo(fxTraArray[i], fxButArray[i], isAllowed,"Y",""); TrncodVo trncodVo = new TrncodVo(fxTraArray[i], fxButArray[i], isAllowed, "Y", "");
fxToolComponent.isFXTrnAllowed(fxdgrp,trncodVo); fxToolComponent.isFXTrnAllowed(fxdgrp, trncodVo);
result.add(trncodVo); result.add(trncodVo);
} }
}else if("jshpp".equals(type.toLowerCase())){ } else if ("JSHPP".equals(type)) {
String[] fxTraArray = {"FXTLCM", "FXTLCN"}; String[] fxTraArray = {"FXTLCM", "FXTLCN"};
String[] fxButArray = {"结售汇平盘确认", "结售汇平盘销账"}; String[] fxButArray = {"结售汇平盘确认", "结售汇平盘销账"};
String isAllowed = ""; String isAllowed = "";
for (int i = 0; i < fxTraArray.length; i++) { for (int i = 0; i < fxTraArray.length; i++) {
TrncodVo trncodVo = new TrncodVo(fxTraArray[i], fxButArray[i], isAllowed,"Y",""); TrncodVo trncodVo = new TrncodVo(fxTraArray[i], fxButArray[i], isAllowed, "Y", "");
fxToolComponent.isFXTrnAllowed(fxdgrp,trncodVo); fxToolComponent.isFXTrnAllowed(fxdgrp, trncodVo);
result.add(trncodVo);
}
}else if("jsh".equals(type.toLowerCase())){
String[] fxTraArray = {"FXTSQO"};
String[] fxButArray = {"结售汇报价"};
String isAllowed = "";
for (int i = 0; i < fxTraArray.length; i++) {
TrncodVo trncodVo = new TrncodVo(fxTraArray[i], fxButArray[i], isAllowed,"Y","");
fxToolComponent.isFXTrnAllowed(fxdgrp,trncodVo);
result.add(trncodVo); result.add(trncodVo);
} }
}else{
} }
return result; return result;
} }
@Override @Override
public Object selectXxdByPrimaryKey(Map<String, String> map) { public Object selectXxdByPrimaryKey(Map<String, String> map) {
String objinr = map.get("objinr"); String objinr = map.get("objinr");
...@@ -146,7 +129,7 @@ public class FxtselServiceImpl implements FxtselService { ...@@ -146,7 +129,7 @@ public class FxtselServiceImpl implements FxtselService {
String pntinr = map.get("pntinr"); String pntinr = map.get("pntinr");
FxtfopStoreBo fxtfopStoreBo = new FxtfopStoreBo(); FxtfopStoreBo fxtfopStoreBo = new FxtfopStoreBo();
fxtfopStoreBo.reset(); fxtfopStoreBo.reset();
if(objinr.length() == 16) { if (objinr.length() == 16) {
Trn trnLid = trnMapper.selectByObjinrTrn(objtyp, objinr, "FXTFOP"); Trn trnLid = trnMapper.selectByObjinrTrn(objtyp, objinr, "FXTFOP");
if (!Objects.isNull(trnLid)) { if (!Objects.isNull(trnLid)) {
fxtfopStoreBo = sysmodService.streamGetNameInSubDir(FxtfopStoreBo.class, trnLid.getInr()); fxtfopStoreBo = sysmodService.streamGetNameInSubDir(FxtfopStoreBo.class, trnLid.getInr());
...@@ -157,4 +140,19 @@ public class FxtselServiceImpl implements FxtselService { ...@@ -157,4 +140,19 @@ public class FxtselServiceImpl implements FxtselService {
} }
@Override
public List<TrncodVo> jshDealWithByInr(String inr) {
List<TrncodVo> result = Lists.newArrayList();
Fxdgrp fxdgrp = fxToolComponent.getFxdgrpByInr(inr);
String[] fxTraArray = {"FXTSQO"};
String[] fxButArray = {"结售汇报价"};
String isAllowed = "";
for (int i = 0; i < fxTraArray.length; i++) {
TrncodVo trncodVo = new TrncodVo(fxTraArray[i], fxButArray[i], isAllowed, "Y", "");
fxToolComponent.isFXTrnAllowed2(fxdgrp, trncodVo);
result.add(trncodVo);
}
return result;
}
} }
...@@ -39,11 +39,11 @@ public class FxtsqoSettleRegister implements ISettleRegister { ...@@ -39,11 +39,11 @@ public class FxtsqoSettleRegister implements ISettleRegister {
FxdBizInfoVo rec = (FxdBizInfoVo) setmodVo.getRec(); FxdBizInfoVo rec = (FxdBizInfoVo) setmodVo.getRec();
Map<String, Cbb> cbsMap = setmodVo.getCbsMap(); Map<String, Cbb> cbsMap = setmodVo.getCbsMap();
BigDecimal maxAmt = BigDecimal.ZERO; BigDecimal maxAmt = BigDecimal.ZERO;
if (setmodVo.getCbsMap().get("MAX") != null) { if (cbsMap.get("MAX") != null) {
maxAmt = setmodVo.getCbsMap().get("MAX").getAmt(); maxAmt = setmodVo.getCbsMap().get("MAX").getAmt();
} }
String nom1Cur = NULLSTR; String nom1Cur = NULLSTR;
if (setmodVo.getCbsMap().get("NOM1") != null) { if (cbsMap.get("NOM1") != null) {
nom1Cur = setmodVo.getCbsMap().get("NOM1").getCur(); nom1Cur = setmodVo.getCbsMap().get("NOM1").getCur();
} }
setmodVo.setDocamt(maxAmt); setmodVo.setDocamt(maxAmt);
......
...@@ -156,6 +156,9 @@ public class FxtsqoTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -156,6 +156,9 @@ public class FxtsqoTransactionServiceImpl extends AbstractTransactionService<Fxt
bizInfoVo.setTrnman(rec.getTrnman()); bizInfoVo.setTrnman(rec.getTrnman());
bizInfoVo.setRat(rec.getRat()); bizInfoVo.setRat(rec.getRat());
bizInfoVo.setSetdat(rec.getSetdat()); bizInfoVo.setSetdat(rec.getSetdat());
bizInfoVo.setNam(rec.getNam());
bizInfoVo.setBchkeyinr(rec.getBchkeyinr());
bizInfoVo.setBranchInr(rec.getBranchinr());
return bizInfoVo; return bizInfoVo;
} }
...@@ -167,6 +170,7 @@ public class FxtsqoTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -167,6 +170,7 @@ public class FxtsqoTransactionServiceImpl extends AbstractTransactionService<Fxt
@Override @Override
public FxtsqoStoreBo init(FxtsqoStoreBo FxtsqoStoreBo) { public FxtsqoStoreBo init(FxtsqoStoreBo FxtsqoStoreBo) {
FxtsqoStoreBo.reset(); FxtsqoStoreBo.reset();
init950(FxtsqoStoreBo);
init1000(FxtsqoStoreBo); init1000(FxtsqoStoreBo);
return FxtsqoStoreBo; return FxtsqoStoreBo;
} }
......
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