急:用webapi批量推送付款退款单时,添加了结算方式就报错
金蝶云社区-云小爱
云小爱
0人赞赏了该文章 831次浏览 未经作者许可,禁止转载编辑于2016年03月23日 15:13:56

在用webapi做付款退款单的推送时,明细中结算方式已经赋值,而且在基础资料中可以找到该结算方式。但是推送过去的时候,始终报错:调用的目标发生了异常。报错信息如下:
{"Result":{"ResponseStatus":{"ErrorCode":500,"IsSuccess":false,"Errors":[{"FieldName":"无法将类型为“System.String”的对象强制转换为类型“System.Collections.Generic.Dictionary`2[System.String,System.Object]”。","Message":" 在 Kingdee.BOS.WebApi.FormService.MapPropertyService.MapCollectionProperty(Entity enity, IList`1 sourceRows, DynamicObjectCollection targetRows, HashSet`1 NeedUpDateFields, String specialReferenceTable)\r\n 在 Kingdee.BOS.WebApi.FormService.MapPropertyService.MapComplexProperty(String pkProperty, Dictionary`2 sourceObj, DynamicObject targetObj, Int32 rowIndex, HashSet`1 NeedUpDateFields)\r\n 在 Kingdee.BOS.WebApi.FormService.BuilderBillData.Execute()\r\n 在 Kingdee.BOS.WebApi.FormService.BatchSaveService.BuilderBillData(Boolean numberSearch, List`1 saveObjs, Object obj)\r\n 在 Kingdee.BOS.WebApi.FormService.BatchSaveService.SaveBills(String data)"}],"SuccessEntitys":[]}}}
不推送结算方式,就报结算方式是必填项。这是不是可以理解为:问题出在结算方式这一块??该如何处理?(收款退款单也报类似错误)
附传送的JSON字段:
{"Creator":"demo","NeedUpDateFields":[""],"Model":[{"FID":0,"FBillNo":"123","FBillTypeID":{"FNumber":"FKTKDLX02_SYS"},"FREFUNDBILLENTRY":[{"FSETTLETYPEID":{"FNumber":"JSFS01_SYS"},"FACCOUNTID":"","FREALREFUNDAMOUNTFOR_D":80}],"FDATE":"2016-03-01","FCONTACTUNITTYPE":"BD_Supplier","FCONTACTUNIT":{"FNumber":"ANA"},"FPAYUNITTYPE":"BD_Supplier","FPAYUNIT":{"FNumber":"00999"},"FCURRENCYID":{"FNUMBER":"PRE001"},"FPAYORGID":{"FNUMBER":"01"},"FSETTLEORGID":{"FNUMBER":"01"},"FDOCUMENTSTATUS":"A","FEXCHANGERATE":"1.0000","FSETTLERATE":"1.0000"},{"FID":0,"FBillNo":"456","FBillTypeID":{"FNumber":"FKTKDLX02_SYS"},"FREFUNDBILLENTRY":[{"FSETTLETYPEID":{"FNumber":"JSFS01_SYS"},"FACCOUNTID":"","FREALREFUNDAMOUNTFOR_D":80}],"FDATE":"2016-03-01","FCONTACTUNITTYPE":"BD_Supplier","FCONTACTUNIT":{"FNumber":"ANA"},"FPAYUNITTYPE":"BD_Supplier","FPAYUNIT":{"FNumber":"00999"},"FCURRENCYID":{"FNUMBER":"PRE001"},"FPAYORGID":{"FNUMBER":"01"},"FSETTLEORGID":{"FNUMBER":"01"},"FDOCUMENTSTATUS":"A","FEXCHANGERATE":"1.0000","FSETTLERATE":"1.0000"}]}