| | |
| | | newStockInventory.setBatchNo(stockInventoryDto.getBatchNo()); |
| | | newStockInventory.setLockedQuantity(stockInventoryDto.getLockedQuantity()); |
| | | newStockInventory.setWarnNum(stockInventoryDto.getWarnNum()); |
| | | stockInventoryMapper.insert(newStockInventory); |
| | | try { |
| | | stockInventoryMapper.insert(newStockInventory); |
| | | } catch (org.springframework.dao.DuplicateKeyException e) { |
| | | stockInventoryMapper.updateAddStockInventory(stockInventoryDto); |
| | | } |
| | | } else { |
| | | stockInventoryMapper.updateAddStockInventory(stockInventoryDto); |
| | | } |
| | |
| | | stockInRecordDto.setProductModelId(stockInventoryDto.getProductModelId()); |
| | | stockInRecordDto.setType("0"); |
| | | stockInRecordDto.setRemark(stockInventoryDto.getRemark()); |
| | | stockInRecordDto.setWarnNum(stockInventoryDto.getWarnNum()); |
| | | stockInRecordService.add(stockInRecordDto); |
| | | return true; |
| | | } |