| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | if ("0".equals(stockInRecord.getType())) { |
| | | // 合格入库 -> 先查库存,存在则更新,不存在则新增 |
| | | StockInventory stockInventory = getStockInventory(stockInRecord.getProductModelId(), stockInRecord.getBatchNo()); |
| | | if (stockInventory.getLocked().equals( true)&&!stockInRecord.getRecordType().equals(StockInQualifiedRecordTypeEnum.INVENTORY_CHECK_STOCK_IN.getCode())) { |
| | | throw new BaseException("正在库存盘点,无法入库,入库批次:" + stockInRecord.getInboundBatches()); |
| | | if (!ObjectUtils.isEmpty(stockInventory)) { |
| | | if (stockInventory.getLocked().equals( true)&&!stockInRecord.getRecordType().equals(StockInQualifiedRecordTypeEnum.INVENTORY_CHECK_STOCK_IN.getCode())) { |
| | | throw new BaseException("正在库存盘点,无法入库,入库批次:" + stockInRecord.getInboundBatches()); |
| | | } |
| | | } |
| | | StockInventoryDto stockInventoryDto = new StockInventoryDto(); |
| | | stockInventoryDto.setProductModelId(stockInRecord.getProductModelId()); |