whyclxw
7 天以前 a6018ae593fc2d2fb3ccfa4e7c34f28387326f6b
3.1电池/电源告警参数,1.2.7优良电源统计
17个文件已修改
7个文件已添加
412 ■■■■ 已修改文件
src/main/java/com/whyc/controller/AlmParamController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/dto/Statistic/Pwr7Stic.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/dto/Statistic/QuarterPwr7Res.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/mapper/ApptimeParamMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/mapper/BattInfMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/mapper/PowerInfMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/mapper/PowerPropertyParamMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/pojo/db_param/ApptimeParam.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/pojo/db_param/PowerPropertyParam.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/pojo/db_pwrdev_alarm/PwrdevAlarmParamStand.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/ApptimeParamService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BattAlmparamService.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BattInfService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BatttestdataInfService.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/PowerInfService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/PowerPropertyParamService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/PwrdevAlarmParamService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/PwrdevAlarmParamStandService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/PwrdevHistorydataIdService.java 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/SubTablePageInfoService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/util/ActionUtil.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/BattInfMapper.xml 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/PowerInfMapper.xml 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/PowerPropertyParamMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/controller/AlmParamController.java
@@ -52,8 +52,6 @@
    @PostMapping("getBattAlmParam")
    @ApiOperation("获取电池告警参数")
    public Response getBattAlmParam(@RequestBody ParamAlmDto dto){
        Integer uid=ActionUtil.getUser().getId();
        dto.setUid(uid);
        return battAlmparamService.getBattAlmParam(dto);
    }
@@ -85,8 +83,6 @@
    @PostMapping("getPwrAlmParam")
    @ApiOperation("获取电源告警参数")
    public Response getPwrAlmParam(@RequestBody ParamAlmDto dto){
        Integer uid=ActionUtil.getUser().getId();
        dto.setUid(uid);
        return pwrAlmparamService.getPwrAlmParam(dto);
    }
src/main/java/com/whyc/dto/Statistic/Pwr7Stic.java
@@ -12,12 +12,15 @@
    private String country;
    private String stationName;
    private String company;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date inuseStartTime;//开始时间
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date inuseEndTime;//结束时间
    //投入使用年限
    //全部不传
    //3年内 0~3年   3
    //5年内 0~5年   5
    //5年上 5年以上  1
    private Integer inuseYear;
    private Date pwrInUseTime;
    private String stationType;
    private Integer performance;//电池性能:1优秀,2劣化,3损坏 4未放电 不传全部
    private Integer performance;//电池性能:1优秀,2一般,3预警 4严重 不传全部
    private String groupName;
    private Integer uid;
    private Integer pageNum;
src/main/java/com/whyc/dto/Statistic/QuarterPwr7Res.java
@@ -10,7 +10,7 @@
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date recordDatetime;
    private Float acin1Vola;
    private Float acoutVola;
    private Float acoutCurra;
    private Float dcoutVol;
    private Float dcoutCurr;
}
src/main/java/com/whyc/mapper/ApptimeParamMapper.java
New file
@@ -0,0 +1,6 @@
package com.whyc.mapper;
import com.whyc.pojo.db_param.ApptimeParam;
public interface ApptimeParamMapper extends CustomMapper<ApptimeParam>{
}
src/main/java/com/whyc/mapper/BattInfMapper.java
@@ -62,5 +62,5 @@
    //获取站点下的电池组(下拉)
    List<BattInf> getBattByUid(@Param("uid") Integer uid, @Param("provice") String provice, @Param("city") String city, @Param("country") String country, @Param("stationName") String stationName);
    //根据查询条件获取电池组集合
    List<Integer> getBattgroupIdList(@Param("dto") ParamAlmDto dto);
    BattInf getBattgroupIdList(@Param("battgroupId") Integer battgroupId);
}
src/main/java/com/whyc/mapper/PowerInfMapper.java
@@ -35,5 +35,5 @@
    List<PowerInf> getListByUserId(Integer userId);
    //根据查询条件获取电源集合
    List<Integer> getPowerIdList(@Param("dto") ParamAlmDto dto);
    PowerInf getPowerIdList(@Param("powerId") Integer powerId);
}
src/main/java/com/whyc/mapper/PowerPropertyParamMapper.java
New file
@@ -0,0 +1,10 @@
package com.whyc.mapper;
import com.whyc.pojo.db_param.PowerPropertyParam;
import java.util.List;
public interface PowerPropertyParamMapper extends CustomMapper<PowerPropertyParam>{
    //获取电源优良判断的标准参数值
    List<PowerPropertyParam> getPwrStandardParam(Integer powerType);
}
src/main/java/com/whyc/pojo/db_param/ApptimeParam.java
New file
@@ -0,0 +1,49 @@
package com.whyc.pojo.db_param;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
 * <p>
 * 平台时间参数设置表
 * </p>
 *
 * @author lxw
 * @since 2025-06-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(schema = "db_param",value ="tb_apptime_param")
@ApiModel(value="ApptimeParam对象", description="平台时间参数设置表")
public class ApptimeParam implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "参数名称")
    private String paramName;
    @ApiModelProperty(value = "设置时间参数")
    private Date paramValue;
    @ApiModelProperty(value = "参数类别")
    private Integer categoryId;
    @ApiModelProperty(value = "参数英文名称")
    private String paramNamePsx;
}
src/main/java/com/whyc/pojo/db_param/PowerPropertyParam.java
New file
@@ -0,0 +1,56 @@
package com.whyc.pojo.db_param;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
 * <p>
 * 电源性能评估参考字段配置表
 * </p>
 *
 * @author lxw
 * @since 2025-06-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(schema = "db_param",value ="tb_power_property_param")
@ApiModel(value="PowerPropertyParam对象", description="电源性能评估参考字段配置表")
public class PowerPropertyParam implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "自增主键")
    @TableId(value = "num", type = IdType.AUTO)
    private Long num;
    @ApiModelProperty(value = "1:直流,2:通信,3配网")
    private Integer powerType;
    @ApiModelProperty(value = "字段名称")
    private String propertyName;
    @ApiModelProperty(value = "字段中文名称")
    private String propertyNameZh;
    @ApiModelProperty(value = "字段使能[0-未启用 1-启用]")
    private Integer fieldEn;
    @TableField(exist = false)
    private Float basisVal;
    @TableField(exist = false)
    private Float alarmLimithUpper;
    @TableField(exist = false)
    private Float alarmLimithLowper;
}
src/main/java/com/whyc/pojo/db_pwrdev_alarm/PwrdevAlarmParamStand.java
@@ -51,7 +51,7 @@
    private Float alarmLimith;
    @ApiModelProperty(value = "上上限阈值")
    private Float alarmLimithUpeper;
    private Float alarmLimithUpper;
    @ApiModelProperty(value = "下限阈值")
    private Float alarmLimitl;
src/main/java/com/whyc/service/ApptimeParamService.java
New file
@@ -0,0 +1,21 @@
package com.whyc.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.whyc.mapper.ApptimeParamMapper;
import com.whyc.pojo.db_param.ApptimeParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class ApptimeParamService {
    @Autowired(required = false)
    private ApptimeParamMapper mapper;
    public ApptimeParam getPwrPerformanceStrartTime(Integer powerId) {
        QueryWrapper apptimeParamWrapper=new QueryWrapper();
        apptimeParamWrapper.eq("param_name_psx","power_performance_strart_time");
        apptimeParamWrapper.last("limit 1");
        ApptimeParam apptimeParam=mapper.selectOne(apptimeParamWrapper);
        return apptimeParam;
    }
}
src/main/java/com/whyc/service/BattAlmparamService.java
@@ -10,11 +10,13 @@
import com.whyc.dto.Response;
import com.whyc.mapper.BattAlmparamMapper;
import com.whyc.pojo.db_param.BattAlmparam;
import com.whyc.pojo.db_station.BattInf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class BattAlmparamService {
@@ -26,11 +28,9 @@
    //获取电池告警参数
    public Response getBattAlmParam(ParamAlmDto dto) {
        //根据查询条件获取电池组集合
        List<Integer> idList=binfService.getBattgroupIdList(dto);
        BattInf binf=binfService.getBattgroupIdList(dto.getBattgroupId());
        QueryWrapper wrapper=new QueryWrapper();
        if(idList!=null){
            wrapper.in("battgroup_id",idList);
        }
        wrapper.eq("battgroup_id",dto.getBattgroupId());
        if(dto.getAlmIdList()!=null){
            wrapper.in("alm_id",dto.getAlmIdList());
        }
@@ -38,7 +38,7 @@
        //PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
        List<BattAlmparam> list = mapper.selectList(wrapper);
        //PageInfo<BattAlmparam> pageInfo=new PageInfo<>(list);
        return new Response().setII(1,list!=null,list,"获取电池告警参数");
        return new Response().setIII(1,list!=null,list,binf,"获取电池告警参数");
    }
    //修改电池告警参数
    public Response setBattAlmParam(List<BattAlmparam> almparamList) {
src/main/java/com/whyc/service/BattInfService.java
@@ -491,7 +491,7 @@
        return new Response().setII(1,list.size()>0,list,"获取站点下的电池组(下拉)");
    }
    //根据查询条件获取电池组集合
    public List<Integer> getBattgroupIdList(ParamAlmDto dto) {
        return mapper.getBattgroupIdList(dto);
    public  BattInf getBattgroupIdList(Integer battgroupId) {
        return mapper.getBattgroupIdList(battgroupId);
    }
}
src/main/java/com/whyc/service/BatttestdataInfService.java
@@ -4,6 +4,7 @@
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.whyc.constant.BattCapperformanceEnum;
import com.whyc.constant.PwrCapperformanceEnum;
import com.whyc.constant.StopReasonEnum;
import com.whyc.dto.Real.TestDataDto;
import com.whyc.dto.Response;
@@ -19,10 +20,12 @@
import com.whyc.pojo.db_station.PowerInf;
import com.whyc.pojo.db_user.Baojigroup;
import com.whyc.util.ActionUtil;
import com.whyc.util.DateUtil;
import com.whyc.util.PageInfoUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.*;
@Service
@@ -937,20 +940,28 @@
    }
   //优良电源数量统计(1.2.7)
    public Response getPwr7Statistic(Pwr7Stic stic) {
        Date inuseTimeStart =new Date();
        if(stic.getInuseYear()==1){
            //投入使用时间条件筛选
            LocalDateTime startTime = LocalDateTime.now().minusYears(5);
            inuseTimeStart = DateUtil.convertToDate(startTime);
        }else{
            //投入使用时间条件筛选
            LocalDateTime startTime = LocalDateTime.now().minusYears(stic.getInuseYear());
            inuseTimeStart = DateUtil.convertToDate(startTime);
        }
        stic.setPwrInUseTime(inuseTimeStart);
        //1查询符合条件的电池组
        List<PowerInf> pinfList=powerInfService.getPwr7Statistic(stic);
        if(pinfList==null||pinfList.size()==0){
            return new Response().set(1,false,"当前用户未管理满足条件的电池组");
            return new Response().set(1,false,"当前用户未管理满足条件的电源");
        }
        List<SticPwr7Res> reslist=new ArrayList<>();
        for (PowerInf pinf:pinfList) {
            SticPwr7Res res=new SticPwr7Res();
            //查询电池组所在的班组
            //查询电源所在的班组
            String groupName = bjService.getGroupName(pinf.getPowerId());
            if(groupName.equals("none")){
                continue;
            }else{
                if(stic.getGroupName()==null||res.getGroupName()==stic.getGroupName()){
            if (stic.getGroupName() == null || groupName == stic.getGroupName()) {
                    res.setProvice(pinf.getProvice());
                    res.setCity(pinf.getCity());
                    res.setCountry(pinf.getCountry());
@@ -960,12 +971,11 @@
                    res.setStationType(pinf.getStationType());
                    res.setGroupName(groupName);
                    res.setInuseTime(pinf.getPowerInuseTime());
                    Map<String,Integer> map=pwrHisdataIdService.getPwrQuarter7(pinf.getPowerId(),null);
                Integer performance= pwrHisdataIdService.getPwrQuarter7(pinf.getPowerId(),pinf.getPowerType());
                res.setPerformanceName(PwrCapperformanceEnum.getValue(performance));
                    reslist.add(res);
                }
            }
        }
        PageInfo pageInfo=PageInfoUtils.list2PageInfo(reslist, stic.getPageNum(), stic.getPageSize());
        return new Response().setII(1,reslist.size()>0,pageInfo,"优良电源数量统计(1.2.7)");
    }
src/main/java/com/whyc/service/PowerInfService.java
@@ -162,8 +162,8 @@
        return mapper.getListByUserId(userId);
    }
    //根据查询条件获取电源集合
    public List<Integer> getPowerIdList(ParamAlmDto dto) {
        return mapper.getPowerIdList(dto);
    public PowerInf getPowerIdList(Integer powerId) {
        return mapper.getPowerIdList(powerId);
    }
    //获取电源性能(下拉)
    public Response getPwrCapperformance() {
src/main/java/com/whyc/service/PowerPropertyParamService.java
New file
@@ -0,0 +1,22 @@
package com.whyc.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.whyc.mapper.PowerPropertyParamMapper;
import com.whyc.pojo.db_param.PowerPropertyParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service
public class PowerPropertyParamService {
    @Autowired(required = false)
    private PowerPropertyParamMapper mapper;
    //获取电源优良判断的标准参数值
    public List<PowerPropertyParam> getPwrStandardParam(Integer powerType) {
        List<PowerPropertyParam> list = mapper.getPwrStandardParam(powerType);
        return list;
    }
}
src/main/java/com/whyc/service/PwrdevAlarmParamService.java
@@ -13,6 +13,7 @@
import com.whyc.mapper.PwrdevAlarmParamMapper;
import com.whyc.pojo.db_param.BattAlmparam;
import com.whyc.pojo.db_pwrdev_alarm.PwrdevAlarmParam;
import com.whyc.pojo.db_station.PowerInf;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -36,7 +37,7 @@
    //获取电源告警参数
    public Response getPwrAlmParam(ParamAlmDto dto) {
        //根据查询条件获取电源集合
        List<Integer> idList=pinfService.getPowerIdList(dto);
        PowerInf pinf=pinfService.getPowerIdList(dto.getPowerId());
        /*Map<String, List<PwrdevAlarmParam>> map=new HashMap<>();
        List<PwrdevAlarmParam> almmap30=new ArrayList<>();
        List<PwrdevAlarmParam> almmap31=new ArrayList<>();
@@ -46,9 +47,7 @@
        List<PwrdevAlarmParam> almmap35=new ArrayList<>();
        List<PwrdevAlarmParam> almmap36=new ArrayList<>();*/
        QueryWrapper wrapper=new QueryWrapper();
        if(idList!=null){
            wrapper.in("power_id",idList);
        }
        wrapper.eq("power_id",dto.getPowerId());
        if(dto.getAlmIdList()!=null){
            wrapper.in("alm_id",dto.getAlmIdList());
        }
@@ -89,7 +88,7 @@
            }
        }
       // PageInfo<PwrdevAlarmParam> pageInfo=new PageInfo(list);
        return new Response().setII(1,list!=null,list,"获取电源告警参数");
        return new Response().setIII(1,list!=null,list,pinf,"获取电源告警参数");
    }
    //修改电源告警参数
    public Response setPwrAlmParam(List<PwrdevAlarmParam> almparamList) {
src/main/java/com/whyc/service/PwrdevAlarmParamStandService.java
@@ -46,8 +46,8 @@
        if(stand.getAlarmLimitl()!=null){
            wrapper.set("alarm_limitl",stand.getAlarmLimitl());
        }
        if(stand.getAlarmLimithUpeper()!=null){
            wrapper.set("alarm_limith_upeper",stand.getAlarmLimithUpeper());
        if(stand.getAlarmLimithUpper()!=null){
            wrapper.set("alarm_limith_upper",stand.getAlarmLimithUpper());
        }
        if(stand.getAlarmLimitlLower()!=null){
            wrapper.set("alarm_limitl_lower",stand.getAlarmLimitlLower());
src/main/java/com/whyc/service/PwrdevHistorydataIdService.java
@@ -1,5 +1,6 @@
package com.whyc.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.whyc.dto.Real.CompareDto;
import com.whyc.dto.Real.PwrHisRealAcInDto;
import com.whyc.dto.Real.PwrHisRealDcoutInDto;
@@ -9,6 +10,8 @@
import com.whyc.mapper.CommonMapper;
import com.whyc.pojo.db_data_history.BattRealdataId;
import com.whyc.pojo.db_data_history.PwrdevHistorydataId;
import com.whyc.pojo.db_param.ApptimeParam;
import com.whyc.pojo.db_param.PowerPropertyParam;
import com.whyc.pojo.db_station.PowerInf;
import com.whyc.util.ActionUtil;
import org.springframework.beans.factory.annotation.Autowired;
@@ -31,6 +34,12 @@
    @Autowired
    private PowerInfService  powerInfService;
    @Autowired
    private ApptimeParamService  apptimeParamService;
    @Autowired
    private PowerPropertyParamService  propertyParamService;
    //系统概览获取半小时交流输入统计
    public Response getHalfHourPwrHisAcinData(Integer powerId,Integer granularity) {
@@ -76,13 +85,23 @@
        return new Response().setIII(1,datalist.size()>0,datalist,modelCfg,"获取半小时内直流输出统计");
    }
    //1.2.7优良电源统计上一季度的电源某一属性和参数阈值超过的次数
    public Map<String,Integer> getPwrQuarter7(Integer powerId, Map<String,Float> paramValue) {
    public Integer getPwrQuarter7(Integer powerId,Integer powerType) {
        Map<String,Integer> map=new HashMap<>();
        map.put("acin1Vola",0);
        map.put("acoutVola",0);
        map.put("acin1_vola",0);
        map.put("acout_curra",0);
        map.put("dcoutVol",0);
        map.put("dcoutCurr",0);
        List<String> datelist = ActionUtil.getLastQuarterYearMonths();
        //获取优良电源性能统计在平台上的时间参数设置表
        ApptimeParam apptimeParam=apptimeParamService.getPwrPerformanceStrartTime(powerId);
        //获取指定时间到当前时间一共多少月的集合
        List<String> datelist=ActionUtil.getDateListBetweenDates(apptimeParam.getParamValue(), new Date());
        //获取电源优良判断的标准参数值
        List<PowerPropertyParam> paramList=propertyParamService.getPwrStandardParam(powerType);
        Map<String,Float> paramValues=new HashMap<>();
        for (PowerPropertyParam param : paramList) {
            paramValues.put(param.getPropertyName()+"_upper", param.getBasisVal()*param.getAlarmLimithUpper());
            paramValues.put(param.getPropertyName()+"_lower", param.getBasisVal()*param.getAlarmLimithLowper());
        }
        for (int i=0;i<datelist.size();i++) {
            String date=datelist.get(i);
            String tableName ="db_data_history.tb_pwrdev_historydata_"+powerId+"_"+date;
@@ -94,20 +113,28 @@
            List<QuarterPwr7Res> datalist=subTablePageInfoService.getPwrQuarter7(tableName);
            // 遍历 dataList 并比较属性值
            for (QuarterPwr7Res data : datalist) {
                if (data.getAcin1Vola() > paramValue.get("acin1Vola")) {
                    map.put("acin1Vola", map.get("acin1Vola") + 1);
                if(paramValues.get("acin1_vola_upper")!=null){
                    if ((data.getAcin1Vola() > paramValues.get("acin1_vola_upper"))||(data.getAcin1Vola() < paramValues.get("acin1_vola_lower"))) {
                        map.put("acin1_vola", map.get("acin1_vola") + 1);
                }
                if (data.getAcoutVola() > paramValue.get("acoutVola")) {
                    map.put("acoutVola", map.get("acoutVola") + 1);
                }
                if (data.getDcoutVol() > paramValue.get("dcoutVol")) {
                    map.put("dcoutVol", map.get("dcoutVol") + 1);
                if(paramValues.get("acout_curra_upper")!=null) {
                    if ((data.getAcoutCurra() > paramValues.get("acout_curra_upper")) || (data.getAcoutCurra() < paramValues.get("acout_curra_lower"))) {
                        map.put("acout_curra", map.get("acout_curra") + 1);
                }
                if (data.getDcoutCurr() > paramValue.get("dcoutCurr")) {
                    map.put("dcoutCurr", map.get("dcoutCurr") + 1);
                }
                if(paramValues.get("dcout_vol_upper")!=null) {
                    if ((data.getDcoutVol() > paramValues.get("dcout_vol_upper")) || (data.getDcoutVol() < paramValues.get("dcout_vo_lower"))) {
                        map.put("dcout_vol", map.get("dcout_vol") + 1);
                    }
                }
                if(paramValues.get("dcout_curr_upper")!=null) {
                    if ((data.getDcoutCurr() > paramValues.get("dcout_curr_upper")) || (data.getDcoutCurr() < paramValues.get("dcout_curr_lower"))) {
                        map.put("dcout_curr", map.get("dcout_curr") + 1);
                }
            }
        }
        return map;
        }
        return 1;
    }
}
src/main/java/com/whyc/service/SubTablePageInfoService.java
@@ -794,7 +794,7 @@
    }
    //1.2.7优良电源统计上一季度的电源某一属性和参数阈值超过的次数
    public List<QuarterPwr7Res> getPwrQuarter7(String tableName) {
        String sql=" select  distinct record_datetime,acin1_vola,acout_vola,dcout_vol,dcout_curr " +
        String sql=" select  distinct record_datetime,acin1_vola,acout_curra,dcout_vol,dcout_curr " +
                " from "+tableName+" " ;
        sql+=" order by record_datetime asc";
        List<QuarterPwr7Res> list = sqlExecuteService.executeQuery_call(sql, new CallBack() {
@@ -805,7 +805,7 @@
                    QuarterPwr7Res data=new QuarterPwr7Res();
                    data.setRecordDatetime(rs.getTimestamp("record_datetime"));
                    data.setAcin1Vola(rs.getFloat("acin1_vola"));
                    data.setAcoutVola(rs.getFloat("acout_vola"));
                    data.setAcoutCurra(rs.getFloat("acout_curra"));
                    data.setDcoutVol(rs.getFloat("dcout_vol"));
                    data.setDcoutCurr(rs.getFloat("dcout_curr"));
                    list.add(data);
src/main/java/com/whyc/util/ActionUtil.java
@@ -18,6 +18,7 @@
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -27,6 +28,7 @@
    public static String time_yyyyMMddHHmmss = "yyyy-MM-dd HH:mm:ss";
    public static String time_yyyyMMdd = "yyyy-MM-dd";
    public static String time_yyyyMM = "yyyy-MM";
    public static String time_yyyyMMdd_HH_mm_ss = "yyyy-MM-dd_HH_mm_ss";
    public static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    public static SimpleDateFormat sdfwithOutday = new SimpleDateFormat("yyyy_MM");
@@ -637,5 +639,27 @@
        }
        return lang;
    }
     //两时间之间的年月集合
    public static List<String> getDateListBetweenDates(Date startTime, Date endTime) {
        // 指定开始日期和结束日期
        LocalDate startDate = LocalDate.of(startTime.getYear() + 1900, startTime.getMonth() + 1, startTime.getDay()); // 示例起始日期
        LocalDate endDate = LocalDate.of(endTime.getYear() + 1900, endTime.getMonth() + 1, endTime.getDay());  // 示例结束日期
        List<String> dateList = new ArrayList<>();
        LocalDate currentDate = startDate;
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern(ActionUtil.time_yyyyMM);
        while (!currentDate.isAfter(endDate)) {
            String formattedDate = currentDate.format(formatter);
            dateList.add(formattedDate);
            currentDate = currentDate.plusMonths(1);
        }
        return dateList;
    }
    public static void main(String[] args) throws ParseException {
        List<String> dateList =getDateListBetweenDates(ActionUtil.sdf.parse("2025-01-01 00:00:00"),new Date());
        for (String date : dateList) {
            System.out.println(date);
        }
    }
}    
src/main/resources/mapper/BattInfMapper.xml
@@ -466,32 +466,16 @@
            </if>
        </where>
    </select>
    <select id="getBattgroupIdList" resultType="java.lang.Integer">
        select distinct battgroup_id from db_station.tb_batt_inf,db_station.tb_station_inf
    <select id="getBattgroupIdList" resultType="com.whyc.pojo.db_station.BattInf">
        select distinct tb_batt_inf.*
        ,tb_station_inf.station_type,tb_station_inf.station_name,tb_station_inf.provice,tb_station_inf.city,tb_station_inf.country,tb_station_inf.full_name
        from db_station.tb_batt_inf,db_station.tb_station_inf
        <where>
            tb_batt_inf.station_id=tb_station_inf.station_id
            <if test="dto.provice!=null">
                and tb_station_inf.provice=#{dto.provice}
            </if>
            <if test="dto.city!=null">
                and tb_station_inf.city=#{dto.city}
            </if>
            <if test="dto.country!=null">
                and tb_station_inf.country=#{dto.country}
            </if>
            <if test="dto.stationId!=null">
                and tb_station_inf.station_id=#{dto.stationId}
            </if>
            <if test="dto.battgroupId!=null">
                and battgroup_id.battgroup_id=#{dto.battgroupId}
            </if>
            <if test="dto.uid>100">
                and tb_station_inf.station_id in(
                select distinct station_id from db_user.tb_baojigroup_power,db_user.tb_baojigroup_usr
                where   tb_baojigroup_power.baoji_group_id=tb_baojigroup_usr.baoji_group_id
                and tb_baojigroup_usr.uid=#{dto.uid}
                )
            <if test="battgroupId!=null">
                and tb_batt_inf.battgroup_id=#{battgroupId}
            </if>
        </where>
        limit 1
    </select>
</mapper>
src/main/resources/mapper/PowerInfMapper.xml
@@ -145,11 +145,14 @@
                <if test="stic.company!=null">
                    and tb_power_inf.company=#{stic.company}
                </if>
                <if test="stic.inuseStartTime!=null">
                    and tb_power_inf.power_inuse_time>=#{stic.inuseStartTime}
                <if test="stic.inuseYear!=null">
                    <if test="stic.inuseYear==1">
                        and tb_power_inf.power_inuse_time&lt;=#{stic.pwrInUseTime}
                </if>
                <if test="stic.inuseEndTime!=null">
                    and tb_power_inf.power_inuse_time&lt;=#{stic.inuseEndTimee}
                    <if test="stic.inuseYear!=1">
                        and tb_power_inf.power_inuse_time>=#{stic.pwrInUseTime}
                    </if>
                </if>
                <if test="stic.uid>100">
                    and tb_power_inf.power_id in(
@@ -169,33 +172,17 @@
            and bu.uid = #{userId}
        )
    </select>
    <select id="getPowerIdList" resultType="java.lang.Integer">
        select distinct power_id from db_station.tb_power_inf,db_station.tb_station_inf
    <select id="getPowerIdList" resultType="com.whyc.pojo.db_station.PowerInf">
        select distinct tb_power_inf.*
        ,tb_station_inf.station_type,tb_station_inf.station_name,tb_station_inf.provice,tb_station_inf.city,tb_station_inf.country,tb_station_inf.full_name
        from db_station.tb_power_inf,db_station.tb_station_inf
        <where>
            tb_power_inf.station_id=tb_station_inf.station_id
            <if test="dto.provice!=null">
                and tb_station_inf.provice=#{dto.provice}
            </if>
            <if test="dto.city!=null">
                and tb_station_inf.city=#{dto.city}
            </if>
            <if test="dto.country!=null">
                and tb_station_inf.country=#{dto.country}
            </if>
            <if test="dto.stationId!=null">
                and tb_station_inf.station_id=#{dto.stationId}
            </if>
            <if test="dto.powerId!=null">
                and tb_power_inf.power_id=#{dto.powerId}
            </if>
            <if test="dto.uid>100">
                and tb_power_inf.power_id in(
                select distinct power_id from db_user.tb_baojigroup_power,db_user.tb_baojigroup_usr
                where   tb_baojigroup_power.baoji_group_id=tb_baojigroup_usr.baoji_group_id
                and tb_baojigroup_usr.uid=#{dto.uid}
                )
            <if test="powerId!=null">
                and tb_power_inf.power_id=#{powerId}
            </if>
        </where>
        limit 1
    </select>
</mapper>
src/main/resources/mapper/PowerPropertyParamMapper.xml
New file
@@ -0,0 +1,12 @@
<?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.whyc.mapper.PowerPropertyParamMapper">
    <select id="getPwrStandardParam" resultType="com.whyc.pojo.db_param.PowerPropertyParam">
        select tb_power_property_param.*
             ,tb_pwrdev_alarm_param_stand.basis_val,tb_pwrdev_alarm_param_stand.alarm_limith_upper,tb_pwrdev_alarm_param_stand.alarm_limitl_lower
        from db_param.tb_power_property_param,db_pwrdev_alarm.tb_pwrdev_alarm_param_stand
        where tb_power_property_param.property_name=tb_pwrdev_alarm_param_stand.property_name
              and tb_power_property_param.power_type=#{powerType}
    </select>
</mapper>