diff --git a/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021072716_20211021001.Designer.cs b/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021072716_20211021001.Designer.cs index 600ae1d..ee82423 100644 --- a/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021072716_20211021001.Designer.cs +++ b/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021072716_20211021001.Designer.cs @@ -531,7 +531,7 @@ namespace Win_in.Sfs.Scp.WebApi.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseDock") + b.Property("Dock") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); diff --git a/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021072716_20211021001.cs b/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021072716_20211021001.cs index e860bfb..04fee76 100644 --- a/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021072716_20211021001.cs +++ b/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021072716_20211021001.cs @@ -98,7 +98,7 @@ namespace Win_in.Sfs.Scp.WebApi.Migrations SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), RcType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Warehouse = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseDock = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Dock = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), TimeWindowBegin = table.Column(type: "datetime2", nullable: false), TimeWindowEnd = table.Column(type: "datetime2", nullable: false), ReceiveTime = table.Column(type: "datetime2", nullable: false), diff --git a/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021081413_20211021002.Designer.cs b/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021081413_20211021002.Designer.cs index c2aa824..680100b 100644 --- a/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021081413_20211021002.Designer.cs +++ b/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021081413_20211021002.Designer.cs @@ -514,7 +514,7 @@ namespace Win_in.Sfs.Scp.WebApi.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseDock") + b.Property("Dock") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); diff --git a/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/WebApiHttpApiHostMigrationsDbContextModelSnapshot.cs b/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/WebApiHttpApiHostMigrationsDbContextModelSnapshot.cs index b42669e..f03ebb1 100644 --- a/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/WebApiHttpApiHostMigrationsDbContextModelSnapshot.cs +++ b/ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/WebApiHttpApiHostMigrationsDbContextModelSnapshot.cs @@ -512,7 +512,7 @@ namespace Win_in.Sfs.Scp.WebApi.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseDock") + b.Property("Dock") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNCreateOrUpdateDTOBase.cs b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNCreateOrUpdateDTOBase.cs index 700d671..67621b2 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNCreateOrUpdateDTOBase.cs +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNCreateOrUpdateDTOBase.cs @@ -12,11 +12,6 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs public abstract class ASNCreateOrUpdateDTOBase : EntityDto,IHasExtraProperties { - /// - /// 状态(Status) - /// - [Display(Name = "状态(Status)")] - public int Status { set; get; } /// /// 联系人(Contact person) @@ -40,13 +35,13 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs /// 仓库(Warehouse code) /// [Display(Name = "仓库(Warehouse)")] - public decimal Warehouse { set; get; } + public string Warehouse { set; get; } /// /// 收货口(Warehouse Dock) /// - [Display(Name = "收货口(WarehouseDock)")] - public string WarehouseDock { set; get; } + [Display(Name = "收货口(Dock)")] + public string Dock { set; get; } /// /// 时间窗口开始(Time Window Begin) @@ -66,13 +61,6 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs [Display(Name = "备注(Remark)")] public string Remark { set; get; } - /// - /// 是否已读(IsRead) - /// - [Display(Name = "是否已读(IsRead)")] - public bool IsRead { set; get; } - - public virtual ICollection Details { get; set; } /// diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNDTO.cs b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNDTO.cs index b8d4923..7d902bc 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNDTO.cs +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNDTO.cs @@ -63,13 +63,13 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs /// 仓库(Warehouse code) /// [Display(Name = "仓库(Warehouse)")] - public decimal Warehouse { set; get; } + public string Warehouse { set; get; } /// /// 收货口(Warehouse Dock) /// - [Display(Name = "收货口(WarehouseDock)")] - public string WarehouseDock { set; get; } + [Display(Name = "收货口(Dock)")] + public string Dock { set; get; } /// /// 时间窗口开始(Time Window Begin) diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNUpdateDTO.cs b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNUpdateDTO.cs index b77abae..df9018b 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNUpdateDTO.cs +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/ASNs/ASNUpdateDTO.cs @@ -7,6 +7,20 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs /// public class ASNUpdateDTO : ASNCreateOrUpdateDTOBase { + /// + /// 状态(Status) + /// + [Display(Name = "状态(Status)")] + public int Status { set; get; } + + + /// + /// 是否已读(IsRead) + /// + [Display(Name = "是否已读(IsRead)")] + public bool IsRead { set; get; } + + /// /// 并发时间戳(Concurrency Stamp) /// diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateOrUpdateDTOBase.cs b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateOrUpdateDTOBase.cs index 5917787..1c6df20 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateOrUpdateDTOBase.cs +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateOrUpdateDTOBase.cs @@ -16,10 +16,10 @@ namespace Win_in.Sfs.Scp.WebApi.Receipts public string Warehouse { set; get; } /// - /// 收货口(WarehouseDock) + /// 收货口(Dock) /// - [Display(Name = "收货口(WarehouseDock)")] - public string WarehouseDock { set; get; } + [Display(Name = "收货口(Dock)")] + public string Dock { set; get; } /// /// 时间窗口开始(TimeWindowBegin) diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptDTO.cs b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptDTO.cs index 44164cc..25c8c6e 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptDTO.cs +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptDTO.cs @@ -47,10 +47,10 @@ namespace Win_in.Sfs.Scp.WebApi.Receipts public string Warehouse { set; get; } /// - /// 收货口(WarehouseDock) + /// 收货口(Dock) /// - [Display(Name = "收货口(WarehouseDock)")] - public string WarehouseDock { set; get; } + [Display(Name = "收货口(Dock)")] + public string Dock { set; get; } /// /// 时间窗口开始(TimeWindowBegin) diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/ISupplierAppService.cs b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/ISupplierAppService.cs index 5ce00d8..c7113ea 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/ISupplierAppService.cs +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/ISupplierAppService.cs @@ -4,7 +4,7 @@ using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; using Win_in.Sfs.Scp.WebApi.Suppliers; -namespace Win_in.Sfs.Scp.WebApi.Supplierss +namespace Win_in.Sfs.Scp.WebApi.Suppliers { public interface ISupplierAppService : ICrudAppService { diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Win_in.Sfs.Scp.WebApi.Application.Contracts.xml b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Win_in.Sfs.Scp.WebApi.Application.Contracts.xml index 95d274c..7c6db66 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Win_in.Sfs.Scp.WebApi.Application.Contracts.xml +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Win_in.Sfs.Scp.WebApi.Application.Contracts.xml @@ -549,9 +549,9 @@ 仓库(Warehouse) - + - 收货口(WarehouseDock) + 收货口(Dock) @@ -684,9 +684,9 @@ 仓库(Warehouse) - + - 收货口(WarehouseDock) + 收货口(Dock) diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs index 0818388..f9283cf 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs @@ -7,7 +7,7 @@ using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; using Win_in.Sfs.Scp.WebApi.Suppliers; -namespace Win_in.Sfs.Scp.WebApi.Supplierss +namespace Win_in.Sfs.Scp.WebApi.Suppliers { /// /// 供应商服务 diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Win_in.Sfs.Scp.WebApi.Application.xml b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Win_in.Sfs.Scp.WebApi.Application.xml index 42a3163..774dedd 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Win_in.Sfs.Scp.WebApi.Application.xml +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Win_in.Sfs.Scp.WebApi.Application.xml @@ -163,38 +163,38 @@ ID - + 零件服务 - + 获取一条数据 (Get a piece of data) - + 获取数据列表 (Get data list) - + 新增实体 (Create New entity) - + 修改实体 (Modify entity) - + 删除实体 (Delete entity) diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/ASNs/ASN.cs b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/ASNs/ASN.cs index 7f6e0c3..cc9e8ad 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/ASNs/ASN.cs +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/ASNs/ASN.cs @@ -66,13 +66,13 @@ namespace Win_in.Sfs.Scp.WebApi /// 仓库(Warehouse code) /// [Display(Name = "仓库(Warehouse)")] - public decimal Warehouse { set; get; } + public string Warehouse { set; get; } /// /// 收货口(Warehouse Dock) /// - [Display(Name = "收货口(WarehouseDock)")] - public string WarehouseDock { set; get; } + [Display(Name = "收货口(Dock)")] + public string Dock { set; get; } /// /// 时间窗口开始(Time Window Begin) @@ -111,9 +111,33 @@ namespace Win_in.Sfs.Scp.WebApi public bool IsRead { set; get; } - public virtual List ASNDetails { get; set; } + public virtual List Details { get; set; } + protected ASN() { } + public ASN(string asnNumber,string rpNumber,string poNumber,string supplierCode, string site, + string company, string warehouse, string dock,DateTime timeWindowBegin,DateTime timeWindowEnd, + string contactName, string contactPhone, string carNumber, string remark) + { + AsnNumber = asnNumber; + RpNumber = rpNumber; + PoNumber = poNumber; + SupplierCode = supplierCode; + Site = site; + Company = company; + Warehouse = warehouse; + Dock = dock; + TimeWindowBegin = timeWindowBegin; + TimeWindowEnd = timeWindowEnd; + ContactName = contactName; + ContactPhone = contactPhone; + CarNumber = carNumber; + Remark = remark; + Status = 0;//TODO 改成枚举 + IsRead = false; + Details = new List(); + + } #region details handler public virtual void AddDetail(IGuidGenerator guidGenerator, ASNDetail detail) @@ -125,7 +149,7 @@ namespace Win_in.Sfs.Scp.WebApi throw new Exception(detail.PoNumber + detail.PoLine + "已经在明细中存在!"); } - ASNDetails.Add(new ASNDetail(guidGenerator.Create(), detail.AsnNumber, detail.PoNumber, detail.PoLine, detail.PartCode, detail.Lot, detail.SupplierLot, detail.ProductionDate, + Details.Add(new ASNDetail(guidGenerator.Create(), detail.AsnNumber, detail.PoNumber, detail.PoLine, detail.PartCode, detail.Lot, detail.SupplierLot, detail.ProductionDate, detail.Uom, detail.DeliverQty, detail.StdPackUom, detail.StdPackQty, detail.SupplierPackUom,detail.SupplierPackQty,detail.SupplierPackConvertRate, detail.LabelCode,detail.BarCode,detail.PalletLabelCode)); } @@ -143,12 +167,12 @@ namespace Win_in.Sfs.Scp.WebApi public virtual bool IsInDetails(string ponumber, string poline) { - return ASNDetails.Any(di => di.PoNumber == ponumber && di.PoLine == poline); + return Details.Any(di => di.PoNumber == ponumber && di.PoLine == poline); } public virtual bool IsInDetails(Guid itemId) { - return ASNDetails.Any(di => di.Id == itemId); + return Details.Any(di => di.Id == itemId); } public virtual bool UpdateDetail(IGuidGenerator guidGenerator, ASNDetail detail) @@ -173,7 +197,7 @@ namespace Win_in.Sfs.Scp.WebApi public virtual ASNDetail FindDetail(Guid itemId) { - var item = ASNDetails.FirstOrDefault(p => p.Id == itemId); + var item = Details.FirstOrDefault(p => p.Id == itemId); return item; } diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/ASNs/ASNDetail.cs b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/ASNs/ASNDetail.cs index 4e17d5f..1f82fa4 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/ASNs/ASNDetail.cs +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/ASNs/ASNDetail.cs @@ -113,19 +113,19 @@ namespace Win_in.Sfs.Scp.WebApi public string PalletLabelCode { set; get; } - public ASNDetail() { } + protected ASNDetail() { } public ASNDetail( - Guid id, string asnNumber,string poNumber, string poLine, string partCode, string lot, string SupplierLot, DateTime ProductionDate, string uom,decimal deliverQty, - string stdPackUom, decimal stdPackQty, string supplierPackUom, decimal supplierPackQty, decimal supplierPackConvertRate,string labelCode,string barCode,string PalletLabelCode) : base(id) + Guid id, string asnNumber,string poNumber, string poLine, string partCode, string lot, string supplierLot, DateTime productionDate, string uom,decimal deliverQty, + string stdPackUom, decimal stdPackQty, string supplierPackUom, decimal supplierPackQty, decimal supplierPackConvertRate,string labelCode,string barCode,string palletLabelCode) : base(id) { AsnNumber = asnNumber; PoNumber = poNumber; PoLine = poLine; PartCode = partCode; Lot = lot; - SupplierLot = SupplierLot; - ProductionDate = ProductionDate; + SupplierLot = supplierLot; + ProductionDate = productionDate; Uom = uom; DeliverQty = deliverQty; StdPackUom = stdPackUom; @@ -135,7 +135,7 @@ namespace Win_in.Sfs.Scp.WebApi SupplierPackConvertRate = supplierPackConvertRate; LabelCode = labelCode; BarCode = barCode; - PalletLabelCode = PalletLabelCode; + PalletLabelCode = palletLabelCode; } } } \ No newline at end of file diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Receipts/Receipt.cs b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Receipts/Receipt.cs index d471ec6..c264d8c 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Receipts/Receipt.cs +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Receipts/Receipt.cs @@ -53,10 +53,10 @@ namespace Win_in.Sfs.Scp.WebApi public string Warehouse { set; get; } /// - /// 收货口(WarehouseDock) + /// 收货口(Dock) /// - [Display(Name = "收货口(WarehouseDock)")] - public string WarehouseDock { set; get; } + [Display(Name = "收货口(Dock)")] + public string Dock { set; get; } /// /// 时间窗口开始(TimeWindowBegin) diff --git a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/WebApiDbContextModelCreatingExtensions.cs b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/WebApiDbContextModelCreatingExtensions.cs index ef32df7..576d48b 100644 --- a/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/WebApiDbContextModelCreatingExtensions.cs +++ b/ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/WebApiDbContextModelCreatingExtensions.cs @@ -175,7 +175,7 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore b.Property(q => q.SupplierCode).IsRequired().HasMaxLength(64); b.Property(q => q.RcType).IsRequired().HasMaxLength(64); b.Property(q => q.Warehouse).IsRequired().HasMaxLength(64); - b.Property(q => q.WarehouseDock).IsRequired().HasMaxLength(64); + b.Property(q => q.Dock).IsRequired().HasMaxLength(64); b.Property(q => q.TimeWindowBegin).IsRequired(); b.Property(q => q.TimeWindowEnd).IsRequired(); b.Property(q => q.ReceiveTime).IsRequired(); @@ -290,8 +290,8 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore b.Property(q => q.ContactName).HasMaxLength(64); b.Property(q => q.ContactPhone).HasMaxLength(64); b.Property(q => q.CarNumber).HasMaxLength(64); - b.Property(q => q.Warehouse).IsRequired(); - b.Property(q => q.WarehouseDock).IsRequired().HasMaxLength(64); + b.Property(q => q.Warehouse).IsRequired().HasMaxLength(64); + b.Property(q => q.Dock).IsRequired().HasMaxLength(64); b.Property(q => q.TimeWindowBegin).IsRequired(); b.Property(q => q.TimeWindowEnd).IsRequired(); b.Property(q => q.Site).IsRequired().HasMaxLength(64); @@ -301,7 +301,7 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore b.Property(x => x.SequenceNumber).HasMaxLength(64); b.Property(x => x.IsRead).IsRequired(); ; - b.HasMany(u => u.ASNDetails).WithOne().HasForeignKey(rd => rd.Id).OnDelete(DeleteBehavior.NoAction).IsRequired(); + b.HasMany(u => u.Details).WithOne().HasForeignKey(rd => rd.Id).OnDelete(DeleteBehavior.NoAction).IsRequired(); b.HasIndex(x => new { x.AsnNumber,x.Company,x.Site }).IsUnique();