|
|
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.uas.platform.b2b.core.util.ContextUtils;
|
|
|
import com.uas.platform.b2b.core.util.DateFormatUtils;
|
|
|
import com.uas.platform.b2b.core.util.DateUtils;
|
|
|
-import com.uas.platform.b2b.core.util.StringUtil;
|
|
|
import com.uas.platform.b2b.core.util.ThreadUtils;
|
|
|
import com.uas.platform.b2b.dao.CommonDao;
|
|
|
import com.uas.platform.b2b.dao.EnterpriseDao;
|
|
|
@@ -30,7 +29,6 @@ import com.uas.platform.b2b.search.SearchService;
|
|
|
import com.uas.platform.b2b.service.OrderRedDotService;
|
|
|
import com.uas.platform.b2b.service.PurchaseApCheckService;
|
|
|
import com.uas.platform.b2b.service.UserService;
|
|
|
-import com.uas.platform.b2b.service.VendorService;
|
|
|
import com.uas.platform.b2b.support.SPageUtils;
|
|
|
import com.uas.platform.b2b.support.SystemSession;
|
|
|
import com.uas.platform.core.exception.IllegalOperatorException;
|
|
|
@@ -46,7 +44,6 @@ import com.uas.search.b2b.model.Sort;
|
|
|
import com.uas.search.b2b.util.SearchConstants;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
-import org.springframework.data.domain.PageImpl;
|
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -650,9 +647,15 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
|
|
|
Double hkdCount = totalTrades.stream().filter(tradeCount -> HKD.equals(tradeCount.getCurrency()) && null != tradeCount.getAmount())
|
|
|
.mapToDouble(trade -> trade.getAmount().doubleValue()).sum();
|
|
|
List<TradeCount> resultCounts = new ArrayList<>();
|
|
|
- resultCounts.add(new TradeCount(RMB, rmbCount));
|
|
|
- resultCounts.add(new TradeCount(USD, usdCount));
|
|
|
- resultCounts.add(new TradeCount(HKD, hkdCount));
|
|
|
+ if (rmbCount > 0) {
|
|
|
+ resultCounts.add(new TradeCount(RMB, rmbCount));
|
|
|
+ }
|
|
|
+ if (usdCount > 0) {
|
|
|
+ resultCounts.add(new TradeCount(USD, usdCount));
|
|
|
+ }
|
|
|
+ if (hkdCount > 0) {
|
|
|
+ resultCounts.add(new TradeCount(HKD, hkdCount));
|
|
|
+ }
|
|
|
return resultCounts;
|
|
|
}
|
|
|
|
|
|
@@ -700,9 +703,15 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
|
|
|
Double hkdCount = totalTrades.stream().filter(tradeCount -> HKD.equals(tradeCount.getCurrency()) && null != tradeCount.getAmount())
|
|
|
.mapToDouble(trade -> trade.getAmount().doubleValue()).sum();
|
|
|
List<TradeCount> resultCounts = new ArrayList<>();
|
|
|
- resultCounts.add(new TradeCount(RMB, rmbCount));
|
|
|
- resultCounts.add(new TradeCount(USD, usdCount));
|
|
|
- resultCounts.add(new TradeCount(HKD, hkdCount));
|
|
|
+ if (rmbCount > 0) {
|
|
|
+ resultCounts.add(new TradeCount(RMB, rmbCount));
|
|
|
+ }
|
|
|
+ if (usdCount > 0) {
|
|
|
+ resultCounts.add(new TradeCount(USD, usdCount));
|
|
|
+ }
|
|
|
+ if (hkdCount > 0) {
|
|
|
+ resultCounts.add(new TradeCount(HKD, hkdCount));
|
|
|
+ }
|
|
|
return resultCounts;
|
|
|
}
|
|
|
|