Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjs-bd-common
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
s_guodong
gjjs-bd-common
Commits
424aa764
Commit
424aa764
authored
Feb 06, 2023
by
gechengyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交多数据源切换版本,可以正常返回收报查询列表
parent
4b28fb4b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
9 deletions
+78
-9
Bd2poinnewApplication.java
...java/com/brilliance/bd2poinnew/Bd2poinnewApplication.java
+7
-1
TestConfig.java
...ess/src/main/java/com/ceb/gjjs/mda/config/TestConfig.java
+61
-0
Rcvp.java
...s/src/main/java/com/ceb/gjjs/mda/manager/module/Rcvp.java
+3
-0
application-db.yml
gjjs-bd-business/src/main/resources/application-db.yml
+6
-7
application.yml
gjjs-bd-business/src/main/resources/application.yml
+1
-1
No files found.
gjjs-bd-business/src/main/java/com/brilliance/bd2poinnew/Bd2poinnewApplication.java
View file @
424aa764
...
@@ -5,11 +5,17 @@ import org.springframework.boot.SpringApplication;
...
@@ -5,11 +5,17 @@ import org.springframework.boot.SpringApplication;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
@SpringBootApplication
(
scanBasePackages
=
{
"com.brilliance.mda"
,
"com.ceb.gjjs.mda"
},
exclude
={
DataSourceAutoConfiguration
.
class
})
@SpringBootApplication
(
exclude
={
DataSourceAutoConfiguration
.
class
},
scanBasePackages
=
{
"com.brilliance.mda"
,
"com.ceb.gjjs.mda"
})
@MapperScan
({
"com.ceb.gjjs.mda.dao"
,
"com.brilliance.mda.support.mybatis.dync.mapper"
})
@MapperScan
({
"com.ceb.gjjs.mda.dao"
,
"com.brilliance.mda.support.mybatis.dync.mapper"
})
public
class
Bd2poinnewApplication
{
public
class
Bd2poinnewApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
Bd2poinnewApplication
.
class
,
args
);
SpringApplication
.
run
(
Bd2poinnewApplication
.
class
,
args
);
// TestConfig bean = MdaEnv.getBean(TestConfig.class);
// System.out.println(bean);
// System.out.println(bean.getProperty());
}
}
}
}
gjjs-bd-business/src/main/java/com/ceb/gjjs/mda/config/TestConfig.java
0 → 100644
View file @
424aa764
package
com
.
ceb
.
gjjs
.
mda
.
config
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.env.Environment
;
import
java.util.List
;
import
java.util.Map
;
/**
* 测试使用
*/
@Configuration
@ConfigurationProperties
(
prefix
=
"spring"
)
@Data
public
class
TestConfig
{
@Autowired
private
Environment
environment
;
//@Value("${spring.datasource.swd.password}")
private
String
swdpassword
;
private
List
list
;
private
Map
dataSourceMap
;
private
Map
duridMap
;
public
String
getSwdpassword
()
{
return
swdpassword
;
}
public
void
setSwdpassword
(
String
swdpassword
)
{
this
.
swdpassword
=
swdpassword
;
}
public
Map
<
String
,
String
>
getDataSourceMap
()
{
return
dataSourceMap
;
}
public
void
setDataSourceMap
(
Map
<
String
,
String
>
dataSourceMap
)
{
this
.
dataSourceMap
=
dataSourceMap
;
}
public
Map
<
String
,
List
<
String
>>
getDuridMap
()
{
return
duridMap
;
}
public
void
setDuridMap
(
Map
<
String
,
List
<
String
>>
duridMap
)
{
this
.
duridMap
=
duridMap
;
}
public
String
getProperty
()
{
return
environment
.
getProperty
(
"spring.datasource"
);
}
}
gjjs-bd-business/src/main/java/com/ceb/gjjs/mda/manager/module/Rcvp.java
View file @
424aa764
...
@@ -17,6 +17,7 @@ import lombok.Setter;
...
@@ -17,6 +17,7 @@ import lombok.Setter;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
java.lang.reflect.Field
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
...
@@ -866,6 +867,8 @@ public class Rcvp extends AbstractModule{
...
@@ -866,6 +867,8 @@ public class Rcvp extends AbstractModule{
{
{
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
setSweflg
(
NULLSTR
);
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
setSweflg
(
NULLSTR
);
}
}
Field
[]
ff
=
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getClass
().
getDeclaredFields
();
System
.
out
.
println
(
ff
[
0
].
getName
());
this
.
getMsggrp
().
getRcvlst
().
add
(
new
Argument
(
"inr"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getInr
()),
new
Argument
(
"dir"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getDir
()),
new
Argument
(
"srcchncod"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getSrcchncod
()),
new
Argument
(
"chncod"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getChncod
()),
new
Argument
(
"nxtchncod"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getNxtchncod
()),
new
Argument
(
"tgtchncod"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getTgtchncod
()),
new
Argument
(
"smhinr"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getSmhinr
()),
new
Argument
(
"sta"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getSta
()),
new
Argument
(
"rspsta"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getRspsta
()),
new
Argument
(
"rcvdattim"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getRcvdattim
()),
new
Argument
(
"lstdattim"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getLstdattim
()),
new
Argument
(
"sttdattim"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getSttdattim
()),
new
Argument
(
"tgtdattime"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getTgtdattime
()),
new
Argument
(
"snddattim"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getSnddattim
()),
new
Argument
(
"rspdattim"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getRspdattim
()),
new
Argument
(
"ownref"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getOwnref
()),
new
Argument
(
"othref"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getOthref
()),
new
Argument
(
"sndbic"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getSndbic
()),
new
Argument
(
"rcvbic"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getRcvbic
()),
new
Argument
(
"act"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getAct
()),
new
Argument
(
"dtlchg"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getDtlchg
()),
new
Argument
(
"cur"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getCur
()),
new
Argument
(
"amt"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getAmt
()),
new
Argument
(
"valdat"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getValdat
()),
new
Argument
(
"msgtyp"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getMsgtyp
()),
new
Argument
(
"subtyp"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getSubtyp
()),
new
Argument
(
"actbic"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getActbic
()),
new
Argument
(
"t53bic"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getT53bic
()),
new
Argument
(
"gpi"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getGpi
()),
new
Argument
(
"uetr"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getUetr
()),
new
Argument
(
"lstdattim"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getLstdattim
()),
new
Argument
(
"lcnb"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getLcnb
()),
new
Argument
(
"sweflg"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getSweflg
()));
this
.
getMsggrp
().
getRcvlst
().
add
(
new
Argument
(
"inr"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getInr
()),
new
Argument
(
"dir"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getDir
()),
new
Argument
(
"srcchncod"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getSrcchncod
()),
new
Argument
(
"chncod"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getChncod
()),
new
Argument
(
"nxtchncod"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getNxtchncod
()),
new
Argument
(
"tgtchncod"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getTgtchncod
()),
new
Argument
(
"smhinr"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getSmhinr
()),
new
Argument
(
"sta"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getSta
()),
new
Argument
(
"rspsta"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getRspsta
()),
new
Argument
(
"rcvdattim"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getRcvdattim
()),
new
Argument
(
"lstdattim"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getLstdattim
()),
new
Argument
(
"sttdattim"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getSttdattim
()),
new
Argument
(
"tgtdattime"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getTgtdattime
()),
new
Argument
(
"snddattim"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getSnddattim
()),
new
Argument
(
"rspdattim"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getRspdattim
()),
new
Argument
(
"ownref"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getOwnref
()),
new
Argument
(
"othref"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getOthref
()),
new
Argument
(
"sndbic"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getSndbic
()),
new
Argument
(
"rcvbic"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getRcvbic
()),
new
Argument
(
"act"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getAct
()),
new
Argument
(
"dtlchg"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getDtlchg
()),
new
Argument
(
"cur"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getCur
()),
new
Argument
(
"amt"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getAmt
()),
new
Argument
(
"valdat"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getValdat
()),
new
Argument
(
"msgtyp"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getMsgtyp
()),
new
Argument
(
"subtyp"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getSubtyp
()),
new
Argument
(
"actbic"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getActbic
()),
new
Argument
(
"t53bic"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getT53bic
()),
new
Argument
(
"gpi"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getGpi
()),
new
Argument
(
"uetr"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getUetr
()),
new
Argument
(
"lstdattim"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getLstdattim
()),
new
Argument
(
"lcnb"
,
this
.
getMsggrp
().
getMpis
().
getElement
(
i
).
getLcnb
()),
new
Argument
(
"sweflg"
,
this
.
getMsggrp
().
getMpss
().
getElement
(
i
).
getSweflg
()));
//this.getMsggrp().getRcvlst().add(this.getMsggrp().getMpss().getElement(i).getInr(),this.getMsggrp().getMpss().getElement(i).getDir(),this.getMsggrp().getMpss().getElement(i).getSrcchncod(),this.getMsggrp().getMpss().getElement(i).getChncod(),this.getMsggrp().getMpss().getElement(i).getNxtchncod(),this.getMsggrp().getMpss().getElement(i).getTgtchncod(),this.getMsggrp().getMpss().getElement(i).getSmhinr(),this.getMsggrp().getMpss().getElement(i).getSta(),this.getMsggrp().getMpss().getElement(i).getRspsta(),this.getMsggrp().getMpss().getElement(i).getRcvdattim(),this.getMsggrp().getMpss().getElement(i).getLstdattim(),this.getMsggrp().getMpss().getElement(i).getSttdattim(),this.getMsggrp().getMpss().getElement(i).getTgtdattime(),this.getMsggrp().getMpss().getElement(i).getSnddattim(),this.getMsggrp().getMpss().getElement(i).getRspdattim(),this.getMsggrp().getMpis().getElement(i).getOwnref(),this.getMsggrp().getMpis().getElement(i).getOthref(),this.getMsggrp().getMpis().getElement(i).getSndbic(),this.getMsggrp().getMpis().getElement(i).getRcvbic(),this.getMsggrp().getMpis().getElement(i).getAct(),this.getMsggrp().getMpis().getElement(i).getDtlchg(),this.getMsggrp().getMpis().getElement(i).getCur(),this.getMsggrp().getMpis().getElement(i).getAmt(),this.getMsggrp().getMpis().getElement(i).getValdat(),this.getMsggrp().getMpis().getElement(i).getMsgtyp(),this.getMsggrp().getMpis().getElement(i).getSubtyp(),this.getMsggrp().getMpis().getElement(i).getActbic(),this.getMsggrp().getMpis().getElement(i).getT53bic(),this.getMsggrp().getMpis().getElement(i).getGpi(),this.getMsggrp().getMpis().getElement(i).getUetr(),this.getMsggrp().getMpss().getElement(i).getLstdattim(),this.getMsggrp().getMpis().getElement(i).getLcnb(), this.getMsggrp().getMpss().getElement(i).getSweflg());
//this.getMsggrp().getRcvlst().add(this.getMsggrp().getMpss().getElement(i).getInr(),this.getMsggrp().getMpss().getElement(i).getDir(),this.getMsggrp().getMpss().getElement(i).getSrcchncod(),this.getMsggrp().getMpss().getElement(i).getChncod(),this.getMsggrp().getMpss().getElement(i).getNxtchncod(),this.getMsggrp().getMpss().getElement(i).getTgtchncod(),this.getMsggrp().getMpss().getElement(i).getSmhinr(),this.getMsggrp().getMpss().getElement(i).getSta(),this.getMsggrp().getMpss().getElement(i).getRspsta(),this.getMsggrp().getMpss().getElement(i).getRcvdattim(),this.getMsggrp().getMpss().getElement(i).getLstdattim(),this.getMsggrp().getMpss().getElement(i).getSttdattim(),this.getMsggrp().getMpss().getElement(i).getTgtdattime(),this.getMsggrp().getMpss().getElement(i).getSnddattim(),this.getMsggrp().getMpss().getElement(i).getRspdattim(),this.getMsggrp().getMpis().getElement(i).getOwnref(),this.getMsggrp().getMpis().getElement(i).getOthref(),this.getMsggrp().getMpis().getElement(i).getSndbic(),this.getMsggrp().getMpis().getElement(i).getRcvbic(),this.getMsggrp().getMpis().getElement(i).getAct(),this.getMsggrp().getMpis().getElement(i).getDtlchg(),this.getMsggrp().getMpis().getElement(i).getCur(),this.getMsggrp().getMpis().getElement(i).getAmt(),this.getMsggrp().getMpis().getElement(i).getValdat(),this.getMsggrp().getMpis().getElement(i).getMsgtyp(),this.getMsggrp().getMpis().getElement(i).getSubtyp(),this.getMsggrp().getMpis().getElement(i).getActbic(),this.getMsggrp().getMpis().getElement(i).getT53bic(),this.getMsggrp().getMpis().getElement(i).getGpi(),this.getMsggrp().getMpis().getElement(i).getUetr(),this.getMsggrp().getMpss().getElement(i).getLstdattim(),this.getMsggrp().getMpis().getElement(i).getLcnb(), this.getMsggrp().getMpss().getElement(i).getSweflg());
...
...
gjjs-bd-business/src/main/resources/application-
pg
.yml
→
gjjs-bd-business/src/main/resources/application-
db
.yml
View file @
424aa764
...
@@ -5,21 +5,20 @@ server:
...
@@ -5,21 +5,20 @@ server:
spring
:
spring
:
datasource
:
datasource
:
swd
:
eibs
:
jdbc-url
:
jdbc:postgresql://114.115.138.98:9622/
swd
?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
jdbc-url
:
jdbc:postgresql://114.115.138.98:9622/
eibs
?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
driver-class-name
:
org.postgresql.Driver
driver-class-name
:
org.postgresql.Driver
username
:
postgres
username
:
postgres
password
:
postgres
password
:
postgres
fx
d
:
sw
d
:
jdbc-url
:
jdbc:postgresql://114.115.138.98:9622/
fx
d?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
jdbc-url
:
jdbc:postgresql://114.115.138.98:9622/
sw
d?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
driver-class-name
:
org.postgresql.Driver
driver-class-name
:
org.postgresql.Driver
username
:
postgres
username
:
postgres
password
:
postgres
password
:
postgres
fxd
:
eibs
:
jdbc-url
:
jdbc:postgresql://114.115.138.98:9622/fxd?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
jdbc-url
:
jdbc:postgresql://114.115.138.98:9622/eibs?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
driver-class-name
:
org.postgresql.Driver
driver-class-name
:
org.postgresql.Driver
username
:
postgres
username
:
postgres
password
:
postgres
password
:
postgres
...
...
gjjs-bd-business/src/main/resources/application.yml
View file @
424aa764
spring
:
spring
:
profiles
:
profiles
:
active
:
pg
active
:
db
logging
:
logging
:
config
:
classpath:logback.xml
config
:
classpath:logback.xml
...
...
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