cpT
2025-07-01 52a57d1a6cd61009304656db35e50d4b9dbbda03
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
37
38
39
40
41
42
43
44
45
46
47
package com.zy.asrs.service.impl;
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.zy.asrs.mapper.BasErrLogMapper;
import com.zy.asrs.entity.BasErrLog;
import com.zy.asrs.service.BasErrLogService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
 
import java.util.Date;
import java.util.List;
 
@Service("basErrLogService")
public class BasErrLogServiceImpl extends ServiceImpl<BasErrLogMapper, BasErrLog> implements BasErrLogService {
 
    @Override
    public BasErrLog findLatestByTaskNo(Integer crnNo, Integer taskNo) {
        List<BasErrLog> basErrLogs = this.baseMapper.selectList(new EntityWrapper<BasErrLog>().eq("crn_no", crnNo).eq("wrk_no", taskNo).orderBy("start_time", false));
        if (basErrLogs == null || basErrLogs.size() == 0) {
            return null;
        } else {
            return basErrLogs.get(0);
        }
    }
 
    @Override
    public BasErrLog findLatest(Integer crnNo) {
        List<BasErrLog> basErrLogs = this.baseMapper.selectList(new EntityWrapper<BasErrLog>().eq("crn_no", crnNo).orderBy("start_time", false));
        if (basErrLogs == null || basErrLogs.size() == 0) {
            return null;
        } else {
            return basErrLogs.get(0);
        }
    }
 
 
 
    @Override
    public List<BasErrLog> selectBasErrLogList(Integer taskNo, Integer crnNo, Integer plcNo, Integer status,String memo,Date modiTimeStart,Date modiTimeEnd, Integer curr, Integer limit) {
        return this.baseMapper.selectBasErrLogList(taskNo,crnNo,plcNo, status,memo,modiTimeStart,modiTimeEnd,curr,limit);
    }
 
    @Override
    public Long selectBasErrLogListTotal(Integer taskNo, Integer crnNo, Integer plcNo, Integer status,String memo,Date modiTimeStart,Date modiTimeEnd) {
        return this.baseMapper.selectBasErrLogListTotal(taskNo,crnNo,plcNo, status,memo,modiTimeStart,modiTimeEnd);
    }
}