自动化立体仓库 - WCS系统
野心家
2025-01-07 a8d50dc00026ce066403632cb96b4ee3ce6de783
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
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.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);
        }
    }
}