| | |
| | | return battAlmparamService.getBattAlmParam(dto); |
| | | } |
| | | |
| | | @GetMapping("getBattAlmParamToExport") |
| | | @ApiOperation("获取电池告警参数(无参用于导出)") |
| | | public Response getBattAlmParamToExport(){ |
| | | Integer uid=ActionUtil.getUser().getId(); |
| | | return battAlmparamService.getBattAlmParamToExport(uid); |
| | | } |
| | | |
| | | @PostMapping("setBattAlmParam") |
| | | @ApiOperation("修改电池告警参数") |
| | | public Response setBattAlmParam(@RequestBody List<BattAlmparam> almparamList){ |
| | |
| | | return pwrAlmparamService.getPwrAlmParam(dto); |
| | | } |
| | | |
| | | |
| | | @GetMapping("getPwrAlmParamToExport") |
| | | @ApiOperation("获取电源告警参数(无参用于导出)") |
| | | public Response getPwrAlmParamToExport(){ |
| | | Integer uid=ActionUtil.getUser().getId(); |
| | | return pwrAlmparamService.getPwrAlmParamToExport(uid); |
| | | } |
| | | @PostMapping("setPwrAlmParam") |
| | | @ApiOperation("修改电源告警参数") |
| | | public Response setPwrAlmParam(@RequestBody List<PwrdevAlarmParam> almparamList){ |
| | |
| | | public interface BattAlmparamMapper extends CustomMapper<BattAlmparam>{ |
| | | //获取电池告警参数 |
| | | List<BattAlmparam> getBattAlmParam(@Param("almDto") AlmDto almDto); |
| | | //获取电池告警参数(无参用于导出) |
| | | List<BattAlmparam> getBattAlmParamToExport(@Param("uid") Integer uid); |
| | | } |
| | |
| | | public interface PwrdevAlarmParamMapper extends CustomMapper<PwrdevAlarmParam>{ |
| | | //获取电源告警参数 |
| | | List<PwrdevAlarmParam> getPwrAlmParam(@Param("almDto") AlmDto almDto); |
| | | //获取电源告警参数(无参用于导出) |
| | | List<PwrdevAlarmParam> getPwrAlmParamToExport(@Param("uid") Integer uid); |
| | | } |
| | |
| | | @ApiModelProperty(value = "下下限告警使能") |
| | | private Integer almLowCoeLowerEn; |
| | | |
| | | @ApiModelProperty(value = "告警延迟时长[单位:秒]") |
| | | private Integer almDelayTime; |
| | | |
| | | @TableField(exist = false) |
| | | private String provice; |
| | | |
| | |
| | | //PageInfo<BattAlmparam> pageInfo=new PageInfo<>(list); |
| | | return new Response().setIII(1,list!=null,list,binf,"获取电池告警参数"); |
| | | } |
| | | //获取电池告警参数(无参用于导出) |
| | | public Response getBattAlmParamToExport(Integer uid) { |
| | | //获取所有的电池组id |
| | | List<BattAlmparam> list = mapper.getBattAlmParamToExport(uid); |
| | | return new Response().setII(1,list!=null,list,"获取电池告警参数"); |
| | | } |
| | | //修改电池告警参数 |
| | | public Response setBattAlmParam(List<BattAlmparam> almparamList) { |
| | | for (BattAlmparam param:almparamList) { |
| | |
| | | // 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) { |
| | | for (PwrdevAlarmParam param:almparamList) { |
| | |
| | | } |
| | | return new Response().set(1,true,"修改电源告警参数"); |
| | | } |
| | | |
| | | } |
| | |
| | | order by tb_batt_inf.dev_id asc,battgroup_id asc |
| | | </where> |
| | | </select> |
| | | <select id="getBattAlmParamToExport" resultType="com.whyc.pojo.db_param.BattAlmparam"> |
| | | select distinct tb_batt_almparam.*,tb_batt_inf.battgroup_name |
| | | ,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,db_param.tb_batt_almparam |
| | | <where> |
| | | tb_batt_inf.battgroup_id=tb_batt_almparam.battgroup_id |
| | | and tb_batt_inf.station_id=tb_station_inf.station_id |
| | | <if test="uid>100"> |
| | | and tb_batt_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=#{uid} |
| | | ) |
| | | </if> |
| | | order by tb_batt_inf.dev_id asc,battgroup_id asc |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | order by tb_power_inf.power_id asc |
| | | </where> |
| | | </select> |
| | | <select id="getPwrAlmParamToExport" resultType="com.whyc.pojo.db_pwrdev_alarm.PwrdevAlarmParam"> |
| | | select distinct tb_pwrdev_alarm_param.*,tb_power_inf.power_name |
| | | ,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,db_pwrdev_alarm.tb_pwrdev_alarm_param |
| | | <where> |
| | | tb_power_inf.power_id=tb_pwrdev_alarm_param.power_id |
| | | and tb_power_inf.station_id=tb_station_inf.station_id |
| | | <if test="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=#{uid} |
| | | ) |
| | | </if> |
| | | order by tb_power_inf.power_id asc |
| | | </where> |
| | | </select> |
| | | </mapper> |