diff --git a/src_tenwa/com/tenwa/flow/bussinessapprove/BussinessStatusAndDetailAction.java b/src_tenwa/com/tenwa/flow/bussinessapprove/BussinessStatusAndDetailAction.java index 02d877b12..08123884a 100644 --- a/src_tenwa/com/tenwa/flow/bussinessapprove/BussinessStatusAndDetailAction.java +++ b/src_tenwa/com/tenwa/flow/bussinessapprove/BussinessStatusAndDetailAction.java @@ -67,7 +67,7 @@ public class BussinessStatusAndDetailAction { JBOFactory.getBizObjectManager(BUSINESS_STATUS.CLASS_NAME,tx) .createQuery("UPDATE O SET BUSINESS_STATUS='"+statusCode+"',UPDATEUSERID='"+user.getUserID()+"',UPDATEORGID='"+user.getOrgID()+"',UPDATETIME='"+now+"' WHERE CONTRACT_NUMBER='"+contractNumber+"'").executeUpdate(); - so = new SqlObject("INSERT INTO BUSINESS_DETAIL(ID,CONTRACT_NUMBER,BUSINESS_STATUS,INPUTUSERID,INPUTORGID,INPUTTIME,BEFORE_STATUS) SELECT SYS_GUID(),CONTRACT_NUMBER,'"+statusCode+"','"+user.getUserID()+"','"+user.getOrgID()+"','"+StringFunction.getTodayNow().replaceAll(":", "△")+"','"+bStatus+"' FROM LB_CONTRACT_INFO WHERE ID='"+ProjectIdOrContractId+"'"); + so = new SqlObject("INSERT INTO BUSINESS_DETAIL(ID,CONTRACT_NUMBER,BUSINESS_STATUS,INPUTUSERID,INPUTORGID,INPUTTIME,BEFORE_STATUS) SELECT replace(UUID(),'-',''),CONTRACT_NUMBER,'"+statusCode+"','"+user.getUserID()+"','"+user.getOrgID()+"','"+StringFunction.getTodayNow().replaceAll(":", "△")+"','"+bStatus+"' FROM LB_CONTRACT_INFO WHERE ID='"+ProjectIdOrContractId+"'"); so.setDebugSql(so.getDebugSql().replaceAll("△", ":")); so.setOriginalSql(so.getOriginalSql().replaceAll("△", ":")); so.setRunSql(so.getRunSql().replaceAll("△", ":")); diff --git a/src_tenwa/com/tenwa/flow/fund/fundcollection/FundIncomeMethod.java b/src_tenwa/com/tenwa/flow/fund/fundcollection/FundIncomeMethod.java index e9d478b7a..2c3ffd5ac 100644 --- a/src_tenwa/com/tenwa/flow/fund/fundcollection/FundIncomeMethod.java +++ b/src_tenwa/com/tenwa/flow/fund/fundcollection/FundIncomeMethod.java @@ -1,6 +1,7 @@ package com.tenwa.flow.fund.fundcollection; import java.math.BigDecimal; +import java.sql.SQLException; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -153,7 +154,41 @@ public class FundIncomeMethod { public void setStatus(String status) { this.status = status; } - + public String getContactId(JBOTransaction tx) throws SQLException, Exception{ + + SqlObject s = new SqlObject("select customertype,contract_number,customer_id," + + "LC_FUND_INCOME_TEMP.project_id,Product_Id from LC_FUND_INCOME_TEMP " + + "left join LB_CONTRACT_INFO lpi on lpi.ID=LC_FUND_INCOME_TEMP.CONTRACT_ID " + + "left join LB_UNION_LESSEE ul on LC_FUND_INCOME_TEMP.contract_id=ul.contract_id and ul.is_main='Y' " + + "left join CUSTOMER_INFO cu on ul.customer_id=cu.customerid where LC_FUND_INCOME_TEMP.contract_id = '" + CONTRACT_ID+"'"); + Transaction sqlTran = Transaction.createTransaction(tx); + ASResultSet rs = sqlTran.getResultSet(s); + String customertype = null; + String contract_number = null; + String customer_id = null; + String project_id = null; + String Product_Id = null; + if(rs.next()){ + customertype = rs.getString("customertype"); + contract_number = rs.getString("contract_number"); + customer_id = rs.getString("customer_id"); + project_id = rs.getString("project_id"); + Product_Id = rs.getString("Product_Id"); + } + return customertype+"@"+contract_number+"@"+customer_id+"@"+project_id+"@"+Product_Id; + } + public String delTemp(JBOTransaction tx) throws JBOException { + try { + for(String contractId : contractIds.split("@")){ + BussinessStatusAndDetailAction.CancelRun(tx, userId, contractId, "30"); + } + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + return "ERROR"; + } + return "SUCCESS"; + } public String setFundDataToFundIncome(JBOTransaction tx) throws JBOException{ try{ boolean flag = false; @@ -321,7 +356,7 @@ public class FundIncomeMethod { so.setOriginalSql(so.getOriginalSql().replaceAll("@", ":")); so.setRunSql(so.getRunSql().replaceAll("@", ":")); sqlTran.executeSQL(so); - so = new SqlObject("update flow_bussiness_object set proj_name=(substr(proj_name,1,instr(proj_name,'实际付款')-1)||'实际付款,金额为:"+totalMoney+"') where flow_unid='"+flowunid+"'"); + so = new SqlObject("update flow_bussiness_object set proj_name=CONCAT(substr(proj_name,1,instr(proj_name,'实际付款')-1),'实际付款,金额为:"+totalMoney+"') where flow_unid='"+flowunid+"'"); sqlTran.executeSQL(so); } }