自动化立体仓库 - WCS系统
Junjie
2023-07-24 56a19be6c03e729b112bf8197960d7cc4d9d498e
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.zy.asrs.service.impl;
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.zy.asrs.entity.BasErrLog;
import com.zy.asrs.entity.BasSteErrLog;
import com.zy.asrs.mapper.BasSteErrLogMapper;
import com.zy.asrs.service.BasSteErrLogService;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
@Service("basSteErrLogService")
public class BasSteErrLogServiceImpl extends ServiceImpl<BasSteErrLogMapper, BasSteErrLog> implements BasSteErrLogService {
 
    @Override
    public BasSteErrLog findLatestByTaskNo(Integer steNo, Integer taskNo) {
        List<BasSteErrLog> basSteErrLogs = this.baseMapper.selectList(new EntityWrapper<BasSteErrLog>().eq("ste_no", steNo).eq("wrk_no", taskNo).orderBy("start_time", false));
        if (basSteErrLogs == null || basSteErrLogs.size() == 0) {
            return null;
        } else {
            return basSteErrLogs.get(0);
        }
    }
 
    @Override
    public BasSteErrLog findLatest(Integer steNo) {
        List<BasSteErrLog> basSteErrLogs = this.baseMapper.selectList(new EntityWrapper<BasSteErrLog>().eq("ste_no", steNo).orderBy("start_time", false));
        if (basSteErrLogs == null || basSteErrLogs.size() == 0) {
            return null;
        } else {
            return basSteErrLogs.get(0);
        }
    }
 
}