| | |
| | | if (CollUtil.isNotEmpty(orders)) { |
| | | for (YdOrderEntity order : orders) { |
| | | if ("P".equals(order.getYdProductEntity().getProUnit())) { |
| | | totalPower = totalPower.add(BigDecimal.valueOf(order.getQuantity() * 1024)); |
| | | totalPower = totalPower.add(BigDecimal.valueOf(order.getQuantity() * order.getYdProductEntity().getProNum() * 1024)); |
| | | } else { |
| | | totalPower = totalPower.add(BigDecimal.valueOf(order.getQuantity())); |
| | | totalPower = totalPower.add(BigDecimal.valueOf(order.getQuantity() * order.getYdProductEntity().getProNum())); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (CollUtil.isNotEmpty(products)) { |
| | | BigDecimal totalCount = BigDecimal.ZERO; |
| | | for (YdProductEntity product : products) { |
| | | BigDecimal count = product.getTotalT(); |
| | | BigDecimal count = product.getTotalT().multiply(BigDecimal.valueOf(product.getProNum())); |
| | | if ("P".equals(product.getProUnit())) { |
| | | count = count.multiply(BigDecimal.valueOf(1024)); |
| | | } |
| | |
| | | List<String> inviteIds = StrUtil.split(memberEntity.getRefererIds(), ','); |
| | | List<MemberEntity> agents = memberDao.selectYdParentAgent(inviteIds); |
| | | |
| | | BigDecimal count = BigDecimal.valueOf(order.getQuantity()); |
| | | BigDecimal count = BigDecimal.valueOf(order.getQuantity() * order.getYdProductEntity().getProNum()); |
| | | if ("P".equals(order.getYdProductEntity().getProUnit())) { |
| | | count = count.multiply(BigDecimal.valueOf(1024)); |
| | | } |