| | |
| | | @Override//汇总 |
| | | 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 companyNum = companyService.count(companyService.lq() |
| | | .eq(SysCompany::getCompanyStatus, 0) |
| | | .eq(SysCompany::getCheckStatus, 2) |
| | | ); |
| | | 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 enforceUserNum = userService.count(userService.lq() |
| | | .ne(SysUser::getUserType,"02") |
| | | .ne(SysUser::getUserName,"admin") |
| | | .eq(SysUser::getStatus,"0") |
| | | ); |
| | | int enforceOrderNum = orderService.count(); |
| | | int enforceOrderCheckedNum = orderService.count(orderService.lq().eq(EnforceOrder::getOrderStatus,2)); |
| | | int enforceOrderCheckedNum = orderService.count(orderService.lq().ge(EnforceOrder::getOrderStatus,2)); |
| | | int enforceOrderCompleteNum = orderService.count(orderService.lq().eq(EnforceOrder::getOrderStatus,4)); |
| | | int complaintNum = complaintLogService.count(); |
| | | int docNum = docService.count(docService.lq().eq(SysDoc::getDocStatus,0)); |
| | | Map<String, Object> result = new HashMap<>(7); |
| | | result.put("companyNum", companyNum); |
| | | result.put("enforceCompanyNum", enforceCompanyNum); |
| | | result.put("enforceDeptNum", enforceDeptNum); |
| | | result.put("enforceUserNum", enforceUserNum); |
| | | result.put("enforceOrderNum", enforceOrderNum); |
| | | result.put("enforceOrderCheckedNum", enforceOrderCheckedNum); |
| | | result.put("enforceOrderCompleteNum", enforceOrderCompleteNum); |
| | | result.put("complaintNum", complaintNum); |
| | | result.put("docNum", docNum); |
| | | result.put("companyNum", companyNum); //企业数 |
| | | result.put("enforceCompanyNum", enforceCompanyNum);//被执法企业数 |
| | | result.put("enforceDeptNum", enforceDeptNum);//执法单位 |
| | | result.put("enforceUserNum", enforceUserNum);//执法人员 |
| | | result.put("enforceOrderNum", enforceOrderNum);//执法单总数 |
| | | result.put("enforceOrderCheckedNum", enforceOrderCheckedNum);//已审批执法单数 |
| | | result.put("enforceOrderCompleteNum", enforceOrderCompleteNum);//执法单完成数 |
| | | result.put("complaintNum", complaintNum);//投诉数 |
| | | result.put("docNum", docNum);//政策数 |
| | | return result; |
| | | } |
| | | |
| | |
| | | @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//执法类型 |
| | |
| | | { |
| | | return dictDataList.stream().map(e -> { |
| | | KeyVal keyVal; |
| | | if (resultMap.get(e.getDictValue()) == null) { |
| | | if (resultMap.get(e.getDictCode().toString()) == null) { |
| | | keyVal = new KeyVal(e.getDictLabel(), 0); |
| | | } else { |
| | | keyVal = new KeyVal(e.getDictLabel(), resultMap.get(e.getDictValue())); |
| | | keyVal = new KeyVal(e.getDictLabel(), resultMap.get(e.getDictCode().toString())); |
| | | } |
| | | return keyVal; |
| | | }).collect(Collectors.toList()); |