whyclxw
2025-02-05 4b659a6ece105f30debf0def9225b9a89c43bcd4
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
package com.whyc.service;
 
import com.github.pagehelper.PageInfo;
import com.whyc.dto.Response;
import com.whyc.pojo.db_lock_alarm.LockAlarmHis;
import com.whyc.pojo.db_lock_his.LockHis;
import com.whyc.util.SubTablePageInfoUtil;
import com.whyc.util.ThreadLocalUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.text.ParseException;
 
@Service
public class LockAlarmHisService {
    @Autowired
    private SubTablePageInfoUtil util;
 
    //查询锁告警的历史状态
    public Response getLockAlmHis(Integer lockId, Integer almId,String startTime, String endTime, int pageNum, int pageSize) throws ParseException {
        LockAlarmHis his=new LockAlarmHis();
        his.setLockId(lockId);
        his.setAlmId(almId);
        PageInfo pageInfo=util.getPageInfo(pageNum,pageSize, ThreadLocalUtil.parse(startTime,1),ThreadLocalUtil.parse(endTime,1)
                ,"db_lock_alarm","tb_lock_alarm_",his);
        return new Response().setII(1,pageInfo.getList()!=null,pageInfo,"查询锁告警的历史状态");
    }
}