瀏覽代碼

设备状态查询

Newspaper 11 月之前
父節點
當前提交
3f362c0d70

+ 2 - 2
snowy-web-app/pom.xml

@@ -10,8 +10,8 @@
         <version>2.0.0</version>
     </parent>
 
-<!--    <artifactId>snowy-web-app</artifactId>-->
-    <artifactId>huimv-farm</artifactId>
+    <artifactId>snowy-web-app</artifactId>
+<!--    <artifactId>huimv-farm</artifactId>-->
     <packaging>jar</packaging>
     <description>主启动模块</description>
 

+ 4 - 0
snowy-web-app/src/main/java/vip/xiaonuo/modular/ai/aiDevice/param/AiDevicePageParam.java

@@ -58,4 +58,8 @@ public class AiDevicePageParam extends OrgIdParam {
     @ApiModelProperty(value = "安装位置id")
     private String installPosition;
 
+    /** 设备在线 */
+    @ApiModelProperty(value = "是否在线,0:离线;1:在线")
+    private String status;
+
 }

+ 3 - 0
snowy-web-app/src/main/java/vip/xiaonuo/modular/ai/aiDevice/service/impl/AiDeviceServiceImpl.java

@@ -51,6 +51,9 @@ public class AiDeviceServiceImpl extends ServiceImpl<AiDeviceMapper, AiDevice> i
     @Override
     public Page<AiDevice> page(AiDevicePageParam aiDevicePageParam) {
         QueryWrapper<AiDevice> queryWrapper = new QueryWrapper<>();
+        if(ObjectUtil.isNotEmpty(aiDevicePageParam.getStatus())) {
+            queryWrapper.lambda().eq(AiDevice::getStatus, aiDevicePageParam.getStatus());
+        }
         if(ObjectUtil.isNotEmpty(aiDevicePageParam.getDeviceTypeId())) {
             queryWrapper.lambda().eq(AiDevice::getDeviceTypeId, aiDevicePageParam.getDeviceTypeId());
         }

+ 4 - 0
snowy-web-app/src/main/java/vip/xiaonuo/modular/energy/energyDevice/param/EnergyDevicePageParam.java

@@ -56,4 +56,8 @@ public class EnergyDevicePageParam extends EnergyDeviceOrgIdParam{
     @ApiModelProperty(value = "安装位置id")
     private String installPosition;
 
+    /** 设备在线 */
+    @ApiModelProperty(value = "是否在线,0:离线;1:在线")
+    private String status;
+
 }

+ 3 - 0
snowy-web-app/src/main/java/vip/xiaonuo/modular/energy/energyDevice/service/impl/EnergyDeviceServiceImpl.java

@@ -66,6 +66,9 @@ public class EnergyDeviceServiceImpl extends ServiceImpl<EnergyDeviceMapper, Ene
         if(ObjectUtil.isNotEmpty(energyDevicePageParam.getDeviceType())) {
             queryWrapper.lambda().eq(EnergyDevice::getDeviceTypeId, energyDevicePageParam.getDeviceType());
         }
+        if(ObjectUtil.isNotEmpty(energyDevicePageParam.getStatus())) {
+            queryWrapper.eq("status", energyDevicePageParam.getStatus());
+        }
         String installPosition = energyDevicePageParam.getInstallPosition();
         List<String> pigpenList = new ArrayList<>();
         if(ObjectUtil.isNotEmpty(installPosition)) {

+ 4 - 0
snowy-web-app/src/main/java/vip/xiaonuo/modular/env/envdevice/param/EnvDevicePageParam.java

@@ -56,4 +56,8 @@ public class EnvDevicePageParam extends EnvDeviceOrgIdParam{
     @ApiModelProperty(value = "安装位置")
     private String installPosition;
 
+    /** 设备在线 */
+    @ApiModelProperty(value = "是否在线,0:离线;1:在线")
+    private String status;
+
 }

+ 4 - 0
snowy-web-app/src/main/java/vip/xiaonuo/modular/env/envdevice/service/impl/EnvDeviceServiceImpl.java

@@ -71,9 +71,13 @@ public class EnvDeviceServiceImpl extends ServiceImpl<EnvDeviceMapper, EnvDevice
         String orgId = envDevicePageParam.getOrgId();
         QueryWrapper<EnvDevice> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("org_id",orgId).orderByAsc("id");
+
         if(ObjectUtil.isNotEmpty(envDevicePageParam.getDeviceType())) {
             queryWrapper.eq("device_type_id", envDevicePageParam.getDeviceType());
         }
+        if(ObjectUtil.isNotEmpty(envDevicePageParam.getStatus())) {
+            queryWrapper.eq("status", envDevicePageParam.getStatus());
+        }
         String installPosition = envDevicePageParam.getInstallPosition();
         List<String> pigpenList = new ArrayList<>();
         if(ObjectUtil.isNotEmpty(installPosition)) {

+ 2 - 0
snowy-web-app/src/main/java/vip/xiaonuo/modular/feed/feedingenv/param/FeedingEnvPageParam.java

@@ -37,4 +37,6 @@ public class FeedingEnvPageParam {
     private String  type;
 
 
+
+
 }

+ 2 - 2
snowy-web-app/src/main/resources/application.properties

@@ -6,8 +6,8 @@ server.port=82
 #########################################
 # spring profiles configuration
 #########################################
-#spring.profiles.active=local
-spring.profiles.active=test
+spring.profiles.active=local
+#spring.profiles.active=test
 #spring.profiles.active=prod
 
 #########################################