| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.mapper.OrderDetlMapper; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | |
| | | |
| | | @Override |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch, String csocode, String isoCode) { |
| | | return this.baseMapper.selectItem(orderId,matnr,batch,csocode,isoCode); |
| | | List<OrderDetl> orderDetls = this.baseMapper.selectItem(orderId, matnr, batch, csocode, isoCode); |
| | | if (orderDetls.isEmpty()) { |
| | | return null; |
| | | } else if (orderDetls.size() > 1) { |
| | | throw new CoolException("订单明细查询到多条记录"); |
| | | } |
| | | return orderDetls.get(0); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String csocode, String isoCode) { |
| | | return this.baseMapper.selectItemByOrderNo(orderNo, matnr, batch,csocode,isoCode); |
| | | List<OrderDetl> orderDetls = this.baseMapper.selectItemByOrderNo(orderNo, matnr, batch, csocode, isoCode); |
| | | if (orderDetls.isEmpty()) { |
| | | return null; |
| | | } else if (orderDetls.size() > 1) { |
| | | throw new CoolException("订单明细查询到多条记录"); |
| | | } |
| | | return orderDetls.get(0); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl selectItem(String orderNo, String matnr, String threeCode) { |
| | | return this.baseMapper.selectItemByOrderNo2(orderNo, matnr, threeCode); |
| | | public OrderDetl selectItem(String orderNo, String matnr, String batch, String threeCode) { |
| | | List<OrderDetl> orderDetls = this.baseMapper.selectItemByOrderNo2(orderNo, matnr, batch, threeCode); |
| | | if (orderDetls.isEmpty()) { |
| | | return null; |
| | | } else if (orderDetls.size() > 1) { |
| | | throw new CoolException("订单明细查询到多条记录"); |
| | | } |
| | | return orderDetls.get(0); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public OrderDetl selectItemNoneOfBatch(String orderNo, String matnr) { |
| | | return this.baseMapper.selectItemNoneOfBatch(orderNo, matnr); |
| | | List<OrderDetl> orderDetls = this.baseMapper.selectItemNoneOfBatch(orderNo, matnr); |
| | | if (orderDetls.isEmpty()) { |
| | | return null; |
| | | } else if (orderDetls.size() > 1) { |
| | | throw new CoolException("订单明细查询到多条记录"); |
| | | } |
| | | return orderDetls.get(0); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl selectItemOfBatch(String matnr, String batch) { |
| | | return this.baseMapper.selectItemOfBatch(matnr, batch); |
| | | List<OrderDetl> orderDetls = this.baseMapper.selectItemOfBatch(matnr, batch); |
| | | if (orderDetls.isEmpty()) { |
| | | return null; |
| | | } else if (orderDetls.size() > 1) { |
| | | throw new CoolException("订单明细查询到多条记录"); |
| | | } |
| | | return orderDetls.get(0); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public OrderDetl selectByOrderNoAndMatnr(String orderNo, String matnr, String csocode, String isoseq) { |
| | | Wrapper<OrderDetl> wrapper = new EntityWrapper<OrderDetl>().eq("order_no", orderNo).eq("matnr", matnr); |
| | | Utils.wapperSetCondition(wrapper,"three_code",csocode); |
| | | Utils.wapperSetCondition(wrapper,"dead_time",isoseq); |
| | | Utils.wapperSetCondition(wrapper, "three_code", csocode); |
| | | Utils.wapperSetCondition(wrapper, "dead_time", isoseq); |
| | | |
| | | return this.selectOne(wrapper); |
| | | } |