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 @@
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.
......@@ -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,15 +41,12 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
}
/**
* 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()) )
{
@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;
......@@ -60,12 +55,10 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
/**
* 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()) )
{
@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();
}
}
......@@ -77,10 +70,9 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
/**
* source:fttfcm.0023.script
*/
@Validate(path="ftdgrp.rec.cntfra")
public ValidResult checkFtdgrpRecCntfraN1000(FttfcmStoreBo bo){
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getCntfra()) )
{
@Validate(path = "ftdgrp.rec.cntfra")
public ValidResult checkFtdgrpRecCntfraN1000(FttfcmStoreBo bo) {
if (MdaUtils.isEmpty(bo.getFtdgrp().getRec().getCntfra())) {
return errorMandatory();
}
......@@ -91,17 +83,13 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
/**
* source:fttfcm.0024.script
*/
@Validate(path="ftdgrp.rec.matdat")
public ValidResult checkFtdgrpRecMatdatN1000(FttfcmStoreBo bo){
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getMatdat()) )
{
@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"));
} 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"));
}
}
......@@ -113,10 +101,9 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
/**
* source:fttfcm.0025.script
*/
@Validate(path="ftdgrp.rec.rat")
public ValidResult checkFtdgrpRecRatN1000(FttfcmStoreBo bo){
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getRat()) )
{
@Validate(path = "ftdgrp.rec.rat")
public ValidResult checkFtdgrpRecRatN1000(FttfcmStoreBo bo) {
if (MdaUtils.isEmpty(bo.getFtdgrp().getRec().getRat())) {
return errorMandatory();
}
......@@ -127,10 +114,9 @@ public class FttfcmValidator extends AbstractModuleValidator <FttfcmStoreBo>{
/**
* source:fttfcm.0038.script
*/
@Validate(path="ftdgrp.rec.bnktyp")
public ValidResult checkFtdgrpRecBnktypN1000(FttfcmStoreBo bo){
if( MdaUtils.isEmpty(bo.getFtdgrp().getRec().getBnktyp()) )
{
@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,7 +20,6 @@ public class FxtselResource {
private FxtselService fxtselService;
/*
*
* */
......@@ -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(String inr);
}
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.brilliance.mda.runtime.mda.util.Strings;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -28,7 +22,12 @@ 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,64 +80,48 @@ 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 = Strings.toUpper(trnCodeQueryVo.getType());
String inr = trnCodeQueryVo.getInr();
if ("JSH".equals(type)) {
//结售汇页签
return jshDealWithByInr(inr);
}
List<TrncodVo> result = Lists.newArrayList();
Fxdgrp fxdgrp=new Fxdgrp();
fxdgrp = fxToolComponent.getFxdgrpByInr(trnCodeQueryVo.getInr());
if ("dhpp".equals(type.toLowerCase())){
Fxdgrp fxdgrp = fxToolComponent.getFxdgrpByInr(inr);
if ("DHPP".equals(type)) {
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)) {
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())){
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);
}
}else{
}
return result;
}
@Override
public Object selectXxdByPrimaryKey(Map<String, String> map) {
String objinr = map.get("objinr");
......@@ -146,7 +129,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());
......@@ -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 {
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