Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
isc-funds
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
isc-v3.1-tmp
isc-funds
Commits
443f1f5f
Commit
443f1f5f
authored
Oct 22, 2024
by
jianglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改ftTool
parent
bf59b139
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
226 additions
and
14 deletions
+226
-14
messages_zh_CN.properties
...ds-boot/src/main/resources/i18n/messages_zh_CN.properties
+5
-2
FtToolComponent.java
...rilliance/isc/funds/common/component/FtToolComponent.java
+221
-12
No files found.
isc-funds-boot/src/main/resources/i18n/messages_zh_CN.properties
View file @
443f1f5f
...
...
@@ -2,11 +2,14 @@
funds_fxtssb_000000
=
Settlement
funds_fxtsss_000000
=
Settlement
funds_fxtsqo_000000
=
Settlement
funds_fxtsqo_000001
=
远
期结售
汇交割提示:{0}
funds_fxtsqo_000001
=
Զ
�ڽ��ۻ㽻����
ʾ:{0}
funds_fxtsqo_000002
=
The clearing amount has to be positive.
funds_fxtsqo_000003
=
非汇款
业务请输入业务编号
funds_fxtsqo_000003
=
�ǻ��ҵ��������ҵ����
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_crtcri_000000
=
Clearing in
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/component/FtToolComponent.java
View file @
443f1f5f
...
...
@@ -3,6 +3,7 @@ package com.brilliance.isc.funds.common.component;
import
com.brilliance.isc.bo.Cbb
;
import
com.brilliance.isc.bo.Cnd
;
import
com.brilliance.isc.bo.Ftd
;
import
com.brilliance.isc.bo.Ftt
;
import
com.brilliance.isc.bo.model.*
;
import
com.brilliance.isc.common.cbsmod.service.CbsmodService
;
import
com.brilliance.isc.common.component.PtsptaToolComponent
;
...
...
@@ -12,11 +13,10 @@ import com.brilliance.isc.common.trnmod.service.TrnmodService;import com.brillia
import
com.brilliance.isc.common.util.Utils
;
import
com.brilliance.isc.common.vo.PtsptaVo
;
import
com.brilliance.isc.mda.dao.FtdselMapper
;
import
com.brilliance.isc.mda.dao.CbbMapper
;
import
com.brilliance.isc.mda.dao.CndMapper
;
import
com.brilliance.isc.mda.dao.*
;
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
;
...
...
@@ -24,10 +24,9 @@ import org.springframework.stereotype.Component;
import
java.lang.reflect.Field
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
static
com
.
brilliance
.
mda
.
runtime
.
mda
.
Constants
.
NULLSTR
;
import
java.util.*
;
import
static
com
.
brilliance
.
mda
.
runtime
.
mda
.
Constants
.
NULLSTR
;
@Component
public
class
FtToolComponent
{
...
...
@@ -50,17 +49,37 @@ public class FtToolComponent {
@Autowired
private
SysmodService
sysmodService
;
@Autowired
private
FtdMapper
ftdMapper
;
@Autowired
private
FttMapper
fttMapper
;
public
Ftdgrp
getFtdgrpByInr
(
String
inr
)
{
Ftd
ftd
=
new
Ftd
();
ftd
.
setInr
(
inr
);
ftd
=
ftdselMapper
.
selectByPrimaryKey
(
ftd
);
if
(
ftd
==
null
)
{
Ftd
rec
=
new
Ftd
();
rec
.
setInr
(
inr
);
rec
=
ftdMapper
.
selectByPrimaryKey
(
rec
);
if
(
Objects
.
isNull
(
rec
)
)
{
throw
new
CommonServiceException
(
"主键"
+
inr
+
"找不到FTD数据"
);
}
Ftdgrp
ftdgrp
=
new
Ftdgrp
();
ftdgrp
.
reset
();
ftdgrp
.
setRec
(
ftd
);
ftdgrp
.
setRec
(
rec
);
Ftt
blk
=
new
Ftt
();
blk
.
setInr
(
inr
);
blk
=
fttMapper
.
selectByPrimaryKey
(
blk
);
ftdgrp
.
setBlk
(
blk
);
//获取cbs金额信息
Date
date
=
Dates
.
add
(
Utils
.
getMaxDate
(),
-
1
);
cbsmodService
.
cbsGetBalance
(
ftdgrp
.
getCbs
().
getMax
(),
"FTD"
,
inr
,
"MAXSUM"
,
"AMT1"
,
date
);
cbsmodService
.
cbsGetBalance
(
ftdgrp
.
getCbs
().
getIns
(),
"FTD"
,
inr
,
"INSSUM"
,
"AMT1"
,
date
);
cbsmodService
.
cbsGetBalance
(
ftdgrp
.
getCbs
().
getOpn1
(),
"FTD"
,
inr
,
"OPN"
,
"AMT1"
,
date
);
cbsmodService
.
cbsGetBalance
(
ftdgrp
.
getCbs
().
getOpn2
(),
"FTD"
,
inr
,
"OPN2"
,
"AMT1"
,
date
);
//获取ptspta信息
storePtsToGrp
(
ftdgrp
,
inr
,
"FTD"
);
return
ftdgrp
;
}
...
...
@@ -255,8 +274,198 @@ public class FtToolComponent {
}
public
void
sav
(
Ftdgrp
ftdgrp
)
{
trnmodService
.
trnStoreContract
(
ftdgrp
);
}
public
void
setObjNam
(
String
objref
,
String
nam
)
{
//Setting OBJNAM. If the setting of OBJREF is not standard, here you can change it.
// ctx.absGet(Sysmod.class).setObjnam(NULLSTR);
// ctx.absGet(Sysmod.class).setObjnam(objref + "/" + nam);
}
public
String
getFtdInrByOwnref
(
String
ownref
)
{
Ftd
ftd
=
ftdMapper
.
selectByOwnref
(
ownref
);
if
(
ftd
!=
null
&&
StringUtils
.
isNotEmpty
(
ftd
.
getInr
()))
{
return
ftd
.
getInr
();
}
else
{
return
null
;
}
}
public
static
void
isFXTrnAllowed
(
Ftdgrp
ftdgrp
,
TrncodVo
trncodVo
)
{
ftdgrp
.
reset
();
String
trnNam
=
trncodVo
.
getInifrm
().
toUpperCase
();
String
errOpnY
=
"Selected funds transfer is already opened."
;
String
errOpnN
=
"No funds transfer selected."
;
String
errAccN
=
"There is no amount in transit."
;
String
errCnfY
=
"This funds transfer has beed confirmed."
;
String
errCnfN
=
"This funds transfer has not yet confirmed."
;
String
errClsY
=
"This funds transfer has been closed."
;
String
errMatY
=
"This funds transfer has no open balance."
;
String
errZJB
=
"此交易只能资金部经办!"
;
String
errYYB
=
"此交易只能营运部经办!"
;
if
(
"FTTFCM"
.
equals
(
trnNam
)||
"FTTPCM"
.
equals
(
trnNam
))
{
if
(!
StringUtils
.
isEmpty
(
ftdgrp
.
getRec
().
getInr
())){
trncodVo
.
setDisResult
(
errOpnY
);
trncodVo
.
setIsAllowed
(
"N"
);
}
}
if
(
"FTTFMT"
.
equals
(
trnNam
))
{
if
(
StringUtils
.
isEmpty
(
ftdgrp
.
getRec
().
getInr
())){
trncodVo
.
setDisResult
(
errOpnN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
else
if
(
MdaUtils
.
isEmpty
(
ftdgrp
.
getRec
().
getCnfdat
())){
trncodVo
.
setDisResult
(
errCnfY
);
trncodVo
.
setIsAllowed
(
"N"
);
}
if
(
!
MdaUtils
.
isEmpty
(
ftdgrp
.
getRec
().
getClsdat
())
)
{
trncodVo
.
setDisResult
(
errClsY
);
trncodVo
.
setIsAllowed
(
"N"
);
}
else
if
(
MdaUtils
.
isEmpty
(
ftdgrp
.
getCbs
().
getOpn1
().
getAmt
())
)
{
trncodVo
.
setDisResult
(
errMatY
);
trncodVo
.
setIsAllowed
(
"N"
);
}
if
(
MdaUtils
.
compareTo
(
ftdgrp
.
getRec
().
getFttyp
(),
"PT"
)
==
0
)
{
trncodVo
.
setDisResult
(
""
);
trncodVo
.
setIsAllowed
(
"N"
);
}
// if( ! Platform.checkUsrBranch("2") ) { // 资金调拨到期交易只能营运部做
// trncodVo.setDisResult(errYYB);
// trncodVo.setIsAllowed("N");
// }
}
if
(
"FTTFCN"
.
equals
(
trnNam
)){
if
(
MdaUtils
.
isEmpty
(
ftdgrp
.
getRec
().
getInr
())
)
{
trncodVo
.
setDisResult
(
errOpnN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
else
{
if
(
MdaUtils
.
compareTo
(
ftdgrp
.
getCbs
().
getOpn2
().
getAmt
(),
0
)<=
0
)
{
trncodVo
.
setDisResult
(
errAccN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
}
if
(
MdaUtils
.
compareTo
(
ftdgrp
.
getRec
().
getFttyp
(),
"PT"
)
==
0
)
{
trncodVo
.
setDisResult
(
""
);
trncodVo
.
setIsAllowed
(
"N"
);
}
// if( ! Platform.checkUsrBranch("2") )
// { // 资金调拨销账交易只能营运部做
//
// trncodVo.setDisResult(errYYB);
// trncodVo.setIsAllowed("N");
// }
}
if
(
"FTTFCN"
.
equals
(
trnNam
)){
if
(
MdaUtils
.
isEmpty
(
ftdgrp
.
getRec
().
getInr
())
)
{
trncodVo
.
setDisResult
(
errOpnN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
else
{
if
(
MdaUtils
.
compareTo
(
ftdgrp
.
getCbs
().
getOpn2
().
getAmt
(),
0
)<=
0
)
{
trncodVo
.
setDisResult
(
errAccN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
}
if
(
MdaUtils
.
compareTo
(
ftdgrp
.
getRec
().
getFttyp
(),
"PT"
)
!=
0
)
{
trncodVo
.
setDisResult
(
""
);
trncodVo
.
setIsAllowed
(
"N"
);
}
// if( ! Platform.checkUsrBranch("2") )
// { // 资金调拨销账交易只能营运部做
// trncodVo.setDisResult(errYYB);
// trncodVo.setIsAllowed("N");
// }
}
if
(
"FTTFCN"
.
equals
(
trnNam
)){
if
(
MdaUtils
.
isEmpty
(
ftdgrp
.
getRec
().
getInr
())
)
{
trncodVo
.
setDisResult
(
errOpnN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
else
{
if
(
MdaUtils
.
compareTo
(
ftdgrp
.
getCbs
().
getOpn2
().
getAmt
(),
0
)<=
0
)
{
trncodVo
.
setDisResult
(
errAccN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
}
if
(
MdaUtils
.
compareTo
(
ftdgrp
.
getRec
().
getFttyp
(),
"PT"
)
!=
0
)
{
trncodVo
.
setDisResult
(
""
);
trncodVo
.
setIsAllowed
(
"N"
);
}
// if( ! Platform.checkUsrBranch("2") )
// { // 资金调费用交易交易只能营运部做
//
// trncodVo.setDisResult(errYYB);
// trncodVo.setIsAllowed("N");
// }
}
if
(
"FTTFCN"
.
equals
(
trnNam
)){
if
(
MdaUtils
.
isEmpty
(
ftdgrp
.
getRec
().
getInr
())
)
{
trncodVo
.
setDisResult
(
errOpnN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
}
if
(
"FTTFCN"
.
equals
(
trnNam
)){
if
(
MdaUtils
.
isEmpty
(
ftdgrp
.
getRec
().
getInr
())
)
{
trncodVo
.
setDisResult
(
errOpnN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
if
(
MdaUtils
.
compareTo
(
ftdgrp
.
getRec
().
getFttyp
(),
"PT"
)
==
0
)
{
trncodVo
.
setDisResult
(
""
);
trncodVo
.
setIsAllowed
(
"N"
);
}
}
if
(
MdaUtils
.
isEmpty
(
trnNam
))
{
String
msgTxt
=
"The selected transaction cannot be started under the selected F/T."
;
trncodVo
.
setDisResult
(
msgTxt
);
trncodVo
.
setIsAllowed
(
"N"
);
}
if
(
Strings
.
isEmpty
(
trncodVo
.
getDisResult
())){
trncodVo
.
setIsAllowed
(
"Y"
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment