瀏覽代碼

楼宇 公务用车 接口修改

zhanghao 1 月之前
父節點
當前提交
17056f496a

+ 12 - 0
src/main/java/com/project/zcustom/controller/backManager/building/PlatBuildControlController.java

@@ -60,6 +60,12 @@ public class PlatBuildControlController {
         return AjaxResult.success("查询成功", platBuildingService.getRoomLoad());
         return AjaxResult.success("查询成功", platBuildingService.getRoomLoad());
     }
     }
 
 
+    /*配电室重要回路负荷情况明细*/
+    @GetMapping("/roomLoadDetail")
+    public AjaxResult getRoomLoadDetail(@RequestParam("kind") Long kind, @RequestParam("state") Long state) {
+        return AjaxResult.success("查询成功", platBuildingService.getRoomLoadDetail(kind, state));
+    }
+
     /*楼宇中当前告警的设备*/
     /*楼宇中当前告警的设备*/
     @GetMapping("/warnDevice")
     @GetMapping("/warnDevice")
     public AjaxResult getWarnDevice() {
     public AjaxResult getWarnDevice() {
@@ -83,4 +89,10 @@ public class PlatBuildControlController {
     public AjaxResult getWarnState() {
     public AjaxResult getWarnState() {
         return AjaxResult.success("查询成功", platBuildingService.getWarnState());
         return AjaxResult.success("查询成功", platBuildingService.getWarnState());
     }
     }
+
+    /*光伏发电*/
+    @GetMapping("/photovoltaicPower")
+    public AjaxResult getPhotovoltaicPower() {
+        return AjaxResult.success("查询成功", platBuildingService.getPhotovoltaicPower());
+    }
 }
 }

+ 8 - 1
src/main/java/com/project/zcustom/domain/addional/LargeBuildingControl.java

@@ -145,12 +145,18 @@ public class LargeBuildingControl {
      */
      */
     private String abnormalPointFour;
     private String abnormalPointFour;
 
 
+    /**
+     * 光伏发电
+     */
+    private String photovoltaicPower;
+
 
 
     public LargeBuildingControl() {
     public LargeBuildingControl() {
     }
     }
 
 
-    public LargeBuildingControl(String weekElectricity, String roomElectricity, String todayElectricity, String monthElectricityOne, String monthElectricityTwo, String monthElectricityThree, String roomLoadOne, String roomLoadTwo, String roomLoadThree, String warnDevice, Long waterControlNormalNum, Long waterControlAbnormalNum, String warnEventStatistics, String waterStateOne, String waterStateTwo) {
+    public LargeBuildingControl(String weekElectricity, String controlElevator, String roomElectricity, String todayElectricity, String monthElectricityOne, String monthElectricityTwo, String monthElectricityThree, String roomLoadOne, String roomLoadTwo, String roomLoadThree, String warnDevice, Long waterControlNormalNum, Long waterControlAbnormalNum, String warnEventStatistics, String waterStateOne, String waterStateTwo, String photovoltaicPower) {
         this.weekElectricity = weekElectricity;
         this.weekElectricity = weekElectricity;
+        this.controlElevator = controlElevator;
         this.roomElectricity = roomElectricity;
         this.roomElectricity = roomElectricity;
         this.todayElectricity = todayElectricity;
         this.todayElectricity = todayElectricity;
         this.monthElectricityOne = monthElectricityOne;
         this.monthElectricityOne = monthElectricityOne;
@@ -165,5 +171,6 @@ public class LargeBuildingControl {
         this.warnEventStatistics = warnEventStatistics;
         this.warnEventStatistics = warnEventStatistics;
         this.waterStateOne = waterStateOne;
         this.waterStateOne = waterStateOne;
         this.waterStateTwo = waterStateTwo;
         this.waterStateTwo = waterStateTwo;
+        this.photovoltaicPower = photovoltaicPower;
     }
     }
 }
 }

+ 57 - 0
src/main/java/com/project/zcustom/domain/addional/LargeBuildingLoadDetail.java

@@ -0,0 +1,57 @@
+package com.project.zcustom.domain.addional;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+/**
+ * 【请填写功能名称】对象 large_plat_building_load_detail
+ *
+ * @author change
+ * @date 2025-03-11
+ */
+@Data
+@Accessors(chain = true)
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = false)
+@TableName("large_plat_building_load_detail")
+
+public class LargeBuildingLoadDetail {
+
+    /**
+     * $column.columnComment
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 编号
+     */
+    private String number;
+
+    /**
+     * 名称
+     */
+    @JSONField(name = "EqName")
+    private String deviceName;
+
+    /**
+     * 类别
+     */
+    private String type;
+
+    /**
+     * 负载类型
+     */
+    private Integer state;
+
+    /**
+     * 所属配电室
+     */
+    private Integer kind;
+
+}

+ 5 - 0
src/main/java/com/project/zcustom/mapper/unit/PlatBuildingMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.project.zcustom.domain.addional.LargeBuilding;
 import com.project.zcustom.domain.addional.LargeBuilding;
 import com.project.zcustom.domain.addional.LargeBuildingControl;
 import com.project.zcustom.domain.addional.LargeBuildingControl;
 import com.project.zcustom.domain.addional.LargeBuildingControlAmmeterDetail;
 import com.project.zcustom.domain.addional.LargeBuildingControlAmmeterDetail;
+import com.project.zcustom.domain.addional.LargeBuildingLoadDetail;
 
 
 import java.util.List;
 import java.util.List;
 
 
@@ -45,11 +46,15 @@ public interface PlatBuildingMapper {
     String getTodayElectricity();
     String getTodayElectricity();
     LargeBuildingControl getMonthElectricity();
     LargeBuildingControl getMonthElectricity();
     LargeBuildingControl getRoomLoad();
     LargeBuildingControl getRoomLoad();
+
+    List<LargeBuildingLoadDetail> getRoomLoadDetail(Long kind, Long state);
+
     LargeBuildingControl getWarnDevice();
     LargeBuildingControl getWarnDevice();
 
 
     LargeBuildingControl getAbnormalPoint();
     LargeBuildingControl getAbnormalPoint();
     String getWarnEvent();
     String getWarnEvent();
     LargeBuildingControl getWarnState();
     LargeBuildingControl getWarnState();
+    String getPhotovoltaicPower();
 
 
 
 
 
 

+ 5 - 0
src/main/java/com/project/zcustom/service/service/smart/IPlatBuildingService.java

@@ -2,6 +2,7 @@ package com.project.zcustom.service.service.smart;
 
 
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import com.alibaba.fastjson2.JSONObject;
+import com.project.zcustom.domain.addional.LargeBuildingLoadDetail;
 
 
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
@@ -47,6 +48,8 @@ public interface IPlatBuildingService{
 
 
     Map<String, Object> getRoomLoad();
     Map<String, Object> getRoomLoad();
 
 
+    List<LargeBuildingLoadDetail> getRoomLoadDetail(Long kind, Long state);
+
     Map<String, Object> getWarnDevice();
     Map<String, Object> getWarnDevice();
 
 
     JSONArray getAbnormalPoint(String type);
     JSONArray getAbnormalPoint(String type);
@@ -54,4 +57,6 @@ public interface IPlatBuildingService{
     JSONArray getWarnEvent();
     JSONArray getWarnEvent();
 
 
     Map<String, Object> getWarnState();
     Map<String, Object> getWarnState();
+
+    JSONObject getPhotovoltaicPower();
 }
 }

+ 22 - 0
src/main/java/com/project/zcustom/service/service/smart/impl/PlatBuildingServiceImpl.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import com.alibaba.fastjson2.JSONObject;
 import com.project.zcustom.controller.core.StringUtils;
 import com.project.zcustom.controller.core.StringUtils;
 import com.project.zcustom.domain.addional.LargeBuildingControl;
 import com.project.zcustom.domain.addional.LargeBuildingControl;
+import com.project.zcustom.domain.addional.LargeBuildingLoadDetail;
 import com.project.zcustom.mapper.unit.PlatBuildingMapper;
 import com.project.zcustom.mapper.unit.PlatBuildingMapper;
 import com.project.zcustom.service.service.smart.IPlatBuildingService;
 import com.project.zcustom.service.service.smart.IPlatBuildingService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -581,6 +582,10 @@ public class PlatBuildingServiceImpl implements IPlatBuildingService {
         return map;
         return map;
     }
     }
 
 
+    public List<LargeBuildingLoadDetail> getRoomLoadDetail(Long kind, Long state) {
+        return platBuildingMapper.getRoomLoadDetail(kind, state);
+    }
+
     public Map<String, Object> getWarnDevice(){
     public Map<String, Object> getWarnDevice(){
         LargeBuildingControl largeBuildingControl = platBuildingMapper.getWarnDevice();
         LargeBuildingControl largeBuildingControl = platBuildingMapper.getWarnDevice();
 
 
@@ -697,4 +702,21 @@ public class PlatBuildingServiceImpl implements IPlatBuildingService {
         }
         }
         return monthsArray;
         return monthsArray;
     }
     }
+
+    public JSONObject getPhotovoltaicPower(){
+        String result = platBuildingMapper.getPhotovoltaicPower();
+        if (StringUtils.isBlank(result)){
+            result = "{\n" +
+                    "    \"code\": 200,\n" +
+                    "    \"success\": true,\n" +
+                    "    \"data\": {\n" +
+                    "        \"sum\":\"0\",\n" +
+                    "        \"bm\":\"0\",\n" +
+                    "        \"gfb\":\"0\"\n" +
+                    "    },\n" +
+                    "    \"msg\": \"成功。\"\n" +
+                    "}";
+        }
+        return JSONObject.parseObject(result);
+    }
 }
 }

+ 18 - 15
src/main/resources/mapper/zcustom/logistics/PlatHousingLandMapper.xml

@@ -13,33 +13,36 @@
 
 
     <select id="getStockOfEstateResources" parameterType="String" resultMap="LargeHousingLandResult">
     <select id="getStockOfEstateResources" parameterType="String" resultMap="LargeHousingLandResult">
         SELECT
         SELECT
-            count( 1 ) AS num,
-            sum( acreage ) AS acreage,
-            type
+        count( 1 ) AS num,
+        sum( acreage ) AS acreage,
+        type
         FROM
         FROM
-            large_plat_housing_land
-        <if test="appOrg != '0000'"> WHERE app_org = #{appOrg} </if>
+        large_plat_housing_land
+        WHERE del_flag = '0'
+        <if test="appOrg != '0000'"> AND app_org = #{appOrg} </if>
         GROUP BY
         GROUP BY
-            type
+        type
     </select>
     </select>
 
 
     <select id="getStockOfLandResources" parameterType="String" resultType="map">
     <select id="getStockOfLandResources" parameterType="String" resultType="map">
         SELECT
         SELECT
-            count( 1 ) AS num,
-            COUNT( CASE WHEN YEAR ( construction_time ) >= YEAR ( CURDATE()) THEN 1 END ) AS new,
-            COUNT( CASE WHEN ownership_flag = 1 THEN 1 END ) AS own
+        count( 1 ) AS num,
+        COUNT( CASE WHEN YEAR ( construction_time ) >= YEAR ( CURDATE()) THEN 1 END ) AS new,
+        COUNT( CASE WHEN ownership_flag = 1 THEN 1 END ) AS own
         FROM
         FROM
-            large_plat_housing_land
-        <if test="appOrg != '0000'"> WHERE app_org = #{appOrg} </if>
+        large_plat_housing_land
+        WHERE del_flag = '0'
+        <if test="appOrg != '0000'"> AND app_org = #{appOrg} </if>
     </select>
     </select>
 
 
     <select id="getInvestFinishState" parameterType="String" resultType="map">
     <select id="getInvestFinishState" parameterType="String" resultType="map">
         SELECT
         SELECT
-            COUNT( CASE WHEN YEAR ( construction_time ) >= YEAR ( CURDATE()) THEN 1 END ) AS new,
-            COUNT( CASE WHEN ( investment_plan_flag = 1 AND YEAR ( construction_time ) >= YEAR ( CURDATE())) THEN 1 END ) AS invest
+        COUNT( CASE WHEN YEAR ( construction_time ) >= YEAR ( CURDATE()) THEN 1 END ) AS new,
+        COUNT( CASE WHEN ( investment_plan_flag = 1 AND YEAR ( construction_time ) >= YEAR ( CURDATE())) THEN 1 END ) AS invest
         FROM
         FROM
-            large_plat_housing_land
-        <if test="appOrg != '0000'"> WHERE app_org = #{appOrg} </if>
+        large_plat_housing_land
+        WHERE del_flag = '0'
+        <if test="appOrg != '0000'"> AND app_org = #{appOrg} </if>
     </select>
     </select>
 
 
     <insert id="upload" parameterType="com.project.zcustom.domain.addional.LargeHousingLand">
     <insert id="upload" parameterType="com.project.zcustom.domain.addional.LargeHousingLand">

+ 19 - 0
src/main/resources/mapper/zcustom/unit/PlatBuildingMapper.xml

@@ -24,6 +24,15 @@
         <result property="waterStateTwo"    column="water_state_two"    />
         <result property="waterStateTwo"    column="water_state_two"    />
     </resultMap>
     </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>
+
     <select id="getCount" resultType="int">
     <select id="getCount" resultType="int">
         select count(*) from large_plat_building
         select count(*) from large_plat_building
     </select>
     </select>
@@ -103,6 +112,12 @@
         select room_load_one, room_load_two, room_load_three from large_plat_building_control
         select room_load_one, room_load_two, room_load_three from large_plat_building_control
     </select>
     </select>
 
 
+    <select id="getRoomLoadDetail" resultMap="LargePlatBuildingLoadDetailResult">
+        select * from large_plat_building_load_detail
+        where state = #{state}
+        <if test="kind != 0"> and kind = #{kind} </if>
+    </select>
+
     <select id="getWarnDevice" resultMap="LargeBuildingControlResult">
     <select id="getWarnDevice" resultMap="LargeBuildingControlResult">
         select warn_device, water_device_air_num, water_control_normal_num, water_control_abnormal_num from large_plat_building_control
         select warn_device, water_device_air_num, water_control_normal_num, water_control_abnormal_num from large_plat_building_control
     </select>
     </select>
@@ -119,6 +134,10 @@
         select water_state_one, water_state_two from large_plat_building_control
         select water_state_one, water_state_two from large_plat_building_control
     </select>
     </select>
 
 
+    <select id="getPhotovoltaicPower" resultType="String">
+        select photovoltaic_power from large_plat_building_control
+    </select>
+