|
|
@ -53,6 +53,8 @@ public class MesSAPDbAdapter {
|
|
|
|
@Resource(name = "pisces1DataSource")
|
|
|
|
@Resource(name = "pisces1DataSource")
|
|
|
|
private DynamicDataSourceProxy pisces1DataSourceProxy;
|
|
|
|
private DynamicDataSourceProxy pisces1DataSourceProxy;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource(name = "pisces2DataSource")
|
|
|
|
|
|
|
|
private DynamicDataSourceProxy pisces2DataSourceProxy;
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${sync.redis.time:1800}")
|
|
|
|
@Value("${sync.redis.time:1800}")
|
|
|
|
private Integer redisTime;
|
|
|
|
private Integer redisTime;
|
|
|
@ -82,7 +84,8 @@ public class MesSAPDbAdapter {
|
|
|
|
DynamicDataSourceProxy sapDataSourceProxy,
|
|
|
|
DynamicDataSourceProxy sapDataSourceProxy,
|
|
|
|
DynamicDataSourceProxy mesDataSourceProxy,
|
|
|
|
DynamicDataSourceProxy mesDataSourceProxy,
|
|
|
|
DynamicDataSourceProxy piscesDataSourceProxy,
|
|
|
|
DynamicDataSourceProxy piscesDataSourceProxy,
|
|
|
|
DynamicDataSourceProxy pisces1DataSourceProxy) throws Exception {
|
|
|
|
DynamicDataSourceProxy pisces1DataSourceProxy,
|
|
|
|
|
|
|
|
DynamicDataSourceProxy pisces2DataSourceProxy) throws Exception {
|
|
|
|
|
|
|
|
|
|
|
|
WmsSAPDbWriter wmsSAPDbWriter = null;
|
|
|
|
WmsSAPDbWriter wmsSAPDbWriter = null;
|
|
|
|
|
|
|
|
|
|
|
@ -110,6 +113,14 @@ public class MesSAPDbAdapter {
|
|
|
|
wmsSAPDbWriter = new WmsSAPDbWriter(mesDataSourceProxy, pisces1DataSourceProxy);
|
|
|
|
wmsSAPDbWriter = new WmsSAPDbWriter(mesDataSourceProxy, pisces1DataSourceProxy);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (groupName.equals(MesInterfaceEnumUtil.DIRECTION_TYPE.PISCES22MES.getCode())) {
|
|
|
|
|
|
|
|
wmsSAPDbWriter = new WmsSAPDbWriter(pisces2DataSourceProxy, mesDataSourceProxy);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (groupName.equals(MesInterfaceEnumUtil.DIRECTION_TYPE.MES2PISCES2.getCode())) {
|
|
|
|
|
|
|
|
wmsSAPDbWriter = new WmsSAPDbWriter(mesDataSourceProxy, pisces2DataSourceProxy);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// new 的对象需要手工注入 bean
|
|
|
|
// new 的对象需要手工注入 bean
|
|
|
|
if (SpringContextsUtil.getApplicationContext() != null) {
|
|
|
|
if (SpringContextsUtil.getApplicationContext() != null) {
|
|
|
@ -140,7 +151,8 @@ public class MesSAPDbAdapter {
|
|
|
|
DynamicDataSourceProxy sapDataSourceProxy,
|
|
|
|
DynamicDataSourceProxy sapDataSourceProxy,
|
|
|
|
DynamicDataSourceProxy mesDataSourceProxy,
|
|
|
|
DynamicDataSourceProxy mesDataSourceProxy,
|
|
|
|
DynamicDataSourceProxy piscesDataSourceProxy,
|
|
|
|
DynamicDataSourceProxy piscesDataSourceProxy,
|
|
|
|
DynamicDataSourceProxy pisces1DataSourceProxy) {
|
|
|
|
DynamicDataSourceProxy pisces1DataSourceProxy,
|
|
|
|
|
|
|
|
DynamicDataSourceProxy pisces2DataSourceProxy) {
|
|
|
|
|
|
|
|
|
|
|
|
WmsSAPDbReader wmsSAPDbReader = null;
|
|
|
|
WmsSAPDbReader wmsSAPDbReader = null;
|
|
|
|
|
|
|
|
|
|
|
@ -168,6 +180,14 @@ public class MesSAPDbAdapter {
|
|
|
|
wmsSAPDbReader = new WmsSAPDbReader(mesDataSourceProxy);
|
|
|
|
wmsSAPDbReader = new WmsSAPDbReader(mesDataSourceProxy);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (groupName.equals(MesInterfaceEnumUtil.DIRECTION_TYPE.PISCES22MES.getCode())) {
|
|
|
|
|
|
|
|
wmsSAPDbReader = new WmsSAPDbReader(pisces2DataSourceProxy);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (groupName.equals(MesInterfaceEnumUtil.DIRECTION_TYPE.MES2PISCES2.getCode())) {
|
|
|
|
|
|
|
|
wmsSAPDbReader = new WmsSAPDbReader(mesDataSourceProxy);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// if (groupName.equals(MesInterfaceEnumUtil.DIRECTION_TYPE.WMS2MES.getName())) {
|
|
|
|
// if (groupName.equals(MesInterfaceEnumUtil.DIRECTION_TYPE.WMS2MES.getName())) {
|
|
|
|
// wmsSAPDbReader = new WmsSAPDbReader(mesDataSourceProxy);
|
|
|
|
// wmsSAPDbReader = new WmsSAPDbReader(mesDataSourceProxy);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
@ -220,11 +240,11 @@ public class MesSAPDbAdapter {
|
|
|
|
// 不需要在这里处理
|
|
|
|
// 不需要在这里处理
|
|
|
|
//initConnection();
|
|
|
|
//initConnection();
|
|
|
|
|
|
|
|
|
|
|
|
writer = buildWriter(groupName, sapDataSourceProxy, mesDataSourceProxy,piscesDataSourceProxy,pisces1DataSourceProxy);
|
|
|
|
writer = buildWriter(groupName, sapDataSourceProxy, mesDataSourceProxy,piscesDataSourceProxy,pisces1DataSourceProxy,pisces2DataSourceProxy);
|
|
|
|
writer.setSrcConn(this.srcConn);
|
|
|
|
writer.setSrcConn(this.srcConn);
|
|
|
|
writer.setDestConn(this.destConn);
|
|
|
|
writer.setDestConn(this.destConn);
|
|
|
|
|
|
|
|
|
|
|
|
reader = buildReader(groupName, sapDataSourceProxy, mesDataSourceProxy,piscesDataSourceProxy,pisces1DataSourceProxy);
|
|
|
|
reader = buildReader(groupName, sapDataSourceProxy, mesDataSourceProxy,piscesDataSourceProxy,pisces1DataSourceProxy,pisces2DataSourceProxy);
|
|
|
|
reader.setSrcConn(this.srcConn);
|
|
|
|
reader.setSrcConn(this.srcConn);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -381,11 +401,11 @@ public class MesSAPDbAdapter {
|
|
|
|
// 不需要在这里处理
|
|
|
|
// 不需要在这里处理
|
|
|
|
//initConnection();
|
|
|
|
//initConnection();
|
|
|
|
|
|
|
|
|
|
|
|
writer = buildWriter(groupName, sapDataSourceProxy, mesDataSourceProxy,piscesDataSourceProxy,pisces1DataSourceProxy);
|
|
|
|
writer = buildWriter(groupName, sapDataSourceProxy, mesDataSourceProxy,piscesDataSourceProxy,pisces1DataSourceProxy,pisces2DataSourceProxy);
|
|
|
|
writer.setSrcConn(this.srcConn);
|
|
|
|
writer.setSrcConn(this.srcConn);
|
|
|
|
writer.setDestConn(this.destConn);
|
|
|
|
writer.setDestConn(this.destConn);
|
|
|
|
|
|
|
|
|
|
|
|
reader = buildReader(groupName, sapDataSourceProxy, mesDataSourceProxy,piscesDataSourceProxy,pisces1DataSourceProxy);
|
|
|
|
reader = buildReader(groupName, sapDataSourceProxy, mesDataSourceProxy,piscesDataSourceProxy,pisces1DataSourceProxy,pisces2DataSourceProxy);
|
|
|
|
reader.setSrcConn(this.srcConn);
|
|
|
|
reader.setSrcConn(this.srcConn);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|