private void SetRcvLineLotInfo(RcvLine rcvLine, LotMaster.EntityKey lotKey)
        {
            if (lotKey == null)
            {
                return;
            }
            LotMaster lotMaster = lotKey.GetEntity();

            //rcvLine.RcvLotKey = lotKey;
            //rcvLine.RcvLotCode = lotMaster.LotCode;

            rcvLine.InvLotKey        = lotKey;
            rcvLine.InvLotCode       = lotMaster.LotCode;
            rcvLine.InvLotEnableDate = lotMaster.EffectiveDatetime;
            rcvLine.InvLotValidDate  = lotMaster.ValidDate;
        }
        private ProductBarCodeByRMADTO FindProductBarCodeDTO(List <ProductBarCodeByRMADTO> barCodeDTOs, RcvLine rcvLine)
        {
            foreach (ProductBarCodeByRMADTO barCodeDTO in barCodeDTOs)
            {
                if (barCodeDTO.RMALine == rcvLine.SrcDoc.SrcDocLine.EntityID && barCodeDTO.ActualLength == (int)(rcvLine.RcvQtyTU * 1000))
                {
                    return(barCodeDTO);
                }
            }

            throw new Exception(string.Format("没有找到销售退回收货单{0}行{1}对应的DTO数据", rcvLine.Receivement.DocNo, rcvLine.DocLineNo));
        }