自动化立体仓库 - WCS系统
#
luxiaotao1123
2022-03-14 2f662f2a75ca9af4d28a9af5eebe3d2a67c5c17c
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
package com.zy.asrs.service.impl;
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.zy.asrs.mapper.BasSteMapper;
import com.zy.asrs.entity.BasSte;
import com.zy.asrs.service.BasSteService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
@Slf4j
@Service("basSteService")
public class BasSteServiceImpl extends ServiceImpl<BasSteMapper, BasSte> implements BasSteService {
 
    @Override
    public BasSte findByCrnNo(Integer crnNo) {
        List<BasSte> basStes = this.selectList(new EntityWrapper<BasSte>().eq("crn_no", crnNo));
        if (Cools.isEmpty(basStes)) {
            return null;
        }
        if (basStes.size() > 1) {
            log.warn("目前有{}台穿梭车归属于{}号堆垛机!!!", basStes.size(), crnNo);
        }
        return basStes.get(0);
    }
 
    @Override
    public int updatePos(Integer row, Integer bay, Integer lev) {
        return this.baseMapper.updatePos(row, bay, lev);
    }
 
}