src/main/java/com/ruoyi/purchase/service/impl/PurchaseLedgerServiceImpl.java
@@ -943,6 +943,7 @@ salesLedger.setContractAmount(salesLedgerProductImportDtos.stream() .map(PurchaseLedgerProductImportDto::getTaxInclusiveTotalPrice) .reduce(BigDecimal.ZERO,BigDecimal::add)); salesLedger.setNetContractAmount(salesLedger.getContractAmount()); // 通过销售单号绑定销售 SalesLedger salesLedger1 = salesLedgerMapper.selectOne(new LambdaQueryWrapper<SalesLedger>() .eq(SalesLedger::getSalesContractNo, salesLedger.getSalesContractNo()) src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
@@ -385,6 +385,7 @@ salesLedger.setContractAmount(salesLedgerProductImportDtos.stream() .map(SalesLedgerProductImportDto::getTaxInclusiveTotalPrice) .reduce(BigDecimal.ZERO, BigDecimal::add)); salesLedger.setNetContractAmount(salesLedger.getContractAmount()); salesLedgerMapper.insert(salesLedger); src/main/java/com/ruoyi/stock/service/impl/StockInRecordServiceImpl.java
@@ -246,6 +246,7 @@ stockInventoryDto.setQualitity(stockInRecord.getStockInNum()); stockInventoryDto.setRemark(stockInRecord.getRemark()); if (stockInventory == null) { try { stockInventoryMapper.insert(new StockInventory() {{ setProductModelId(stockInRecord.getProductModelId()); setQualitity(stockInRecord.getStockInNum()); @@ -254,6 +255,9 @@ setWarnNum(stockInRecord.getWarnNum()); setVersion(1); }}); } catch (org.springframework.dao.DuplicateKeyException e) { stockInventoryMapper.updateAddStockInventory(stockInventoryDto); } } else { stockInventoryMapper.updateAddStockInventory(stockInventoryDto); } @@ -266,6 +270,7 @@ stockUninventoryDto.setQualitity(stockInRecord.getStockInNum()); stockUninventoryDto.setRemark(stockInRecord.getRemark()); if (stockUninventory == null) { try { stockUninventoryMapper.insert(new StockUninventory() {{ setProductModelId(stockInRecord.getProductModelId()); setQualitity(stockInRecord.getStockInNum()); @@ -273,6 +278,9 @@ setRemark(stockInRecord.getRemark()); setVersion(1); }}); } catch (org.springframework.dao.DuplicateKeyException e) { stockUninventoryMapper.updateAddStockUnInventory(stockUninventoryDto); } } else { stockUninventoryMapper.updateAddStockUnInventory(stockUninventoryDto); } src/main/java/com/ruoyi/stock/service/impl/StockInventoryServiceImpl.java
@@ -105,7 +105,11 @@ newStockInventory.setBatchNo(stockInventoryDto.getBatchNo()); newStockInventory.setLockedQuantity(stockInventoryDto.getLockedQuantity()); newStockInventory.setWarnNum(stockInventoryDto.getWarnNum()); try { stockInventoryMapper.insert(newStockInventory); } catch (org.springframework.dao.DuplicateKeyException e) { stockInventoryMapper.updateAddStockInventory(stockInventoryDto); } } else { stockInventoryMapper.updateAddStockInventory(stockInventoryDto); }