فهرست منبع

设备台账统计

lipenghui 2 هفته پیش
والد
کامیت
59b1fc5ddd

+ 2 - 2
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/stat/IotStaticController.java

@@ -495,7 +495,7 @@ public class IotStaticController {
     public CommonResult<List<Map<String, Object>>> getDeviceStatusStat(@PathVariable("dept") String dept) {
         Set<Long> ids = getDeptIds(dept);
         IotDevicePageReqVO iotDevicePageReqVO = new IotDevicePageReqVO();
-        iotDevicePageReqVO.setDeviceIds(new ArrayList<>(ids));
+        iotDevicePageReqVO.setDeptIds(new ArrayList<>(ids));
         List<IotDeviceDO> iotDeviceDOS = iotDeviceMapper.selectList(iotDevicePageReqVO);
         Map<String, Long> order = iotDeviceDOS.stream().collect(Collectors.groupingBy(IotDeviceDO::getDeviceStatus, Collectors.counting()));
         List<Map<String, Object>> results = new ArrayList<>();
@@ -515,7 +515,7 @@ public class IotStaticController {
     public CommonResult<List<Map<String, Object>>> getDeviceTypeStat(@PathVariable("dept") String dept) {
         Set<Long> ids = getDeptIds(dept);
         IotDevicePageReqVO iotDevicePageReqVO = new IotDevicePageReqVO();
-        iotDevicePageReqVO.setDeviceIds(new ArrayList<>(ids));
+        iotDevicePageReqVO.setDeptIds(new ArrayList<>(ids));
         List<IotDeviceDO> iotDeviceDOS = iotDeviceMapper.selectList(iotDevicePageReqVO);
         LinkedList<Map<String, Object>> results = new LinkedList<>();
         if ("rh".equals(dept)) {

+ 1 - 2
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/IotDeviceMapper.java

@@ -77,11 +77,10 @@ public interface IotDeviceMapper extends BaseMapperX<IotDeviceDO> {
 
     default List<IotDeviceDO> selectList(IotDevicePageReqVO reqVO) {
         return selectList(new LambdaQueryWrapperX<IotDeviceDO>()
-                .inIfPresent(IotDeviceDO::getId, reqVO.getDeviceIds())
+                .inIfPresent(IotDeviceDO::getDeptId, reqVO.getDeptIds())
                 .likeIfPresent(IotDeviceDO::getDeviceCode, reqVO.getDeviceCode())
                 .likeIfPresent(IotDeviceDO::getDeviceName, reqVO.getDeviceName())
                 .eqIfPresent(IotDeviceDO::getDeptId, reqVO.getDeptId())
-                .inIfPresent(IotDeviceDO::getDeptId, reqVO.getDeptIds())
                 .eqIfPresent(IotDeviceDO::getBrand, reqVO.getBrand())
                 .eqIfPresent(IotDeviceDO::getModel, reqVO.getModel())
                 .eqIfPresent(IotDeviceDO::getDeviceStatus, reqVO.getDeviceStatus())