Commit 4b28fb4b by gechengyang

提交多数据源切换版本,可以正常返回收报查询列表

parent ab4c7841
package com.brilliance.mda; package com.brilliance.mda;
import com.brilliance.mda.util.DataSourceUtil;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -10,7 +9,6 @@ public class TestConntroller { ...@@ -10,7 +9,6 @@ public class TestConntroller {
@RequestMapping("/hello") @RequestMapping("/hello")
public String say(){ public String say(){
// DataSourceUtil.setDB("eibs"); // DataSourceUtil.setDB("eibs");
System.out.println(DataSourceUtil.getDB());
// DataSourceUtil.setDB("swd"); // DataSourceUtil.setDB("swd");
// System.out.println(DataSourceUtil.getDB()); // System.out.println(DataSourceUtil.getDB());
return "Hello SpringBoot!"; return "Hello SpringBoot!";
......
...@@ -910,6 +910,8 @@ public class Platform ...@@ -910,6 +910,8 @@ public class Platform
return attrValues; return attrValues;
} }
/** /**
* source:sysmod.@0079.script * source:sysmod.@0079.script
*/ */
......
package com.ceb.gjjs.mda.manager.module; package com.ceb.gjjs.mda.manager.module;
import java.util.*;
import java.math.BigDecimal;
import com.brilliance.mda.runtime.mda.*;
import com.brilliance.mda.runtime.mda.impl.*;
import com.brilliance.mda.runtime.annotation.*; import com.brilliance.mda.runtime.annotation.*;
import com.brilliance.mda.runtime.mda.driver.*; import com.brilliance.mda.runtime.mda.*;
import static com.brilliance.mda.runtime.mda.Constants.*; import com.brilliance.mda.runtime.mda.driver.MdaDriver;
import com.brilliance.mda.runtime.mda.util.*; import com.brilliance.mda.runtime.mda.driver.MdaEnv;
import com.fasterxml.jackson.annotation.*; import com.brilliance.mda.runtime.mda.impl.AbstractModule;
import java.util.regex.*; import com.brilliance.mda.runtime.mda.impl.Argument;
import com.brilliance.mda.runtime.mda.impl.StreamImpl;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.ceb.gjjs.mda.bo.Chn;
import com.ceb.gjjs.mda.global.Platform;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import com.ceb.gjjs.mda.global.Platform;
import com.ceb.gjjs.mda.bo.Chn;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.math.BigDecimal;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static com.brilliance.mda.runtime.mda.Constants.*;
/** /**
* *
*/ */
...@@ -861,12 +867,20 @@ public class Rcvp extends AbstractModule{ ...@@ -861,12 +867,20 @@ public class Rcvp extends AbstractModule{
this.getMsggrp().getMpss().getElement(i).setSweflg(NULLSTR); this.getMsggrp().getMpss().getElement(i).setSweflg(NULLSTR);
} }
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(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());
// try {
// Field parentField = AbstractModule.class.getDeclaredField("_parent");
// parentField.setAccessible(true);
// parentField.set(this.getMsggrp().getMpss().getElement(i),this.getMsggrp().getMpss());
// } catch (Exception var1) {
// }
// this.getMsggrp().getRcvlst().add(this.getMsggrp().getMpss().getElement(i).getDatafields().toArray(new IDatafield[0]));
} }
} }
log.debug("{}","查出rcvlst记录"+this.getMsggrp().getRcvlst().fullSize()); log.debug("{}","查出rcvlst记录"+this.getMsggrp().getRcvlst().fullSize());
if(this.getMsggrp().getRcvlst().fullSize() == 0) if(this.getMsggrp().getRcvlst().fullSize() == 0)
{ {
ctx.setMessage(MdaUtils.getI18NString("rcvp","CT000461"),MdaUtils.getI18NString("rcvp","CT000462")); ctx.setMessage(MdaUtils.getI18NString("rcvp","CT000461"),MdaUtils.getI18NString("rcvp","CT000462"));
......
...@@ -24,6 +24,28 @@ spring: ...@@ -24,6 +24,28 @@ spring:
username: postgres username: postgres
password: postgres password: postgres
druid:
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
maxPoolPreparedStatementPerConnectionSize: 20
poolPreparedStatements: false
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
redis: redis:
host: 127.0.0.1 host: 127.0.0.1
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
<slf4j.api.version>1.7.25</slf4j.api.version> <slf4j.api.version>1.7.25</slf4j.api.version>
<spring.context.version>5.2.9.RELEASE</spring.context.version> <spring.context.version>5.2.9.RELEASE</spring.context.version>
<fastjson.version>1.2.83</fastjson.version> <fastjson.version>1.2.83</fastjson.version>
<datasource.version>3.6.1</datasource.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
...@@ -224,6 +225,14 @@ ...@@ -224,6 +225,14 @@
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>${fastjson.version}</version> <version>${fastjson.version}</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/com.baomidou/dynamic-datasource-spring-boot-starter -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>${datasource.version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
......
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