whyclxw
2021-12-14 fd1949dbeef0a743ee73684f019f6ea5a71671f0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.whyc.service;
 
import com.github.pagehelper.PageInfo;
import com.whyc.dto.Response;
import com.whyc.mapper.PwrdevAlarmParamMapper;
import com.whyc.mapper.PwrdevTimeAdjAlarmMapper;
import com.whyc.pojo.PwrdevTimeAdjAlarm;
import com.whyc.pojo.PwrdevTimeOutAlarm;
import com.whyc.pojo.UserInf;
import com.whyc.util.ActionUtil;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
@Service
public class PwrdevTimeAdjAlarmService {
 
    @Resource
    private PwrdevTimeAdjAlarmMapper mapper;
 
    @Resource
    private PwrdevAlarmParamMapper paramMapper;
 
 
    //监控主站告警
    public Response getList() {
        List<String> tablelist=paramMapper.getParamList();
        //取第一条记录,即param表
        String alarmParamTableName = tablelist.get(0);
        UserInf uinf= ActionUtil.getUser();
        List<PwrdevTimeAdjAlarm> list=mapper.getList(uinf.getUId().intValue(),alarmParamTableName);
        PageInfo pageInfo=new PageInfo(list);
        return  new Response().set(1,pageInfo);
    }
}