自动化立体仓库 - WCS系统
zyx
2024-01-30 5e2db58fe16732b3a9d30f0476e9c4c0c8fcab02
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
package com.zy.asrs.service.impl;
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.exception.CoolException;
import com.zy.asrs.entity.StaDesc;
import com.zy.asrs.mapper.StaDescMapper;
import com.zy.asrs.service.StaDescService;
import org.springframework.stereotype.Service;
 
@Service("staDescService")
public class StaDescServiceImpl extends ServiceImpl<StaDescMapper, StaDesc> implements StaDescService {
 
    @Override
    public StaDesc queryCrnStn(Integer typeNo, Integer crnNo, Integer stnNo) {
        Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>()
                .eq("type_no", typeNo)
                .eq("stn_no", stnNo)
                .eq("crn_no", crnNo);
        StaDesc staDesc = this.selectOne(wrapper);
        if (staDesc == null) {
            throw new CoolException("出库路径不存在");
        }
        return staDesc;
    }
 
    @Override
    public StaDesc queryCrn(Integer typeNo, Integer stnNo,Integer crnNo) {
        Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>()
                .eq("type_no", typeNo)
                .eq("stn_no", stnNo)
                .eq("crn_no",crnNo);
        StaDesc staDesc = this.selectOne(wrapper);
        if (staDesc == null) {
            return null;
        }
        return staDesc;
    }
}