出库增加箱信息填写

This commit is contained in:
18942506660
2024-09-20 11:09:30 +08:00
parent 06fcd26b5b
commit 8c284d1823
13 changed files with 349 additions and 2 deletions

View File

@@ -1,9 +1,11 @@
using System;

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using WMS.Web.Core;
using WMS.Web.Core.Internal.Results;
using WMS.Web.Domain.Values;
namespace WMS.Web.Domain.Entitys
@@ -207,5 +209,31 @@ namespace WMS.Web.Domain.Entitys
}
this.BillNo = "CK" + idStr;
}
/// <summary>
/// 修改箱信息
/// </summary>
/// <param name="boxDetailsId"></param>
/// <param name="boxLength"></param>
/// <param name="boxWide"></param>
/// <param name="boxHigh"></param>
/// <param name="boxWeight"></param>
/// <param name="userId"></param>
/// <returns></returns>
public Result EditBoxInfo(int boxDetailsId, decimal? boxLength, decimal? boxWide, decimal? boxHigh, decimal? boxWeight, int userId)
{
var boxDetail = this.Details.SelectMany(s => s.BoxsDetails).FirstOrDefault(f => f.Id == boxDetailsId);
if (boxDetail == null) return Result.ReFailure(ResultCodes.NoDateError);
if (boxDetail.BoxLength != boxLength || boxDetail.BoxWide != boxWide ||
boxDetail.BoxHigh != boxHigh || boxDetail.BoxWeight != boxWeight)
{
boxDetail.BoxLength = boxLength;
boxDetail.BoxWide = boxWide;
boxDetail.BoxHigh = boxHigh;
boxDetail.BoxWeight = boxWeight;
boxDetail.UpdateId = userId;
boxDetail.UpdateDate = DateTime.Now;
}
return Result.ReSuccess();
}
}
}

View File

@@ -49,5 +49,35 @@ namespace WMS.Web.Domain.Entitys
///</summary>
[Column("Qty")]
public decimal Qty { get; set; }
/// <summary>
/// 箱长
///</summary>
[Column("BoxLength")]
public decimal? BoxLength { get; set; } = null;
/// <summary>
/// 箱宽
///</summary>
[Column("BoxWide")]
public decimal? BoxWide { get; set; } = null;
/// <summary>
/// 箱高
///</summary>
[Column("BoxHigh")]
public decimal? BoxHigh { get; set; } = null;
/// <summary>
/// 箱重
///</summary>
[Column("BoxWeight")]
public decimal? BoxWeight { get; set; } = null;
/// <summary>
/// 修改人
/// </summary>
[Column("UpdateId")]
public int? UpdateId { get; set; }
/// <summary>
/// 修改时间
/// </summary>
[Column("UpdateDate")]
public DateTime? UpdateDate { get; set; } = null;
}
}