|
@@ -171,6 +171,8 @@ public class IotStaticController {
|
|
|
private IotRdDailyReportMapper iotRdDailyReportMapper;
|
|
private IotRdDailyReportMapper iotRdDailyReportMapper;
|
|
|
@Resource
|
|
@Resource
|
|
|
private IotDeptTypeMapper iotDeptTypeMapper;
|
|
private IotDeptTypeMapper iotDeptTypeMapper;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private DeptUtil deptUtil;
|
|
|
|
|
|
|
|
@GetMapping("/main/day")
|
|
@GetMapping("/main/day")
|
|
|
public CommonResult<Map<String, Object>> getMaintainDay() {
|
|
public CommonResult<Map<String, Object>> getMaintainDay() {
|
|
@@ -305,6 +307,22 @@ public class IotStaticController {
|
|
|
return CommonResult.success(order);
|
|
return CommonResult.success(order);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @GetMapping("/report/inspect/status")
|
|
|
|
|
+ public CommonResult<Map<String, Long>> getInspectStatusInfoReport(IotCountDataDO vo) {
|
|
|
|
|
+ Set<Long> ids;
|
|
|
|
|
+ if (Objects.isNull(vo.getDeptId())){
|
|
|
|
|
+ Long loginUserDeptId = SecurityFrameworkUtils.getLoginUserDeptId();
|
|
|
|
|
+ String companyCode = deptUtil.getCompanyCode(loginUserDeptId);
|
|
|
|
|
+ ids = deptUtil.getDeptIds(companyCode);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ids = deptService.getChildDeptIdListFromCache(vo.getDeptId());
|
|
|
|
|
+ ids.add(vo.getDeptId());
|
|
|
|
|
+ }
|
|
|
|
|
+ List<IotInspectOrderDO> iotInspectOrderDOS = iotInspectOrderMapper.selectListStat(vo, ids);
|
|
|
|
|
+ Map<String, Long> order = iotInspectOrderDOS.stream().collect(Collectors.groupingBy(IotInspectOrderDO::getStatus, Collectors.counting()));
|
|
|
|
|
+ return CommonResult.success(order);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@GetMapping("/inspect/statuss/{dept}")
|
|
@GetMapping("/inspect/statuss/{dept}")
|
|
|
public CommonResult<Map<String, Long>> getInspectStatusInfos(@PathVariable("dept") String dept) {
|
|
public CommonResult<Map<String, Long>> getInspectStatusInfos(@PathVariable("dept") String dept) {
|
|
|
Set<Long> ids = getDeptIds(dept);
|
|
Set<Long> ids = getDeptIds(dept);
|
|
@@ -639,6 +657,21 @@ public class IotStaticController {
|
|
|
return success(ImmutableMap.of("todo", todo.get(),"finished", finished.get(), "ignore", ignore.get()));
|
|
return success(ImmutableMap.of("todo", todo.get(),"finished", finished.get(), "ignore", ignore.get()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @GetMapping("/inspect/exception/device")
|
|
|
|
|
+ public CommonResult<ImmutableMap<String, Long>> getDeviceException(IotCountDataDO vo) {
|
|
|
|
|
+ Set<Long> ids;
|
|
|
|
|
+ if (Objects.isNull(vo.getDeptId())){
|
|
|
|
|
+ Long loginUserDeptId = SecurityFrameworkUtils.getLoginUserDeptId();
|
|
|
|
|
+ String companyCode = deptUtil.getCompanyCode(loginUserDeptId);
|
|
|
|
|
+ ids = deptUtil.getDeptIds(companyCode);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ids = deptService.getChildDeptIdListFromCache(vo.getDeptId());
|
|
|
|
|
+ ids.add(vo.getDeptId());
|
|
|
|
|
+ }
|
|
|
|
|
+ Long deviceException = iotInspectOrderDetailMapper.selectDeviceException(vo, ids);
|
|
|
|
|
+ return success(ImmutableMap.of("exceptionNum",deviceException));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@GetMapping("/rh/ywcb/{dept}")
|
|
@GetMapping("/rh/ywcb/{dept}")
|
|
|
@PermitAll
|
|
@PermitAll
|
|
|
public CommonResult<Map<String, Object>> getRhYwcbStat(@PathVariable("dept") String dept) {
|
|
public CommonResult<Map<String, Object>> getRhYwcbStat(@PathVariable("dept") String dept) {
|