whyclxw
7 天以前 e77384436e2f6d454bcf2c4bb66f70bb6a2024a6
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,14 +47,12 @@
        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());
        }
        wrapper.orderByAsc("alm_id");
        PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
        //PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
        List<PwrdevAlarmParam> list = mapper.selectList(wrapper);
        if(list!=null && list.size()>0){
            for (PwrdevAlarmParam alm:list) {
@@ -88,8 +87,14 @@
                }*/
            }
        }
        PageInfo<PwrdevAlarmParam> pageInfo=new PageInfo(list);
        return new Response().setII(1,list!=null,pageInfo,"获取电源告警参数");
       // PageInfo<PwrdevAlarmParam> pageInfo=new PageInfo(list);
        return new Response().setIII(1,list!=null,list,pinf,"获取电源告警参数");
    }
    //获取电源告警参数(无参用于导出)
    public Response getPwrAlmParamToExport(Integer uid) {
        List<PwrdevAlarmParam> list = mapper.getPwrAlmParamToExport(uid);
        return new Response().setII(1,list!=null,list,"获取电源告警参数(无参用于导出)");
    }
    //修改电源告警参数
    public Response setPwrAlmParam(List<PwrdevAlarmParam> almparamList) {
@@ -101,4 +106,5 @@
        }
        return new Response().set(1,true,"修改电源告警参数");
    }
}