Browse Source

能耗监测系统对接管理

learshaw 6 ngày trước cách đây
mục cha
commit
52b4c8f3ed
54 tập tin đã thay đổi với 1564 bổ sung1185 xóa
  1. 0 91
      ems/ems-application/ems-admin/src/main/java/com/ruoyi/web/controller/ems/ChargingBillController.java
  2. 2 2
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/TaskExecutor.java
  3. 2 3
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/config/InDoorEnergyConfig.java
  4. 59 0
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/config/SquareLightCtlConfig.java
  5. 30 10
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/core/InDoorEnergyTemplate.java
  6. 249 0
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/core/SquareLightCtlTemplate.java
  7. 23 22
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/handle/BaseDevHandler.java
  8. 4 3
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/handle/GeekOpenCbHandler.java
  9. 166 89
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/handle/InDoorEnergyHandler.java
  10. 4 4
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/handle/Keka86BsHandler.java
  11. 40 0
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/AppLoginReq.java
  12. 46 0
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/AppLoginRes.java
  13. 50 0
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/SlcDevice.java
  14. 40 0
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/SlcDeviceLamp.java
  15. 42 0
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/SlcProject.java
  16. 29 0
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/SlcProjectSubset.java
  17. 35 0
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/SlcResponse.java
  18. 86 0
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/retrofit/SquareLightCtlApi.java
  19. 134 0
      ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/util/PingUtils.java
  20. 11 1
      ems/ems-cloud/ems-dev-adapter/src/main/resources/application-local.yml
  21. 10 0
      ems/ems-cloud/ems-dev-adapter/src/main/resources/application-prod-ct.yml
  22. 78 0
      ems/ems-cloud/ems-dev-adapter/src/test/java/com/huashe/test/SquareLightCtlTest.java
  23. 2 2
      ems/ems-cloud/ems-server/src/main/java/com/ruoyi/ems/controller/ChargingBillController.java
  24. 1 2
      ems/ems-cloud/ems-server/src/main/java/com/ruoyi/ems/controller/EmsObjAbilityController.java
  25. 0 36
      ems/ems-cloud/ems-server/src/main/java/com/ruoyi/ems/controller/EmsObjLogController.java
  26. 13 30
      ems/ems-cloud/ems-server/src/main/java/com/ruoyi/ems/controller/EmsSubsystemController.java
  27. 5 95
      ems/ems-core/src/main/java/com/ruoyi/ems/domain/EmsObjAbilityCallLog.java
  28. 10 64
      ems/ems-core/src/main/java/com/ruoyi/ems/domain/EmsObjEventLog.java
  29. 3 3
      ems/ems-core/src/main/java/com/ruoyi/ems/domain/EmsObjModel.java
  30. 0 118
      ems/ems-core/src/main/java/com/ruoyi/ems/domain/EmsObjReportLog.java
  31. 4 100
      ems/ems-core/src/main/java/com/ruoyi/ems/domain/EmsSubsystem.java
  32. 2 4
      ems/ems-core/src/main/java/com/ruoyi/ems/enums/DevObjType.java
  33. 17 2
      ems/ems-core/src/main/java/com/ruoyi/ems/mapper/EmsObjAttrValueMapper.java
  34. 0 37
      ems/ems-core/src/main/java/com/ruoyi/ems/mapper/EmsObjReportLogMapper.java
  35. 9 0
      ems/ems-core/src/main/java/com/ruoyi/ems/mapper/EmsSubsystemMapper.java
  36. 13 31
      ems/ems-core/src/main/java/com/ruoyi/ems/model/AbilityPayload.java
  37. 4 13
      ems/ems-core/src/main/java/com/ruoyi/ems/service/IAbilityCallService.java
  38. 19 4
      ems/ems-core/src/main/java/com/ruoyi/ems/service/IEmsObjAttrValueService.java
  39. 0 1
      ems/ems-core/src/main/java/com/ruoyi/ems/service/IEmsObjEventLogService.java
  40. 0 37
      ems/ems-core/src/main/java/com/ruoyi/ems/service/IEmsObjReportLogService.java
  41. 8 0
      ems/ems-core/src/main/java/com/ruoyi/ems/service/IEmsSubsystemService.java
  42. 29 28
      ems/ems-core/src/main/java/com/ruoyi/ems/service/impl/AbilityCallServiceImpl.java
  43. 7 2
      ems/ems-core/src/main/java/com/ruoyi/ems/service/impl/EmsObjAttrServiceImpl.java
  44. 7 2
      ems/ems-core/src/main/java/com/ruoyi/ems/service/impl/EmsObjAttrValueServiceImpl.java
  45. 0 49
      ems/ems-core/src/main/java/com/ruoyi/ems/service/impl/EmsObjReportLogServiceImpl.java
  46. 5 0
      ems/ems-core/src/main/java/com/ruoyi/ems/service/impl/EmsSubsystemServiceImpl.java
  47. 11 4
      ems/ems-core/src/main/resources/mapper/ems/EmsObjAbilityCallLogMapper.xml
  48. 5 0
      ems/ems-core/src/main/resources/mapper/ems/EmsObjAttrValueMapper.xml
  49. 14 6
      ems/ems-core/src/main/resources/mapper/ems/EmsObjEventLogMapper.xml
  50. 0 76
      ems/ems-core/src/main/resources/mapper/ems/EmsObjReportLogMapper.xml
  51. 11 8
      ems/ems-core/src/main/resources/mapper/ems/EmsSubsystemMapper.xml
  52. 207 187
      ems/sql/ems_init_data.sql
  53. 6 8
      ems/sql/ems_server.sql
  54. 12 11
      ems/sql/ems_sys_data.sql

+ 0 - 91
ems/ems-application/ems-admin/src/main/java/com/ruoyi/web/controller/ems/ChargingBillController.java

@@ -1,91 +0,0 @@
-/*
- * 文 件 名:  CoBillController
- * 版    权:  浩鲸云计算科技股份有限公司
- * 描    述:  <描述>
- * 修 改 人:  lvwenbin
- * 修改时间:  2024/8/30
- * 跟踪单号:  <跟踪单号>
- * 修改单号:  <修改单号>
- * 修改内容:  <修改内容>
- */
-package com.ruoyi.web.controller.ems;
-
-/**
- * 商户账单接口
- * <功能详细描述>
- *
- * @author lvwenbin
- * @version [版本号, 2024/8/30]
- * @see [相关类/方法]
- * @since [产品/模块版本]
- */
-
-import com.huashe.common.domain.AjaxResult;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.exception.BusinessException;
-import com.ruoyi.ems.domain.ChargingBill;
-import com.ruoyi.ems.model.QueryChargingBill;
-import com.ruoyi.ems.service.IChargingBillService;
-import io.swagger.annotations.Api;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-/**
- * 商户能源账单配置Controller
- *
- * @author ruoyi
- * @date 2024-08-26
- */
-@RestController
-@RequestMapping("/ems/charging/bill/")
-@Api(value = "ChargingBillController", description = "计费账单服务")
-public class ChargingBillController extends BaseController {
-    @Autowired
-    private IChargingBillService chargingBillService;
-
-    /**
-     * 查询账单
-     *
-     * @param queryParam 查询参数
-     * @return 计费
-     */
-    @GetMapping(value = "/co")
-    public AjaxResult getCoBill(QueryChargingBill queryParam) {
-        try {
-            List<ChargingBill> list = chargingBillService.selectCoChargingBill(queryParam);
-            return success(list);
-        }
-        catch (BusinessException e) {
-            return error(e.getMessage());
-        }
-        catch (Exception e) {
-            logger.error("系统异常", e);
-            return error("系统异常");
-        }
-    }
-
-    /**
-     * 商户计费
-     *
-     * @param queryParam 查询参数
-     * @return 计费
-     */
-    @GetMapping(value = "/getByTag")
-    public AjaxResult getByTag(QueryChargingBill queryParam) {
-        try {
-            List<ChargingBill> list = chargingBillService.selectTagChargingBill(queryParam);
-            return success(list);
-        }
-        catch (BusinessException e) {
-            return error(e.getMessage());
-        }
-        catch (Exception e) {
-            logger.error("系统异常", e);
-            return error("系统异常");
-        }
-    }
-}

+ 2 - 2
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/TaskExecutor.java

@@ -61,9 +61,9 @@ public class TaskExecutor {
     /**
      * 定时刷新设备在线状态
      */
-    @Scheduled(cron = "0 10 0/1 * * ?")
+    @Scheduled(cron = "0 0/1 * * * ?")
     public void refreshOnline() {
-        inDoorEnergyHandler.refreshOnline(2 * 60 * 60 * 1000);
+        inDoorEnergyHandler.refreshOnline();
     }
 
 //    /**

+ 2 - 3
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/config/InDoorEnergyConfig.java

@@ -11,7 +11,7 @@
 package com.ruoyi.ems.config;
 
 import lombok.Data;
-import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.context.annotation.Configuration;
 
 /**
@@ -25,10 +25,9 @@ import org.springframework.context.annotation.Configuration;
  */
 @Data
 @Configuration
+@ConfigurationProperties(prefix = "adapter.id-energy")
 public class InDoorEnergyConfig {
-    @Value("${adapter.id-energy.url}")
     private String url;
 
-    @Value("${adapter.id-energy.appId}")
     private String appId;
 }

+ 59 - 0
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/config/SquareLightCtlConfig.java

@@ -0,0 +1,59 @@
+/*
+ * 文 件 名:  SquareLightCtlConfig
+ * 版    权:  华设设计集团股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2025/9/15
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 广场灯控对接配置
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2025/9/15]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+@Data
+@Configuration
+@ConfigurationProperties(prefix = "adapter.square-lighting-ctl")
+public class SquareLightCtlConfig {
+    /**
+     * 平台地址
+     */
+    private String url;
+
+    /**
+     * 客户端id
+     */
+    private String clientId;
+
+    /**
+     * 项目ID
+     */
+    private String projectId;
+
+    /**
+     * 用户名
+     */
+    private String userName;
+
+    /**
+     * 用户名密码
+     */
+    private String password;
+
+    /**
+     * 租户ID
+     */
+    private String tenantId;
+}

+ 30 - 10
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/core/InDoorEnergyTemplate.java

@@ -83,18 +83,24 @@ public class InDoorEnergyTemplate extends BaseApiTemplate {
         String accessToken = redisService.getCacheObject("INDOOR_ENERGY_ACCESS_TOKEN");
 
         if (StringUtils.isEmpty(accessToken)) {
-            InDoorEnergyConfig config = SpringUtils.getBean(InDoorEnergyConfig.class);
-            Token token = getAuthToken(config.getAppId());
-            log.info("getAuthToken response:{}", JSONObject.toJSONString(token));
-            redisService.setCacheObject("INDOOR_ENERGY_ACCESS_TOKEN", token.getAccessToken(), 5 * 60L,
-                TimeUnit.SECONDS);
-            redisService.setCacheObject("INDOOR_ENERGY_REFRESH_TOKEN", token.getRefreshToken());
-            accessToken = token.getAccessToken();
+            accessToken = getNewToken();
         }
 
         return accessToken;
     }
 
+    public synchronized String getNewToken() {
+        RedisService redisService = SpringUtils.getBean(RedisService.class);
+
+        InDoorEnergyConfig config = SpringUtils.getBean(InDoorEnergyConfig.class);
+        Token token = getAuthToken(config.getAppId());
+        log.info("getAuthToken response:{}", JSONObject.toJSONString(token));
+        redisService.setCacheObject("INDOOR_ENERGY_ACCESS_TOKEN", token.getAccessToken(), 5 * 60L, TimeUnit.SECONDS);
+        redisService.setCacheObject("INDOOR_ENERGY_REFRESH_TOKEN", token.getRefreshToken());
+
+        return token.getAccessToken();
+    }
+
     public synchronized String refreshToken() {
         RedisService redisService = SpringUtils.getBean(RedisService.class);
         String refreshToken = redisService.getCacheObject("INDOOR_ENERGY_REFRESH_TOKEN");
@@ -103,7 +109,7 @@ public class InDoorEnergyTemplate extends BaseApiTemplate {
             getAuthToken(config.getAppId()) :
             refreshToken(config.getAppId(), refreshToken);
         redisService.setCacheObject("INDOOR_ENERGY_ACCESS_TOKEN", token.getAccessToken(), 5 * 60L, TimeUnit.SECONDS);
-        redisService.setCacheObject("INDOOR_ENERGY_REFRESH_TOKEN", token.getRefreshToken(),60 * 60L, TimeUnit.SECONDS);
+        redisService.setCacheObject("INDOOR_ENERGY_REFRESH_TOKEN", token.getRefreshToken(), 60 * 60L, TimeUnit.SECONDS);
 
         return token.getAccessToken();
     }
@@ -136,7 +142,8 @@ public class InDoorEnergyTemplate extends BaseApiTemplate {
 
     /**
      * 刷新token
-     * @param appId appId
+     *
+     * @param appId        appId
      * @param refreshToken 缓存token
      * @return token
      */
@@ -162,6 +169,7 @@ public class InDoorEnergyTemplate extends BaseApiTemplate {
 
     /**
      * 获取能耗数据
+     *
      * @param req 请求
      * @return 能耗数据列表
      */
@@ -176,7 +184,19 @@ public class InDoorEnergyTemplate extends BaseApiTemplate {
             Response<String> response = call.execute();
             log.debug("getCodesVal response:{}", response);
 
-            ret = response.body();
+            JSONObject resJson = JSONObject.parseObject(response.body());
+
+            if (resJson.getInteger("code") == 200) {
+                ret = response.body();
+            }
+            else if (resJson.getInteger("code") == 302) {
+                token = getNewToken();
+                // 执行调用
+                call = api.getCodesVal(config.getAppId(), token, req);
+                response = call.execute();
+                log.debug("getCodesVal response:{}", response);
+                ret = response.body();
+            }
         }
         catch (Exception e) {
             log.error("getCodesVal fail!", e);

+ 249 - 0
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/core/SquareLightCtlTemplate.java

@@ -0,0 +1,249 @@
+/*
+ * 文 件 名:  SquareLightCtlTemplate
+ * 版    权:  华设设计集团股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2025/9/15
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.core;
+
+import com.alibaba.fastjson.support.retrofit.Retrofit2ConverterFactory;
+import com.alibaba.fastjson2.JSON;
+import com.huashe.common.exception.Assert;
+import com.ruoyi.common.core.utils.SpringUtils;
+import com.ruoyi.common.redis.service.RedisService;
+import com.ruoyi.ems.config.SquareLightCtlConfig;
+import com.ruoyi.ems.model.slightctl.AppLoginReq;
+import com.ruoyi.ems.model.slightctl.AppLoginRes;
+import com.ruoyi.ems.model.slightctl.SlcDevice;
+import com.ruoyi.ems.model.slightctl.SlcProject;
+import com.ruoyi.ems.model.slightctl.SlcProjectSubset;
+import com.ruoyi.ems.model.slightctl.SlcResponse;
+import com.ruoyi.ems.retrofit.SquareLightCtlApi;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.OkHttpClient;
+import org.apache.commons.lang3.StringUtils;
+import retrofit2.Call;
+import retrofit2.Response;
+import retrofit2.Retrofit;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * 广场灯控接口模板
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2025/9/15]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+@Slf4j
+public class SquareLightCtlTemplate extends BaseApiTemplate {
+    /**
+     * 访问地址
+     */
+    protected String url;
+
+    /**
+     * 调用代理
+     */
+    protected final SquareLightCtlApi api;
+
+    public SquareLightCtlTemplate(String restUrl) {
+        this.url = restUrl;
+
+        OkHttpClient httpClient = getClient();
+        Retrofit retrofit = new Retrofit.Builder().baseUrl(restUrl)
+            .addConverterFactory(Retrofit2ConverterFactory.create()).client(httpClient).build();
+        this.api = retrofit.create(SquareLightCtlApi.class);
+    }
+
+    /**
+     * 构造调用模板
+     *
+     * @param restUrl        服务地址 (http://ip:port)
+     * @param connectTimeout 连接超时
+     * @param readTimeout    读取超时
+     * @param writeTimeout   写超时
+     */
+    public SquareLightCtlTemplate(String restUrl, int connectTimeout, int readTimeout, int writeTimeout) {
+        super.connectTimeout = connectTimeout;
+        super.readTimeout = readTimeout;
+        super.writeTimeout = writeTimeout;
+        this.url = restUrl;
+
+        OkHttpClient httpClient = getClient();
+        Retrofit retrofit = new Retrofit.Builder().baseUrl(restUrl)
+            .addConverterFactory(Retrofit2ConverterFactory.create()).client(httpClient).build();
+        api = retrofit.create(SquareLightCtlApi.class);
+    }
+
+    /**
+     * 登录接口
+     *
+     * @param cfg 请求参数
+     * @return 登录响应
+     */
+    public AppLoginRes appLogin(SquareLightCtlConfig cfg) {
+        AppLoginRes appLoginRes = null;
+
+        try {
+            AppLoginReq req = new AppLoginReq();
+            req.setLoginType(3);
+            req.setClientId(cfg.getClientId());
+            req.setUsername(cfg.getUserName());
+            req.setPassword(cfg.getPassword());
+            req.setTenantId(cfg.getTenantId());
+
+            // 执行调用
+            Call<String> call = api.appLogin(req);
+            Response<String> response = call.execute();
+            String res = response.body();
+            log.debug("appLogin response:{}", res);
+            Assert.notEmpty(res, -1, "获取Token失败");
+            SlcResponse slcRes = JSON.parseObject(res, SlcResponse.class);
+            Assert.notNull(slcRes, -1, "解析登录响应失败.");
+            Assert.isTrue(200 == slcRes.getCode(), -1, "登录失败:" + slcRes.getMsg());
+            appLoginRes = JSON.parseObject(slcRes.getData(), AppLoginRes.class);
+        }
+        catch (Exception e) {
+            log.error("appLogin fail!", e);
+        }
+
+        return appLoginRes;
+    }
+
+    public synchronized String getToken() {
+        RedisService redisService = SpringUtils.getBean(RedisService.class);
+        String accessToken = redisService.getCacheObject("SQUARE_LIGHT_CTL_TOKEN");
+
+        if (StringUtils.isEmpty(accessToken)) {
+            SquareLightCtlConfig config = SpringUtils.getBean(SquareLightCtlConfig.class);
+            AppLoginRes res = appLogin(config);
+            redisService.setCacheObject("SQUARE_LIGHT_CTL_TOKEN", res.getAccessToken(), 5 * 60L, TimeUnit.SECONDS);
+            accessToken = res.getAccessToken();
+        }
+
+        return accessToken;
+    }
+
+    /**
+     * 获取项目列表
+     *
+     * @param pageNum  页码
+     * @param pageSize 每页记录数
+     * @return 登录响应
+     */
+    public List<SlcProject> getProjectList(int pageNum, int pageSize) {
+        List<SlcProject> list = null;
+
+        try {
+            SquareLightCtlConfig config = SpringUtils.getBean(SquareLightCtlConfig.class);
+
+            String token = getToken();
+            Assert.notEmpty(token, -1, "获取Token失败");
+            token = "Bearer " + token;
+
+            // 执行调用
+            Call<String> call = api.getProjectList(config.getClientId(), token, pageNum, pageSize);
+            Response<String> response = call.execute();
+            String resBody = response.body();
+            log.debug("getProjectList response:{}", resBody);
+            Assert.notEmpty(resBody, -1, "获取项目列表失败");
+            SlcResponse slcRes = JSON.parseObject(resBody, SlcResponse.class);
+            Assert.notNull(slcRes, -1, "解析项目列表响应失败.");
+            Assert.isTrue(200 == slcRes.getCode(), -1, "登录失败:" + slcRes.getMsg());
+            list = JSON.parseArray(slcRes.getData(), SlcProject.class);
+        }
+        catch (Exception e) {
+            log.error("getProjectList fail!", e);
+        }
+
+        return list;
+    }
+
+    /**
+     * 获取项目分组列表
+     *
+     * @param pageNum  页码
+     * @param pageSize 每页记录数
+     * @return 登录响应
+     */
+    public List<SlcProjectSubset> getProjectSubsetList(String projectId, int pageNum, int pageSize) {
+        List<SlcProjectSubset> list = null;
+
+        try {
+            SquareLightCtlConfig config = SpringUtils.getBean(SquareLightCtlConfig.class);
+
+            String token = getToken();
+            Assert.notEmpty(token, -1, "获取Token失败");
+            token = "Bearer " + token;
+
+            // 执行调用
+            Call<String> call = api.getProjectSubsetList(config.getClientId(), token, projectId, pageNum, pageSize);
+            Response<String> response = call.execute();
+            String resBody = response.body();
+            log.debug("getProjectSubsetList response:{}", resBody);
+            Assert.notEmpty(resBody, -1, "获取项目分组列表失败");
+            SlcResponse slcRes = JSON.parseObject(resBody, SlcResponse.class);
+            Assert.notNull(slcRes, -1, "解析项目分组列表响应失败.");
+            Assert.isTrue(200 == slcRes.getCode(), -1, "登录失败:" + slcRes.getMsg());
+            list = JSON.parseArray(slcRes.getData(), SlcProjectSubset.class);
+        }
+        catch (Exception e) {
+            log.error("getProjectSubsetList fail!", e);
+        }
+
+        return list;
+    }
+
+    /**
+     * 获取设备列表
+     *
+     * @return 登录响应
+     */
+    public List<SlcDevice> getDeviceList(String projectId) {
+        List<SlcDevice> list = new ArrayList<>();
+
+        try {
+            SquareLightCtlConfig config = SpringUtils.getBean(SquareLightCtlConfig.class);
+
+            String token = getToken();
+            Assert.notEmpty(token, -1, "获取Token失败");
+            token = "Bearer " + token;
+
+            int pageNum = 1;
+            int pageSize = 50;
+            int total = 0;
+
+            do {
+                // 执行调用
+                Call<String> call = api.getDeviceList(config.getClientId(), projectId, token, pageNum, pageSize);
+                Response<String> response = call.execute();
+                String resBody = response.body();
+                log.debug("getDeviceList response:{}", resBody);
+                Assert.notEmpty(resBody, -1, "获取设备列表失败");
+                SlcResponse slcRes = JSON.parseObject(resBody, SlcResponse.class);
+                Assert.notNull(slcRes, -1, "解析设备列表响应失败.");
+                Assert.isTrue(200 == slcRes.getCode(), -1, "登录失败:" + slcRes.getMsg());
+                total = slcRes.getTotal();
+                list.addAll(JSON.parseArray(slcRes.getRows(), SlcDevice.class));
+                pageNum++;
+            }
+            while (list.size() < total);
+        }
+        catch (Exception e) {
+            log.error("getDeviceList fail!", e);
+        }
+
+        return list;
+    }
+}

+ 23 - 22
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/handle/BaseDevHandler.java

@@ -13,10 +13,8 @@ package com.ruoyi.ems.handle;
 import com.huashe.common.utils.DateUtils;
 import com.ruoyi.common.redis.service.RedisService;
 import com.ruoyi.ems.domain.EmsDevice;
-import com.ruoyi.ems.domain.EmsObjAbility;
 import com.ruoyi.ems.domain.EmsObjAbilityCallLog;
 import com.ruoyi.ems.domain.EmsObjEventLog;
-import com.ruoyi.ems.domain.EmsObjReportLog;
 import com.ruoyi.ems.enums.DevOnlineStatus;
 import com.ruoyi.ems.model.AbilityPayload;
 import com.ruoyi.ems.model.CallResponse;
@@ -28,7 +26,6 @@ import com.ruoyi.ems.service.IEmsFacsService;
 import com.ruoyi.ems.service.IEmsObjAbilityCallLogService;
 import com.ruoyi.ems.service.IEmsObjAttrValueService;
 import com.ruoyi.ems.service.IEmsObjEventLogService;
-import com.ruoyi.ems.service.IEmsObjReportLogService;
 import com.ruoyi.ems.service.IFdEnergyPriceConfigService;
 import com.ruoyi.ems.service.IPriceService;
 import com.ruoyi.ems.service.IWaterMeterHService;
@@ -77,9 +74,6 @@ public abstract class BaseDevHandler {
     protected IEmsObjAbilityCallLogService objAbilityCallLogService;
 
     @Autowired
-    protected IEmsObjReportLogService objReportLogService;
-
-    @Autowired
     protected IEmsObjEventLogService objEventLogService;
 
     @Autowired
@@ -166,10 +160,28 @@ public abstract class BaseDevHandler {
         objEventLogService.insertLog(eventLog);
     }
 
+    /**
+     * 触发设备事件
+     *
+     * @param modelCode 模型代码
+     * @param objCode   对象编码
+     * @param detail    事件详情
+     * @param date      时间戳
+     */
+    public void triggerEvent(String modelCode, String objCode, String eventKey, String detail, Date date) {
+        EmsObjEventLog eventLog = new EmsObjEventLog();
+        eventLog.setModelCode(modelCode);
+        eventLog.setObjCode(objCode);
+        eventLog.setEventKey(eventKey);
+        eventLog.setEventTime(date);
+        eventLog.setEventDetail(detail);
+        objEventLogService.insertLog(eventLog);
+    }
+
     protected EmsObjAbilityCallLog saveCallLog(AbilityPayload abilityParam, long sendTime, int callStatus) {
         EmsObjAbilityCallLog objAbilityCallLog = new EmsObjAbilityCallLog();
         objAbilityCallLog.setObjCode(abilityParam.getObjCode());
-        objAbilityCallLog.setModelCode(abilityParam.getModeCode());
+        objAbilityCallLog.setModelCode(abilityParam.getModelCode());
         objAbilityCallLog.setAbilityKey(abilityParam.getAbilityKey());
         objAbilityCallLog.setCallTime(new Date(sendTime));
         objAbilityCallLog.setCallPayload(abilityParam.getAbilityParam());
@@ -185,12 +197,12 @@ public abstract class BaseDevHandler {
         objAbilityCallLogService.updateLog(objAbilityCallLog);
     }
 
-    protected EmsObjAbilityCallLog saveCallLog(String objCode, EmsObjAbility objAbility, Integer callStatus,
+    protected EmsObjAbilityCallLog saveCallLog(String objCode, String modelCode, String abilityKey, Integer callStatus,
         String callPayload, String resPayload) {
         EmsObjAbilityCallLog objAbilityCallLog = new EmsObjAbilityCallLog();
         objAbilityCallLog.setObjCode(objCode);
-        objAbilityCallLog.setModelCode(objAbility.getModelCode());
-        objAbilityCallLog.setAbilityKey(objAbility.getAbilityKey());
+        objAbilityCallLog.setModelCode(modelCode);
+        objAbilityCallLog.setAbilityKey(abilityKey);
         objAbilityCallLog.setCallTime(new Date());
         objAbilityCallLog.setCallPayload(callPayload);
         objAbilityCallLog.setCallStatus(callStatus);
@@ -200,16 +212,5 @@ public abstract class BaseDevHandler {
         return objAbilityCallLog;
     }
 
-    protected void saveReportLog(String objCode, String modelCode, String msgDesc, String payload) {
-        EmsObjReportLog objReportLog = new EmsObjReportLog();
-        objReportLog.setObjCode(objCode);
-        objReportLog.setModelCode(modelCode);
-        objReportLog.setMsgDesc(msgDesc);
-        objReportLog.setReportPayload(payload);
-        objReportLog.setReportTime(new Date());
-
-        objReportLogService.insertLog(objReportLog);
-    }
-
-    public abstract void refreshOnline(long threshold);
+    public abstract void refreshOnline();
 }

+ 4 - 3
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/handle/GeekOpenCbHandler.java

@@ -137,7 +137,7 @@ public class GeekOpenCbHandler extends BaseMeterDevHandler {
                 // 自动上报数据: 1.更新属性值,2.更新电量计量数据
                 if (StringUtils.equals("auto", messageId)) {
                     updateAutoAttr(device, msgBody);
-                    saveReportLog(deviceCode, device.getDeviceModel(), "电量上报", payload);
+                    saveCallLog(deviceCode, device.getDeviceModel(), "电量上报", 0, null, payload);
                 }
                 // 前序调用的响应消息:1.写入消息队列,2.更新属性值
                 else if (StringUtils.isNotEmpty(messageId) && StringUtils.startsWith(messageId, "CALL-")) {
@@ -148,7 +148,7 @@ public class GeekOpenCbHandler extends BaseMeterDevHandler {
                 // 设备同步数据(INFO类,协议类):更新基础属性值
                 else {
                     updateBaseAttr(device, msgBody);
-                    saveReportLog(deviceCode, device.getDeviceModel(), "信息上报", payload);
+                    saveCallLog(deviceCode, device.getDeviceModel(), "信息上报", 0, null, payload);
                 }
 
                 // 设备消息抵达,将数据库离线状态改为在线
@@ -338,7 +338,8 @@ public class GeekOpenCbHandler extends BaseMeterDevHandler {
      * <br/>每小时执行一次,扫描2个小时无消息的设备,标记为离线状态
      */
     @Override
-    public void refreshOnline(long threshold) {
+    public void refreshOnline() {
+        long threshold = 2 * 60 * 60 * 1000;
         long currentTime = new Date().getTime();
 
         List<EmsDevice> deviceList = getDeviceList();

+ 166 - 89
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/handle/InDoorEnergyHandler.java

@@ -3,6 +3,7 @@ package com.ruoyi.ems.handle;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.huashe.common.exception.Assert;
+import com.huashe.common.exception.BusinessException;
 import com.huashe.common.utils.DateUtils;
 import com.ruoyi.common.redis.service.RedisService;
 import com.ruoyi.ems.config.InDoorEnergyConfig;
@@ -10,11 +11,11 @@ import com.ruoyi.ems.core.InDoorEnergyTemplate;
 import com.ruoyi.ems.domain.ElecMeterH;
 import com.ruoyi.ems.domain.ElecPgSupplyH;
 import com.ruoyi.ems.domain.EmsDevice;
-import com.ruoyi.ems.domain.EmsObjAbility;
 import com.ruoyi.ems.domain.EmsObjAttrValue;
 import com.ruoyi.ems.domain.FdEnergyPriceConfig;
 import com.ruoyi.ems.domain.MeterDevice;
 import com.ruoyi.ems.domain.WaterMeterH;
+import com.ruoyi.ems.enums.DevObjType;
 import com.ruoyi.ems.model.AbilityPayload;
 import com.ruoyi.ems.model.BoundaryObj;
 import com.ruoyi.ems.model.CallResponse;
@@ -24,6 +25,7 @@ import com.ruoyi.ems.model.QueryDevice;
 import com.ruoyi.ems.model.idenergy.CodesVal;
 import com.ruoyi.ems.model.idenergy.CodesValReq;
 import com.ruoyi.ems.service.IEmsObjAttrValueService;
+import com.ruoyi.ems.util.PingUtils;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -55,13 +57,18 @@ import java.util.stream.Collectors;
 public class InDoorEnergyHandler extends BaseMeterDevHandler {
     private static final Logger log = LoggerFactory.getLogger(InDoorEnergyHandler.class);
 
+    // 对接系统
+    private static final String SYS_MODE_CODE = "M_W4_SYS_IN_DOOR";
+
     // 设备模型代码
-    private static final String MODE_CODE = "M_W2_SM_INDOOR_ENERGY";
+    private static final String DEV_MODE_CODE = "M_W4_SM_INDOOR_ENERGY";
 
     // 单小时最大增长量(度)
     private static final double MAX_HOUR_INCREASE_RATE = 1000.0;
+
     // 允许的最小负增长(考虑精度误差)
     private static final double MIN_REASONABLE_DECREASE_RATE = -0.1;
+
     // 异常数据连续确认次数
     private static final int ABNORMAL_DATA_CONFIRM_COUNT = 3;
 
@@ -77,7 +84,7 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
     @Override
     public List<MeterDevice> getMeterDeviceList() {
         QueryDevice queryDevice = new QueryDevice();
-        queryDevice.setDeviceModel(MODE_CODE);
+        queryDevice.setDeviceModel(DEV_MODE_CODE);
         queryDevice.setDeviceEnable(1);
         return meterDeviceService.selectMeterDeviceList(queryDevice);
     }
@@ -86,54 +93,121 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
     public CallResponse<Void> call(AbilityPayload abilityParam) {
         CallResponse<Void> callResponse = null;
 
-        if (StringUtils.equals("MeterReadingGw", abilityParam.getAbilityKey())) {
-            // 查询当前设备的接口属性值
-            List<EmsObjAttrValue> attrValues = objAttrValueService.selectByObjCode(MODE_CODE,
-                abilityParam.getObjCode());
-            attrValues = attrValues.stream()
-                // 过滤条件:attrKey以"interface"开头
-                .filter(attr -> StringUtils.startsWith(attr.getAttrKey(), "interface"))
-                // 收集为新的List
-                .collect(Collectors.toList());
+        try {
+            if (DevObjType.SYSTEM.getCode() == abilityParam.getObjType()) {
+                if (StringUtils.equals("MeterReadingTotal", abilityParam.getAbilityKey())) {
+                    List<EmsDevice> deviceList = getDeviceList();
 
-            Set<String> pointIdSet = getPointIds(attrValues);
-            CodesValReq req = new CodesValReq(pointIdSet);
+                    for (EmsDevice device : deviceList) {
+                        meterReadingGw(device.getDeviceModel(), "MeterReadingGw", device.getDeviceCode());
+                    }
+                }
 
-            // 调用能耗数据接口获取实时数据
-            InDoorEnergyTemplate template = new InDoorEnergyTemplate(config.getUrl());
-            String callRes = template.getCodesVal(req);
-            JSONObject resJson = JSONObject.parseObject(callRes);
-            Assert.isTrue(StringUtils.equals(resJson.getString("code"), "200"), resJson.getInteger("code"),
-                resJson.getString("error"));
-            EmsObjAbility ability = new EmsObjAbility();
-            ability.setModelCode(MODE_CODE);
-            ability.setAbilityKey("MeterReadingGw");
-            int callStatus = StringUtils.equals(resJson.getString("code"), "200") ? 0 : 2;
-            saveCallLog(abilityParam.getObjCode(), ability, callStatus, JSON.toJSONString(req), callRes);
+                callResponse = new CallResponse<>(0, "成功");
+            }
+            else if (DevObjType.DEVC.getCode() == abilityParam.getObjType()) {
+                if (StringUtils.equals("MeterReadingGw", abilityParam.getAbilityKey())) {
+                    meterReadingGw(abilityParam.getModelCode(), abilityParam.getAbilityKey(),
+                        abilityParam.getObjCode());
+                }
+
+                callResponse = new CallResponse<>(0, "成功");
+            }
+            else {
+                callResponse = new CallResponse<>(-1, "不支持的能力key:" + abilityParam.getAbilityKey());
+            }
+        }
+        catch (BusinessException e) {
+            callResponse = new CallResponse<>(e.getCode(), e.getMessage());
+        }
+
+        return callResponse;
+    }
+
+    private void meterReadingGw(String modeCode, String abilityKey, String objCode) {
+        // 查询当前设备的接口属性值
+        List<EmsObjAttrValue> attrValues = objAttrValueService.selectByObjCode(modeCode, objCode);
+        attrValues = attrValues.stream()
+            // 过滤条件:attrKey以"interface"开头
+            .filter(attr -> StringUtils.startsWith(attr.getAttrKey(), "interface"))
+            // 收集为新的List
+            .collect(Collectors.toList());
+
+        Set<String> pointIdSet = getPointIds(attrValues);
+        CodesValReq req = new CodesValReq(pointIdSet);
+
+        // 调用能耗数据接口获取实时数据
+        InDoorEnergyTemplate template = new InDoorEnergyTemplate(config.getUrl());
+        String callRes = template.getCodesVal(req);
+        JSONObject resJson = JSONObject.parseObject(callRes);
+
+        if (resJson.getInteger("code") == 200) {
+            saveCallLog(objCode, modeCode, abilityKey, 0, JSON.toJSONString(req), callRes);
 
             String dataStr = resJson.getString("ResultPointObjArr");
             List<CodesVal> retList = JSONObject.parseArray(dataStr, CodesVal.class);
             // 更新设备属性
             updateDeviceAttrList(attrValues, retList);
-            callResponse = new CallResponse<>(0, "成功");
         }
         else {
-            callResponse = new CallResponse<>(-1, "不支持的能力key:" + abilityParam.getAbilityKey());
+            saveCallLog(objCode, modeCode, abilityKey, 2, JSON.toJSONString(req), callRes);
+            throw new BusinessException(-1, resJson.getString("error"));
         }
-
-        return callResponse;
     }
 
     @Override
     public List<EmsDevice> getDeviceList() {
         QueryDevice queryDevice = new QueryDevice();
-        queryDevice.setDeviceModel(MODE_CODE);
+        queryDevice.setDeviceModel(DEV_MODE_CODE);
         return deviceService.selectList(queryDevice);
     }
 
     @Override
-    public void refreshOnline(long threshold) {
+    public void refreshOnline() {
+        try {
+            // 1. 从URL中提取IP地址
+            String url = config.getUrl();
+            if (StringUtils.isBlank(url)) {
+                log.warn("能耗监测系统URL配置为空,跳过心跳检测");
+                return;
+            }
+
+            String ipAddress = PingUtils.extractIpFromUrl(url);
+            if (StringUtils.isBlank(ipAddress)) {
+                log.warn("无法从URL中提取IP地址: {}", url);
+                return;
+            }
+
+            // 2. 执行ping检测
+            boolean isOnline = PingUtils.pingHost(ipAddress, 3000); // 3秒超时
+
+            // 3. 获取当前系统状态
+            String objCode = "SYS_NHJC"; // 能耗监测系统代码
+            String statusKey = "interfaceStatus";
+
+            // 查询当前状态
+            EmsObjAttrValue currentStatus = objAttrValueService.selectObjAttrValue(SYS_MODE_CODE, objCode, statusKey);
+
+            String newStatus = isOnline ? "1" : "0";
+            String oldStatus = currentStatus != null ? currentStatus.getAttrValue() : null;
 
+            // 4. 状态发生变化时更新并记录
+            if (!StringUtils.equals(oldStatus, newStatus)) {
+                log.info("能耗监测系统连接状态变化: {} -> {}, IP: {}", oldStatus, newStatus, ipAddress);
+
+                // 更新系统属性状态
+                objAttrValueService.updateObjAttrValue(SYS_MODE_CODE, objCode, statusKey, newStatus);
+
+                String key = isOnline ? "connect" : "disconnect";
+                triggerEvent(SYS_MODE_CODE, objCode, key, null, new Date());
+            }
+
+            // 5. 记录心跳日志(可选,用于调试)
+            log.debug("能耗监测系统心跳检测完成 - IP: {}, 状态: {}", ipAddress, isOnline ? "在线" : "离线");
+        }
+        catch (Exception e) {
+            log.error("能耗监测系统心跳检测异常", e);
+        }
     }
 
     /**
@@ -170,7 +244,7 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
 
         try {
             // 查询当前设备的接口属性值
-            List<EmsObjAttrValue> attrValues = objAttrValueService.selectByObjCode(MODE_CODE,
+            List<EmsObjAttrValue> attrValues = objAttrValueService.selectByObjCode(DEV_MODE_CODE,
                 emsDevice.getDeviceCode());
             attrValues = attrValues.stream()
                 // 过滤条件:attrKey以"interface"开头
@@ -186,11 +260,9 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
             JSONObject resJson = JSONObject.parseObject(callRes);
             Assert.isTrue(StringUtils.equals(resJson.getString("code"), "200"), resJson.getInteger("code"),
                 resJson.getString("error"));
-            EmsObjAbility ability = new EmsObjAbility();
-            ability.setModelCode(MODE_CODE);
-            ability.setAbilityKey("MeterReadingGw");
             int callStatus = StringUtils.equals(resJson.getString("code"), "200") ? 0 : 2;
-            saveCallLog(emsDevice.getDeviceCode(), ability, callStatus, JSON.toJSONString(req), callRes);
+            saveCallLog(emsDevice.getDeviceCode(), DEV_MODE_CODE, "MeterReadingGw", callStatus, JSON.toJSONString(req),
+                callRes);
 
             String dataStr = resJson.getString("ResultPointObjArr");
             List<CodesVal> retList = JSONObject.parseArray(dataStr, CodesVal.class);
@@ -229,26 +301,28 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
 
                         if (null != syncCodesVal) {
                             // 数据验证和处理
-                            DataValidationResult validationResult = validateMeterData(dbAttr.getObjCode(),
-                                pointId, dbItem.getValue(), syncCodesVal.getValue());
+                            DataValidationResult validationResult = validateMeterData(dbAttr.getObjCode(), pointId,
+                                dbItem.getValue(), syncCodesVal.getValue());
 
                             if (validationResult.isValid()) {
                                 // 更新缓存中的数据
                                 String hKey = NEW_HOUR_READING + "-" + pointId;
-                                redisService.setCacheMapValue(dbAttr.getObjCode(), hKey, validationResult.getValidValue());
+                                redisService.setCacheMapValue(dbAttr.getObjCode(), hKey,
+                                    validationResult.getValidValue());
 
-                                if (!StringUtils.equals(validationResult.getValidValue(), dbItem.getValue()) ||
-                                    !StringUtils.equals(syncCodesVal.getTime(), dbItem.getUpdateTime())) {
+                                if (!StringUtils.equals(validationResult.getValidValue(), dbItem.getValue())
+                                    || !StringUtils.equals(syncCodesVal.getTime(), dbItem.getUpdateTime())) {
                                     dbNeedUpdate = true;
 
                                     dbItem.setValue(validationResult.getValidValue());
                                     dbItem.setUpdateTime(syncCodesVal.getTime());
                                 }
-                            } else {
+                            }
+                            else {
                                 // 记录异常数据但不更新
                                 log.warn("检测到异常抄表数据 - 设备:{}, 测点:{}, 旧值:{}, 新值:{}, 原因:{}",
-                                    dbAttr.getObjCode(), pointId, dbItem.getValue(),
-                                    syncCodesVal.getValue(), validationResult.getReason());
+                                    dbAttr.getObjCode(), pointId, dbItem.getValue(), syncCodesVal.getValue(),
+                                    validationResult.getReason());
                             }
                         }
                     }
@@ -257,8 +331,8 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
                 // 如果有更新,则保存回数据库
                 if (dbNeedUpdate) {
                     dbAttrValue = JSON.toJSONString(dbItems);
-                    dbAttr.setAttrValue(dbAttrValue);
-                    objAttrValueService.updateObjAttrValue(dbAttr);
+                    objAttrValueService.updateObjAttrValue(dbAttr.getModelCode(), dbAttr.getObjCode(),
+                        dbAttr.getAttrKey(), dbAttrValue);
                 }
             }
         }
@@ -319,7 +393,7 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
 
         try {
             // 查询当前设备的接口属性值
-            List<EmsObjAttrValue> attrValues = objAttrValueService.selectByObjCode(MODE_CODE,
+            List<EmsObjAttrValue> attrValues = objAttrValueService.selectByObjCode(DEV_MODE_CODE,
                 emsDevice.getDeviceCode());
             attrValues = attrValues.stream()
                 // 过滤条件:attrKey以"interface"开头
@@ -406,7 +480,8 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
                 long currentTime = System.currentTimeMillis();
                 // 只有当缓存数据在2小时内才使用
                 shouldUseCache = (currentTime - lastUpdateTime) <= MAX_CACHE_AGE_MILLIS;
-            } catch (NumberFormatException e) {
+            }
+            catch (NumberFormatException e) {
                 log.warn("无效的时间戳缓存: {}", cachedTimestamp);
             }
         }
@@ -416,9 +491,9 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
             elecMeterH = execElecHourMeter(mDevice, lastMeterReading, newMeterReading);
             // 更新缓存和时间戳
             updateCacheAfterSuccess(deviceCode, cacheKey, newMeterReading);
-            redisService.setCacheMapValue(deviceCode, timestampKey,
-                String.valueOf(System.currentTimeMillis()));
-        } else {
+            redisService.setCacheMapValue(deviceCode, timestampKey, String.valueOf(System.currentTimeMillis()));
+        }
+        else {
             // 缓存过期或无效,查询数据库
             ElecMeterH dbElecMeterH = elecMeterHService.selectLatelyItem(mDevice.getDeviceCode());
 
@@ -429,23 +504,23 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
 
                 // 只有时间差在1小时左右(容差30分钟)才计算
                 if (Math.abs(timeDiff) <= 30 * 60 * 1000) {
-                    elecMeterH = execElecHourMeter(mDevice,
-                        String.valueOf(dbElecMeterH.getMeterReading()), newMeterReading);
-                } else {
-                    log.warn("数据时间差过大,跳过计算 - 设备:{}, 时间差:{}小时",
-                        mDevice.getDeviceCode(), timeDiff / (60 * 60 * 1000));
+                    elecMeterH = execElecHourMeter(mDevice, String.valueOf(dbElecMeterH.getMeterReading()),
+                        newMeterReading);
+                }
+                else {
+                    log.warn("数据时间差过大,跳过计算 - 设备:{}, 时间差:{}小时", mDevice.getDeviceCode(),
+                        timeDiff / (60 * 60 * 1000));
                 }
 
                 // 无论是否计算,都更新缓存为当前值,作为下次计算基准
                 updateCacheAfterSuccess(deviceCode, cacheKey, newMeterReading);
-                redisService.setCacheMapValue(deviceCode, timestampKey,
-                    String.valueOf(System.currentTimeMillis()));
-            } else {
+                redisService.setCacheMapValue(deviceCode, timestampKey, String.valueOf(System.currentTimeMillis()));
+            }
+            else {
                 // 首次上报,仅更新缓存
                 if (StringUtils.isNotEmpty(newMeterReading)) {
                     updateCacheAfterSuccess(deviceCode, cacheKey, newMeterReading);
-                    redisService.setCacheMapValue(deviceCode, timestampKey,
-                        String.valueOf(System.currentTimeMillis()));
+                    redisService.setCacheMapValue(deviceCode, timestampKey, String.valueOf(System.currentTimeMillis()));
                 }
             }
         }
@@ -503,11 +578,11 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
                 shouldUseCache = (currentTime - lastUpdateTime) <= MAX_CACHE_AGE_MILLIS;
 
                 if (!shouldUseCache) {
-                    log.warn("水表缓存数据过期 - 设备:{}, 缓存时长:{}小时",
-                        mDevice.getDeviceCode(),
+                    log.warn("水表缓存数据过期 - 设备:{}, 缓存时长:{}小时", mDevice.getDeviceCode(),
                         (currentTime - lastUpdateTime) / (60 * 60 * 1000));
                 }
-            } catch (NumberFormatException e) {
+            }
+            catch (NumberFormatException e) {
                 log.warn("无效的时间戳缓存: {}", cachedTimestamp);
             }
         }
@@ -518,10 +593,10 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
             if (waterMeterH != null) {
                 // 只有成功计算后才更新缓存
                 updateCacheAfterSuccess(deviceCode, cacheKey, newMeterReading);
-                redisService.setCacheMapValue(deviceCode, timestampKey,
-                    String.valueOf(System.currentTimeMillis()));
+                redisService.setCacheMapValue(deviceCode, timestampKey, String.valueOf(System.currentTimeMillis()));
             }
-        } else {
+        }
+        else {
             // 缓存过期或无效,查询数据库
             WaterMeterH dbWaterMeterH = waterMeterHService.selectLatelyItem(mDevice.getDeviceCode());
 
@@ -532,19 +607,19 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
 
                 // 只有时间差在1小时左右(容差30分钟)才计算
                 if (Math.abs(timeDiff) <= 30 * 60 * 1000) {
-                    waterMeterH = execWaterHourMeter(mDevice,
-                        String.valueOf(dbWaterMeterH.getMeterReading()), newMeterReading);
-                } else {
-                    log.warn("水表数据时间差过大,跳过计算 - 设备:{}, 时间差:{}小时",
-                        mDevice.getDeviceCode(), timeDiff / (60 * 60 * 1000));
+                    waterMeterH = execWaterHourMeter(mDevice, String.valueOf(dbWaterMeterH.getMeterReading()),
+                        newMeterReading);
+                }
+                else {
+                    log.warn("水表数据时间差过大,跳过计算 - 设备:{}, 时间差:{}小时", mDevice.getDeviceCode(),
+                        timeDiff / (60 * 60 * 1000));
                 }
             }
 
             // 无论是否计算成功,都更新缓存为当前值,作为下次计算基准
             if (StringUtils.isNotEmpty(newMeterReading)) {
                 updateCacheAfterSuccess(deviceCode, cacheKey, newMeterReading);
-                redisService.setCacheMapValue(deviceCode, timestampKey,
-                    String.valueOf(System.currentTimeMillis()));
+                redisService.setCacheMapValue(deviceCode, timestampKey, String.valueOf(System.currentTimeMillis()));
             }
         }
 
@@ -578,13 +653,10 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
 
                         if (CollectionUtils.isNotEmpty(subElecMeterHs)) {
                             // 直接累加同一设施下的所有电表数据(同一小时电价类型相同)
-                            double totalQuantity = subElecMeterHs.stream()
-                                .mapToDouble(ElecMeterH::getElecQuantity)
+                            double totalQuantity = subElecMeterHs.stream().mapToDouble(ElecMeterH::getElecQuantity)
                                 .sum();
 
-                            double totalCost = subElecMeterHs.stream()
-                                .mapToDouble(ElecMeterH::getUseElecCost)
-                                .sum();
+                            double totalCost = subElecMeterHs.stream().mapToDouble(ElecMeterH::getUseElecCost).sum();
 
                             // 精度控制:用量保留1位小数,金额保留2位小数
                             totalQuantity = formatToDecimalPlaces(totalQuantity, 1);
@@ -648,8 +720,7 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
         if (CollectionUtils.isEmpty(bindElecMeterDevs)) {
             return new ArrayList<>();
         }
-        return allElecMeterHList.stream()
-            .filter(elecMeterH -> bindElecMeterDevs.contains(elecMeterH.getDeviceCode()))
+        return allElecMeterHList.stream().filter(elecMeterH -> bindElecMeterDevs.contains(elecMeterH.getDeviceCode()))
             .collect(Collectors.toList());
     }
 
@@ -675,7 +746,8 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
     /**
      * 验证抄表数据的合理性
      */
-    private DataValidationResult validateMeterData(String deviceCode, String pointId, String oldValue, String newValue) {
+    private DataValidationResult validateMeterData(String deviceCode, String pointId, String oldValue,
+        String newValue) {
         try {
             // 新数据为空或无效
             if (StringUtils.isBlank(newValue)) {
@@ -696,11 +768,12 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
             if (difference < MIN_REASONABLE_DECREASE_RATE) {
                 // 检查是否可能是表计重置(新值很小,旧值很大)
                 if (newVal < 100 && oldVal > 10000) {
-                    log.info("检测到可能的表计重置 - 设备:{}, 测点:{}, 旧值:{}, 新值:{}",
-                        deviceCode, pointId, oldVal, newVal);
+                    log.info("检测到可能的表计重置 - 设备:{}, 测点:{}, 旧值:{}, 新值:{}", deviceCode, pointId, oldVal,
+                        newVal);
                     // 表计重置的情况,需要人工确认,暂时不更新
                     return DataValidationResult.invalid("疑似表计重置,需人工确认");
-                } else {
+                }
+                else {
                     return DataValidationResult.invalid(String.format("数据向后跳变,差值:%.2f", difference));
                 }
             }
@@ -721,12 +794,13 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
 
                 // 如果连续异常次数太多,需要告警但仍然更新数据
                 if (abnormalCount >= ABNORMAL_DATA_CONFIRM_COUNT) {
-                    log.warn("连续异常数据 - 设备:{}, 测点:{}, 连续{}次异常, 当前差值:%.2f",
-                        deviceCode, pointId, abnormalCount, difference);
+                    log.warn("连续异常数据 - 设备:{}, 测点:{}, 连续{}次异常, 当前差值:%.2f", deviceCode, pointId,
+                        abnormalCount, difference);
                     // 重置计数
                     redisService.setCacheMapValue(deviceCode, abnormalKey, "0");
                 }
-            } else {
+            }
+            else {
                 // 数据正常,清除异常计数
                 String abnormalKey = "ABNORMAL_COUNT_" + pointId;
                 redisService.setCacheMapValue(deviceCode, abnormalKey, "0");
@@ -734,7 +808,8 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
 
             return DataValidationResult.valid(newValue);
 
-        } catch (NumberFormatException e) {
+        }
+        catch (NumberFormatException e) {
             return DataValidationResult.invalid("数据格式错误: " + e.getMessage());
         }
     }
@@ -769,7 +844,9 @@ public class InDoorEnergyHandler extends BaseMeterDevHandler {
      */
     private static class DataValidationResult {
         private final boolean valid;
+
         private final String validValue;
+
         private final String reason;
 
         private DataValidationResult(boolean valid, String validValue, String reason) {

+ 4 - 4
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/handle/Keka86BsHandler.java

@@ -54,7 +54,6 @@ public class Keka86BsHandler extends BaseDevHandler {
     // 设备模型代码
     private static final String MODE_CODE = "M_W2_QS_KEKA_86";
 
-
     @Override
     public CallResponse<Void> call(AbilityPayload abilityParam) {
         CallResponse<Void> callResponse = null;
@@ -62,7 +61,8 @@ public class Keka86BsHandler extends BaseDevHandler {
         // 获取协议属性
         List<EmsObjAttrValue> attrList = objAttrValueService.selectByObjCode(MODE_CODE, abilityParam.getObjCode());
         Assert.notEmpty(attrList, -1, "设备协议属性未配置!");
-        Map<String, String> attrMap = attrList.stream().collect(Collectors.toMap(EmsObjAttrValue::getAttrKey,EmsObjAttrValue::getAttrValue));
+        Map<String, String> attrMap = attrList.stream()
+            .collect(Collectors.toMap(EmsObjAttrValue::getAttrKey, EmsObjAttrValue::getAttrValue));
 
         String gatewayId = attrMap.get("gatewayId");
 
@@ -74,7 +74,6 @@ public class Keka86BsHandler extends BaseDevHandler {
         return callResponse;
     }
 
-
     @Override
     public List<EmsDevice> getDeviceList() {
         QueryDevice queryDevice = new QueryDevice();
@@ -87,7 +86,8 @@ public class Keka86BsHandler extends BaseDevHandler {
      * <br/>每小时执行一次,扫描2个小时无消息的设备,标记为离线状态
      */
     @Override
-    public void refreshOnline(long threshold) {
+    public void refreshOnline() {
+        long threshold = 2 * 60 * 60 * 1000;
         long currentTime = new Date().getTime();
 
         List<EmsDevice> deviceList = getDeviceList();

+ 40 - 0
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/AppLoginReq.java

@@ -0,0 +1,40 @@
+/*
+ * 文 件 名:  AppLoginReq
+ * 版    权:  华设设计集团股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2025/9/15
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.model.slightctl;
+
+import lombok.Data;
+
+/**
+ * 登录请求
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2025/9/15]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+@Data
+public class AppLoginReq {
+    // 登录类型3:账号密码
+    private int loginType;
+
+    // 客户端id
+    private String clientId;
+
+    // 用户名
+    private String username;
+
+    // 用户密码
+    private String password;
+
+    // 租户固定1
+    private String tenantId;
+}

+ 46 - 0
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/AppLoginRes.java

@@ -0,0 +1,46 @@
+/*
+ * 文 件 名:  AppLoginRes
+ * 版    权:  华设设计集团股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2025/9/15
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.model.slightctl;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import lombok.Data;
+
+/**
+ * 登录响应
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2025/9/15]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+@Data
+public class AppLoginRes {
+    public String scope;
+
+    @JSONField(name = "openid")
+    public String openId;
+
+    @JSONField(name = "access_token")
+    public String accessToken;
+
+    @JSONField(name = "refresh_token")
+    public String refreshToken;
+
+    @JSONField(name = "expire_in")
+    public Long expireIn;
+
+    @JSONField(name = "refresh_expire_in")
+    public String refreshExpireIn;
+
+    @JSONField(name = "client_id")
+    public String clientId;
+}

+ 50 - 0
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/SlcDevice.java

@@ -0,0 +1,50 @@
+/*
+ * 文 件 名:  SlcDevice
+ * 版    权:  华设设计集团股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2025/9/15
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.model.slightctl;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 广场灯控设备
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2025/9/15]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+@Data
+public class SlcDevice {
+    // 设备id设备名称
+    private String deviceName;
+    // 设备id
+    private String deviceId;
+    // 设备sn号
+    private String deviceUid;
+    // 设备状态 0离线1在线
+    private Integer status;
+    // 信号强度
+    private String csq;
+    // 0正常,1异常
+    private Integer abnormal;
+    // 图片
+    private String imageUrl;
+    // 数据更新时间
+    private String lastReportTime;
+    // 设备型号id
+    private String deviceModelId;
+    private Integer deviceCode;
+    private Integer minCct;
+    private Integer maxCct;
+    private List<SlcDeviceLamp> lampList;
+}

+ 40 - 0
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/SlcDeviceLamp.java

@@ -0,0 +1,40 @@
+/*
+ * 文 件 名:  SlcDeviceLamp
+ * 版    权:  华设设计集团股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2025/9/15
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.model.slightctl;
+
+import lombok.Data;
+
+/**
+ * 设备灯组
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2025/9/15]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+@Data
+public class SlcDeviceLamp {
+    // 灯具编号
+    private String lampNo;
+
+    // 灯开关状态 0关1开2关灯中3开灯中
+    private Integer lampOnOff;
+
+    // 功率w
+    private String power;
+
+    // 色温
+    private Integer cct;
+
+    // 亮度百分比
+    private Integer lampBright;
+}

+ 42 - 0
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/SlcProject.java

@@ -0,0 +1,42 @@
+/*
+ * 文 件 名:  SlcProject
+ * 版    权:  华设设计集团股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2025/9/15
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.model.slightctl;
+
+import lombok.Data;
+
+/**
+ * 灯控项目空间
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2025/9/15]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+@Data
+public class SlcProject {
+    // 项目id
+    private String projectId;
+    // 项目名称
+    private String projectName;
+    // 项目地址
+    private String projectAddress;
+    // 项目子空间数量
+    private Integer projectSubsetNum;
+    // 项目设备数量
+    private Integer projectDeviceNum;
+    // 项目描述
+    private String remark;
+    // 创建时间
+    private String createTime;
+    // 项目类型
+    private String type;
+}

+ 29 - 0
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/SlcProjectSubset.java

@@ -0,0 +1,29 @@
+/*
+ * 文 件 名:  SlcProjectSubset
+ * 版    权:  华设设计集团股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2025/9/15
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.model.slightctl;
+
+import lombok.Data;
+
+/**
+ * 项目分组
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2025/9/15]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+@Data
+public class SlcProjectSubset {
+    private String subsetId;
+    private String subsetDeviceNum;
+    private String subsetName;
+}

+ 35 - 0
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/model/slightctl/SlcResponse.java

@@ -0,0 +1,35 @@
+/*
+ * 文 件 名:  Response
+ * 版    权:  华设设计集团股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2025/9/15
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.model.slightctl;
+
+import lombok.Data;
+
+/**
+ * 广场灯控平台响应
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2025/9/15]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+@Data
+public class SlcResponse {
+    private int code;
+
+    private String msg;
+
+    private String data;
+
+    private Integer total;
+
+    private String rows;
+}

+ 86 - 0
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/retrofit/SquareLightCtlApi.java

@@ -0,0 +1,86 @@
+/*
+ * 文 件 名:  SquareLightCtlApi
+ * 版    权:  华设设计集团股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2025/9/15
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.retrofit;
+
+import com.ruoyi.ems.model.slightctl.AppLoginReq;
+import retrofit2.Call;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.POST;
+import retrofit2.http.Query;
+
+/**
+ * 广场灯控接口
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2025/9/15]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+public interface SquareLightCtlApi {
+    /**
+     * 登陆
+     *
+     * @param req 请求body
+     * @return 登录响应
+     */
+    @Headers({ "tenantId: 1", "Content-Type: application/json" })
+    @POST("/light-cloud/app/auth/appLogin")
+    Call<String> appLogin(@Body AppLoginReq req);
+
+    /**
+     * 获取项目列表
+     *
+     * @param clientId      客户端id
+     * @param authorization 认证信息
+     * @param pageNum       页码
+     * @param pageSize      每页记录数
+     * @return 项目列表
+     */
+    @Headers({ "tenantId: 1", "Content-Type: application/json" })
+    @GET("/light-cloud/app/project/list")
+    Call<String> getProjectList(@Header("clientId") String clientId, @Header("Authorization") String authorization,
+        @Query("pageNum") int pageNum, @Query("pageSize") int pageSize);
+
+    /**
+     * 获取项目分组列表
+     *
+     * @param clientId      客户端id
+     * @param authorization 认证信息
+     * @param projectId     项目ID
+     * @param pageNum       页码
+     * @param pageSize      每页记录数
+     * @return 项目列表
+     */
+    @Headers({ "tenantId: 1", "Content-Type: application/json" })
+    @GET("/light-cloud/app/projectSubset/list")
+    Call<String> getProjectSubsetList(@Header("clientId") String clientId,
+        @Header("Authorization") String authorization, @Query("projectId") String projectId,
+        @Query("pageNum") int pageNum, @Query("pageSize") int pageSize);
+
+    /**
+     * 获取项目分组列表
+     *
+     * @param clientId      客户端id
+     * @param authorization 认证信息
+     * @param projectId     项目ID
+     * @param pageNum       页码
+     * @param pageSize      每页记录数
+     * @return 项目列表
+     */
+    @Headers({ "tenantId: 1", "Content-Type: application/json" })
+    @GET("/light-cloud/app/device/list")
+    Call<String> getDeviceList(@Header("clientId") String clientId, @Header("projectId") String projectId,
+        @Header("Authorization") String authorization, @Query("pageNum") int pageNum, @Query("pageSize") int pageSize);
+}

+ 134 - 0
ems/ems-cloud/ems-dev-adapter/src/main/java/com/ruoyi/ems/util/PingUtils.java

@@ -0,0 +1,134 @@
+/*
+ * 文 件 名:  PingUtils
+ * 版    权:  华设设计集团股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2025/9/18
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.ruoyi.ems.util;
+
+import lombok.extern.slf4j.Slf4j;
+
+import java.net.InetAddress;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Ping工具
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2025/9/18]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+@Slf4j
+public abstract class PingUtils {
+    /**
+     * 从URL中提取IP地址
+     *
+     * @param url 完整URL,如 http://172.17.50.186:80
+     * @return IP地址
+     */
+    public static String extractIpFromUrl(String url) {
+        try {
+            // 去除协议前缀
+            String temp = url;
+            if (url.startsWith("http://")) {
+                temp = url.substring(7);
+            }
+            else if (url.startsWith("https://")) {
+                temp = url.substring(8);
+            }
+
+            // 提取IP部分(去除端口)
+            int colonIndex = temp.indexOf(':');
+            int slashIndex = temp.indexOf('/');
+
+            if (colonIndex > 0) {
+                return temp.substring(0, colonIndex);
+            }
+            else if (slashIndex > 0) {
+                return temp.substring(0, slashIndex);
+            }
+            else {
+                return temp;
+            }
+        }
+        catch (Exception e) {
+            log.error("提取IP地址失败: {}", url, e);
+            return null;
+        }
+    }
+
+    /**
+     * Ping指定主机
+     *
+     * @param host    IP地址或主机名
+     * @param timeout 超时时间(毫秒)
+     * @return true=可达,false=不可达
+     */
+    public static boolean pingHost(String host, int timeout) {
+        try {
+            // 方式1:使用Java内置的InetAddress.isReachable
+            InetAddress address = InetAddress.getByName(host);
+            boolean reachable = address.isReachable(timeout);
+
+            // 方式2:如果需要更准确的ping,可以使用系统命令
+            if (!reachable && isWindows()) {
+                reachable = pingByCommand(host, timeout);
+            }
+
+            return reachable;
+        }
+        catch (Exception e) {
+            log.error("Ping主机失败: {}", host, e);
+            return false;
+        }
+    }
+
+    /**
+     * 通过系统命令执行ping
+     *
+     * @param host    IP地址
+     * @param timeout 超时时间(毫秒)
+     * @return true=可达,false=不可达
+     */
+    public static boolean pingByCommand(String host, int timeout) {
+        try {
+            String command;
+            if (isWindows()) {
+                // Windows: ping -n 1 -w timeout host
+                command = String.format("ping -n 1 -w %d %s", timeout, host);
+            }
+            else {
+                // Linux/Unix: ping -c 1 -W timeout host
+                command = String.format("ping -c 1 -W %d %s", timeout / 1000, host);
+            }
+
+            Process process = Runtime.getRuntime().exec(command);
+            boolean finished = process.waitFor(timeout + 1000, TimeUnit.MILLISECONDS);
+
+            if (!finished) {
+                process.destroyForcibly();
+                return false;
+            }
+
+            return process.exitValue() == 0;
+        }
+        catch (Exception e) {
+            log.error("执行ping命令失败: {}", host, e);
+            return false;
+        }
+    }
+
+    /**
+     * 判断是否Windows系统
+     */
+    private static boolean isWindows() {
+        String os = System.getProperty("os.name").toLowerCase();
+        return os.contains("win");
+    }
+}

+ 11 - 1
ems/ems-cloud/ems-dev-adapter/src/main/resources/application-local.yml

@@ -45,7 +45,7 @@ spring:
 
 mqtt:
   server:
-    host: tcp://xt.wenhq.top:8581
+    host: tcp://192.168.20.210:1883
     client_id: ems-dev-adapter1
   executor:
     msgHandle:
@@ -55,14 +55,24 @@ mqtt:
       namePrefix: 'mqttHandle-'
 
 adapter:
+  # 安科瑞
   acrel:
     url: http://116.236.149.165:8092
     auth:
       loginName: guest
       password: 123456
+  # 室内能耗
   id-energy:
     url: http://127.0.0.1:8093
     appId: httpsjy
+  # 广场照明控制
+  square-lighting-ctl:
+    url: http://127.0.0.1:8686
+    project-id: 1948750398922747906
+    client-id: 5fa30d0e6c8245d550df634eb0cbc326
+    user-name: developer3
+    password: dev@admin123
+    tenant-id: 1
 
 # mybatis配置
 mybatis:

+ 10 - 0
ems/ems-cloud/ems-dev-adapter/src/main/resources/application-prod-ct.yml

@@ -55,14 +55,24 @@ mqtt:
       namePrefix: 'mqttHandle-'
 
 adapter:
+  # 安科瑞
   acrel:
     url: http://172.61.55.66:8092
     auth:
       loginName: guest
       password: 123456
+  # 室内能耗
   id-energy:
     url: http://172.17.50.186:80
     appId: httpsjy
+  # 广场照明控制
+  square-lighting-ctl:
+    url: http://172.17.60.30:8686
+    project-id: 1948750398922747906
+    client-id: 5fa30d0e6c8245d550df634eb0cbc326
+    user-name: developer3
+    password: dev@admin123
+    tenant-id: 1
 
 # mybatis配置
 mybatis:

+ 78 - 0
ems/ems-cloud/ems-dev-adapter/src/test/java/com/huashe/test/SquareLightCtlTest.java

@@ -0,0 +1,78 @@
+/*
+ * 文 件 名:  SquareLightCtlTest
+ * 版    权:  华设设计集团股份有限公司
+ * 描    述:  <描述>
+ * 修 改 人:  lvwenbin
+ * 修改时间:  2025/9/15
+ * 跟踪单号:  <跟踪单号>
+ * 修改单号:  <修改单号>
+ * 修改内容:  <修改内容>
+ */
+package com.huashe.test;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.ruoyi.ems.EmsDevAdpApplication;
+import com.ruoyi.ems.config.SquareLightCtlConfig;
+import com.ruoyi.ems.core.SquareLightCtlTemplate;
+import com.ruoyi.ems.model.slightctl.AppLoginRes;
+import com.ruoyi.ems.model.slightctl.SlcDevice;
+import com.ruoyi.ems.model.slightctl.SlcProject;
+import com.ruoyi.ems.model.slightctl.SlcProjectSubset;
+import lombok.extern.slf4j.Slf4j;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.util.List;
+
+/**
+ * 广场灯控测试
+ * <功能详细描述>
+ *
+ * @author lvwenbin
+ * @version [版本号, 2025/9/15]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+@Slf4j
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = EmsDevAdpApplication.class)
+public class SquareLightCtlTest {
+    @Autowired
+    private SquareLightCtlConfig config;
+
+    @Test
+    public void testAppLogin() {
+        SquareLightCtlTemplate template = new SquareLightCtlTemplate(config.getUrl());
+        AppLoginRes res = template.appLogin(config);
+        log.info("login res: {}", res.accessToken);
+        Assert.assertNotNull(res);
+    }
+
+    @Test
+    public void testGetProjectList() {
+        SquareLightCtlTemplate template = new SquareLightCtlTemplate(config.getUrl());
+        List<SlcProject> list = template.getProjectList(1, 10);
+        log.info("ProjectList: {}", JSONObject.toJSONString(list));
+        Assert.assertNotNull(list);
+    }
+
+    @Test
+    public void testGetProjectSubsetList() {
+        SquareLightCtlTemplate template = new SquareLightCtlTemplate(config.getUrl());
+        List<SlcProjectSubset> list = template.getProjectSubsetList("1948750398922747906", 1, 10);
+        log.info("ProjectSubsetList: {}", JSONObject.toJSONString(list));
+        Assert.assertNotNull(list);
+    }
+
+    @Test
+    public void testGetDeviceList() {
+        SquareLightCtlTemplate template = new SquareLightCtlTemplate(config.getUrl());
+        List<SlcDevice> list = template.getDeviceList("1948750398922747906");
+        log.info("DeviceList: {}", JSONObject.toJSONString(list));
+        Assert.assertNotNull(list);
+    }
+}

+ 2 - 2
ems/ems-cloud/ems-server/src/main/java/com/ruoyi/ems/controller/ChargingBillController.java

@@ -56,7 +56,7 @@ public class ChargingBillController extends BaseController {
     /**
      * 查询总览数据
      */
-    //@RequiresPermissions("ems:charging:list")
+    @RequiresPermissions("ems:charging:list")
     @GetMapping("/overview/list")
     @ApiOperation("查询总览数据")
     public AjaxResult getOverviewList(QueryChargingBill queryParam) {
@@ -73,7 +73,7 @@ public class ChargingBillController extends BaseController {
     /**
      * 查询个户综合账单
      */
-    //@RequiresPermissions("ems:charging:list")
+    @RequiresPermissions("ems:charging:list")
     @GetMapping("/seller")
     @ApiOperation("查询商户用能账单")
     public AjaxResult getIndividualBill(QueryChargingBill queryParam) {

+ 1 - 2
ems/ems-cloud/ems-server/src/main/java/com/ruoyi/ems/controller/EmsObjAbilityController.java

@@ -49,8 +49,7 @@ public class EmsObjAbilityController extends BaseController {
         AjaxResult ajaxResult = null;
 
         try {
-            String ret = abilityCallService.devAbilityCall(abilityPayload.getObjCode(), abilityPayload.getAbilityKey(),
-                abilityPayload.getAbilityParam());
+            String ret = abilityCallService.devAbilityCall(abilityPayload);
             ajaxResult = success(ret);
         }
         catch (BusinessException e) {

+ 0 - 36
ems/ems-cloud/ems-server/src/main/java/com/ruoyi/ems/controller/EmsObjLogController.java

@@ -3,27 +3,15 @@ package com.ruoyi.ems.controller;
 import com.huashe.common.domain.AjaxResult;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.ems.domain.ElecAttr;
 import com.ruoyi.ems.domain.EmsObjAbilityCallLog;
 import com.ruoyi.ems.domain.EmsObjEventLog;
-import com.ruoyi.ems.domain.EmsObjReportLog;
-import com.ruoyi.ems.service.IElecAttrService;
 import com.ruoyi.ems.service.IEmsObjAbilityCallLogService;
 import com.ruoyi.ems.service.IEmsObjEventLogService;
-import com.ruoyi.ems.service.IEmsObjReportLogService;
 import io.swagger.annotations.Api;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
@@ -39,12 +27,6 @@ import java.util.List;
 @Api(value = "EmsObjLogController", description = "能源对象日志服务")
 public class EmsObjLogController extends BaseController {
     /**
-     * 上报日志
-     */
-    @Autowired
-    private IEmsObjReportLogService reportLogService;
-
-    /**
      * 事件日志
      */
     @Autowired
@@ -59,24 +41,6 @@ public class EmsObjLogController extends BaseController {
     /**
      * 获取上报日志详细
      */
-    @GetMapping(value = "/reportLog/{id}")
-    public AjaxResult getReportLogInfo(@PathVariable("id") Long id) {
-        return success(reportLogService.selectLogById(id));
-    }
-
-    /**
-     * 查询上报日志列表
-     */
-    @GetMapping("/reportLog/list")
-    public TableDataInfo listReportLog(EmsObjReportLog param) {
-        startPage();
-        List<EmsObjReportLog> list = reportLogService.selectLog(param);
-        return getDataTable(list);
-    }
-
-    /**
-     * 获取上报日志详细
-     */
     @GetMapping(value = "/eventLog/{id}")
     public AjaxResult getEventLogInfo(@PathVariable("id") Long id) {
         return success(eventLogService.selectLogById(id));

+ 13 - 30
ems/ems-cloud/ems-server/src/main/java/com/ruoyi/ems/controller/EmsSubsystemController.java

@@ -1,7 +1,6 @@
 package com.ruoyi.ems.controller;
 
 import com.huashe.common.domain.AjaxResult;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.log.annotation.Log;
@@ -18,9 +17,9 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
 /**
@@ -32,8 +31,7 @@ import java.util.List;
 @RestController
 @RequestMapping("/subsystem")
 @Api(value = "EmsSubsystemController", description = "能源子系统管理")
-public class EmsSubsystemController extends BaseController
-{
+public class EmsSubsystemController extends BaseController {
     @Autowired
     private IEmsSubsystemService emsSubsystemService;
 
@@ -41,8 +39,7 @@ public class EmsSubsystemController extends BaseController
      * 查询能源子系统列表
      */
     @GetMapping("/list")
-    public TableDataInfo list(EmsSubsystem emsSubsystem)
-    {
+    public TableDataInfo list(EmsSubsystem emsSubsystem) {
         startPage();
         List<EmsSubsystem> list = emsSubsystemService.selectEmsSubsystemList(emsSubsystem);
         return getDataTable(list);
@@ -52,23 +49,13 @@ public class EmsSubsystemController extends BaseController
      * 查询能源子系统列表
      */
     @GetMapping("/listAll")
-    public AjaxResult listAll(EmsSubsystem emsSubsystem)
-    {
-        return success( emsSubsystemService.selectEmsSubsystemList(emsSubsystem));
+    public AjaxResult listAll(EmsSubsystem emsSubsystem) {
+        return success(emsSubsystemService.selectEmsSubsystemList(emsSubsystem));
     }
 
-
-    /**
-     * 导出能源子系统列表
-     */
-    @RequiresPermissions("adapter:subsystem:export")
-    @Log(title = "能源子系统", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, EmsSubsystem emsSubsystem)
-    {
-        List<EmsSubsystem> list = emsSubsystemService.selectEmsSubsystemList(emsSubsystem);
-        ExcelUtil<EmsSubsystem> util = new ExcelUtil<EmsSubsystem>(EmsSubsystem.class);
-        util.exportExcel(response, list, "能源子系统数据");
+    @GetMapping("/getByCode")
+    public AjaxResult getByCode(@RequestParam(name = "systemCode") String systemCode) {
+        return success(emsSubsystemService.selectEmsSubsystemByCode(systemCode));
     }
 
     /**
@@ -76,8 +63,7 @@ public class EmsSubsystemController extends BaseController
      */
     @RequiresPermissions("adapter:subsystem:query")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(emsSubsystemService.selectEmsSubsystemById(id));
     }
 
@@ -87,8 +73,7 @@ public class EmsSubsystemController extends BaseController
     @RequiresPermissions("adapter:subsystem:add")
     @Log(title = "能源子系统", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody EmsSubsystem emsSubsystem)
-    {
+    public AjaxResult add(@RequestBody EmsSubsystem emsSubsystem) {
         return toAjax(emsSubsystemService.insertEmsSubsystem(emsSubsystem));
     }
 
@@ -98,8 +83,7 @@ public class EmsSubsystemController extends BaseController
     @RequiresPermissions("adapter:subsystem:edit")
     @Log(title = "能源子系统", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody EmsSubsystem emsSubsystem)
-    {
+    public AjaxResult edit(@RequestBody EmsSubsystem emsSubsystem) {
         return toAjax(emsSubsystemService.updateEmsSubsystem(emsSubsystem));
     }
 
@@ -108,9 +92,8 @@ public class EmsSubsystemController extends BaseController
      */
     @RequiresPermissions("adapter:subsystem:remove")
     @Log(title = "能源子系统", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(emsSubsystemService.deleteEmsSubsystemByIds(ids));
     }
 }

+ 5 - 95
ems/ems-core/src/main/java/com/ruoyi/ems/domain/EmsObjAbilityCallLog.java

@@ -1,8 +1,11 @@
 package com.ruoyi.ems.domain;
 
 import java.util.Date;
+import java.util.List;
+
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.huashe.common.domain.BaseEntity;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
@@ -13,6 +16,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
  * @author ruoyi
  * @date 2025-02-27
  */
+@Data
 public class EmsObjAbilityCallLog extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -51,101 +55,7 @@ public class EmsObjAbilityCallLog extends BaseEntity
     /** 响应内容 */
     private String resPayload;
 
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getObjCode() {
-        return objCode;
-    }
-
-    public void setObjCode(String objCode) {
-        this.objCode = objCode;
-    }
-
-    public String getObjName() {
-        return objName;
-    }
-
-    public void setObjName(String objName) {
-        this.objName = objName;
-    }
-
-    public String getModelCode() {
-        return modelCode;
-    }
-
-    public void setModelCode(String modelCode) {
-        this.modelCode = modelCode;
-    }
-
-    public String getModelName() {
-        return modelName;
-    }
-
-    public void setModelName(String modelName) {
-        this.modelName = modelName;
-    }
-
-    public String getAbilityKey() {
-        return abilityKey;
-    }
-
-    public void setAbilityKey(String abilityKey) {
-        this.abilityKey = abilityKey;
-    }
-
-    public String getAbilityName() {
-        return abilityName;
-    }
-
-    public void setAbilityName(String abilityName) {
-        this.abilityName = abilityName;
-    }
-
-    public Date getCallTime() {
-        return callTime;
-    }
-
-    public void setCallTime(Date callTime) {
-        this.callTime = callTime;
-    }
-
-    public String getCallPayload() {
-        return callPayload;
-    }
-
-    public void setCallPayload(String callPayload) {
-        this.callPayload = callPayload;
-    }
-
-    public Integer getCallStatus() {
-        return callStatus;
-    }
-
-    public void setCallStatus(Integer callStatus) {
-        this.callStatus = callStatus;
-    }
-
-    public Date getResTime() {
-        return resTime;
-    }
-
-    public void setResTime(Date resTime) {
-        this.resTime = resTime;
-    }
-
-    public String getResPayload() {
-        return resPayload;
-    }
-
-    public void setResPayload(String resPayload) {
-        this.resPayload = resPayload;
-    }
+    private transient List<String> modelCodes;
 
     @Override
     public String toString() {

+ 10 - 64
ems/ems-core/src/main/java/com/ruoyi/ems/domain/EmsObjEventLog.java

@@ -2,10 +2,12 @@ package com.ruoyi.ems.domain;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.huashe.common.domain.BaseEntity;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * 能源对象上报日志表 adm_ems_obj_report_log
@@ -13,6 +15,7 @@ import java.util.Date;
  * @author ruoyi
  * @date 2025-02-27
  */
+@Data
 public class EmsObjEventLog extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
@@ -29,11 +32,16 @@ public class EmsObjEventLog extends BaseEntity {
     private String objName;
 
     /**
-     * 对象
+     * 对象
      */
     private String modelCode;
 
     /**
+     * 模型名称
+     */
+    private String modelName;
+
+    /**
      * 事件标识
      */
     private String eventKey;
@@ -51,69 +59,7 @@ public class EmsObjEventLog extends BaseEntity {
      */
     private String eventDetail;
 
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getObjCode() {
-        return objCode;
-    }
-
-    public void setObjCode(String objCode) {
-        this.objCode = objCode;
-    }
-
-    public String getObjName() {
-        return objName;
-    }
-
-    public void setObjName(String objName) {
-        this.objName = objName;
-    }
-
-    public String getModelCode() {
-        return modelCode;
-    }
-
-    public void setModelCode(String modelCode) {
-        this.modelCode = modelCode;
-    }
-
-    public String getEventKey() {
-        return eventKey;
-    }
-
-    public void setEventKey(String eventKey) {
-        this.eventKey = eventKey;
-    }
-
-    public String getEventName() {
-        return eventName;
-    }
-
-    public void setEventName(String eventName) {
-        this.eventName = eventName;
-    }
-
-    public Date getEventTime() {
-        return eventTime;
-    }
-
-    public void setEventTime(Date eventTime) {
-        this.eventTime = eventTime;
-    }
-
-    public String getEventDetail() {
-        return eventDetail;
-    }
-
-    public void setEventDetail(String eventDetail) {
-        this.eventDetail = eventDetail;
-    }
+    private transient List<String> modelCodes;
 
     @Override
     public String toString() {

+ 3 - 3
ems/ems-core/src/main/java/com/ruoyi/ems/domain/EmsObjModel.java

@@ -26,7 +26,7 @@ public class EmsObjModel extends BaseEntity
     private String modelName;
 
     /** 对象类型 */
-    private Long objType;
+    private Integer objType;
 
     /** 对象能力处理 */
     private String abilityHandler;
@@ -67,12 +67,12 @@ public class EmsObjModel extends BaseEntity
     {
         return modelName;
     }
-    public void setObjType(Long objType) 
+    public void setObjType(Integer objType)
     {
         this.objType = objType;
     }
 
-    public Long getObjType() 
+    public Integer getObjType()
     {
         return objType;
     }

+ 0 - 118
ems/ems-core/src/main/java/com/ruoyi/ems/domain/EmsObjReportLog.java

@@ -1,118 +0,0 @@
-package com.ruoyi.ems.domain;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.huashe.common.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-import java.util.Date;
-
-/**
- * 能源对象上报日志表 adm_ems_obj_report_log
- *
- * @author ruoyi
- * @date 2025-02-27
- */
-public class EmsObjReportLog extends BaseEntity {
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 序号
-     */
-    private Long id;
-
-    /**
-     * 对象代码
-     */
-    private String objCode;
-
-    private String objName;
-
-    /**
-     * 对象类型
-     */
-    private String modelCode;
-
-    /**
-     * 消息描述
-     */
-    private String msgDesc;
-
-    /**
-     * 响应时间
-     */
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date reportTime;
-
-    /**
-     * 响应内容
-     */
-    private String reportPayload;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getObjCode() {
-        return objCode;
-    }
-
-    public void setObjCode(String objCode) {
-        this.objCode = objCode;
-    }
-
-    public String getObjName() {
-        return objName;
-    }
-
-    public void setObjName(String objName) {
-        this.objName = objName;
-    }
-
-    public String getModelCode() {
-        return modelCode;
-    }
-
-    public void setModelCode(String modelCode) {
-        this.modelCode = modelCode;
-    }
-
-    public String getMsgDesc() {
-        return msgDesc;
-    }
-
-    public void setMsgDesc(String msgDesc) {
-        this.msgDesc = msgDesc;
-    }
-
-    public Date getReportTime() {
-        return reportTime;
-    }
-
-    public void setReportTime(Date reportTime) {
-        this.reportTime = reportTime;
-    }
-
-    public String getReportPayload() {
-        return reportPayload;
-    }
-
-    public void setReportPayload(String reportPayload) {
-        this.reportPayload = reportPayload;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("objCode", getObjCode())
-            .append("modelCode", getModelCode())
-            .append("msgDesc", getMsgDesc())
-            .append("reportTime", getReportTime())
-            .append("reportPayload", getReportPayload()).toString();
-    }
-}

+ 4 - 100
ems/ems-core/src/main/java/com/ruoyi/ems/domain/EmsSubsystem.java

@@ -1,7 +1,7 @@
 package com.ruoyi.ems.domain;
 
-import com.huashe.common.annotation.Excel;
 import com.huashe.common.domain.BaseEntity;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
@@ -11,6 +11,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
  * @author ruoyi
  * @date 2024-08-16
  */
+@Data
 public class EmsSubsystem extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -19,131 +20,33 @@ public class EmsSubsystem extends BaseEntity
     private Long id;
 
     /** 系统代码 */
-    @Excel(name = "系统代码")
     private String systemCode;
 
     /** 系统名称 */
-    @Excel(name = "系统名称")
     private String systemName;
 
     /** 系统简称 */
-    @Excel(name = "系统简称")
     private String shortName;
 
     /** 厂商 */
-    @Excel(name = "厂商")
     private String manFacturer;
 
     /** 联系人 */
-    @Excel(name = "联系人")
     private String contactPerson;
 
     /** 联系电话 */
-    @Excel(name = "联系电话")
     private String contactNumber;
 
     /** 维护人 */
-    @Excel(name = "维护人")
     private String maintainerPerson;
 
     /** 维护电话 */
-    @Excel(name = "维护电话")
     private String maintainerNumber;
 
     /** 备注说明 */
-    @Excel(name = "备注说明")
     private String descr;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setSystemCode(String systemCode) 
-    {
-        this.systemCode = systemCode;
-    }
-
-    public String getSystemCode() 
-    {
-        return systemCode;
-    }
-    public void setSystemName(String systemName) 
-    {
-        this.systemName = systemName;
-    }
-
-    public String getSystemName() 
-    {
-        return systemName;
-    }
-    public void setShortName(String shortName) 
-    {
-        this.shortName = shortName;
-    }
-
-    public String getShortName() 
-    {
-        return shortName;
-    }
-    public void setManFacturer(String manFacturer) 
-    {
-        this.manFacturer = manFacturer;
-    }
-
-    public String getManFacturer() 
-    {
-        return manFacturer;
-    }
-    public void setContactPerson(String contactPerson) 
-    {
-        this.contactPerson = contactPerson;
-    }
-
-    public String getContactPerson() 
-    {
-        return contactPerson;
-    }
-    public void setContactNumber(String contactNumber) 
-    {
-        this.contactNumber = contactNumber;
-    }
-
-    public String getContactNumber() 
-    {
-        return contactNumber;
-    }
-    public void setMaintainerPerson(String maintainerPerson) 
-    {
-        this.maintainerPerson = maintainerPerson;
-    }
-
-    public String getMaintainerPerson() 
-    {
-        return maintainerPerson;
-    }
-    public void setMaintainerNumber(String maintainerNumber) 
-    {
-        this.maintainerNumber = maintainerNumber;
-    }
-
-    public String getMaintainerNumber() 
-    {
-        return maintainerNumber;
-    }
-    public void setDescr(String descr) 
-    {
-        this.descr = descr;
-    }
-
-    public String getDescr() 
-    {
-        return descr;
-    }
+    private String modelCode;
 
     @Override
     public String toString() {
@@ -158,6 +61,7 @@ public class EmsSubsystem extends BaseEntity
             .append("maintainerPerson", getMaintainerPerson())
             .append("maintainerNumber", getMaintainerNumber())
             .append("descr", getDescr())
+            .append("modelCode", getModelCode())
             .toString();
     }
 }

+ 2 - 4
ems/ems-core/src/main/java/com/ruoyi/ems/enums/DevObjType.java

@@ -20,12 +20,10 @@ package com.ruoyi.ems.enums;
  * @since [产品/模块版本]
  */
 public enum DevObjType {
-    // 设施
-    FACS(1),
     // 设备
     DEVC(2),
-    // 部件
-    COMPONENT(3);
+    // 系统
+    SYSTEM(3);
 
     DevObjType(int code) {
         this.code = code;

+ 17 - 2
ems/ems-core/src/main/java/com/ruoyi/ems/mapper/EmsObjAttrValueMapper.java

@@ -21,6 +21,17 @@ public interface EmsObjAttrValueMapper {
     EmsObjAttrValue selectObjAttrValueById(Long id);
 
     /**
+     * 查询能源对象属性值
+     *
+     * @param modelCode 对象模型
+     * @param objCode   对象代码
+     * @param attrKey   属性key
+     * @return 能源对象属性值
+     */
+    EmsObjAttrValue selectObjAttrValue(@Param("modelCode") String modelCode, @Param("objCode") String objCode,
+        @Param("attrKey") String attrKey);
+
+    /**
      * 查询能源对象属性值列表
      *
      * @param objAttrValue 能源对象属性值
@@ -48,10 +59,14 @@ public interface EmsObjAttrValueMapper {
     /**
      * 更新能源对象属性值
      *
-     * @param objAttrValue 能源对象属性值
+     * @param modelCode 对象模型
+     * @param objCode   对象代码
+     * @param attrKey   属性key
+     * @param attrValue 属性值
      * @return 结果
      */
-    int updateObjAttrValue(EmsObjAttrValue objAttrValue);
+    int updateObjAttrValue(@Param("modelCode") String modelCode, @Param("objCode") String objCode,
+        @Param("attrKey") String attrKey, @Param("attrValue") String attrValue);
 
     /**
      * 批量新增能源对象属性值

+ 0 - 37
ems/ems-core/src/main/java/com/ruoyi/ems/mapper/EmsObjReportLogMapper.java

@@ -1,37 +0,0 @@
-package com.ruoyi.ems.mapper;
-
-import com.ruoyi.ems.domain.EmsObjReportLog;
-
-import java.util.List;
-
-/**
- * 能源对象能力调用日志Mapper接口
- *
- * @author ruoyi
- * @date 2025-02-27
- */
-public interface EmsObjReportLogMapper {
-    /**
-     * 查询能源对象能力调用日志
-     *
-     * @param id 能源对象能力调用日志主键
-     * @return 能源对象能力调用日志
-     */
-    EmsObjReportLog selectLogById(Long id);
-
-    /**
-     * 查询能源对象能力调用日志列表
-     *
-     * @param objReportLog 能源对象能力调用日志
-     * @return 能源对象能力调用日志集合
-     */
-    List<EmsObjReportLog> selectLog(EmsObjReportLog objReportLog);
-
-    /**
-     * 新增能源对象能力调用日志
-     *
-     * @param objReportLog 能源对象能力调用日志
-     * @return 结果
-     */
-    int insertLog(EmsObjReportLog objReportLog);
-}

+ 9 - 0
ems/ems-core/src/main/java/com/ruoyi/ems/mapper/EmsSubsystemMapper.java

@@ -1,6 +1,7 @@
 package com.ruoyi.ems.mapper;
 
 import com.ruoyi.ems.domain.EmsSubsystem;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -20,6 +21,14 @@ public interface EmsSubsystemMapper {
     EmsSubsystem selectEmsSubsystemById(Long id);
 
     /**
+     * 查询能源子系统
+     *
+     * @param systemCode 能源子系统主键
+     * @return 能源子系统
+     */
+    EmsSubsystem selectEmsSubsystemByCode(@Param("systemCode") String systemCode);
+
+    /**
      * 查询能源子系统列表
      *
      * @param emsSubsystem 能源子系统

+ 13 - 31
ems/ems-core/src/main/java/com/ruoyi/ems/model/AbilityPayload.java

@@ -10,6 +10,8 @@
  */
 package com.ruoyi.ems.model;
 
+import lombok.Data;
+
 /**
  * 能力调用
  * <功能详细描述>
@@ -19,6 +21,7 @@ package com.ruoyi.ems.model;
  * @see [相关类/方法]
  * @since [产品/模块版本]
  */
+@Data
 public class AbilityPayload {
     /**
      * 对象代码
@@ -26,9 +29,14 @@ public class AbilityPayload {
     private String objCode;
 
     /**
+     * 对象代码
+     */
+    private Integer objType;
+
+    /**
      * 模型代码
      */
-    private String modeCode;
+    private String modelCode;
 
     /**
      * 能力标识
@@ -40,35 +48,9 @@ public class AbilityPayload {
      */
     private String abilityParam;
 
-    public String getObjCode() {
-        return objCode;
-    }
-
-    public void setObjCode(String objCode) {
-        this.objCode = objCode;
-    }
-
-    public String getModeCode() {
-        return modeCode;
-    }
-
-    public void setModeCode(String modeCode) {
-        this.modeCode = modeCode;
-    }
-
-    public String getAbilityKey() {
-        return abilityKey;
-    }
-
-    public void setAbilityKey(String abilityKey) {
-        this.abilityKey = abilityKey;
-    }
-
-    public String getAbilityParam() {
-        return abilityParam;
-    }
-
-    public void setAbilityParam(String abilityParam) {
-        this.abilityParam = abilityParam;
+    @Override
+    public String toString() {
+        return "AbilityPayload{" + "objCode='" + objCode + '\'' + ", objType=" + objType + ", modeCode='" + modelCode
+            + '\'' + ", abilityKey='" + abilityKey + '\'' + ", abilityParam='" + abilityParam + '\'' + '}';
     }
 }

+ 4 - 13
ems/ems-core/src/main/java/com/ruoyi/ems/service/IAbilityCallService.java

@@ -10,6 +10,8 @@
  */
 package com.ruoyi.ems.service;
 
+import com.ruoyi.ems.model.AbilityPayload;
+
 /**
  * 设备调用服务
  * <功能详细描述>
@@ -22,19 +24,8 @@ package com.ruoyi.ems.service;
 public interface IAbilityCallService {
     /**
      * 设备能力调用
-     * @param objCode 设备编码
-     * @param abilityKey 能力键
-     * @param param 参数
-     * @return 返回结果
-     */
-    String devAbilityCall(String objCode, String abilityKey, String param);
-
-    /**
-     * 设施能力调用
-     * @param objCode 设备编码
-     * @param abilityKey 能力键
-     * @param param 参数
+     * @param abilityPayload 参数
      * @return 返回结果
      */
-    String facsAbilityCall(String objCode, String abilityKey, String param);
+    String devAbilityCall(AbilityPayload abilityPayload);
 }

+ 19 - 4
ems/ems-core/src/main/java/com/ruoyi/ems/service/IEmsObjAttrValueService.java

@@ -1,6 +1,7 @@
 package com.ruoyi.ems.service;
 
 import com.ruoyi.ems.domain.EmsObjAttrValue;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -20,6 +21,16 @@ public interface IEmsObjAttrValueService {
     EmsObjAttrValue selectObjAttrValueById(Long id);
 
     /**
+     * 查询能源对象属性值
+     *
+     * @param modelCode 对象模型
+     * @param objCode   对象代码
+     * @param attrKey   属性key
+     * @return 能源对象属性值
+     */
+    EmsObjAttrValue selectObjAttrValue(String modelCode, String objCode, String attrKey);
+
+    /**
      * 查询能源对象属性值列表
      *
      * @param objAttrValue 能源对象属性值
@@ -31,7 +42,7 @@ public interface IEmsObjAttrValueService {
      * 查询能源对象属性值列表
      *
      * @param modelCode 对象类型
-     * @param objCode 对象代码
+     * @param objCode   对象代码
      * @return 能源对象属性值集合
      */
     List<EmsObjAttrValue> selectByObjCode(String modelCode, String objCode);
@@ -46,10 +57,14 @@ public interface IEmsObjAttrValueService {
 
     /**
      * 更新能源对象属性值
-     * @param objAttrValue 能源对象属性
+     *
+     * @param modelCode 对象模型
+     * @param objCode   对象代码
+     * @param attrKey   属性key
+     * @param attrValue 属性值
      * @return 结果
      */
-    int updateObjAttrValue(EmsObjAttrValue objAttrValue);
+    int updateObjAttrValue(String modelCode, String objCode, String attrKey, String attrValue);
 
     /**
      * 批量新增能源对象属性值
@@ -79,7 +94,7 @@ public interface IEmsObjAttrValueService {
      * 删除能源对象属性值
      *
      * @param modelCode 对象模型
-     * @param objCode 对象代码
+     * @param objCode   对象代码
      * @return 结果
      */
     int deleteByObjCode(String modelCode, String objCode);

+ 0 - 1
ems/ems-core/src/main/java/com/ruoyi/ems/service/IEmsObjEventLogService.java

@@ -1,7 +1,6 @@
 package com.ruoyi.ems.service;
 
 import com.ruoyi.ems.domain.EmsObjEventLog;
-import com.ruoyi.ems.domain.EmsObjReportLog;
 
 import java.util.List;
 

+ 0 - 37
ems/ems-core/src/main/java/com/ruoyi/ems/service/IEmsObjReportLogService.java

@@ -1,37 +0,0 @@
-package com.ruoyi.ems.service;
-
-import com.ruoyi.ems.domain.EmsObjReportLog;
-
-import java.util.List;
-
-/**
- * 能源对象能力调用日志Mapper接口
- *
- * @author ruoyi
- * @date 2025-02-27
- */
-public interface IEmsObjReportLogService {
-    /**
-     * 查询能源对象能力调用日志
-     *
-     * @param id 能源对象能力调用日志主键
-     * @return 能源对象能力调用日志
-     */
-    EmsObjReportLog selectLogById(Long id);
-
-    /**
-     * 查询能源对象能力调用日志列表
-     *
-     * @param objReportLog 能源对象能力调用日志
-     * @return 能源对象能力调用日志集合
-     */
-    List<EmsObjReportLog> selectLog(EmsObjReportLog objReportLog);
-
-    /**
-     * 新增能源对象能力调用日志
-     *
-     * @param objReportLog 能源对象能力调用日志
-     * @return 结果
-     */
-    int insertLog(EmsObjReportLog objReportLog);
-}

+ 8 - 0
ems/ems-core/src/main/java/com/ruoyi/ems/service/IEmsSubsystemService.java

@@ -20,6 +20,14 @@ public interface IEmsSubsystemService {
     EmsSubsystem selectEmsSubsystemById(Long id);
 
     /**
+     * 查询能源子系统
+     *
+     * @param systemCode 能源子系统主键
+     * @return 能源子系统
+     */
+    EmsSubsystem selectEmsSubsystemByCode(String systemCode);
+
+    /**
      * 查询能源子系统列表
      *
      * @param admEmsSubsystem 能源子系统

+ 29 - 28
ems/ems-core/src/main/java/com/ruoyi/ems/service/impl/AbilityCallServiceImpl.java

@@ -17,11 +17,14 @@ import com.huashe.common.exception.BusinessException;
 import com.ruoyi.ems.domain.EmsDevice;
 import com.ruoyi.ems.domain.EmsObjAbility;
 import com.ruoyi.ems.domain.EmsObjModel;
+import com.ruoyi.ems.domain.EmsSubsystem;
+import com.ruoyi.ems.enums.DevObjType;
 import com.ruoyi.ems.model.AbilityPayload;
 import com.ruoyi.ems.model.CallResponse;
 import com.ruoyi.ems.service.IAbilityCallService;
 import com.ruoyi.ems.service.IEmsDeviceService;
 import com.ruoyi.ems.service.IEmsObjModelService;
+import com.ruoyi.ems.service.IEmsSubsystemService;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpPost;
@@ -54,31 +57,31 @@ public class AbilityCallServiceImpl implements IAbilityCallService {
     private IEmsDeviceService deviceService;
 
     @Autowired
+    private IEmsSubsystemService subsystemService;
+
+    @Autowired
     private IEmsObjModelService objModelService;
 
     @Override
-    public String devAbilityCall(String objCode, String abilityKey, String param) {
+    public String devAbilityCall(AbilityPayload payload) {
         String ret = null;
 
         try {
-            Assert.notNull(objCode, -1, "对象代码code不能为空");
-            Assert.notNull(abilityKey, -1, "设备模型能力key不能为空");
+            Assert.notNull(payload.getObjCode(), -1, "对象代码code不能为空");
+            Assert.notNull(payload.getAbilityKey(), -1, "设备模型能力key不能为空");
+
+            EmsObjModel objModel = objModelService.selectByModelCode(payload.getModelCode());
+            Assert.notNull(objModel, -1, "设备模型(" + payload.getModelCode() + ")不存在");
 
-            String modeCode = getDevModeCode(objCode);
+            checkDev(payload.getObjCode(), objModel.getObjType());
+            payload.setObjType(objModel.getObjType());
 
-            EmsObjModel objModel = objModelService.selectByModelCode(modeCode);
-            Assert.notNull(objModel, -1, "设备模型(" + modeCode + ")不存在");
             Assert.notNull(objModel.getAbilityHandler(), -1, "设备模型处理Handler未配置");
 
             List<EmsObjAbility> objAbilitys = objModel.getAbilityList();
-            Assert.isTrue(checkExist(abilityKey, objAbilitys), -1,
-                "设备模型(" + modeCode + ")能力(" + abilityKey + ")不存在");
-
-            AbilityPayload payload = new AbilityPayload();
-            payload.setObjCode(objCode);
-            payload.setModeCode(modeCode);
-            payload.setAbilityKey(abilityKey);
-            payload.setAbilityParam(param);
+            Assert.isTrue(checkExist(payload.getAbilityKey(), objAbilitys), -1,
+                "设备模型(" + payload.getModelCode() + ")能力(" + payload.getAbilityKey() + ")不存在");
+
             String jsonBody = JSON.toJSONString(payload);
 
             String res = execPost(objModel.getAbilityHandler(), jsonBody);
@@ -98,22 +101,20 @@ public class AbilityCallServiceImpl implements IAbilityCallService {
         return ret;
     }
 
-    @Override
-    public String facsAbilityCall(String objCode, String abilityKey, String param) {
-        // TODO: 暂不支持
-        throw new UnsupportedOperationException("暂不支持");
-    }
-
-    private String getDevModeCode(String objCode) {
+    private void checkDev(String objCode, Integer objType) {
         // 设备验证
-        EmsDevice device = deviceService.selectByCode(objCode);
-        Assert.notNull(device, -1, "设备不存在");
-        Assert.isTrue(null != device.getDeviceStatus() && device.getDeviceStatus() == 1, -1, "设备不在线");
-
-        // 设备模型匹配
-        Assert.notNull(device.getDeviceModel(), -1, "设备未关联模型能力");
+        if (DevObjType.DEVC.getCode() == objType) {
+            EmsDevice device = deviceService.selectByCode(objCode);
+            Assert.notNull(device, -1, "设备不存在");
+            Assert.isTrue(null != device.getDeviceStatus() && device.getDeviceStatus() == 1, -1, "设备不在线");
 
-        return device.getDeviceModel();
+            // 设备模型匹配
+            Assert.notNull(device.getDeviceModel(), -1, "设备未关联模型能力");
+        }
+        else if (DevObjType.SYSTEM.getCode() == objType) {
+            EmsSubsystem subsystem = subsystemService.selectEmsSubsystemByCode(objCode);
+            Assert.notNull(subsystem, -1, "子系统不存在");
+        }
     }
 
     private String execPost(String url, String jsonBody) {

+ 7 - 2
ems/ems-core/src/main/java/com/ruoyi/ems/service/impl/EmsObjAttrServiceImpl.java

@@ -4,12 +4,13 @@ import com.ruoyi.ems.domain.EmsDevice;
 import com.ruoyi.ems.domain.EmsObjAttr;
 import com.ruoyi.ems.domain.EmsObjAttrDto;
 import com.ruoyi.ems.domain.EmsObjAttrEnum;
+import com.ruoyi.ems.domain.EmsSubsystem;
 import com.ruoyi.ems.enums.DevObjType;
 import com.ruoyi.ems.mapper.EmsObjAttrMapper;
 import com.ruoyi.ems.service.IEmsDeviceService;
-import com.ruoyi.ems.service.IEmsFacsService;
 import com.ruoyi.ems.service.IEmsObjAttrEnumService;
 import com.ruoyi.ems.service.IEmsObjAttrService;
+import com.ruoyi.ems.service.IEmsSubsystemService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -37,7 +38,7 @@ public class EmsObjAttrServiceImpl implements IEmsObjAttrService {
     private IEmsDeviceService deviceService;
 
     @Autowired
-    private IEmsFacsService facsService;
+    private IEmsSubsystemService subsystemService;
 
     /**
      * 查询能源对象属性
@@ -220,6 +221,10 @@ public class EmsObjAttrServiceImpl implements IEmsObjAttrService {
             EmsDevice device = deviceService.selectByCode(objCode);
             modeCode = null != device ? device.getDeviceModel() : null;
         }
+        else if (objType == DevObjType.SYSTEM.getCode()) {
+            EmsSubsystem subsystem = subsystemService.selectEmsSubsystemByCode(objCode);
+            modeCode = null != subsystem ? subsystem.getModelCode() : null;
+        }
 
         return modeCode;
     }

+ 7 - 2
ems/ems-core/src/main/java/com/ruoyi/ems/service/impl/EmsObjAttrValueServiceImpl.java

@@ -30,6 +30,11 @@ public class EmsObjAttrValueServiceImpl implements IEmsObjAttrValueService {
         return objAttrValueMapper.selectObjAttrValueById(id);
     }
 
+    @Override
+    public EmsObjAttrValue selectObjAttrValue(String modelCode, String objCode, String attrKey) {
+        return objAttrValueMapper.selectObjAttrValue(modelCode, objCode, attrKey);
+    }
+
     /**
      * 查询能源对象属性值列表
      *
@@ -58,8 +63,8 @@ public class EmsObjAttrValueServiceImpl implements IEmsObjAttrValueService {
     }
 
     @Override
-    public int updateObjAttrValue(EmsObjAttrValue objAttrValue) {
-        return objAttrValueMapper.updateObjAttrValue(objAttrValue);
+    public int updateObjAttrValue(String modelCode, String objCode, String attrKey, String attrValue) {
+        return objAttrValueMapper.updateObjAttrValue(modelCode, objCode, attrKey, attrValue);
     }
 
     @Override

+ 0 - 49
ems/ems-core/src/main/java/com/ruoyi/ems/service/impl/EmsObjReportLogServiceImpl.java

@@ -1,49 +0,0 @@
-/*
- * 文 件 名:  EmsObjReportLogService
- * 版    权:  华设设计集团股份有限公司
- * 描    述:  <描述>
- * 修 改 人:  lvwenbin
- * 修改时间:  2025/3/11
- * 跟踪单号:  <跟踪单号>
- * 修改单号:  <修改单号>
- * 修改内容:  <修改内容>
- */
-package com.ruoyi.ems.service.impl;
-
-import com.ruoyi.ems.domain.EmsObjReportLog;
-import com.ruoyi.ems.mapper.EmsObjReportLogMapper;
-import com.ruoyi.ems.service.IEmsObjReportLogService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 对象上报日志服务
- * <功能详细描述>
- *
- * @author lvwenbin
- * @version [版本号, 2025/3/11]
- * @see [相关类/方法]
- * @since [产品/模块版本]
- */
-@Service
-public class EmsObjReportLogServiceImpl implements IEmsObjReportLogService {
-    @Autowired
-    private EmsObjReportLogMapper emsObjReportLogMapper;
-
-    @Override
-    public EmsObjReportLog selectLogById(Long id) {
-        return emsObjReportLogMapper.selectLogById(id);
-    }
-
-    @Override
-    public List<EmsObjReportLog> selectLog(EmsObjReportLog objReportLog) {
-        return emsObjReportLogMapper.selectLog(objReportLog);
-    }
-
-    @Override
-    public int insertLog(EmsObjReportLog objReportLog) {
-        return emsObjReportLogMapper.insertLog(objReportLog);
-    }
-}

+ 5 - 0
ems/ems-core/src/main/java/com/ruoyi/ems/service/impl/EmsSubsystemServiceImpl.java

@@ -30,6 +30,11 @@ public class EmsSubsystemServiceImpl implements IEmsSubsystemService {
         return emsSubsystemMapper.selectEmsSubsystemById(id);
     }
 
+    @Override
+    public EmsSubsystem selectEmsSubsystemByCode(String systemCode) {
+        return emsSubsystemMapper.selectEmsSubsystemByCode(systemCode);
+    }
+
     /**
      * 查询能源子系统列表
      *

+ 11 - 4
ems/ems-core/src/main/resources/mapper/ems/EmsObjAbilityCallLogMapper.xml

@@ -22,26 +22,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <sql id="selectList">
         select l.id, l.obj_code,
                CASE
-                   WHEN m.obj_type = 1 THEN f.facs_name
                    WHEN m.obj_type = 2 THEN d.device_name
+                   WHEN m.obj_type = 3 THEN s.system_name
                    END as obj_name,
                l.model_code, m.model_name, l.ability_key, a.ability_name, l.call_time, l.call_status from adm_ems_obj_ability_call_log l
         left join adm_ems_obj_model m on l.model_code = m.model_code
-        left join adm_ems_facs f on l.obj_code = f.facs_code and m.obj_type = 1
         left join adm_ems_device d on l.obj_code = d.device_code and m.obj_type = 2
+        left join adm_ems_subsystem s on l.obj_code = s.system_code and m.obj_type = 3
         left join adm_ems_obj_ability a on l.ability_key = a.ability_key
     </sql>
 
     <sql id="selectDetail">
         select l.id, l.obj_code,
                case
-                   WHEN m.obj_type = 1 THEN f.facs_name
                    WHEN m.obj_type = 2 THEN d.device_name
+                   WHEN m.obj_type = 3 THEN s.system_name
                    END as obj_name,
                l.model_code, m.model_name, l.ability_key, a.ability_name, l.call_time, l.call_status, l.call_payload, l.res_time, l.res_payload from adm_ems_obj_ability_call_log l
         left join adm_ems_obj_model m on l.model_code = m.model_code
-        left join adm_ems_facs f on l.obj_code = f.facs_code and m.obj_type = 1
         left join adm_ems_device d on l.obj_code = d.device_code and m.obj_type = 2
+        left join adm_ems_subsystem s on l.obj_code = s.system_code and m.obj_type = 3
         left join adm_ems_obj_ability a on l.ability_key = a.ability_key
     </sql>
 
@@ -60,6 +60,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="startRecTime != null  and startRecTime != '' and endRecTime != null and endRecTime !=''">
                 and l.call_time between #{startRecTime} and #{endRecTime}
             </if>
+            <if test="modelCodes != null">and l.model_code in
+                (
+                <foreach collection="modelCodes" item="item" index="index" separator=",">
+                    #{item}
+                </foreach>
+                )
+            </if>
         </where>
     </select>
 

+ 5 - 0
ems/ems-core/src/main/resources/mapper/ems/EmsObjAttrValueMapper.xml

@@ -26,6 +26,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
 
+    <select id="selectObjAttrValue" resultMap="objAttrValueResult">
+        <include refid="selectObjAttrValueVo"/>
+        where obj_code = #{objCode} and model_code = #{modelCode} and attr_key = #{attrKey}
+    </select>
+
     <select id="selectByObjCode" resultMap="objAttrValueResult">
         <include refid="selectObjAttrValueVo"/>
         where model_code = #{modelCode} and obj_code = #{objCode}

+ 14 - 6
ems/ems-core/src/main/resources/mapper/ems/EmsObjEventLogMapper.xml

@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="objCode"        column="obj_code"    />
         <result property="objName"        column="obj_name"    />
         <result property="modelCode"      column="model_code"    />
+        <result property="modelName"      column="model_name"    />
         <result property="eventKey"       column="event_key"    />
         <result property="eventName"       column="event_name"    />
         <result property="eventDetail"    column="event_detail"    />
@@ -16,30 +17,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectList">
-        select l.id, l.obj_code,
+        select l.id, l.obj_code, m.model_name,
                CASE
-                   WHEN m.obj_type = 1 THEN f.facs_name
                    WHEN m.obj_type = 2 THEN d.device_name
+                   WHEN m.obj_type = 3 THEN s.system_name
                    END as obj_name,
                l.model_code, l.event_key, e.event_name, l.event_time
         from adm_ems_obj_event_log l
                  left join adm_ems_obj_model m on l.model_code = m.model_code
-                 left join adm_ems_facs f on l.obj_code = f.facs_code and m.obj_type = 1
                  left join adm_ems_device d on l.obj_code = d.device_code and m.obj_type = 2
+                 left join adm_ems_subsystem s on l.obj_code = s.system_code and m.obj_type = 3
                  left join adm_ems_obj_event e on l.model_code = e.model_code and l.event_key = e.event_key
     </sql>
 
     <sql id="selectDetail">
-        select l.id, l.obj_code,
+        select l.id, l.obj_code, m.model_name,
                CASE
-                   WHEN m.obj_type = 1 THEN f.facs_name
                    WHEN m.obj_type = 2 THEN d.device_name
+                   WHEN m.obj_type = 3 THEN s.system_name
                    END as obj_name,
                l.model_code, l.event_key, e.event_name, l.event_time, l.event_detail
         from adm_ems_obj_event_log l
                  left join adm_ems_obj_model m on l.model_code = m.model_code
-                 left join adm_ems_facs f on l.obj_code = f.facs_code and m.obj_type = 1
                  left join adm_ems_device d on l.obj_code = d.device_code and m.obj_type = 2
+                 left join adm_ems_subsystem s on l.obj_code = s.system_code and m.obj_type = 3
                  left join adm_ems_obj_event e on l.model_code = e.model_code and l.event_key = e.event_key
     </sql>
 
@@ -57,6 +58,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and l.event_time between #{startRecTime} and #{endRecTime}
             </if>
             <if test="eventKey != null and eventKey != ''"> and l.event_key = #{eventKey}</if>
+            <if test="modelCodes != null">and l.model_code in
+                (
+                <foreach collection="modelCodes" item="item" index="index" separator=",">
+                    #{item}
+                </foreach>
+                )
+            </if>
         </where>
     </select>
 

+ 0 - 76
ems/ems-core/src/main/resources/mapper/ems/EmsObjReportLogMapper.xml

@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.ems.mapper.EmsObjReportLogMapper">
-    
-    <resultMap type="com.ruoyi.ems.domain.EmsObjReportLog" id="objLogResult">
-        <result property="id"             column="id"    />
-        <result property="objCode"        column="obj_code"    />
-        <result property="objName"        column="obj_name"    />
-        <result property="modelCode"      column="model_code"    />
-        <result property="msgDesc"        column="msg_desc"    />
-        <result property="reportPayload"  column="report_payload"    />
-        <result property="reportTime"     column="report_time"    />
-    </resultMap>
-
-    <sql id="selectList">
-        select l.id, l.obj_code,
-               CASE
-                   WHEN m.obj_type = 1 THEN f.facs_name
-                   WHEN m.obj_type = 2 THEN d.device_name
-                   END as obj_name,
-               l.model_code, l.msg_desc, l.report_time
-        from adm_ems_obj_report_log l
-                 left join adm_ems_obj_model m on l.model_code = m.model_code
-                 left join adm_ems_facs f on l.obj_code = f.facs_code and m.obj_type = 1
-                 left join adm_ems_device d on l.obj_code = d.device_code and m.obj_type = 2
-    </sql>
-
-    <sql id="selectDetail">
-        select l.id, l.obj_code,
-               CASE
-                   WHEN m.obj_type = 1 THEN f.facs_name
-                   WHEN m.obj_type = 2 THEN d.device_name
-                   END as obj_name,
-               l.model_code, l.msg_desc, l.report_time, l.report_payload
-        from adm_ems_obj_report_log l
-                 left join adm_ems_obj_model m on l.model_code = m.model_code
-                 left join adm_ems_facs f on l.obj_code = f.facs_code and m.obj_type = 1
-                 left join adm_ems_device d on l.obj_code = d.device_code and m.obj_type = 2
-    </sql>
-
-    <select id="selectLogById" parameterType="java.lang.Long" resultMap="objLogResult">
-        <include refid="selectDetail"/>
-        where l.id = #{id}
-    </select>
-
-    <select id="selectLog" parameterType="com.ruoyi.ems.domain.EmsObjReportLog" resultMap="objLogResult">
-        <include refid="selectList"/>
-        <where>  
-            <if test="objCode != null  and objCode != ''"> and l.obj_code = #{objCode}</if>
-            <if test="modelCode != null and modelCode != ''"> and l.model_code = #{modelCode}</if>
-            <if test="startRecTime != null  and startRecTime != '' and endRecTime != null and endRecTime !=''">
-                and l.report_time between #{startRecTime} and #{endRecTime}
-            </if>
-        </where>
-    </select>
-
-    <insert id="insertLog" parameterType="com.ruoyi.ems.domain.EmsObjReportLog" useGeneratedKeys="true" keyProperty="id">
-        insert into adm_ems_obj_report_log
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="objCode != null and objCode != ''">obj_code,</if>
-            <if test="modelCode != null and modelCode != ''">model_code,</if>
-            <if test="msgDesc != null and msgDesc != ''">msg_desc,</if>
-            <if test="reportTime != null">report_time,</if>
-            <if test="reportPayload != null">report_payload,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="objCode != null and objCode != ''">#{objCode},</if>
-            <if test="modelCode != null and modelCode != ''">#{modelCode},</if>
-            <if test="msgDesc != null and msgDesc != ''">#{msgDesc},</if>
-            <if test="reportTime != null">#{reportTime},</if>
-            <if test="reportPayload != null">#{reportPayload},</if>
-         </trim>
-    </insert>
-</mapper>

+ 11 - 8
ems/ems-core/src/main/resources/mapper/ems/EmsSubsystemMapper.xml

@@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="maintainerPerson"    column="maintainer_person"    />
         <result property="maintainerNumber"    column="maintainer_number"    />
         <result property="descr"    column="descr"    />
+        <result property="modelCode"    column="model_code"    />
     </resultMap>
 
     <sql id="selectEmsSubsystemVo">
-        select id, system_code, system_name, short_name, man_facturer, contact_person, contact_number, maintainer_person, maintainer_number, descr from adm_ems_subsystem
+        select id, system_code, system_name, short_name, man_facturer, contact_person, contact_number, maintainer_person, maintainer_number, descr, model_code from adm_ems_subsystem
     </sql>
 
     <select id="selectEmsSubsystemList" parameterType="com.ruoyi.ems.domain.EmsSubsystem" resultMap="AdmEmsSubsystemResult">
@@ -27,12 +28,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="systemCode != null  and systemCode != ''"> and system_code = #{systemCode}</if>
             <if test="systemName != null  and systemName != ''"> and system_name like concat('%', #{systemName}, '%')</if>
             <if test="shortName != null  and shortName != ''"> and short_name like concat('%', #{shortName}, '%')</if>
-            <if test="manFacturer != null  and manFacturer != ''"> and man_facturer = #{manFacturer}</if>
-            <if test="contactPerson != null  and contactPerson != ''"> and contact_person = #{contactPerson}</if>
-            <if test="contactNumber != null  and contactNumber != ''"> and contact_number = #{contactNumber}</if>
-            <if test="maintainerPerson != null  and maintainerPerson != ''"> and maintainer_person = #{maintainerPerson}</if>
-            <if test="maintainerNumber != null  and maintainerNumber != ''"> and maintainer_number = #{maintainerNumber}</if>
-            <if test="descr != null  and descr != ''"> and descr = #{descr}</if>
         </where>
     </select>
     
@@ -40,7 +35,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectEmsSubsystemVo"/>
         where id = #{id}
     </select>
-        
+
+    <select id="selectEmsSubsystemByCode" parameterType="String" resultMap="AdmEmsSubsystemResult">
+        <include refid="selectEmsSubsystemVo"/>
+        where system_code = #{systemCode}
+    </select>
+
     <insert id="insertEmsSubsystem" parameterType="com.ruoyi.ems.domain.EmsSubsystem" useGeneratedKeys="true" keyProperty="id">
         insert into adm_ems_subsystem
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -53,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="maintainerPerson != null">maintainer_person,</if>
             <if test="maintainerNumber != null">maintainer_number,</if>
             <if test="descr != null">descr,</if>
+            <if test="modelCode != null">model_code,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="systemCode != null and systemCode != ''">#{systemCode},</if>
@@ -64,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="maintainerPerson != null">#{maintainerPerson},</if>
             <if test="maintainerNumber != null">#{maintainerNumber},</if>
             <if test="descr != null">#{descr},</if>
+            <if test="modelCode != null">#{modelCode},</if>
          </trim>
     </insert>
 
@@ -79,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="maintainerPerson != null">maintainer_person = #{maintainerPerson},</if>
             <if test="maintainerNumber != null">maintainer_number = #{maintainerNumber},</if>
             <if test="descr != null">descr = #{descr},</if>
+            <if test="modelCode != null">model_code = #{modelCode},</if>
         </trim>
         where id = #{id}
     </update>

+ 207 - 187
ems/sql/ems_init_data.sql

@@ -175,15 +175,15 @@ INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_sub
 INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`) VALUES ('DEV02', '南区-设备监测', 'W', 'W4', 1, '321283124S3002');
 
 -- 能源设备
-INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-2003', '北区能耗采集器C', '-', '-', '1', '综合楼', '321283124S300101', '321283124S3001', 'M_W2_SM_INDOOR_ENERGY', 'NH01', 'SM', 'SYS_NHJC');
-INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-2004', '北区能耗采集器D', '-', '-', '1', '综合楼', '321283124S300101', '321283124S3001', 'M_W2_SM_INDOOR_ENERGY', 'NH01', 'SM', 'SYS_NHJC');
-INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-2005', '北区汽修间能耗采集器', '-', '-', '1', '司机之家', '321283124S300102', '321283124S3001', 'M_W2_SM_INDOOR_ENERGY', 'NH01', 'SM', 'SYS_NHJC');
-INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-2006', '北区警务室能耗采集器', '-', '-', '1', '警务室', '321283124S300103', '321283124S3001', 'M_W2_SM_INDOOR_ENERGY', 'NH01', 'SM', 'SYS_NHJC');
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-2003', '北区能耗采集器C', '-', '-', '1', '综合楼', '321283124S300101', '321283124S3001', 'M_W4_SM_INDOOR_ENERGY', 'NH01', 'SM', 'SYS_NHJC');
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-2004', '北区能耗采集器D', '-', '-', '1', '综合楼', '321283124S300101', '321283124S3001', 'M_W4_SM_INDOOR_ENERGY', 'NH01', 'SM', 'SYS_NHJC');
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-2005', '北区汽修间能耗采集器', '-', '-', '1', '司机之家', '321283124S300102', '321283124S3001', 'M_W4_SM_INDOOR_ENERGY', 'NH01', 'SM', 'SYS_NHJC');
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-2006', '北区警务室能耗采集器', '-', '-', '1', '警务室', '321283124S300103', '321283124S3001', 'M_W4_SM_INDOOR_ENERGY', 'NH01', 'SM', 'SYS_NHJC');
 
-INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-1003', '南区能耗采集器C', '-', '-', '1', '综合楼', '321283124S300201', '321283124S3002', 'M_W2_SM_INDOOR_ENERGY', 'NH02', 'SM', 'SYS_NHJC');
-INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-1004', '南区能耗采集器D', '-', '-', '1', '综合楼', '321283124S300201', '321283124S3002', 'M_W2_SM_INDOOR_ENERGY', 'NH02', 'SM', 'SYS_NHJC');
-INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-1005', '南区汽修间能耗采集器', '-', '-', '1', '司机之家', '321283124S300202', '321283124S3002', 'M_W2_SM_INDOOR_ENERGY', 'NH02', 'SM', 'SYS_NHJC');
-INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-1007', '南区宿舍能耗采集器', '-', '-', '1', '宿舍', '321283124S300203', '321283124S3002', 'M_W2_SM_INDOOR_ENERGY', 'NH02', 'SM', 'SYS_NHJC');
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-1003', '南区能耗采集器C', '-', '-', '1', '综合楼', '321283124S300201', '321283124S3002', 'M_W4_SM_INDOOR_ENERGY', 'NH02', 'SM', 'SYS_NHJC');
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-1004', '南区能耗采集器D', '-', '-', '1', '综合楼', '321283124S300201', '321283124S3002', 'M_W4_SM_INDOOR_ENERGY', 'NH02', 'SM', 'SYS_NHJC');
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-1005', '南区汽修间能耗采集器', '-', '-', '1', '司机之家', '321283124S300202', '321283124S3002', 'M_W4_SM_INDOOR_ENERGY', 'NH02', 'SM', 'SYS_NHJC');
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'ID-E-C-1007', '南区宿舍能耗采集器', '-', '-', '1', '宿舍', '321283124S300203', '321283124S3002', 'M_W4_SM_INDOOR_ENERGY', 'NH02', 'SM', 'SYS_NHJC');
 
 -- mock设备
 INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('GCZR-001', '光储设备1',    'xxx', 'xxx', 1, '北区广场', '321283124S300104', '321283124S3001',  'test', 'C101', NULL, 'SYS_GCC');
@@ -243,18 +243,27 @@ INSERT INTO `adm_op_energy_strategy_param` (`strategy_code`, `param_group`, `par
 
 
 -- 对象模型表
-INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W2_SM_INDOOR_ENERGY', '室内能耗计量终端', 2, 'http://172.17.60.27:9203/ems-dev-adapter/in-door-energy/ct/abilityCall', NULL);
+INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W4_SYS_IN_DOOR', '室内能耗监测系统', 3, null, null);
+INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_Z010_SYS_SQUARE_LIGHT', '广场照明系统', 3, NULL, NULL);
+INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_TEST', '测试', 3, NULL, NULL);
+
+INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W4_SM_INDOOR_ENERGY', '室内能耗计量终端', 2, 'http://172.17.60.27:9203/ems-dev-adapter/in-door-energy/ct/abilityCall', NULL);
 INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W2_QF_GEEKOPEN', 'GeekOpen断路器', 2, 'http://172.17.60.27:9203/ems-dev-adapter/circuit-breaker/GeekOpen/abilityCall', NULL);
 INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W2_QS_KEKA_86', 'KEKA开关(86型)', 2, 'http://172.17.60.27:9203/ems-dev-adapter/button-switch/keka/86ButtonSwitchCall', NULL);
 
 -- 对象属性数据
-INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W2_SM_INDOOR_ENERGY', 'Base', 'ip', '网络地址', NULL, 'String');
-INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W2_SM_INDOOR_ENERGY', 'Base', 'gateway', '网关地址', NULL, 'String');
-INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W2_SM_INDOOR_ENERGY', 'Base', 'subnetMask', '子网掩码', NULL, 'String');
-INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W2_SM_INDOOR_ENERGY', 'Measure', 'interface1', 'D1口通道', NULL, 'Table');
-INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W2_SM_INDOOR_ENERGY', 'Measure', 'interface2', 'D2口通道', NULL, 'Table');
-INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W2_SM_INDOOR_ENERGY', 'Measure', 'interface3', 'D3口通道', NULL, 'Table');
-INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W2_SM_INDOOR_ENERGY', 'Measure', 'interface4', 'D4口通道', NULL, 'Table');
+INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W4_SM_INDOOR_ENERGY', 'Base', 'ip', '网络地址', NULL, 'String');
+INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W4_SM_INDOOR_ENERGY', 'Base', 'gateway', '网关地址', NULL, 'String');
+INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W4_SM_INDOOR_ENERGY', 'Base', 'subnetMask', '子网掩码', NULL, 'String');
+INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W4_SM_INDOOR_ENERGY', 'Measure', 'interface1', 'D1口通道', NULL, 'Table');
+INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W4_SM_INDOOR_ENERGY', 'Measure', 'interface2', 'D2口通道', NULL, 'Table');
+INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W4_SM_INDOOR_ENERGY', 'Measure', 'interface3', 'D3口通道', NULL, 'Table');
+INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W4_SM_INDOOR_ENERGY', 'Measure', 'interface4', 'D4口通道', NULL, 'Table');
+
+INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W4_SYS_IN_DOOR', 'Protocol', 'interfaceType', '协议类型', NULL, 'String');
+INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W4_SYS_IN_DOOR', 'Protocol', 'url', '服务地址', NULL, 'String');
+INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W4_SYS_IN_DOOR', 'Protocol', 'appId', 'appId', NULL, 'String');
+INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W4_SYS_IN_DOOR', 'State', 'interfaceStatus', '通道状态', NULL, 'Enum');
 
 INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W2_QF_GEEKOPEN', 'Base', 'version', '固件版本号', NULL, 'Value');
 INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W2_QF_GEEKOPEN', 'Base', 'iccid', '物联网卡ICCID号', NULL, 'Value');
@@ -285,56 +294,70 @@ INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_na
 INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W2_QS_KEKA_86', 'Protocol', 'publish', '发布主题', NULL, 'String');
 INSERT INTO `adm_ems_obj_attr` (`model_code`, `attr_group`, `attr_key`, `attr_name`, `attr_unit`, `attr_value_type`) VALUES ('M_W2_QS_KEKA_86', 'Protocol', 'subcribe', '订阅主题', NULL, 'String');
 
+INSERT INTO `adm_ems_obj_attr_enum` (`model_code`, `attr_key`, `attr_value`, `attr_value_name`) VALUES ('M_W4_SYS_IN_DOOR', 'interfaceStatus', '1', '正常');
+INSERT INTO `adm_ems_obj_attr_enum` (`model_code`, `attr_key`, `attr_value`, `attr_value_name`) VALUES ('M_W4_SYS_IN_DOOR', 'interfaceStatus', '0', '断开');
+
 -- 对象属性
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W2_SM_INDOOR_ENERGY', 'ip', '172.17.50.175', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W2_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W2_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W2_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(电表)北区综合楼ALZ","key":"C_2003_AV_0000","value":null,"updateTime":null},{"name":"(电表)北区综合楼AKZ","key":"C_2003_AV_0001","value":null,"updateTime":null},{"name":"(电表)北区综合楼APXF2","key":"C_2003_AV_0002","value":null,"updateTime":null},{"name":"(电表)北区综合楼APXF1","key":"C_2003_AV_0003","value":null,"updateTime":null},{"name":"(电表)北区综合楼APJK","key":"C_2003_AV_0005","value":null,"updateTime":null},{"name":"(电表)北区综合楼APsbjf","key":"C_2003_AV_0006","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W2_SM_INDOOR_ENERGY', 'interface2', '[{"name":"(电表)德克士","key":"C_2003_AV_0206","value":null,"updateTime":null},{"name":"(电表)微团生活馆","key":"C_2003_AV_0214","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0222","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0230","value":null,"updateTime":null},{"name":"(电表)沪上阿姨(奶茶)","key":"C_2003_AV_0238","value":null,"updateTime":null},{"name":"(电表)服饰鞋帽(服饰)","key":"C_2003_AV_0246","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0254","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0262","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0270","value":null,"updateTime":null},{"name":"(电表)传统小吃(小吃)","key":"C_2003_AV_0278","value":null,"updateTime":null},{"name":"(电表)美广","key":"C_2003_AV_0286","value":null,"updateTime":null},{"name":"(电表)共和春(面馆)","key":"C_2003_AV_0294","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0302","value":null,"updateTime":null},{"name":"(电表)特产市集(特产)","key":"C_2003_AV_0310","value":null,"updateTime":null},{"name":"(电表)超市","key":"C_2003_AV_0318","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0326","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0334","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0342","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0350","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W2_SM_INDOOR_ENERGY', 'interface3', '[{"name":"(电表)厨房配电","key":"C_2003_AV_0406","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W2_SM_INDOOR_ENERGY', 'interface4', '[{"name":"(电表)北区综合楼APDT","key":"C_2003_AV_0600","value":null,"updateTime":null},{"name":"(电表)北区综合楼2APDP","key":"C_2003_AV_0601","value":null,"updateTime":null},{"name":"(电表)北区综合楼APKT1","key":"C_2003_AV_0603","value":null,"updateTime":null},{"name":"(电表)北区综合楼APKT2","key":"C_2003_AV_0604","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2004', 'M_W2_SM_INDOOR_ENERGY', 'ip', '172.17.50.176', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2004', 'M_W2_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2004', 'M_W2_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2004', 'M_W2_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(水表)货车服务空间","key":"C_2004_AV_0000","value":null,"updateTime":null},{"name":"(水表)沪上阿姨","key":"C_2004_AV_0001","value":null,"updateTime":null},{"name":"(水表)微团生活馆","key":"C_2004_AV_0002","value":null,"updateTime":null},{"name":"(水表)服饰鞋帽","key":"C_2004_AV_0003","value":null,"updateTime":null},{"name":"(水表)卫生间","key":"C_2004_AV_0004","value":null,"updateTime":null},{"name":"(水表)开水间","key":"C_2004_AV_0005","value":null,"updateTime":null},{"name":"(水表)超市","key":"C_2004_AV_0006","value":null,"updateTime":null},{"name":"(水表)特产市集","key":"C_2004_AV_0007","value":null,"updateTime":null},{"name":"(水表)堂食餐饮","key":"C_2004_AV_0008","value":null,"updateTime":null},{"name":"(水表)传统小吃","key":"C_2004_AV_0009","value":null,"updateTime":null},{"name":"(水表)德克士","key":"C_2004_AV_0010","value":null,"updateTime":null},{"name":"(水表)共和春面馆","key":"C_2004_AV_0011","value":null,"updateTime":null},{"name":"(水表)中餐厅","key":"C_2004_AV_0012","value":null,"updateTime":null},{"name":"(水表)二楼","key":"C_2004_AV_0200","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2004', 'M_W2_SM_INDOOR_ENERGY', 'interface3', '[{"name":"(电表)北区综合楼APXK 消控室","key":"C_2004_AV_0400","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2005', 'M_W2_SM_INDOOR_ENERGY', 'ip', '172.17.50.177', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2005', 'M_W2_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2005', 'M_W2_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2005', 'M_W2_SM_INDOOR_ENERGY', 'interface2', '[{"name":"(电表)北区司机之家维修间ALWX","key":"C_2005_AV_0200","value":null,"updateTime":null},{"name":"(电表)北区司机之家维修间ALE","key":"C_2005_AV_0201","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2005', 'M_W2_SM_INDOOR_ENERGY', 'interface3', '[{"name":"(电表)北区司机之家维修间ALZ","key":"C_2005_AV_0400","value":null,"updateTime":null},{"name":"(电表)北区司机之家维修间ALSS","key":"C_2005_AV_0401","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2005', 'M_W2_SM_INDOOR_ENERGY', 'interface4', '[{"name":"(水表)司机之家","key":"C_2005_AV_0600","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2006', 'M_W2_SM_INDOOR_ENERGY', 'ip', '172.17.50.178', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2006', 'M_W2_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2006', 'M_W2_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2006', 'M_W2_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(电表)警务室AL","key":"C_2006_AV_0000","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W2_SM_INDOOR_ENERGY', 'ip', '172.17.50.162', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W2_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W2_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W2_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(电表)南区综合楼ALZ","key":"C_1003_AV_0000","value":null,"updateTime":null},{"name":"(电表)南区综合楼AKZ","key":"C_1003_AV_0001","value":null,"updateTime":null},{"name":"(电表)南区综合楼APXF2","key":"C_1003_AV_0002","value":null,"updateTime":null},{"name":"(电表)南区综合楼APXF1","key":"C_1003_AV_0003","value":null,"updateTime":null},{"name":"(电表)南区综合楼APJF","key":"C_1003_AV_0004","value":null,"updateTime":null},{"name":"(电表)南区综合楼APJK","key":"C_1003_AV_0005","value":null,"updateTime":null},{"name":"(电表)南区综合楼APsbjf","key":"C_1003_AV_0006","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W2_SM_INDOOR_ENERGY', 'interface2', '[{"name":"(电表)德克士","key":"C_1003_AV_0206","value":null,"updateTime":null},{"name":"(电表)微团生活馆","key":"C_1003_AV_0214","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0222","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0230","value":null,"updateTime":null},{"name":"(电表)沪上阿姨(奶茶)","key":"C_1003_AV_0238","value":null,"updateTime":null},{"name":"(电表)服饰鞋帽(服饰)","key":"C_1003_AV_0246","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0254","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0262","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0270","value":null,"updateTime":null},{"name":"(电表)传统小吃(小吃)","key":"C_1003_AV_0278","value":null,"updateTime":null},{"name":"(电表)美广","key":"C_1003_AV_0286","value":null,"updateTime":null},{"name":"(电表)共和春(面馆)","key":"C_1003_AV_0294","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0302","value":null,"updateTime":null},{"name":"(电表)特产市集(特产)","key":"C_1003_AV_0310","value":null,"updateTime":null},{"name":"(电表)超市","key":"C_1003_AV_0318","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0326","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0334","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0342","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0350","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W2_SM_INDOOR_ENERGY', 'interface3', '[{"name":"(电表)厨房配电","key":"C_1003_AV_0406","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W2_SM_INDOOR_ENERGY', 'interface4', '[{"name":"(电表)南区综合楼APDT","key":"C_1003_AV_0600","value":null,"updateTime":null},{"name":"(电表)南区综合楼2APDP","key":"C_1003_AV_0601","value":null,"updateTime":null},{"name":"(电表)南区综合楼2ALZt","key":"C_1003_AV_0602","value":null,"updateTime":null},{"name":"(电表)南区综合楼APKT1","key":"C_1003_AV_0603","value":null,"updateTime":null},{"name":"(电表)南区综合楼APKT2","key":"C_1003_AV_0604","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1004', 'M_W2_SM_INDOOR_ENERGY', 'ip', '172.17.50.163', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1004', 'M_W2_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1004', 'M_W2_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1004', 'M_W2_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(水表)货车服务空间","key":"C_1004_AV_0000","value":null,"updateTime":null},{"name":"(水表)沪上阿姨","key":"C_1004_AV_0001","value":null,"updateTime":null},{"name":"(水表)微团生活馆","key":"C_1004_AV_0002","value":null,"updateTime":null},{"name":"(水表)服饰鞋帽","key":"C_1004_AV_0003","value":null,"updateTime":null},{"name":"(水表)卫生间","key":"C_1004_AV_0004","value":null,"updateTime":null},{"name":"(水表)开水间","key":"C_1004_AV_0005","value":null,"updateTime":null},{"name":"(水表)超市","key":"C_1004_AV_0006","value":null,"updateTime":null},{"name":"(水表)特产市集","key":"C_1004_AV_0007","value":null,"updateTime":null},{"name":"(水表)堂食餐饮","key":"C_1004_AV_0008","value":null,"updateTime":null},{"name":"(水表)传统小吃","key":"C_1004_AV_0009","value":null,"updateTime":null},{"name":"(水表)德克士","key":"C_1004_AV_0010","value":null,"updateTime":null},{"name":"(水表)共和春面馆","key":"C_1004_AV_0011","value":null,"updateTime":null},{"name":"(水表)中餐厅","key":"C_1004_AV_0012","value":null,"updateTime":null},{"name":"(水表)二楼","key":"C_1004_AV_0200","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1004', 'M_W2_SM_INDOOR_ENERGY', 'interface3', '[{"name":"(电表)南区综合楼APXK 消控室","key":"C_1004_AV_0400","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W2_SM_INDOOR_ENERGY', 'ip', '172.17.50.164', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W2_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W2_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W2_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(电表)南区司机之家维修间ALZ","key":"C_1005_AV_0000","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W2_SM_INDOOR_ENERGY', 'interface2', '[{"name":"(电表)南区司机之家维修间ALWX","key":"C_1005_AV_0200","value":null,"updateTime":null},{"name":"(电表)南区司机之家维修间ALE","key":"C_1005_AV_0201","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W2_SM_INDOOR_ENERGY', 'interface3', '[{"name":"(电表)南区司机之家维修间ALSS","key":"C_1005_AV_0400","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W2_SM_INDOOR_ENERGY', 'interface4', '[{"name":"(水表)司机之家","key":"C_1005_AV_0600","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1007', 'M_W2_SM_INDOOR_ENERGY', 'ip', '172.17.50.166', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1007', 'M_W2_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1007', 'M_W2_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1007', 'M_W2_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(电表)南区宿舍ALZ","key":"C_1007_AV_0000","value":null,"updateTime":null}]', NULL);
-INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1007', 'M_W2_SM_INDOOR_ENERGY', 'interface2', '[{"name":"(电表)南区宿舍ALE","key":"C_1007_AV_0200","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('SYS_NHJC', 'M_W4_SYS_IN_DOOR', 'interfaceType', 'http', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('SYS_NHJC', 'M_W4_SYS_IN_DOOR', 'url', 'http://172.17.50.186:80', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('SYS_NHJC', 'M_W4_SYS_IN_DOOR', 'appId', 'httpsjy', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('SYS_NHJC', 'M_W4_SYS_IN_DOOR', 'interfaceStatus', '1', NULL);
+
+
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W4_SM_INDOOR_ENERGY', 'ip', '172.17.50.175', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W4_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W4_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W4_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(电表)北区综合楼ALZ","key":"C_2003_AV_0000","value":null,"updateTime":null},{"name":"(电表)北区综合楼AKZ","key":"C_2003_AV_0001","value":null,"updateTime":null},{"name":"(电表)北区综合楼APXF2","key":"C_2003_AV_0002","value":null,"updateTime":null},{"name":"(电表)北区综合楼APXF1","key":"C_2003_AV_0003","value":null,"updateTime":null},{"name":"(电表)北区综合楼APJK","key":"C_2003_AV_0005","value":null,"updateTime":null},{"name":"(电表)北区综合楼APsbjf","key":"C_2003_AV_0006","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W4_SM_INDOOR_ENERGY', 'interface2', '[{"name":"(电表)德克士","key":"C_2003_AV_0206","value":null,"updateTime":null},{"name":"(电表)微团生活馆","key":"C_2003_AV_0214","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0222","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0230","value":null,"updateTime":null},{"name":"(电表)沪上阿姨(奶茶)","key":"C_2003_AV_0238","value":null,"updateTime":null},{"name":"(电表)服饰鞋帽(服饰)","key":"C_2003_AV_0246","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0254","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0262","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0270","value":null,"updateTime":null},{"name":"(电表)传统小吃(小吃)","key":"C_2003_AV_0278","value":null,"updateTime":null},{"name":"(电表)美广","key":"C_2003_AV_0286","value":null,"updateTime":null},{"name":"(电表)共和春(面馆)","key":"C_2003_AV_0294","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0302","value":null,"updateTime":null},{"name":"(电表)特产市集(特产)","key":"C_2003_AV_0310","value":null,"updateTime":null},{"name":"(电表)超市","key":"C_2003_AV_0318","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0326","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0334","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0342","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_2003_AV_0350","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W4_SM_INDOOR_ENERGY', 'interface3', '[{"name":"(电表)厨房配电","key":"C_2003_AV_0406","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2003', 'M_W4_SM_INDOOR_ENERGY', 'interface4', '[{"name":"(电表)北区综合楼APDT","key":"C_2003_AV_0600","value":null,"updateTime":null},{"name":"(电表)北区综合楼2APDP","key":"C_2003_AV_0601","value":null,"updateTime":null},{"name":"(电表)北区综合楼APKT1","key":"C_2003_AV_0603","value":null,"updateTime":null},{"name":"(电表)北区综合楼APKT2","key":"C_2003_AV_0604","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2004', 'M_W4_SM_INDOOR_ENERGY', 'ip', '172.17.50.176', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2004', 'M_W4_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2004', 'M_W4_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2004', 'M_W4_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(水表)货车服务空间","key":"C_2004_AV_0000","value":null,"updateTime":null},{"name":"(水表)沪上阿姨","key":"C_2004_AV_0001","value":null,"updateTime":null},{"name":"(水表)微团生活馆","key":"C_2004_AV_0002","value":null,"updateTime":null},{"name":"(水表)服饰鞋帽","key":"C_2004_AV_0003","value":null,"updateTime":null},{"name":"(水表)卫生间","key":"C_2004_AV_0004","value":null,"updateTime":null},{"name":"(水表)开水间","key":"C_2004_AV_0005","value":null,"updateTime":null},{"name":"(水表)超市","key":"C_2004_AV_0006","value":null,"updateTime":null},{"name":"(水表)特产市集","key":"C_2004_AV_0007","value":null,"updateTime":null},{"name":"(水表)堂食餐饮","key":"C_2004_AV_0008","value":null,"updateTime":null},{"name":"(水表)传统小吃","key":"C_2004_AV_0009","value":null,"updateTime":null},{"name":"(水表)德克士","key":"C_2004_AV_0010","value":null,"updateTime":null},{"name":"(水表)共和春面馆","key":"C_2004_AV_0011","value":null,"updateTime":null},{"name":"(水表)中餐厅","key":"C_2004_AV_0012","value":null,"updateTime":null},{"name":"(水表)二楼","key":"C_2004_AV_0200","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2004', 'M_W4_SM_INDOOR_ENERGY', 'interface3', '[{"name":"(电表)北区综合楼APXK 消控室","key":"C_2004_AV_0400","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2005', 'M_W4_SM_INDOOR_ENERGY', 'ip', '172.17.50.177', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2005', 'M_W4_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2005', 'M_W4_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2005', 'M_W4_SM_INDOOR_ENERGY', 'interface2', '[{"name":"(电表)北区司机之家维修间ALWX","key":"C_2005_AV_0200","value":null,"updateTime":null},{"name":"(电表)北区司机之家维修间ALE","key":"C_2005_AV_0201","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2005', 'M_W4_SM_INDOOR_ENERGY', 'interface3', '[{"name":"(电表)北区司机之家维修间ALZ","key":"C_2005_AV_0400","value":null,"updateTime":null},{"name":"(电表)北区司机之家维修间ALSS","key":"C_2005_AV_0401","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2005', 'M_W4_SM_INDOOR_ENERGY', 'interface4', '[{"name":"(水表)司机之家","key":"C_2005_AV_0600","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2006', 'M_W4_SM_INDOOR_ENERGY', 'ip', '172.17.50.178', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2006', 'M_W4_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2006', 'M_W4_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-2006', 'M_W4_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(电表)警务室AL","key":"C_2006_AV_0000","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W4_SM_INDOOR_ENERGY', 'ip', '172.17.50.162', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W4_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W4_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W4_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(电表)南区综合楼ALZ","key":"C_1003_AV_0000","value":null,"updateTime":null},{"name":"(电表)南区综合楼AKZ","key":"C_1003_AV_0001","value":null,"updateTime":null},{"name":"(电表)南区综合楼APXF2","key":"C_1003_AV_0002","value":null,"updateTime":null},{"name":"(电表)南区综合楼APXF1","key":"C_1003_AV_0003","value":null,"updateTime":null},{"name":"(电表)南区综合楼APJF","key":"C_1003_AV_0004","value":null,"updateTime":null},{"name":"(电表)南区综合楼APJK","key":"C_1003_AV_0005","value":null,"updateTime":null},{"name":"(电表)南区综合楼APsbjf","key":"C_1003_AV_0006","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W4_SM_INDOOR_ENERGY', 'interface2', '[{"name":"(电表)德克士","key":"C_1003_AV_0206","value":null,"updateTime":null},{"name":"(电表)微团生活馆","key":"C_1003_AV_0214","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0222","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0230","value":null,"updateTime":null},{"name":"(电表)沪上阿姨(奶茶)","key":"C_1003_AV_0238","value":null,"updateTime":null},{"name":"(电表)服饰鞋帽(服饰)","key":"C_1003_AV_0246","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0254","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0262","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0270","value":null,"updateTime":null},{"name":"(电表)传统小吃(小吃)","key":"C_1003_AV_0278","value":null,"updateTime":null},{"name":"(电表)美广","key":"C_1003_AV_0286","value":null,"updateTime":null},{"name":"(电表)共和春(面馆)","key":"C_1003_AV_0294","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0302","value":null,"updateTime":null},{"name":"(电表)特产市集(特产)","key":"C_1003_AV_0310","value":null,"updateTime":null},{"name":"(电表)超市","key":"C_1003_AV_0318","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0326","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0334","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0342","value":null,"updateTime":null},{"name":"(电表)备用","key":"C_1003_AV_0350","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W4_SM_INDOOR_ENERGY', 'interface3', '[{"name":"(电表)厨房配电","key":"C_1003_AV_0406","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1003', 'M_W4_SM_INDOOR_ENERGY', 'interface4', '[{"name":"(电表)南区综合楼APDT","key":"C_1003_AV_0600","value":null,"updateTime":null},{"name":"(电表)南区综合楼2APDP","key":"C_1003_AV_0601","value":null,"updateTime":null},{"name":"(电表)南区综合楼2ALZt","key":"C_1003_AV_0602","value":null,"updateTime":null},{"name":"(电表)南区综合楼APKT1","key":"C_1003_AV_0603","value":null,"updateTime":null},{"name":"(电表)南区综合楼APKT2","key":"C_1003_AV_0604","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1004', 'M_W4_SM_INDOOR_ENERGY', 'ip', '172.17.50.163', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1004', 'M_W4_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1004', 'M_W4_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1004', 'M_W4_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(水表)货车服务空间","key":"C_1004_AV_0000","value":null,"updateTime":null},{"name":"(水表)沪上阿姨","key":"C_1004_AV_0001","value":null,"updateTime":null},{"name":"(水表)微团生活馆","key":"C_1004_AV_0002","value":null,"updateTime":null},{"name":"(水表)服饰鞋帽","key":"C_1004_AV_0003","value":null,"updateTime":null},{"name":"(水表)卫生间","key":"C_1004_AV_0004","value":null,"updateTime":null},{"name":"(水表)开水间","key":"C_1004_AV_0005","value":null,"updateTime":null},{"name":"(水表)超市","key":"C_1004_AV_0006","value":null,"updateTime":null},{"name":"(水表)特产市集","key":"C_1004_AV_0007","value":null,"updateTime":null},{"name":"(水表)堂食餐饮","key":"C_1004_AV_0008","value":null,"updateTime":null},{"name":"(水表)传统小吃","key":"C_1004_AV_0009","value":null,"updateTime":null},{"name":"(水表)德克士","key":"C_1004_AV_0010","value":null,"updateTime":null},{"name":"(水表)共和春面馆","key":"C_1004_AV_0011","value":null,"updateTime":null},{"name":"(水表)中餐厅","key":"C_1004_AV_0012","value":null,"updateTime":null},{"name":"(水表)二楼","key":"C_1004_AV_0200","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1004', 'M_W4_SM_INDOOR_ENERGY', 'interface3', '[{"name":"(电表)南区综合楼APXK 消控室","key":"C_1004_AV_0400","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W4_SM_INDOOR_ENERGY', 'ip', '172.17.50.164', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W4_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W4_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W4_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(电表)南区司机之家维修间ALZ","key":"C_1005_AV_0000","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W4_SM_INDOOR_ENERGY', 'interface2', '[{"name":"(电表)南区司机之家维修间ALWX","key":"C_1005_AV_0200","value":null,"updateTime":null},{"name":"(电表)南区司机之家维修间ALE","key":"C_1005_AV_0201","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W4_SM_INDOOR_ENERGY', 'interface3', '[{"name":"(电表)南区司机之家维修间ALSS","key":"C_1005_AV_0400","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1005', 'M_W4_SM_INDOOR_ENERGY', 'interface4', '[{"name":"(水表)司机之家","key":"C_1005_AV_0600","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1007', 'M_W4_SM_INDOOR_ENERGY', 'ip', '172.17.50.166', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1007', 'M_W4_SM_INDOOR_ENERGY', 'gateway', '172.17.50.254', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1007', 'M_W4_SM_INDOOR_ENERGY', 'subnetMask', '255.255.255.0', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1007', 'M_W4_SM_INDOOR_ENERGY', 'interface1', '[{"name":"(电表)南区宿舍ALZ","key":"C_1007_AV_0000","value":null,"updateTime":null}]', NULL);
+INSERT INTO `adm_ems_obj_attr_value` (`obj_code`, `model_code`, `attr_key`, `attr_value`, `update_time`) VALUES ('ID-E-C-1007', 'M_W4_SM_INDOOR_ENERGY', 'interface2', '[{"name":"(电表)南区宿舍ALE","key":"C_1007_AV_0200","value":null,"updateTime":null}]', NULL);
 
 -- 对象能力DEMO数据
-INSERT INTO `adm_ems_obj_ability` (`model_code`, `ability_key`, `ability_name`, `ability_desc`, `ability_param`, `hidden_flag`) VALUES ('M_W2_SM_INDOOR_ENERGY', 'MeterReadingGw', '实时抄报-网关', '网关-测点批量抄报', null, 1);
+INSERT INTO `adm_ems_obj_ability` (`model_code`, `ability_key`, `ability_name`, `ability_desc`, `ability_param`, `hidden_flag`) VALUES ('M_W4_SYS_IN_DOOR', 'MeterReadingTotal', '全量抄报-网关', '网关-测点批量抄报', null, 1);
+INSERT INTO `adm_ems_obj_ability` (`model_code`, `ability_key`, `ability_name`, `ability_desc`, `ability_param`, `hidden_flag`) VALUES ('M_W4_SM_INDOOR_ENERGY', 'MeterReadingGw', '实时抄报-网关', '网关-测点批量抄报', null, 1);
+
+INSERT INTO `adm_ems_obj_event` (`model_code`, `event_key`, `event_type`, `event_name`, `event_desc`, `event_code`, `ext_event_code`) VALUES ('M_W4_SYS_IN_DOOR', 'connect', 1, '连接恢复', '连接正常', 'M_W4_SYS_IN_DOOR_00', NULL);
+INSERT INTO `adm_ems_obj_event` (`model_code`, `event_key`, `event_type`, `event_name`, `event_desc`, `event_code`, `ext_event_code`) VALUES ('M_W4_SYS_IN_DOOR', 'disconnect', 1, '连接断开', '连接断开', 'M_W4_SYS_IN_DOOR_01', NULL);
+
 
 -- 能源设施能流关系DEMO数据
 INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('W201', 1, 'Z101', 1, '45', '供电');
@@ -420,148 +443,134 @@ INSERT INTO `adm_fd_energyprice_config` (`cfg_code`, `area_code`, `meter_cls`, `
 INSERT INTO adm_co_charging_config (`area_code`, `elec_unit_price`, `elec_gt_compute_type`, `elec_compute_desc`, `water_unit_price`, `water_gt_compute_type`, `water_compute_desc`) VALUES ('321283124S3001', 0.6068, 1, '1.按户数均摊\n公摊电费每户收费 = 公摊电费 / 户数\n2、按面积分摊\n单户公摊电费 = 公摊电费 * (单户面积 / 总面积)', 3.04, 0, NULL);
 INSERT INTO adm_co_charging_config (`area_code`, `elec_unit_price`, `elec_gt_compute_type`, `elec_compute_desc`, `water_unit_price`, `water_gt_compute_type`, `water_compute_desc`) VALUES ('321283124S3002', 0.6068, 1, '1.按户数均摊\n公摊电费每户收费 = 公摊电费 / 户数\n2、按面积分摊\n单户公摊电费 = 公摊电费 * (单户面积 / 总面积)', 3.04, 0, NULL);
 
--- 子系统DEMO数据
-INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_GF', '光伏系统', '光伏', '南通', '张', '1380000', '李工', '123123', NULL);
-INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_CN', '储能系统', '储能', '储能厂商', '王', '122112', '陈', '21212', NULL);
-INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_BA', 'BA', '楼控', '楼控', '李', '12', '王', '121', NULL);
-INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_CD', '充电桩系统', '充电桩', '特来电', '张三', '1212121121', '刘工', '1212221111', NULL);
-INSERT INTO adm_ems_subsystem (system_code, system_name, short_name, man_facturer, contact_person, contact_number,
-                               maintainer_person, maintainer_number, descr)
-VALUES ('SYS_GCC', '光储充系统', '光储充', '光储充厂商', '张三', '1212121121', '刘工', '1212221111', NULL),
-       ('SYS_GCZR', '光储直柔系统', '光储直柔', '光储直柔厂商', '张三', '1212121121', '刘工', '1212221111', NULL),
-       ('SYS_Charge', '充电桩系统', '充电桩', '充电桩厂商', '张三', '1212121121', '刘工', '1212221111', NULL),
-       ('SYS_ZHZM', '智慧照明系统', '智慧照明', '智慧照明厂商', '张三', '1212121121', '刘工', '1212221111', NULL),
-       ('SYS_ZHHM', '智慧海绵系统', '智慧海绵', '智慧海绵厂商', '张三', '1212121121', '刘工', '1212221111', NULL),
-       ('SYS_LG', '垃圾厨余系统', '垃圾厨余', '垃圾厨余厂商', '张三', '1212121121', '刘工', '1212221111', NULL),
-       ('SYS_NHJC', '能耗监测系统', '能耗监测', '能耗监测厂商', '张三', '1212121121', '刘工', '1212221111', NULL);
 
 -- 北区电表
 -- 综合楼电表
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0000','M_W2_SM_INDOOR_ENERGY', '北区综合楼ALZ', 1,       '321283124S30010101', '一楼强电间', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0001','M_W2_SM_INDOOR_ENERGY', '北区综合楼AKZ', 1,       '321283124S30010101', '一楼强电间', 45, 300, 0, 1, '线接上之后北区综合楼APJK不通');
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0002','M_W2_SM_INDOOR_ENERGY', '北区综合楼APXF2', 1,     '321283124S30010101', '一楼强电间', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0003','M_W2_SM_INDOOR_ENERGY', '北区综合楼APXF1', 1,     '321283124S30010101', '一楼强电间', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0005','M_W2_SM_INDOOR_ENERGY', '北区综合楼APJK', 1,      '321283124S30010101', '一楼监控室', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0006','M_W2_SM_INDOOR_ENERGY', '北区综合楼APsbjf', 1,    '321283124S30010101', '一楼地下室', 45, 300, 0, 1, null);
-
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0206','M_W2_SM_INDOOR_ENERGY', '德克士', 1,             '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0214','M_W2_SM_INDOOR_ENERGY', '微团生活馆', 1,          '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0222','M_W2_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0230','M_W2_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0238','M_W2_SM_INDOOR_ENERGY', '沪上阿姨(奶茶)', 1,     '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0246','M_W2_SM_INDOOR_ENERGY', '服饰鞋帽(服饰)', 1,     '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0254','M_W2_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0262','M_W2_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0270','M_W2_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0278','M_W2_SM_INDOOR_ENERGY', '传统小吃(小吃)', 1,      '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0286','M_W2_SM_INDOOR_ENERGY', '美广', 1,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0294','M_W2_SM_INDOOR_ENERGY', '共和春(面馆)', 1,        '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0302','M_W2_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0310','M_W2_SM_INDOOR_ENERGY', '特产市集(特产)', 1,      '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0318','M_W2_SM_INDOOR_ENERGY', '超市', 1,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0326','M_W2_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0334','M_W2_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0342','M_W2_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0350','M_W2_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0406','M_W2_SM_INDOOR_ENERGY', '厨房配电', 1,            '321283124S30010103', '配电箱-APCF',   45, 300, 0, 1, null);
-
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0600','M_W2_SM_INDOOR_ENERGY', '北区综合楼APDT', 1,      '321283124S30010104', '二楼强电间',     45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0601','M_W2_SM_INDOOR_ENERGY', '北区综合楼2APDP', 1,     '321283124S30010104', '二楼强电间',     45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0603','M_W2_SM_INDOOR_ENERGY', '北区综合楼APKT1', 1,     '321283124S30010104', '二楼强电间',     45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0604','M_W2_SM_INDOOR_ENERGY', '北区综合楼APKT2', 1,     '321283124S30010104', '二楼强电间',     45, 300, 0, 1, null);
-
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0400','M_W2_SM_INDOOR_ENERGY', '北区综合楼APXK', 1,      '321283124S30010101', '消控室',   45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0000','M_W4_SM_INDOOR_ENERGY', '北区综合楼ALZ', 1,       '321283124S30010101', '一楼强电间', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0001','M_W4_SM_INDOOR_ENERGY', '北区综合楼AKZ', 1,       '321283124S30010101', '一楼强电间', 45, 300, 0, 1, '线接上之后北区综合楼APJK不通');
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0002','M_W4_SM_INDOOR_ENERGY', '北区综合楼APXF2', 1,     '321283124S30010101', '一楼强电间', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0003','M_W4_SM_INDOOR_ENERGY', '北区综合楼APXF1', 1,     '321283124S30010101', '一楼强电间', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0005','M_W4_SM_INDOOR_ENERGY', '北区综合楼APJK', 1,      '321283124S30010101', '一楼监控室', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0006','M_W4_SM_INDOOR_ENERGY', '北区综合楼APsbjf', 1,    '321283124S30010101', '一楼地下室', 45, 300, 0, 1, null);
+
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0206','M_W4_SM_INDOOR_ENERGY', '德克士', 1,             '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0214','M_W4_SM_INDOOR_ENERGY', '微团生活馆', 1,          '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0222','M_W4_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0230','M_W4_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0238','M_W4_SM_INDOOR_ENERGY', '沪上阿姨(奶茶)', 1,     '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0246','M_W4_SM_INDOOR_ENERGY', '服饰鞋帽(服饰)', 1,     '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0254','M_W4_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0262','M_W4_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0270','M_W4_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30010102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0278','M_W4_SM_INDOOR_ENERGY', '传统小吃(小吃)', 1,      '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0286','M_W4_SM_INDOOR_ENERGY', '美广', 1,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0294','M_W4_SM_INDOOR_ENERGY', '共和春(面馆)', 1,        '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0302','M_W4_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0310','M_W4_SM_INDOOR_ENERGY', '特产市集(特产)', 1,      '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0318','M_W4_SM_INDOOR_ENERGY', '超市', 1,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0326','M_W4_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0334','M_W4_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0342','M_W4_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0350','M_W4_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30010102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0406','M_W4_SM_INDOOR_ENERGY', '厨房配电', 1,            '321283124S30010103', '配电箱-APCF',   45, 300, 0, 1, null);
+
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0600','M_W4_SM_INDOOR_ENERGY', '北区综合楼APDT', 1,      '321283124S30010104', '二楼强电间',     45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0601','M_W4_SM_INDOOR_ENERGY', '北区综合楼2APDP', 1,     '321283124S30010104', '二楼强电间',     45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0603','M_W4_SM_INDOOR_ENERGY', '北区综合楼APKT1', 1,     '321283124S30010104', '二楼强电间',     45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2003_AV_0604','M_W4_SM_INDOOR_ENERGY', '北区综合楼APKT2', 1,     '321283124S30010104', '二楼强电间',     45, 300, 0, 1, null);
+
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0400','M_W4_SM_INDOOR_ENERGY', '北区综合楼APXK', 1,      '321283124S30010101', '消控室',   45, 300, 0, 1, null);
 
 -- 北区司机之家电表
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2005_AV_0200','M_W2_SM_INDOOR_ENERGY', '北区司机之家维修间ALWX', 1, '321283124S30010201', '一楼强电间',   45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2005_AV_0201','M_W2_SM_INDOOR_ENERGY', '北区司机之家维修间ALE', 1,  '321283124S30010201', '一楼强电间',   45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2005_AV_0400','M_W2_SM_INDOOR_ENERGY', '北区司机之家维修间ALZ', 1,  '321283124S30010201', '一楼强电间',   45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2005_AV_0401','M_W2_SM_INDOOR_ENERGY', '北区司机之家维修间ALSS', 1, '321283124S30010202', '二楼强电间',   45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2005_AV_0200','M_W4_SM_INDOOR_ENERGY', '北区司机之家维修间ALWX', 1, '321283124S30010201', '一楼强电间',   45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2005_AV_0201','M_W4_SM_INDOOR_ENERGY', '北区司机之家维修间ALE', 1,  '321283124S30010201', '一楼强电间',   45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2005_AV_0400','M_W4_SM_INDOOR_ENERGY', '北区司机之家维修间ALZ', 1,  '321283124S30010201', '一楼强电间',   45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2005_AV_0401','M_W4_SM_INDOOR_ENERGY', '北区司机之家维修间ALSS', 1, '321283124S30010202', '二楼强电间',   45, 300, 0, 1, null);
 
 -- 北区警务室
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2006_AV_0000','M_W2_SM_INDOOR_ENERGY', '警务室AL', 1, '321283124S300103', '一楼强电间',   45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2006_AV_0000','M_W4_SM_INDOOR_ENERGY', '警务室AL', 1, '321283124S300103', '一楼强电间',   45, 300, 0, 1, null);
 
 -- 北区水表
 -- 北综合楼水表
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0000','M_W2_SM_INDOOR_ENERGY', '货车服务空间', 1, '321283124S30010101', '货车服务空间',   70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0001','M_W2_SM_INDOOR_ENERGY', '沪上阿姨', 1,    '321283124S30010102', '沪上阿姨',      70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0002','M_W2_SM_INDOOR_ENERGY', '微团生活馆', 1,   '321283124S30010102', '微团生活馆',    70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0003','M_W2_SM_INDOOR_ENERGY', '服饰鞋帽', 1,     '321283124S30010102', '服饰鞋帽',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0004','M_W2_SM_INDOOR_ENERGY', '卫生间', 1,       '321283124S30010101', '卫生间',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0005','M_W2_SM_INDOOR_ENERGY', '开水间', 1,       '321283124S30010101', '开水间',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0006','M_W2_SM_INDOOR_ENERGY', '超市', 1,         '321283124S30010102', '超市',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0007','M_W2_SM_INDOOR_ENERGY', '特产市集', 1,     '321283124S30010102', '特产市集',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0008','M_W2_SM_INDOOR_ENERGY', '堂食餐饮', 1,     '321283124S30010102', '堂食餐饮',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0009','M_W2_SM_INDOOR_ENERGY', '传统小吃', 1,     '321283124S30010102', '传统小吃',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0010','M_W2_SM_INDOOR_ENERGY', '德克士', 1,       '321283124S30010102', '德克士',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0011','M_W2_SM_INDOOR_ENERGY', '共和春面馆', 1,    '321283124S30010102', '共和春面馆',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0012','M_W2_SM_INDOOR_ENERGY', '中餐厅', 1,       '321283124S30010102', '中餐厅',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0200','M_W2_SM_INDOOR_ENERGY', '二楼', 1,       '321283124S30010102', '二楼',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0000','M_W4_SM_INDOOR_ENERGY', '货车服务空间', 1, '321283124S30010101', '货车服务空间',   70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0001','M_W4_SM_INDOOR_ENERGY', '沪上阿姨', 1,    '321283124S30010102', '沪上阿姨',      70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0002','M_W4_SM_INDOOR_ENERGY', '微团生活馆', 1,   '321283124S30010102', '微团生活馆',    70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0003','M_W4_SM_INDOOR_ENERGY', '服饰鞋帽', 1,     '321283124S30010102', '服饰鞋帽',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0004','M_W4_SM_INDOOR_ENERGY', '卫生间', 1,       '321283124S30010101', '卫生间',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0005','M_W4_SM_INDOOR_ENERGY', '开水间', 1,       '321283124S30010101', '开水间',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0006','M_W4_SM_INDOOR_ENERGY', '超市', 1,         '321283124S30010102', '超市',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0007','M_W4_SM_INDOOR_ENERGY', '特产市集', 1,     '321283124S30010102', '特产市集',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0008','M_W4_SM_INDOOR_ENERGY', '堂食餐饮', 1,     '321283124S30010102', '堂食餐饮',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0009','M_W4_SM_INDOOR_ENERGY', '传统小吃', 1,     '321283124S30010102', '传统小吃',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0010','M_W4_SM_INDOOR_ENERGY', '德克士', 1,       '321283124S30010102', '德克士',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0011','M_W4_SM_INDOOR_ENERGY', '共和春面馆', 1,    '321283124S30010102', '共和春面馆',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0012','M_W4_SM_INDOOR_ENERGY', '中餐厅', 1,       '321283124S30010102', '中餐厅',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2004_AV_0200','M_W4_SM_INDOOR_ENERGY', '二楼', 1,       '321283124S30010102', '二楼',     70, 300, 0, 1, null);
 -- 司机之家水
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2005_AV_0600','M_W2_SM_INDOOR_ENERGY', '北区司机之家维修间ALSS', 1, '321283124S300102', '司机之家',   70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'C_2005_AV_0600','M_W4_SM_INDOOR_ENERGY', '北区司机之家维修间ALSS', 1, '321283124S300102', '司机之家',   70, 300, 0, 1, null);
 -- 南区电
 -- 综合
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0000','M_W2_SM_INDOOR_ENERGY', '南区综合楼ALZ', 1,       '321283124S30020101', '一楼强电间', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0001','M_W2_SM_INDOOR_ENERGY', '南区综合楼AKZ', 1,       '321283124S30020101', '一楼强电间', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0002','M_W2_SM_INDOOR_ENERGY', '南区综合楼APXF2', 1,     '321283124S30020101', '一楼强电间', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0003','M_W2_SM_INDOOR_ENERGY', '南区综合楼APXF1', 1,     '321283124S30020101', '一楼强电间', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0004','M_W2_SM_INDOOR_ENERGY', '南区综合楼APJF', 1,      '321283124S30020101', '一楼机房',  45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0005','M_W2_SM_INDOOR_ENERGY', '南区综合楼APJK', 1,      '321283124S30020101', '一楼监控室', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0006','M_W2_SM_INDOOR_ENERGY', '南区综合楼APsbjf', 1,    '321283124S30020101', '一楼地下室', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0206','M_W2_SM_INDOOR_ENERGY', '德克士', 1,             '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0214','M_W2_SM_INDOOR_ENERGY', '微团生活馆', 1,          '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0222','M_W2_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0230','M_W2_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0238','M_W2_SM_INDOOR_ENERGY', '沪上阿姨(奶茶)', 1,     '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0246','M_W2_SM_INDOOR_ENERGY', '服饰鞋帽(服饰)', 1,     '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0254','M_W2_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0262','M_W2_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0270','M_W2_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0278','M_W2_SM_INDOOR_ENERGY', '传统小吃(小吃)', 1,      '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0286','M_W2_SM_INDOOR_ENERGY', '美广', 1,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, '没电');
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0294','M_W2_SM_INDOOR_ENERGY', '共和春(面馆)', 1,        '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0302','M_W2_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0310','M_W2_SM_INDOOR_ENERGY', '特产市集(特产)', 1,      '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0318','M_W2_SM_INDOOR_ENERGY', '超市', 1,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0326','M_W2_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0334','M_W2_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0342','M_W2_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0350','M_W2_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0406','M_W2_SM_INDOOR_ENERGY', '厨房配电', 1,             '321283124S30020103', '配电箱-APCF',   45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0600','M_W2_SM_INDOOR_ENERGY', '南区综合楼APDT', 1,      '321283124S30020104', '二楼强电间',     45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0601','M_W2_SM_INDOOR_ENERGY', '南区综合楼2APDP', 1,     '321283124S30020104', '二楼强电间',     45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0602','M_W2_SM_INDOOR_ENERGY', '南区综合楼2ALZt', 1,     '321283124S30020104', '二楼强电间',     45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0603','M_W2_SM_INDOOR_ENERGY', '南区综合楼APKT1', 1,     '321283124S30020104', '二楼强电间',     45, 300, 0, 1, '暂未供电');
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0604','M_W2_SM_INDOOR_ENERGY', '南区综合楼APKT2', 1,     '321283124S30020104', '二楼强电间',     45, 300, 0, 1, '暂未供电');
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0400','M_W2_SM_INDOOR_ENERGY', '南区综合楼APXK', 1,      '321283124S30020101', '消控室',        45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0000','M_W4_SM_INDOOR_ENERGY', '南区综合楼ALZ', 1,       '321283124S30020101', '一楼强电间', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0001','M_W4_SM_INDOOR_ENERGY', '南区综合楼AKZ', 1,       '321283124S30020101', '一楼强电间', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0002','M_W4_SM_INDOOR_ENERGY', '南区综合楼APXF2', 1,     '321283124S30020101', '一楼强电间', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0003','M_W4_SM_INDOOR_ENERGY', '南区综合楼APXF1', 1,     '321283124S30020101', '一楼强电间', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0004','M_W4_SM_INDOOR_ENERGY', '南区综合楼APJF', 1,      '321283124S30020101', '一楼机房',  45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0005','M_W4_SM_INDOOR_ENERGY', '南区综合楼APJK', 1,      '321283124S30020101', '一楼监控室', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0006','M_W4_SM_INDOOR_ENERGY', '南区综合楼APsbjf', 1,    '321283124S30020101', '一楼地下室', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0206','M_W4_SM_INDOOR_ENERGY', '德克士', 1,             '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0214','M_W4_SM_INDOOR_ENERGY', '微团生活馆', 1,          '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0222','M_W4_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0230','M_W4_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0238','M_W4_SM_INDOOR_ENERGY', '沪上阿姨(奶茶)', 1,     '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0246','M_W4_SM_INDOOR_ENERGY', '服饰鞋帽(服饰)', 1,     '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0254','M_W4_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0262','M_W4_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0270','M_W4_SM_INDOOR_ENERGY', '备用', 0,               '321283124S30020102', '配电箱-ALSPZ2', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0278','M_W4_SM_INDOOR_ENERGY', '传统小吃(小吃)', 1,      '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0286','M_W4_SM_INDOOR_ENERGY', '美广', 1,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, '没电');
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0294','M_W4_SM_INDOOR_ENERGY', '共和春(面馆)', 1,        '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0302','M_W4_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0310','M_W4_SM_INDOOR_ENERGY', '特产市集(特产)', 1,      '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0318','M_W4_SM_INDOOR_ENERGY', '超市', 1,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0326','M_W4_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0334','M_W4_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0342','M_W4_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0350','M_W4_SM_INDOOR_ENERGY', '备用', 0,                '321283124S30020102', '配电箱-ALSPZ1', 45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0406','M_W4_SM_INDOOR_ENERGY', '厨房配电', 1,             '321283124S30020103', '配电箱-APCF',   45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0600','M_W4_SM_INDOOR_ENERGY', '南区综合楼APDT', 1,      '321283124S30020104', '二楼强电间',     45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0601','M_W4_SM_INDOOR_ENERGY', '南区综合楼2APDP', 1,     '321283124S30020104', '二楼强电间',     45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0602','M_W4_SM_INDOOR_ENERGY', '南区综合楼2ALZt', 1,     '321283124S30020104', '二楼强电间',     45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0603','M_W4_SM_INDOOR_ENERGY', '南区综合楼APKT1', 1,     '321283124S30020104', '二楼强电间',     45, 300, 0, 1, '暂未供电');
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1003_AV_0604','M_W4_SM_INDOOR_ENERGY', '南区综合楼APKT2', 1,     '321283124S30020104', '二楼强电间',     45, 300, 0, 1, '暂未供电');
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0400','M_W4_SM_INDOOR_ENERGY', '南区综合楼APXK', 1,      '321283124S30020101', '消控室',        45, 300, 0, 1, null);
 -- 南区司机之家电
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1005_AV_0000','M_W2_SM_INDOOR_ENERGY', '南区司机之家维修间ALZ', 1,   '321283124S30020201', '一楼强电间',   45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1005_AV_0200','M_W2_SM_INDOOR_ENERGY', '南区司机之家维修间ALWX', 1,  '321283124S30020201', '一楼强电间',   45,300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1005_AV_0201','M_W2_SM_INDOOR_ENERGY', '南区司机之家维修间ALE', 1,   '321283124S30020201', '一楼强电间',   45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1005_AV_0400','M_W2_SM_INDOOR_ENERGY', '南区司机之家维修间ALSS', 1,  '321283124S30020202', '二楼强电间',   45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1005_AV_0000','M_W4_SM_INDOOR_ENERGY', '南区司机之家维修间ALZ', 1,   '321283124S30020201', '一楼强电间',   45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1005_AV_0200','M_W4_SM_INDOOR_ENERGY', '南区司机之家维修间ALWX', 1,  '321283124S30020201', '一楼强电间',   45,300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1005_AV_0201','M_W4_SM_INDOOR_ENERGY', '南区司机之家维修间ALE', 1,   '321283124S30020201', '一楼强电间',   45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1005_AV_0400','M_W4_SM_INDOOR_ENERGY', '南区司机之家维修间ALSS', 1,  '321283124S30020202', '二楼强电间',   45, 300, 0, 1, null);
 -- 南区宿舍电
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1007_AV_0000','M_W2_SM_INDOOR_ENERGY', '南区宿舍ALZ', 1,   '321283124S300203', '一楼强电间',   45, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1007_AV_0200','M_W2_SM_INDOOR_ENERGY', '南区宿舍ALE', 1,   '321283124S300203', '一楼强电间',   45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1007_AV_0000','M_W4_SM_INDOOR_ENERGY', '南区宿舍ALZ', 1,   '321283124S300203', '一楼强电间',   45, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1007_AV_0200','M_W4_SM_INDOOR_ENERGY', '南区宿舍ALE', 1,   '321283124S300203', '一楼强电间',   45, 300, 0, 1, null);
 -- 南区水
 -- 北综合楼水
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0000','M_W2_SM_INDOOR_ENERGY', '货车服务空间', 1, '321283124S30020101', '货车服务空间',   70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0001','M_W2_SM_INDOOR_ENERGY', '沪上阿姨', 1,    '321283124S30020102', '沪上阿姨',      70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0002','M_W2_SM_INDOOR_ENERGY', '微团生活馆', 1,   '321283124S30020102', '微团生活馆',    70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0003','M_W2_SM_INDOOR_ENERGY', '服饰鞋帽', 1,     '321283124S30020102', '服饰鞋帽',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0004','M_W2_SM_INDOOR_ENERGY', '卫生间', 1,       '321283124S30020101', '卫生间',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0005','M_W2_SM_INDOOR_ENERGY', '开水间', 1,       '321283124S30020101', '开水间',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0006','M_W2_SM_INDOOR_ENERGY', '超市', 1,         '321283124S30020102', '超市',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0007','M_W2_SM_INDOOR_ENERGY', '特产市集', 1,     '321283124S30020102', '特产市集',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0008','M_W2_SM_INDOOR_ENERGY', '堂食餐饮', 1,     '321283124S30020102', '堂食餐饮',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0009','M_W2_SM_INDOOR_ENERGY', '传统小吃', 1,     '321283124S30020102', '传统小吃',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0010','M_W2_SM_INDOOR_ENERGY', '德克士', 1,       '321283124S30020102', '德克士',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0011','M_W2_SM_INDOOR_ENERGY', '共和春面馆', 1,    '321283124S30020102', '共和春面馆',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0012','M_W2_SM_INDOOR_ENERGY', '中餐厅', 1,       '321283124S30020102', '中餐厅',     70, 300, 0, 1, null);
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0200','M_W2_SM_INDOOR_ENERGY', '二楼', 1,       '321283124S30020104', '二楼',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0000','M_W4_SM_INDOOR_ENERGY', '货车服务空间', 1, '321283124S30020101', '货车服务空间',   70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0001','M_W4_SM_INDOOR_ENERGY', '沪上阿姨', 1,    '321283124S30020102', '沪上阿姨',      70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0002','M_W4_SM_INDOOR_ENERGY', '微团生活馆', 1,   '321283124S30020102', '微团生活馆',    70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0003','M_W4_SM_INDOOR_ENERGY', '服饰鞋帽', 1,     '321283124S30020102', '服饰鞋帽',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0004','M_W4_SM_INDOOR_ENERGY', '卫生间', 1,       '321283124S30020101', '卫生间',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0005','M_W4_SM_INDOOR_ENERGY', '开水间', 1,       '321283124S30020101', '开水间',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0006','M_W4_SM_INDOOR_ENERGY', '超市', 1,         '321283124S30020102', '超市',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0007','M_W4_SM_INDOOR_ENERGY', '特产市集', 1,     '321283124S30020102', '特产市集',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0008','M_W4_SM_INDOOR_ENERGY', '堂食餐饮', 1,     '321283124S30020102', '堂食餐饮',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0009','M_W4_SM_INDOOR_ENERGY', '传统小吃', 1,     '321283124S30020102', '传统小吃',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0010','M_W4_SM_INDOOR_ENERGY', '德克士', 1,       '321283124S30020102', '德克士',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0011','M_W4_SM_INDOOR_ENERGY', '共和春面馆', 1,    '321283124S30020102', '共和春面馆',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0012','M_W4_SM_INDOOR_ENERGY', '中餐厅', 1,       '321283124S30020102', '中餐厅',     70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1004_AV_0200','M_W4_SM_INDOOR_ENERGY', '二楼', 1,       '321283124S30020104', '二楼',     70, 300, 0, 1, null);
 -- 司机之家水
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1005_AV_0600','M_W2_SM_INDOOR_ENERGY', '司机之家水表', 1, '321283124S300202', '司机之家',   70, 300, 0, 1, null);
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'C_1005_AV_0600','M_W4_SM_INDOOR_ENERGY', '司机之家水表', 1, '321283124S300202', '司机之家',   70, 300, 0, 1, null);
 -- 测试
 INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', '864142073640059', 'M_W2_QF_GEEKOPEN', '智能断路器', 1, '321283124S300101', '综合楼C3-茶水间', 45, 3600, 0, 1, '智能表');
 INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_model`, `device_name`, `device_enable`, `location_ref`, `location`, `meter_cls`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'J-E-B-101', 'test', '综合楼B-101', 1, '321283124S300101', '一楼设备间', 45, NULL, 1, 1, '智能表');
@@ -889,6 +898,17 @@ INSERT INTO adm_meter_reading (`device_code`, `area_code`, `year`, `meter_month`
 INSERT INTO adm_meter_reading (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-W-B-102', '321283124S3001', '2025', '202506', 3666, '2025-05-31', 3915, '2025-06-30', 249, NULL, NULL);
 INSERT INTO adm_meter_reading (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-W-B-102', '321283124S3001', '2025', '202507', 3915, '2025-06-30', 4182, '2025-07-31', 267, NULL, NULL);
 
+INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `model_code`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_NHJC', '能耗监测系统(室内)', '室内能耗监测', 'M_W4_SYS_IN_DOOR','能耗监测厂商', '东边', '', '', '', NULL);
+INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `model_code`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_ZHZM', '智慧照明系统', '智慧照明', 'M_Z010_SYS_SQUARE_LIGHT', '智慧照明厂商', '林工', '1212121121', '刘工', '1212221111', NULL);
+INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `model_code`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_GF', '光伏系统', '光伏', 'M_TEST', '南通', '张', '1380000', '李工', '123123', NULL);
+INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `model_code`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_CN', '储能系统', '储能', 'M_TEST','储能厂商', '王', '122112', '陈', '21212', NULL);
+INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `model_code`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_BA', 'BA', '楼控', 'M_TEST','楼控', '李', '12', '王', '121', NULL);
+INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `model_code`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_CD', '充电桩系统', '充电桩', 'M_TEST', '特来电', '张三', '1212121121', '刘工', '1212221111', NULL);
+INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `model_code`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_GCC', '光储充系统', '光储充', 'M_TEST', '光储充厂商', '张三', '1212121121', '刘工', '1212221111', NULL);
+INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `model_code`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_GCZR', '光储直柔系统', '光储直柔', 'M_TEST', '光储直柔厂商', '张三', '1212121121', '刘工', '1212221111', NULL);
+INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `model_code`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_Charge', '充电桩系统', '充电桩', 'M_TEST', '充电桩厂商', '张三', '1212121121', '刘工', '1212221111', NULL);
+INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `model_code`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_ZHHM', '智慧海绵系统', '智慧海绵', 'M_TEST', '智慧海绵厂商', '张三', '1212121121', '刘工', '1212221111', NULL);
+INSERT INTO `adm_ems_subsystem` (`system_code`, `system_name`, `short_name`, `model_code`, `man_facturer`, `contact_person`, `contact_number`, `maintainer_person`, `maintainer_number`, `descr`) VALUES ('SYS_LG', '垃圾厨余系统', '垃圾厨余', 'M_TEST', '垃圾厨余厂商', '张三', '1212121121', '刘工', '1212221111', NULL);
 
 
 

+ 6 - 8
ems/sql/ems_server.sql

@@ -677,13 +677,10 @@ create table adm_ems_obj_model  (
 
 
 -- 对象模型初始数据
-INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W2', '国网供电模型', 1, null, null);
-INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_E5', '光伏设施模型', 1, null, null);
-INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_C1', '储能模型', 1, null, null);
-INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W2_T', '变压器设备模型', 2, null, null);
-INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W2_AP', '配电柜模型', 2, null, null);
-INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W2_QR', '漏电保护器模型', 2, null, null);
-INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W2_QF', '断路器模型', 2, null, null);
+# INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W2_T', '变压器设备模型', 2, null, null);
+# INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W2_AP', '配电柜模型', 2, null, null);
+# INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W2_QR', '漏电保护器模型', 2, null, null);
+# INSERT INTO `adm_ems_obj_model` (`model_code`, `model_name`, `obj_type`, `ability_handler`, `event_handler`) VALUES ('M_W2_QF', '断路器模型', 2, null, null);
 
 
 -- ----------------------------
@@ -829,6 +826,7 @@ create table adm_ems_subsystem  (
   `system_code`        varchar(16)     not null                     comment '系统代码',
   `system_name`        varchar(32)     not null                     comment '系统名称',
   `short_name`         varchar(16)     default null                 comment '系统简称',
+  `model_code`         varchar(64)     not null                     comment '模型code',
   `man_facturer`       varchar(64)     default null                 comment '厂商',
   `contact_person`     varchar(32)     default null                 comment '联系人',
   `contact_number`     varchar(128)    default null                 comment '联系电话',
@@ -836,7 +834,7 @@ create table adm_ems_subsystem  (
   `maintainer_number`  varchar(128)    default null                 comment '维护电话',
   `descr`              varchar(1024)   default null                 comment '备注说明',
   primary key (`id`),
-  unique key ux_ems_facs_code(`system_code`)
+  unique key ux_ems_subsystem_code(`system_code`)
 ) engine=innodb auto_increment=1 comment = '能源子系统表';
 
 

+ 12 - 11
ems/sql/ems_sys_data.sql

@@ -62,11 +62,12 @@ INSERT INTO sys_menu VALUES ('151',  '告警策略',       '5',    '1',  'warn-s
 INSERT INTO sys_menu VALUES ('152',  '告警列表',       '5',    '2',  'warn-list',           'alarm/alarm-info/index', '', 1, 0, 'C', '0', '0',    'warn:list', 'warnmsg', 'admin', '2024-08-29 15:40:27', 'admin', '2024-08-29 16:01:36', '告警策略');
 INSERT INTO sys_menu VALUES ('153',  '巡检计划',       '5',    '3',  'oper-plan',           'task/index',             '', 1, 0, 'C', '0', '0',    'oper-mgr:task', 'task', 'admin', '2024-08-29 15:40:27', 'admin', '2024-08-29 16:02:38', '巡检任务');
 insert into sys_menu values ('154',  '巡检报告',       '5',    '4',  'oper-report',         'task/report/index',      '', 1, 0, 'C', '0', '0',    'oper-mgr:report',        'note',           'admin', sysdate(), '', null, '巡检报告');
+insert into sys_menu values ('155',  '系统对接',       '5',    '5',  'adapter',          null, '', 1, 0, 'M', '0', '0', '',  'client',      'admin', sysdate(), '', null, '系统对接');
+
 
 insert into sys_menu values ('161',  '区域配置',       '6',    '1',  'areacfg',            'basecfg/area/index',    '', 1, 0, 'C', '0', '0',   'basecfg:area:list',      'cfgwrite',       'admin', sysdate(), '', null, '区域配置');
 insert into sys_menu values ('162',  '设备设施',       '6',    '2',  'devicecfg',          '',                       '', 1, 0, 'M', '0', '0',   'basecfg:device',         'devicemgr',      'admin', sysdate(), '', null, '设备设施');
 insert into sys_menu values ('163',  '能源计量',       '6',    '3',  'energycfg',          '',                       '', 1, 0, 'M', '0', '0',   'basecfg:energy',         'energy',         'admin', sysdate(), '', null, '能源计量');
-insert into sys_menu values ('165',  '系统对接',       '6',    '4',  'adapter',          null, '', 1, 0, 'M', '0', '0', '',  'client',      'admin', sysdate(), '', null, '系统对接');
 
 insert into sys_menu values ('170',  '用户管理',       '7',   '1',  'user',               'system/user/index',      '', 1, 0, 'C', '0', '0',   'system:user:list',       'user',           'admin', sysdate(), '', null, '用户管理菜单');
 insert into sys_menu values ('171',  '角色管理',       '7',   '2',  'role',               'system/role/index',      '', 1, 0, 'C', '0', '0',   'system:role:list',       'peoples',        'admin', sysdate(), '', null, '角色管理菜单');
@@ -80,16 +81,16 @@ insert into sys_menu values ('178',  '日志管理',       '7',   '9',  'log',
 insert into sys_menu values ('179',  '在线用户',       '7',   '10', 'online',             'monitor/online/index',   '', 1, 0, 'C', '0', '0',   'monitor:online:list',    'online',         'admin', sysdate(), '', null, '在线用户菜单');
 INSERT INTO sys_menu VALUES ('180',  '任务调度',       '7',   '10', 'task/job',           'monitor/job/index',      '', 1, 0, 'C', '0', '0',   'monitor:job',            'date-range',     'admin', sysdate(), '', NULL, '任务调度');
 
-insert into sys_menu values ('1650',  '系统信息',       '165',   '1',  'adapter-subsystem',  'adapter/subsystem/index',  '', 1, 0, 'C', '0', '0',   'adapter:subsystem:list',  'note',           'admin', sysdate(), '', null, '系统信息');
-insert into sys_menu values ('1651',  '光伏',          '165',   '2',  'adapter-pv',         'adapter/pv/index',      '', 1, 0, 'C', '0', '0',   'adapter:user:list',       'photovoltaic',        'admin', sysdate(), '', null, '光伏');
-insert into sys_menu values ('1652',  '光储直柔',       '165',   '3',  'adapter-gczr',       'adapter/gczr/index',    '', 1, 0, 'C', '0', '0',   'adapter:role:list',       'deviceaccess',      'admin', sysdate(), '', null, '光储直柔');
-insert into sys_menu values ('1653',  '光储充',         '165',   '4',  'adapter-gcc',        'adapter/gcc/index',     '', 1, 0, 'C', '0', '0',   'adapter:menu:list',       'energyconsume',       'admin', sysdate(), '', null, '光储充');
-insert into sys_menu values ('1654',  '充电桩',         '165',   '5',  'adapter-cdz',        'adapter/cdz/index',     '', 1, 0, 'C', '0', '0',   'adapter:dept:list',       'powerstore',       'admin', sysdate(), '', null, '充电桩');
-insert into sys_menu values ('1655',  '智慧照明',       '165',   '6',  'adapter-zm',         'adapter/zm/index',      '', 1, 0, 'C', '0', '0',   'adapter:post:list',       'system',        'admin', sysdate(), '', null, '智慧照明');
-insert into sys_menu values ('1656',  '智慧海绵',       '165',   '7',  'adapter-hm',         'adapter/hm/index',      '', 1, 0, 'C', '0', '0',   'adapter:dict:list',       'system',        'admin', sysdate(), '', null, '智慧海绵');
-insert into sys_menu values ('1657',  '垃圾厨余',       '165',   '8',  'adapter-ljcy',       'adapter/ljcy/index',    '', 1, 0, 'C', '0', '0',   'adapter:config:list',     'system',      'admin', sysdate(), '', null, '垃圾厨余');
-insert into sys_menu values ('1658',  '能耗监测',       '165',   '9',  'adapter-nhjc',       'adapter/nhjc/index',    '', 1, 0, 'C', '0', '0',   'adapter:notice:list',     'system',      'admin', sysdate(), '', null, '能耗监测');
-insert into sys_menu values ('1659',  '设备管理',       '165',   '10',  'adapter-devc',      'adapter/devc/index',    '', 1, 0, 'M', '0', '0',   'adapter:devc:list',       'system',      'admin', sysdate(), '', null, '设备管理');
+insert into sys_menu values ('1550',  '系统信息',       '155',   '1',  'adapter-subsystem',  'adapter/subsystem/index',  '', 1, 0, 'C', '0', '0',   'adapter:subsystem:list',  'note',           'admin', sysdate(), '', null, '系统信息');
+insert into sys_menu values ('1551',  '能耗监测',       '155',   '2',  'adapter-nhjc',       'adapter/nhjc/index',    '', 1, 0, 'C', '0', '0',   'adapter:notice:list',     'system',      'admin', sysdate(), '', null, '能耗监测');
+insert into sys_menu values ('1552',  '智慧照明',       '155',   '3',  'adapter-zm',         'adapter/zm/index',      '', 1, 0, 'C', '0', '0',   'adapter:post:list',       'system',        'admin', sysdate(), '', null, '智慧照明');
+insert into sys_menu values ('1553',  '光伏',          '155',   '4',  'adapter-pv',         'adapter/pv/index',      '', 1, 0, 'C', '0', '0',   'adapter:user:list',       'photovoltaic',        'admin', sysdate(), '', null, '光伏');
+insert into sys_menu values ('1554',  '光储直柔',       '155',   '5',  'adapter-gczr',       'adapter/gczr/index',    '', 1, 0, 'C', '0', '0',   'adapter:role:list',       'deviceaccess',      'admin', sysdate(), '', null, '光储直柔');
+insert into sys_menu values ('1555',  '光储充',         '155',   '6',  'adapter-gcc',        'adapter/gcc/index',     '', 1, 0, 'C', '0', '0',   'adapter:menu:list',       'energyconsume',       'admin', sysdate(), '', null, '光储充');
+insert into sys_menu values ('1556',  '充电桩',         '155',   '7',  'adapter-cdz',        'adapter/cdz/index',     '', 1, 0, 'C', '0', '0',   'adapter:dept:list',       'powerstore',       'admin', sysdate(), '', null, '充电桩');
+insert into sys_menu values ('1557',  '智慧海绵',       '155',   '8',  'adapter-hm',         'adapter/hm/index',      '', 1, 0, 'C', '0', '0',   'adapter:dict:list',       'system',        'admin', sysdate(), '', null, '智慧海绵');
+insert into sys_menu values ('1558',  '垃圾厨余',       '155',   '9',  'adapter-ljcy',       'adapter/ljcy/index',    '', 1, 0, 'C', '0', '0',   'adapter:config:list',     'system',      'admin', sysdate(), '', null, '垃圾厨余');
+insert into sys_menu values ('1559',  '设备管理',       '155',   '10',  'adapter-devc',      'adapter/devc/index',    '', 1, 0, 'M', '0', '0',   'adapter:devc:list',       'system',      'admin', sysdate(), '', null, '设备管理');
 
 insert into sys_menu values ('997',  '表单构建',       '99',   '1',  'build',              'tool/build/index',       '', 1, 0, 'C', '0', '0',   'tool:build:list',        'build',          'admin', sysdate(), '', null, '表单构建菜单');
 insert into sys_menu values ('998',  '代码生成',       '99',   '2',  'gen',                'tool/gen/index',         '', 1, 0, 'C', '0', '0',   'tool:gen:list',          'code',           'admin', sysdate(), '', null, '代码生成菜单');