提交 c073e223 编写于 作者: hebao@lab.ibiz5.com's avatar hebao@lab.ibiz5.com

构建和规则引擎bug修复及达梦数据库驱动升级(解决游标报错)

上级 c05b6522
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package dm.jdbc.driver;
import dm.jdbc.dbaccess.DBError;
import dm.jdbc.stat.ConnectionStat;
import dm.jdbc.stat.ExecuteType;
import dm.jdbc.stat.SqlStat;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;
public class DmdbStatement extends AbstractProxy<DmdbStatement_bs> implements Statement {
private DmdbStatement_bs rStmt = null;
private DmdbResultSet curResultSet = null;
private DmdbConnection curConnect = null;
private static AtomicLong index = new AtomicLong(0L);
private long constructNano;
private long lastExecuteStartNano;
private long lastExecuteTimeNano;
private ExecuteType lastExecuteType;
private boolean firstResultSet;
private String lastExecuteSql;
private SqlStat sqlStat;
public DmdbStatement(DmdbStatement_bs Stmt, DmdbConnection curConn) throws SQLException {
super(Stmt);
this.rStmt = Stmt;
this.curConnect = curConn;
this.ID = index.incrementAndGet();
}
void setCurResultSet(DmdbResultSet rs) {
if (this.curResultSet != null) {
this.curResultSet = null;
}
this.curResultSet = rs;
}
public ResultSet executeQuery(String sql) throws SQLException {
return this.createChain().Statement_executeQuery(this, sql);
}
public int executeUpdate(String sql) throws SQLException {
return this.createChain().Statement_executeUpdate(this, sql);
}
public void close() throws SQLException {
this.createChain().Statement_close(this);
}
public int getMaxFieldSize() throws SQLException {
return this.createChain().Statement_getMaxFieldSize(this);
}
public void setMaxFieldSize(int max) throws SQLException {
this.createChain().Statement_setMaxFieldSize(this, max);
}
public int getMaxRows() throws SQLException {
return this.createChain().Statement_getMaxRows(this);
}
public void setMaxRows(int max) throws SQLException {
this.createChain().Statement_setMaxRows(this, max);
}
public void setEscapeProcessing(boolean enable) throws SQLException {
this.createChain().Statement_setEscapeProcessing(this, enable);
}
public int getQueryTimeout() throws SQLException {
return this.createChain().Statement_getQueryTimeout(this);
}
public void setQueryTimeout(int seconds) throws SQLException {
this.createChain().Statement_setQueryTimeout(this, seconds);
}
public void cancel() throws SQLException {
this.createChain().Statement_cancel(this);
}
public SQLWarning getWarnings() throws SQLException {
return this.createChain().Statement_getWarnings(this);
}
public void clearWarnings() throws SQLException {
this.createChain().Statement_clearWarnings(this);
}
public void setCursorName(String name) throws SQLException {
this.createChain().Statement_setCursorName(this, name);
}
public boolean execute(String sql) throws SQLException {
return this.createChain().Statement_execute(this, sql);
}
public ResultSet getResultSet() throws SQLException {
return this.createChain().Statement_getResultSet(this);
}
public int getUpdateCount() throws SQLException {
return this.createChain().Statement_getUpdateCount(this);
}
public boolean getMoreResults() throws SQLException {
return this.createChain().Statement_getMoreResults(this);
}
public void setFetchDirection(int direction) throws SQLException {
this.createChain().Statement_setFetchDirection(this, direction);
}
public int getFetchDirection() throws SQLException {
return this.createChain().Statement_getFetchDirection(this);
}
public void setFetchSize(int rows) throws SQLException {
this.createChain().Statement_setFetchSize(this, rows);
}
public int getFetchSize() throws SQLException {
return this.createChain().Statement_getFetchSize(this);
}
public int getResultSetConcurrency() throws SQLException {
return this.createChain().Statement_getResultSetConcurrency(this);
}
public int getResultSetType() throws SQLException {
return this.createChain().Statement_getResultSetType(this);
}
public void addBatch(String sql) throws SQLException {
this.createChain().Statement_addBatch(this, sql);
}
public void clearBatch() throws SQLException {
this.createChain().Statement_clearBatch(this);
}
public int[] executeBatch() throws SQLException {
return this.createChain().Statement_executeBatch(this);
}
public Connection getConnection() throws SQLException {
return this.createChain().Statement_getConnection(this);
}
public boolean getMoreResults(int current) throws SQLException {
return this.createChain().Statement_getMoreResults(this, current);
}
public ResultSet getGeneratedKeys() throws SQLException {
return this.createChain().Statement_getGeneratedKeys(this);
}
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
return this.createChain().Statement_executeUpdate(this, sql, autoGeneratedKeys);
}
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
return this.createChain().Statement_executeUpdate(this, sql, columnIndexes);
}
public int executeUpdate(String sql, String[] columnNames) throws SQLException {
return this.createChain().Statement_executeUpdate(this, sql, columnNames);
}
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
return this.createChain().Statement_execute(this, sql, autoGeneratedKeys);
}
public boolean execute(String sql, int[] columnIndexes) throws SQLException {
return this.createChain().Statement_execute(this, sql, columnIndexes);
}
public boolean execute(String sql, String[] columnNames) throws SQLException {
return this.createChain().Statement_execute(this, sql, columnNames);
}
public int getResultSetHoldability() throws SQLException {
return this.createChain().Statement_getResultSetHoldability(this);
}
public boolean isClosed() throws SQLException {
return this.createChain().Statement_isClosed(this);
}
public void setPoolable(boolean poolable) throws SQLException {
this.createChain().Statement_setPoolable(this, poolable);
}
public boolean isPoolable() throws SQLException {
return this.createChain().Statement_isPoolable(this);
}
public void closeOnCompletion() throws SQLException {
this.createChain().Statement_closeOnCompletion(this);
}
public boolean isCloseOnCompletion() throws SQLException {
return this.createChain().Statement_isCloseOnCompletion(this);
}
public <T> T unwrap(Class<T> iface) throws SQLException {
return iface.cast(this);
}
public boolean isWrapperFor(Class<?> iface) throws SQLException {
return iface.isInstance(this);
}
public synchronized ResultSet do_executeQuery(String sql) throws SQLException {
DmdbResultSet_bs rsb = (DmdbResultSet_bs)this.rStmt.executeQuery(sql);
if (rsb == null) {
return null;
} else {
DmdbResultSet rs = new DmdbResultSet(rsb, this);
this.setCurResultSet(rs);
return rs;
}
}
public synchronized int do_executeUpdate(String sql) throws SQLException {
return this.rStmt.executeUpdate(sql);
}
public synchronized void do_close() throws SQLException {
this.rStmt.close();
}
public int do_getMaxFieldSize() throws SQLException {
return this.rStmt.getMaxFieldSize();
}
public synchronized void do_setMaxFieldSize(int max) throws SQLException {
this.rStmt.setMaxFieldSize(max);
}
public int do_getMaxRows() throws SQLException {
return this.rStmt.getMaxRows();
}
public synchronized void do_setMaxRows(int max) throws SQLException {
this.rStmt.setMaxRows(max);
}
public void do_setEscapeProcessing(boolean enable) throws SQLException {
this.rStmt.setEscapeProcessing(enable);
}
public int do_getQueryTimeout() throws SQLException {
return this.rStmt.getQueryTimeout();
}
public synchronized void do_setQueryTimeout(int seconds) throws SQLException {
this.rStmt.setQueryTimeout(seconds);
}
public synchronized void do_cancel() throws SQLException {
this.rStmt.cancel();
}
public SQLWarning do_getWarnings() throws SQLException {
return this.rStmt.getWarnings();
}
public void do_clearWarnings() throws SQLException {
this.rStmt.clearWarnings();
}
public void do_setCursorName(String name) throws SQLException {
this.rStmt.setCursorName(name);
}
public synchronized boolean do_execute(String sql) throws SQLException {
return this.rStmt.execute(sql);
}
public synchronized ResultSet do_getResultSet() throws SQLException {
DmdbResultSet_bs rs = (DmdbResultSet_bs)this.rStmt.getResultSet();
if (rs == null) {
return null;
} else {
this.curResultSet = new DmdbResultSet(rs, this);
return this.curResultSet;
}
}
public synchronized int do_getUpdateCount() throws SQLException {
return this.rStmt.getUpdateCount();
}
public boolean do_getMoreResults() throws SQLException {
if (this.curResultSet != null) {
this.curResultSet.close();
}
return this.rStmt.getMoreResults();
}
public synchronized void do_setFetchDirection(int direction) throws SQLException {
this.rStmt.setFetchDirection(direction);
}
public int do_getFetchDirection() throws SQLException {
return this.rStmt.getFetchDirection();
}
public synchronized void do_setFetchSize(int rows) throws SQLException {
this.rStmt.setFetchSize(rows);
}
public int do_getFetchSize() throws SQLException {
return this.rStmt.getFetchSize();
}
public int do_getResultSetConcurrency() throws SQLException {
return this.rStmt.getResultSetConcurrency();
}
public int do_getResultSetType() throws SQLException {
return this.rStmt.getResultSetType();
}
public void do_addBatch(String sql) throws SQLException {
this.rStmt.addBatch(sql);
}
public void do_clearBatch() throws SQLException {
this.rStmt.clearBatch();
}
public int[] do_executeBatch() throws SQLException {
return this.rStmt.executeBatch();
}
public DmdbConnection do_getConnection() {
return this.curConnect;
}
public synchronized boolean do_getMoreResults(int current) throws SQLException {
if ((current == 1 || current == 3) && this.curResultSet != null) {
this.curResultSet.close();
}
return this.rStmt.getMoreResults(current);
}
public ResultSet do_getGeneratedKeys() throws SQLException {
DmdbResultSet_bs rsb = (DmdbResultSet_bs)this.rStmt.getGeneratedKeys();
return rsb == null ? null : new DmdbResultSet(rsb, this);
}
public int do_executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
return this.rStmt.executeUpdate(sql, autoGeneratedKeys);
}
public int do_executeUpdate(String sql, int[] columnIndexes) throws SQLException {
return this.rStmt.executeUpdate(sql, columnIndexes);
}
public int do_executeUpdate(String sql, String[] columnNames) throws SQLException {
return this.rStmt.executeUpdate(sql, columnNames);
}
public boolean do_execute(String sql, int autoGeneratedKeys) throws SQLException {
return this.rStmt.execute(sql, autoGeneratedKeys);
}
public boolean do_execute(String sql, int[] columnIndexes) throws SQLException {
return this.rStmt.execute(sql, columnIndexes);
}
public boolean do_execute(String sql, String[] columnNames) throws SQLException {
return this.rStmt.execute(sql, columnNames);
}
public int do_getResultSetHoldability() throws SQLException {
return this.rStmt.getResultSetHoldability();
}
public boolean do_isClosed() throws SQLException {
return this.rStmt.isClosed();
}
public void do_setPoolable(boolean poolable) throws SQLException {
this.rStmt.setPoolable(poolable);
}
public boolean do_isPoolable() throws SQLException {
return this.rStmt.isPoolable();
}
public synchronized void preCompile(String sql) throws SQLException {
this.rStmt.preCompile(sql);
}
public synchronized void executeDirect() throws SQLException {
this.rStmt.executeDirect();
}
public void do_closeOnCompletion() throws SQLException {
//DBError.throwUnsupportedSQLException();
}
public boolean do_isCloseOnCompletion() throws SQLException {
return false;
}
public long getExecuteId() {
return this.rStmt.getExecuteId();
}
public long getRowId() {
return this.rStmt.getRowId();
}
public void setSqlStat(SqlStat sqlStat) {
this.sqlStat = sqlStat;
}
public SqlStat getSqlStat() {
return this.sqlStat;
}
public long getLastExecuteTimeNano() {
return this.lastExecuteTimeNano;
}
public void setLastExecuteStartNano(long lastExecuteStartNano) {
this.lastExecuteStartNano = lastExecuteStartNano;
}
public void setLastExecuteType(ExecuteType lastExecuteType) {
this.lastExecuteType = lastExecuteType;
}
public long getLastExecuteStartNano() {
return this.lastExecuteStartNano;
}
public void setLastExecuteTimeNano(long nanos) {
this.lastExecuteTimeNano = nanos;
}
public ExecuteType getLastExecuteType() {
return this.lastExecuteType;
}
public void setFirstResultSet(boolean firstResultSet) {
this.firstResultSet = firstResultSet;
}
public boolean isFirstResultSet() {
return this.firstResultSet;
}
public void setLastExecuteSql(String lastExecuteSql) {
this.lastExecuteSql = lastExecuteSql;
}
public String getLastExecuteSql() {
return this.lastExecuteSql;
}
public List<String> getBatchSqlList() {
return this.rStmt.getBatchSqlList();
}
public String getBatchSql() {
List<String> sqlList = this.getBatchSqlList();
StringBuffer buf = new StringBuffer();
String item;
for(Iterator var4 = sqlList.iterator(); var4.hasNext(); buf.append(item)) {
item = (String)var4.next();
if (buf.length() > 0) {
buf.append("\n;\n");
}
}
return buf.toString();
}
public void afterExecute(long nanoSpan) {
this.lastExecuteTimeNano = nanoSpan;
}
public void beforeExecute() {
this.lastExecuteStartNano = System.nanoTime();
}
public void setConstructNano() {
this.constructNano = System.nanoTime();
}
public long getConstructNano() {
return this.constructNano;
}
public ConnectionStat getConnStat() {
return this.curConnect.getConnStat();
}
public String getSql() {
return this.rStmt.getOriginalSql();
}
public ResultSet[] getResultSets() {
List<DmdbResultSet_bs> rsList = this.rStmt.getResultsList();
return rsList != null ? (ResultSet[])rsList.toArray(new ResultSet[0]) : new ResultSet[0];
}
}
...@@ -115,8 +115,8 @@ ...@@ -115,8 +115,8 @@
<!--达梦数据库--> <!--达梦数据库-->
<dependency> <dependency>
<groupId>com.dameng</groupId> <groupId>com.dameng</groupId>
<artifactId>Dm7JdbcDriver17</artifactId> <artifactId>Dm8JdbcDriver18</artifactId>
<version>7.6.0.165</version> <version>8.1.1.49</version>
</dependency> </dependency>
......
...@@ -133,9 +133,12 @@ public class DABuildExService extends DABuildServiceImpl { ...@@ -133,9 +133,12 @@ public class DABuildExService extends DABuildServiceImpl {
liteDataService.processDataModel(et.getModelId(), et.getLastRuntime(), new LiteDataCallback<List<EntityObj>>() { liteDataService.processDataModel(et.getModelId(), et.getLastRuntime(), new LiteDataCallback<List<EntityObj>>() {
@Override @Override
public void total(Integer total) { public void total(Integer total) {
String state = "FINISH";
if(total > 0)
state = "RUNNING";
et.setTotal(total); et.setTotal(total);
et.setProcessed(0); et.setProcessed(0);
et.setState("RUNNING"); et.setState(state);
update(et); update(et);
} }
......
...@@ -97,9 +97,12 @@ public class RuleEngineExService extends RuleEngineServiceImpl { ...@@ -97,9 +97,12 @@ public class RuleEngineExService extends RuleEngineServiceImpl {
liteDataService.processDataModel(et.getModelId(), et.getLastRuntime(), new LiteDataCallback<List<EntityObj>>() { liteDataService.processDataModel(et.getModelId(), et.getLastRuntime(), new LiteDataCallback<List<EntityObj>>() {
@Override @Override
public void total(Integer total) { public void total(Integer total) {
String state = "FINISH";
if(total > 0)
state = "RUNNING";
et.setTotal(total); et.setTotal(total);
et.setProcessed(0); et.setProcessed(0);
et.setState("RUNNING"); et.setState(state);
update(et); update(et);
} }
......
...@@ -169,6 +169,11 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl ...@@ -169,6 +169,11 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
callback.total(total); callback.total(total);
//没有业务数据时,不进行后续操作
if(total == 0){
return;
}
MyBatisCursorItemReader myMyBatisCursorItemReader =new MyBatisCursorItemReader(); MyBatisCursorItemReader myMyBatisCursorItemReader =new MyBatisCursorItemReader();
try{ try{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册