Ejemplo n.º 1
0
        /// <summary>
        /// 构建库存不足提示
        /// </summary>
        /// <param name="line"></param>
        /// <param name="msg">错误信息</param>
        /// <returns></returns>
        private string BuilderErrorMessage(WTransferInLine line, string msg)
        {
            StringBuilder sb = new StringBuilder(msg);

            sb.AppendLine(",货位:" + line.PositionCode);
            sb.AppendLine(",物料:" + line.MaterialCode);
            if (!string.IsNullOrWhiteSpace(line.Batch))
            {
                sb.AppendLine(",批次:" + line.Batch);
            }
            if (!string.IsNullOrWhiteSpace(line.OwnerCode))
            {
                sb.AppendLine(",货主:" + line.OwnerCode);
            }
            return(sb.ToString());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 入库通知单行转换入库单行
        /// </summary>
        /// <param name="inNoticeLine"></param>
        /// <returns></returns>
        protected WTransferInLine CloneInNoticeLine(WTransferInNoticeLine inNoticeLine)
        {
            WTransferInLine line = new WTransferInLine()
            {
                Batch        = inNoticeLine.Batch,
                CreateDate   = DateTime.Now,
                Factory      = inNoticeLine.Factory,
                InCount      = inNoticeLine.InPutCount,
                MaterialCode = inNoticeLine.MaterialCode,
                MaterialID   = inNoticeLine.MaterialID,
                OwnerCode    = inNoticeLine.OwnerCode,
                PositionCode = inNoticeLine.PositionCode,
                PositionID   = inNoticeLine.PositionID,
                UnitID       = inNoticeLine.UnitID,
                SourceLineID = inNoticeLine.ID,
                StockID      = inNoticeLine.StockID
            };

            return(line);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 其他入库复制入口记录
        /// </summary>
        /// <param name="line"></param>
        /// <param name="other"></param>
        /// <returns></returns>
        private WStockIn CloneTransferIn(WTransferInLine line, WTransferIn transferIn)
        {
            WStockIn stockIn = new WStockIn();

            stockIn.Batch         = line.Batch;
            stockIn.Factory       = line.Factory;
            stockIn.InCount       = line.InCount;
            stockIn.MaterialCode  = line.MaterialCode;
            stockIn.MaterialID    = line.MaterialID;
            stockIn.OwnerCode     = line.OwnerCode;
            stockIn.PositionCode  = line.PositionCode;
            stockIn.PositionID    = line.PositionID;
            stockIn.SourceCode    = transferIn.TransferInCode;
            stockIn.SourceID      = line.ParentID;
            stockIn.SourceLineID  = line.ID;
            stockIn.StockInDate   = transferIn.CreateDate;
            stockIn.StockInType   = StockInEnum.TransferIn;
            stockIn.UnitID        = line.UnitID;
            stockIn.WarehouseCode = transferIn.WarehouseCode;
            stockIn.WarehouseID   = transferIn.WarehouseID;
            stockIn.StockID       = line.StockID;
            return(stockIn);
        }