修改关于处理""的问题

This commit is contained in:
jianghongdong 2018-07-26 10:53:22 +08:00
parent 950288d715
commit 168583958c

View File

@ -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();