diff --git a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java index be7ad07d1..e8f9d7053 100644 --- a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java +++ b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java @@ -117,7 +117,11 @@ public class CashFlowExecutor { sql +=" select fundplan.plan_date,if(fundplan.pay_type='pay_type_in',fundplan.plan_money,0)flowin, "; sql +=" if(fundplan.pay_type='pay_type_in',concat(tdd.itemname,':',format(fundplan.plan_money,2)),''), " ; sql +=" if(fundplan.pay_type='pay_type_out',fundplan.plan_money,0)flowout, " ; - sql +=" if(fundplan.pay_type='pay_type_out',concat(tdd.itemname,':',format(fundplan.plan_money,2)),'')flowoutdetail, " ; + if("business_product".equals(tcb.getProductType())) { + sql +=" if(fundplan.pay_type='pay_type_out',concat(if(tdd.itemno = 'feetype10','设备款',tdd.itemname),':',format(fundplan.plan_money,2)),'')flowoutdetail, " ; + } else { + sql +=" if(fundplan.pay_type='pay_type_out',concat(tdd.itemname,':',format(fundplan.plan_money,2)),'')flowoutdetail, " ; + } sql +=" if(fundplan.pay_type='pay_type_in',fundplan.plan_money,-fundplan.plan_money) cleanfow " ; sql +=" from "+Tools.getTable(tcb.getFundFundPlan_tb())+" fundplan " ; sql +=" left join code_library tdd on fundplan.fee_type = tdd.itemno " ; @@ -143,7 +147,11 @@ public class CashFlowExecutor { sql +=" select fundplan.plan_date,case when fundplan.pay_type='pay_type_in'then fundplan.plan_money else 0 end flowin, "; sql +=" case when fundplan.pay_type='pay_type_in'then concat(concat(tdd.itemname,':'),to_char(fundplan.plan_money,'FM9,999,999,999,999,999,999,999,990.00')) else ''end, " ; sql +=" case when fundplan.pay_type='pay_type_out'then fundplan.plan_money else 0 end flowout, " ; - sql +=" case when fundplan.pay_type='pay_type_out' then tdd.itemname||':'||to_char(fundplan.plan_money,'FM9,999,999,999,999,999,999,999,990.00') else ''end flowoutdetail, " ; + if("business_product".equals(tcb.getProductType())) { + sql +=" case when fundplan.pay_type='pay_type_out' then (case then tdd.itemno = 'feetype10' then '设备款' else tdd.itemname end) ||':'||to_char(fundplan.plan_money,'FM9,999,999,999,999,999,999,999,990.00') else ''end flowoutdetail, " ; + } else { + sql +=" case when fundplan.pay_type='pay_type_out' then tdd.itemname||':'||to_char(fundplan.plan_money,'FM9,999,999,999,999,999,999,999,990.00') else ''end flowoutdetail, " ; + } sql +=" case when fundplan.pay_type='pay_type_in' then fundplan.plan_money else -fundplan.plan_money end cleanfow " ; sql +=" from "+Tools.getTable(tcb.getFundFundPlan_tb())+" fundplan " ; sql +=" left join code_library tdd on fundplan.fee_type = tdd.itemno " ; diff --git a/src/com/amarsoft/dict/als/manage/ColRelativeInfo.java b/src/com/amarsoft/dict/als/manage/ColRelativeInfo.java index 656e7beb3..6c782a195 100644 --- a/src/com/amarsoft/dict/als/manage/ColRelativeInfo.java +++ b/src/com/amarsoft/dict/als/manage/ColRelativeInfo.java @@ -289,4 +289,29 @@ public class ColRelativeInfo { tx.commit(); return result == null ? "" : result; } + + public static String getRealFeeName(String feeType, String flowunid) throws Exception { + String returnString = ""; + if("feetype10".equals(feeType)) { + JBOTransaction tx = null; + Transaction tran = null; + try { + tx = JBOFactory.createJBOTransaction(); + tran = Transaction.createTransaction(tx); + String attr = tran.getString(new SqlObject("select b.attribute2 from flow_bussiness_object a,business_type b where a.productid = b.typeno and a.flow_unid = '" + flowunid + "'")); + if(attr != null && "business_product".equals(attr)) { + returnString = "设备款"; + } + } catch(Exception e) { + e.printStackTrace(); + tx.rollback(); + } finally { + if(tx != null) tx.commit(); + } + } else { + returnString = CodeManager.getItemName("FeeType", feeType); + } + + return returnString; + } }