修改旧规格
This commit is contained in:
@@ -81,23 +81,23 @@ namespace BarCode.Web.Domain.Entitys
|
||||
public string MaterialNumber { get; set; } = string.Empty;
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 名称
|
||||
///// </summary>
|
||||
//[Column("MaterialName")]
|
||||
//public string MaterialName { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[Column("MaterialName")]
|
||||
public string? MaterialName { get; set; } = string.Empty;
|
||||
|
||||
///// <summary>
|
||||
///// 规格型号
|
||||
///// </summary>
|
||||
//[Column("Specifications")]
|
||||
//public string Specifications { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
[Column("Specifications")]
|
||||
public string? Specifications { get; set; } = string.Empty;
|
||||
|
||||
///// <summary>
|
||||
/////69码
|
||||
///// </summary>
|
||||
//[Column("BarCode")]
|
||||
//public string BarCode { get; set; } = "";
|
||||
/// <summary>
|
||||
///69码
|
||||
/// </summary>
|
||||
[Column("BarCode")]
|
||||
public string? BarCode { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 老物料编码(上一次物料编码)
|
||||
@@ -336,15 +336,19 @@ namespace BarCode.Web.Domain.Entitys
|
||||
/// 修改物料编码
|
||||
/// </summary>
|
||||
/// <param name="number"></param>
|
||||
public Result UpdateMaterial(string number,string Specifications)
|
||||
public Result UpdateMaterial(string number,string MaterialName,string MaterialSpecifications,string MaterialBarCode, string old_Specifications)
|
||||
{
|
||||
if (this.IsUse)
|
||||
return Result.ReFailure($"序列码 {this.SerialNumber} 已被使用,不允许规格转换", 600007);
|
||||
if (!this.MaterialNumber.Equals(number))
|
||||
{
|
||||
this.Old_MaterialNumber = this.MaterialNumber;
|
||||
this.old_Specifications = Specifications;
|
||||
this.old_Specifications = old_Specifications;
|
||||
this.MaterialName= MaterialName;
|
||||
this.Specifications= MaterialSpecifications;
|
||||
this.BarCode= MaterialBarCode;
|
||||
this.MaterialNumber = number;
|
||||
|
||||
}
|
||||
|
||||
return Result.ReSuccess();
|
||||
|
||||
Reference in New Issue
Block a user