18 changed files with 872 additions and 51 deletions
@ -0,0 +1,272 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Volo.Abp.Domain.Values; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
|
||||
|
namespace Win_in.Sfs.Basedata; |
||||
|
#region 枚举及实体
|
||||
|
/// <summary>
|
||||
|
/// 标签类别
|
||||
|
/// </summary>
|
||||
|
public enum EnumLabelType |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 空枚举
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "未定义")] |
||||
|
None = 0, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 采购标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "采购标签")] |
||||
|
PurchaseLabel = 1, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生产标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "生产标签")] |
||||
|
ProductionLabel = 2, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 销售标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "销售标签")] |
||||
|
SaleLabel = 3, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 托盘标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "托盘标签")] |
||||
|
PalletLabel = 4, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点标签")] |
||||
|
CountLabel = 5, |
||||
|
} |
||||
|
|
||||
|
public enum LabelStatus |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 未定义
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "未定义")] |
||||
|
None = 0, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 有效
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "有效")] |
||||
|
Enable = 1, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 无效
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "无效")] |
||||
|
Disable = 2 |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 质量信息
|
||||
|
/// </summary>
|
||||
|
public class QualityInfo : ValueObject |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 质量等级
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string QLevel { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 质检文件
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string QualityFile { get; set; } |
||||
|
|
||||
|
protected override IEnumerable<object> GetAtomicValues() |
||||
|
{ |
||||
|
yield return QLevel; |
||||
|
yield return QualityFile; |
||||
|
} |
||||
|
|
||||
|
public QualityInfo(string qLevel, string qualityFile) |
||||
|
{ |
||||
|
QLevel = qLevel; |
||||
|
QualityFile = qualityFile; |
||||
|
} |
||||
|
|
||||
|
public QualityInfo() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 采购信息
|
||||
|
/// </summary>
|
||||
|
[Owned] |
||||
|
public class PurchaseInfo : ValueObject |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 供应商代码
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string SupplierCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 订单号
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string PoNumber { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 要货计划号
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string RpNumber { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 发货单号
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string AsnNumber { get; set; } |
||||
|
|
||||
|
protected override IEnumerable<object> GetAtomicValues() |
||||
|
{ |
||||
|
yield return SupplierCode; |
||||
|
yield return PoNumber; |
||||
|
yield return RpNumber; |
||||
|
yield return AsnNumber; |
||||
|
} |
||||
|
|
||||
|
public PurchaseInfo(string supplierCode, string poNumber, string rpNumber, string asnNumber) |
||||
|
{ |
||||
|
SupplierCode = supplierCode; |
||||
|
PoNumber = poNumber; |
||||
|
RpNumber = rpNumber; |
||||
|
AsnNumber = asnNumber; |
||||
|
} |
||||
|
|
||||
|
public PurchaseInfo() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生产信息
|
||||
|
/// </summary>
|
||||
|
public class ProductionInfo : ValueObject |
||||
|
{ |
||||
|
public ProductionInfo() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public ProductionInfo(string prodLine, string team, string shift) |
||||
|
{ |
||||
|
ProdLine = prodLine; |
||||
|
Team = team; |
||||
|
Shift = shift; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生产线
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string ProdLine { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 班组
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string Team { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 班次
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string Shift { get; set; } |
||||
|
|
||||
|
protected override IEnumerable<object> GetAtomicValues() |
||||
|
{ |
||||
|
|
||||
|
yield return ProdLine; |
||||
|
yield return Team; |
||||
|
yield return Shift; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
#region 接口
|
||||
|
public interface IHasPurchaseInfo |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 采购信息
|
||||
|
/// </summary>
|
||||
|
public PurchaseInfo PurchaseInfo { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public interface IHasProductionInfo |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 生产信息
|
||||
|
/// </summary>
|
||||
|
public ProductionInfo ProductionInfo { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public interface IHasPurchaseInfoDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 供应商编号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "供应商编号")] |
||||
|
public string SupplierCode { get; set; } |
||||
|
|
||||
|
public string PoNumber { get; set; } |
||||
|
|
||||
|
public string RpNumber { get; set; } |
||||
|
|
||||
|
public string AsnNumber { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public interface IHasProductionInfoDto |
||||
|
{ |
||||
|
public string ProdLine { get; set; } |
||||
|
public string Team { get; set; } |
||||
|
public string Shift { get; set; } |
||||
|
} |
||||
|
|
||||
|
public interface IHasQualityInfo |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 质量信息
|
||||
|
/// </summary>
|
||||
|
public QualityInfo QualityInfo { get; set; } |
||||
|
} |
||||
|
|
||||
|
public interface IHasQualityInfoDto |
||||
|
{ |
||||
|
public string QLevel { get; set; } |
||||
|
|
||||
|
public string QualityFile { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
#endregion
|
Loading…
Reference in new issue