|
|
|
@ -144,31 +144,31 @@ public class BsOrderController { |
|
|
|
|
|
|
|
|
|
BigDecimal goldCoinExchangeRate = new BigDecimal(secDictionaryService.getDictionary("GOLD_COIN_EXCHANGE_RATE").get(0).getCodeValue()); |
|
|
|
|
map.put("cumulative" , userAccountRecordService.getUserTotalProfit(session.getUser().getId() , null , null)); |
|
|
|
|
map.put("unliquidated" , allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
map.put("unliquidated" , allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2) ).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
|
|
|
|
|
// 今日收益报表
|
|
|
|
|
Map<String , Object> todayReport = new HashMap<>(); |
|
|
|
|
JSONObject object; |
|
|
|
|
// 获取今天新增订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2) ).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
todayReport.put("todayAddOrder", object); |
|
|
|
|
// 获取今天我的订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
todayReport.put("todayUserOrder", object); |
|
|
|
|
|
|
|
|
|
// 团队订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderTeamNum", (int) teamOrderList.stream().filter(s->s.getStatus().equals(5)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderTeamMoney", teamOrderList.stream().filter(s->s.getStatus().equals(5)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderTeamNum", (int) teamOrderList.stream().filter(s->s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderTeamMoney", teamOrderList.stream().filter(s->s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
todayReport.put("teamOrderList", object); |
|
|
|
|
// 获取今天失效订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderFailureNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(6)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderFailureMoney", allOrderList.stream().filter(s -> s.getStatus().equals(6)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderFailureNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(4)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderFailureMoney", allOrderList.stream().filter(s -> s.getStatus().equals(4)).filter(s -> s.getCreateTime().toInstant().isAfter(todayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(todayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
todayReport.put("todayFailureOrder", object); |
|
|
|
|
map.put("todayReport" ,todayReport); |
|
|
|
|
|
|
|
|
@ -176,24 +176,24 @@ public class BsOrderController { |
|
|
|
|
Map<String , Object> yesterdayReport = new HashMap<>(); |
|
|
|
|
// 获取昨天新增订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
yesterdayReport.put("yesterdayAddOrder", object); |
|
|
|
|
// 获取昨天我的订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
yesterdayReport.put("yesterdayUserOrder", object); |
|
|
|
|
|
|
|
|
|
// 团队订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) teamOrderList.stream().filter(s->s.getStatus().equals(5)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", teamOrderList.stream().filter(s->s.getStatus().equals(5)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) teamOrderList.stream().filter(s->s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", teamOrderList.stream().filter(s->s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
yesterdayReport.put("yesterdayOrderList", object); |
|
|
|
|
// 获取昨天失效订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(6)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(6)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(4)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(4)).filter(s -> s.getCreateTime().toInstant().isAfter(yesterdayTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(yesterdayTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
yesterdayReport.put("yesterdayFailureOrder", object); |
|
|
|
|
map.put("yesterdayReport" ,yesterdayReport); |
|
|
|
|
|
|
|
|
@ -201,24 +201,24 @@ public class BsOrderController { |
|
|
|
|
Map<String , Object> thisMonthReport = new HashMap<>(); |
|
|
|
|
// 获取本月新增订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
thisMonthReport.put("thisMonthAddOrder", object); |
|
|
|
|
// 获取本月我的订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
thisMonthReport.put("thisMonthUserOrder", object); |
|
|
|
|
|
|
|
|
|
// 团队订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) teamOrderList.stream().filter(s->s.getStatus().equals(5)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", teamOrderList.stream().filter(s->s.getStatus().equals(5)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) teamOrderList.stream().filter(s->s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", teamOrderList.stream().filter(s->s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
thisMonthReport.put("thisMonthOrderList", object); |
|
|
|
|
// 获取本月失效订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(6)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(6)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(4)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(4)).filter(s -> s.getCreateTime().toInstant().isAfter(thisMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(thisMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
thisMonthReport.put("thisMonthFailureOrder", object); |
|
|
|
|
map.put("thisMonthReport" ,thisMonthReport); |
|
|
|
|
|
|
|
|
@ -227,24 +227,24 @@ public class BsOrderController { |
|
|
|
|
Map<String , Object> lastMonthReport = new HashMap<>(); |
|
|
|
|
// 获取本月新增订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
lastMonthReport.put("lastMonthAddOrder", object); |
|
|
|
|
// 获取本月我的订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2) || s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", orderUserList.stream().filter(s->s.getStatus().equals(1) || s.getStatus().equals(2) ).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
lastMonthReport.put("lastMonthUserOrder", object); |
|
|
|
|
|
|
|
|
|
// 团队订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) teamOrderList.stream().filter(s->s.getStatus().equals(5)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", teamOrderList.stream().filter(s->s.getStatus().equals(5)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) teamOrderList.stream().filter(s->s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", teamOrderList.stream().filter(s->s.getStatus().equals(3)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
lastMonthReport.put("lastMonthOrderList", object); |
|
|
|
|
// 获取本月失效订单
|
|
|
|
|
object = new JSONObject(); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(6)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(6)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
object.put("orderNum", (int) allOrderList.stream().filter(s -> s.getStatus().equals(4)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).count()); |
|
|
|
|
object.put("orderMoney", allOrderList.stream().filter(s -> s.getStatus().equals(4)).filter(s -> s.getCreateTime().toInstant().isAfter(lastMonthTime.get("timeS").toInstant()) && s.getCreateTime().toInstant().isBefore(lastMonthTime.get("timeE").toInstant())).map(BsOrder::getPromotionAmount).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(goldCoinExchangeRate)); |
|
|
|
|
lastMonthReport.put("lastMonthFailureOrder", object); |
|
|
|
|
map.put("lastMonthReport" ,lastMonthReport); |
|
|
|
|
return ResponseMsgUtil.success(map); |
|
|
|
|