diff --git a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java index e8f9d7053..7e329ddfe 100644 --- a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java +++ b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java @@ -36,6 +36,7 @@ public class CashFlowExecutor { this.add(cb, tcb); String irr = this.getIrr(cb,tcb); cb.setIrr(irr); + tx.commit(); return irr; } private String getIrr(ConditionBean cb ,TabCalBean tcb) throws Exception{ @@ -178,6 +179,7 @@ public class CashFlowExecutor { Sqlca = Transaction.createTransaction(tx); SqlObject asql = new SqlObject(sql); Sqlca.executeSQL(asql); + Sqlca.commit(); } diff --git a/src/com/amarsoft/dict/als/manage/ColRelativeInfo.java b/src/com/amarsoft/dict/als/manage/ColRelativeInfo.java index 6c782a195..033bd17f8 100644 --- a/src/com/amarsoft/dict/als/manage/ColRelativeInfo.java +++ b/src/com/amarsoft/dict/als/manage/ColRelativeInfo.java @@ -287,6 +287,12 @@ public class ColRelativeInfo { Transaction tran = Transaction.createTransaction(tx); String result = tran.getString(new SqlObject("select count(1) from user_task_data where userid = '" + UserID + "' and roleid = '" + RoleID + "' and status = 'approve_status01' group by userid,roleid")); tx.commit(); + if(tran != null){ + tran.disConnect(); + tran = null; + + } + return result == null ? "" : result; } diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/product/ProductBaseLoanTools.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/product/ProductBaseLoanTools.java index c45e674ff..cb2a7e17a 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/product/ProductBaseLoanTools.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/loan/product/ProductBaseLoanTools.java @@ -7,6 +7,8 @@ import java.util.List; import java.util.Map; import java.util.Vector; +import org.springframework.jdbc.object.SqlCall; + import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT; import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR_TEMP; import jbo.prd.BUSINESS_TYPE; @@ -377,13 +379,19 @@ public class ProductBaseLoanTools { "coldefaultvalue", getNowTotal(productId)); String productType = ""; + Transaction Sqlca = null; try { - Transaction Sqlca = Transaction + Sqlca = Transaction .createTransaction((String) RestfullConstant.baseProperty .get("DATASOURCE".toLowerCase())); productType = Sqlca.getString(new SqlObject("select attribute2 from business_type where typeno='"+productId+"'")); } catch (SQLException e) { - ARE.getLog().error(e);; + ARE.getLog().error(e); + }finally{ + if(Sqlca != null){ + Sqlca.disConnect(); + Sqlca=null; + } } //非车辆产品,融资额可编辑 diff --git a/src_app_fresh/apx/com/amarsoft/als/business/action/service/DoSubmitService.java b/src_app_fresh/apx/com/amarsoft/als/business/action/service/DoSubmitService.java index 7aaec4ea7..33c8e7d05 100644 --- a/src_app_fresh/apx/com/amarsoft/als/business/action/service/DoSubmitService.java +++ b/src_app_fresh/apx/com/amarsoft/als/business/action/service/DoSubmitService.java @@ -318,7 +318,7 @@ public class DoSubmitService { String sUserId = request.getSession().getAttribute("userid").toString(); - JBOTransaction tx1 = JBOFactory.createJBOTransaction(); + //JBOTransaction tx1 = JBOFactory.createJBOTransaction(); /* * com.amarsoft.biz.workflow.FlowTask ft = new * com.amarsoft.biz.workflow.FlowTask( taskNo, tx);// 使用jboTrans String diff --git a/src_base/com/amarsoft/app/base/util/AmarScriptHelper.java b/src_base/com/amarsoft/app/base/util/AmarScriptHelper.java index 72da38459..4d68adbab 100644 --- a/src_base/com/amarsoft/app/base/util/AmarScriptHelper.java +++ b/src_base/com/amarsoft/app/base/util/AmarScriptHelper.java @@ -28,7 +28,10 @@ public class AmarScriptHelper { sqlca =Transaction.createTransaction(manager.getDatabase()); } Any a= Expression.getExpressionValue(script, sqlca); - if(sqlca!=null) sqlca.disConnect(); + if(sqlca!=null){ + sqlca.commit(); + sqlca.disConnect(); + } return a; } catch (Exception e) { throw new Exception("脚本错误:" + script); diff --git a/src_core/com/tenwa/comm/util/jboutil/DataOperatorUtil.java b/src_core/com/tenwa/comm/util/jboutil/DataOperatorUtil.java index 67f9906e4..f6a422333 100644 --- a/src_core/com/tenwa/comm/util/jboutil/DataOperatorUtil.java +++ b/src_core/com/tenwa/comm/util/jboutil/DataOperatorUtil.java @@ -190,9 +190,9 @@ public class DataOperatorUtil { }else{ otherPropertyValue+="'"+otherProperty.get(key)+"'"; }} - Transaction Sqlca =null; - Sqlca = Transaction.createTransaction(tx); - Connection conn =tx.getConnection(Sqlca); + //Transaction Sqlca =null; + //Sqlca = Transaction.createTransaction(tx); + //Connection conn =tx.getConnection(Sqlca); String sql="SELECT DISTINCT B.COLUMN_NAME TALBECOLUMN FROM Information_schema.columns B WHERE LOWER(B.table_name)=LOWER('"+fromTable+"') AND EXISTS(SELECT * FROM Information_schema.columns A WHERE LOWER(A.table_name)=LOWER('"+toTable+"') AND B.column_name=A.column_name )"; if("ORACLE".equals(InitDBType.DBTYPE)){ sql="select B.COLUMN_NAME TALBECOLUMN from user_tab_columns B WHERE B.table_name='"+fromTable+"' AND EXISTS(SELECT 1 FROM user_tab_columns A WHERE A.table_name='"+toTable+"' AND B.column_name=A.column_name )"; @@ -500,6 +500,7 @@ public class DataOperatorUtil { while (rs.next()) { data.add( FileOperatorUtil.getASResultSetToMap(rs)); } + Sqlca.commit(); return data; } }