Exemplo n.º 1
0
        protected EmsRstDTO[] LoadRemote(String id_or, Dictionary <String, Object> ctmInfo = null)
        {
            ICiEmsMainService emsMainService = XapServiceMgr.find <ICiEmsMainService>();

            if (null != emsMainService)
            {
                EmsLoadDTO[] emsloads = new EmsLoadDTO[1];
                var          emsload  = new EmsLoadDTO();
                emsload.Id_or             = id_or;
                emsload.Extension         = new FMap2();
                emsload.EnContext         = CiEnContextUtil.GetCiEnContext(this.GetEnt4BannerDTO(), this.GetContext());
                emsload.EmsDriver         = ((int)this.uiEmsDTO.EmsType).ToString();
                emsload.OperateSourceFrom = IOprSourceFromConst.IOSF_EMS;
                if (null != ctmInfo)
                {
                    emsload.Extension = new FMap2();
                    foreach (String key in ctmInfo.Keys)
                    {
                        emsload.Extension.Add(key, ctmInfo[key]);
                    }
                }
                emsloads[0] = emsload;
                return(emsMainService.load(emsloads));
            }
            return(null);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 优化后方法
        /// </summary>
        /// <param name="ciOrderDO"></param>
        private void New_EditOrder(CiOrderDO ciOrderDO)
        {
            ICiEmsMainService emsMainService = XapServiceMgr.find <ICiEmsMainService>();

            if (null != emsMainService)
            {
                EmsLoadDTO[] emsloads = new EmsLoadDTO[1];
                var          emsload  = new EmsLoadDTO();
                emsload.Id_or     = ciOrderDO.Id_or;
                emsload.Extension = new FMap2();
                emsload.EnContext = CiEnContextUtil.GetCiEnContext(this.GetEnt4BannerDTO(), this.GetContext());
                emsload.EmsDriver = ((int)this.uiEmsDTO.EmsType).ToString();
                emsloads[0]       = emsload;
                EmsRstDTO[] rsts = emsMainService.load(emsloads);
                EmsRstDTO   rst  = rsts[0];
                if (rst != null)
                {
                    uiEmsDTO.CiordubDTO = (rst.Document[0] as CiordubDTO);
                    //String utf8Str = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(rst.DocumentString));
                    //uiEmsDTO.CiordubDTO.deSerializeJson(utf8Str);

                    if (rst.Extension != null && rst.Extension.Keys.Contains("CiEmsDTO"))
                    {
                        this.ciEmsDTO = rst.Extension["CiEmsDTO"] as CiEmsDTO;
                    }
                    if (rst.Extension != null && rst.Extension.Keys.Contains("MedSrvDO"))
                    {
                        this.uiEmsDTO.MedSrvDO = rst.Extension["MedSrvDO"] as MedSrvDO;
                    }

                    tableDatasource = new XapDataList <CiordubDTO>();
                    this.tableDatasource.Add(uiEmsDTO.CiordubDTO);

                    //其他处理
                    uiEmsDTO.Id_srvof    = ciEmsDTO.Id_srvof;
                    this.ciEmsDTO.Status = DOStatus.UPDATED;
                    this.uiEmsDTO.Status = DOStatus.UPDATED;

                    HandleExpenseItems(ciEmsDTO);
                }
            }//*/
        }
Exemplo n.º 3
0
        /// <summary>
        /// 优化后编辑方法
        /// </summary>
        /// <param name="ord"></param>
        private void New_EditOrder(CiOrderDO ord)
        {
            ICiEmsMainService emsMainService = XapServiceMgr.find <ICiEmsMainService>();

            if (null != emsMainService)
            {
                EmsLoadDTO[] emsloads = new EmsLoadDTO[1];
                var          emsload  = new EmsLoadDTO();
                emsload.Id_or             = ord.Id_or;
                emsload.Extension         = new FMap2();
                emsload.EnContext         = CiEnContextUtil.GetCiEnContext(this.GetEnt4BannerDTO(), this.GetContext());
                emsload.EmsDriver         = ((int)this.uiEmsDTO.EmsType).ToString();
                emsload.OperateSourceFrom = IOprSourceFromConst.IOSF_EMS;
                emsloads[0] = emsload;
                EmsRstDTO[] rsts = emsMainService.load(emsloads);
                EmsRstDTO   rst  = rsts[0];
                if (rst != null)
                {
                    uiEmsDTO.Emsappathgy.deSerializeJson((rst.Document[0] as EmsPathgyItemDO).serializeJson());
                    //String utf8Str = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(rst.DocumentString));
                    //uiEmsDTO.Emsappathgy.deSerializeJson(utf8Str);

                    if (rst.Extension != null && rst.Extension.Keys.Contains("CiEmsDTO"))
                    {
                        this.ciEmsDTO = rst.Extension["CiEmsDTO"] as CiEmsDTO;
                    }
                    if (rst.Extension != null && rst.Extension.Keys.Contains("MedSrvDO"))
                    {
                        this.uiEmsDTO.MedSrvDO = rst.Extension["MedSrvDO"] as MedSrvDO;
                        strSd_srvtp            = this.uiEmsDTO.MedSrvDO.Sd_srvtp;
                    }
                    if (rst.Extension != null && rst.Extension.Keys.Contains("MpDepFilter"))
                    {
                        idDepMps = rst.Extension["MpDepFilter"] as String;
                    }
                    else
                    {
                        idDepMps = "";
                    }

                    if (this.uiEmsDTO.Emsappathgy.EmsItemInpathgyList != null)
                    {
                        if (null == this.uiEmsDTO.Emsappathgy.EmsItemInpathgy)
                        {
                            this.uiEmsDTO.Emsappathgy.EmsItemInpathgy = new XapDataList <EmsItemInPathgy>();
                        }
                        this.uiEmsDTO.Emsappathgy.EmsItemInpathgy.Clear();
                        this.uiEmsDTO.Emsappathgy.EmsItemInpathgyList.Cast <EmsItemInPathgy>().ToList().ForEach(o =>
                        {
                            this.uiEmsDTO.Emsappathgy.EmsItemInpathgy.Add(o);
                        });
                    }

                    if (uiEmsDTO.Emsappathgy.EmsItemInpathgy.Count <= 0)
                    {
                        uiEmsDTO.Emsappathgy.EmsItemInpathgy.AddNew();
                        uiEmsDTO.Emsappathgy.EmsItemInpathgy[0].Sortno = 1;
                    }
                }

                this.lstEmsPathgyItemDO.Add(uiEmsDTO.Emsappathgy);

                // 其他
                this.ciEmsDTO.Status = DOStatus.UPDATED;
                this.uiEmsDTO.Status = DOStatus.UPDATED;

                // 处理分拣费用项目
                HandleExpenseItems(ciEmsDTO);
            }
        }