| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.DalmDto; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | |
| | | ,"db_alarm", "tb_devalarm_data", dto); |
| | | return new Response().setII(1,pageInfo!=null,pageInfo,"获取设备告警信息"); |
| | | } |
| | | //确认实时告警 |
| | | public Response confiirmAlm(int devId) { |
| | | UserInf uinf= ActionUtil.getUser(); |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.set("alm_is_confirmed",1); |
| | | wrapper.set("confirmed_uid",uinf.getUid()); |
| | | wrapper.set("confirmed_time",new Date()); |
| | | wrapper.eq("dev_id",devId); |
| | | int flag=mapper.update((DevalarmData) ActionUtil.objeNull,wrapper); |
| | | return new Response().set(1,flag>0,"确认实时告警"); |
| | | } |
| | | } |