コード例 #1
0
ファイル: SODeleted.cs プロジェクト: HaiBoHan/HBHDaYunsy
        public void Notify(params object[] args)
        {
            if (args != null && args.Length != 0 && args[0] is EntityEvent)
            {
                BusinessEntity.EntityKey key = ((EntityEvent)args[0]).EntityKey;
                if (!(key == null))
                {
                    SO so = key.GetEntity() as SO;
                    if (PubHelper.SaleOrg2DMS.Contains(Context.LoginOrg.Code))
                    {
                        bool flag = PubHelper.IsUsedDMSAPI();
                        if (flag)
                        {
                            if (!string.IsNullOrEmpty(so.DescFlexField.PubDescSeg5))
                            {
                                try
                                {
                                    System.Collections.Generic.List<orderInfoDto> list = new System.Collections.Generic.List<orderInfoDto>();
                                    SI02ImplService service = new SI02ImplService();
                                    // service.Url = PubHelper.GetAddress(service.Url);
                                    //list.Add(new orderInfoDto
                                    //{
                                    //    // 等待上线0,上线1,下线滞留2,下线调试3,最终检验4,总装入库5,调试检验6,车辆整改7
                                    //    docStatus = "2",
                                    //    dmsSaleNo = so.DescFlexField.PubDescSeg5
                                    //});
                                    orderInfoDto orderDTO = new orderInfoDto();
                                    // 0新增,1修改,2删除,3排产
                                    orderDTO.docStatus = "2";
                                    orderDTO.dmsSaleNo = so.DescFlexField.PubDescSeg5;
                                    list.Add(orderDTO);

                                    service.Do(list.ToArray());
                                }
                                catch (System.Exception e)
                                {
                                    throw new System.ApplicationException("调用DMS接口错误:" + e.Message);
                                }
                            }
                        }
                    }
                }
            }
        }
コード例 #2
0
ファイル: PubExtend.cs プロジェクト: HaiBoHan/HBHDaYunsy
        // 订单状态跟踪接口
        /// <summary>
        /// 订单状态跟踪接口
        /// </summary>
        /// <param name="service"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        public static orderInfoDto[] Do(this SI02ImplService service, orderInfoDto[] param)
        {
            service.Url = PubHelper.GetAddress(service.Url);

            string entityName = "订单状态跟踪接口";
            long svID = -1;
            if (IsLog)
            {
                svID = ProxyLogger.CreateTransferSV(entityName
                    //, EntitySerialization.EntitySerial(bpObj)
                    , Newtonsoft.Json.JsonConvert.SerializeObject(param)
                    , service.GetType().FullName,Newtonsoft.Json.JsonConvert.SerializeObject(service));
            }

            try
            {
                var result = service.receive(param);

                if (svID > 0)
                {
                    if (result != null
                        && result.Length > 0
                        && result[0] != null
                        )
                    {
                        //string resultXml = EntitySerialization.EntitySerial(result);
                        string resultXml = Newtonsoft.Json.JsonConvert.SerializeObject(result);

                        ProxyLogger.UpdateTransferSV(svID, resultXml, result[0].flag == 1, result[0].errMsg, string.Empty, string.Empty);
                    }
                    else
                    {
                        ProxyLogger.UpdateTransferSV(svID, string.Empty, false, Const_ResultNullMessage, string.Empty, string.Empty);
                    }
                }
                return result;
            }
            catch (Exception ex)
            {
                if (svID > 0)
                {
                    ProxyLogger.UpdateTransferSV(svID, string.Empty, false, ex.Message, string.Empty, ex.StackTrace);
                }

                throw ex;
            }

            return null;
        }
コード例 #3
0
ファイル: Reference.cs プロジェクト: HaiBoHan/HBHDaYunsy
 /// <remarks/>
 public void receiveAsync(orderInfoDto[] arg0, object userState) {
     if ((this.receiveOperationCompleted == null)) {
         this.receiveOperationCompleted = new System.Threading.SendOrPostCallback(this.OnreceiveOperationCompleted);
     }
     this.InvokeAsync("receive", new object[] {
                 arg0}, this.receiveOperationCompleted, userState);
 }
コード例 #4
0
ファイル: Reference.cs プロジェクト: HaiBoHan/HBHDaYunsy
 /// <remarks/>
 public void receiveAsync(orderInfoDto[] arg0) {
     this.receiveAsync(arg0, null);
 }