lv.wenbin 9 months ago
parent
commit
623f681b56

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

@@ -20,7 +20,7 @@ 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.PvSupplyH;
-import com.ruoyi.ems.service.IEmsPvSupplyHService;
+import com.ruoyi.ems.service.IElecPvSupplyHService;
 
 import io.swagger.annotations.Api;
 
@@ -35,7 +35,7 @@ import io.swagger.annotations.Api;
 @Api(value = "ElecPvSupplyHController", description = "光伏并网计量数据接口")
 public class ElecPvSupplyHController extends BaseController {
     @Autowired
-    private IEmsPvSupplyHService pvSupplyHService;
+    private IElecPvSupplyHService pvSupplyHService;
 
     /**
      * 查询光伏并网计量光伏并网计量-小时列表

+ 8 - 8
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IEmsPvSupplyHService.java → ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/IElecPvSupplyHService.java

@@ -11,7 +11,7 @@ import com.ruoyi.ems.domain.PvSupplyH;
  * @author ruoyi
  * @date 2024-08-02
  */
-public interface IEmsPvSupplyHService
+public interface IElecPvSupplyHService
 {
     /**
      * 查询光伏并网计量-小时
@@ -24,13 +24,13 @@ public interface IEmsPvSupplyHService
     /**
      * 查询光伏并网计量-小时列表
      *
-     * @param admEmsPvSupplyH 光伏并网计量-小时
+     * @param pvSupplyH 光伏并网计量-小时
      * @return 光伏并网计量-小时集合
      */
-     List<PvSupplyH> selectPvSupplyHList(PvSupplyH admEmsPvSupplyH);
+     List<PvSupplyH> selectPvSupplyHList(PvSupplyH pvSupplyH);
 
 
-     List<PvSupplyH> selectAreaSupplyH(PvSupplyH admEmsPvSupplyH);
+     List<PvSupplyH> selectAreaSupplyH(PvSupplyH pvSupplyH);
 
     List<Map<String, Object>> selectAreaSupplyHByThisDay(String areaCode);
 
@@ -40,18 +40,18 @@ public interface IEmsPvSupplyHService
     /**
      * 新增光伏并网计量-小时
      *
-     * @param admEmsPvSupplyH 光伏并网计量-小时
+     * @param pvSupplyH 光伏并网计量-小时
      * @return 结果
      */
-     int insertPvSupplyH(PvSupplyH admEmsPvSupplyH);
+     int insertPvSupplyH(PvSupplyH pvSupplyH);
 
     /**
      * 修改光伏并网计量-小时
      *
-     * @param admEmsPvSupplyH 光伏并网计量-小时
+     * @param pvSupplyH 光伏并网计量-小时
      * @return 结果
      */
-     int updatePvSupplyH(PvSupplyH admEmsPvSupplyH);
+     int updatePvSupplyH(PvSupplyH pvSupplyH);
 
     /**
      * 批量删除光伏并网计量-小时

+ 1 - 1
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/ElecPgSupplyHServiceImpl.java

@@ -48,7 +48,7 @@ public class ElecPgSupplyHServiceImpl implements IElecPgSupplyHService {
      */
     @Override
     public List<ElecPgSupplyH> selectPgSupplyHList(ElecPgSupplyH elecPgSupplyH) {
-        if (StringUtils.equals("all", elecPgSupplyH.getAreaCode())) {
+        if (StringUtils.equals("-1", elecPgSupplyH.getAreaCode())) {
             return pgSupplyHMapper.selectPgSupplyHAllArea(elecPgSupplyH);
         }
         else {

+ 3 - 3
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/EmsPvSupplyHServiceImpl.java → ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/ElecPvSupplyHServiceImpl.java

@@ -10,7 +10,7 @@ import org.springframework.stereotype.Service;
 import com.ruoyi.common.core.utils.DateTimeUtil;
 import com.ruoyi.ems.domain.PvSupplyH;
 import com.ruoyi.ems.mapper.ElecPvSupplyHMapper;
-import com.ruoyi.ems.service.IEmsPvSupplyHService;
+import com.ruoyi.ems.service.IElecPvSupplyHService;
 
 /**
  * 光伏并网计量光伏并网计量-小时Service业务层处理
@@ -19,7 +19,7 @@ import com.ruoyi.ems.service.IEmsPvSupplyHService;
  * @date 2024-08-02
  */
 @Service
-public class EmsPvSupplyHServiceImpl implements IEmsPvSupplyHService {
+public class ElecPvSupplyHServiceImpl implements IElecPvSupplyHService {
     @Autowired
     private ElecPvSupplyHMapper pvSupplyHMapper;
 
@@ -42,7 +42,7 @@ public class EmsPvSupplyHServiceImpl implements IEmsPvSupplyHService {
      */
     @Override
     public List<PvSupplyH> selectPvSupplyHList(PvSupplyH pvSupplyH) {
-        if (StringUtils.equals("all", pvSupplyH.getAreaCode())) {
+        if (StringUtils.equals("-1", pvSupplyH.getAreaCode())) {
             return pvSupplyHMapper.selectPvSupplyHAll(pvSupplyH);
         }
         else {

+ 1 - 1
ems-cloud/ems-modules/ems-server/src/main/java/com/ruoyi/ems/service/impl/ElecStoreServiceImpl.java

@@ -53,7 +53,7 @@ public class ElecStoreServiceImpl implements IElecStoreService {
      */
     @Override
     public List<ElecStoreH> selectHourList(ElecStoreH elecStoreH) {
-        if (StringUtils.equals("all", elecStoreH.getAreaCode())) {
+        if (StringUtils.equals("-1", elecStoreH.getAreaCode())) {
             return elecStoreHMapper.selectStoreHAllArea(elecStoreH);
         }
         else {

+ 3 - 3
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/ElecUseHMapper.xml

@@ -66,7 +66,7 @@
 
     <select id="selectElecUseHListSum" parameterType="com.ruoyi.ems.domain.ElecUseH" resultMap="elecUseHResult">
         select
-            <if test="areaCode != null and areaCode != ''">
+            <if test="areaCode != null and areaCode != '' and areaCode != '-1'">
               u.area_code,
               a.area_name,
               a.short_name as area_short_name,
@@ -91,7 +91,7 @@
               u.`time_index`,
               sum(COALESCE(u.elec_quantity,0)) elec_quantity
         from adm_ems_obj_use_h u
-            <if test="areaCode != null and areaCode != ''">
+            <if test="areaCode != null and areaCode != '' and areaCode != '-1'">
               LEFT JOIN adm_service_area a ON u.`area_code` = a.`area_code`
             </if>
             <if test="(facsCategory != null  and facsCategory != '') or (facsSubCategory != null  and facsSubCategory != '')">
@@ -105,7 +105,7 @@
               LEFT JOIN adm_ems_device d ON u.`obj_code` = d.`device_code`
             </if>
         <where>
-            <if test="areaCode != null and areaCode != ''">and u.area_code = #{areaCode}</if>
+            <if test="areaCode != null and areaCode != '' and areaCode != '-1'">and u.area_code = #{areaCode}</if>
             <if test="objCode != null and objCode != ''">and u.obj_code = #{objCode}</if>
             <if test="facsCategory != null and facsCategory != ''">and fa.facs_category = #{facsCategory}</if>
             <if test="facsSubCategory != null and facsSubCategory != ''">and fa.facs_subcategory = #{facsSubCategory}</if>

+ 1 - 1
ems-cloud/ems-modules/ems-server/src/main/resources/mapper/ems/EmsFacsMapper.xml

@@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="facsSubCategory != null  and facsSubCategory != ''"> and f.`facs_subcategory` = #{facsSubCategory}</if>
             <if test="facsModel != null  and facsModel != ''"> and f.`facs_model` = #{facsModel}</if>
             <if test="enable != null "> and f.`enable` = #{enable}</if>
-            <if test="refArea != null  and refArea != ''"> and f.`ref_area` = #{refArea}</if>
+            <if test="refArea != null and refArea != '' and refArea != '-1'"> and f.`ref_area` = #{refArea}</if>
         </where>
     </select>
     

+ 1 - 1
ems-cloud/sql/ems_sys.sql

@@ -189,7 +189,7 @@ insert into sys_menu values ('121',  '数据报表',       '3',    '6',  'analys
 insert into sys_menu values ('131',  '碳排计量',       '4',    '1',  'ca-emission',        'ca/emission',            '', 1, 0, 'C', '0', '0',   'ca-analysis:emission',   'caemission',     'admin', sysdate(), '', null, '碳排分析');
 insert into sys_menu values ('132',  '碳汇测算',       '4',    '2',  'ca-sink',            'ca/sink',                '', 1, 0, 'C', '0', '0',   'ca-analysis:sink',       'casink',         'admin', sysdate(), '', null, '碳汇分析');
 
-insert into sys_menu values ('141',  '设备状态',       '5',    '1',  'device-state',        'devmgr/state',           '', 1, 0, 'C', '0', '0',   'ems:device:list',        'devicestatus',   'admin', sysdate(), '', null, '设备状态');
+insert into sys_menu values ('141',  '设备属性',       '5',    '1',  'device-attr',         'devmgr/attr',           '', 1, 0, 'C', '0', '0',    'ems:device:list',        'deviceattr',     'admin', sysdate(), '', null, '设备属性');
 insert into sys_menu values ('142',  '设备台账',       '5',    '2',  'device-el',           'devmgr/el',              '', 1, 0, 'C', '0', '0',   'device:el',              'excel',          'admin', sysdate(), '', null, '设备台账');
 insert into sys_menu values ('143',  '设备告警',       '5',    '3',  'analysis-warn',       'analysis/device/warn',   '', 1, 0, 'C', '0', '0',   'analysis:device',        'deviceanalyze',  'admin', sysdate(), '', null, '设备分析');
 insert into sys_menu values ('144',  '手动抄表',       '5',    '4',  'meterRead-manual',    'devmgr/meterRead',       '', 1, 0, 'C', '0', '0',   'ems:meterReading:list',  'meterReading',   'admin', sysdate(), '', null, '手动抄表');