|
|
|
@ -34,6 +34,7 @@ import com.glxp.mipsdl.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.mipsdl.util.SubmitOrderUtil;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
@ -78,6 +79,11 @@ public abstract class CommonHttpClient implements BaseHttpClient {
|
|
|
|
|
@Autowired
|
|
|
|
|
private SubmitOrderUtil submitOrderUtil;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${spring.datasource.typeD}")
|
|
|
|
|
private String typeD;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public BaseResponse getUnit(UdiwmsUnitRequest udiwmsUnitRequest) {
|
|
|
|
|
String response = httpClient.postJson(thrSystemDetailService.getUrl(Constants.URL_NAME_CORP_URL), udiwmsUnitRequest);
|
|
|
|
@ -324,27 +330,27 @@ public abstract class CommonHttpClient implements BaseHttpClient {
|
|
|
|
|
private DataSource dataSource;
|
|
|
|
|
|
|
|
|
|
public String getDataSourceType(){
|
|
|
|
|
Connection conn = null;
|
|
|
|
|
DatabaseMetaData metaData = null;
|
|
|
|
|
String databaseProductName = "";
|
|
|
|
|
try {
|
|
|
|
|
conn = dataSource.getConnection();
|
|
|
|
|
metaData = conn.getMetaData();
|
|
|
|
|
databaseProductName = metaData.getDatabaseProductName();//MySQL //Oracle
|
|
|
|
|
} catch (SQLException throwables) {
|
|
|
|
|
throwables.printStackTrace();
|
|
|
|
|
}finally {
|
|
|
|
|
// 释放连接资源
|
|
|
|
|
if (conn != null) {
|
|
|
|
|
try {
|
|
|
|
|
conn.close();
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return databaseProductName;
|
|
|
|
|
// Connection conn = null;
|
|
|
|
|
// DatabaseMetaData metaData = null;
|
|
|
|
|
// String databaseProductName = "";
|
|
|
|
|
// try {
|
|
|
|
|
// conn = dataSource.getConnection();
|
|
|
|
|
// metaData = conn.getMetaData();
|
|
|
|
|
// databaseProductName = metaData.getDatabaseProductName();//MySQL //Oracle
|
|
|
|
|
// } catch (SQLException throwables) {
|
|
|
|
|
// throwables.printStackTrace();
|
|
|
|
|
// }finally {
|
|
|
|
|
// // 释放连接资源
|
|
|
|
|
// if (conn != null) {
|
|
|
|
|
// try {
|
|
|
|
|
// conn.close();
|
|
|
|
|
// } catch (SQLException e) {
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return typeD;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|