diff --git a/WebApiService/Win_in.Sfs.Scp.WebApi.sln b/WebApiService/Win_in.Sfs.Scp.WebApi.sln index fbe623c..d18494f 100644 --- a/WebApiService/Win_in.Sfs.Scp.WebApi.sln +++ b/WebApiService/Win_in.Sfs.Scp.WebApi.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29020.237 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31919.166 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win_in.Sfs.Scp.WebApi.Domain", "src\Win_in.Sfs.Scp.WebApi.Domain\Win_in.Sfs.Scp.WebApi.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}" EndProject @@ -35,6 +35,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win_in.Sfs.Scp.WebApi.DbMig EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win_in.Sfs.Scp.WebApi.HttpApi.Host", "src\Win_in.Sfs.Scp.WebApi.HttpApi.Host\Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj", "{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Win_in.Sfs.Scp.v1.Domain", "src\Win_in.Sfs.Scp.v1.Domain\Win_in.Sfs.Scp.v1.Domain.csproj", "{3EE98133-3E7A-4B14-A515-12CB039A9EED}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Win_in.Sfs.Scp.v1.EntityFrameworkCore", "src\Win_in.Sfs.Scp.v1.EntityFrameworkCore\Win_in.Sfs.Scp.v1.EntityFrameworkCore.csproj", "{77D1D3F8-A04C-4688-AC67-C8372BD268A2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -97,6 +101,14 @@ Global {748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.Build.0 = Debug|Any CPU {748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.ActiveCfg = Release|Any CPU {748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.Build.0 = Release|Any CPU + {3EE98133-3E7A-4B14-A515-12CB039A9EED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3EE98133-3E7A-4B14-A515-12CB039A9EED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3EE98133-3E7A-4B14-A515-12CB039A9EED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3EE98133-3E7A-4B14-A515-12CB039A9EED}.Release|Any CPU.Build.0 = Release|Any CPU + {77D1D3F8-A04C-4688-AC67-C8372BD268A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77D1D3F8-A04C-4688-AC67-C8372BD268A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77D1D3F8-A04C-4688-AC67-C8372BD268A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77D1D3F8-A04C-4688-AC67-C8372BD268A2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -116,6 +128,8 @@ Global {EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} {AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} {748584B1-BA69-4F6A-81AA-F4BDE6BCE29D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} + {3EE98133-3E7A-4B14-A515-12CB039A9EED} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} + {77D1D3F8-A04C-4688-AC67-C8372BD268A2} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/IPartAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/IPartAppService.cs index 54d69e2..f8c228b 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/IPartAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/IPartAppService.cs @@ -11,7 +11,7 @@ namespace Win_in.Sfs.Scp.WebApi /// public interface IPartAppService : IReadOnlyAppService { - Task CreateAsync(PartDTO partCreateDTO); + Task CreateAsync(PartCreateDto partCreateDTO); } diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDto.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDto.cs new file mode 100644 index 0000000..4a85bb8 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDto.cs @@ -0,0 +1,103 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Scp.WebApi; + +public class PartCreateDto : EntityDto +{ + /// + /// 代码(Code) + /// + [Display(Name = "代码")] + public string Code { get; set; } + + /// + /// 名称(Name) + /// + [Display(Name = "名称")] + public string Name { get; set; } + + /// + /// 描述(Desc1) + /// + [Display(Name = "描述")] + public string Desc1 { get; set; } + + /// + /// 描述2(Desc2) + /// + [Display(Name = "描述2")] + public string Desc2 { get; set; } + + /// + /// 状态(Status) + /// + [Display(Name = "状态")] + public string Status { get; set; } + + /// + /// 制造件(Can make) + /// + [Display(Name = "制造件")] + public bool IsMakePart { get; set; } + + /// + /// 采购件(Can buy) + /// + [Display(Name = "采购件")] + public bool IsBuyPart { get; set; } + + /// + /// 计量单位(Uom) + /// + [Display(Name = "计量单位")] + public string Uom { get; set; } + + /// + /// ABC类(ABC Class) + /// + [Display(Name = "ABC类")] + public string AbcClass { get; set; } + + /// + /// 产品类(Product Line) + /// + [Display(Name = "产品类")] + public string ProductLine { get; set; } + + /// + /// 类型(Type) + /// + [Display(Name = "类型")] + public string Type { get; set; } + + /// + /// 种类(Catalog) + /// + [Display(Name = "种类")] + public string Catalog { get; set; } + + /// + /// 分组(Group) + /// + [Display(Name = "分组")] + public string Group { get; set; } + + /// + /// 版本(version) + /// + [Display(Name = "版本")] + public string Version { get; set; } + + /// + /// 地点(Site) + /// + [Display(Name = "地点")] + public string Site { get; set; } + + /// + /// 公司(Company) + /// + [Display(Name = "公司")] + public string Company { get; set; } +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/CreatePartDtoValidator.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDtoValidator.cs similarity index 89% rename from WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/CreatePartDtoValidator.cs rename to WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDtoValidator.cs index 0237543..7ab3149 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/CreatePartDtoValidator.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDtoValidator.cs @@ -2,9 +2,9 @@ namespace Win_in.Sfs.Scp.WebApi; -public class CreatePartDtoValidator : AbstractValidator +public class PartCreateDtoValidator : AbstractValidator { - public CreatePartDtoValidator() + public PartCreateDtoValidator() { RuleFor(x => x.Code).MaximumLength(64).NotEmpty(); RuleFor(x => x.Name).MaximumLength(64).NotEmpty(); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartDTO.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartDTO.cs index 99bb6e6..c3da0b9 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartDTO.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartDTO.cs @@ -1,6 +1,5 @@ using System; using System.ComponentModel.DataAnnotations; -using Volo.Abp.Application.Dtos; using Volo.Abp.Data; using Win_in.Sfs.Scp.WebApi.Domain.Shared; diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Permissions/WebApiPermissions.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Permissions/WebApiPermissions.cs index 3d303ae..0c419bf 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Permissions/WebApiPermissions.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Permissions/WebApiPermissions.cs @@ -3,7 +3,9 @@ public static class WebApiPermissions { public const string GroupName = "WebApi"; - + public const string CreateName = "Create"; + public const string UpdateName = "Update"; + public const string DeleteName = "Delete"; //Add your own permission names. Example: //public const string MyPermission1 = GroupName + ".MyPermission1"; diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/IPurchaseOrderAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/IPurchaseOrderAppService.cs index 8914c5c..5477016 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/IPurchaseOrderAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/IPurchaseOrderAppService.cs @@ -11,7 +11,7 @@ namespace Win_in.Sfs.Scp.WebApi /// public interface IPurchaseOrderAppService : IReadOnlyAppService { - Task CreateAsync(PurchaseOrderDTO poCreateDTO); + Task CreateAsync(PurchaseOrderCreateDTO poCreateDTO); } diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderCreateDTO.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderCreateDTO.cs new file mode 100644 index 0000000..8ca688c --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderCreateDTO.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Scp.WebApi; + +/// +/// 采购订单DTO(Purchase order DTO) +/// + +public class PurchaseOrderCreateDTO : EntityDto +{ + + /// + /// 订单号(PoNumber) + /// + [Display(Name = "订单号(PoNumber)")] + public string PoNumber { set; get; } + + /// + /// 供应商代码(SupplierCode) + /// + [Display(Name = "供应商代码(SupplierCode)")] + public string SupplierCode { set; get; } + + /// + /// 订单类型(PoType) + /// + [Display(Name = "订单类型(PoType)")] + public string PoType { set; get; } + + /// + /// 订单状态(Status) + /// + [Display(Name = "订单状态(Status)")] + public int Status { set; get; } + + /// + /// 是否寄存订单(IsConsignment) + /// + [Display(Name = "是否寄存订单(IsConsignment)")] + public bool IsConsignment { set; get; } + + /// + /// 订单日期(OrderDate) + /// + [Display(Name = "订单日期(OrderDate)")] + public DateTime OrderDate { set; get; } + + /// + /// 截止日期(DueDate) + /// + [Display(Name = "截止日期(DueDate)")] + public DateTime DueDate { set; get; } + + /// + /// 税率(TaxRate) + /// + [Display(Name = "税率(TaxRate)")] + public decimal TaxRate { set; get; } + + /// + /// 版本(version) + /// + [Display(Name = "版本")] + public string Version { get; set; } + + /// + /// 联系人(ContactName) + /// + [Display(Name = "联系人(ContactName)")] + public string ContactName { set; get; } + + /// + /// 联系电话(ContactPhone) + /// + [Display(Name = "联系电话(ContactPhone)")] + public string ContactPhone { set; get; } + + /// + /// 备注(Remark) + /// + [Display(Name = "备注(Remark)")] + public string Remark { set; get; } + + /// + /// 地点(Site) + /// + [Display(Name = "地点(Site)")] + public string Site { set; get; } + + /// + /// 公司(Company) + /// + [Display(Name = "公司(Company)")] + public string Company { set; get; } + + + public virtual ICollection Details { get; set; } +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/CreatePurchaseOrderValidator.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderCreateDtoValidator.cs similarity index 85% rename from WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/CreatePurchaseOrderValidator.cs rename to WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderCreateDtoValidator.cs index 219459c..4a90c67 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/CreatePurchaseOrderValidator.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderCreateDtoValidator.cs @@ -2,9 +2,9 @@ using FluentValidation; namespace Win_in.Sfs.Scp.WebApi; -public class CreatePurchaseOrderValidator : AbstractValidator +public class PurchaseOrderCreateDtoValidator : AbstractValidator { - public CreatePurchaseOrderValidator() + public PurchaseOrderCreateDtoValidator() { RuleFor(q => q.PoNumber).MaximumLength(64); RuleFor(q => q.SupplierCode).NotEmpty().MaximumLength(64); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderDTO.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderDTO.cs index d2b9dca..2049fb4 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderDTO.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderDTO.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Volo.Abp.Application.Dtos; using Win_in.Sfs.Scp.WebApi.Domain.Shared; namespace Win_in.Sfs.Scp.WebApi diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/IReceiptAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/IReceiptAppService.cs index 011f7e0..f599b4d 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/IReceiptAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/IReceiptAppService.cs @@ -7,6 +7,6 @@ namespace Win_in.Sfs.Scp.WebApi { public interface IReceiptAppService : IReadOnlyAppService { - + Task CreateAsync(ReceiptCreateDTO receiptCreateDTO); } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateDTO.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateDTO.cs new file mode 100644 index 0000000..908bb62 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateDTO.cs @@ -0,0 +1,126 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Scp.WebApi; + +/// +/// 收货单DTO(Receipt DTO) +/// +public class ReceiptCreateDTO : EntityDto +{ + /// + /// 收货单号(RcNumber) + /// + [Display(Name = "收货单号(RcNumber)")] + public string RcNumber { set; get; } + + /// + /// 发货单号(AsnNumber) + /// + [Display(Name = "发货单号(AsnNumber)")] + public string AsnNumber { set; get; } + + /// + /// 订单号(PoNumber) + /// + [Display(Name = "订单号(PoNumber)")] + public string PoNumber { set; get; } + + /// + /// 供应商代码(PoNumber) + /// + [Display(Name = "供应商代码(SupplierCode)")] + public string SupplierCode { set; get; } + + /// + /// 收货单类型(RcType) + /// + [Display(Name = "收货单类型(RcType)")] + public string RcType { set; get; } + + + /// + /// 仓库(Warehouse) + /// + [Display(Name = "仓库(Warehouse)")] + public string Warehouse { set; get; } + + /// + /// 收货口(Dock) + /// + [Display(Name = "收货口(Dock)")] + public string Dock { set; get; } + + /// + /// 收货日期(ReceiveDate) + /// + [Display(Name = "收货日期(ReceiveDate)")] + public DateTime ReceiveDate { set; get; } + + /// + /// 收货时间(ReceiveTime) + /// + [Display(Name = "收货时间(ReceiveTime)")] + public DateTime ReceiveTime { set; get; } + + /// + /// 订单行(PoLine) + /// + [Display(Name = "订单行(PoLine)")] + public string PoLine { set; get; } + + /// + /// 零件号(PartCode) + /// + [Display(Name = "零件号(PartCode)")] + public string PartCode { set; get; } + + /// + /// 批次(Lot) + /// + [Display(Name = "批次(Lot)")] + public string Lot { set; get; } + + /// + /// 供应商批次(SupplierLot) + /// + [Display(Name = "供应商批次(SupplierLot)")] + public string SupplierLot { set; get; } + + /// + /// 计量单位(Uom) + /// + [Display(Name = "计量单位(Uom)")] + public string Uom { set; get; } + + /// + /// 收货数量(ReceiveQty) + /// + [Display(Name = "收货数量(ReceiveQty)")] + public decimal ReceiveQty { set; get; } + + /// + /// 供应商包装转换率(SupplierPackConvertRate) + /// + [Display(Name = "供应商包装转换率(SupplierPackConvertRate)")] + public decimal SupplierPackConvertRate { set; get; } + + /// + /// 备注(Remark) + /// + [Display(Name = "备注(Remark)")] + public string Remark { set; get; } + + /// + /// 地点(Site) + /// + [Display(Name = "地点(Site)")] + public string Site { set; get; } + + /// + /// 公司(Company) + /// + [Display(Name = "公司(Company)")] + public string Company { set; get; } +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/CreateReceiptDtoValidator.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateDtoValidator.cs similarity index 90% rename from WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/CreateReceiptDtoValidator.cs rename to WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateDtoValidator.cs index ef0b807..e299df1 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/CreateReceiptDtoValidator.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateDtoValidator.cs @@ -2,9 +2,9 @@ using FluentValidation; namespace Win_in.Sfs.Scp.WebApi; -public class CreateReceiptDtoValidator : AbstractValidator +public class ReceiptCreateDtoValidator : AbstractValidator { - public CreateReceiptDtoValidator() + public ReceiptCreateDtoValidator() { RuleFor(q => q.RcNumber).NotEmpty().MaximumLength(64); RuleFor(q => q.AsnNumber).NotEmpty().MaximumLength(64); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptDTO.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptDTO.cs index 928e856..4b347dc 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptDTO.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptDTO.cs @@ -1,6 +1,5 @@ using System; using System.ComponentModel.DataAnnotations; -using Volo.Abp.Application.Dtos; using Win_in.Sfs.Scp.WebApi.Domain.Shared; namespace Win_in.Sfs.Scp.WebApi diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/ISupplierAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/ISupplierAppService.cs index e5ea272..fd5d1a3 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/ISupplierAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/ISupplierAppService.cs @@ -7,6 +7,6 @@ namespace Win_in.Sfs.Scp.WebApi { public interface ISupplierAppService : IReadOnlyAppService { - + Task CreateAsync(SupplierCreateDTO supplierCreateDTO); } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierCreateDTO.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierCreateDTO.cs new file mode 100644 index 0000000..6765ff2 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierCreateDTO.cs @@ -0,0 +1,108 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Scp.WebApi; + +/// +/// 供应商DTO(Supplier DTO) +/// +public class SupplierCreateDTO : EntityDto +{ + /// + /// 代码(Code) + /// + [Display(Name = "代码(Code)")] + public string Code { set; get; } + + /// + /// 简称(Name) + /// + [Display(Name = "简称(Name)")] + public string Name { set; get; } + + /// + /// 描述(Description) + /// + [Display(Name = "描述(Description)")] + public string Desc { set; get; } + + /// + /// 级别(Rank) + /// + [Display(Name = "级别(Rank)")] + public string Rank { get; set; } + + /// + /// 地址 + /// + [Display(Name = "地址(Address)")] + public string Address { get; set; } + + /// + /// 国家(Country) + /// + [Display(Name = "国家(Country)")] + public string Country { get; set; } + + /// + /// 城市(City) + /// + [Display(Name = "城市(City)")] + public string City { get; set; } + + /// + /// 电话(Phone) + /// + [Display(Name = "电话(Phone)")] + public string Phone { set; get; } + + /// + /// 传真(Fax) + /// + [Display(Name = "传真(Fax)")] + public string Fax { set; get; } + + /// + /// 邮编(PostId) + /// + [Display(Name = "邮编(PostId)")] + public string PostId { set; get; } + + /// + /// 联系人(ContactName) + /// + [Display(Name = "联系人(ContactName)")] + public string ContactName { set; get; } + + /// + /// 银行(Bank) + /// + [Display(Name = "银行(Bank)")] + public string Bank { set; get; } + + /// + /// 货币(Currency) + /// + [Display(Name = "货币(Currency)")] + public string Currency { set; get; } + + /// + /// 是否激活(IsActive) + /// + [Display(Name = "是否激活(IsActive)")] + public bool IsActive { set; get; } + + /// + /// 公司(Company) + /// + [Display(Name = "公司(Company)")] + public string Company { set; get; } + + /// + /// 备注(Remark) + /// + [Display(Name = "备注(Remark)")] + public string Remark { set; get; } + + +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/CreateSupplierDtoValidator.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierCreateDtoValidator.cs similarity index 88% rename from WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/CreateSupplierDtoValidator.cs rename to WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierCreateDtoValidator.cs index c8e01ac..956e15b 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/CreateSupplierDtoValidator.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierCreateDtoValidator.cs @@ -2,9 +2,9 @@ using FluentValidation; namespace Win_in.Sfs.Scp.WebApi; -public class CreateSupplierDtoValidator : AbstractValidator +public class SupplierCreateDtoValidator : AbstractValidator { - public CreateSupplierDtoValidator() + public SupplierCreateDtoValidator() { RuleFor(x => x.Code).MaximumLength(64).NotEmpty(); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierDTO.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierDTO.cs index 37829e5..d9560f1 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierDTO.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierDTO.cs @@ -1,6 +1,5 @@ using System; using System.ComponentModel.DataAnnotations; -using Volo.Abp.Application.Dtos; using Volo.Abp.Data; using Win_in.Sfs.Scp.WebApi.Domain.Shared; diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/IUnplannedReceiptAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/IUnplannedReceiptAppService.cs index ebec16c..f8418ec 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/IUnplannedReceiptAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/IUnplannedReceiptAppService.cs @@ -7,6 +7,6 @@ namespace Win_in.Sfs.Scp.WebApi { public interface IUnplannedReceiptAppService : IReadOnlyAppService { - + Task CreateAsync(UnplannedReceiptCreateDTO receiptCreateDTO); } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptCreateDTO.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptCreateDTO.cs new file mode 100644 index 0000000..c4054d9 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptCreateDTO.cs @@ -0,0 +1,98 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Scp.WebApi; + +/// +/// 计划外入库单DTO(Unplanned Receipt DTO) +/// +public class UnplannedReceiptCreateDTO : EntityDto +{ + /// + /// 单号(TrNbr) + /// + [Display(Name = "单号(TrNbr)")] + public long TrNbr { set; get; } + + /// + /// 事务类型(TrType) + /// + [Display(Name = "事务类型(TrType)")] + public string TrType { set; get; } + + /// + /// 订单号(Order) + /// + [Display(Name = "订单号(Order)")] + public string Order { set; get; } + + /// + /// 零件号(PartCode) + /// + [Display(Name = "零件号(PartCode)")] + public string PartCode { set; get; } + + /// + /// 批次(Lot) + /// + [Display(Name = "批次(Lot)")] + public string Lot { set; get; } + + + /// + /// 计量单位(Uom) + /// + [Display(Name = "计量单位(Uom)")] + public string Uom { set; get; } + + /// + /// 数量(Qty) + /// + [Display(Name = "数量(Qty)")] + public decimal Qty { set; get; } + + /// + /// 库位(Location) + /// + [Display(Name = "库位(Location)")] + public string Location { set; get; } + + /// + /// 生效日期(EffectiveDate) + /// + [Display(Name = "生效日期(EffectiveDate)")] + public DateTime EffectiveDate { set; get; } + + /// + /// 系统日期(SystemDate) + /// + [Display(Name = "系统日期(SystemDate)")] + public DateTime SystemDate { set; get; } + + /// + /// 客户单(so job) + /// + [Display(Name = "客户单(so job)")] + + public string SoJob { get; set; } + + + /// + /// 备注(Remark) + /// + [Display(Name = "备注(Remark)")] + public string Remark { set; get; } + + /// + /// 地点(Site) + /// + [Display(Name = "地点(Site)")] + public string Site { set; get; } + + /// + /// 公司(Company) + /// + [Display(Name = "公司(Company)")] + public string Company { set; get; } +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/CreateReceiptDtoValidator.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptCreateDtoValidator.cs similarity index 85% rename from WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/CreateReceiptDtoValidator.cs rename to WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptCreateDtoValidator.cs index 31ea8ba..1da66e6 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/CreateReceiptDtoValidator.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptCreateDtoValidator.cs @@ -2,9 +2,9 @@ using FluentValidation; namespace Win_in.Sfs.Scp.WebApi; -public class CreateUnplannedReceiptDtoValidator : AbstractValidator +public class UnplannedReceiptCreateDtoValidator : AbstractValidator { - public CreateUnplannedReceiptDtoValidator() + public UnplannedReceiptCreateDtoValidator() { RuleFor(q => q.TrNbr).NotEmpty(); RuleFor(q => q.TrType).NotEmpty().MaximumLength(8); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptDTO.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptDTO.cs index 3be4f7e..d91311b 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptDTO.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/UnplannedReceipts/UnplannedReceiptDTO.cs @@ -1,12 +1,11 @@ using System; using System.ComponentModel.DataAnnotations; -using Volo.Abp.Application.Dtos; using Win_in.Sfs.Scp.WebApi.Domain.Shared; namespace Win_in.Sfs.Scp.WebApi { /// - /// 收货单DTO(Receipt DTO) + /// 计划外入库单DTO(Unplanned Receipt DTO) /// public class UnplannedReceiptDTO : EntityDtoBase { diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs index 7546e87..d01b68e 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs @@ -58,9 +58,11 @@ namespace Win_in.Sfs.Scp.WebApi /// [HttpPost] [Route("")] - public async Task CreateAsync(PartDTO partCreateDTO) + public async Task CreateAsync(PartCreateDto partCreateDTO) { - var entity = ObjectMapper.Map(partCreateDTO); + + var entity = ObjectMapper.Map(partCreateDTO); + entity.SetId(GuidGenerator.Create()); var ret= await _partRepository.InsertAsync(entity); var dto = ObjectMapper.Map(ret); return dto; diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/PurchaseOrders/PurchaseOrderAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/PurchaseOrders/PurchaseOrderAppService.cs index 5619c1e..217b5b2 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/PurchaseOrders/PurchaseOrderAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/PurchaseOrders/PurchaseOrderAppService.cs @@ -56,9 +56,14 @@ namespace Win_in.Sfs.Scp.WebApi /// [HttpPost] [Route("")] - public async Task CreateAsync(PurchaseOrderDTO poCreateDTO) + public async Task CreateAsync(PurchaseOrderCreateDTO poCreateDTO) { - var entity = ObjectMapper.Map(poCreateDTO); + var entity = ObjectMapper.Map(poCreateDTO); + entity.SetId(GuidGenerator.Create()); + foreach (var detail in entity.Details) + { + detail.SetId(GuidGenerator.Create()); + } var ret = await _purchaseOrderRepository.InsertAsync(entity); var dto = ObjectMapper.Map(ret); return dto; diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs index 5f10d53..d0404ce 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs @@ -57,19 +57,15 @@ namespace Win_in.Sfs.Scp.WebApi /// [HttpPost] [Route("")] - public async Task CreateAsync(ReceiptDTO receiptCreateDTO) + public async Task CreateAsync(ReceiptCreateDTO receiptCreateDTO) { - var entity = ObjectMapper.Map(receiptCreateDTO); + var entity = ObjectMapper.Map(receiptCreateDTO); + entity.SetId(GuidGenerator.Create()); var ret = await _receiptRepository.InsertAsync(entity); var dto = ObjectMapper.Map(ret); return dto; } - /// - /// 按ID修改收货单(Update receipt by ID) - /// - /// 唯一ID(unique ID) - /// - /// + } diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs index eaa3d04..0755f39 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs @@ -58,9 +58,10 @@ namespace Win_in.Sfs.Scp.WebApi /// 供应商DTO(Supplier DTO) [HttpPost] [Route("")] - public async Task CreateAsync(SupplierDTO supplierCreateDTO) + public async Task CreateAsync(SupplierCreateDTO supplierCreateDTO) { - var entity = ObjectMapper.Map(supplierCreateDTO); + var entity = ObjectMapper.Map(supplierCreateDTO); + entity.SetId(GuidGenerator.Create()); var ret = await _supplierRepository.InsertAsync(entity); var dto = ObjectMapper.Map(ret); return dto; diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/UnplannedReceipts/UnplannedReceiptAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/UnplannedReceipts/UnplannedReceiptAppService.cs index ffb8ff5..4280319 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/UnplannedReceipts/UnplannedReceiptAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/UnplannedReceipts/UnplannedReceiptAppService.cs @@ -57,20 +57,15 @@ namespace Win_in.Sfs.Scp.WebApi /// [HttpPost] [Route("")] - public async Task CreateAsync(UnplannedReceiptDTO receiptCreateDTO) + public async Task CreateAsync(UnplannedReceiptCreateDTO receiptCreateDTO) { - var entity = ObjectMapper.Map(receiptCreateDTO); + var entity = ObjectMapper.Map(receiptCreateDTO); + entity.SetId(GuidGenerator.Create()); var ret = await _unplannedReceiptRepository.InsertAsync(entity); var dto = ObjectMapper.Map(ret); return dto; } - /// - /// 按ID修改收货单(Update receipt by ID) - /// - /// 唯一ID(unique ID) - /// - /// - + } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiApplicationAutoMapperProfile.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiApplicationAutoMapperProfile.cs index d669d4f..c502d91 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiApplicationAutoMapperProfile.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiApplicationAutoMapperProfile.cs @@ -1,4 +1,5 @@ using AutoMapper; +using Volo.Abp.AutoMapper; namespace Win_in.Sfs.Scp.WebApi { @@ -25,6 +26,10 @@ namespace Win_in.Sfs.Scp.WebApi { CreateMap().ReverseMap(); + CreateMap() + .Ignore(p=>p.Id) + .Ignore(p=>p.CreatorId) + .Ignore(p=>p.CreationTime); } /// @@ -34,6 +39,10 @@ namespace Win_in.Sfs.Scp.WebApi { CreateMap().ReverseMap(); + CreateMap() + .Ignore(p => p.Id) + .Ignore(p => p.CreatorId) + .Ignore(p => p.CreationTime); } @@ -44,6 +53,10 @@ namespace Win_in.Sfs.Scp.WebApi { CreateMap().ReverseMap(); + CreateMap() + .Ignore(p => p.Id) + .Ignore(p => p.CreatorId) + .Ignore(p => p.CreationTime); } @@ -54,6 +67,10 @@ namespace Win_in.Sfs.Scp.WebApi { CreateMap().ReverseMap(); + CreateMap() + .Ignore(p => p.Id) + .Ignore(p => p.CreatorId) + .Ignore(p => p.CreationTime); } /// @@ -68,6 +85,10 @@ namespace Win_in.Sfs.Scp.WebApi private void CreateMapUnplannedReceipt() { CreateMap().ReverseMap(); + CreateMap() + .Ignore(p => p.Id) + .Ignore(p => p.CreatorId) + .Ignore(p => p.CreationTime); } } } diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityBase.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityBase.cs index 1196211..695bf92 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityBase.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityBase.cs @@ -4,9 +4,13 @@ using Volo.Abp.Domain.Entities.Auditing; namespace Win_in.Sfs.Scp.WebApi.Domain.Shared { - public class EntityBase : CreationAuditedAggregateRoot + public class EntityBase : CreationAuditedAggregateRoot,ICanTrace { - + public Guid TraceId { get; set; } + } + public interface ICanTrace + { + Guid TraceId { get; set; } } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDetailBase.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDetailBase.cs index ea6bc8f..13e2836 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDetailBase.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDetailBase.cs @@ -11,6 +11,5 @@ namespace Win_in.Sfs.Scp.WebApi.Domain.Shared public EntityDetailBase() { } public EntityDetailBase(TKey id) : base(id) { } - } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDetailDtoBase.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDetailDtoBase.cs index 513c511..7d35dda 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDetailDtoBase.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDetailDtoBase.cs @@ -7,7 +7,6 @@ namespace Win_in.Sfs.Scp.WebApi.Domain.Shared { public class EntityDetailDtoBase : CreationAuditedEntityDto { - } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDtoBase.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDtoBase.cs index 0c73996..3e218f0 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDtoBase.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDtoBase.cs @@ -5,9 +5,8 @@ using Volo.Abp.Domain.Entities.Auditing; namespace Win_in.Sfs.Scp.WebApi.Domain.Shared { - public class EntityDtoBase : CreationAuditedEntityDto + public class EntityDtoBase : CreationAuditedEntityDto, ICanTrace { - - + public Guid TraceId { get; set; } } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs index 44dfbb5..96b7e02 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs @@ -1,6 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.Guids; using Win_in.Sfs.Scp.WebApi.Domain.Shared; namespace Win_in.Sfs.Scp.WebApi @@ -156,6 +157,12 @@ namespace Win_in.Sfs.Scp.WebApi /// [Display(Name = "公司")] public string Company {get;set;} + + + public void SetId(Guid id) + { + Id = id; + } } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/PurchaseOrder.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/PurchaseOrder.cs index 0eee22c..33de613 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/PurchaseOrder.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/PurchaseOrder.cs @@ -101,6 +101,10 @@ namespace Win_in.Sfs.Scp.WebApi public virtual List Details { get; set; } + public void SetId(Guid id) + { + Id = id; + } #region details handler diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/PurchaseOrderDetail.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/PurchaseOrderDetail.cs index beace64..115add3 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/PurchaseOrderDetail.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/PurchaseOrderDetail.cs @@ -95,5 +95,11 @@ namespace Win_in.Sfs.Scp.WebApi LineStatus = lineStatus; Remark = remark; } + + public void SetId(Guid id) + { + Id = id; + } + } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Receipts/Receipt.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Receipts/Receipt.cs index bc2f510..6955ed9 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Receipts/Receipt.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Receipts/Receipt.cs @@ -135,5 +135,10 @@ namespace Win_in.Sfs.Scp.WebApi /// [Display(Name = "公司(Company)")] public string Company { set; get; } + public void SetId(Guid id) + { + Id = id; + } + } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/SCP/Class1.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/SCP/Class1.cs new file mode 100644 index 0000000..a65b097 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/SCP/Class1.cs @@ -0,0 +1,425 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Win_in.Sfs.Scp.WebApi.SCP; + +public class TA_PART +{ + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string PartCode { get; set; } + + [Required] + [StringLength(50)] + public string ErpPartCode { get; set; } + + // [Required] + public string PartDesc1 { get; set; } + + // [Required] + public string PartDesc2 { get; set; } + + // [Required] + [StringLength(50)] + public string ProjectId { get; set; } + + [Required] + [StringLength(50)] + public string Unit { get; set; } + + // [Required] + [StringLength(50)] + public string PartGroup { get; set; } + + [Required] + [StringLength(10)] + public string State { get; set; } + + [StringLength(100)] + public string Configuration { get; set; } + + public int ValidityDays { get; set; } + + [StringLength(50)] + public string ReceivePort { get; set; } + + [StringLength(50)] + public string PalletSize { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string Site { get; set; } + + + public string Qlevel { get; set; } + + public bool? Ischeck { get; set; } + + +} + +public class TA_VENDER +{ + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string VendId { get; set; } + + [Required] + [StringLength(50)] + public string VendName { get; set; } + + [Required] + [StringLength(50)] + public string VendAbbCode { get; set; } + + [StringLength(50)] + public string VendType { get; set; } + + [StringLength(50)] + public string Country { get; set; } + + [StringLength(50)] + public string City { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + [StringLength(200)] + public string Address { get; set; } + + [StringLength(50)] + public string ZipCode { get; set; } + + [StringLength(50)] + public string Contacter { get; set; } + + [StringLength(50)] + public string Phone { get; set; } + + [StringLength(50)] + public string Fax { get; set; } + + [StringLength(50)] + public string Email { get; set; } + + public int State { get; set; } + + [StringLength(500)] + public string Remark { get; set; } + + + public decimal? Tax { get; set; } + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string Site { get; set; } + + public int? ReceiveTimeScope { set; get; } + public decimal? Quota { set; get; } + +} + +public class TB_PO : RecordEntity +{ + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [Key] + [Column(Order = 0)] + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string ErpBillNum { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public int? ModType { get; set; } + [StringLength(50)] + public string Contacter { get; set; } + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string Buyer { get; set; } + [StringLength(50)] + public string BuyerPhone { get; set; } + public int State { get; set; } + [StringLength(200)] + public string Remark { get; set; } + + public DateTime? BeginTime { get; set; } + + public DateTime? EndTime { get; set; } + + + public string Extend1 { get; set; } + public string Extend2 { get; set; } + public string Extend3 { get; set; } + public string SubSite { get; set; } + +} + +public class TB_PO_DETAIL : RecordEntity +{ + + + + + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + + + + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + + public Nullable BeginTime { get; set; } + public Nullable EndTime { get; set; } + + [Required] + [StringLength(50)] + public string PartCode { get; set; } + + [Column(TypeName = "money")] + public decimal ShippedQty { get; set; } + + [Column(TypeName = "money")] + public decimal ReceivedQty { get; set; } + + public string RejectQty { get; set; } + + [StringLength(50)] + public string PoUnit { get; set; } + + [StringLength(50)] + public string LocUnit { get; set; } + + [Column(TypeName = "money")] + public decimal Price { get; set; } + + [StringLength(50)] + public string Currency { get; set; } + + public decimal PlanQty { get; set; } + [Column(TypeName = "money")] + public decimal PackQty { get; set; } + [Column(TypeName = "money")] + public decimal? TempQty { get; set; } + + public int State { get; set; } + + [StringLength(200)] + public string Remark { get; set; } + public decimal UnConv { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + + public string Extend1 { get; set; } + public string Extend2 { get; set; } + public string Extend3 { get; set; } + public string SubSite { get; set; } + + public string Site { get; set; } + +} + +public class TB_RECEIVE_QAD +{ + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + + public string RecvBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + + [Key] + [Column(Order = 1)] + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public DateTime ShipTime { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public Guid GUID { get; set; } + [StringLength(50)] + public string OperName { get; set; } + public int BillType { get; set; } + [Key] + [Column(Order = 0)] + public string ErpRecvBillNum { get; set; } + + + public string Tax { get; set; } + public string Extend1 { get; set; } + public string Extend2 { get; set; } + public string Extend3 { get; set; } + + public string SubSite { get; set; } + + + +} + +public class TB_RECEIVE_DETAIL_QAD +{ + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long UID { get; set; } + [StringLength(50)] + + public string RecvBillNum { get; set; } + //[Key] + //[Column(Order = 1)] + //[StringLength(50)] + public string PoBillNum { get; set; } + //[Key] + //[Column(Order = 2)] + public int PoLine { get; set; } + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Batch { get; set; } + public decimal Qty { get; set; } + [StringLength(50)] + public string DockCode { get; set; } + public int State { get; set; } + [StringLength(500)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + + public Guid GUID { get; set; } + + public int BillType { get; set; } + [StringLength(50)] + public string VendBatch { get; set; } + [StringLength(50)] + public string PoUnit { get; set; } + [StringLength(50)] + public string LocUnit { get; set; } + [Key] + [Column(Order = 0)] + public string ErpRecvBillNum { get; set; } + + /// + /// 采购价 + /// + public decimal? PurCost { get; set; } + /// + /// 成本价 + /// + public decimal? StdCost { get; set; } + [Key] + [Column(Order = 4)] + public string Site { get; set; } + + public decimal? Rate { get; set; } + + + public decimal? CurAmt { get; set; } + + public string Tax { get; set; } + public string Extend1 { get; set; } + public string Extend2 { get; set; } + public string Extend3 { get; set; } + + public string SubSite { get; set; } +} + +public class TB_REJECT +{ + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string RjctBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + [StringLength(50)] + public string AsnBillNum { get; set; } + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string VendId { get; set; } + public DateTime ShipTime { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public Guid GUID { get; set; } + [StringLength(50)] + public string OperName { get; set; } +} + +public class TB_REJECT_DETAIL +{ + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key] + public long UID { get; set; } + [StringLength(50)] + public string RjctBillNum { get; set; } + [StringLength(50)] + public string PoBillNum { get; set; } + public int PoLine { get; set; } + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string Batch { get; set; } + public decimal Qty { get; set; } + public int State { get; set; } + [StringLength(50)] + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + [StringLength(50)] + public string CreateUser { get; set; } + public bool IsDeleted { get; set; } + public Guid GUID { get; set; } +} + +[Serializable] +public class RecordEntity +{ + public DateTime CreateTime { get; set; } + + [StringLength(50)] + public string CreateUser { get; set; } + public DateTime? UpdateTime { get; set; } + [StringLength(50)] + public string UpdateUser { get; set; } + [StringLength(50)] + public string UpdateInfo { get; set; } + public bool IsDeleted { get; set; } + public Guid GUID { get; set; } + + +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Suppliers/Supplier.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Suppliers/Supplier.cs index 7220da9..b7491e0 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Suppliers/Supplier.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Suppliers/Supplier.cs @@ -105,5 +105,11 @@ namespace Win_in.Sfs.Scp.WebApi /// [Display(Name = "备注(Remark)")] public string Remark { set; get; } + + public void SetId(Guid id) + { + Id = id; + } + } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/UnplannedReceipts/UnplannedReceipt.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/UnplannedReceipts/UnplannedReceipt.cs index 9a459e6..602c41e 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/UnplannedReceipts/UnplannedReceipt.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/UnplannedReceipts/UnplannedReceipt.cs @@ -95,5 +95,11 @@ namespace Win_in.Sfs.Scp.WebApi /// [Display(Name = "公司(Company)")] public string Company { set; get; } + + public void SetId(Guid id) + { + Id = id; + } + } } \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Win_in.Sfs.Scp.WebApi.Domain.csproj b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Win_in.Sfs.Scp.WebApi.Domain.csproj index ea8ee01..a66ed90 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Win_in.Sfs.Scp.WebApi.Domain.csproj +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Win_in.Sfs.Scp.WebApi.Domain.csproj @@ -24,4 +24,8 @@ + + + + diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Class1.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Class1.cs new file mode 100644 index 0000000..b303073 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Class1.cs @@ -0,0 +1,8 @@ +using System; + +namespace Win_in.Sfs.Scp.v1.Domain +{ + public class Class1 + { + } +} diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Win_in.Sfs.Scp.v1.Domain.csproj b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Win_in.Sfs.Scp.v1.Domain.csproj new file mode 100644 index 0000000..f208d30 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Win_in.Sfs.Scp.v1.Domain.csproj @@ -0,0 +1,7 @@ + + + + net5.0 + + + diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Class1.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Class1.cs new file mode 100644 index 0000000..c4f5fd0 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Class1.cs @@ -0,0 +1,8 @@ +using System; + +namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore +{ + public class Class1 + { + } +} diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Win_in.Sfs.Scp.v1.EntityFrameworkCore.csproj b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Win_in.Sfs.Scp.v1.EntityFrameworkCore.csproj new file mode 100644 index 0000000..f208d30 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/Win_in.Sfs.Scp.v1.EntityFrameworkCore.csproj @@ -0,0 +1,7 @@ + + + + net5.0 + + +