Browse Source

按客户要求简化接口

master
贾荣国 3 years ago
parent
commit
a2d232e99a
  1. 8
      ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/HiddenApiAttribute.cs
  2. 35
      ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/HiddenApiFilter.cs
  3. 759
      ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021072716_20211021001.Designer.cs
  4. 291
      ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021072716_20211021001.cs
  5. 728
      ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021081413_20211021002.Designer.cs
  6. 363
      ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021081413_20211021002.cs
  7. 726
      ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/WebApiHttpApiHostMigrationsDbContextModelSnapshot.cs
  8. 159
      ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/WebApiHttpApiHostModule.cs
  9. 4
      ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj
  10. 4
      ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json
  11. 40
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/POCreateDTO.cs
  12. 76
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/POCreateOrUpdateDTOBase.cs
  13. 17
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/POUpdateDTO.cs
  14. 4
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/IPartAppService.cs
  15. 31
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDTO.cs
  16. 152
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateOrUpdateDTOBase.cs
  17. 17
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartUpdateDTO.cs
  18. 4
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/IPurchaseOrderAppService.cs
  19. 4
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderDTO.cs
  20. 2
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderDetailDTO.cs
  21. 2
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/IReceiptAppService.cs
  22. 85
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateDTO.cs
  23. 129
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateOrUpdateDTOBase.cs
  24. 18
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptUpdateDTO.cs
  25. 2
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/ISupplierAppService.cs
  26. 24
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierCreateDTO.cs
  27. 97
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierCreateOrUpdateDTOBase.cs
  28. 18
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierUpdateDTO.cs
  29. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Win_in.Sfs.Scp.WebApi.Application.Contracts.csproj
  30. 1
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ASNs/ASNAppService.cs
  31. 89
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/POs/POAppService.cs
  32. 45
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs
  33. 69
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/PurchaseOrders/PurchaseOrderAppService.cs
  34. 38
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs
  35. 45
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs
  36. 32
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiApplicationAutoMapperProfile.cs
  37. 10
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Win_in.Sfs.Scp.WebApi.Application.csproj
  38. 12
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityBase.cs
  39. 8
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDetailBase.cs
  40. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDetailDtoBase.cs
  41. 12
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDtoBase.cs
  42. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/ar.json
  43. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/cs.json
  44. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/de-DE.json
  45. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/en-GB.json
  46. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/es.json
  47. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/fi.json
  48. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/fr.json
  49. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/hi.json
  50. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/hu.json
  51. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/it.json
  52. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/nl.json
  53. 6
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/pl-PL.json
  54. 6
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/pt-BR.json
  55. 6
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/sk.json
  56. 6
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/sl.json
  57. 7
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/tr.json
  58. 6
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/vi.json
  59. 6
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/zh-Hant.json
  60. 86
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs
  61. 2
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/IPurchaseOrderRepository.cs
  62. 20
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/PurchaseOrder.cs
  63. 46
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/PurchaseOrderDetail.cs
  64. 2
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Settings/WebApiSettings.cs
  65. 2
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Suppliers/ISupplierRepository.cs
  66. 12
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Win_in.Sfs.Scp.WebApi.Domain.csproj
  67. 4
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/IWebApiDbContext.cs
  68. 12
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/PartRepository.cs
  69. 12
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/PurchaseOrderRepository.cs
  70. 12
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/ReceiptRepository.cs
  71. 12
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/SupplierRepository.cs
  72. 4
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/WebApiDbContext.cs
  73. 30
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/WebApiDbContextModelCreatingExtensions.cs
  74. 5
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/WebApiEntityFrameworkCoreModule.cs
  75. 6
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi/WebApiHttpApiModule.cs
  76. 1
      ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi/Win_in.Sfs.Scp.WebApi.HttpApi.csproj

8
ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/HiddenApiAttribute.cs

@ -0,0 +1,8 @@
using System;
namespace Win_in.Sfs.Scp.WebApi;
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]
public class HiddenApiAttribute : System.Attribute
{
}

35
ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/HiddenApiFilter.cs

@ -0,0 +1,35 @@
using System.Linq;
using System.Reflection;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
namespace Win_in.Sfs.Scp.WebApi;
/// <summary>
/// 自定义Swagger隐藏过滤器
/// </summary>
public class HiddenApiFilter : IDocumentFilter
{
public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
{
foreach (ApiDescription apiDescription in context.ApiDescriptions)
{
if (apiDescription.TryGetMethodInfo(out MethodInfo method))
{
if (method.ReflectedType.CustomAttributes.Any(t => t.AttributeType == typeof(HiddenApiAttribute))
|| method.CustomAttributes.Any(t => t.AttributeType == typeof(HiddenApiAttribute)))
{
string key = "/" + apiDescription.RelativePath;
if (key.Contains("?"))
{
int idx = key.IndexOf("?", System.StringComparison.Ordinal);
key = key.Substring(0, idx);
}
swaggerDoc.Paths.Remove(key);
}
}
}
}
}

759
ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021072716_20211021001.Designer.cs

@ -1,759 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
using Win_in.Sfs.Scp.WebApi.EntityFrameworkCore;
namespace Win_in.Sfs.Scp.WebApi.Migrations
{
[DbContext(typeof(WebApiHttpApiHostMigrationsDbContext))]
[Migration("20211021072716_20211021001")]
partial class _20211021001
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("ProductVersion", "5.0.11")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.PO", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Company")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("ContactName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ContactPhone")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<DateTime>("DueDate")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsConsignment")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<DateTime>("OrderDate")
.HasColumnType("datetime2");
b.Property<string>("PoNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(4096)
.HasColumnType("nvarchar(max)");
b.Property<string>("Site")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplierCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("TaxRate")
.HasColumnType("decimal(18,2)");
b.Property<string>("Version")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("PoNumber")
.IsUnique()
.HasFilter("IsDeleted=0");
b.ToTable("WebApi_PO");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.PODetail", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<bool>("IsConsignment")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<int>("LineStatus")
.HasColumnType("int");
b.Property<decimal?>("OrderQty")
.IsRequired()
.HasColumnType("decimal(18,2)");
b.Property<string>("PartCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoLine")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoNumber")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(4096)
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("StdPackQty")
.IsRequired()
.HasColumnType("decimal(18,2)");
b.Property<string>("StdPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal?>("SupplierPackConvertRate")
.HasColumnType("decimal(18,2)");
b.Property<decimal?>("SupplierPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("SupplierPackUom")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Uom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("PoNumber", "PoLine")
.IsUnique();
b.ToTable("WebApi_PODetail");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.Part", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Color")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Company")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("Configuration")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("Desc1")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("Desc2")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("Eco")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("ExtPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("ExtPackUom")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("Group")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<bool>("IsBuyPart")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsMakePart")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Project")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SequenceNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Site")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("StdPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("StdPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Type")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Uom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Version")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("abcClass")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("catalog")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("productline")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("Code")
.IsUnique()
.HasFilter("IsDeleted=0");
b.ToTable("WebApi_Part");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.Receipt", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("AsnNumber")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Lot")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Company")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<decimal>("DeliverQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("PartCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoLine")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("ProductionDate")
.HasColumnType("datetime2");
b.Property<string>("RcNumber")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("RcType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("ReceiveQty")
.HasColumnType("decimal(18,2)");
b.Property<DateTime>("ReceiveTime")
.HasColumnType("datetime2");
b.Property<string>("Remark")
.HasMaxLength(4096)
.HasColumnType("nvarchar(max)");
b.Property<string>("RpNumber")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Site")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("StdPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("StdPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierLot")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("SupplierPackConvertRate")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("SupplierPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("SupplierPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("TimeWindowEnd")
.HasColumnType("datetime2");
b.Property<DateTime>("TimeWindowBegin")
.HasColumnType("datetime2");
b.Property<string>("Uom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Warehouse")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Dock")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("RcNumber", "PoLine", "PartCode")
.IsUnique()
.HasFilter("IsDeleted=0");
b.ToTable("WebApi_Receipt");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.Supplier", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Address")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("City")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Company")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("ContactName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Country")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("Currency")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("Desc")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("Fax")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<bool>("IsActive")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Phone")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PostId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Rank")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(4096)
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("CreationTime");
b.ToTable("WebApi_Suppliers");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.SupplierPart", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("PartCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierPartCode")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<decimal>("SupplierStdPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("SupplierStdPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("SupplierCode", "PartCode")
.IsUnique()
.HasFilter("IsDeleted=0");
b.ToTable("WebApi_SupplierPart");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.PODetail", b =>
{
b.HasOne("Win_in.Sfs.Scp.WebApi.PO", null)
.WithMany("PODetails")
.HasForeignKey("Id")
.OnDelete(DeleteBehavior.NoAction)
.IsRequired();
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.PO", b =>
{
b.Navigation("PODetails");
});
#pragma warning restore 612, 618
}
}
}

291
ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021072716_20211021001.cs

@ -1,291 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win_in.Sfs.Scp.WebApi.Migrations
{
public partial class _20211021001 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "WebApi_Part",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Code = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Desc1 = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
Desc2 = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
IsMakePart = table.Column<bool>(type: "bit", nullable: false),
IsBuyPart = table.Column<bool>(type: "bit", nullable: false),
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
abcClass = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
productline = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Type = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
catalog = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Group = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Color = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Configuration = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Project = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Eco = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
StdPackUom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
ExtPackUom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ExtPackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Site = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
SequenceNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Version = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_WebApi_Part", x => x.Id);
});
migrationBuilder.CreateTable(
name: "WebApi_PO",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PoNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
SupplierCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
PoType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Status = table.Column<int>(type: "int", nullable: false),
IsConsignment = table.Column<bool>(type: "bit", nullable: false),
OrderDate = table.Column<DateTime>(type: "datetime2", nullable: false),
DueDate = table.Column<DateTime>(type: "datetime2", nullable: false),
Version = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
TaxRate = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Site = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ContactName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ContactPhone = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_WebApi_PO", x => x.Id);
});
migrationBuilder.CreateTable(
name: "WebApi_Receipt",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RcNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
AsnNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
RpNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
PoNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
SupplierCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
RcType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Warehouse = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Dock = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
TimeWindowBegin = table.Column<DateTime>(type: "datetime2", nullable: false),
TimeWindowEnd = table.Column<DateTime>(type: "datetime2", nullable: false),
ReceiveTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Site = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
PoLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
PartCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Lot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
SupplierLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ProductionDate = table.Column<DateTime>(type: "datetime2", nullable: false),
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
DeliverQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
ReceiveQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
StdPackUom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
SupplierPackUom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
SupplierPackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
SupplierPackConvertRate = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_WebApi_Receipt", x => x.Id);
});
migrationBuilder.CreateTable(
name: "WebApi_SupplierPart",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SupplierCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
PartCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
SupplierPartCode = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
SupplierStdPackUom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
SupplierStdPackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Remark = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_WebApi_SupplierPart", x => x.Id);
});
migrationBuilder.CreateTable(
name: "WebApi_Suppliers",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Code = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Desc = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
Rank = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Address = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
Country = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
City = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Phone = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Fax = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PostId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ContactName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Currency = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsActive = table.Column<bool>(type: "bit", nullable: false),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_WebApi_Suppliers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "WebApi_PODetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PoNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
PoLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
PartCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
OrderQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
StdPackUom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
SupplierPackUom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
SupplierPackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
SupplierPackConvertRate = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
IsConsignment = table.Column<bool>(type: "bit", nullable: false),
LineStatus = table.Column<int>(type: "int", nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_WebApi_PODetail", x => x.Id);
table.ForeignKey(
name: "FK_WebApi_PODetail_WebApi_PO_Id",
column: x => x.Id,
principalTable: "WebApi_PO",
principalColumn: "Id");
});
migrationBuilder.CreateIndex(
name: "IX_WebApi_Part_Code",
table: "WebApi_Part",
column: "Code",
unique: true,
filter: "IsDeleted=0");
migrationBuilder.CreateIndex(
name: "IX_WebApi_PO_PoNumber",
table: "WebApi_PO",
column: "PoNumber",
unique: true,
filter: "IsDeleted=0");
migrationBuilder.CreateIndex(
name: "IX_WebApi_PODetail_PoNumber_PoLine",
table: "WebApi_PODetail",
columns: new[] { "PoNumber", "PoLine" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_WebApi_Receipt_RcNumber_PoLine_PartCode",
table: "WebApi_Receipt",
columns: new[] { "RcNumber", "PoLine", "PartCode" },
unique: true,
filter: "IsDeleted=0");
migrationBuilder.CreateIndex(
name: "IX_WebApi_SupplierPart_SupplierCode_PartCode",
table: "WebApi_SupplierPart",
columns: new[] { "SupplierCode", "PartCode" },
unique: true,
filter: "IsDeleted=0");
migrationBuilder.CreateIndex(
name: "IX_WebApi_Suppliers_CreationTime",
table: "WebApi_Suppliers",
column: "CreationTime");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "WebApi_Part");
migrationBuilder.DropTable(
name: "WebApi_PODetail");
migrationBuilder.DropTable(
name: "WebApi_Receipt");
migrationBuilder.DropTable(
name: "WebApi_SupplierPart");
migrationBuilder.DropTable(
name: "WebApi_Suppliers");
migrationBuilder.DropTable(
name: "WebApi_PO");
}
}
}

728
ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021081413_20211021002.Designer.cs

@ -1,728 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
using Win_in.Sfs.Scp.WebApi.EntityFrameworkCore;
namespace Win_in.Sfs.Scp.WebApi.Migrations
{
[DbContext(typeof(WebApiHttpApiHostMigrationsDbContext))]
[Migration("20211021081413_20211021002")]
partial class _20211021002
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("ProductVersion", "5.0.11")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.PO", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Company")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("ContactName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ContactPhone")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<DateTime>("DueDate")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsConsignment")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<DateTime>("OrderDate")
.HasColumnType("datetime2");
b.Property<string>("PoNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(4096)
.HasColumnType("nvarchar(max)");
b.Property<string>("SequenceNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Site")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplierCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("TaxRate")
.HasColumnType("decimal(18,2)");
b.Property<string>("Version")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("PoNumber")
.IsUnique()
.HasFilter("[PoNumber] IS NOT NULL");
b.ToTable("WebApi_PO");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.PODetail", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsConsignment")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<int>("LineStatus")
.HasColumnType("int");
b.Property<decimal?>("OrderQty")
.IsRequired()
.HasColumnType("decimal(18,2)");
b.Property<string>("PartCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoLine")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoNumber")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(4096)
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("StdPackQty")
.IsRequired()
.HasColumnType("decimal(18,2)");
b.Property<string>("StdPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal?>("SupplierPackConvertRate")
.HasColumnType("decimal(18,2)");
b.Property<decimal?>("SupplierPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("SupplierPackUom")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Uom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Version")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("PoNumber", "PoLine")
.IsUnique();
b.ToTable("WebApi_PODetail");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.Part", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Color")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Company")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("Configuration")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("Desc1")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("Desc2")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("Eco")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("ExtPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("ExtPackUom")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("Group")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<bool>("IsBuyPart")
.HasColumnType("bit");
b.Property<bool>("IsMakePart")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Project")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SequenceNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Site")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("StdPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("StdPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Type")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Uom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Version")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("abcClass")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("catalog")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("productline")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("Code")
.IsUnique();
b.ToTable("WebApi_Part");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.Receipt", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("AsnNumber")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Lot")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Company")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<decimal>("DeliverQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("PartCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoLine")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("ProductionDate")
.HasColumnType("datetime2");
b.Property<string>("RcNumber")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("RcType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("ReceiveQty")
.HasColumnType("decimal(18,2)");
b.Property<DateTime>("ReceiveTime")
.HasColumnType("datetime2");
b.Property<string>("Remark")
.HasMaxLength(4096)
.HasColumnType("nvarchar(max)");
b.Property<string>("RpNumber")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SequenceNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Site")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("StdPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("StdPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierLot")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("SupplierPackConvertRate")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("SupplierPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("SupplierPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("TimeWindowEnd")
.HasColumnType("datetime2");
b.Property<DateTime>("TimeWindowBegin")
.HasColumnType("datetime2");
b.Property<string>("Uom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Version")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Warehouse")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Dock")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("RcNumber", "PoLine", "PartCode")
.IsUnique();
b.ToTable("WebApi_Receipt");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.Supplier", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Address")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("City")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Company")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("ContactName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Country")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("Currency")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Desc")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("Fax")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<bool>("IsActive")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Phone")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PostId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Rank")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(4096)
.HasColumnType("nvarchar(max)");
b.Property<string>("SequenceNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Version")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("CreationTime");
b.ToTable("WebApi_Suppliers");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.SupplierPart", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("PartCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SequenceNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierPartCode")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<decimal>("SupplierStdPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("SupplierStdPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Version")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("SupplierCode", "PartCode")
.IsUnique();
b.ToTable("WebApi_SupplierPart");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.PODetail", b =>
{
b.HasOne("Win_in.Sfs.Scp.WebApi.PO", null)
.WithMany("PODetails")
.HasForeignKey("Id")
.OnDelete(DeleteBehavior.NoAction)
.IsRequired();
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.PO", b =>
{
b.Navigation("PODetails");
});
#pragma warning restore 612, 618
}
}
}

363
ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/20211021081413_20211021002.cs

@ -1,363 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win_in.Sfs.Scp.WebApi.Migrations
{
public partial class _20211021002 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_WebApi_SupplierPart_SupplierCode_PartCode",
table: "WebApi_SupplierPart");
migrationBuilder.DropIndex(
name: "IX_WebApi_Receipt_RcNumber_PoLine_PartCode",
table: "WebApi_Receipt");
migrationBuilder.DropIndex(
name: "IX_WebApi_PO_PoNumber",
table: "WebApi_PO");
migrationBuilder.DropIndex(
name: "IX_WebApi_Part_Code",
table: "WebApi_Part");
migrationBuilder.DropColumn(
name: "DeleterId",
table: "WebApi_Suppliers");
migrationBuilder.DropColumn(
name: "DeletionTime",
table: "WebApi_Suppliers");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "WebApi_Suppliers");
migrationBuilder.DropColumn(
name: "DeleterId",
table: "WebApi_SupplierPart");
migrationBuilder.DropColumn(
name: "DeletionTime",
table: "WebApi_SupplierPart");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "WebApi_SupplierPart");
migrationBuilder.DropColumn(
name: "DeleterId",
table: "WebApi_Receipt");
migrationBuilder.DropColumn(
name: "DeletionTime",
table: "WebApi_Receipt");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "WebApi_Receipt");
migrationBuilder.DropColumn(
name: "DeleterId",
table: "WebApi_PO");
migrationBuilder.DropColumn(
name: "DeletionTime",
table: "WebApi_PO");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "WebApi_PO");
migrationBuilder.DropColumn(
name: "DeleterId",
table: "WebApi_Part");
migrationBuilder.DropColumn(
name: "DeletionTime",
table: "WebApi_Part");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "WebApi_Part");
migrationBuilder.AddColumn<string>(
name: "SequenceNumber",
table: "WebApi_Suppliers",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Version",
table: "WebApi_Suppliers",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SequenceNumber",
table: "WebApi_SupplierPart",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Version",
table: "WebApi_SupplierPart",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SequenceNumber",
table: "WebApi_Receipt",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Version",
table: "WebApi_Receipt",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "WebApi_PODetail",
type: "nvarchar(40)",
maxLength: 40,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "WebApi_PODetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Version",
table: "WebApi_PODetail",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SequenceNumber",
table: "WebApi_PO",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_WebApi_SupplierPart_SupplierCode_PartCode",
table: "WebApi_SupplierPart",
columns: new[] { "SupplierCode", "PartCode" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_WebApi_Receipt_RcNumber_PoLine_PartCode",
table: "WebApi_Receipt",
columns: new[] { "RcNumber", "PoLine", "PartCode" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_WebApi_PO_PoNumber",
table: "WebApi_PO",
column: "PoNumber",
unique: true,
filter: "[PoNumber] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_WebApi_Part_Code",
table: "WebApi_Part",
column: "Code",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_WebApi_SupplierPart_SupplierCode_PartCode",
table: "WebApi_SupplierPart");
migrationBuilder.DropIndex(
name: "IX_WebApi_Receipt_RcNumber_PoLine_PartCode",
table: "WebApi_Receipt");
migrationBuilder.DropIndex(
name: "IX_WebApi_PO_PoNumber",
table: "WebApi_PO");
migrationBuilder.DropIndex(
name: "IX_WebApi_Part_Code",
table: "WebApi_Part");
migrationBuilder.DropColumn(
name: "SequenceNumber",
table: "WebApi_Suppliers");
migrationBuilder.DropColumn(
name: "Version",
table: "WebApi_Suppliers");
migrationBuilder.DropColumn(
name: "SequenceNumber",
table: "WebApi_SupplierPart");
migrationBuilder.DropColumn(
name: "Version",
table: "WebApi_SupplierPart");
migrationBuilder.DropColumn(
name: "SequenceNumber",
table: "WebApi_Receipt");
migrationBuilder.DropColumn(
name: "Version",
table: "WebApi_Receipt");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "WebApi_PODetail");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "WebApi_PODetail");
migrationBuilder.DropColumn(
name: "Version",
table: "WebApi_PODetail");
migrationBuilder.DropColumn(
name: "SequenceNumber",
table: "WebApi_PO");
migrationBuilder.AddColumn<Guid>(
name: "DeleterId",
table: "WebApi_Suppliers",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletionTime",
table: "WebApi_Suppliers",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "WebApi_Suppliers",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<Guid>(
name: "DeleterId",
table: "WebApi_SupplierPart",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletionTime",
table: "WebApi_SupplierPart",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "WebApi_SupplierPart",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<Guid>(
name: "DeleterId",
table: "WebApi_Receipt",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletionTime",
table: "WebApi_Receipt",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "WebApi_Receipt",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<Guid>(
name: "DeleterId",
table: "WebApi_PO",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletionTime",
table: "WebApi_PO",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "WebApi_PO",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<Guid>(
name: "DeleterId",
table: "WebApi_Part",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletionTime",
table: "WebApi_Part",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "WebApi_Part",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.CreateIndex(
name: "IX_WebApi_SupplierPart_SupplierCode_PartCode",
table: "WebApi_SupplierPart",
columns: new[] { "SupplierCode", "PartCode" },
unique: true,
filter: "IsDeleted=0");
migrationBuilder.CreateIndex(
name: "IX_WebApi_Receipt_RcNumber_PoLine_PartCode",
table: "WebApi_Receipt",
columns: new[] { "RcNumber", "PoLine", "PartCode" },
unique: true,
filter: "IsDeleted=0");
migrationBuilder.CreateIndex(
name: "IX_WebApi_PO_PoNumber",
table: "WebApi_PO",
column: "PoNumber",
unique: true,
filter: "IsDeleted=0");
migrationBuilder.CreateIndex(
name: "IX_WebApi_Part_Code",
table: "WebApi_Part",
column: "Code",
unique: true,
filter: "IsDeleted=0");
}
}
}

726
ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Migrations/WebApiHttpApiHostMigrationsDbContextModelSnapshot.cs

@ -1,726 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
using Win_in.Sfs.Scp.WebApi.EntityFrameworkCore;
namespace Win_in.Sfs.Scp.WebApi.Migrations
{
[DbContext(typeof(WebApiHttpApiHostMigrationsDbContext))]
partial class WebApiHttpApiHostMigrationsDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("ProductVersion", "5.0.11")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.PO", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Company")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("ContactName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ContactPhone")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<DateTime>("DueDate")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsConsignment")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<DateTime>("OrderDate")
.HasColumnType("datetime2");
b.Property<string>("PoNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(4096)
.HasColumnType("nvarchar(max)");
b.Property<string>("SequenceNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Site")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("SupplierCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("TaxRate")
.HasColumnType("decimal(18,2)");
b.Property<string>("Version")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("PoNumber")
.IsUnique()
.HasFilter("[PoNumber] IS NOT NULL");
b.ToTable("WebApi_PO");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.PODetail", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsConsignment")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<int>("LineStatus")
.HasColumnType("int");
b.Property<decimal?>("OrderQty")
.IsRequired()
.HasColumnType("decimal(18,2)");
b.Property<string>("PartCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoLine")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoNumber")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(4096)
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("StdPackQty")
.IsRequired()
.HasColumnType("decimal(18,2)");
b.Property<string>("StdPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal?>("SupplierPackConvertRate")
.HasColumnType("decimal(18,2)");
b.Property<decimal?>("SupplierPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("SupplierPackUom")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Uom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Version")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("PoNumber", "PoLine")
.IsUnique();
b.ToTable("WebApi_PODetail");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.Part", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Color")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Company")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("Configuration")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("Desc1")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("Desc2")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("Eco")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("ExtPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("ExtPackUom")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("Group")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<bool>("IsBuyPart")
.HasColumnType("bit");
b.Property<bool>("IsMakePart")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Project")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SequenceNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Site")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("StdPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("StdPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Type")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Uom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Version")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("abcClass")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("catalog")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("productline")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("Code")
.IsUnique();
b.ToTable("WebApi_Part");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.Receipt", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("AsnNumber")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Lot")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Company")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<decimal>("DeliverQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("PartCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoLine")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PoNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("ProductionDate")
.HasColumnType("datetime2");
b.Property<string>("RcNumber")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("RcType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("ReceiveQty")
.HasColumnType("decimal(18,2)");
b.Property<DateTime>("ReceiveTime")
.HasColumnType("datetime2");
b.Property<string>("Remark")
.HasMaxLength(4096)
.HasColumnType("nvarchar(max)");
b.Property<string>("RpNumber")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SequenceNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Site")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("StdPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("StdPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierLot")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("SupplierPackConvertRate")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("SupplierPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("SupplierPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("TimeWindowEnd")
.HasColumnType("datetime2");
b.Property<DateTime>("TimeWindowBegin")
.HasColumnType("datetime2");
b.Property<string>("Uom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Version")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Warehouse")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Dock")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("RcNumber", "PoLine", "PartCode")
.IsUnique();
b.ToTable("WebApi_Receipt");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.Supplier", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Address")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("City")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Company")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("ContactName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Country")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("Currency")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Desc")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("Fax")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<bool>("IsActive")
.HasColumnType("bit");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Phone")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("PostId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Rank")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(4096)
.HasColumnType("nvarchar(max)");
b.Property<string>("SequenceNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Version")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("CreationTime");
b.ToTable("WebApi_Suppliers");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.SupplierPart", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("PartCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SequenceNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierPartCode")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<decimal>("SupplierStdPackQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("SupplierStdPackUom")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Version")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("SupplierCode", "PartCode")
.IsUnique();
b.ToTable("WebApi_SupplierPart");
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.PODetail", b =>
{
b.HasOne("Win_in.Sfs.Scp.WebApi.PO", null)
.WithMany("PODetails")
.HasForeignKey("Id")
.OnDelete(DeleteBehavior.NoAction)
.IsRequired();
});
modelBuilder.Entity("Win_in.Sfs.Scp.WebApi.PO", b =>
{
b.Navigation("PODetails");
});
#pragma warning restore 612, 618
}
}
}

159
ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/WebApiHttpApiHostModule.cs

@ -35,6 +35,7 @@ using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.SwaggerGen; using Swashbuckle.AspNetCore.SwaggerGen;
using System.Reflection; using System.Reflection;
using Microsoft.AspNetCore.Hosting;
using Serilog; using Serilog;
using Serilog.Events; using Serilog.Events;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
@ -63,41 +64,87 @@ namespace Win_in.Sfs.Scp.WebApi
{ {
var hostingEnvironment = context.Services.GetHostingEnvironment(); var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration(); var configuration = context.Services.GetConfiguration();
_isMultiTenancy = Convert.ToBoolean(configuration["IsMultiTenancy"]);
Configure<AbpDbContextOptions>(options => ConfigureDbContext();
{
options.UseSqlServer(); ConfigureMultiTeancy(configuration);
});
ConfigureSwagger(context, configuration);
Configure<AbpMultiTenancyOptions>(options => ConfigureLocalization();
ConfigureAuthentication(context, configuration);
ConfigureDistributedCache(context, hostingEnvironment, configuration);
ConfigureCors(context, configuration);
}
private static void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddCors(options =>
{ {
options.IsEnabled = _isMultiTenancy; options.AddDefaultPolicy(builder =>
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToArray()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
}); });
}
if (hostingEnvironment.IsDevelopment()) private void ConfigureDistributedCache(ServiceConfigurationContext context, IWebHostEnvironment hostingEnvironment,
IConfiguration configuration)
{
Configure<AbpDistributedCacheOptions>(options => { options.KeyPrefix = "ScpWebApi:"; });
if (!hostingEnvironment.IsDevelopment())
{ {
Configure<AbpVirtualFileSystemOptions>(options => var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
context.Services
.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "WebApi-Protection-Keys");
}
}
private static void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
{ {
options.FileSets.ReplaceEmbeddedByPhysical<WebApiDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Win_in.Sfs.Scp.WebApi.Domain.Shared", Path.DirectorySeparatorChar))); options.Authority = configuration["AuthServer:Authority"];
options.FileSets.ReplaceEmbeddedByPhysical<WebApiDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Win_in.Sfs.Scp.WebApi.Domain", Path.DirectorySeparatorChar))); options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
options.FileSets.ReplaceEmbeddedByPhysical<WebApiApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Win_in.Sfs.Scp.WebApi.Application.Contracts", Path.DirectorySeparatorChar))); options.Audience = "WebApi";
options.FileSets.ReplaceEmbeddedByPhysical<WebApiApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Win_in.Sfs.Scp.WebApi.Application", Path.DirectorySeparatorChar)));
}); });
} }
Configure<AbpAspNetCoreMvcOptions>(options => private void ConfigureLocalization()
{
Configure<AbpLocalizationOptions>(options =>
{ {
options options.Languages.Add(new LanguageInfo("en", "en", "English"));
.ConventionalControllers options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
.Create(typeof(WebApiApplicationModule).Assembly);
}); });
}
private void ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddAbpSwaggerGenWithOAuth( context.Services.AddAbpSwaggerGenWithOAuth(
configuration["AuthServer:Authority"], configuration["AuthServer:Authority"],
new Dictionary<string, string> new Dictionary<string, string>
{ {
{"WebApi", "WebApi API"} { "WebApi", "WebApi API" }
}, },
//options => //options =>
//{ //{
@ -109,11 +156,10 @@ namespace Win_in.Sfs.Scp.WebApi
{ {
//遍历Swagger分组,注册SwaggerDoc //遍历Swagger分组,注册SwaggerDoc
foreach (var groupName in typeof(SwaggerGroupConsts).GetFields() foreach (var groupName in typeof(SwaggerGroupConsts).GetFields()
.Select(f => f.GetValue(null).ToString())) .Select(f => f.GetValue(null).ToString()))
{ {
options.SwaggerDoc(groupName, options.SwaggerDoc(groupName,
new OpenApiInfo { Title = $"{groupName} API", Version = groupName }); new OpenApiInfo { Title = $"{groupName} API", Version = groupName });
} }
//根据APIExplorerSetting判断是否包含于Swagger文档当前分组 //根据APIExplorerSetting判断是否包含于Swagger文档当前分组
@ -123,71 +169,25 @@ namespace Win_in.Sfs.Scp.WebApi
GetXmlFiles().ForEach(file => GetXmlFiles().ForEach(file =>
{ {
options.IncludeXmlComments(file); options.IncludeXmlComments(file);
Log.Information( " TEST-SWAGGER PATH ==> "+ file); Log.Information(" TEST-SWAGGER PATH ==> " + file);
}); });
options.DocumentFilter<HiddenApiFilter>();
options.CustomSchemaIds(type => type.FullName); options.CustomSchemaIds(type => type.FullName);
}); });
}
Configure<AbpLocalizationOptions>(options => private void ConfigureMultiTeancy(IConfiguration configuration)
{ {
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); _isMultiTenancy = Convert.ToBoolean(configuration["IsMultiTenancy"]);
options.Languages.Add(new LanguageInfo("en", "en", "English")); Configure<AbpMultiTenancyOptions>(options => { options.IsEnabled = _isMultiTenancy; });
options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); }
options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish"));
options.Languages.Add(new LanguageInfo("fr", "fr", "Français"));
options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi", "in"));
options.Languages.Add(new LanguageInfo("it", "it", "Italian", "it"));
options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak"));
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
});
context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
options.Audience = "WebApi";
});
Configure<AbpDistributedCacheOptions>(options =>
{
options.KeyPrefix = "WebApi:";
});
if (!hostingEnvironment.IsDevelopment())
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
context.Services
.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "WebApi-Protection-Keys");
}
context.Services.AddCors(options => private void ConfigureDbContext()
{ {
options.AddDefaultPolicy(builder => Configure<AbpDbContextOptions>(options => { options.UseSqlServer(); });
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToArray()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
} }
/// <summary> /// <summary>
/// 判断是否应该加入当前分组 /// 判断是否应该加入当前分组
/// </summary> /// </summary>
@ -283,5 +283,4 @@ namespace Win_in.Sfs.Scp.WebApi
app.UseConfiguredEndpoints(); app.UseConfiguredEndpoints();
} }
} }
} }

4
ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/Win_in.Sfs.Scp.WebApi.HttpApi.Host.csproj

@ -44,4 +44,8 @@
<None Remove="Logs\**" /> <None Remove="Logs\**" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
</Project> </Project>

4
ScpWebApiService/host/Win_in.Sfs.Scp.WebApi.HttpApi.Host/appsettings.json

@ -3,8 +3,8 @@
"CorsOrigins": "https://*.WebApi.com,http://localhost:4200,http://localhost:44307,https://localhost:44307" "CorsOrigins": "https://*.WebApi.com,http://localhost:4200,http://localhost:44307,https://localhost:44307"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=119.3.213.202,13315;Database=WebApi_Module;User ID=sa;Password=ChangkeTec@2020;connection timeout=600", "Default": "Server=127.0.0.1;Database=ScpWebApi_ABP;User ID=sa;Password=Microsoft2008;connection timeout=600",
"WebApi": "Server=119.3.213.202,13315;Database=WebApi_Module;User ID=sa;Password=ChangkeTec@2020;connection timeout=600" "WebApi": "Server=127.0.0.1;Database=ScpWebApi_Module;User ID=sa;Password=Microsoft2008;connection timeout=600"
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1" "Configuration": "127.0.0.1"

40
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/POCreateDTO.cs

@ -1,40 +0,0 @@
using System.ComponentModel.DataAnnotations;
namespace Win_in.Sfs.Scp.WebApi.POs
{
/// <summary>
/// 采购订单新增DTO(Purchase order create DTO)
/// </summary>
public class POCreateDTO : POCreateOrUpdateDTOBase
{
/// <summary>
/// 订单号(PoNumber)
/// </summary>
[Required]
[Display(Name = "订单号(PoNumber)")]
public string PoNumber { set; get; }
/// <summary>
/// 供应商代码(SupplierCode)
/// </summary>
[Required]
[Display(Name = "供应商代码(SupplierCode)")]
public string SupplierCode { set; get; }
/// <summary>
/// 地点(Site)
/// </summary>
[Required]
[Display(Name = "地点(Site)")]
public string Site { set; get; }
/// <summary>
/// 公司(Company)
/// </summary>
[Required]
[Display(Name = "公司(Company)")]
public string Company { set; get; }
}
}

76
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/POCreateOrUpdateDTOBase.cs

@ -1,76 +0,0 @@
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.POs
{
/// <summary>
/// 采购订单创建更新基础Dto
/// </summary>
public abstract class POCreateOrUpdateDTOBase : EntityDtoBase<Guid>
{
/// <summary>
/// 订单类型(PoType)
/// </summary>
[Required]
[Display(Name = "订单类型(PoType)")]
public string PoType { set; get; }
/// <summary>
/// 订单状态(Status)
/// </summary>
[Required]
[Display(Name = "订单状态(Status)")]
public int Status { set; get; }
/// <summary>
/// 是否寄存订单(IsConsignment)
/// </summary>
[Required]
[Display(Name = "是否寄存订单(IsConsignment)")]
public bool IsConsignment { set; get; }
/// <summary>
/// 订单日期(OrderDate)
/// </summary>
[Required]
[Display(Name = "订单日期(OrderDate)")]
public DateTime OrderDate { set; get; }
/// <summary>
/// 截止日期(DueDate)
/// </summary>
[Display(Name = "截止日期(DueDate)")]
public DateTime DueDate { set; get; }
/// <summary>
/// 税率(TaxRate)
/// </summary>
[Display(Name = "税率(TaxRate)")]
public decimal TaxRate { set; get; }
/// <summary>
/// 联系人(ContactName)
/// </summary>
[Display(Name = "联系人(ContactName)")]
public string ContactName { set; get; }
/// <summary>
/// 联系电话(ContactPhone)
/// </summary>
[Display(Name = "联系电话(ContactPhone)")]
public string ContactPhone { set; get; }
/// <summary>
/// 备注(Remark)
/// </summary>
[Display(Name = "备注(Remark)")]
public string Remark { set; get; }
public virtual ICollection<PODetailDTO> Details { get; set; }
}
}

17
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/POUpdateDTO.cs

@ -1,17 +0,0 @@
using System.ComponentModel.DataAnnotations;
namespace Win_in.Sfs.Scp.WebApi.POs
{
/// <summary>
/// 采购订单更新DTO(Purchase order update DTO)
/// </summary>
public class POUpdateDTO : POCreateOrUpdateDTOBase
{
/// <summary>
/// 并发时间戳(Concurrency Stamp)
/// </summary>
[Display(Name = "并发时间戳(Concurrency Stamp)")]
public string ConcurrencyStamp { get; set; }
}
}

4
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/IPartAppService.cs

@ -9,9 +9,9 @@ namespace Win_in.Sfs.Scp.WebApi.Parts
/// <summary> /// <summary>
/// Part接口 /// Part接口
/// </summary> /// </summary>
public interface IPartAppService : ICrudAppService<PartDTO, Guid, RequestDTO, PartCreateDTO, PartUpdateDTO> public interface IPartAppService : IReadOnlyAppService<PartDTO,Guid,RequestDTO>
{ {
Task<PartDTO> CreateAsync(PartDTO partCreateDTO);
} }

31
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateDTO.cs

@ -1,31 +0,0 @@
using System.ComponentModel.DataAnnotations;
namespace Win_in.Sfs.Scp.WebApi.Parts
{
/// <summary>
/// 零件新增DTO(Part create DTO)
/// </summary>
public class PartCreateDTO : PartCreateOrUpdateDTOBase
{
/// <summary>
/// 代码(Code)
/// </summary>
[Required]
[Display(Name = "代码")]
public string Code { get; set; }
/// <summary>
/// 地点(Site)
/// </summary>
[Required]
[Display(Name = "地点")]
public string Site { get; set; }
/// <summary>
/// 公司(Company)
/// </summary>
[Required]
[Display(Name = "公司")]
public string Company { get; set; }
}
}

152
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartCreateOrUpdateDTOBase.cs

@ -1,152 +0,0 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Data;
using Win_in.Sfs.Scp.WebApi.Domain.Shared;
namespace Win_in.Sfs.Scp.WebApi.Parts
{
/// <summary>
/// 零件创建更新基础Dto
/// </summary>
public abstract class PartCreateOrUpdateDTOBase : EntityDtoBase<Guid>,IHasExtraProperties
{
/// <summary>
/// 名称(Name)
/// </summary>
[Required]
[Display(Name = "名称")]
public string Name { get; set; }
/// <summary>
/// 描述(Desc1)
/// </summary>
[Display(Name = "描述")]
public string Desc1 { get; set; }
/// <summary>
/// 描述2(Desc2)
/// </summary>
[Display(Name = "描述2")]
public string Desc2 { get; set; }
/// <summary>
/// 状态(Status)
/// </summary>
[Required]
[Display(Name = "状态")]
public string Status { get; set; }
/// <summary>
/// 制造件(Can make)
/// </summary>
[Required]
[Display(Name = "制造件")]
public bool CanMake { get; set; }
/// <summary>
/// 采购件(Can buy)
/// </summary>
[Required]
[Display(Name = "采购件")]
public bool CanBuy { get; set; }
/// <summary>
/// 计量单位(Uom)
/// </summary>
[Required]
[Display(Name = "计量单位")]
public string Uom { get; set; }
/// <summary>
/// ABC类(abcClass)
/// </summary>
[Required]
[Display(Name = "ABC类")]
public string AbcClass { get; set; }
/// <summary>
/// 产品类(Product line)
/// </summary>
[Display(Name = "产品类")]
public string ProductLine { get; set; }
/// <summary>
/// 类型(Type)
/// </summary>
[Display(Name = "类型")]
public string Type { get; set; }
/// <summary>
/// 种类(Catalog)
/// </summary>
[Display(Name = "种类")]
public string Catalog { get; set; }
/// <summary>
/// 分组(Group)
/// </summary>
[Display(Name = "分组")]
public string Group { get; set; }
/// <summary>
/// 颜色(Color)
/// </summary>
[Display(Name = "颜色")]
public string Color { get; set; }
/// <summary>
/// 配置(Configuration)
/// </summary>
[Display(Name = "配置")]
public string Configuration { get; set; }
/// <summary>
/// 项目(Project)
/// </summary>
[Display(Name = "项目")]
public string Project { get; set; }
/// <summary>
/// 工程变更通知单(Engineering change order)
/// </summary>
[Display(Name = "工程变更通知单")]
public string Eco { get; set; }
/// <summary>
/// 标包计量单位(Standard Pack Uom)
/// </summary>
[Required]
[Display(Name = "标包计量单位")]
public string StdPackUom { get; set; }
/// <summary>
/// 标包数量(Standard Pack Qty)
/// </summary>
[Required]
[Display(Name = "标包数量")]
public decimal StdPackQty { get; set; }
/// <summary>
/// 替代计量单位(Extra Pack UM)
/// </summary>
[Display(Name = "替代计量单位")]
public string ExtPackUom { get; set; }
/// <summary>
/// 替代包装数量(Extra Pack Qty)
/// </summary>
[Display(Name = "替代包装数量")]
public decimal ExtPackQty { get; set; }
/// <summary>
/// 扩展属性(Extra Properties)
/// </summary>
[Display(Name = "扩展属性(Extra Properties)")]
public ExtraPropertyDictionary ExtraProperties { get; set; }
}
}

17
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Parts/PartUpdateDTO.cs

@ -1,17 +0,0 @@
using System.ComponentModel.DataAnnotations;
namespace Win_in.Sfs.Scp.WebApi.Parts
{
/// <summary>
/// 零件更新DTO(Part update DTO)
/// </summary>
public class PartUpdateDTO : PartCreateOrUpdateDTOBase
{
/// <summary>
/// 并发时间戳(Concurrency Stamp)
/// </summary>
[Display(Name = "并发时间戳(Concurrency Stamp)")]
public string ConcurrencyStamp { get; set; }
}
}

4
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/IPOAppService.cs → ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/IPurchaseOrderAppService.cs

@ -9,9 +9,9 @@ namespace Win_in.Sfs.Scp.WebApi.POs
/// <summary> /// <summary>
/// PO接口 /// PO接口
/// </summary> /// </summary>
public interface IPOAppService : ICrudAppService<PODTO, Guid, RequestDTO, POCreateDTO, POUpdateDTO> public interface IPurchaseOrderAppService : IReadOnlyAppService<PurchaseOrderDTO, Guid, RequestDTO>
{ {
Task<PurchaseOrderDTO> CreateAsync(PurchaseOrderDTO poCreateDTO);
} }

4
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/PODTO.cs → ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderDTO.cs

@ -9,7 +9,7 @@ namespace Win_in.Sfs.Scp.WebApi.POs
/// <summary> /// <summary>
/// 采购订单DTO(Purchase order DTO) /// 采购订单DTO(Purchase order DTO)
/// </summary> /// </summary>
public class PODTO : EntityDtoBase<Guid> public class PurchaseOrderDTO : EntityDtoBase<Guid>
{ {
/// <summary> /// <summary>
@ -91,6 +91,6 @@ namespace Win_in.Sfs.Scp.WebApi.POs
public string Remark { set; get; } public string Remark { set; get; }
public virtual ICollection<PODetailDTO> Details { get; set; } public virtual ICollection<PurchaseOrderDetailDTO> Details { get; set; }
} }
} }

2
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/POs/PODetailDTO.cs → ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/PurchaseOrders/PurchaseOrderDetailDTO.cs

@ -8,7 +8,7 @@ namespace Win_in.Sfs.Scp.WebApi.POs
/// <summary> /// <summary>
/// 采购订单明细DTO(Purchase order detail DTO) /// 采购订单明细DTO(Purchase order detail DTO)
/// </summary> /// </summary>
public class PODetailDTO : EntityDetailBase<Guid> public class PurchaseOrderDetailDTO : EntityDetailDtoBase<Guid>
{ {
/// <summary> /// <summary>
/// 订单号(PoNumber) /// 订单号(PoNumber)

2
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/IReceiptAppService.cs

@ -5,7 +5,7 @@ using Volo.Abp.Application.Services;
namespace Win_in.Sfs.Scp.WebApi.Receipts namespace Win_in.Sfs.Scp.WebApi.Receipts
{ {
public interface IReceiptAppService : ICrudAppService<ReceiptDTO,Guid,RequestDTO,ReceiptCreateDTO, ReceiptUpdateDTO> public interface IReceiptAppService : IReadOnlyAppService<ReceiptDTO,Guid,RequestDTO>
{ {
} }

85
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateDTO.cs

@ -1,85 +0,0 @@
using System.ComponentModel.DataAnnotations;
namespace Win_in.Sfs.Scp.WebApi.Receipts
{
/// <summary>
/// 澗새데劤藤DTO(Receipt create DTO)
/// </summary>
public class ReceiptCreateDTO : ReceiptCreateOrUpdateDTOBase
{
/// <summary>
/// 澗새데뵀(RcNumber)
/// </summary>
[Required]
[Display(Name = "澗새데뵀(RcNumber)")]
public string RcNumber { set; get; }
/// <summary>
/// 랙새데뵀(AsnNumber)
/// </summary>
[Required]
[Display(Name = "랙새데뵀(AsnNumber)")]
public string AsnNumber { set; get; }
/// <summary>
/// 狼새셕뺍데뵀(RpNumber)
/// </summary>
[Required]
[Display(Name = "狼새셕뺍데뵀(RpNumber)")]
public string RpNumber { set; get; }
/// <summary>
/// 땐데뵀(PoNumber)
/// </summary>
[Required]
[Display(Name = "땐데뵀(PoNumber)")]
public string PoNumber { set; get; }
/// <summary>
/// 묩壇�덜쯤(PoNumber)
/// </summary>
[Required]
[Display(Name = "묩壇�덜쯤(SupplierCode)")]
public string SupplierCode { set; get; }
/// <summary>
/// 澗새데잚謹(RcType)
/// "" :澗새데(Receipts)
/// "R":藁새데(Return Document)
/// </summary>
[Required]
[Display(Name = "澗새데잚謹(RcType)")]
public string RcType { set; get; }
/// <summary>
/// 뒈듐(Site)
/// </summary>
[Required]
[Display(Name = "뒈듐(Site)")]
public string Site { set; get; }
/// <summary>
/// 무鱇(Company)
/// </summary>
[Required]
[Display(Name = "무鱇(Company)")]
public string Company { set; get; }
/// <summary>
/// 땐데契(PoLine)
/// </summary>
[Required]
[Display(Name = "땐데契(PoLine)")]
public string PoLine { set; get; }
/// <summary>
/// 쥐숭뵀(PartCode)
/// </summary>
[Required]
[Display(Name = "쥐숭뵀(PartCode)")]
public string PartCode { set; get; }
}
}

129
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptCreateOrUpdateDTOBase.cs

@ -1,129 +0,0 @@
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.Receipts
{
public abstract class ReceiptCreateOrUpdateDTOBase : EntityDtoBase<Guid>
{
/// <summary>
/// 仓库(Warehouse)
/// </summary>
[Required]
[Display(Name = "仓库(Warehouse)")]
public string Warehouse { set; get; }
/// <summary>
/// 收货口(Dock)
/// </summary>
[Required]
[Display(Name = "收货口(Dock)")]
public string Dock { set; get; }
/// <summary>
/// 时间窗口开始(TimeWindowBegin)
/// </summary>
[Display(Name = "时间窗口开始(TimeWindowBegin)")]
public DateTime TimeWindowBegin { set; get; }
/// <summary>
/// 时间窗口结束(TimeWindowEnd)
/// </summary>
[Display(Name = "时间窗口结束(TimeWindowEnd)")]
public DateTime TimeWindowEnd { set; get; }
/// <summary>
/// 收货日期(ReceiveDate)
/// </summary>
[Required]
[Display(Name = "收货日期(ReceiveDate)")]
public DateTime ReceiveDate { set; get; }
/// <summary>
/// 收货时间(ReceiveTime)
/// </summary>
[Required]
[Display(Name = "收货时间(ReceiveTime)")]
public DateTime ReceiveTime { set; get; }
/// <summary>
/// 批次(Lot)
/// </summary>
[Required]
[Display(Name = "批次(Lot)")]
public string Lot { set; get; }
/// <summary>
/// 供应商批次(SupplierLot)
/// </summary>
[Display(Name = "供应商批次(SupplierLot)")]
public string SupplierLot { set; get; }
/// <summary>
/// 生产日期(ProductionDate)
/// </summary>
[Display(Name = "生产日期(ProductionDate)")]
public DateTime ProductionDate { set; get; }
/// <summary>
/// 计量单位(Uom)
/// </summary>
[Required]
[Display(Name = "计量单位(Uom)")]
public string Uom { set; get; }
/// <summary>
/// 发货数量(DeliverQty)
/// </summary>
[Required]
[Display(Name = "发货数量(DeliverQty)")]
public decimal DeliverQty { set; get; }
/// <summary>
/// 收货数量(ReceiveQty)
/// </summary>
[Required]
[Display(Name = "收货数量(ReceiveQty)")]
public decimal ReceiveQty { set; get; }
/// <summary>
/// 标包计量单位(Standard Pack Uom)
/// </summary>
[Display(Name = "标包计量单位(Standard Pack Uom)")]
public string StdPackUom { set; get; }
/// <summary>
/// 标包数量(Standard Pack Qty)
/// </summary>
[Display(Name = "标包数量(Standard Pack Qty)")]
public decimal StdPackQty { set; get; }
/// <summary>
/// 供应商计量单位(SupplierPackUom)
/// </summary>
[Display(Name = "供应商计量单位(SupplierPackUom)")]
public string SupplierPackUom { set; get; }
/// <summary>
/// 供应商包装数量(SupplierPackQty)
/// </summary>
[Display(Name = "供应商包装数量(SupplierPackQty)")]
public decimal SupplierPackQty { set; get; }
/// <summary>
/// 供应商包装转换率(SupplierPackConvertRate)
/// </summary>
[Required]
[Display(Name = "供应商包装转换率(SupplierPackConvertRate)")]
public decimal SupplierPackConvertRate { set; get; }
/// <summary>
/// 备注(Remark)
/// </summary>
[Display(Name = "备注(Remark)")]
public string Remark { set; get; }
}
}

18
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Receipts/ReceiptUpdateDTO.cs

@ -1,18 +0,0 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Scp.WebApi.Receipts;
namespace Win_in.Sfs.Scp.WebApi.Receipts
{
/// <summary>
/// 收货单更新DTO(Receipt update DTO)
/// </summary>
public class ReceiptUpdateDTO : ReceiptCreateOrUpdateDTOBase
{
/// <summary>
/// 并发时间戳(Concurrency Stamp)
/// </summary>
[Display(Name = "并发时间戳(Concurrency Stamp)")]
public string ConcurrencyStamp { get; set; }
}
}

2
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/ISupplierAppService.cs

@ -6,7 +6,7 @@ using Win_in.Sfs.Scp.WebApi.Suppliers;
namespace Win_in.Sfs.Scp.WebApi.Suppliers namespace Win_in.Sfs.Scp.WebApi.Suppliers
{ {
public interface ISupplierAppService : ICrudAppService<SupplierDTO,Guid,RequestDTO,SupplierCreateDTO, SupplierUpdateDTO> public interface ISupplierAppService : IReadOnlyAppService<SupplierDTO,Guid,RequestDTO>
{ {
} }

24
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierCreateDTO.cs

@ -1,24 +0,0 @@
using System.ComponentModel.DataAnnotations;
namespace Win_in.Sfs.Scp.WebApi.Suppliers
{
/// <summary>
/// 供应商新增DTO(Supplier create DTO)
/// </summary>
public class SupplierCreateDTO : SupplierCreateOrUpdateDTOBase
{
/// <summary>
/// 代码(Code)
/// </summary>
[Required]
[Display(Name = "代码(Code)")]
public string Code { set; get; }
/// <summary>
/// 公司(Company)
/// </summary>
[Required]
[Display(Name = "公司(Company)")]
public string Company { set; get; }
}
}

97
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierCreateOrUpdateDTOBase.cs

@ -1,97 +0,0 @@
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.Suppliers
{
public abstract class SupplierCreateOrUpdateDTOBase : EntityDtoBase<Guid>
{
/// <summary>
/// 简称(Name)
/// </summary>
[Required]
[Display(Name = "简称(Name)")]
public string Name { set; get; }
/// <summary>
/// 描述(Description)
/// </summary>
[Display(Name = "描述(Description)")]
public string Desc { set; get; }
/// <summary>
/// 级别(Rank)
/// </summary>
[Display(Name = "级别(Rank)")]
public string Rank { get; set; }
/// <summary>
/// 地址
/// </summary>
[Display(Name = "地址(Address)")]
public string Address { get; set; }
/// <summary>
/// 国家(Country)
/// </summary>
[Display(Name = "国家(Country)")]
public string Country { get; set; }
/// <summary>
/// 城市(City)
/// </summary>
[Display(Name = "城市(City)")]
public string City { get; set; }
/// <summary>
/// 电话(Phone)
/// </summary>
[Display(Name = "电话(Phone)")]
public string Phone { set; get; }
/// <summary>
/// 传真(Fax)
/// </summary>
[Display(Name = "传真(Fax)")]
public string Fax { set; get; }
/// <summary>
/// 邮编(PostId)
/// </summary>
[Display(Name = "邮编(PostId)")]
public string PostId { set; get; }
/// <summary>
/// 联系人(ContactName)
/// </summary>
[Display(Name = "联系人(ContactName)")]
public string ContactName { set; get; }
/// <summary>
/// 货币(Currency)
/// </summary>
[Display(Name = "货币(Currency)")]
public string Currency { set; get; }
/// <summary>
/// 是否激活(IsActive)
/// </summary>
[Display(Name = "是否激活(IsActive)")]
public bool IsActive { set; get; }
/// <summary>
/// 备注(Remark)
/// </summary>
[Display(Name = "备注(Remark)")]
public string Remark { set; get; }
/// <summary>
/// 银行(Bank)
/// </summary>
[Display(Name = "银行(Bank)")]
public string Bank { set; get; }
}
}

18
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Suppliers/SupplierUpdateDTO.cs

@ -1,18 +0,0 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities;
namespace Win_in.Sfs.Scp.WebApi.Suppliers
{
/// <summary>
/// 供应商更新DTO(Supplier update DTO)
/// </summary>
public class SupplierUpdateDTO : SupplierCreateOrUpdateDTOBase, IHasConcurrencyStamp
{
/// <summary>
/// 并发时间戳(Concurrency Stamp)
/// </summary>
[Display(Name = "并发时间戳(Concurrency Stamp)")]
public string ConcurrencyStamp { get; set; }
}
}

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application.Contracts/Win_in.Sfs.Scp.WebApi.Application.Contracts.csproj

@ -12,9 +12,15 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="ASNs\**" />
<Compile Remove="Labels\**" /> <Compile Remove="Labels\**" />
<Compile Remove="SupplierParts\**" />
<EmbeddedResource Remove="ASNs\**" />
<EmbeddedResource Remove="Labels\**" /> <EmbeddedResource Remove="Labels\**" />
<EmbeddedResource Remove="SupplierParts\**" />
<None Remove="ASNs\**" />
<None Remove="Labels\**" /> <None Remove="Labels\**" />
<None Remove="SupplierParts\**" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -24,7 +30,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="POs\" />
<Folder Include="Receipts\" /> <Folder Include="Receipts\" />
</ItemGroup> </ItemGroup>

1
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/ASNs/ASNAppService.cs

@ -24,6 +24,7 @@ namespace Win_in.Sfs.Scp.WebApi.ASNs
public ASNAppService(IASNRepository repository) : base(repository) public ASNAppService(IASNRepository repository) : base(repository)
{ {
_asnRepository = repository; _asnRepository = repository;
} }
/// <summary> /// <summary>

89
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/POs/POAppService.cs

@ -1,89 +0,0 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace Win_in.Sfs.Scp.WebApi.POs
{
/// <summary>
/// 采购订单服务
/// </summary>
[AllowAnonymous]
[Route("api/scp/po")]
[ApiExplorerSettings(GroupName = SwaggerGroupConsts.ScpWebApi)]
public class POAppService : CrudAppService<PO, PODTO, Guid,RequestDTO, POCreateDTO, POUpdateDTO>, IPOAppService
{
private readonly IPORepository _partRepository;
public POAppService(IPORepository repository) : base(repository)
{
_partRepository = repository;
}
/// <summary>
/// 按ID获取采购订单 (Get purchase order by ID)
/// </summary>
/// <param name="id">唯一ID(unique ID)</param>
/// <returns></returns>
[HttpGet]
[Route("{id}")]
public override Task<PODTO> GetAsync(Guid id)
{
return base.GetAsync(id);
}
/// <summary>
/// 按条件获取采购订单列表 (Get purchase order list by request condition)
/// </summary>
/// <param name="requestDTO">请求条件DTO(Request condition DTO)</param>
/// <returns></returns>
[HttpGet]
[Route("")]
public override Task<PagedResultDto<PODTO>> GetListAsync(RequestDTO requestDTO)
{
return base.GetListAsync(requestDTO);
}
/// <summary>
/// 新增采购订单(Create New purchase order)
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("")]
public override Task<PODTO> CreateAsync(POCreateDTO poCreateDTO)
{
return base.CreateAsync(poCreateDTO);
}
/// <summary>
/// 按ID修改采购订单 (Modify purchase order by ID)
/// </summary>
/// <param name="id">唯一ID(unique ID)</param>
/// <returns></returns>
[HttpPut]
[Route("{id}")]
public override Task<PODTO> UpdateAsync(Guid id, POUpdateDTO poUpdateDTO)
{
return base.UpdateAsync(id, poUpdateDTO);
}
/// <summary>
/// 按ID删除采购订单 (Delete purchase order by ID)
/// </summary>
/// <param name="id">唯一ID(unique ID)</param>
/// <returns>无</returns>
[HttpDelete]
[Route("{id}")]
public override Task DeleteAsync(Guid id)
{
return base.DeleteAsync(id);
}
}
}

45
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs

@ -3,10 +3,10 @@ using Microsoft.AspNetCore.Mvc;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using AutoMapper;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Win_in.Sfs.Scp.WebApi.ASNs;
namespace Win_in.Sfs.Scp.WebApi.Parts namespace Win_in.Sfs.Scp.WebApi.Parts
{ {
@ -14,10 +14,10 @@ namespace Win_in.Sfs.Scp.WebApi.Parts
/// 零件服务 /// 零件服务
/// </summary> /// </summary>
[AllowAnonymous] [AllowAnonymous]
[Route("api/scp/Part")] [Route("api/scp/part")]
[ApiExplorerSettings(GroupName = SwaggerGroupConsts.ScpWebApi)] [ApiExplorerSettings(GroupName = SwaggerGroupConsts.ScpWebApi)]
public class PartAppService : CrudAppService<Part, PartDTO, Guid,RequestDTO, PartCreateDTO, PartUpdateDTO>, IPartAppService public class PartAppService :ReadOnlyAppService<Part,PartDTO,Guid, RequestDTO>, IPartAppService
{ {
private readonly IPartRepository _partRepository; private readonly IPartRepository _partRepository;
@ -31,11 +31,12 @@ namespace Win_in.Sfs.Scp.WebApi.Parts
/// </summary> /// </summary>
/// <param name="id">唯一ID(unique ID)</param> /// <param name="id">唯一ID(unique ID)</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("{id}")] [Route("{id}")]
public override Task<PartDTO> GetAsync(Guid id) public override async Task<PartDTO> GetAsync(Guid id)
{ {
return base.GetAsync(id); return await base.GetAsync(id);
} }
@ -46,9 +47,9 @@ namespace Win_in.Sfs.Scp.WebApi.Parts
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("")] [Route("")]
public override Task<PagedResultDto<PartDTO>> GetListAsync(RequestDTO requestDTO) public override async Task<PagedResultDto<PartDTO>> GetListAsync(RequestDTO requestDTO)
{ {
return base.GetListAsync(requestDTO); return await base.GetListAsync(requestDTO);
} }
/// <summary> /// <summary>
@ -57,33 +58,13 @@ namespace Win_in.Sfs.Scp.WebApi.Parts
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("")] [Route("")]
public override Task<PartDTO> CreateAsync(PartCreateDTO partCreateDTO) public async Task<PartDTO> CreateAsync(PartDTO partCreateDTO)
{ {
return base.CreateAsync(partCreateDTO); var entity = ObjectMapper.Map<PartDTO, Part>(partCreateDTO);
var ret= await _partRepository.InsertAsync(entity);
var dto = ObjectMapper.Map<Part, PartDTO>(ret);
return dto;
} }
/// <summary>
/// 按ID修改零件 (Modify part by ID)
/// </summary>
/// <param name="id">唯一ID(unique ID)</param>
/// <returns></returns>
[HttpPut]
[Route("{id}")]
public override Task<PartDTO> UpdateAsync(Guid id, PartUpdateDTO partUpdateDTO)
{
return base.UpdateAsync(id, partUpdateDTO);
}
/// <summary>
/// 按ID删除实体 (Delete part by ID)
/// </summary>
/// <param name="id">唯一ID(unique ID)</param>
/// <returns>无</returns>
[HttpDelete]
[Route("{id}")]
public override Task DeleteAsync(Guid id)
{
return base.DeleteAsync(id);
}
} }
} }

69
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/PurchaseOrders/PurchaseOrderAppService.cs

@ -0,0 +1,69 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win_in.Sfs.Scp.WebApi.Parts;
namespace Win_in.Sfs.Scp.WebApi.POs
{
/// <summary>
/// 采购订单服务
/// </summary>
[AllowAnonymous]
[Route("api/scp/po")]
[ApiExplorerSettings(GroupName = SwaggerGroupConsts.ScpWebApi)]
public class PurchaseOrderAppService : ReadOnlyAppService<PurchaseOrder, PurchaseOrderDTO, Guid,RequestDTO>, IPurchaseOrderAppService
{
private readonly IPurchaseOrderRepository _purchaseOrderRepository;
public PurchaseOrderAppService(IPurchaseOrderRepository repository) : base(repository)
{
_purchaseOrderRepository = repository;
}
/// <summary>
/// 按ID获取采购订单 (Get purchase order by ID)
/// </summary>
/// <param name="id">唯一ID(unique ID)</param>
/// <returns></returns>
[HttpGet]
[Route("{id}")]
public override async Task<PurchaseOrderDTO> GetAsync(Guid id)
{
return await base.GetAsync(id);
}
/// <summary>
/// 按条件获取采购订单列表 (Get purchase order list by request condition)
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("")]
public override async Task<PagedResultDto<PurchaseOrderDTO>> GetListAsync(RequestDTO input)
{
return await base.GetListAsync(input);
}
/// <summary>
/// 新增采购订单(Create New purchase order)
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("")]
public async Task<PurchaseOrderDTO> CreateAsync(PurchaseOrderDTO poCreateDTO)
{
var entity = ObjectMapper.Map<PurchaseOrderDTO, PurchaseOrder>(poCreateDTO);
var ret = await _purchaseOrderRepository.InsertAsync(entity);
var dto = ObjectMapper.Map<PurchaseOrder, PurchaseOrderDTO>(ret);
return dto;
}
}
}

38
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs

@ -14,13 +14,13 @@ namespace Win_in.Sfs.Scp.WebApi.Receipts
[AllowAnonymous] [AllowAnonymous]
[Route("api/scp/receipt")] [Route("api/scp/receipt")]
[ApiExplorerSettings(GroupName = SwaggerGroupConsts.ScpWebApi)] [ApiExplorerSettings(GroupName = SwaggerGroupConsts.ScpWebApi)]
public class ReceiptAppService : CrudAppService<Receipt, ReceiptDTO, Guid, RequestDTO, ReceiptCreateDTO, ReceiptUpdateDTO>, IReceiptAppService public class ReceiptAppService : ReadOnlyAppService<Receipt, ReceiptDTO, Guid,RequestDTO>, IReceiptAppService
{ {
private readonly IReceiptRepository _partRepository; private readonly IReceiptRepository _receiptRepository;
public ReceiptAppService(IReceiptRepository repository) : base(repository) public ReceiptAppService(IReceiptRepository repository) : base(repository)
{ {
_partRepository = repository; _receiptRepository = repository;
} }
@ -31,9 +31,9 @@ namespace Win_in.Sfs.Scp.WebApi.Receipts
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("{id}")] [Route("{id}")]
public override Task<ReceiptDTO> GetAsync(Guid id) public override async Task<ReceiptDTO> GetAsync(Guid id)
{ {
return base.GetAsync(id); return await base.GetAsync(id);
} }
@ -44,9 +44,9 @@ namespace Win_in.Sfs.Scp.WebApi.Receipts
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("")] [Route("")]
public override Task<PagedResultDto<ReceiptDTO>> GetListAsync(RequestDTO requestDTO) public override async Task<PagedResultDto<ReceiptDTO>> GetListAsync(RequestDTO requestDTO)
{ {
return base.GetListAsync(requestDTO); return await base.GetListAsync(requestDTO);
} }
@ -57,9 +57,12 @@ namespace Win_in.Sfs.Scp.WebApi.Receipts
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("")] [Route("")]
public override Task<ReceiptDTO> CreateAsync(ReceiptCreateDTO receiptCreateDTO) public async Task<ReceiptDTO> CreateAsync(ReceiptDTO receiptCreateDTO)
{ {
return base.CreateAsync(receiptCreateDTO); var entity = ObjectMapper.Map<ReceiptDTO, Receipt>(receiptCreateDTO);
var ret = await _receiptRepository.InsertAsync(entity);
var dto = ObjectMapper.Map<Receipt, ReceiptDTO>(ret);
return dto;
} }
/// <summary> /// <summary>
/// 按ID修改收货单(Update receipt by ID) /// 按ID修改收货单(Update receipt by ID)
@ -67,24 +70,7 @@ namespace Win_in.Sfs.Scp.WebApi.Receipts
/// <param name="id">唯一ID(unique ID)</param> /// <param name="id">唯一ID(unique ID)</param>
/// <param name="receiptUpdateDTO"></param> /// <param name="receiptUpdateDTO"></param>
/// <returns></returns> /// <returns></returns>
[HttpPut]
[Route("{id}")]
public override Task<ReceiptDTO> UpdateAsync(Guid id, ReceiptUpdateDTO receiptUpdateDTO)
{
return base.UpdateAsync(id, receiptUpdateDTO);
}
/// <summary>
/// 按ID删除收货单(Delete receipt by ID)
/// </summary>
/// <param name="id">唯一ID(unique ID)</param>
/// <returns>无</returns>
[HttpDelete]
[Route("{id}")]
public override Task DeleteAsync(Guid id)
{
return base.DeleteAsync(id);
}
} }
} }

45
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs

@ -15,13 +15,13 @@ namespace Win_in.Sfs.Scp.WebApi.Suppliers
[AllowAnonymous] [AllowAnonymous]
[Route("api/scp/supplier")] [Route("api/scp/supplier")]
[ApiExplorerSettings(GroupName = SwaggerGroupConsts.ScpWebApi)] [ApiExplorerSettings(GroupName = SwaggerGroupConsts.ScpWebApi)]
public class SuppliersAppService : CrudAppService<Supplier, SupplierDTO, Guid,RequestDTO, SupplierCreateDTO, SupplierUpdateDTO>, ISupplierAppService public class SuppliersAppService : ReadOnlyAppService<Supplier, SupplierDTO, Guid,RequestDTO>, ISupplierAppService
{ {
private readonly ISupplierRepository _partRepository; private readonly ISupplierRepository _supplierRepository;
public SuppliersAppService(ISupplierRepository repository) : base(repository) public SuppliersAppService(ISupplierRepository repository) : base(repository)
{ {
_partRepository = repository; _supplierRepository = repository;
} }
@ -32,9 +32,9 @@ namespace Win_in.Sfs.Scp.WebApi.Suppliers
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("{id}")] [Route("{id}")]
public override Task<SupplierDTO> GetAsync(Guid id) public override async Task<SupplierDTO> GetAsync(Guid id)
{ {
return base.GetAsync(id); return await base.GetAsync(id);
} }
@ -45,9 +45,9 @@ namespace Win_in.Sfs.Scp.WebApi.Suppliers
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("")] [Route("")]
public override Task<PagedResultDto<SupplierDTO>> GetListAsync(RequestDTO requestDTO) public override async Task<PagedResultDto<SupplierDTO>> GetListAsync(RequestDTO requestDTO)
{ {
return base.GetListAsync(requestDTO); return await base.GetListAsync(requestDTO);
} }
@ -58,35 +58,14 @@ namespace Win_in.Sfs.Scp.WebApi.Suppliers
/// <returns>供应商DTO(Supplier DTO)</returns> /// <returns>供应商DTO(Supplier DTO)</returns>
[HttpPost] [HttpPost]
[Route("")] [Route("")]
public override Task<SupplierDTO> CreateAsync(SupplierCreateDTO supplierCreateDTO) public async Task<SupplierDTO> CreateAsync(SupplierDTO supplierCreateDTO)
{ {
return base.CreateAsync(supplierCreateDTO); var entity = ObjectMapper.Map<SupplierDTO, Supplier>(supplierCreateDTO);
var ret = await _supplierRepository.InsertAsync(entity);
var dto = ObjectMapper.Map<Supplier, SupplierDTO>(ret);
return dto;
} }
/// <summary>
/// 按ID修改供应商 (Modify supplier by id)
/// </summary>
/// <param name="id">唯一ID(unique ID)</param>
/// <param name="supplierUpdateDTO">新的供应商DTO(new supplier DTO)</param>
/// <returns>供应商DTO(Supplier DTO)</returns>
[HttpPut]
[Route("{id}")]
public override Task<SupplierDTO> UpdateAsync(Guid id, SupplierUpdateDTO supplierUpdateDTO)
{
return base.UpdateAsync(id, supplierUpdateDTO);
}
/// <summary>
/// 按ID删除供应商 (Delete supplier by id)
/// </summary>
/// <param name="id">唯一ID(unique ID)</param>
/// <returns>无(void)</returns>
[HttpDelete]
[Route("{id}")]
public override Task DeleteAsync(Guid id)
{
return base.DeleteAsync(id);
}
} }
} }

32
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiApplicationAutoMapperProfile.cs

@ -1,9 +1,7 @@
using AutoMapper; using AutoMapper;
using Win_in.Sfs.Scp.WebApi.ASNs;
using Win_in.Sfs.Scp.WebApi.Parts; using Win_in.Sfs.Scp.WebApi.Parts;
using Win_in.Sfs.Scp.WebApi.POs; using Win_in.Sfs.Scp.WebApi.POs;
using Win_in.Sfs.Scp.WebApi.Receipts; using Win_in.Sfs.Scp.WebApi.Receipts;
using Win_in.Sfs.Scp.WebApi.SupplierParts;
using Win_in.Sfs.Scp.WebApi.Suppliers; using Win_in.Sfs.Scp.WebApi.Suppliers;
namespace Win_in.Sfs.Scp.WebApi namespace Win_in.Sfs.Scp.WebApi
@ -18,8 +16,10 @@ namespace Win_in.Sfs.Scp.WebApi
CreateMapPart(); CreateMapPart();
CreateMapSupplier(); CreateMapSupplier();
CreateMapSupplierPart();
CreateMapReceipt(); CreateMapReceipt();
CreateMapPurchaseOrder();
CreateMapPurchaseOrderDetail();
} }
/// <summary> /// <summary>
@ -29,8 +29,6 @@ namespace Win_in.Sfs.Scp.WebApi
{ {
CreateMap<Part, PartDTO>().ReverseMap(); CreateMap<Part, PartDTO>().ReverseMap();
CreateMap<Part, PartCreateDTO>().ReverseMap();
CreateMap<Part, PartUpdateDTO>().ReverseMap();
} }
/// <summary> /// <summary>
@ -40,20 +38,8 @@ namespace Win_in.Sfs.Scp.WebApi
{ {
CreateMap<Supplier, SupplierDTO>().ReverseMap(); CreateMap<Supplier, SupplierDTO>().ReverseMap();
CreateMap<Supplier, SupplierCreateDTO>().ReverseMap();
CreateMap<Supplier, SupplierUpdateDTO>().ReverseMap();
} }
/// <summary>
/// 供应商零件实体与Dto映射
/// </summary>
private void CreateMapSupplierPart()
{
CreateMap<SupplierPart, SupplierPartDTO>().ReverseMap();
CreateMap<SupplierPart, SupplierPartCreateDTO>().ReverseMap();
CreateMap<SupplierPart, SupplierPartUpdateDTO>().ReverseMap();
}
/// <summary> /// <summary>
/// 收货单与退货单明细实体与Dto映射 /// 收货单与退货单明细实体与Dto映射
@ -62,29 +48,25 @@ namespace Win_in.Sfs.Scp.WebApi
{ {
CreateMap<Receipt, ReceiptDTO>().ReverseMap(); CreateMap<Receipt, ReceiptDTO>().ReverseMap();
CreateMap<Receipt, ReceiptCreateDTO>().ReverseMap();
CreateMap<Receipt, ReceiptUpdateDTO>().ReverseMap();
} }
/// <summary> /// <summary>
/// 采购订单主表映射 /// 采购订单主表映射
/// </summary> /// </summary>
private void CreateMapPO() private void CreateMapPurchaseOrder()
{ {
CreateMap<PO, PODTO>().ReverseMap(); CreateMap<PurchaseOrder, PurchaseOrderDTO>().ReverseMap();
CreateMap<PO, POCreateDTO>().ReverseMap();
CreateMap<PO, POUpdateDTO>().ReverseMap();
} }
/// <summary> /// <summary>
/// 采购订单明细表映射 /// 采购订单明细表映射
/// </summary> /// </summary>
private void CreateMapPODetial() private void CreateMapPurchaseOrderDetail()
{ {
CreateMap<PODetail, PODetailDTO>().ReverseMap(); CreateMap<PurchaseOrderDetail, PurchaseOrderDetailDTO>().ReverseMap();
} }
} }
} }

10
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Win_in.Sfs.Scp.WebApi.Application.csproj

@ -12,9 +12,15 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="ASNs\**" />
<Compile Remove="Labels\**" /> <Compile Remove="Labels\**" />
<Compile Remove="SupplierParts\**" />
<EmbeddedResource Remove="ASNs\**" />
<EmbeddedResource Remove="Labels\**" /> <EmbeddedResource Remove="Labels\**" />
<EmbeddedResource Remove="SupplierParts\**" />
<None Remove="ASNs\**" />
<None Remove="Labels\**" /> <None Remove="Labels\**" />
<None Remove="SupplierParts\**" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -25,8 +31,4 @@
<ProjectReference Include="..\Win_in.Sfs.Scp.WebApi.Domain\Win_in.Sfs.Scp.WebApi.Domain.csproj" /> <ProjectReference Include="..\Win_in.Sfs.Scp.WebApi.Domain\Win_in.Sfs.Scp.WebApi.Domain.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="POs\" />
</ItemGroup>
</Project> </Project>

12
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityBase.cs

@ -4,19 +4,9 @@ using Volo.Abp.Domain.Entities.Auditing;
namespace Win_in.Sfs.Scp.WebApi.Domain.Shared namespace Win_in.Sfs.Scp.WebApi.Domain.Shared
{ {
public class EntityBase<TKey> : AuditedAggregateRoot<TKey> public class EntityBase<TKey> : CreationAuditedAggregateRoot<TKey>
{ {
/// <summary>
/// 序列(SequenceNumber)
/// </summary>
[Display(Name = "序列(SequenceNumber)")]
public string SequenceNumber { set; get; }
/// <summary>
/// 版本(Name)
/// </summary>
[Display(Name = "版本(Version)")]
public string Version { set; get; }
} }
} }

8
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDetailBase.cs

@ -5,15 +5,9 @@ using Volo.Abp.Domain.Entities.Auditing;
namespace Win_in.Sfs.Scp.WebApi.Domain.Shared namespace Win_in.Sfs.Scp.WebApi.Domain.Shared
{ {
public class EntityDetailBase<TKey> : AuditedAggregateRoot<TKey> public class EntityDetailBase<TKey> : CreationAuditedEntity<TKey>
{ {
/// <summary>
/// 版本(Name)
/// </summary>
[Display(Name = "版本(Version)")]
public string Version { set; get; }
public EntityDetailBase() { } public EntityDetailBase() { }
public EntityDetailBase(TKey id) : base(id) { } public EntityDetailBase(TKey id) : base(id) { }

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDetailDtoBase.cs

@ -5,14 +5,9 @@ using Volo.Abp.Domain.Entities.Auditing;
namespace Win_in.Sfs.Scp.WebApi.Domain.Shared namespace Win_in.Sfs.Scp.WebApi.Domain.Shared
{ {
public class EntityDetailDtoBase<TKey> : AuditedEntityDto<TKey> public class EntityDetailDtoBase<TKey> : CreationAuditedEntityDto<TKey>
{ {
/// <summary>
/// 版本(Name)
/// </summary>
[Display(Name = "版本(Version)")]
public string Version { set; get; }
} }
} }

12
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/EntityBase/EntityDtoBase.cs

@ -5,19 +5,9 @@ using Volo.Abp.Domain.Entities.Auditing;
namespace Win_in.Sfs.Scp.WebApi.Domain.Shared namespace Win_in.Sfs.Scp.WebApi.Domain.Shared
{ {
public class EntityDtoBase<TKey> : AuditedEntityDto<TKey> public class EntityDtoBase<TKey> : CreationAuditedEntityDto<TKey>
{ {
/// <summary>
/// 序列(SequenceNumber)
/// </summary>
[Display(Name = "序列(SequenceNumber)")]
public string SequenceNumber { set; get; }
/// <summary>
/// 版本(Name)
/// </summary>
[Display(Name = "版本(Version)")]
public string Version { set; get; }
} }
} }

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/ar.json

@ -1,7 +0,0 @@
{
"culture": "ar",
"texts": {
"MyAccount": "إدارة ملفى",
"SamplePageMessage": "صفحة نموذجية للوحدة النمطية WebApi"
}
}

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/cs.json

@ -1,7 +0,0 @@
{
"culture": "cs",
"texts": {
"MyAccount": "Spravovat profil",
"SamplePageMessage": "Ukázková stránka pro modul WebApi"
}
}

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/de-DE.json

@ -1,7 +0,0 @@
{
"culture": "de-DE",
"texts": {
"MyAccount": "Mein Konto",
"SamplePageMessage": "Eine Beispielseite für das Modul WebApiModul"
}
}

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/en-GB.json

@ -1,7 +0,0 @@
{
"culture": "en-GB",
"texts": {
"MyAccount": "My account",
"SamplePageMessage": "A sample page for the WebApi module"
}
}

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/es.json

@ -1,7 +0,0 @@
{
"culture": "es",
"texts": {
"MyAccount": "Mi cuenta",
"SamplePageMessage": "Una página de ejemplo para el módulo WebApi "
}
}

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/fi.json

@ -1,7 +0,0 @@
{
"culture": "fi",
"texts": {
"MyAccount": "Tilini",
"SamplePageMessage": "Esimerkkisivu WebApi-moduulille"
}
}

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/fr.json

@ -1,7 +0,0 @@
{
"culture": "fr",
"texts": {
"MyAccount": "Mon compte",
"SamplePageMessage": "Exemple de page pour le module WebApi"
}
}

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/hi.json

@ -1,7 +0,0 @@
{
"culture": "hi",
"texts": {
"MyAccount": "मेरा खाता",
"SamplePageMessage": "WebApi मॉड्यूल के लिए एक नमूना पृष्ठ"
}
}

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/hu.json

@ -1,7 +0,0 @@
{
"culture": "hu",
"texts": {
"MyAccount": "A fiókom",
"SamplePageMessage": "Mintaoldal a WebApi modulhoz"
}
}

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/it.json

@ -1,7 +0,0 @@
{
"culture": "it",
"texts": {
"MyAccount": "Il mio conto",
"SamplePageMessage": "Una pagina di esempio per il modulo WebApi"
}
}

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/nl.json

@ -1,7 +0,0 @@
{
"culture": "nl",
"texts": {
"MyAccount": "Mijn rekening",
"SamplePageMessage": "Een voorbeeldpagina voor de WebApi module"
}
}

6
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/pl-PL.json

@ -1,6 +0,0 @@
{
"culture": "pl-PL",
"texts": {
}
}

6
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/pt-BR.json

@ -1,6 +0,0 @@
{
"culture": "pt-BR",
"texts": {
}
}

6
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/sk.json

@ -1,6 +0,0 @@
{
"culture": "sk",
"texts": {
"SamplePageMessage": "Ukážka stránky pre modul WebApi"
}
}

6
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/sl.json

@ -1,6 +0,0 @@
{
"culture": "sl",
"texts": {
"MyAccount": "Moj račun"
}
}

7
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/tr.json

@ -1,7 +0,0 @@
{
"culture": "tr",
"texts": {
"MyAccount": "Hesabım",
"SamplePageMessage": "WebApi modulünden örnek bir sayfa"
}
}

6
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/vi.json

@ -1,6 +0,0 @@
{
"culture": "vi",
"texts": {
}
}

6
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain.Shared/Localization/WebApi/zh-Hant.json

@ -1,6 +0,0 @@
{
"culture": "zh-Hant",
"texts": {
"MyAccount": "我的賬戶"
}
}

86
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Parts/Part.cs

@ -88,59 +88,59 @@ namespace Win_in.Sfs.Scp.WebApi
[Display(Name = "分组")] [Display(Name = "分组")]
public string Group {get;set;} public string Group {get;set;}
///// <summary> /// <summary>
///// 颜色(Color) /// 颜色(Color)
///// </summary> /// </summary>
//[Display(Name = "颜色")] [Display(Name = "颜色")]
//public string Color {get;set;} public string Color {get;set;}
///// <summary> /// <summary>
///// 配置(Configuration) /// 配置(Configuration)
///// </summary> /// </summary>
//[Display(Name = "配置")] [Display(Name = "配置")]
//public string Configuration {get;set;} public string Configuration {get;set;}
///// <summary> /// <summary>
///// 项目(Project) /// 项目(Project)
///// </summary> /// </summary>
//[Display(Name = "项目")] [Display(Name = "项目")]
//public string Project {get;set;} public string Project {get;set;}
/// <summary> /// <summary>
/// 版本(version) /// 版本(version)
/// </summary> /// </summary>
//[Display(Name = "版本")] [Display(Name = "版本")]
//public string version {get;set;} public string version {get;set;}
/// <summary> /// <summary>
/// 工程变更通知单(Engineering change order) /// 工程变更通知单(Engineering change order)
/// </summary> /// </summary>
//[Display(Name = "工程变更通知单")] [Display(Name = "工程变更通知单")]
//public string Eco {get;set;} public string Eco {get;set;}
///// <summary> /// <summary>
///// 标包计量单位(Standard Pack Uom) /// 标包计量单位(Standard Pack Uom)
///// </summary> /// </summary>
//[Display(Name = "标包计量单位")] [Display(Name = "标包计量单位")]
//public string StdPackUom {get;set;} public string StdPackUom {get;set;}
///// <summary> /// <summary>
///// 标包数量(Standard Pack Qty) /// 标包数量(Standard Pack Qty)
///// </summary> /// </summary>
//[Display(Name = "标包数量")] [Display(Name = "标包数量")]
//public decimal StdPackQty {get;set;} public decimal StdPackQty {get;set;}
///// <summary> /// <summary>
///// 替代计量单位(Extra Pack UM) /// 替代计量单位(Extra Pack UM)
///// </summary> /// </summary>
//[Display(Name = "替代计量单位")] [Display(Name = "替代计量单位")]
//public string ExtPackUom {get;set;} public string ExtPackUom {get;set;}
///// <summary> /// <summary>
///// 替代包装数量(Extra Pack Qty) /// 替代包装数量(Extra Pack Qty)
///// </summary> /// </summary>
//[Display(Name = "替代包装数量")] [Display(Name = "替代包装数量")]
//public decimal ExtPackQty {get;set;} public decimal ExtPackQty {get;set;}
/// <summary> /// <summary>
/// 地点(Site) /// 地点(Site)

2
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Suppliers/ISupplierPartRepository.cs → ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/IPurchaseOrderRepository.cs

@ -3,7 +3,7 @@ using Volo.Abp.Domain.Repositories;
namespace Win_in.Sfs.Scp.WebApi namespace Win_in.Sfs.Scp.WebApi
{ {
public interface ISupplierPartRepository : IRepository<SupplierPart, Guid> public interface IPurchaseOrderRepository : IRepository<PurchaseOrder, Guid>
{ {
} }

20
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/POs/PO.cs → ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/PurchaseOrder.cs

@ -12,7 +12,7 @@ namespace Win_in.Sfs.Scp.WebApi
/// <summary> /// <summary>
/// 采购订单主表 /// 采购订单主表
/// </summary> /// </summary>
public class PO: EntityBase<Guid> public class PurchaseOrder: EntityBase<Guid>
{ {
/// <summary> /// <summary>
/// 订单号(PoNumber) /// 订单号(PoNumber)
@ -93,25 +93,25 @@ namespace Win_in.Sfs.Scp.WebApi
public string Remark { set; get; } public string Remark { set; get; }
public virtual List<PODetail> PODetails { get; set; } public virtual List<PurchaseOrderDetail> PODetails { get; set; }
#region details handler #region details handler
public virtual void AddDetail(IGuidGenerator guidGenerator, PODetail detail) public virtual void AddDetail(IGuidGenerator guidGenerator, PurchaseOrderDetail detail)
{ {
Check.NotNull(guidGenerator, nameof(guidGenerator)); Check.NotNull(guidGenerator, nameof(guidGenerator));
Check.NotNull(detail, nameof(PODetail)); Check.NotNull(detail, nameof(PurchaseOrderDetail));
if (IsInDetails(detail.PoNumber,detail.PoLine)) if (IsInDetails(detail.PoNumber,detail.PoLine))
{ {
throw new Exception(detail.PoNumber+ detail.PoLine + "已经在明细中存在!"); throw new Exception(detail.PoNumber+ detail.PoLine + "已经在明细中存在!");
} }
PODetails.Add(new PODetail(guidGenerator.Create(),detail.PoNumber, detail.PoLine, detail.PartCode, detail.Uom, detail.OrderQty, detail.StdPackQty, PODetails.Add(new PurchaseOrderDetail(guidGenerator.Create(),detail.PoNumber, detail.PoLine, detail.PartCode, detail.Uom, detail.OrderQty, detail.StdPackQty,
detail.SupplierPackConvertRate, detail.IsConsignment, detail.LineStatus, detail.Remark)); detail.SupplierPackConvertRate, detail.IsConsignment, detail.LineStatus, detail.Remark));
} }
public virtual void AddDetails(IGuidGenerator guidGenerator, IEnumerable<PODetail> details) public virtual void AddDetails(IGuidGenerator guidGenerator, IEnumerable<PurchaseOrderDetail> details)
{ {
Check.NotNull(guidGenerator, nameof(guidGenerator)); Check.NotNull(guidGenerator, nameof(guidGenerator));
foreach (var detail in details) foreach (var detail in details)
@ -132,9 +132,9 @@ namespace Win_in.Sfs.Scp.WebApi
return PODetails.Any(di => di.Id == itemId); return PODetails.Any(di => di.Id == itemId);
} }
public virtual bool UpdateDetail(IGuidGenerator guidGenerator, PODetail detail) public virtual bool UpdateDetail(IGuidGenerator guidGenerator, PurchaseOrderDetail detail)
{ {
Check.NotNull(detail, nameof(PODetail)); Check.NotNull(detail, nameof(PurchaseOrderDetail));
var item = FindDetail(detail.Id); var item = FindDetail(detail.Id);
@ -144,7 +144,7 @@ namespace Win_in.Sfs.Scp.WebApi
} }
else else
{ {
Check.NotNull(item, nameof(PODetail)); Check.NotNull(item, nameof(PurchaseOrderDetail));
//item.Set(detail.Remark, detail.Enabled); //item.Set(detail.Remark, detail.Enabled);
@ -152,7 +152,7 @@ namespace Win_in.Sfs.Scp.WebApi
return true; return true;
} }
public virtual PODetail FindDetail(Guid itemId) public virtual PurchaseOrderDetail FindDetail(Guid itemId)
{ {
var item = PODetails.FirstOrDefault(p => p.Id == itemId); var item = PODetails.FirstOrDefault(p => p.Id == itemId);
return item; return item;

46
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/POs/PODetail.cs → ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/PurchaseOrders/PurchaseOrderDetail.cs

@ -8,7 +8,7 @@ namespace Win_in.Sfs.Scp.WebApi
/// <summary> /// <summary>
/// 采购订单明细 /// 采购订单明细
/// </summary> /// </summary>
public class PODetail: EntityDetailBase<Guid> public class PurchaseOrderDetail: EntityDetailBase<Guid>
{ {
/// <summary> /// <summary>
/// 订单号(PoNumber) /// 订单号(PoNumber)
@ -40,18 +40,18 @@ namespace Win_in.Sfs.Scp.WebApi
[Display(Name = "订单数量(OrderQty)")] [Display(Name = "订单数量(OrderQty)")]
public decimal? OrderQty { set; get; } public decimal? OrderQty { set; get; }
///// <summary> /// <summary>
///// 已关闭数量(Closed Qty) /// 已关闭数量(Closed Qty)
///// </summary> /// </summary>
//[Display(Name = "已关闭数量(Closed Qty)")] [Display(Name = "已关闭数量(Closed Qty)")]
//public decimal ClosedQty { get; set; } public decimal ClosedQty { get; set; }
///// <summary> /// <summary>
///// 标包计量单位(Standard Pack Uom) /// 标包计量单位(Standard Pack Uom)
///// </summary> /// </summary>
//[Display(Name = "标包计量单位(Standard Pack Uom)")] [Display(Name = "标包计量单位(Standard Pack Uom)")]
//public string StdPackUom { set; get; } public string StdPackUom { set; get; }
/// <summary> /// <summary>
/// 标包数量(Standard Pack Qty) /// 标包数量(Standard Pack Qty)
@ -59,17 +59,17 @@ namespace Win_in.Sfs.Scp.WebApi
[Display(Name = "标包数量(Standard Pack Qty)")] [Display(Name = "标包数量(Standard Pack Qty)")]
public decimal? StdPackQty { set; get; } public decimal? StdPackQty { set; get; }
///// <summary> /// <summary>
///// 供应商计量单位(SupplierPackUom) /// 供应商计量单位(SupplierPackUom)
///// </summary> /// </summary>
//[Display(Name = "供应商计量单位(SupplierPackUom)")] [Display(Name = "供应商计量单位(SupplierPackUom)")]
//public string SupplierPackUom { set; get; } public string SupplierPackUom { set; get; }
///// <summary> /// <summary>
///// 供应商包装数量(SupplierPackQty) /// 供应商包装数量(SupplierPackQty)
///// </summary> /// </summary>
//[Display(Name = "供应商包装数量(SupplierPackQty)")] [Display(Name = "供应商包装数量(SupplierPackQty)")]
//public decimal? SupplierPackQty { set; get; } public decimal? SupplierPackQty { set; get; }
/// <summary> /// <summary>
/// 供应商包装转换率(SupplierPackConvertRate) /// 供应商包装转换率(SupplierPackConvertRate)
@ -96,9 +96,9 @@ namespace Win_in.Sfs.Scp.WebApi
public string Remark { set; get; } public string Remark { set; get; }
public PODetail() { } public PurchaseOrderDetail() { }
public PODetail( public PurchaseOrderDetail(
Guid id , string poNumber, string poLine,string partCode, string uom, decimal? orderQty, decimal? stdPackQty, Guid id , string poNumber, string poLine,string partCode, string uom, decimal? orderQty, decimal? stdPackQty,
decimal? supplierPackConvertRate, bool isConsignment,int lineStatus,string remark) :base(id) decimal? supplierPackConvertRate, bool isConsignment,int lineStatus,string remark) :base(id)
{ {

2
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Settings/WebApiSettings.cs

@ -2,7 +2,7 @@
{ {
public static class WebApiSettings public static class WebApiSettings
{ {
public const string GroupName = "WebApi"; public const string GroupName = "ScpWebApi";
/* Add constants for setting names. Example: /* Add constants for setting names. Example:
* public const string MySettingName = GroupName + ".MySettingName"; * public const string MySettingName = GroupName + ".MySettingName";

2
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/POs/IPORepository.cs → ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Suppliers/ISupplierRepository.cs

@ -3,7 +3,7 @@ using Volo.Abp.Domain.Repositories;
namespace Win_in.Sfs.Scp.WebApi namespace Win_in.Sfs.Scp.WebApi
{ {
public interface IPORepository : IRepository<PO, Guid> public interface ISupplierRepository : IRepository<Supplier, Guid>
{ {
} }

12
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.Domain/Win_in.Sfs.Scp.WebApi.Domain.csproj

@ -7,6 +7,18 @@
<RootNamespace>Win_in.Sfs.Scp.WebApi</RootNamespace> <RootNamespace>Win_in.Sfs.Scp.WebApi</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Compile Remove="ASNs\**" />
<Compile Remove="Labels\**" />
<Compile Remove="SupplierParts\**" />
<EmbeddedResource Remove="ASNs\**" />
<EmbeddedResource Remove="Labels\**" />
<EmbeddedResource Remove="SupplierParts\**" />
<None Remove="ASNs\**" />
<None Remove="Labels\**" />
<None Remove="SupplierParts\**" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="4.4.2" /> <PackageReference Include="Volo.Abp.Ddd.Domain" Version="4.4.2" />
<ProjectReference Include="..\Win_in.Sfs.Scp.WebApi.Domain.Shared\Win_in.Sfs.Scp.WebApi.Domain.Shared.csproj" /> <ProjectReference Include="..\Win_in.Sfs.Scp.WebApi.Domain.Shared\Win_in.Sfs.Scp.WebApi.Domain.Shared.csproj" />

4
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/IWebApiDbContext.cs

@ -13,9 +13,7 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
DbSet<Part> Parts { get; set; } DbSet<Part> Parts { get; set; }
DbSet<Supplier> Suppliers { get; set; } DbSet<Supplier> Suppliers { get; set; }
DbSet<SupplierPart> SupplierParts { get; set; } DbSet<PurchaseOrder> PurchaseOrders { get; set; }
DbSet<PO> POs { get; set; }
DbSet<ASN> ASNs { get; set; }
DbSet<Receipt> Receipts { get; set; } DbSet<Receipt> Receipts { get; set; }
} }
} }

12
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/PartRepository.cs

@ -0,0 +1,12 @@
using System;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore;
public class PartRepository:EfCoreRepository<WebApiDbContext,Part,Guid> ,IPartRepository
{
public PartRepository(IDbContextProvider<WebApiDbContext> dbContextProvider) : base(dbContextProvider)
{
}
}

12
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/PurchaseOrderRepository.cs

@ -0,0 +1,12 @@
using System;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore;
public class PurchaseOrderRepository: EfCoreRepository<WebApiDbContext, PurchaseOrder, Guid>, IPurchaseOrderRepository
{
public PurchaseOrderRepository(IDbContextProvider<WebApiDbContext> dbContextProvider) : base(dbContextProvider)
{
}
}

12
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/ReceiptRepository.cs

@ -0,0 +1,12 @@
using System;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore;
public class ReceiptRepository: EfCoreRepository<WebApiDbContext, Receipt, Guid>, IReceiptRepository
{
public ReceiptRepository(IDbContextProvider<WebApiDbContext> dbContextProvider) : base(dbContextProvider)
{
}
}

12
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/SupplierRepository.cs

@ -0,0 +1,12 @@
using System;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore;
public class SupplierRepository: EfCoreRepository<WebApiDbContext, Supplier, Guid>, ISupplierRepository
{
public SupplierRepository(IDbContextProvider<WebApiDbContext> dbContextProvider) : base(dbContextProvider)
{
}
}

4
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/WebApiDbContext.cs

@ -14,9 +14,7 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
public virtual DbSet<Part> Parts { get; set; } public virtual DbSet<Part> Parts { get; set; }
public virtual DbSet<Supplier> Suppliers { get; set; } public virtual DbSet<Supplier> Suppliers { get; set; }
public virtual DbSet<SupplierPart> SupplierParts { get; set; } public virtual DbSet<PurchaseOrder> PurchaseOrders { get; set; }
public virtual DbSet<PO> POs { get; set; }
public virtual DbSet<ASN> ASNs { get; set; }
public virtual DbSet<Receipt> Receipts { get; set; } public virtual DbSet<Receipt> Receipts { get; set; }
public WebApiDbContext(DbContextOptions<WebApiDbContext> options) public WebApiDbContext(DbContextOptions<WebApiDbContext> options)

30
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/WebApiDbContextModelCreatingExtensions.cs

@ -43,13 +43,9 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
builder.ConfigurePart(options); builder.ConfigurePart(options);
builder.ConfigSuppliers(options); builder.ConfigSuppliers(options);
builder.ConfigSupplierPart(options);
builder.ConfigReceipt(options); builder.ConfigReceipt(options);
builder.ConfigPO(options); builder.ConfigPurchaseOrder(options);
builder.ConfigPODetail(options); builder.ConfigPurchaseOrderDetail(options);
builder.ConfigASN(options);
builder.ConfigASNDetail(options);
builder.ConfigLabel(options);
} }
/// <summary> /// <summary>
@ -82,8 +78,6 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
//b.Property(x => x.Color).HasMaxLength(64); //b.Property(x => x.Color).HasMaxLength(64);
//b.Property(x => x.Configuration).HasMaxLength(64); //b.Property(x => x.Configuration).HasMaxLength(64);
//b.Property(x => x.Project).HasMaxLength(64); //b.Property(x => x.Project).HasMaxLength(64);
b.Property(x => x.Version).HasMaxLength(64);
b.Property(x => x.SequenceNumber).HasMaxLength(64);
//b.Property(x => x.Eco).HasMaxLength(64); //b.Property(x => x.Eco).HasMaxLength(64);
//b.Property(x => x.StdPackUom).IsRequired().HasMaxLength(64); //b.Property(x => x.StdPackUom).IsRequired().HasMaxLength(64);
//b.Property(x => x.StdPackQty).IsRequired(); //b.Property(x => x.StdPackQty).IsRequired();
@ -125,13 +119,12 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
b.Property(q => q.Company).HasMaxLength(64); b.Property(q => q.Company).HasMaxLength(64);
b.Property(q => q.Remark).HasMaxLength(4096); b.Property(q => q.Remark).HasMaxLength(4096);
b.Property(x => x.Bank).HasMaxLength(64); b.Property(x => x.Bank).HasMaxLength(64);
b.Property(x => x.Version).HasMaxLength(64);
b.Property(x => x.SequenceNumber).HasMaxLength(64);
b.HasIndex(q => new {q.Code, q.Company}).IsUnique(); b.HasIndex(q => new {q.Code, q.Company}).IsUnique();
}); });
} }
/*
/// <summary> /// <summary>
/// 供应商零件 /// 供应商零件
/// </summary> /// </summary>
@ -156,6 +149,7 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
b.HasIndex(x => new { x.SupplierCode,x.PartCode,x.Company,x.Site }).IsUnique(); b.HasIndex(x => new { x.SupplierCode,x.PartCode,x.Company,x.Site }).IsUnique();
}); });
} }
*/
/// <summary> /// <summary>
/// 收货单与退货单明细 /// 收货单与退货单明细
@ -197,8 +191,6 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
//b.Property(q => q.SupplierPackQty).IsRequired(); //b.Property(q => q.SupplierPackQty).IsRequired();
b.Property(q => q.SupplierPackConvertRate).IsRequired(); b.Property(q => q.SupplierPackConvertRate).IsRequired();
b.Property(q => q.Remark).HasMaxLength(4096); b.Property(q => q.Remark).HasMaxLength(4096);
b.Property(x => x.Version).HasMaxLength(64);
b.Property(x => x.SequenceNumber).HasMaxLength(64);
b.HasIndex(x => new { x.RcNumber,x.PoLine,x.PartCode,x.Company,x.Site }).IsUnique(); b.HasIndex(x => new { x.RcNumber,x.PoLine,x.PartCode,x.Company,x.Site }).IsUnique();
}); });
@ -207,9 +199,9 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
/// <summary> /// <summary>
/// 采购订单主表 /// 采购订单主表
/// </summary> /// </summary>
private static void ConfigPO(this ModelBuilder builder, WebApiModelBuilderConfigurationOptions options) private static void ConfigPurchaseOrder(this ModelBuilder builder, WebApiModelBuilderConfigurationOptions options)
{ {
builder.Entity<PO>(b => builder.Entity<PurchaseOrder>(b =>
{ {
//Configure table & schema name //Configure table & schema name
b.ToTable(options.TablePrefix + "_PO", options.Schema); b.ToTable(options.TablePrefix + "_PO", options.Schema);
@ -223,15 +215,12 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
b.Property(q => q.IsConsignment).IsRequired(); b.Property(q => q.IsConsignment).IsRequired();
b.Property(q => q.OrderDate).IsRequired(); b.Property(q => q.OrderDate).IsRequired();
b.Property(q => q.DueDate).IsRequired(); b.Property(q => q.DueDate).IsRequired();
b.Property(q => q.Version).IsRequired().HasMaxLength(64);
b.Property(q => q.TaxRate).IsRequired(); b.Property(q => q.TaxRate).IsRequired();
b.Property(q => q.Site).IsRequired().HasMaxLength(64); b.Property(q => q.Site).IsRequired().HasMaxLength(64);
b.Property(q => q.Company).IsRequired().HasMaxLength(64); b.Property(q => q.Company).IsRequired().HasMaxLength(64);
b.Property(q => q.ContactName).HasMaxLength(64); b.Property(q => q.ContactName).HasMaxLength(64);
b.Property(q => q.ContactPhone).HasMaxLength(64); b.Property(q => q.ContactPhone).HasMaxLength(64);
b.Property(q => q.Remark).HasMaxLength(4096); b.Property(q => q.Remark).HasMaxLength(4096);
b.Property(x => x.Version).HasMaxLength(64);
b.Property(x => x.SequenceNumber).HasMaxLength(64);
b.HasMany(u => u.PODetails).WithOne().HasForeignKey(rd => rd.Id).OnDelete(DeleteBehavior.NoAction).IsRequired(); b.HasMany(u => u.PODetails).WithOne().HasForeignKey(rd => rd.Id).OnDelete(DeleteBehavior.NoAction).IsRequired();
@ -243,9 +232,9 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
/// <summary> /// <summary>
/// 采购订单明细表 /// 采购订单明细表
/// </summary> /// </summary>
private static void ConfigPODetail(this ModelBuilder builder, WebApiModelBuilderConfigurationOptions options) private static void ConfigPurchaseOrderDetail(this ModelBuilder builder, WebApiModelBuilderConfigurationOptions options)
{ {
builder.Entity<PODetail>(b => builder.Entity<PurchaseOrderDetail>(b =>
{ {
//Configure table & schema name //Configure table & schema name
b.ToTable(options.TablePrefix + "_PODetail", options.Schema); b.ToTable(options.TablePrefix + "_PODetail", options.Schema);
@ -265,13 +254,13 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
b.Property(q => q.IsConsignment).IsRequired(); b.Property(q => q.IsConsignment).IsRequired();
b.Property(q => q.LineStatus).IsRequired(); b.Property(q => q.LineStatus).IsRequired();
b.Property(q => q.Remark).HasMaxLength(4096); b.Property(q => q.Remark).HasMaxLength(4096);
b.Property(x => x.Version).HasMaxLength(64);
b.HasIndex(x => new { x.PoNumber,x.PoLine }).IsUnique(); b.HasIndex(x => new { x.PoNumber,x.PoLine }).IsUnique();
}); });
} }
/*
/// <summary> /// <summary>
/// 发货单主表 /// 发货单主表
/// </summary> /// </summary>
@ -383,6 +372,7 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
b.HasIndex(x => new { x.LabelCode,x.Company,x.Site }).IsUnique(); b.HasIndex(x => new { x.LabelCode,x.Company,x.Site }).IsUnique();
}); });
} }
*/
} }
} }

5
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.EntityFrameworkCore/EntityFrameworkCore/WebApiEntityFrameworkCoreModule.cs

@ -17,6 +17,11 @@ namespace Win_in.Sfs.Scp.WebApi.EntityFrameworkCore
/* Add custom repositories here. Example: /* Add custom repositories here. Example:
* options.AddRepository<Question, EfCoreQuestionRepository>(); * options.AddRepository<Question, EfCoreQuestionRepository>();
*/ */
options.AddRepository<Part, PartRepository>();
options.AddRepository<Supplier, SupplierRepository>();
options.AddRepository<Receipt, ReceiptRepository>();
options.AddRepository<PurchaseOrder, PurchaseOrderRepository>();
}); });
} }
} }

6
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi/WebApiHttpApiModule.cs

@ -30,6 +30,12 @@ namespace Win_in.Sfs.Scp.WebApi
.AddBaseTypes(typeof(AbpUiResource)); .AddBaseTypes(typeof(AbpUiResource));
}); });
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options
.ConventionalControllers
.Create(typeof(WebApiApplicationModule).Assembly);
});
} }
} }

1
ScpWebApiService/src/Win_in.Sfs.Scp.WebApi.HttpApi/Win_in.Sfs.Scp.WebApi.HttpApi.csproj

@ -14,6 +14,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.4.2" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.4.2" />
<ProjectReference Include="..\Win_in.Sfs.Scp.WebApi.Application.Contracts\Win_in.Sfs.Scp.WebApi.Application.Contracts.csproj" /> <ProjectReference Include="..\Win_in.Sfs.Scp.WebApi.Application.Contracts\Win_in.Sfs.Scp.WebApi.Application.Contracts.csproj" />
<ProjectReference Include="..\Win_in.Sfs.Scp.WebApi.Application\Win_in.Sfs.Scp.WebApi.Application.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

Loading…
Cancel
Save