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