refactor(purchase): 重构更换工厂接口参数

- 移除旧的 FactoryId 和 PurchaseProductIds 字段
- 新增 PurchaseId、FactoryId 和 Products 字段- 新增 ProductChangeFactoryProductItem 和 BatchItem 结构体
This commit is contained in:
守护自己的云 2025-07-11 16:22:00 +08:00
parent 5c8379b89b
commit ced2bc460a

View File

@ -71,8 +71,18 @@ func (p *product) Edit(ctx context.Context, args ArgsProductEdit) (err error) {
}
type ArgsProductChangeFactory struct {
FactoryId int64 // 工厂id
PurchaseProductIds []int64 // 采购商品id
PurchaseId int64 // 采购合同id
FactoryId int64 // 工厂id
Products []ProductChangeFactoryProductItem // 采购商品id
}
type ProductChangeFactoryProductItem struct {
PurchaseProductId int64 // 采购产品id
Batches []BatchItem // 产品批次
}
type BatchItem struct {
BatchNo int64 // 批次号
PurchaseCount int64 // 采购数量
}
// ChangeFactory @TITLE 更换工厂