Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
isc-core
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-core
Commits
74fa9a3b
Commit
74fa9a3b
authored
Oct 11, 2024
by
huangshunlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FX 结售汇交易 wrkbch 取申请人apl
parent
9d5fe65f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
52 deletions
+54
-52
SettleContext.java
...java/com/brilliance/isc/common/context/SettleContext.java
+54
-52
No files found.
isc-common-service/src/main/java/com/brilliance/isc/common/context/SettleContext.java
View file @
74fa9a3b
...
...
@@ -36,7 +36,7 @@ public class SettleContext {
private
final
String
ETY_EXTKEY
=
"CEB"
;
private
final
String
ETG_EXTKEY
=
"CEBGRP"
;
private
final
static
List
<
String
>
US_LOCALE_LIST
=
Arrays
.
asList
(
"LE"
,
"LI"
,
"BE"
,
"BR"
);
private
final
static
List
<
String
>
US_LOCALE_LIST
=
Arrays
.
asList
(
"LE"
,
"LI"
,
"BE"
,
"BR"
);
private
Ety
ety
;
private
Etg
etg
;
...
...
@@ -86,61 +86,60 @@ public class SettleContext {
private
static
ThreadLocal
<
Integer
>
TRANS_STA
=
ThreadLocal
.
withInitial
(()
->
0
);
public
static
int
getTransSta
(){
public
static
int
getTransSta
()
{
return
TRANS_STA
.
get
();
}
public
static
void
setTransSta
(
int
status
){
public
static
void
setTransSta
(
int
status
)
{
TRANS_STA
.
set
(
status
);
}
public
static
void
setInitTransSta
(){
public
static
void
setInitTransSta
()
{
setTransSta
(
0
);
}
public
static
void
setHoldTransSta
(){
public
static
void
setHoldTransSta
()
{
setTransSta
(
1
);
}
public
static
void
setSavTransSta
(){
public
static
void
setSavTransSta
()
{
setTransSta
(
2
);
}
public
static
void
setViewDocTransSta
(){
public
static
void
setViewDocTransSta
()
{
setTransSta
(
3
);
}
public
static
void
setViewTextTransSta
(){
public
static
void
setViewTextTransSta
()
{
setTransSta
(
4
);
}
public
static
void
setCheckTransSta
(){
public
static
void
setCheckTransSta
()
{
setTransSta
(
4
);
}
public
static
boolean
isInitTransSta
(){
public
static
boolean
isInitTransSta
()
{
return
getTransSta
()
==
0
;
}
public
static
boolean
isPedTransSta
(){
public
static
boolean
isPedTransSta
()
{
return
getTransSta
()
==
1
;
}
public
static
boolean
isSavTransSta
(){
public
static
boolean
isSavTransSta
()
{
return
getTransSta
()
==
2
;
}
public
static
boolean
isViewDocTransSta
(){
public
static
boolean
isViewDocTransSta
()
{
return
getTransSta
()
==
3
;
}
public
static
boolean
isViewTextTransSta
(){
public
static
boolean
isViewTextTransSta
()
{
return
getTransSta
()
==
4
;
}
public
static
void
setUserSession
(
SettleSession
userSession
)
{
userSessionThreadLocal
.
set
(
userSession
);
}
...
...
@@ -167,7 +166,7 @@ public class SettleContext {
}
// 后台服务使用改方法,用于初始化 SessionUserVo
public
static
void
setSessionUserVo
(
String
logName
,
String
ownOrgDepartmentNumber
)
{
public
static
void
setSessionUserVo
(
String
logName
,
String
ownOrgDepartmentNumber
)
{
SessionUserVo
sessionUserVo
=
new
SessionUserVo
();
sessionUserVo
.
setLogName
(
logName
);
sessionUserVo
.
setOwnOrgDepartmentNumber
(
ownOrgDepartmentNumber
);
...
...
@@ -267,7 +266,6 @@ public class SettleContext {
settleSession
.
setOrgBch
(
orgBch
);
Atp
atp
=
atpMapper
.
getAtpByCod
(
settleSession
.
getTransName
());
settleSession
.
setAtp
(
atp
);
...
...
@@ -275,7 +273,6 @@ public class SettleContext {
settleSession
.
setEtg
(
etg
);
//如果wrkbchinr有值,则读取wrkbch,并读取对应的记账机构
String
wrkbchinr
=
bizInfoVo
==
null
?
""
:
bizInfoVo
.
getBranchInr
();
if
(!
MdaUtils
.
isEmpty
(
wrkbchinr
))
{
...
...
@@ -319,7 +316,7 @@ public class SettleContext {
String
hndtyp
=
Utils
.
getFieldValue
(
bizInfoVo
,
"hndtyp"
);
String
segtyp
=
Utils
.
getFieldValue
(
bizInfoVo
,
"segtyp"
);
String
gartyp
=
Utils
.
getFieldValue
(
bizInfoVo
,
"gartyp"
);
if
(
"OT"
.
equals
(
hndtyp
)
&&
(
"02"
.
equals
(
segtyp
)
||
"F"
.
equalsIgnoreCase
(
gartyp
)))
{
if
(
"OT"
.
equals
(
hndtyp
)
&&
(
"02"
.
equals
(
segtyp
)
||
"F"
.
equalsIgnoreCase
(
gartyp
)))
{
//海关保函转开模式的wrkbch应该取当前记账机构
settleSession
.
setWrkbch
(
settleSession
.
getBch
());
}
...
...
@@ -337,16 +334,16 @@ public class SettleContext {
//20240131 满足海口自贸区上收到总行的业务
setAccBch4Zmq
(
settleSession
,
bizInfoVo
,
ptsList
);
Bch
bch
=
settleSession
.
getBch
();
String
inifrm
=
settleSession
.
getTransName
();
String
branch
=
""
;
if
(
bch
!=
null
)
{
branch
=
bch
.
getBranch
();
Bch
bch
=
settleSession
.
getBch
();
String
inifrm
=
settleSession
.
getTransName
();
String
branch
=
""
;
if
(
bch
!=
null
)
{
branch
=
bch
.
getBranch
();
}
Atpbch
atpbch
=
atpbchMapper
.
selectByBranchAndInifrm
(
branch
,
inifrm
);
if
(
atpbch
!=
null
&&
Objects
.
equals
(
atpbch
.
getNegflg
(),
"X"
))
{
Atpbch
atpbch
=
atpbchMapper
.
selectByBranchAndInifrm
(
branch
,
inifrm
);
if
(
atpbch
!=
null
&&
Objects
.
equals
(
atpbch
.
getNegflg
(),
"X"
))
{
settleSession
.
setSdhTransaction
(
true
);
}
else
{
}
else
{
settleSession
.
setSdhTransaction
(
false
);
}
//设置经办机构
...
...
@@ -433,16 +430,16 @@ public class SettleContext {
//20240131 满足海口自贸区上收到总行的业务
setAccBch4Zmq
(
settleSession
,
null
,
ptsList
);
Bch
bch
=
settleSession
.
getBch
();
String
inifrm
=
settleSession
.
getTransName
();
String
branch
=
""
;
if
(
bch
!=
null
)
{
branch
=
bch
.
getBranch
();
Bch
bch
=
settleSession
.
getBch
();
String
inifrm
=
settleSession
.
getTransName
();
String
branch
=
""
;
if
(
bch
!=
null
)
{
branch
=
bch
.
getBranch
();
}
Atpbch
atpbch
=
atpbchMapper
.
selectByBranchAndInifrm
(
branch
,
inifrm
);
if
(
atpbch
!=
null
&&
Objects
.
equals
(
atpbch
.
getNegflg
(),
"X"
))
{
Atpbch
atpbch
=
atpbchMapper
.
selectByBranchAndInifrm
(
branch
,
inifrm
);
if
(
atpbch
!=
null
&&
Objects
.
equals
(
atpbch
.
getNegflg
(),
"X"
))
{
settleSession
.
setSdhTransaction
(
true
);
}
else
{
}
else
{
settleSession
.
setSdhTransaction
(
false
);
}
//设置经办机构
...
...
@@ -507,21 +504,22 @@ public class SettleContext {
settleSession
.
setBch
(
accBch
);
}
Bch
bch
=
settleSession
.
getBch
();
String
inifrm
=
settleSession
.
getTransName
();
String
branch
=
""
;
if
(
bch
!=
null
)
{
branch
=
bch
.
getBranch
();
Bch
bch
=
settleSession
.
getBch
();
String
inifrm
=
settleSession
.
getTransName
();
String
branch
=
""
;
if
(
bch
!=
null
)
{
branch
=
bch
.
getBranch
();
}
Atpbch
atpbch
=
atpbchMapper
.
selectByBranchAndInifrm
(
branch
,
inifrm
);
if
(
atpbch
!=
null
&&
Objects
.
equals
(
atpbch
.
getNegflg
(),
"X"
))
{
Atpbch
atpbch
=
atpbchMapper
.
selectByBranchAndInifrm
(
branch
,
inifrm
);
if
(
atpbch
!=
null
&&
Objects
.
equals
(
atpbch
.
getNegflg
(),
"X"
))
{
settleSession
.
setSdhTransaction
(
true
);
}
else
{
}
else
{
settleSession
.
setSdhTransaction
(
false
);
}
//设置经办机构
setHandleBch
(
settleSession
);
}
/**
* 加载归属机构 经办机构 登录机构
*/
...
...
@@ -602,6 +600,7 @@ public class SettleContext {
/**
* 找到交易的wrkbch相关的Ptspta
* 代码出处 Mtabut.getWrkBranch
*
* @param bizInfoVo
* @param ptsList
* @return
...
...
@@ -618,6 +617,7 @@ public class SettleContext {
switch
(
objtyp
.
substring
(
0
,
2
))
{
case
"LI"
:
case
"BR"
:
case
"FX"
:
role
=
"APL"
;
break
;
case
"LE"
:
...
...
@@ -635,14 +635,14 @@ public class SettleContext {
case
"GI"
:
String
hndtypG
=
Utils
.
getFieldValue
(
bizInfoVo
,
"hndtyp"
);
String
segtypG
=
Utils
.
getFieldValue
(
bizInfoVo
,
"segtyp"
);
if
(
"OT"
.
equals
(
hndtypG
)
&&
"02"
.
equals
(
segtypG
))
{
if
(
"OT"
.
equals
(
hndtypG
)
&&
"02"
.
equals
(
segtypG
))
{
//海关保函转开模式的wrkbch应该取当前记账机构
return
null
;
}
if
(
StringUtils
.
isNotEmpty
(
hndtypG
)
&&
(
"OT"
.
equals
(
hndtypG
)
||
hndtypG
.
startsWith
(
"F"
)))
{
role
=
"BEN"
;
}
else
{
if
(
ptsptaToolComponent
.
ptsIsRolSet
(
ptsList
,
"CTR"
))
{
if
(
ptsptaToolComponent
.
ptsIsRolSet
(
ptsList
,
"CTR"
))
{
role
=
"CTR"
;
}
else
{
role
=
"APL"
;
...
...
@@ -654,7 +654,7 @@ public class SettleContext {
case
"NC"
:
String
hndtyp
=
Utils
.
getFieldValue
(
bizInfoVo
,
"hndtyp"
);
String
segtyp
=
Utils
.
getFieldValue
(
bizInfoVo
,
"segtyp"
);
if
(
"OT"
.
equals
(
hndtyp
)
&&
"02"
.
equals
(
segtyp
))
{
if
(
"OT"
.
equals
(
hndtyp
)
&&
"02"
.
equals
(
segtyp
))
{
//海关保函转开模式的wrkbch应该取当前记账机构
return
null
;
}
...
...
@@ -675,10 +675,10 @@ public class SettleContext {
break
;
case
"CP"
:
String
paytyp
=
Utils
.
getFieldValue
(
bizInfoVo
,
"paytyp"
);
if
(
MdaUtils
.
compareTo
(
paytyp
,
"O"
)
==
0
)
{
if
(
MdaUtils
.
compareTo
(
paytyp
,
"O"
)
==
0
)
{
role
=
"ORC"
;
}
if
(
MdaUtils
.
compareTo
(
paytyp
,
"I"
)
==
0
)
{
if
(
MdaUtils
.
compareTo
(
paytyp
,
"I"
)
==
0
)
{
role
=
"PYE"
;
}
break
;
...
...
@@ -714,7 +714,7 @@ public class SettleContext {
* 适用于:自贸区业务上收到总行的逻辑
* 记账机构从数据库中获取
*/
private
void
setAccBch4Zmq
(
SettleSession
settleSession
,
BizInfoVo
bizInfo
,
List
<
PtsptaVo
>
ptsList
){
private
void
setAccBch4Zmq
(
SettleSession
settleSession
,
BizInfoVo
bizInfo
,
List
<
PtsptaVo
>
ptsList
)
{
Bch
orgbch
=
settleSession
.
getOrgBch
();
if
(
orgbch
!=
null
&&
"0"
.
equalsIgnoreCase
(
orgbch
.
getLev
()))
{
String
objinr
=
""
;
...
...
@@ -750,7 +750,7 @@ public class SettleContext {
return
new
Locale
(
"en"
,
"US"
);
}
else
{
// 国际信用证部分
if
(!
MdaUtils
.
isEmpty
(
atp
.
getBus
())
&&
US_LOCALE_LIST
.
contains
(
atp
.
getBus
()))
{
if
(!
MdaUtils
.
isEmpty
(
atp
.
getBus
())
&&
US_LOCALE_LIST
.
contains
(
atp
.
getBus
()))
{
return
Locale
.
US
;
}
return
Locale
.
SIMPLIFIED_CHINESE
;
...
...
@@ -772,10 +772,10 @@ public class SettleContext {
Method
method
=
clazz
.
getDeclaredMethod
(
methodName
,
bo
.
getClass
());
if
(
method
!=
null
)
{
method
.
setAccessible
(
true
);
return
(
BizInfoVo
)
method
.
invoke
(
transactionService
,
bo
);
return
(
BizInfoVo
)
method
.
invoke
(
transactionService
,
bo
);
}
return
null
;
}
catch
(
NoSuchMethodException
e
)
{
}
catch
(
NoSuchMethodException
e
)
{
throw
new
CommonServiceException
(
e
.
getMessage
());
}
catch
(
InvocationTargetException
e
)
{
throw
new
CommonServiceException
(
e
.
getMessage
());
...
...
@@ -786,6 +786,7 @@ public class SettleContext {
/**
* 获取收单行交易的非收单交易码
*
* @param settleSession
* @return
*/
...
...
@@ -801,6 +802,7 @@ public class SettleContext {
/**
* 设置经办机构
*
* @param settleSession
*/
public
void
setHandleBch
(
SettleSession
settleSession
)
{
...
...
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