| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.mapper.OrderDetlMapper; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Page<OrderDetl> getPakoutPage(Page<OrderDetl> page) { |
| | | page.setRecords(baseMapper.getPakoutPage(page.getCondition())); |
| | | page.setTotal(baseMapper.getPakoutPageCount(page.getCondition())); |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch) { |
| | | return this.baseMapper.selectItem(orderId, matnr, batch); |
| | | } |
| | |
| | | public OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch) { |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | if (orderDetl.getOrderId().equals(orderId) && orderDetl.getMatnr().equals(matnr)) { |
| | | if (!Cools.isEmpty(batch)) { |
| | | if (orderDetl.getBatch().equals(batch)) { |
| | | return orderDetl; |
| | | } |
| | | } else { |
| | | if (Cools.eq(batch, orderDetl.getBatch())) { |
| | | return orderDetl; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean increaseAnfme(Long orderId, String matnr, String batch, Double qty) { |
| | | return this.baseMapper.increaseAnfme(orderId, matnr, batch, qty) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean increase(Long orderId, String matnr, String batch, Double qty) { |
| | | return this.baseMapper.increase(orderId, matnr, batch, qty) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean decrease(String orderNo, String matnr, String batch, Double qty) { |
| | | int decrease = this.baseMapper.decrease(orderNo, matnr, batch, qty); |
| | | if (decrease == 0) { |
| | | return this.baseMapper.decrease(orderNo, matnr, null, qty) > 0; |
| | | } else { |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public boolean modifyStatus(Long orderId, Integer status) { |
| | | return this.baseMapper.modifyStatus(orderId, status) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public List<OrderDetl> selectRemainder(Long orderId) { |
| | | return this.baseMapper.selectRemainder(orderId); |
| | | } |
| | | |
| | | } |