自动化立体仓库 - WCS系统
#
luxiaotao1123
2020-12-28 678f43f99d4fe259c6ce3dabbc2563776c2a25f1
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
package com.zy.asrs.service.impl;
 
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.common.Cools;
import com.core.exception.CoolException;
import com.zy.asrs.entity.BasCrnp;
import com.zy.asrs.mapper.BasCrnpMapper;
import com.zy.asrs.service.BasCrnpService;
import org.springframework.stereotype.Service;
 
@Service("basCrnpService")
public class BasCrnpServiceImpl extends ServiceImpl<BasCrnpMapper, BasCrnp> implements BasCrnpService {
 
    @Override
    public BasCrnp checkSiteStatus(Integer crnId) {
        BasCrnp crnp = this.selectById(crnId);
        if (Cools.isEmpty(crnp)) {
            throw new CoolException(crnId + "号堆垛机不存在");
        }
        if ("N".equals(crnp.getInEnable())) {
            throw new CoolException(crnId + "堆垛机不可入");
        }
        if ("N".equals(crnp.getOutEnable())) {
            throw new CoolException(crnId + "堆垛机不可出");
        }
        return crnp;
    }
}