refactor(service/erp): 重构采购模块中的批次数据处理功能- 将 ArgsPurchaseBatch 重命名为 ArgsPurchaseFactoryBatch,更准确地反映其用途
- 将 PurchaseBatchItem 重命名为 PurchaseFactoryBatchItem,提高代码可读性 - 修改 Batch 函数名称为 FactoryBatch,更清晰地表示其功能 - 更新 JSON 标签以适应新的结构体名称
This commit is contained in:
parent
a0f333a112
commit
5c8379b89b
@ -237,22 +237,22 @@ func (p *purchase) CancelAudit(ctx context.Context, purchaseId int64) (err error
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
type ArgsPurchaseBatch struct {
|
type ArgsPurchaseFactoryBatch struct {
|
||||||
PurchaseId int64 // 采购合同id
|
PurchaseId int64 // 采购合同id
|
||||||
FactoryId int64 // 采购工厂id
|
FactoryId int64 // 采购工厂id
|
||||||
}
|
}
|
||||||
type PurchaseBatchItem struct {
|
type PurchaseFactoryBatchItem struct {
|
||||||
PurchaseId int64 `json:"purchaseId"`
|
PurchaseId int64 `json:"purchaseId"`
|
||||||
BatchNo int64 `json:"batchNo"`
|
BatchNo int64 `json:"batchNo"`
|
||||||
HasEdit bool `json:"hasEdit"`
|
HasEdit bool `json:"hasEdit"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Batch @TITLE 批次数据
|
// FactoryBatch @TITLE 工厂批次数据
|
||||||
func (p *purchase) Batch(ctx context.Context, args ArgsPurchaseBatch) (reply []PurchaseBatchItem, err error) {
|
func (p *purchase) FactoryBatch(ctx context.Context, args ArgsPurchaseFactoryBatch) (reply []PurchaseFactoryBatchItem, err error) {
|
||||||
xClient, err := client.GetClient(p)
|
xClient, err := client.GetClient(p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = xClient.Call(ctx, "Batch", args, &reply)
|
err = xClient.Call(ctx, "FactoryBatch", args, &reply)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user