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);
|
}
|
}
|