注册 登录
编程论坛 VFP论坛

u8 生产订单API接口

ljb8864 发布于 2023-09-16 09:59, 332 次点击
PARAMETERS ologin as Object ,cHeader_rsdata as String ,cBody_rsdata as String

*!*    LOCAL oConn AS ADODB.Connection,oRs AS ADODB.RecordSet
*!*    PRIVATE  ologin As Object

u8EnvCtx=createobject("UFIDA.U8.U8APIFramework.U8EnvContext") &&数据语境
u8apiBroker=createobject("UFIDA.U8.U8APIFramework.U8ApiComBroker") &&构造单据与数据关联

u8EnvCtx.U8Login=ologin
u8apiBroker.Connect( "U8API/MOrder/MOrderAdd", u8EnvCtx) &&生产订单地址

*!*    strConn1=ologin.UfDbName  &&本地数据库
*!*    domHead=CREATEOBJECT("MSXML2.DOMDocument")
*!*    domBody=CREATEOBJECT("MSXML2.DOMDocument")
domH=CREATEOBJECT("MSXML2.DOMDocument")
domB=CREATEOBJECT("MSXML2.DOMDocument")
*!*    domH.loadXML(cHeader)
*!*    domB.loadXML(cBody)
*!*    domH.save("domU8rkHead.xml")
*!*    domB.save("domU8rkBody.xml")

*!*    ==================================================事务对象BO======================
extbo = broker.GetExtBoEntity("extbo")
extbo.Item(0).SetValue("MoId","1000000001")
extbo.Item(0).SetValue("MoCode","")
extbo.Item(0).SetValue("CreateUser",{^2023-6-17})
extbo.Item(0).SetValue("CreateDate",{^2023-6-17})
extbo.Item(0).SetValue("ModifyUser","")
extbo.Item(0).SetValue("ModifyDate"","")
extbo.Item(0).SetValue("ModifyTime","")


Mom_OrderDetail = extbo.Item(0).SubEntity("Mom_OrderDetail")

*!*    Mom_OrderDetail[0]["DMoClass"] = list.DMoClass
*!*    Mom_OrderDetail[0]["DInvCode"] = list.DInvCode.Trim
*!*    Mom_OrderDetail[0]["DStartDate"] = list.DStartDate.Trim
*!*    Mom_OrderDetail[0]["DDueDate"] = list.DDueDate.Trim
*!*    Mom_OrderDetail[0]["DQty"] = list.DQty
*!*    Mom_OrderDetail[0]["DSortSeq"] = DSortSeq
*!*     

Mom_MoAllocate = Mom_OrderDetail.Item(0).SubEntity("Mom_MoAllocate")
*!*    Mom_MoAllocate[i]["DSortSeq"] = dataRow["SortSeq"]
*!*    Mom_MoAllocate[i]["DOpSeq"] = dataRow["OpSeq
*!*    Mom_MoAllocate[i]["DInvCode"] = dataRow["子件编码
*!*    Mom_MoAllocate[i]["DBaseQtyN"] = dataRow["基本用量_分子
*!*    Mom_MoAllocate[i]["DBaseQtyD"] = dataRow["基本用量_分母
*!*    Mom_MoAllocate[i]["DStartDemDate"] = list.DStartDate.Trim();
2 回复
#2
laowan0012023-09-16 16:07
是用友U8吗?
发这个接口的意思是什么呢?
#3
ljb88642023-09-17 15:10
回复 2楼 laowan001
有木有接口写法
1