|
@@ -8,6 +8,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
import cn.iocoder.yudao.framework.common.pojo.Pms;
|
|
import cn.iocoder.yudao.framework.common.pojo.Pms;
|
|
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
|
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
|
|
|
+import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
|
import cn.iocoder.yudao.module.pms.controller.admin.failure.vo.IotFailureReportPageReqVO;
|
|
import cn.iocoder.yudao.module.pms.controller.admin.failure.vo.IotFailureReportPageReqVO;
|
|
import cn.iocoder.yudao.module.pms.controller.admin.inspect.order.vo.IotInspectOrderPageReqVO;
|
|
import cn.iocoder.yudao.module.pms.controller.admin.inspect.order.vo.IotInspectOrderPageReqVO;
|
|
import cn.iocoder.yudao.module.pms.controller.admin.iotdevicerunlog.vo.IotDeviceRunLogPageReqVO;
|
|
import cn.iocoder.yudao.module.pms.controller.admin.iotdevicerunlog.vo.IotDeviceRunLogPageReqVO;
|
|
@@ -430,6 +431,12 @@ public class IotStaticController {
|
|
depts = deptApi.getDeptByName("瑞恒兴域");
|
|
depts = deptApi.getDeptByName("瑞恒兴域");
|
|
} else if ("ry".equals(dept)) {
|
|
} else if ("ry".equals(dept)) {
|
|
depts = deptApi.getDeptByName("瑞鹰国际");
|
|
depts = deptApi.getDeptByName("瑞鹰国际");
|
|
|
|
+ } else if ("yf".equals(dept)) {
|
|
|
|
+ depts = deptApi.getDeptByName("科瑞石油技术");
|
|
|
|
+ } else {
|
|
|
|
+ Long loginUserDeptId = SecurityFrameworkUtils.getLoginUserDeptId();
|
|
|
|
+ DeptRespDTO dto = deptApi.getDept(loginUserDeptId);
|
|
|
|
+ depts = deptApi.getDeptByName(dto.getName());
|
|
}
|
|
}
|
|
if (CollUtil.isNotEmpty(depts)) {
|
|
if (CollUtil.isNotEmpty(depts)) {
|
|
if (Objects.nonNull(depts.get(0).getId())) {
|
|
if (Objects.nonNull(depts.get(0).getId())) {
|
|
@@ -555,7 +562,7 @@ public class IotStaticController {
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping("/home/safe")
|
|
@GetMapping("/home/safe")
|
|
- public CommonResult<Integer> getSafe() {
|
|
|
|
|
|
+ public CommonResult<String> getSafe() {
|
|
List<IotSapStockDO> iotSapStockDOS = iotSapStockMapper.getSafeList();
|
|
List<IotSapStockDO> iotSapStockDOS = iotSapStockMapper.getSafeList();
|
|
List<Long> ids = new ArrayList<>();
|
|
List<Long> ids = new ArrayList<>();
|
|
iotSapStockDOS.forEach(e ->{
|
|
iotSapStockDOS.forEach(e ->{
|
|
@@ -563,7 +570,7 @@ public class IotStaticController {
|
|
ids.add(e.getId());
|
|
ids.add(e.getId());
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- return CommonResult.success(ids.size());
|
|
|
|
|
|
+ return success(String.valueOf(ids.size()));
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping("/inspect/device")
|
|
@GetMapping("/inspect/device")
|