|
|
|
@ -47,6 +47,9 @@ public class MesSAPDbAdapter {
|
|
|
|
|
@Resource(name = "mesDataSource")
|
|
|
|
|
private DynamicDataSourceProxy mesDataSourceProxy;
|
|
|
|
|
|
|
|
|
|
@Resource(name = "piscesDataSource")
|
|
|
|
|
private DynamicDataSourceProxy piscesDataSourceProxy;
|
|
|
|
|
|
|
|
|
|
@Value("${sync.redis.time:1800}")
|
|
|
|
|
private Integer redisTime;
|
|
|
|
|
|
|
|
|
@ -73,7 +76,8 @@ public class MesSAPDbAdapter {
|
|
|
|
|
|
|
|
|
|
private WmsSAPDbWriter buildWriter(String groupName,
|
|
|
|
|
DynamicDataSourceProxy sapDataSourceProxy,
|
|
|
|
|
DynamicDataSourceProxy mesDataSourceProxy) throws Exception {
|
|
|
|
|
DynamicDataSourceProxy mesDataSourceProxy,
|
|
|
|
|
DynamicDataSourceProxy piscesDataSourceProxy) throws Exception {
|
|
|
|
|
|
|
|
|
|
WmsSAPDbWriter wmsSAPDbWriter = null;
|
|
|
|
|
|
|
|
|
@ -85,6 +89,14 @@ public class MesSAPDbAdapter {
|
|
|
|
|
wmsSAPDbWriter = new WmsSAPDbWriter(mesDataSourceProxy, sapDataSourceProxy);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (groupName.equals(MesInterfaceEnumUtil.DIRECTION_TYPE.PISCES2MES.getName())) {
|
|
|
|
|
wmsSAPDbWriter = new WmsSAPDbWriter(piscesDataSourceProxy, mesDataSourceProxy);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (groupName.equals(MesInterfaceEnumUtil.DIRECTION_TYPE.MES2PISCES.getName())) {
|
|
|
|
|
wmsSAPDbWriter = new WmsSAPDbWriter(mesDataSourceProxy, piscesDataSourceProxy);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -115,7 +127,8 @@ public class MesSAPDbAdapter {
|
|
|
|
|
|
|
|
|
|
private WmsSAPDbReader buildReader(String groupName,
|
|
|
|
|
DynamicDataSourceProxy sapDataSourceProxy,
|
|
|
|
|
DynamicDataSourceProxy mesDataSourceProxy) {
|
|
|
|
|
DynamicDataSourceProxy mesDataSourceProxy,
|
|
|
|
|
DynamicDataSourceProxy piscesDataSourceProxy) {
|
|
|
|
|
|
|
|
|
|
WmsSAPDbReader wmsSAPDbReader = null;
|
|
|
|
|
|
|
|
|
@ -127,6 +140,14 @@ public class MesSAPDbAdapter {
|
|
|
|
|
wmsSAPDbReader = new WmsSAPDbReader(mesDataSourceProxy);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (groupName.equals(MesInterfaceEnumUtil.DIRECTION_TYPE.PISCES2MES.getName())) {
|
|
|
|
|
wmsSAPDbReader = new WmsSAPDbReader(piscesDataSourceProxy);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (groupName.equals(MesInterfaceEnumUtil.DIRECTION_TYPE.MES2PISCES.getName())) {
|
|
|
|
|
wmsSAPDbReader = new WmsSAPDbReader(mesDataSourceProxy);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (groupName.equals(MesInterfaceEnumUtil.DIRECTION_TYPE.WMS2MES.getName())) {
|
|
|
|
|
// wmsSAPDbReader = new WmsSAPDbReader(mesDataSourceProxy);
|
|
|
|
|
// }
|
|
|
|
@ -179,11 +200,11 @@ public class MesSAPDbAdapter {
|
|
|
|
|
// 不需要在这里处理
|
|
|
|
|
//initConnection();
|
|
|
|
|
|
|
|
|
|
writer = buildWriter(groupName, sapDataSourceProxy, mesDataSourceProxy);
|
|
|
|
|
writer = buildWriter(groupName, sapDataSourceProxy, mesDataSourceProxy,piscesDataSourceProxy);
|
|
|
|
|
writer.setSrcConn(this.srcConn);
|
|
|
|
|
writer.setDestConn(this.destConn);
|
|
|
|
|
|
|
|
|
|
reader = buildReader(groupName, sapDataSourceProxy, mesDataSourceProxy);
|
|
|
|
|
reader = buildReader(groupName, sapDataSourceProxy, mesDataSourceProxy,piscesDataSourceProxy);
|
|
|
|
|
reader.setSrcConn(this.srcConn);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -340,11 +361,11 @@ public class MesSAPDbAdapter {
|
|
|
|
|
// 不需要在这里处理
|
|
|
|
|
//initConnection();
|
|
|
|
|
|
|
|
|
|
writer = buildWriter(groupName, sapDataSourceProxy, mesDataSourceProxy);
|
|
|
|
|
writer = buildWriter(groupName, sapDataSourceProxy, mesDataSourceProxy,piscesDataSourceProxy);
|
|
|
|
|
writer.setSrcConn(this.srcConn);
|
|
|
|
|
writer.setDestConn(this.destConn);
|
|
|
|
|
|
|
|
|
|
reader = buildReader(groupName, sapDataSourceProxy, mesDataSourceProxy);
|
|
|
|
|
reader = buildReader(groupName, sapDataSourceProxy, mesDataSourceProxy,piscesDataSourceProxy);
|
|
|
|
|
reader.setSrcConn(this.srcConn);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|