日期:2014-05-17 浏览次数:20697 次
protected boolean _getSaleSomeInfo(Context ctx, String object_key) throws BOSException { SaleOrderInfo saleOrderInfo = getSaleOrder(ctx, object_key); logger.info("******调用方法成功*******"+saleOrderInfo.getSiteOrderNumber()); boolean result = false; if(null!= saleOrderInfo){ //预付款 BigDecimal theUseOfAdvancePayment = saleOrderInfo.getTheUseOfAdvancePayment(); theUseOfAdvancePayment = theUseOfAdvancePayment == null ? new BigDecimal("0") : theUseOfAdvancePayment; //发生 BigDecimal divierAmount = saleOrderInfo.getDivierAmount(); divierAmount = divierAmount == null ? new BigDecimal("0") : divierAmount; BigDecimal amountMoney = theUseOfAdvancePayment.subtract(divierAmount); amountMoney = amountMoney == null ? new BigDecimal("0") : amountMoney; String amount = amountMoney.toString(); String data_json = "{orderId:'"+object_key+"',amount:'"+amount+"'}"; //获取客户 CustomerInfo customerInfo = saleOrderInfo.getOrderCustomer(); String customerNumber= customerInfo.getNumber(); logger.info("订单客户number********"+customerNumber); JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.setServiceClass(IWholesaleCheckBalanceWAS.class); factory.setAddress("http://115.236.180.114:701/services/wholesaleCheckBalanceWAS?wsdl"); IWholesaleCheckBalanceWAS client = (IWholesaleCheckBalanceWAS) factory.create(); logger.info("调用client********"+client); System.out.println("=============+++++++"+client); String receive_result = client.execute("U001",compress(data_json),customerNumber); if("true".equals(receive_result)){ result = true; logger.info("调用全麦WSDL成功!"+saleOrderInfo.getSiteOrderNumber()); }else{ result = false; logger.info("调用全麦WSDL失败!"+saleOrderInfo.getSiteOrderNumber()); } } return result; }