feat(purchase): 添加关联采购合同功能
- 新增 PurchaseAssociationItem 结构体用于关联采购合同的返回结果 - 实现 Association 方法以获取关联采购合同信息 - 通过 xClient.Call 调用远程服务完成关联操作
This commit is contained in:
		
							parent
							
								
									ced2bc460a
								
							
						
					
					
						commit
						c1e44e2300
					
				| @ -256,3 +256,21 @@ func (p *purchase) FactoryBatch(ctx context.Context, args ArgsPurchaseFactoryBat | ||||
| 	err = xClient.Call(ctx, "FactoryBatch", args, &reply) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| type PurchaseAssociationItem struct { | ||||
| 	Id        int64  `json:"id"` | ||||
| 	FactoryId int64  `json:"factoryId"` | ||||
| 	SaleId    int64  `json:"saleId"` | ||||
| 	PoSerial  string `json:"poSerial"` | ||||
| 	BatchNo   int64  `json:"batchNo"` | ||||
| } | ||||
| 
 | ||||
| // Association @TITLE 关联采购合同 | ||||
| func (p *purchase) Association(ctx context.Context, purchaseId int64) (reply []PurchaseAssociationItem, err error) { | ||||
| 	xClient, err := client.GetClient(p) | ||||
| 	if err != nil { | ||||
| 		return | ||||
| 	} | ||||
| 	err = xClient.Call(ctx, "Association", purchaseId, &reply) | ||||
| 	return | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user