| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.mapper.AccountIncomeMapper; |
| | | import com.ruoyi.account.pojo.AccountExpense; |
| | |
| | | import com.ruoyi.production.mapper.SalesLedgerProductionAccountingMapper; |
| | | import com.ruoyi.production.pojo.ProductProcess; |
| | | import com.ruoyi.production.pojo.ProductWorkOrder; |
| | | import com.ruoyi.productionPlan.enums.AddressRegionEnum; |
| | | import com.ruoyi.productionPlan.mapper.SalesDeliveryMapper; |
| | | import com.ruoyi.productionPlan.pojo.SalesDelivery; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper; |
| | | import com.ruoyi.purchase.mapper.PaymentRegistrationMapper; |
| | |
| | | |
| | | @Autowired |
| | | private AccountIncomeMapper accountIncomeMapper; |
| | | |
| | | @Autowired |
| | | private SalesDeliveryMapper salesDeliveryMapper; |
| | | |
| | | @Override |
| | | public HomeBusinessDto business() { |
| | |
| | | |
| | | return productProcessMapper.calculateProductionStatistics(startDateTime, endDateTime, userId, processIds); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Long> total() { |
| | | Map<String, Long> map = new HashMap<>(); |
| | | //总销售金额 |
| | | List<SalesDelivery> salesDeliveries = salesDeliveryMapper.selectList(null); |
| | | long sum = salesDeliveries.stream().mapToLong(value -> Long.parseLong(value.getPrice().toString())).sum(); |
| | | map.put("price",sum/1000);//单位w |
| | | //总发货单 |
| | | map.put("delivery",salesDeliveries.stream().count()); |
| | | //总销售区? |
| | | //累计客户 |
| | | Long count = customerMapper.selectCount(null); |
| | | map.put("customer",count); |
| | | return map; |
| | | } |
| | | } |