feat(mat): 添加入库记录时同步更新库存和价格历史功能

- 在 MatPurchaseInDetailService 中新增 insertByBoWithInventoryAndPriceHistory 方法
- 在 MatPurchaseInDetailService 中新增 deleteWithValidByIdsWithInventoryAndPriceHistory 方法
- 扩展 MatPriceHistory 实体类添加 purchaseInDetailId 关联字段
- 更新 MatPriceHistoryMapper.xml 映射文件包含新的关联字段
- 修改控制器方法调用新的带库存和价格历史更新的入库接口
- 实现库存数量更新逻辑和价格历史记录管理功能
- 添加入库记录删除时还原库存和价格历史的功能
This commit is contained in:
2026-01-30 16:13:14 +08:00
parent 9f2cca7ddd
commit d9e0205da1
7 changed files with 210 additions and 5 deletions

View File

@@ -37,6 +37,11 @@ public interface IMatPurchaseInDetailService {
*/
Boolean insertByBo(MatPurchaseInDetailBo bo);
/**
* 新增入库记录并更新库存和价格历史
*/
Boolean insertByBoWithInventoryAndPriceHistory(MatPurchaseInDetailBo bo);
/**
* 修改入库记录
*/
@@ -46,4 +51,9 @@ public interface IMatPurchaseInDetailService {
* 校验并批量删除入库记录信息
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
/**
* 校验并批量删除入库记录信息,并还原库存和价格历史
*/
Boolean deleteWithValidByIdsWithInventoryAndPriceHistory(Collection<Long> ids, Boolean isValid);
}