Browse Source

楼宇 同步 接口修改

zhanghao 1 month ago
parent
commit
cfee12dbc5

+ 5 - 0
project-zcustom/src/main/java/com/project/zcustom/controller/synchronization/PlatSynchronizeController.java

@@ -192,6 +192,11 @@ public class PlatSynchronizeController {
         return AjaxResult.success("操作成功",platSynchronizeService.getServiceBuildingAmmeterDetail());
     }
 
+    @GetMapping("/getServiceBuildingLoadDetail")
+    public AjaxResult getServiceBuildingLoadDetail() {
+        return AjaxResult.success("操作成功",platSynchronizeService.getServiceBuildingLoadDetail());
+    }
+
     /**
      *便捷出入
      */

+ 2 - 0
project-zcustom/src/main/java/com/project/zcustom/mapper/synchronization/PlatSynchronizeMapper.java

@@ -69,6 +69,8 @@ public interface PlatSynchronizeMapper {
 
     List<LargeBuildingControlAmmeterDetail> getServiceBuildingAmmeterDetail();
 
+    List<LargeBuildingLoadDetail> getServiceBuildingLoadDetail();
+
 
 
     List<LargeCamera> getServiceEngineerCamera();

+ 2 - 0
project-zcustom/src/main/java/com/project/zcustom/service/synchronization/IPlatSynchronizeService.java

@@ -69,6 +69,8 @@ public interface IPlatSynchronizeService {
 
     List<LargeBuildingControlAmmeterDetail> getServiceBuildingAmmeterDetail();
 
+    List<LargeBuildingLoadDetail> getServiceBuildingLoadDetail();
+
 
 
     List<LargeCamera> getServiceEngineerCamera();

+ 4 - 0
project-zcustom/src/main/java/com/project/zcustom/service/synchronization/impl/PlatSynchronizeServiceImpl.java

@@ -122,6 +122,10 @@ public class PlatSynchronizeServiceImpl implements IPlatSynchronizeService {
         return platSynchronizeMapper.getServiceBuildingAmmeterDetail();
     }
 
+    public List<LargeBuildingLoadDetail> getServiceBuildingLoadDetail(){
+        return platSynchronizeMapper.getServiceBuildingLoadDetail();
+    }
+
 
 
     public List<LargeCamera> getServiceEngineerCamera(){

+ 1 - 1
project-zcustom/src/main/java/com/project/zcustom/tools/BuildingService.java

@@ -111,7 +111,7 @@ public class BuildingService {
 
         platBuildingMapper.deleteLoadDetails();
         String[] type = {"一号配电室", "二号配电室", "三号配电室"};
-        String[] state = {"空载", "重载", "过载", "轻载", "正常"};
+        String[] state = {"重载", "轻载", "过载", "空载", "正常"};
         for (int i = 0; i < 3; i++){
             for (int j = 0; i < 5; j++){
                 String res = repeat(ApiUrlConfig.getControlElectricityDetail(), "type=" + type[i] + "&" + "state=" + state[j]);

+ 13 - 0
project-zcustom/src/main/resources/mapper/zcustom/synchronization/PlatSynchronizeMapper.xml

@@ -357,6 +357,15 @@
         <result property="type"    column="type"    />
     </resultMap>
 
+    <resultMap type="com.project.zcustom.domain.addional.LargeBuildingLoadDetail" id="LargePlatBuildingLoadDetailResult">
+        <result property="id"    column="id"    />
+        <result property="number"    column="number"    />
+        <result property="deviceName"    column="device_name"    />
+        <result property="type"    column="type"    />
+        <result property="state"    column="state"    />
+        <result property="kind"    column="kind"    />
+    </resultMap>
+
     <resultMap type="com.project.zcustom.domain.addional.LargeBuildingControl" id="LargeBuildingControlResult">
         <result property="id"    column="id"    />
         <result property="weekElectricity"    column="week_electricity"    />
@@ -667,6 +676,10 @@
         select * from large_plat_building_ammeter_detail
     </select>
 
+    <select id="getServiceBuildingLoadDetail" resultMap="LargePlatBuildingLoadDetailResult">
+        select * from large_plat_building_load_detail
+    </select>
+
 
 
     <select id="getServiceEngineerCamera" resultMap="LargeCameraResult">