예제 #1
0
        public IActionResult Detail(string id, string pid)
        {
            var model = new Wms_invmovedetailDto();
            var head  = _inventorymoveServices.QueryableToEntity(c => c.InventorymoveId == SqlFunc.ToInt64(pid) && c.IsDel == 1);

            model.AimStoragerackId    = head.AimStoragerackId;
            model.SourceStoragerackId = head.SourceStoragerackId;
            if (id.IsEmptyZero())
            {
                model.Pid = pid;
                return(View(model));
            }
            else
            {
                var detail = _invmovedetailServices.QueryableToList(c => c.InventorymoveId == SqlFunc.ToInt64(pid) && c.IsDel == 1);
                model.Pid    = pid;
                model.Detail = detail.Select(c => new Wmsinvmovedetail
                {
                    MaterialId      = c.MaterialId.ToString(),
                    MaterialNo      = _materialServices.QueryableToEntity(m => m.MaterialId == c.MaterialId).MaterialNo,
                    MaterialName    = _materialServices.QueryableToEntity(m => m.MaterialId == c.MaterialId).MaterialName,
                    ActQty          = c.ActQty,
                    Qty             = _inventoryServices.QueryableToEntity(m => m.MaterialId == c.MaterialId && m.StoragerackId == model.SourceStoragerackId).Qty,
                    AuditinId       = c.AuditinId.ToString(),
                    AuditinTime     = c.AuditinTime,
                    CreateBy        = c.CreateBy.ToString(),
                    CreateDate      = c.CreateDate,
                    InventorymoveId = c.InventorymoveId.ToString(),
                    IsDel           = c.IsDel,
                    ModifiedBy      = c.ModifiedBy.ToString(),
                    MoveDetailId    = c.MoveDetailId.ToString(),
                    ModifiedDate    = c.ModifiedDate,
                    PlanQty         = c.PlanQty,
                    Remark          = c.Remark,
                    Status          = c.Status,
                }).ToList();
                return(View(model));
            }
        }
예제 #2
0
        public IActionResult Add(string id)
        {
            var model = new Wms_material();

            if (id.IsEmpty())
            {
                return(View(model));
            }
            else
            {
                model = _materialServices.QueryableToEntity(c => c.MaterialId == SqlFunc.ToInt64(id));
                return(View(model));
            }
        }