瀏覽代碼

设备分类问题

Zimo 3 周之前
父節點
當前提交
c47c7460b1

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

@@ -5069,7 +5069,7 @@ public class IotStaticController {
                     }
                     // 临时对象,携带 code、name、count
                     Map<String, Object> temp = new HashMap<>(3);
-                    temp.put("code", code);
+                    temp.put("code", e.getKey());
                     temp.put("name", yfClass.get(0).getName());
                     temp.put("count", e.getValue());
                     return temp;
@@ -5093,6 +5093,7 @@ public class IotStaticController {
                     // 根据 code 是否在主设备集合中设置 type
                     String code = (String) m.get("code");
                     vo.setType(newClassifies.contains(code) ? "top" : "");
+                    vo.setCode(code);
                     return vo;
                 })
                 .collect(Collectors.toList());

+ 4 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/stat/vo/NewClassifyVo.java

@@ -22,4 +22,8 @@ public class NewClassifyVo {
      * 新分类分组
      */
     private String type;
+    /**
+     * 分类编码
+     */
+    private String code;
 }

+ 1 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/vo/IotDevicePageReqVO.java

@@ -162,4 +162,5 @@ public class IotDevicePageReqVO extends PageParam {
     private String deviceGrade;
     @Schema(description = "来源,区分连油或者注气之类的")
     private String source;
+    private String yfClass;
 }

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

@@ -55,7 +55,8 @@ public interface IotDeviceMapper extends BaseMapperX<IotDeviceDO> {
                 .eqIfPresent(IotDeviceDO::getNameplate, reqVO.getNameplate())
                 .eqIfPresent(IotDeviceDO::getExpires, reqVO.getExpires())
                 .eqIfPresent(IotDeviceDO::getPlPrice, reqVO.getPlPrice())
-                        .likeIfPresent(IotDeviceDO::getDeviceNo, reqVO.getDeviceNo()).likeIfPresent(IotDeviceDO::getCarNo, reqVO.getCarNo())
+                .likeIfPresent(IotDeviceDO::getYfClass, reqVO.getYfClass())
+                .likeIfPresent(IotDeviceDO::getDeviceNo, reqVO.getDeviceNo()).likeIfPresent(IotDeviceDO::getCarNo, reqVO.getCarNo())
                 //.betweenIfPresent(IotDeviceDO::getPlDate, reqVO.getPlDate())
                 //.betweenIfPresent(IotDeviceDO::getManDate, reqVO.getManDate())
                 .eqIfPresent(IotDeviceDO::getPlYear, reqVO.getPlYear())