请求参数:
{ "Replace": "false", "VoucherData": { "Entries": [ { "FAccountName": "管经理现金", "FAccountNumber": "1001.01", "FAmount": 500, "FAmountFor": 500, "FCurrencyName": "人民币", "FCurrencyNumber": "RMB", "FDC": 1, "FEntryID": 1, "FExchangeRate": 1, "FExplanation": "test_s1", "FMeasureUnit": null, "FMeasureUnitUUID": 621, "FQuantity": 50, "FSettleNo": null, "FSettleTypeName": "", "FTransNo": "", "FUnitPrice": 10 }, { "FAccountName": "应收股利", "FAccountNumber": "1131", "FAmount": 500, "FAmountFor": 500, "FCurrencyName": "人民币", "FCurrencyNumber": "RMB", "FDC": 0, "FEntryID": 0, "FExchangeRate": 1, "FExplanation": "test97_s1", "FMeasureUnit": null, "FMeasureUnitUUID": 279, "FQuantity": 50, "FSettleNo": null, "FSettleTypeName": "", "FTransNo": "", "FUnitPrice": 10 } ], "FAttachments": 0, "FCashier": "NONE", "FDate": "2018-01-31", "FExplanation": "66666", "FGroup": "记", "FHandler": "", "FNumber": 19, "FPeriod": 1, "FPoster": "NONE", "FPreparer": "Administrator", "FReference": "", "FSerialNum": 2, "FTransDate": "2018-01-31", "FYear": 2018 } }Replace为true表示修改,此时FVoucherID必传,为要修改的凭证ID;false表示新增
public SaveVoucherResult UpdateVoucher(object model, string IsReplace) { var tokenStr = GetToken(); var result = APIClient.CreateAPIOperation<UpdateVoucher>(_Config.URL) .SetObjectTypeId<UpdateVoucher>(OrderTypeIDConsts.凭证) .SetToken(tokenStr) .SetModel(model) .SetReplace(IsReplace) .ToAPIRequest().Excute<SaveVoucherResult>(); return result; } 四.源码下载此部分的代码封装逻辑思路和K3Cloud的处理大致一致,通过APIClient的调用来处理各个接口的逻辑。
源码下载:k3wise15.0源码下载