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