| | |
| | | public Map<String, Object> getTotalInfo() |
| | | { |
| | | int companyNum = companyService.count(companyService.lq().eq(SysCompany::getCompanyStatus, 0)); |
| | | int enforceCompanyNum = orderService.count(orderService.lq().groupBy(EnforceOrder::getCompanyId)); |
| | | int enforceCompanyNum = orderService.getDistinctCompanyNum(); |
| | | int enforceDeptNum = deptService.count(deptService.lq().eq(SysDept::getParentId,100)); |
| | | int enforceUserNum = userService.count(userService.lq().ne(SysUser::getUserType,"02")); |
| | | int enforceOrderNum = orderService.count(); |
| | |
| | | @Override//企业被执法次数分布 |
| | | public List<KeyVal> getCompanyCount(ReportQueryBo bo) |
| | | { |
| | | List<KeyVal> list = reportMapper.getCompanyCount(bo); |
| | | Map<String, Object> resultMap = list.stream().collect(Collectors.toMap(KeyVal::getK, KeyVal::getV)); |
| | | |
| | | List<SysCompany> companies = companyService.list(companyService.lq().eq(SysCompany::getCompanyStatus, 0)); |
| | | |
| | | return companies.stream().map(e -> { |
| | | KeyVal keyVal; |
| | | if (resultMap.get(e.getCompanyId().toString()) == null) { |
| | | keyVal = new KeyVal(e.getCompanyName(), 0); |
| | | } else { |
| | | keyVal = new KeyVal(e.getCompanyName(), resultMap.get(e.getCompanyId().toString())); |
| | | } |
| | | return keyVal; |
| | | }).collect(Collectors.toList()); |
| | | return reportMapper.getCompanyCount(bo); |
| | | } |
| | | |
| | | @Override//执法类型 |