diff --git a/calc/com/tenwa/flow/CopyDChargeTempToFormal.java b/calc/com/tenwa/flow/CopyDChargeTempToFormal.java index 7038800d3..792f3be98 100644 --- a/calc/com/tenwa/flow/CopyDChargeTempToFormal.java +++ b/calc/com/tenwa/flow/CopyDChargeTempToFormal.java @@ -31,7 +31,7 @@ public class CopyDChargeTempToFormal extends BaseBussiness{ BizObject dibo = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, Sqlca).createQuery("flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false); BizObject deit = JBOFactory.createBizObjectQuery(D_DEPOSITCHARGE_INFO_TEMP.CLASS_NAME, "flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false); String num = dibo.getAttribute("TOTAL")==null?"0":dibo.getAttribute("TOTAL").getString();//.getString(); - BigDecimal total = new BigDecimal(num==""?"0":num); + BigDecimal total = new BigDecimal("".equals(num)?"0":num); BigDecimal cautionMoney = new BigDecimal(deit.getAttribute(D_DEPOSITRETURN_INFO_TEMP.CAUTION_MONEY).getString()); double num1 = total.add(cautionMoney).doubleValue(); JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set TOTAL='"+num1+"' where distributor_no='"+DistributorNo+"'").executeUpdate();