|
|
@@ -402,7 +402,7 @@ public class TradingDataServiceImpl implements TradingDataService {
|
|
|
private Double getOrderSum(Long enUU) {
|
|
|
StringBuffer sql = new StringBuffer("SELECT sum(case currency when 'RMB' then a.amount when 'USD' "
|
|
|
+ "then a.amount * " + ErpRate.USD_RATE + " when 'HKD' then a.amount * " + ErpRate.HKD_RATE + " end) result "
|
|
|
- + "FROM (SELECT sum(pd_price) amount,pu_currency currency FROM purc$orders LEFT JOIN purc$orderitems "
|
|
|
+ + "FROM (SELECT sum(pd_price*pd_qty) amount,pu_currency currency FROM purc$orders LEFT JOIN purc$orderitems "
|
|
|
+ "on pu_id=pd_puid where pu_venduu = " + enUU + " GROUP BY pu_currency) a");
|
|
|
Double result = commonDao.queryForObject(sql.toString(), Double.class);
|
|
|
return NumFormat.getTwo(NumFormat.getTenThousand(result));
|