Commit ef8e0d83 by huangshunlin

国际化文件 中文转换Unicode码,结售汇查询,结售汇报价

parent 504b3031
......@@ -2,12 +2,28 @@
funds_fxtssb_000000=Settlement
funds_fxtsss_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_000003=非汇款业务请输入业务编号
funds_fxtsqo_000003=\u975e\u6c47\u6b3e\u4e1a\u52a1\u8bf7\u8f93\u5165\u4e1a\u52a1\u7f16\u53f7
funds_fxtsqo_000004={0}
funds_fxtfop_000000=Foreign Exchange Liquidation
funds_fxtfcn_CT000009=Foreign Exchange Liquidation
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_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 @@
funds_fxtssb_000000=Settlement
funds_fxtsss_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_000003=�ǻ��ҵ��������ҵ����
funds_fxtsqo_000003=\u975e\u6c47\u6b3e\u4e1a\u52a1\u8bf7\u8f93\u5165\u4e1a\u52a1\u7f16\u53f7
funds_fxtsqo_000004={0}
funds_fxtfop_000000=Foreign Exchange Liquidation
funds_fxtfcn_CT000009=Foreign Exchange Liquidation
0136=This contract is overdrawn by {0}
fttfcm=资金拆借到期提示:
funds_fttfcm_000000=\u8d77\u606f\u65e5\u4e0d\u80fd\u5927\u4e8e\u5230\u671f\u65e5
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;
import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.bo.Fxd;
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.Fxdgrp;
import com.brilliance.isc.common.cbsmod.service.CbsmodService;
......@@ -13,18 +12,21 @@ 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.I18nUtil;
import com.brilliance.isc.common.util.StringUtils;
import com.brilliance.isc.common.util.Utils;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.mda.dao.FxdMapper;
import com.brilliance.isc.mda.dao.FxtMapper;
import com.brilliance.isc.mda.dao.PublicMapper;
import com.brilliance.isc.vo.TrncodVo;
import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
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 javax.annotation.Resource;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.Date;
......@@ -32,29 +34,32 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import static com.brilliance.mda.runtime.mda.Constants.CR;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Component
public class FxToolComponent {
@Autowired
@Resource
private FxdMapper fxdMapper;
@Autowired
@Resource
private FxtMapper fxtMapper;
@Autowired
@Resource
private PtsptaToolComponent ptsptaToolComponent;
@Autowired
@Resource
private CbsmodService cbsmodService;
@Autowired
@Resource
private SysmodService sysmodService;
@Autowired
@Resource
private TrnmodService trnmodService;
@Resource
private PublicMapper publicMapper;
public Fxdgrp getFxdgrpByInr(String inr) {
Fxd rec = new Fxd();
......@@ -231,9 +236,9 @@ public class FxToolComponent {
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();
} else {
return null;
......@@ -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();
String trnNam = trncodVo.getInifrm().toUpperCase();
......@@ -257,34 +260,33 @@ public class FxToolComponent {
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 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 ("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.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.setIsAllowed("N");
}else if(Objects.nonNull(fxdgrp.getRec().getCnfdat())){
} else if (Objects.nonNull(fxdgrp.getRec().getCnfdat())) {
trncodVo.setDisResult(errCnfY);
trncodVo.setIsAllowed("N");
}
if(Objects.nonNull(fxdgrp.getRec().getClsdat())){
if (Objects.nonNull(fxdgrp.getRec().getClsdat())) {
trncodVo.setDisResult(errClsY);
trncodVo.setIsAllowed("N");
}
......@@ -299,21 +301,21 @@ public class FxToolComponent {
}
if ("FXTLCN".equals(trnNam)||"FXTSUC".equals(trnNam)||"FXTFCN".equals(trnNam)||"FXTDEN".equals(trnNam)) {
if (StringUtils.isEmpty(fxdgrp.getRec().getInr())){
if ("FXTLCN".equals(trnNam) || "FXTSUC".equals(trnNam) || "FXTFCN".equals(trnNam) || "FXTDEN".equals(trnNam)) {
if (StringUtils.isEmpty(fxdgrp.getRec().getInr())) {
trncodVo.setDisResult(errOpnN);
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.setIsAllowed("N");
}
if(Objects.nonNull(fxdgrp.getRec().getClsdat())){
if (Objects.nonNull(fxdgrp.getRec().getClsdat())) {
trncodVo.setDisResult(errClsY);
trncodVo.setIsAllowed("N");
}
if(Objects.isNull(fxdgrp.getRec().getCnfdat())){
if (Objects.isNull(fxdgrp.getRec().getCnfdat())) {
trncodVo.setDisResult(errCnfN);
trncodVo.setIsAllowed("N");
}
......@@ -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.";
trncodVo.setDisResult(msgTxt);
trncodVo.setIsAllowed("N");
}
if(Strings.isEmpty(trncodVo.getDisResult())){
if (Strings.isEmpty(trncodVo.getDisResult())) {
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
serviceRegisterMaps.put(CommonContants.TRNDOC_SERVICE, "N");
serviceRegisterMaps.put(CommonContants.GLEMOD_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
crtcriStoreBo.reset();
init950(crtcriStoreBo);
init1000(crtcriStoreBo);
crtpService.defaultClearingN1000(crtcriStoreBo);
return crtcriStoreBo;
}
......@@ -315,8 +315,6 @@ public class CrtcriTransactionServiceImpl extends AbstractTransactionService<Crt
*/
private void init950(CrtcriStoreBo crtcriStoreBo) {
crtcriStoreBo.setClrsta("I");
String extkey = SettleContext.getUserSession().getUsr().getExtkey();
crtcriStoreBo.getCrdgrp().getRec().setOwnusr(extkey);
defaultCrdgrpRecCustypN1000(crtcriStoreBo);
}
......
......@@ -24,6 +24,7 @@ import com.brilliance.isc.common.vo.BizAmdInfoVo;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.funds.bo.funds.CrtcroStoreBo;
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.mda.dao.ActMapper;
import com.brilliance.isc.mda.dao.GleMapper;
......@@ -31,7 +32,9 @@ import com.brilliance.isc.mda.dao.PtyMapper;
import com.brilliance.isc.mda.dao.SmhMapper;
import com.brilliance.isc.vo.funds.CrdBizInfoVo;
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.Strings;
import com.google.common.collect.ImmutableBiMap;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -101,19 +104,22 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
@Resource
private PtyMapper ptyMapper;
@Resource
private CrtpService crtpService;
@PostConstruct
public void regisertService() {
serviceRegisterMaps.put(CommonContants.SETMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNDOC_SERVICE, "N");
serviceRegisterMaps.put(CommonContants.GLEMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.BOPSET_JSH_SERVICE, "Y");
}
@Override
protected void txnSave(CrtcroStoreBo transactionVo) {
ruleMtabutSavN500(transactionVo);
protected void txnSave(CrtcroStoreBo bo) {
defaultCrdgrpRecNamN1000(bo);
ruleMtabutSavN500(bo);
}
/**
......@@ -139,7 +145,6 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
* source:crtcro.0021.script
*/
private void cbsSav(CrtcroStoreBo bo) {
TrnmodVo trnmodVo = transactionHelpService.getTransactionStoreSet().getTrnmodVo();
String trninr = transactionHelpService.getTrninr();
cbsmodService.cbsTrnSetNew("TRN", trninr);
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
}
@Override
protected Map<String, String> txnCheck(CrtcroStoreBo transactionVo) {
return crtcroValidator.validate(transactionVo);
protected Map<String, String> txnCheck(CrtcroStoreBo bo) {
return crtcroValidator.validate(bo);
}
@Override
protected BizInfoVo buildBizInfo(CrtcroStoreBo transactionVo) {
Crd rec = transactionVo.getCrdgrp().getRec();
Crtp crtp = transactionVo.getCrtp();
protected BizInfoVo buildBizInfo(CrtcroStoreBo bo) {
Crd rec = bo.getCrdgrp().getRec();
Crtp crtp = bo.getCrtp();
CrdBizInfoVo bizInfoVo = new CrdBizInfoVo();
bizInfoVo.setObjinr(rec.getInr());
bizInfoVo.setObjtyp("CRD");
......@@ -162,25 +167,31 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
bizInfoVo.setOpndat(rec.getOpndat());
bizInfoVo.setRcvbchinr(rec.getRcvbchinr());
bizInfoVo.setCustyp(rec.getCustyp());
String act = transactionVo.getSpcgle().getAct();
String act = bo.getSpcgle().getAct();
bizInfoVo.setSpcgleAct(act);
bizInfoVo.setRcvobjtyp(rec.getRcvobjtyp());
Cpd cpd = transactionVo.getCpdgrp().getRec();
Cpd cpd = bo.getCpdgrp().getRec();
bizInfoVo.setValdat(cpd.getValdat());
bizInfoVo.setBranchInr(rec.getBranchinr());
bizInfoVo.setBchkeyinr(rec.getBchkeyinr());
bizInfoVo.setOwnref(rec.getOwnref());
return bizInfoVo;
}
@Override
protected BizAmdInfoVo buildBizAmdInfo(CrtcroStoreBo transactionVo) {
protected BizAmdInfoVo buildBizAmdInfo(CrtcroStoreBo bo) {
return null;
}
@Override
public CrtcroStoreBo init(CrtcroStoreBo crtcroStoreBo) {
crtcroStoreBo.reset();
init950(crtcroStoreBo);
init1000(crtcroStoreBo);
return crtcroStoreBo;
public CrtcroStoreBo init(CrtcroStoreBo bo) {
bo.reset();
init950(bo);
init1000(bo);
crtpService.defaultClearingN1000(bo);
crtpService.defaultCrdgrpRecOwnusrN1000(bo);
return bo;
}
/**
......@@ -222,7 +233,7 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
// 查找绑定这笔202的其他SWIFT报文信息
switch (bo.getCrdgrp().getRec().getRcvobjtyp()) {
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());
bo.setCpdgrp(dbCpdgrp);
// 汇出汇款发103+202
......@@ -313,37 +324,36 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
String maxCur = bo.getCrdgrp().getCbs().getMax().getCur();
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());
// }
bo.setPacact(new Act());
}
}
}
private void init950(CrtcroStoreBo crtcroStoreBo) {
crtcroStoreBo.setClrsta("O");
String extkey = SettleContext.getUserSession().getUsr().getExtkey();
crtcroStoreBo.getCrdgrp().getRec().setOwnusr(extkey);
private void init950(CrtcroStoreBo bo) {
bo.setClrsta("O");
}
@Override
public void beforeSave(CrtcroStoreBo transactionVo) {
transactionVo.reset();
transactionVo.reset();
Crdgrp crdgrp = transactionVo.getCrdgrp();
public void beforeSave(CrtcroStoreBo bo) {
bo.reset();
bo.reset();
Crdgrp crdgrp = bo.getCrdgrp();
TransactionServiceSet transactionServiceSet = transactionHelpService.getTransactionStoreSet();
transactionServiceSet.setRec(crdgrp.getRec());
transactionServiceSet.setTransactionVo(transactionVo);
transactionServiceSet.setTransactionVo(bo);
crToolComponent.collectCbsMap(transactionServiceSet, "", crdgrp.getCbs(), "max");
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
protected void updateBizInfoVo(BizInfoVo bizInfoVo, CrtcroStoreBo transactionVo) {
bizInfoVo.setObjinr(transactionVo.getCrdgrp().getRec().getInr());
protected void updateBizInfoVo(BizInfoVo bizInfoVo, CrtcroStoreBo bo) {
bizInfoVo.setObjinr(bo.getCrdgrp().getRec().getInr());
}
......@@ -363,7 +373,7 @@ public class CrtcroTransactionServiceImpl extends AbstractTransactionService<Crt
* @param holPtyInr
* @param serPtyInr
* @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) {
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
}
}
/**
* 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;
import com.brilliance.isc.bo.Act;
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.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.FxtfcmStoreBo;
import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.List;
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
......@@ -27,12 +24,13 @@ import static com.brilliance.mda.runtime.mda.Constants.*;
* @create: 2024-10-11 11:28
*/
@Component
public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
public class FttfcmValidator extends AbstractModuleValidator<FttfcmStoreBo> {
@Override
@PostConstruct
public void register(){
super.register();;
public void register() {
super.register();
;
}
@Override
......@@ -43,30 +41,25 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
}
/**
* source:fttfcm.0018.script
* source:fttfcm.0018.script
*/
@Validate(path="fttp.mt32m.s30x")
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()) )
{
return errorMandatory();
@Validate(path = "fttp.mt32m.s30x")
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())) {
return errorMandatory();
}
return null;
}
/**
* source:fttfcm.0022.script
* source:fttfcm.0022.script
*/
@Validate(path="ftdgrp.cbs.ins.amt")
public ValidResult checkFtdgrpCbsInsAmtN1000(FttfcmStoreBo bo){
if( MdaUtils.compareTo(bo.getFttp().getPansta(),PanStaAdd) == 0 || MdaUtils.compareTo(bo.getFttp().getPansta(),PanStaEdit) == 0 )
{
if( MdaUtils.isEmpty(bo.getFtdgrp().getCbs().getIns().getAmt()) )
{
return errorMandatory();
@Validate(path = "ftdgrp.cbs.ins.amt")
public ValidResult checkFtdgrpCbsInsAmtN1000(FttfcmStoreBo bo) {
if (MdaUtils.compareTo(bo.getFttp().getPansta(), PanStaAdd) == 0 || MdaUtils.compareTo(bo.getFttp().getPansta(), PanStaEdit) == 0) {
if (MdaUtils.isEmpty(bo.getFtdgrp().getCbs().getIns().getAmt())) {
return errorMandatory();
}
}
......@@ -75,13 +68,12 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
}
/**
* source:fttfcm.0023.script
* source:fttfcm.0023.script
*/
@Validate(path="ftdgrp.rec.cntfra")
public ValidResult checkFtdgrpRecCntfraN1000(FttfcmStoreBo bo){
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getCntfra()) )
{
return errorMandatory();
@Validate(path = "ftdgrp.rec.cntfra")
public ValidResult checkFtdgrpRecCntfraN1000(FttfcmStoreBo bo) {
if (MdaUtils.isEmpty(bo.getFtdgrp().getRec().getCntfra())) {
return errorMandatory();
}
......@@ -89,21 +81,17 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
}
/**
* source:fttfcm.0024.script
* source:fttfcm.0024.script
*/
@Validate(path="ftdgrp.rec.matdat")
public ValidResult checkFtdgrpRecMatdatN1000(FttfcmStoreBo bo){
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getMatdat()) )
{
return errorMandatory();
}
else
{
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"));
@Validate(path = "ftdgrp.rec.matdat")
public ValidResult checkFtdgrpRecMatdatN1000(FttfcmStoreBo bo) {
if (MdaUtils.isEmpty(bo.getFtdgrp().getRec().getMatdat())) {
return errorMandatory();
} else {
if (!MdaUtils.isEmpty(bo.getFtdgrp().getRec().getValdat()) && Dates.diff(bo.getFtdgrp().getRec().getValdat(), bo.getFtdgrp().getRec().getMatdat()) > 0) {
return ValidResult.build(false, I18nUtil.getMessage("funds_fttfcm_000000"));
}
}
}
......@@ -111,13 +99,12 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
}
/**
* source:fttfcm.0025.script
* source:fttfcm.0025.script
*/
@Validate(path="ftdgrp.rec.rat")
public ValidResult checkFtdgrpRecRatN1000(FttfcmStoreBo bo){
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getRat()) )
{
return errorMandatory();
@Validate(path = "ftdgrp.rec.rat")
public ValidResult checkFtdgrpRecRatN1000(FttfcmStoreBo bo) {
if (MdaUtils.isEmpty(bo.getFtdgrp().getRec().getRat())) {
return errorMandatory();
}
......@@ -125,13 +112,12 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
}
/**
* source:fttfcm.0038.script
* source:fttfcm.0038.script
*/
@Validate(path="ftdgrp.rec.bnktyp")
public ValidResult checkFtdgrpRecBnktypN1000(FttfcmStoreBo bo){
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getBnktyp()) )
{
return errorMandatory();
@Validate(path = "ftdgrp.rec.bnktyp")
public ValidResult checkFtdgrpRecBnktypN1000(FttfcmStoreBo bo) {
if (MdaUtils.isEmpty(bo.getFtdgrp().getRec().getBnktyp())) {
return errorMandatory();
}
......@@ -139,6 +125,4 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
}
}
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.TrnCodeQueryVo;
import com.brilliance.isc.vo.funds.FxtselQueryVo;
import com.brilliance.isc.funds.fxtsel.service.FxtselService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -11,7 +11,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.Map;
@RestController
......@@ -21,10 +20,9 @@ public class FxtselResource {
private FxtselService fxtselService;
/*
*
* */
*
* */
@PostMapping("/list")
public ResponseSet list(@RequestBody FxtselQueryVo fxtselQueryVo) {
return ResponseSet.simpleSuccess(fxtselService.list(fxtselQueryVo));
......@@ -45,7 +43,6 @@ public class FxtselResource {
return ResponseSet.simpleSuccess(fxtselService.listdhpp(fxtselQueryVo));
}
/**
* 处理按钮查看能够进行的交易
*/
......@@ -62,12 +59,11 @@ public class FxtselResource {
}
/**
* 详情页面初始化
*/
@PostMapping("/selectXxdByPrimaryKey")
public ResponseSet selectXxdByPrimaryKey(@RequestBody Map<String,String> map){
public ResponseSet selectXxdByPrimaryKey(@RequestBody Map<String, String> map) {
return ResponseSet.simpleSuccess(fxtselService.selectXxdByPrimaryKey(map));
}
}
......
......@@ -22,4 +22,6 @@ public interface FxtselService {
List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo);
Object selectXxdByPrimaryKey(Map<String, String> map);
Object jshDealWithByInr(TrnCodeQueryVo trnCodeQueryVo);
}
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.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.funds.bo.funds.FxtfopStoreBo;
import com.brilliance.isc.funds.common.component.FxToolComponent;
import com.brilliance.isc.common.util.StringUtils;
//import com.brilliance.isc.funds.bo.Fxdgrp;
import com.brilliance.isc.funds.fxtsel.service.FxtselService;
import com.brilliance.isc.mda.dao.FxdMapper;
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.TrncodVo;
import com.brilliance.isc.vo.funds.FxdWithPtsCbbResponseVo;
import com.brilliance.isc.funds.fxtsel.service.FxtselService;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.brilliance.isc.vo.funds.FxtselQueryVo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
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
public class FxtselServiceImpl implements FxtselService {
......@@ -49,7 +48,7 @@ public class FxtselServiceImpl implements FxtselService {
@Override
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);
return new PageInfo(fxdList);
}
......@@ -57,11 +56,11 @@ public class FxtselServiceImpl implements FxtselService {
@Override
public PageInfo listjshpp(FxtselQueryVo fxtselQueryVo) {
//FB+FS
List<String> fxtypList=new ArrayList<>();
List<String> fxtypList = new ArrayList<>();
fxtypList.add("LB");
fxtypList.add("LS");
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);
return new PageInfo(fxdList);
}
......@@ -69,11 +68,11 @@ public class FxtselServiceImpl implements FxtselService {
@Override
public PageInfo listdhpp(FxtselQueryVo fxtselQueryVo) {
//FB+FS
List<String> fxtypList=new ArrayList<>();
List<String> fxtypList = new ArrayList<>();
fxtypList.add("FB");
fxtypList.add("FS");
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);
return new PageInfo(fxdList);
}
......@@ -81,55 +80,55 @@ public class FxtselServiceImpl implements FxtselService {
@Override
public PageInfo listjsh(FxtselQueryVo fxtselQueryVo) {
//FB+FS
List<String> fxtypList=new ArrayList<>();
List<String> fxtypList = new ArrayList<>();
fxtypList.add("SS");
fxtypList.add("SB");
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);
return new PageInfo(fxdList);
}
@Override
public List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo) {
String type=trnCodeQueryVo.getType();
if (type ==null){
type="";
String type = StringUtils.trimToEmpty(trnCodeQueryVo.getType());
if ("JSH".equals(type)) {
//结售汇页签
return jshDealWithByInr(trnCodeQueryVo);
}
List<TrncodVo> result = Lists.newArrayList();
Fxdgrp fxdgrp=new Fxdgrp();
Fxdgrp fxdgrp = new Fxdgrp();
fxdgrp = fxToolComponent.getFxdgrpByInr(trnCodeQueryVo.getInr());
if ("dhpp".equals(type.toLowerCase())){
if ("dhpp".equals(type.toLowerCase())) {
String[] fxTraArray = {"FXTFCM", "FXTFCN"};
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);
TrncodVo trncodVo = new TrncodVo(fxTraArray[i], fxButArray[i], isAllowed, "Y", "");
fxToolComponent.isFXTrnAllowed(fxdgrp, trncodVo);
result.add(trncodVo);
}
}else if("jshpp".equals(type.toLowerCase())){
} else if ("jshpp".equals(type.toLowerCase())) {
String[] fxTraArray = {"FXTLCM", "FXTLCN"};
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);
TrncodVo trncodVo = new TrncodVo(fxTraArray[i], fxButArray[i], isAllowed, "Y", "");
fxToolComponent.isFXTrnAllowed(fxdgrp, trncodVo);
result.add(trncodVo);
}
}else if("jsh".equals(type.toLowerCase())){
} 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);
TrncodVo trncodVo = new TrncodVo(fxTraArray[i], fxButArray[i], isAllowed, "Y", "");
fxToolComponent.isFXTrnAllowed(fxdgrp, trncodVo);
result.add(trncodVo);
}
}else{
} else {
}
......@@ -138,7 +137,6 @@ public class FxtselServiceImpl implements FxtselService {
}
@Override
public Object selectXxdByPrimaryKey(Map<String, String> map) {
String objinr = map.get("objinr");
......@@ -146,7 +144,7 @@ public class FxtselServiceImpl implements FxtselService {
String pntinr = map.get("pntinr");
FxtfopStoreBo fxtfopStoreBo = new FxtfopStoreBo();
fxtfopStoreBo.reset();
if(objinr.length() == 16) {
if (objinr.length() == 16) {
Trn trnLid = trnMapper.selectByObjinrTrn(objtyp, objinr, "FXTFOP");
if (!Objects.isNull(trnLid)) {
fxtfopStoreBo = sysmodService.streamGetNameInSubDir(FxtfopStoreBo.class, trnLid.getInr());
......
......@@ -39,11 +39,11 @@ public class FxtsqoSettleRegister implements ISettleRegister {
FxdBizInfoVo rec = (FxdBizInfoVo) setmodVo.getRec();
Map<String, Cbb> cbsMap = setmodVo.getCbsMap();
BigDecimal maxAmt = BigDecimal.ZERO;
if (setmodVo.getCbsMap().get("MAX") != null) {
if (cbsMap.get("MAX") != null) {
maxAmt = setmodVo.getCbsMap().get("MAX").getAmt();
}
String nom1Cur = NULLSTR;
if (setmodVo.getCbsMap().get("NOM1") != null) {
if (cbsMap.get("NOM1") != null) {
nom1Cur = setmodVo.getCbsMap().get("NOM1").getCur();
}
setmodVo.setDocamt(maxAmt);
......
......@@ -156,6 +156,9 @@ public class FxtsqoTransactionServiceImpl extends AbstractTransactionService<Fxt
bizInfoVo.setTrnman(rec.getTrnman());
bizInfoVo.setRat(rec.getRat());
bizInfoVo.setSetdat(rec.getSetdat());
bizInfoVo.setNam(rec.getNam());
bizInfoVo.setBchkeyinr(rec.getBchkeyinr());
bizInfoVo.setBranchInr(rec.getBranchinr());
return bizInfoVo;
}
......@@ -167,6 +170,7 @@ public class FxtsqoTransactionServiceImpl extends AbstractTransactionService<Fxt
@Override
public FxtsqoStoreBo init(FxtsqoStoreBo FxtsqoStoreBo) {
FxtsqoStoreBo.reset();
init950(FxtsqoStoreBo);
init1000(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