U9杂发相关服务调用
Posted youmin3205
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了U9杂发相关服务调用相关的知识,希望对你有一定的参考价值。
DLL引用:
UFIDA.U9.ISV.MiscShipISV.Agent
UFIDA.U9.ISV.MiscShipISV.Deploy
UFIDA.U9.CBO.PubBE.Deploy
UFIDA.U9.CBO.PubSV.Agent
UFIDA.U9.CBO.PubSV.Deploy
1、创建 UFIDA.U9.ISV.MiscShipISV.Proxy.CommonCreateMiscShipProxy
long MiscShipmentTransID = 0L; UFIDA.U9.PM.Rcv.Receivement holder = key.GetEntity() as UFIDA.U9.PM.Rcv.Receivement;
try{ List<ISV.MiscShipISV.IC_MiscShipmentDTOData> MiscSDTOList = new List<ISV.MiscShipISV.IC_MiscShipmentDTOData>(); ISV.MiscShipISV.IC_MiscShipmentDTOData MiscSDTO = new ISV.MiscShipISV.IC_MiscShipmentDTOData(); MiscSDTO.Org = new CommonArchiveDataDTOData(); MiscSDTO.Org.ID = 1001810161097075; MiscSDTO.Org.Code = "601";//目标组织 MiscSDTO.Org.Name = "测试组织"; MiscSDTO.MiscShipDocType=new CommonArchiveDataDTOData(); MiscSDTO.MiscShipDocType.ID=1001811200000162; MiscSDTO.MiscShipDocType.Code="MiscShip003"; MiscSDTO.MiscShipDocType.Name = "杂发出库"; MiscSDTO.BusinessDate = holder.BusinessDate; MiscSDTO.SysState= UFSoft.UBF.PL.Engine.ObjectState.Inserted; MiscSDTO.Memo = holder.Org.Code + " | " + holder.DocNo; List<UFIDA.U9.ISV.MiscShipISV.IC_MiscShipmentLDTOData> MiscSLDTOList = new List<ISV.MiscShipISV.IC_MiscShipmentLDTOData>(); foreach (UFIDA.U9.PM.Rcv.RcvLine ls in holder.RcvLines) { UFIDA.U9.ISV.MiscShipISV.IC_MiscShipmentLDTOData MiscSLDTO = new ISV.MiscShipISV.IC_MiscShipmentLDTOData(); MiscSLDTO.ItemInfo = new CBO.SCM.Item.ItemInfoData(); MiscSLDTO.ItemInfo.ItemCode = ls.ItemInfo.ItemCode; MiscSLDTO.Wh = new CommonArchiveDataDTOData(); MiscSLDTO.Wh.ID=1001811010001599; MiscSLDTO.Wh.Code="GT002"; MiscSLDTO.Wh.Name = "材料库"; MiscSLDTO.StoreUOMQty = ls.ArriveQtySU; MiscSLDTO.IsZeroCost = true; MiscSLDTOList.Add(MiscSLDTO); } UFIDA.U9.ISV.MiscShipISV.Proxy.CommonCreateMiscShipProxy MiscSProxy = new ISV.MiscShipISV.Proxy.CommonCreateMiscShipProxy(); MiscSProxy.TargetOrgCode = "601";//目标组织 MiscSDTO.MiscShipLs = MiscSLDTOList; MiscSDTOList.Add(MiscSDTO); MiscSProxy.MiscShipmentDTOList=MiscSDTOList; List<CommonArchiveDataDTOData> MiscSlist= MiscSProxy.Do(); MiscShipmentTransID = MiscSlist[0].ID; } catch (Exception e) { throw new Exception(e.ToString()); }
2、提交 UFIDA.U9.ISV.MiscShipISV.Proxy.CommonCommitMiscShipSVProxy
UFIDA.U9.ISV.MiscShipISV.Proxy.CommonCommitMiscShipSVProxy MiscSCommitProxy = new ISV.MiscShipISV.Proxy.CommonCommitMiscShipSVProxy(); MiscSCommitProxy.TargetOrgCode = "601"; MiscSCommitProxy.MiscShipmentKeyList = new List<CommonArchiveDataDTOData>(); CommonArchiveDataDTOData MiscSCommitProxyData = new CommonArchiveDataDTOData { ID = MiscShipmentTransID }; MiscSCommitProxy.MiscShipmentKeyList.Add(MiscSCommitProxyData); MiscSCommitProxy.Do();
3、审核 UFIDA.U9.ISV.MiscShipISV.Proxy.CommonApproveMiscShipSVProxy
UFIDA.U9.ISV.MiscShipISV.Proxy.CommonApproveMiscShipSVProxy MiscSApproveProxy = new ISV.MiscShipISV.Proxy.CommonApproveMiscShipSVProxy(); MiscSApproveProxy.TargetOrgCode = "600";//目标组织 MiscSApproveProxy.MiscShipmentKeyList = new List<CommonArchiveDataDTOData>(); CommonArchiveDataDTOData MiscSApproveProxyData = new CommonArchiveDataDTOData { ID = MiscShipmentTransID }; MiscSApproveProxy.MiscShipmentKeyList.Add(MiscSApproveProxyData); MiscSApproveProxy.Do();
4、弃审 UFIDA.U9.ISV.MiscShipISV.Proxy.CommonUnApporveMiscShipSVProxy
try { UFIDA.U9.ISV.MiscShipISV.Proxy.CommonUnApporveMiscShipSVProxy UnApporveMiscShipSVProxy = new ISV.MiscShipISV.Proxy.CommonUnApporveMiscShipSVProxy(); UnApporveMiscShipSVProxy.TargetOrgCode = "601";//目标组织 UnApporveMiscShipSVProxy.MiscShipmentKeyList = new List<CommonArchiveDataDTOData>(); CommonArchiveDataDTOData UnApporveMiscShipSVProxyData = new CommonArchiveDataDTOData { ID =MiscShipmentTransID }; UnApporveMiscShipSVProxy.MiscShipmentKeyList.Add(UnApporveMiscShipSVProxyData); UnApporveMiscShipSVProxy.Do(); } catch (Exception e) { throw new Exception(e.ToString()); }
5、删除 UFIDA.U9.ISV.MiscShipISV.Proxy.CommonDeleteMiscShipProxy
try { UFIDA.U9.ISV.MiscShipISV.Proxy.CommonDeleteMiscShipProxy DeleteMiscShipProxy = new ISV.MiscShipISV.Proxy.CommonDeleteMiscShipProxy(); DeleteMiscShipProxy.TargetOrgCode = "601";//目标组织 DeleteMiscShipProxy.MiscShipmentKeyList = new List<CommonArchiveDataDTOData>(); CommonArchiveDataDTOData DeleteMiscShipProxyData = new CommonArchiveDataDTOData { ID = MiscShipmentTransID }; DeleteMiscShipProxy.MiscShipmentKeyList.Add(DeleteMiscShipProxyData); DeleteMiscShipProxy.Do(); } catch (Exception e) { throw new Exception(e.ToString()); }
以上是关于U9杂发相关服务调用的主要内容,如果未能解决你的问题,请参考以下文章