| | |
| | | } |
| | | |
| | | TCrmSupplier crmSupplier = crmSupplierService.getOne(Wrappers.lambdaQuery(TCrmSupplier.class) |
| | | .eq(TCrmSupplier::getUserId, userId)); |
| | | .eq(TCrmSupplier::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | // *** |
| | | if(Objects.isNull(crmSupplier)){ |
| | | SysUser sysUser = sysUserService.selectUserById(userId); |
| | | crmSupplier = crmSupplierService.getById(sysUser.getObjectId()); |
| | | } |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | |
| | | map.put("orderMoney", 0); // 订单金额 |
| | | map.put("commissionMoney", 0); // 分佣金额 |
| | | } else { |
| | | BigDecimal orderMoney = orderQuantity.stream().map(TErpProcurement::getPayMoney).reduce(BigDecimal.ZERO,BigDecimal::add); |
| | | BigDecimal orderMoney = orderQuantity.stream().map(TErpProcurement::getPayMoney).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | map.put("orderMoney", orderMoney); |
| | | BigDecimal commissionMoney = orderQuantity.stream().map(TErpProcurement::getSupplierMoney).reduce(BigDecimal.ZERO,BigDecimal::add); |
| | | BigDecimal commissionMoney = orderQuantity.stream().map(TErpProcurement::getSupplierMoney).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | map.put("commissionMoney", commissionMoney); |
| | | } |
| | | return R.ok(map); |
| | |
| | | String supplierAndClinicId = null; |
| | | if (roleType == 4) { |
| | | TCrmSupplier crmSupplier = crmSupplierService.getOne(Wrappers.lambdaQuery(TCrmSupplier.class) |
| | | .eq(TCrmSupplier::getUserId, userId)); |
| | | .eq(TCrmSupplier::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | // *** |
| | | if(Objects.isNull(crmSupplier)){ |
| | | SysUser sysUser = sysUserService.selectUserById(userId); |
| | | crmSupplier = crmSupplierService.getById(sysUser.getObjectId()); |
| | | } |
| | | supplierAndClinicId = crmSupplier.getId(); |
| | | } else { |
| | | TCrmClinic crmClinic = crmClinicService.getOne(Wrappers.lambdaQuery(TCrmClinic.class) |
| | | .eq(TCrmClinic::getUserId, userId)); |
| | | .eq(TCrmClinic::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(crmClinic)){ |
| | | SysUser sysUser = sysUserService.selectUserById(userId); |
| | | crmClinic = crmClinicService.getById(sysUser.getObjectId()); |
| | | } |
| | | if(Objects.isNull(crmClinic)){ |
| | | return R.fail("未找到该账号诊所信息"); |
| | | } |
| | | supplierAndClinicId = crmClinic.getId(); |
| | | } |
| | | |
| | |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | |
| | | TCrmClinic crmClinic = crmClinicService.getOne(Wrappers.lambdaQuery(TCrmClinic.class) |
| | | .eq(TCrmClinic::getUserId, userId)); |
| | | .eq(TCrmClinic::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(crmClinic)){ |
| | | SysUser sysUser = sysUserService.selectUserById(userId); |
| | | crmClinic = crmClinicService.getById(sysUser.getObjectId()); |
| | | } |
| | | if(Objects.isNull(crmClinic)){ |
| | | return R.fail("未找到该账号诊所信息"); |
| | | } |
| | | |
| | | List<TSysAppUser> sysAppUsers = sysAppUserService.list(Wrappers.lambdaQuery(TSysAppUser.class) |
| | | .eq(TSysAppUser::getClinicId, crmClinic.getId())); |
| | |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | |
| | | TCrmClinic crmClinic = crmClinicService.getOne(Wrappers.lambdaQuery(TCrmClinic.class) |
| | | .eq(TCrmClinic::getUserId, userId)); |
| | | |
| | | .eq(TCrmClinic::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(crmClinic)){ |
| | | SysUser sysUser = sysUserService.selectUserById(userId); |
| | | crmClinic = crmClinicService.getById(sysUser.getObjectId()); |
| | | } |
| | | if(Objects.isNull(crmClinic)){ |
| | | return R.fail("未找到该账号诊所信息"); |
| | | } |
| | | List<TCrmClinicPoints> crmClinicPoints = crmClinicPointsService.clinicPointsStatistics(crmClinic.getId(), LocalDate.now() + " 23:59:59"); |
| | | Map<String, Integer> map = new HashMap<>(); |
| | | if (CollectionUtils.isEmpty(crmClinicPoints)) { |
| | |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | |
| | | TCrmSupplier crmSupplier = crmSupplierService.getOne(Wrappers.lambdaQuery(TCrmSupplier.class) |
| | | .eq(TCrmSupplier::getUserId, userId)); |
| | | .eq(TCrmSupplier::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | // *** |
| | | if(Objects.isNull(crmSupplier)){ |
| | | SysUser sysUser = sysUserService.selectUserById(userId); |
| | | crmSupplier = crmSupplierService.getById(sysUser.getObjectId()); |
| | | } |
| | | // 查询药品总类和总数 |
| | | Integer typeTotalCount = erpProcurementService.supplierSalesStatisticsTypeCount(crmSupplier.getId()); |
| | | Integer totalCount = erpProcurementService.supplierSalesStatisticsCount(crmSupplier.getId()); |
| | |
| | | break; |
| | | } |
| | | TCrmSupplier crmSupplier = crmSupplierService.getOne(Wrappers.lambdaQuery(TCrmSupplier.class) |
| | | .eq(TCrmSupplier::getUserId, userId)); |
| | | .eq(TCrmSupplier::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | // *** |
| | | if(Objects.isNull(crmSupplier)){ |
| | | SysUser sysUser = sysUserService.selectUserById(userId); |
| | | crmSupplier = crmSupplierService.getById(sysUser.getObjectId()); |
| | | } |
| | | SupplierSalesStatisticsVO supplierSalesStatisticsVO = new SupplierSalesStatisticsVO(); |
| | | // 销售金额 |
| | | BigDecimal totalMoney = erpProcurementService.supplierSalesStatisticsMoney(crmSupplier.getId(), startTime, endTime); |
| | |
| | | // 其余的添加到其他 |
| | | List<SupplierSalesStatisticsGoodsTypeVO> otherList = supplierSalesStatisticsGoodsTypeVOS.subList(9, supplierSalesStatisticsGoodsTypeVOS.size()); |
| | | SupplierSalesStatisticsGoodsTypeVO other = new SupplierSalesStatisticsGoodsTypeVO(); |
| | | other.setTypeName("其他"); |
| | | other.setGoodsName("其他"); |
| | | other.setGoodsCount(otherList.stream().mapToInt(SupplierSalesStatisticsGoodsTypeVO::getGoodsCount).sum()); |
| | | supplierSalesStatisticsGoodsTypeVOS.add(other); |
| | | supplierSalesStatisticsGoodsTypeVOS = supplierSalesStatisticsGoodsTypeVOS.subList(0, 9); |
| | |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | |
| | | TCrmClinic crmClinic = crmClinicService.getOne(Wrappers.lambdaQuery(TCrmClinic.class) |
| | | .eq(TCrmClinic::getUserId, userId)); |
| | | .eq(TCrmClinic::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(crmClinic)){ |
| | | SysUser sysUser = sysUserService.selectUserById(userId); |
| | | crmClinic = crmClinicService.getById(sysUser.getObjectId()); |
| | | } |
| | | if(Objects.isNull(crmClinic)){ |
| | | return R.fail("未找到该账号诊所信息"); |
| | | } |
| | | // 查询药品总类和总数 |
| | | Integer typeTotalCount = sysOrderService.clinicSalesStatisticsTypeCount(Arrays.asList(crmClinic.getId())); |
| | | Integer totalCount = sysOrderService.clinicSalesStatisticsCount(Arrays.asList(crmClinic.getId())); |
| | | Integer typeTotalCount = sysOrderService.clinicSalesStatisticsTypeCount(Collections.singletonList(crmClinic.getId())); |
| | | Integer totalCount = sysOrderService.clinicSalesStatisticsCount(Collections.singletonList(crmClinic.getId())); |
| | | Map<String, Integer> map = new HashMap<>(); |
| | | map.put("typeTotalCount", typeTotalCount); |
| | | map.put("totalCount", totalCount); |
| | |
| | | break; |
| | | } |
| | | TCrmClinic crmClinic = crmClinicService.getOne(Wrappers.lambdaQuery(TCrmClinic.class) |
| | | .eq(TCrmClinic::getUserId, userId)); |
| | | .eq(TCrmClinic::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(crmClinic)){ |
| | | SysUser sysUser = sysUserService.selectUserById(userId); |
| | | crmClinic = crmClinicService.getById(sysUser.getObjectId()); |
| | | } |
| | | if(Objects.isNull(crmClinic)){ |
| | | return R.fail("未找到该账号诊所信息"); |
| | | } |
| | | ClinicSalesStatisticsVO clinicSalesStatisticsVO = new ClinicSalesStatisticsVO(); |
| | | // 销售金额 |
| | | BigDecimal totalMoney = sysOrderService.clinicSalesStatisticsMoney(crmClinic.getId(), startTime, endTime); |
| | |
| | | // 其余的添加到其他 |
| | | List<ClinicSalesStatisticsGoodsTypeVO> otherList = clinicSalesStatisticsGoodsTypeVOS.subList(9, clinicSalesStatisticsGoodsTypeVOS.size()); |
| | | ClinicSalesStatisticsGoodsTypeVO other = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | other.setTypeName("其他"); |
| | | other.setGoodsName("其他"); |
| | | other.setGoodsCount(otherList.stream().mapToInt(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).sum()); |
| | | clinicSalesStatisticsGoodsTypeVOS.add(other); |
| | | clinicSalesStatisticsGoodsTypeVOS = clinicSalesStatisticsGoodsTypeVOS.subList(0, 9); |
| | |
| | | Integer roleType = user.getRoleType(); |
| | | if (roleType == 2) { |
| | | TCrmBranch branch = crmBranchService.getOne(Wrappers.lambdaQuery(TCrmBranch.class) |
| | | .eq(TCrmBranch::getUserId, user.getUserId())); |
| | | .eq(TCrmBranch::getUserId, user.getUserId()) |
| | | .last("LIMIT 1")); |
| | | if (branch != null) { |
| | | List<TCrmClinic> list = crmClinicService.list(Wrappers.lambdaQuery(TCrmClinic.class).eq(TCrmClinic::getBranchId, branch.getId()).in(TCrmClinic::getStatus,Arrays.asList(3,4,5))); |
| | | List<TCrmClinic> list = crmClinicService.list(Wrappers.lambdaQuery(TCrmClinic.class).eq(TCrmClinic::getBranchId, branch.getId()).in(TCrmClinic::getStatus, Arrays.asList(3, 4, 5))); |
| | | if (!list.isEmpty()) { |
| | | List<String> crmClinicIds = list.stream().map(TCrmClinic::getId).collect(Collectors.toList()); |
| | | |
| | |
| | | } else { |
| | | eq.eq(TCrmClinic::getBranchId, branch.getId()); |
| | | } |
| | | eq.in(TCrmClinic::getStatus,Arrays.asList(3,4,5)); |
| | | eq.in(TCrmClinic::getStatus, Arrays.asList(3, 4, 5)); |
| | | |
| | | List<TCrmClinic> list = crmClinicService.list(eq); |
| | | branchAdminStatisticsTwoVo.setClinicNum(list.size()); |
| | |
| | | if (branch != null) { |
| | | LambdaQueryWrapper<TCrmClinic> eq = Wrappers.lambdaQuery(TCrmClinic.class); |
| | | eq.eq(TCrmClinic::getBranchId, branch.getId()); |
| | | eq.eq(TCrmClinic::getStatus, Arrays.asList(3,4,5)); |
| | | eq.eq(TCrmClinic::getStatus, Arrays.asList(3, 4, 5)); |
| | | List<TCrmClinic> list = crmClinicService.list(eq); |
| | | |
| | | List<String> clinicIds = list.stream().map(TCrmClinic::getId).collect(Collectors.toList()); |
| | |
| | | List<ClinicSalesStatisticsGoodsTypeVO> thirtyMoneyProcurementStatisticsVOS = collect2.entrySet().stream().map(entry -> { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(entry.getValue().stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | clinicSalesStatisticsGoodsTypeVO.setTypeName(entry.getValue().get(0).getGoodsName()); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsName(entry.getValue().get(0).getGoodsName()); |
| | | return clinicSalesStatisticsGoodsTypeVO; |
| | | }).sorted(Comparator.comparing(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).reversed()).limit(9).collect(Collectors.toList()); |
| | | // 总数 |
| | |
| | | if (sum - sum1 > 0) { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(sum - sum1); |
| | | clinicSalesStatisticsGoodsTypeVO.setTypeName("其他"); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsName("其他"); |
| | | thirtyMoneyProcurementStatisticsVOS.add(clinicSalesStatisticsGoodsTypeVO); |
| | | } |
| | | vo.setThirtyMoneyProcurementStatisticsVOS(thirtyMoneyProcurementStatisticsVOS); |
| | |
| | | |
| | | Integer roleType = user.getRoleType(); |
| | | if (roleType == 1) { |
| | | List<TCrmClinic> list = crmClinicService.list(new LambdaQueryWrapper<TCrmClinic>().in(TCrmClinic::getStatus,Arrays.asList(3,4,5))); |
| | | List<TCrmClinic> list = crmClinicService.list(new LambdaQueryWrapper<TCrmClinic>().in(TCrmClinic::getStatus, Arrays.asList(3, 4, 5))); |
| | | if (!list.isEmpty()) { |
| | | |
| | | long branchCount = crmBranchService.count(); |
| | |
| | | break; |
| | | } |
| | | |
| | | if(!collect3.isEmpty()){ |
| | | if (!collect3.isEmpty()) { |
| | | |
| | | branchAdminStatisticsOneVo.setBranchMoney(collect3.stream().filter(e -> e.getCommissionType() == 1).map(TErpProcurementCommission::getMoney).reduce(BigDecimal::add).get()); |
| | | branchAdminStatisticsOneVo.setStaffMoney(collect3.stream().filter(e -> e.getCommissionType() == 2).map(TErpProcurementCommission::getMoney).reduce(BigDecimal::add).get()); |
| | |
| | | if (query.getSalespersonId() != null && !query.getSalespersonId().isEmpty()) { |
| | | w.eq(TCrmClinic::getSalespersonId, query.getSalespersonId()); |
| | | } |
| | | w.in(TCrmClinic::getStatus,Arrays.asList(3,4,5)); |
| | | w.in(TCrmClinic::getStatus, Arrays.asList(3, 4, 5)); |
| | | List<TCrmClinic> list = crmClinicService.list(w); |
| | | branchAdminStatisticsOneVo.setClinicNum(list.size()); |
| | | |
| | |
| | | } |
| | | List<TErpProcurementCommission> collect3 = erpProcurementCommissionService.list(new LambdaQueryWrapper<TErpProcurementCommission>() |
| | | .between(TErpProcurementCommission::getCreateTime, startTime, endTime)); |
| | | List<TCrmChangePoints> pointsList = crmChangePointsService.list(new LambdaQueryWrapper<TCrmChangePoints>().eq(TCrmChangePoints::getChangeType,1) |
| | | List<TCrmChangePoints> pointsList = crmChangePointsService.list(new LambdaQueryWrapper<TCrmChangePoints>().eq(TCrmChangePoints::getChangeType, 1) |
| | | .between(TCrmChangePoints::getCreateTime, startTime, endTime)); |
| | | if(query.getBranchId()!=null && !query.getBranchId().isEmpty()){ |
| | | BigDecimal bigDecimal = collect3.stream().filter(e -> e.getCommissionType() == 1 && e.getBranchSalespersonId().equals(query.getBranchId())).map(TErpProcurementCommission::getMoney).reduce(BigDecimal.ZERO,BigDecimal::add); |
| | | if (query.getBranchId() != null && !query.getBranchId().isEmpty()) { |
| | | BigDecimal bigDecimal = collect3.stream().filter(e -> e.getCommissionType() == 1 && e.getBranchSalespersonId().equals(query.getBranchId())).map(TErpProcurementCommission::getMoney).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | branchAdminStatisticsOneVo.setBranchMoney(bigDecimal); |
| | | |
| | | int sum = pointsList.stream().filter(e -> e.getBranchSalespersonId().equals(query.getBranchId()) && e.getUserType() == 1).mapToInt(TCrmChangePoints::getChangeValue).sum(); |
| | | branchAdminStatisticsOneVo.setBranchPoints(sum); |
| | | |
| | | }else { |
| | | branchAdminStatisticsOneVo.setBranchMoney(collect3.stream().filter(e -> e.getCommissionType() == 1).map(TErpProcurementCommission::getMoney).reduce(BigDecimal.ZERO,BigDecimal::add)); |
| | | } else { |
| | | branchAdminStatisticsOneVo.setBranchMoney(collect3.stream().filter(e -> e.getCommissionType() == 1).map(TErpProcurementCommission::getMoney).reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | int sum = pointsList.stream().filter(e -> e.getUserType() == 1).mapToInt(TCrmChangePoints::getChangeValue).sum(); |
| | | branchAdminStatisticsOneVo.setBranchPoints(sum); |
| | | } |
| | | if(query.getSalespersonId()!=null && !query.getSalespersonId().isEmpty()){ |
| | | BigDecimal bigDecimal = collect3.stream().filter(e -> e.getCommissionType() == 2 && e.getBranchSalespersonId().equals(query.getSalespersonId())).map(TErpProcurementCommission::getMoney).reduce(BigDecimal.ZERO,BigDecimal::add); |
| | | if (query.getSalespersonId() != null && !query.getSalespersonId().isEmpty()) { |
| | | BigDecimal bigDecimal = collect3.stream().filter(e -> e.getCommissionType() == 2 && e.getBranchSalespersonId().equals(query.getSalespersonId())).map(TErpProcurementCommission::getMoney).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | branchAdminStatisticsOneVo.setStaffMoney(bigDecimal); |
| | | |
| | | int sum = pointsList.stream().filter(e -> e.getBranchSalespersonId().equals(query.getSalespersonId()) && e.getUserType() == 2).mapToInt(TCrmChangePoints::getChangeValue).sum(); |
| | | branchAdminStatisticsOneVo.setStaffPoints(sum); |
| | | }else { |
| | | branchAdminStatisticsOneVo.setStaffMoney(collect3.stream().filter(e -> e.getCommissionType() == 2).map(TErpProcurementCommission::getMoney).reduce(BigDecimal.ZERO,BigDecimal::add)); |
| | | } else { |
| | | branchAdminStatisticsOneVo.setStaffMoney(collect3.stream().filter(e -> e.getCommissionType() == 2).map(TErpProcurementCommission::getMoney).reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | int sum = pointsList.stream().filter(e -> e.getUserType() == 2).mapToInt(TCrmChangePoints::getChangeValue).sum(); |
| | | branchAdminStatisticsOneVo.setStaffPoints(sum); |
| | | } |
| | |
| | | SimpleDateFormat formatMonth = new SimpleDateFormat("yyyy-MM"); |
| | | Integer roleType = user.getRoleType(); |
| | | if (roleType == 1) { |
| | | LambdaQueryWrapper<TCrmClinic> eq = Wrappers.lambdaQuery(TCrmClinic.class); |
| | | if(query.getBranchId()!=null && !query.getBranchId().isEmpty()){ |
| | | eq.eq(TCrmClinic::getBranchId, query.getBranchId()); |
| | | } |
| | | eq.in(TCrmClinic::getStatus,Arrays.asList(3,4,5)); |
| | | List<TCrmClinic> list = crmClinicService.list(eq); |
| | | |
| | | List<String> clinicIds = list.stream().map(TCrmClinic::getId).collect(Collectors.toList()); |
| | | if (clinicIds.isEmpty()) { |
| | | return R.ok(vo); |
| | | } |
| | | // 查询这个诊所的所有订单并算出商品种类数 和 商品数 |
| | | List<TErpProcurementGoods> erpProcurementGoods = erpProcurementService.branchAdminStatisticsThree(clinicIds); |
| | | |
| | | // 根据商品id算出商品种类数 |
| | | vo.setGoodsTypeCount((int) erpProcurementGoods.stream().map(TErpProcurementGoods::getGoodsId).distinct().count()); |
| | | |
| | | // 算出商品数 |
| | | vo.setGoodsCount(erpProcurementGoods.stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | List<TErpProcurementGoods> collect = null; |
| | | switch (query.getType()) { |
| | | case 1: |
| | | // 通过payTime是今日的数据 |
| | | collect = erpProcurementGoods.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isEqual(LocalDate.now())).collect(Collectors.toList()); |
| | | break; |
| | | case 2: |
| | | // 通过payTime是昨日的数据 |
| | | collect = erpProcurementGoods.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isEqual(LocalDate.now().minusDays(1))).collect(Collectors.toList()); |
| | | break; |
| | | case 3: |
| | | // 通过payTime是近7天的数据 |
| | | collect = erpProcurementGoods.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isAfter(LocalDate.now().minusDays(7))).collect(Collectors.toList()); |
| | | break; |
| | | case 4: |
| | | // 通过payTime是近半年的数据 |
| | | collect = erpProcurementGoods.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isAfter(LocalDate.now().minusMonths(6))).collect(Collectors.toList()); |
| | | break; |
| | | case 5: |
| | | // 通过payTime是近一年的数据 |
| | | collect = erpProcurementGoods; |
| | | break; |
| | | } |
| | | vo.setMoneyProcurement(collect.stream().map(TErpProcurementGoods::getPayMoney).reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | |
| | | //collect 通过goodsId 分组并 根据purchaseCount 倒叙 |
| | | Map<String, List<TErpProcurementGoods>> collect2 = collect.stream().collect(groupingBy(TErpProcurementGoods::getGoodsId)); |
| | | List<ClinicSalesStatisticsGoodsTypeVO> thirtyMoneyProcurementStatisticsVOS = collect2.entrySet().stream().map(entry -> { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(entry.getValue().stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | clinicSalesStatisticsGoodsTypeVO.setTypeName(entry.getValue().get(0).getGoodsName()); |
| | | return clinicSalesStatisticsGoodsTypeVO; |
| | | }).sorted(Comparator.comparing(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).reversed()).limit(9).collect(Collectors.toList()); |
| | | // 总数 |
| | | int sum = collect.stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum(); |
| | | int sum1 = thirtyMoneyProcurementStatisticsVOS.stream().mapToInt(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).sum(); |
| | | if (sum - sum1 > 0) { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(sum - sum1); |
| | | clinicSalesStatisticsGoodsTypeVO.setTypeName("其他"); |
| | | thirtyMoneyProcurementStatisticsVOS.add(clinicSalesStatisticsGoodsTypeVO); |
| | | } |
| | | vo.setThirtyMoneyProcurementStatisticsVOS(thirtyMoneyProcurementStatisticsVOS); |
| | | |
| | | |
| | | ArrayList<ProcurementStatisticsVO> procurementStatisticsVOS = new ArrayList<>(); |
| | | // 是否做了搜索 |
| | | if (query.getName() != null && !query.getName().isEmpty()) { |
| | | collect = collect.stream().filter(e -> e.getGoodsName().equals(query.getName())).collect(Collectors.toList()); |
| | | } |
| | | if (query.getType() == 1 && !collect.isEmpty()) { |
| | | ProcurementStatisticsVO procurementStatisticsVO = new ProcurementStatisticsVO(); |
| | | procurementStatisticsVO.setTime(LocalDate.now().toString()); |
| | | procurementStatisticsVO.setCount(collect.stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | procurementStatisticsVOS.add(procurementStatisticsVO); |
| | | } |
| | | if (query.getType() == 2 && !collect.isEmpty()) { |
| | | // 昨日的数据 |
| | | ProcurementStatisticsVO procurementStatisticsVO = new ProcurementStatisticsVO(); |
| | | procurementStatisticsVO.setTime(LocalDate.now().minusDays(1).toString()); |
| | | procurementStatisticsVO.setCount(collect.stream().filter(e -> e.getPayTime().toLocalDate().isEqual(LocalDate.now().minusDays(1))).mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | procurementStatisticsVOS.add(procurementStatisticsVO); |
| | | } |
| | | |
| | | if (query.getType() == 3 && !collect.isEmpty()) { |
| | | // 近7天的数据 |
| | | for (int i = 6; i >= 0; i--) { |
| | | ProcurementStatisticsVO procurementStatisticsVO = new ProcurementStatisticsVO(); |
| | | procurementStatisticsVO.setTime(LocalDate.now().minusDays(i).toString()); |
| | | int finalI = i; |
| | | procurementStatisticsVO.setCount(collect.stream().filter(e -> e.getPayTime().toLocalDate().isEqual(LocalDate.now().minusDays(finalI))).mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | procurementStatisticsVOS.add(procurementStatisticsVO); |
| | | } |
| | | } |
| | | if (query.getType() == 4 && !collect.isEmpty()) { |
| | | // 按月算 |
| | | for (int i = 5; i >= 0; i--) { |
| | | ProcurementStatisticsVO procurementStatisticsVO = new ProcurementStatisticsVO(); |
| | | LocalDateTime localDate = LocalDateTime.now().minusMonths(i); |
| | | Date date = DateUtils.localDateTimeToDate(localDate); |
| | | String time = formatMonth.format(date); |
| | | procurementStatisticsVO.setTime(time); |
| | | // 按月算 年和月都要匹配 |
| | | procurementStatisticsVO.setCount(collect.stream().filter(e -> time.equals(formatMonth.format(DateUtils.localDateTimeToDate(e.getPayTime())))).mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | procurementStatisticsVOS.add(procurementStatisticsVO); |
| | | } |
| | | } |
| | | |
| | | if (query.getType() == 5 && !collect.isEmpty()) { |
| | | // 按月算 |
| | | for (int i = 11; i >= 0; i--) { |
| | | ProcurementStatisticsVO procurementStatisticsVO = new ProcurementStatisticsVO(); |
| | | LocalDateTime localDate = LocalDateTime.now().minusMonths(i); |
| | | Date date = DateUtils.localDateTimeToDate(localDate); |
| | | String time = formatMonth.format(date); |
| | | procurementStatisticsVO.setTime(time); |
| | | // 按月算 年和月都要匹配 |
| | | procurementStatisticsVO.setCount(collect.stream().filter(e -> time.equals(formatMonth.format(DateUtils.localDateTimeToDate(e.getPayTime())))).mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | procurementStatisticsVOS.add(procurementStatisticsVO); |
| | | } |
| | | } |
| | | vo.setThirtyProcurementStatisticsVOS(procurementStatisticsVOS); |
| | | } |
| | | |
| | | return R.ok(vo); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "平台业务员-首页统计(第三部分)") |
| | | @PostMapping(value = "/saleStatisticsThree") |
| | | public R<BranchAdminStatisticsThreeVo> saleStatisticsThree(@RequestBody @Validated BranchAdminStatisticsThreeQuery query) { |
| | | BranchAdminStatisticsThreeVo vo = new BranchAdminStatisticsThreeVo(); |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | SimpleDateFormat formatMonth = new SimpleDateFormat("yyyy-MM"); |
| | | Integer roleType = user.getRoleType(); |
| | | if (roleType == 3) { |
| | | LambdaQueryWrapper<TCrmClinic> eq = Wrappers.lambdaQuery(TCrmClinic.class); |
| | | eq.eq(TCrmClinic::getSalespersonId, user.getUserId()); |
| | | eq.in(TCrmClinic::getStatus,Arrays.asList(3,4,5)); |
| | | if (query.getBranchId() != null && !query.getBranchId().isEmpty()) { |
| | | eq.eq(TCrmClinic::getBranchId, query.getBranchId()); |
| | | } |
| | | eq.in(TCrmClinic::getStatus, Arrays.asList(3, 4, 5)); |
| | | List<TCrmClinic> list = crmClinicService.list(eq); |
| | | |
| | | List<String> clinicIds = list.stream().map(TCrmClinic::getId).collect(Collectors.toList()); |
| | |
| | | List<ClinicSalesStatisticsGoodsTypeVO> thirtyMoneyProcurementStatisticsVOS = collect2.entrySet().stream().map(entry -> { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(entry.getValue().stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | clinicSalesStatisticsGoodsTypeVO.setTypeName(entry.getValue().get(0).getGoodsName()); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsName(entry.getValue().get(0).getGoodsName()); |
| | | return clinicSalesStatisticsGoodsTypeVO; |
| | | }).sorted(Comparator.comparing(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).reversed()).limit(9).collect(Collectors.toList()); |
| | | // 总数 |
| | |
| | | if (sum - sum1 > 0) { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(sum - sum1); |
| | | clinicSalesStatisticsGoodsTypeVO.setTypeName("其他"); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsName("其他"); |
| | | thirtyMoneyProcurementStatisticsVOS.add(clinicSalesStatisticsGoodsTypeVO); |
| | | } |
| | | vo.setThirtyMoneyProcurementStatisticsVOS(thirtyMoneyProcurementStatisticsVOS); |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 分公司管理员-首页统计(第二部分) |
| | | */ |
| | | @ApiOperation(value = "平台业务员-首页统计(第二部分)") |
| | | @PostMapping(value = "/saleStatisticsTwo") |
| | | public R<BranchAdminStatisticsTwoVo> saleStatisticsTwo(@RequestBody @Validated BranchAdminStatisticsTwoQuery query) { |
| | | BranchAdminStatisticsTwoVo branchAdminStatisticsTwoVo = new BranchAdminStatisticsTwoVo(); |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | Integer roleType = user.getRoleType(); |
| | | if (roleType == 3) { |
| | | TCrmSalesperson one = crmSalespersonService.getOne(new LambdaQueryWrapper<TCrmSalesperson>().eq(TCrmSalesperson::getUserId, user.getUserId())); |
| | | LambdaQueryWrapper<TCrmClinic> eq = Wrappers.lambdaQuery(TCrmClinic.class); |
| | | eq.eq(TCrmClinic::getSalespersonId, one.getId()); |
| | | eq.in(TCrmClinic::getStatus, Arrays.asList(3, 4, 5)); |
| | | |
| | | List<TCrmClinic> list = crmClinicService.list(eq); |
| | | branchAdminStatisticsTwoVo.setClinicNum(list.size()); |
| | | |
| | | // 金额 |
| | | ArrayList<SupplierThirtyMoneyProcurementStatisticsVO> moneyProcurementStatisticsVOS = new ArrayList<>(); |
| | | ArrayList<SupplierThirtyProcurementStatisticsVO> orderProcurementStatisticsVOS = new ArrayList<>(); |
| | | |
| | | List<String> crmClinicIds = list.stream().map(TCrmClinic::getId).collect(Collectors.toList()); |
| | | if (crmClinicIds.isEmpty()) { |
| | | crmClinicIds.add("0"); |
| | | } |
| | | // 获取最近一年的时间 |
| | | LocalDateTime time = LocalDateTime.now().minusYears(1); |
| | | List<TErpProcurement> procurementList = erpProcurementService.list(new LambdaQueryWrapper<TErpProcurement>().between(TErpProcurement::getCreateTime, DateUtils.localDateTimeToDate(time), DateUtils.localDateTimeToDate(LocalDateTime.now())).ne(TErpProcurement::getStatus, 6).isNotNull(TErpProcurement::getPayTime).in(TErpProcurement::getClinicId, crmClinicIds)); |
| | | |
| | | if (!list.isEmpty()) { |
| | | if (!procurementList.isEmpty()) { |
| | | List<TErpProcurement> collect = null; |
| | | switch (query.getType()) { |
| | | case 1: |
| | | // procurementList算出今日的 |
| | | collect = procurementList.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isEqual(LocalDate.now())).collect(Collectors.toList()); |
| | | break; |
| | | case 2: |
| | | // procurementList算出昨天的 |
| | | collect = procurementList.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isEqual(LocalDate.now().minusDays(1))).collect(Collectors.toList()); |
| | | break; |
| | | case 3: |
| | | // 最近7天的 |
| | | collect = procurementList.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isAfter(LocalDate.now().minusDays(7))).collect(Collectors.toList()); |
| | | break; |
| | | case 4: |
| | | // 最近半年 |
| | | collect = procurementList.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isAfter(LocalDate.now().minusMonths(6))).collect(Collectors.toList()); |
| | | break; |
| | | case 5: |
| | | // 最近一年 |
| | | collect = procurementList; |
| | | break; |
| | | } |
| | | branchAdminStatisticsTwoVo.setOrderCount(collect.size()); |
| | | branchAdminStatisticsTwoVo.setMoneyProcurement(collect.stream().map(TErpProcurement::getPayMoney).reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | } |
| | | } |
| | | |
| | | |
| | | List<TErpProcurement> collect = procurementList.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isAfter(LocalDate.now().minusDays(30))).collect(Collectors.toList()); |
| | | for (int i = 29; i >= 0; i--) { |
| | | String string = LocalDate.now().minusDays(i).toString(); |
| | | SupplierThirtyMoneyProcurementStatisticsVO thirtyMoneyProcurementStatisticsVO = new SupplierThirtyMoneyProcurementStatisticsVO(); |
| | | thirtyMoneyProcurementStatisticsVO.setTime(string); |
| | | thirtyMoneyProcurementStatisticsVO.setMoneyTotal(collect.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isEqual(LocalDate.parse(string))).map(TErpProcurement::getPayMoney).reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | moneyProcurementStatisticsVOS.add(thirtyMoneyProcurementStatisticsVO); |
| | | |
| | | SupplierThirtyProcurementStatisticsVO thirtyProcurementStatisticsVO = new SupplierThirtyProcurementStatisticsVO(); |
| | | thirtyProcurementStatisticsVO.setTime(string); |
| | | thirtyProcurementStatisticsVO.setOrderCount((int) collect.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isEqual(LocalDate.parse(string))).count()); |
| | | orderProcurementStatisticsVOS.add(thirtyProcurementStatisticsVO); |
| | | |
| | | } |
| | | branchAdminStatisticsTwoVo.setThirtyMoneyProcurementStatisticsVOS(moneyProcurementStatisticsVOS); |
| | | branchAdminStatisticsTwoVo.setThirtyProcurementStatisticsVOS(orderProcurementStatisticsVOS); |
| | | |
| | | } |
| | | return R.ok(branchAdminStatisticsTwoVo); |
| | | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "平台业务员-首页统计(第三部分)") |
| | | @PostMapping(value = "/saleStatisticsThree") |
| | | public R<BranchAdminStatisticsThreeVo> saleStatisticsThree(@RequestBody @Validated BranchAdminStatisticsThreeQuery query) { |
| | | BranchAdminStatisticsThreeVo vo = new BranchAdminStatisticsThreeVo(); |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | SimpleDateFormat formatMonth = new SimpleDateFormat("yyyy-MM"); |
| | | Integer roleType = user.getRoleType(); |
| | | if (roleType == 3) { |
| | | TCrmSalesperson one = crmSalespersonService.getOne(new LambdaQueryWrapper<TCrmSalesperson>().eq(TCrmSalesperson::getUserId, user.getUserId())); |
| | | LambdaQueryWrapper<TCrmClinic> eq = Wrappers.lambdaQuery(TCrmClinic.class); |
| | | eq.eq(TCrmClinic::getSalespersonId,one.getId()); |
| | | eq.in(TCrmClinic::getStatus, Arrays.asList(3, 4, 5)); |
| | | List<TCrmClinic> list = crmClinicService.list(eq); |
| | | |
| | | List<String> clinicIds = list.stream().map(TCrmClinic::getId).collect(Collectors.toList()); |
| | | if (clinicIds.isEmpty()) { |
| | | return R.ok(vo); |
| | | } |
| | | // 查询这个诊所的所有订单并算出商品种类数 和 商品数 |
| | | List<TErpProcurementGoods> erpProcurementGoods = erpProcurementService.branchAdminStatisticsThree(clinicIds); |
| | | |
| | | // 根据商品id算出商品种类数 |
| | | vo.setGoodsTypeCount((int) erpProcurementGoods.stream().map(TErpProcurementGoods::getGoodsId).distinct().count()); |
| | | |
| | | // 算出商品数 |
| | | vo.setGoodsCount(erpProcurementGoods.stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | List<TErpProcurementGoods> collect = null; |
| | | switch (query.getType()) { |
| | | case 1: |
| | | // 通过payTime是今日的数据 |
| | | collect = erpProcurementGoods.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isEqual(LocalDate.now())).collect(Collectors.toList()); |
| | | break; |
| | | case 2: |
| | | // 通过payTime是昨日的数据 |
| | | collect = erpProcurementGoods.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isEqual(LocalDate.now().minusDays(1))).collect(Collectors.toList()); |
| | | break; |
| | | case 3: |
| | | // 通过payTime是近7天的数据 |
| | | collect = erpProcurementGoods.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isAfter(LocalDate.now().minusDays(7))).collect(Collectors.toList()); |
| | | break; |
| | | case 4: |
| | | // 通过payTime是近半年的数据 |
| | | collect = erpProcurementGoods.stream().filter(procurement -> procurement.getPayTime().toLocalDate().isAfter(LocalDate.now().minusMonths(6))).collect(Collectors.toList()); |
| | | break; |
| | | case 5: |
| | | // 通过payTime是近一年的数据 |
| | | collect = erpProcurementGoods; |
| | | break; |
| | | } |
| | | vo.setMoneyProcurement(collect.stream().map(TErpProcurementGoods::getPayMoney).reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | |
| | | //collect 通过goodsId 分组并 根据purchaseCount 倒叙 |
| | | Map<String, List<TErpProcurementGoods>> collect2 = collect.stream().collect(groupingBy(TErpProcurementGoods::getGoodsId)); |
| | | List<ClinicSalesStatisticsGoodsTypeVO> thirtyMoneyProcurementStatisticsVOS = collect2.entrySet().stream().map(entry -> { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(entry.getValue().stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsName(entry.getValue().get(0).getGoodsName()); |
| | | return clinicSalesStatisticsGoodsTypeVO; |
| | | }).sorted(Comparator.comparing(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).reversed()).limit(9).collect(Collectors.toList()); |
| | | // 总数 |
| | | int sum = collect.stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum(); |
| | | int sum1 = thirtyMoneyProcurementStatisticsVOS.stream().mapToInt(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).sum(); |
| | | if (sum - sum1 > 0) { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(sum - sum1); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsName("其他"); |
| | | thirtyMoneyProcurementStatisticsVOS.add(clinicSalesStatisticsGoodsTypeVO); |
| | | } |
| | | vo.setThirtyMoneyProcurementStatisticsVOS(thirtyMoneyProcurementStatisticsVOS); |
| | | |
| | | |
| | | ArrayList<ProcurementStatisticsVO> procurementStatisticsVOS = new ArrayList<>(); |
| | | // 是否做了搜索 |
| | | if (query.getName() != null && !query.getName().isEmpty()) { |
| | | collect = collect.stream().filter(e -> e.getGoodsName().equals(query.getName())).collect(Collectors.toList()); |
| | | } |
| | | if (query.getType() == 1 && !collect.isEmpty()) { |
| | | ProcurementStatisticsVO procurementStatisticsVO = new ProcurementStatisticsVO(); |
| | | procurementStatisticsVO.setTime(LocalDate.now().toString()); |
| | | procurementStatisticsVO.setCount(collect.stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | procurementStatisticsVOS.add(procurementStatisticsVO); |
| | | } |
| | | if (query.getType() == 2 && !collect.isEmpty()) { |
| | | // 昨日的数据 |
| | | ProcurementStatisticsVO procurementStatisticsVO = new ProcurementStatisticsVO(); |
| | | procurementStatisticsVO.setTime(LocalDate.now().minusDays(1).toString()); |
| | | procurementStatisticsVO.setCount(collect.stream().filter(e -> e.getPayTime().toLocalDate().isEqual(LocalDate.now().minusDays(1))).mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | procurementStatisticsVOS.add(procurementStatisticsVO); |
| | | } |
| | | |
| | | if (query.getType() == 3 && !collect.isEmpty()) { |
| | | // 近7天的数据 |
| | | for (int i = 6; i >= 0; i--) { |
| | | ProcurementStatisticsVO procurementStatisticsVO = new ProcurementStatisticsVO(); |
| | | procurementStatisticsVO.setTime(LocalDate.now().minusDays(i).toString()); |
| | | int finalI = i; |
| | | procurementStatisticsVO.setCount(collect.stream().filter(e -> e.getPayTime().toLocalDate().isEqual(LocalDate.now().minusDays(finalI))).mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | procurementStatisticsVOS.add(procurementStatisticsVO); |
| | | } |
| | | } |
| | | if (query.getType() == 4 && !collect.isEmpty()) { |
| | | // 按月算 |
| | | for (int i = 5; i >= 0; i--) { |
| | | ProcurementStatisticsVO procurementStatisticsVO = new ProcurementStatisticsVO(); |
| | | LocalDateTime localDate = LocalDateTime.now().minusMonths(i); |
| | | Date date = DateUtils.localDateTimeToDate(localDate); |
| | | String time = formatMonth.format(date); |
| | | procurementStatisticsVO.setTime(time); |
| | | // 按月算 年和月都要匹配 |
| | | procurementStatisticsVO.setCount(collect.stream().filter(e -> time.equals(formatMonth.format(DateUtils.localDateTimeToDate(e.getPayTime())))).mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | procurementStatisticsVOS.add(procurementStatisticsVO); |
| | | } |
| | | } |
| | | |
| | | if (query.getType() == 5 && !collect.isEmpty()) { |
| | | // 按月算 |
| | | for (int i = 11; i >= 0; i--) { |
| | | ProcurementStatisticsVO procurementStatisticsVO = new ProcurementStatisticsVO(); |
| | | LocalDateTime localDate = LocalDateTime.now().minusMonths(i); |
| | | Date date = DateUtils.localDateTimeToDate(localDate); |
| | | String time = formatMonth.format(date); |
| | | procurementStatisticsVO.setTime(time); |
| | | // 按月算 年和月都要匹配 |
| | | procurementStatisticsVO.setCount(collect.stream().filter(e -> time.equals(formatMonth.format(DateUtils.localDateTimeToDate(e.getPayTime())))).mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | procurementStatisticsVOS.add(procurementStatisticsVO); |
| | | } |
| | | } |
| | | vo.setThirtyProcurementStatisticsVOS(procurementStatisticsVOS); |
| | | } |
| | | |
| | | return R.ok(vo); |
| | | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "通过分公司id查询业务员列表") |
| | | @GetMapping(value = "/getSalespersonListByBranchId") |