/// <summary>
        /// 得到调入单dto
        /// </summary>
        /// <param name="bpObj"></param>
        /// <returns></returns>
        private System.Collections.Generic.List <UFIDA.U9.ISV.TransferInISV.IC_TransferInDTOData> GetTransferInDTOList(System.Collections.Generic.List <CarShipLineDTO> transferinlist)
        {
            System.Collections.Generic.List <UFIDA.U9.ISV.TransferInISV.IC_TransferInDTOData> list = new System.Collections.Generic.List <UFIDA.U9.ISV.TransferInISV.IC_TransferInDTOData>();
            System.Collections.Generic.Dictionary <string, System.Collections.Generic.List <CarShipLineDTO> > dic = new System.Collections.Generic.Dictionary <string, System.Collections.Generic.List <CarShipLineDTO> >();
            foreach (CarShipLineDTO dtoline in transferinlist)
            {
                if (!dic.ContainsKey(dtoline.SpitOrderFlag))
                {
                    dic.Add(dtoline.SpitOrderFlag, new System.Collections.Generic.List <CarShipLineDTO>());
                }
                dic[dtoline.SpitOrderFlag].Add(dtoline);
            }
            foreach (string key in dic.Keys)
            {
                List <CarShipLineDTO> listLineDTO = dic[key];

                if (listLineDTO != null &&
                    listLineDTO.Count > 0
                    )
                {
                    CarShipLineDTO firstDTO = listLineDTO.GetFirst <CarShipLineDTO>();

                    UFIDA.U9.ISV.TransferInISV.IC_TransferInDTOData transindto = new UFIDA.U9.ISV.TransferInISV.IC_TransferInDTOData();
                    transindto.TransInDocType      = (new CommonArchiveDataDTOData());
                    transindto.TransInDocType.Code = ("CarOutWH");
                    transindto.CreatedBy           = (Context.LoginUser);
                    transindto.CreatedOn           = (System.DateTime.Now);
                    transindto.ModifiedBy          = (Context.LoginUser);
                    transindto.ModifiedOn          = (System.DateTime.Now);
                    transindto.TransInLines        = (new System.Collections.Generic.List <UFIDA.U9.ISV.TransferInISV.IC_TransInLineDTOData>());
                    foreach (CarShipLineDTO linedto in listLineDTO)
                    {
                        UFIDA.U9.ISV.TransferInISV.IC_TransInLineDTOData transinlinedto = new UFIDA.U9.ISV.TransferInISV.IC_TransInLineDTOData();
                        transinlinedto.ItemInfo          = (new ItemInfoData());
                        transinlinedto.ItemInfo.ItemCode = (linedto.ErpMaterialCode);
                        transinlinedto.TransInWh         = (new CommonArchiveDataDTOData());
                        transinlinedto.TransInWh.Code    = (linedto.WhIn);
                        Warehouse whin = Warehouse.Finder.Find(string.Format("Org={0} and Code='{1}'", Context.LoginOrg.ID.ToString(), linedto.WhIn), new OqlParam[0]);
                        if (whin != null)
                        {
                            transinlinedto.StorageType = (whin.StorageType.Value);
                        }
                        else
                        {
                            transinlinedto.StorageType = (4);
                        }
                        transinlinedto.StoreUOMQty                  = (linedto.Number);
                        transinlinedto.CostCurrency                 = (new CommonArchiveDataDTOData());
                        transinlinedto.CostCurrency.Code            = (linedto.Currency);
                        transinlinedto.Project                      = (new CommonArchiveDataDTOData());
                        transinlinedto.Project.Code                 = (linedto.DmsSaleNo);
                        transinlinedto.DescFlexSegments             = (new DescFlexSegmentsData());
                        transinlinedto.DescFlexSegments.PubDescSeg5 = (linedto.DmsSaleNo);
                        transinlinedto.TransInSubLines              = (new System.Collections.Generic.List <UFIDA.U9.ISV.TransferInISV.IC_TransInSubLineDTOData>());
                        UFIDA.U9.ISV.TransferInISV.IC_TransInSubLineDTOData sublinedto = new UFIDA.U9.ISV.TransferInISV.IC_TransInSubLineDTOData();
                        sublinedto.TransOutWh      = (new CommonArchiveDataDTOData());
                        sublinedto.TransOutWh.Code = (linedto.WhOut);
                        Warehouse whout = Warehouse.Finder.Find(string.Format("Org={0} and Code='{1}'", Context.LoginOrg.ID.ToString(), linedto.WhOut), new OqlParam[0]);
                        if (whout != null)
                        {
                            sublinedto.StorageType = (whout.StorageType.Value);
                        }
                        else
                        {
                            sublinedto.StorageType = (4);
                        }
                        sublinedto.Project      = (new CommonArchiveDataDTOData());
                        sublinedto.Project.Code = (linedto.DmsSaleNo);
                        transinlinedto.TransInSubLines.Add(sublinedto);
                        transindto.TransInLines.Add(transinlinedto);
                    }
                    list.Add(transindto);
                }
            }
            return(list);
        }
        /// <summary>
        /// 得到调入单dto
        /// </summary>
        /// <param name="bpObj"></param>
        /// <returns></returns>
        private System.Collections.Generic.List<UFIDA.U9.ISV.TransferInISV.IC_TransferInDTOData> GetTransferInDTOList(System.Collections.Generic.List<CarShipLineDTO> transferinlist)
        {
            System.Collections.Generic.List<UFIDA.U9.ISV.TransferInISV.IC_TransferInDTOData> list = new System.Collections.Generic.List<UFIDA.U9.ISV.TransferInISV.IC_TransferInDTOData>();
            System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<CarShipLineDTO>> dic = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<CarShipLineDTO>>();
            foreach (CarShipLineDTO dtoline in transferinlist)
            {
                if (!dic.ContainsKey(dtoline.SpitOrderFlag))
                {
                    dic.Add(dtoline.SpitOrderFlag, new System.Collections.Generic.List<CarShipLineDTO>());
                }
                dic[dtoline.SpitOrderFlag].Add(dtoline);
            }
            foreach (string key in dic.Keys)
            {
                List<CarShipLineDTO> listLineDTO = dic[key];

                if (listLineDTO != null
                    && listLineDTO.Count > 0
                    )
                {
                    CarShipLineDTO firstDTO = listLineDTO.GetFirst<CarShipLineDTO>();

                    UFIDA.U9.ISV.TransferInISV.IC_TransferInDTOData transindto = new UFIDA.U9.ISV.TransferInISV.IC_TransferInDTOData();
                    transindto.TransInDocType = (new CommonArchiveDataDTOData());
                    transindto.TransInDocType.Code = ("CarOutWH");
                    transindto.CreatedBy = (Context.LoginUser);
                    transindto.CreatedOn = (System.DateTime.Now);
                    transindto.ModifiedBy = (Context.LoginUser);
                    transindto.ModifiedOn = (System.DateTime.Now);
                    transindto.TransInLines = (new System.Collections.Generic.List<UFIDA.U9.ISV.TransferInISV.IC_TransInLineDTOData>());
                    foreach (CarShipLineDTO linedto in listLineDTO)
                    {
                        UFIDA.U9.ISV.TransferInISV.IC_TransInLineDTOData transinlinedto = new UFIDA.U9.ISV.TransferInISV.IC_TransInLineDTOData();
                        transinlinedto.ItemInfo = (new ItemInfoData());
                        transinlinedto.ItemInfo.ItemCode = (linedto.ErpMaterialCode);
                        transinlinedto.TransInWh = (new CommonArchiveDataDTOData());
                        transinlinedto.TransInWh.Code = (linedto.WhIn);
                        Warehouse whin = Warehouse.Finder.Find(string.Format("Org={0} and Code='{1}'", Context.LoginOrg.ID.ToString(), linedto.WhIn), new OqlParam[0]);
                        if (whin != null)
                        {
                            transinlinedto.StorageType = (whin.StorageType.Value);
                        }
                        else
                        {
                            transinlinedto.StorageType = (4);
                        }
                        transinlinedto.StoreUOMQty = (linedto.Number);
                        transinlinedto.CostCurrency = (new CommonArchiveDataDTOData());
                        transinlinedto.CostCurrency.Code = (linedto.Currency);
                        transinlinedto.Project = (new CommonArchiveDataDTOData());
                        transinlinedto.Project.Code = (linedto.DmsSaleNo);
                        transinlinedto.DescFlexSegments = (new DescFlexSegmentsData());
                        transinlinedto.DescFlexSegments.PubDescSeg5 = (linedto.DmsSaleNo);
                        transinlinedto.TransInSubLines = (new System.Collections.Generic.List<UFIDA.U9.ISV.TransferInISV.IC_TransInSubLineDTOData>());
                        UFIDA.U9.ISV.TransferInISV.IC_TransInSubLineDTOData sublinedto = new UFIDA.U9.ISV.TransferInISV.IC_TransInSubLineDTOData();
                        sublinedto.TransOutWh = (new CommonArchiveDataDTOData());
                        sublinedto.TransOutWh.Code = (linedto.WhOut);
                        Warehouse whout = Warehouse.Finder.Find(string.Format("Org={0} and Code='{1}'", Context.LoginOrg.ID.ToString(), linedto.WhOut), new OqlParam[0]);
                        if (whout != null)
                        {
                            sublinedto.StorageType = (whout.StorageType.Value);
                        }
                        else
                        {
                            sublinedto.StorageType = (4);
                        }
                        sublinedto.Project = (new CommonArchiveDataDTOData());
                        sublinedto.Project.Code = (linedto.DmsSaleNo);
                        transinlinedto.TransInSubLines.Add(sublinedto);
                        transindto.TransInLines.Add(transinlinedto);
                    }
                    list.Add(transindto);
                }
            }
            return list;
        }