u8 生产订单API接口
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();