This commit is contained in:
zhouyahui 2018-09-25 13:40:16 +08:00
parent b826dc9acc
commit 726b526b1c
2 changed files with 35 additions and 2 deletions

View File

@ -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, " ;
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, " ;
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 " ;

View File

@ -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;
}
}