| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.GaoDeMapUtil; |
| | | import com.ruoyi.common.core.vo.AddressDto; |
| | | import com.ruoyi.common.core.vo.PaperInVo; |
| | | import com.ruoyi.common.core.vo.Path; |
| | | import com.ruoyi.order.entity.ChangeDispatch; |
| | | import com.ruoyi.order.entity.Order; |
| | |
| | | // 计算订单总额及总订单数量 |
| | | BigDecimal totalMoney; |
| | | int orderNumber; |
| | | int fakeNumber; |
| | | if (list.isEmpty()) { |
| | | totalMoney = BigDecimal.ZERO; |
| | | orderNumber = 0; |
| | | fakeNumber = 0; |
| | | } else { |
| | | totalMoney = list.stream().map(OrderQueryVO::getTotalPrice) |
| | | .filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | orderNumber = list.stream().filter(order -> order.getNumber() != null) |
| | | .mapToInt(OrderQueryVO::getNumber).sum(); |
| | | } |
| | | return new |
| | | fakeNumber = list.stream().filter(order -> order.getFakeCount() != null) |
| | | .mapToInt(OrderQueryVO::getFakeCount).sum(); |
| | | |
| | | OrderResultVO(totalMoney, orderNumber, list); |
| | | } |
| | | return new OrderResultVO(totalMoney, orderNumber, list,fakeNumber); |
| | | |
| | | } |
| | | |
| | |
| | | return String.valueOf(order.getId()); |
| | | } |
| | | |
| | | @Override |
| | | public List<PaperInVo> papercout(String workId,String date) { |
| | | return this.baseMapper.papercout(workId,date); |
| | | } |
| | | |
| | | /** |
| | | * 根据当前月份获取当前季度的开始月份 |
| | | */ |