码迷,mamicode.com
首页 > 其他好文 > 详细

U9杂发相关服务调用

时间:2020-03-27 10:31:58      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:com   lin   实体   ida   EDA   ide   tar   long   rri   

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杂发相关服务调用

标签:com   lin   实体   ida   EDA   ide   tar   long   rri   

原文地址:https://www.cnblogs.com/youmin3205/p/12579402.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!