From 54fa151f4f344538a5888b614c0723fed4b87c21 Mon Sep 17 00:00:00 2001 From: zhangbb Date: Tue, 17 Sep 2019 18:19:21 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E7=A9=BA=E6=8C=87=E9=92=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reckon/executor/CreateTransactionExecutor.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java index 570783b9b..9a602fe9d 100644 --- a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java +++ b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java @@ -1135,15 +1135,21 @@ public class CreateTransactionExecutor implements Transaction { BizObjectManager letManage = JBOFactory.getBizObjectManager(LB_EQUIPMENT_TEMP.CLASS_NAME); List lccts = lcctManage.createQuery(" project_id=:projectid and flowunid<>:flowunid and contract_plan_number<>'' ").setParameter("projectid", projectId).setParameter("flowunid", flowunid).getResultList(false); for (BizObject lcct : lccts) { - lcct.getAttribute("EQUIP_AMT").getString(); - double equip_money = new Double(lcct.getAttribute("EQUIP_AMT").getString()); + double equip_money=0; + if(lcct.getAttribute("EQUIP_AMT")!=null&&!"".endsWith(lcct.getAttribute("EQUIP_AMT").getString())){ + equip_money = new Double(lcct.getAttribute("EQUIP_AMT").getString()); + }; sumMoney = sumMoney+equip_money; } com.amarsoft.awe.util.Transaction Sqlca =null; Sqlca = com.amarsoft.awe.util.Transaction.createTransaction(CacheLoaderFactory.getDataSource()); String sql = "select sum(EQUIP_PRICE) as EQUIP_PRICE from LB_EQUIPMENT_TEMP O where O.flowunid='"+flowunid+"'"; SqlObject sqlobj = new SqlObject(sql); - double equip_money = new Double(Sqlca.getString(sqlobj)); + String money = Sqlca.getString(sqlobj); + if(money==null||"".equals(money)){ + money="0"; + } + double equip_money = new Double(money); Sqlca.commit(); return (equip_money-sumMoney)+""; }