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
50a0e6f3
Commit
50a0e6f3
authored
Nov 01, 2024
by
huangshunlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多实体:swift发报行根据usr找ety 找总行ownbic
parent
5419a3a5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
10 deletions
+34
-10
PtyCacheServiceImpl.java
.../brilliance/isc/common/cache/pty/PtyCacheServiceImpl.java
+34
-10
No files found.
isc-common-service/src/main/java/com/brilliance/isc/common/cache/pty/PtyCacheServiceImpl.java
View file @
50a0e6f3
package
com
.
brilliance
.
isc
.
common
.
cache
.
pty
;
import
com.brilliance.isc.bo.Ety
;
import
com.brilliance.isc.bo.Pty
;
import
com.brilliance.isc.bo.Usr
;
import
com.brilliance.isc.common.context.SettleContext
;
import
com.brilliance.isc.common.util.StringUtils
;
import
com.brilliance.isc.mda.dao.EtyMapper
;
import
com.brilliance.isc.mda.dao.PtyMapper
;
import
com.brilliance.mda.runtime.mda.Constants
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.Assert
;
import
java
x.annotation.PostConstruct
;
import
java
.util.Objects
;
import
java.util.concurrent.TimeUnit
;
@Service
...
...
@@ -23,7 +30,7 @@ public class PtyCacheServiceImpl implements PtyCacheService {
private
static
final
TimeUnit
EXPIRETYPE
=
TimeUnit
.
SECONDS
;
private
static
Pty
ownPty
=
null
;
//
private static Pty ownPty = null;
@Autowired
@Qualifier
(
"jacksonRedisTemplate"
)
...
...
@@ -31,17 +38,34 @@ public class PtyCacheServiceImpl implements PtyCacheService {
@Autowired
private
PtyMapper
ptyMapper
;
@Autowired
private
EtyMapper
etyMapper
;
@PostConstruct
public
void
initOwnPty
()
{
ownPty
=
ptyMapper
.
queryDetailByExtkey
(
"EVERCNBJXXX"
);
//验证环境 bic第8位都改成了0
if
(
ownPty
==
null
)
{
ownPty
=
ptyMapper
.
queryDetailByExtkey
(
"EVERCNB0XXX"
);
}
}
//
@PostConstruct
//
public void initOwnPty() {
//
ownPty = ptyMapper.queryDetailByExtkey("EVERCNBJXXX");
//
//验证环境 bic第8位都改成了0
//
if (ownPty == null) {
//
ownPty = ptyMapper.queryDetailByExtkey("EVERCNB0XXX");
//
}
//
}
public
Pty
getOwnPty
()
{
String
ownbic
=
Constants
.
NULLSTR
;
Ety
ety
=
SettleContext
.
getUserSession
().
getEty
();
if
(
Objects
.
isNull
(
ety
))
{
Usr
usr
=
SettleContext
.
getUserSession
().
getUsr
();
if
(
Objects
.
nonNull
(
usr
)
&&
StringUtils
.
isNotEmpty
(
usr
.
getEtyextkey
()))
{
String
etyextkey
=
usr
.
getEtyextkey
();
ety
=
etyMapper
.
getEtyByExtkey
(
etyextkey
);
}
}
if
(
Objects
.
nonNull
(
ety
)
&&
StringUtils
.
isNotEmpty
(
ety
.
getOwnbic
()))
{
ownbic
=
ety
.
getOwnbic
();
}
Assert
.
hasText
(
ownbic
,
"UserSession:usr.Etyextkey ety.Ownbic isEmpty"
);
Pty
ownPty
=
ptyMapper
.
queryDetailByExtkey
(
ownbic
);
Assert
.
notNull
(
ownPty
,
String
.
format
(
"pty cannot be found by ownbic=[%s]"
,
ownbic
));
return
ownPty
;
}
...
...
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