| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.AcQuantity; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.zy.asrs.entity.WrkDetl; |
| | |
| | | page.setRecords(baseMapper.getPakoutPage(page.getCondition())); |
| | | page.setTotal(baseMapper.getPakoutPageCount(page.getCondition())); |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | | public List<AcQuantity> loadQuantity(String orderNo){ |
| | | return baseMapper.loadQuantity(orderNo); |
| | | } |
| | | |
| | | @Override |
| | |
| | | List<OrderDetl> detlList = selectItem(waitPakin.getOrderNo()); |
| | | for (OrderDetl orderDetl : detlList) { |
| | | if (MatCompareUtils.compare(orderDetl, waitPakin)) { |
| | | Double workQty = orderDetl.getWorkQty(); |
| | | //防止减成负数 |
| | | if (workQty - qty <= 0) { |
| | | qty = workQty; |
| | | } |
| | | int decrease = this.baseMapper.decrease2(orderDetl.getId(), qty); |
| | | if (decrease == 0) { |
| | | return false; |
| | |
| | | @Override |
| | | public boolean increaseQtyByOrderNo(String orderNo, WrkDetl wrkDetl, Double qty) { |
| | | List<OrderDetl> detlList = this.baseMapper.listByOrderNo(orderNo); |
| | | if (detlList == null || detlList.isEmpty()){ |
| | | if (detlList == null || detlList.isEmpty()) { |
| | | return false; |
| | | } |
| | | for (OrderDetl orderDetl : detlList){ |
| | | if (MatCompareUtils.compare(orderDetl, wrkDetl)){ |
| | | for (OrderDetl orderDetl : detlList) { |
| | | if (MatCompareUtils.compare(orderDetl, wrkDetl)) { |
| | | return this.baseMapper.increaseQtyById(orderDetl.getId(), qty) > 0; |
| | | } |
| | | } |