|
|
@@ -312,7 +312,7 @@ public class UsoftServiceImpl implements UsoftService {
|
|
|
// 累计发票金额(元)
|
|
|
Double historyApbillAmount = commonDao.queryForObject("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(pab_paymount) amount,pab_currency currency FROM purc$apbill "
|
|
|
+ + " end) result FROM (SELECT SUM(pab_apamount) amount,pab_currency currency FROM purc$apbill "
|
|
|
+ "GROUP BY pab_currency) a", Double.class);
|
|
|
UsoftHistoryTradingData data = new UsoftHistoryTradingData(totalQty, havingTradingQty, whitelistQty,
|
|
|
historyTradingHours, historyOrderNum, historyOrderAmount, historyAcceptAmount, historyReturnAmount,
|
|
|
@@ -628,7 +628,7 @@ public class UsoftServiceImpl implements UsoftService {
|
|
|
private Double getApbillAmount(Date start, Date end) {
|
|
|
StringBuilder sql = new StringBuilder("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(pab_paymount) amount,pab_currency currency FROM purc$apbill where "
|
|
|
+ + " end) result FROM (SELECT SUM(pab_apamount) amount,pab_currency currency FROM purc$apbill where "
|
|
|
+ " pab_date >= ' " + start + " ' and pab_date < ' " + end + "'" + "GROUP BY pab_currency) a");
|
|
|
return commonDao.queryForObject(sql.toString(), Double.class);
|
|
|
}
|