贾荣国
3 years ago
47 changed files with 2397 additions and 395 deletions
@ -0,0 +1,12 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Domain.Repositories; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.Domain |
|||
{ |
|||
public interface ITbPoDetailRepository : IRepository<TB_PO_DETAIL>, ITransientDependency |
|||
{ |
|||
Task<TB_PO_DETAIL> UpsertAsync(TB_PO_DETAIL tbPoDetail); |
|||
|
|||
} |
|||
} |
@ -1,10 +1,12 @@ |
|||
using Volo.Abp.DependencyInjection; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Domain.Repositories; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.Domain |
|||
{ |
|||
public interface ITbPoRepository : IRepository<TB_PO>, ITransientDependency |
|||
{ |
|||
Task<TB_PO> UpsertAsync(TB_PO tbPo); |
|||
|
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Domain.Repositories; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.Domain |
|||
{ |
|||
public interface ITbReceiptDetailRepository : IRepository<TB_RECEIVE_DETAIL_QAD>, ITransientDependency |
|||
{ |
|||
Task<TB_RECEIVE_DETAIL_QAD> UpsertAsync(TB_RECEIVE_DETAIL_QAD taPart); |
|||
|
|||
} |
|||
} |
@ -1,10 +1,12 @@ |
|||
using Volo.Abp.DependencyInjection; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Domain.Repositories; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.Domain |
|||
{ |
|||
public interface ITbReceiptRepository : IRepository<TB_RECEIVE_QAD>, ITransientDependency |
|||
{ |
|||
Task<TB_RECEIVE_QAD> UpsertAsync(TB_RECEIVE_QAD taPart); |
|||
|
|||
} |
|||
} |
@ -1,10 +0,0 @@ |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Domain.Repositories; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.Domain |
|||
{ |
|||
public interface ITbRejectRepository : IRepository<TB_REJECT>, ITransientDependency |
|||
{ |
|||
|
|||
} |
|||
} |
@ -1,40 +0,0 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.Domain |
|||
{ |
|||
public class TB_REJECT:Entity |
|||
{ |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
[Key] |
|||
public long UID { get; set; } |
|||
[StringLength(50)] |
|||
public string RjctBillNum { get; set; } |
|||
[StringLength(50)] |
|||
public string PoBillNum { get; set; } |
|||
[StringLength(50)] |
|||
public string AsnBillNum { get; set; } |
|||
[StringLength(50)] |
|||
public string Site { get; set; } |
|||
[StringLength(50)] |
|||
public string VendId { get; set; } |
|||
public DateTime ShipTime { get; set; } |
|||
public int State { get; set; } |
|||
[StringLength(50)] |
|||
public string Remark { get; set; } |
|||
public DateTime CreateTime { get; set; } |
|||
[StringLength(50)] |
|||
public string CreateUser { get; set; } |
|||
public bool IsDeleted { get; set; } |
|||
public Guid GUID { get; set; } |
|||
[StringLength(50)] |
|||
public string OperName { get; set; } |
|||
|
|||
public override object[] GetKeys() |
|||
{ |
|||
return new object[] { UID }; |
|||
} |
|||
} |
|||
} |
@ -1,31 +0,0 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.Domain |
|||
{ |
|||
public class TB_REJECT_DETAIL |
|||
{ |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
[Key] |
|||
public long UID { get; set; } |
|||
[StringLength(50)] |
|||
public string RjctBillNum { get; set; } |
|||
[StringLength(50)] |
|||
public string PoBillNum { get; set; } |
|||
public int PoLine { get; set; } |
|||
[StringLength(50)] |
|||
public string PartCode { get; set; } |
|||
[StringLength(50)] |
|||
public string Batch { get; set; } |
|||
public decimal Qty { get; set; } |
|||
public int State { get; set; } |
|||
[StringLength(50)] |
|||
public string Remark { get; set; } |
|||
public DateTime CreateTime { get; set; } |
|||
[StringLength(50)] |
|||
public string CreateUser { get; set; } |
|||
public bool IsDeleted { get; set; } |
|||
public Guid GUID { get; set; } |
|||
} |
|||
} |
@ -1,10 +1,11 @@ |
|||
using Volo.Abp.DependencyInjection; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Domain.Repositories; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.Domain |
|||
{ |
|||
public interface ITaVenderRepository : IRepository<TA_VENDER>, ITransientDependency |
|||
{ |
|||
|
|||
Task<TA_VENDER> UpsertAsync(TA_VENDER taVender); |
|||
} |
|||
} |
@ -0,0 +1,651 @@ |
|||
// <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.v1.EntityFrameworkCore; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore.Migrations |
|||
{ |
|||
[DbContext(typeof(V1ScpDbContext))] |
|||
[Migration("20220126072541_Init")] |
|||
partial class Init |
|||
{ |
|||
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.13") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("Win_in.Sfs.Scp.v1.Domain.TA_PART", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint") |
|||
.HasColumnName("UID") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b.Property<string>("Configuration") |
|||
.HasMaxLength(100) |
|||
.HasColumnType("nvarchar(100)"); |
|||
|
|||
b.Property<string>("ErpPartCode") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<bool?>("Ischeck") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("PalletSize") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("PartCode") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("PartDesc1") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<string>("PartDesc2") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<string>("PartGroup") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("ProjectId") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Qlevel") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("ReceivePort") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Remark") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<string>("Site") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("State") |
|||
.IsRequired() |
|||
.HasMaxLength(10) |
|||
.HasColumnType("nvarchar(10)"); |
|||
|
|||
b.Property<string>("Unit") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("ValidityDays") |
|||
.HasColumnType("int"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Site", "PartCode") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("TA_PART"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Win_in.Sfs.Scp.v1.Domain.TA_VENDER", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint") |
|||
.HasColumnName("UID") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b.Property<string>("Address") |
|||
.HasMaxLength(200) |
|||
.HasColumnType("nvarchar(200)"); |
|||
|
|||
b.Property<string>("City") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Contacter") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Country") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Currency") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Email") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Fax") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Phone") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal?>("Quota") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<int?>("ReceiveTimeScope") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("Remark") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<string>("Site") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("State") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<decimal?>("Tax") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("VendAbbCode") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("VendId") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("VendName") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("VendType") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("ZipCode") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Site", "VendId") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("TA_VENDER"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Win_in.Sfs.Scp.v1.Domain.TB_PO", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint") |
|||
.HasColumnName("UID") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b.Property<DateTime?>("BeginTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("Buyer") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("BuyerPhone") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Contacter") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<DateTime>("CreateTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("CreateUser") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<DateTime?>("EndTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("ErpBillNum") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Extend1") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend2") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend3") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<Guid>("GUID") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<int?>("ModType") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("PoBillNum") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Remark") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<string>("Site") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("State") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("SubSite") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("UpdateInfo") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<DateTime?>("UpdateTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("UpdateUser") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("VendId") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Site", "PoBillNum") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("TB_PO"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Win_in.Sfs.Scp.v1.Domain.TB_PO_DETAIL", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint") |
|||
.HasColumnName("UID") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b.Property<DateTime?>("BeginTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<DateTime>("CreateTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("CreateUser") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Currency") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("DockCode") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<DateTime?>("EndTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("Extend1") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend2") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend3") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<Guid>("GUID") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("LocUnit") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal>("PackQty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("PartCode") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal>("PlanQty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("PoBillNum") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("PoLine") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("PoUnit") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal>("Price") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<decimal>("ReceivedQty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("RejectQty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Remark") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<decimal>("ShippedQty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("Site") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("State") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("SubSite") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal?>("TempQty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<decimal>("UnConv") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("UpdateInfo") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<DateTime?>("UpdateTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("UpdateUser") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Site", "PoBillNum", "PoLine") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("TB_PO_DETAIL"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Win_in.Sfs.Scp.v1.Domain.TB_RECEIVE_DETAIL_QAD", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint") |
|||
.HasColumnName("UID") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b.Property<string>("Batch") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("BillType") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<DateTime>("CreateTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("CreateUser") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal?>("CurAmt") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("DockCode") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("ErpRecvBillNum") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Extend1") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend2") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend3") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<Guid>("GUID") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("LocUnit") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("PartCode") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("PoBillNum") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("PoLine") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("PoUnit") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal?>("PurCost") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<decimal>("Qty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<decimal?>("Rate") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("RecvBillNum") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Remark") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<string>("Site") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("State") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<decimal?>("StdCost") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("SubSite") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Tax") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("VendBatch") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Site", "ErpRecvBillNum", "PartCode") |
|||
.IsUnique() |
|||
.HasFilter("[PartCode] IS NOT NULL"); |
|||
|
|||
b.ToTable("TB_RECEIVE_DETAIL_QAD"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Win_in.Sfs.Scp.v1.Domain.TB_RECEIVE_QAD", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint") |
|||
.HasColumnName("UID") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b.Property<string>("AsnBillNum") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("BillType") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<DateTime>("CreateTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("CreateUser") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("ErpRecvBillNum") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Extend1") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend2") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend3") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<Guid>("GUID") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("OperName") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("PoBillNum") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("RecvBillNum") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Remark") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<DateTime>("ShipTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("Site") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("State") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("SubSite") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Tax") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("VendId") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Site", "ErpRecvBillNum") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("TB_RECEIVE_QAD"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,278 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore.Migrations |
|||
{ |
|||
public partial class Init : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "TA_PART", |
|||
columns: table => new |
|||
{ |
|||
UID = table.Column<long>(type: "bigint", nullable: false) |
|||
.Annotation("SqlServer:Identity", "1, 1"), |
|||
PartCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
ErpPartCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
PartDesc1 = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true), |
|||
PartDesc2 = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true), |
|||
ProjectId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Unit = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
PartGroup = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
State = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false), |
|||
Configuration = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true), |
|||
ValidityDays = table.Column<int>(type: "int", nullable: false), |
|||
ReceivePort = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
PalletSize = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true), |
|||
Site = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
Qlevel = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Ischeck = table.Column<bool>(type: "bit", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_TA_PART", x => x.UID); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "TA_VENDER", |
|||
columns: table => new |
|||
{ |
|||
UID = table.Column<long>(type: "bigint", nullable: false) |
|||
.Annotation("SqlServer:Identity", "1, 1"), |
|||
VendId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
VendName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
VendAbbCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
VendType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Country = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
City = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Currency = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Address = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true), |
|||
ZipCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Contacter = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Phone = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Fax = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Email = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
State = table.Column<int>(type: "int", nullable: false), |
|||
Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true), |
|||
Tax = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: true), |
|||
Site = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
ReceiveTimeScope = table.Column<int>(type: "int", nullable: true), |
|||
Quota = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_TA_VENDER", x => x.UID); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "TB_PO", |
|||
columns: table => new |
|||
{ |
|||
UID = table.Column<long>(type: "bigint", nullable: false) |
|||
.Annotation("SqlServer:Identity", "1, 1"), |
|||
PoBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
ErpBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
VendId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
ModType = table.Column<int>(type: "int", nullable: true), |
|||
Contacter = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Site = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
Buyer = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
BuyerPhone = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
State = table.Column<int>(type: "int", nullable: false), |
|||
Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true), |
|||
BeginTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
EndTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
Extend1 = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Extend2 = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Extend3 = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
SubSite = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreateUser = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
UpdateUser = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
UpdateInfo = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false), |
|||
GUID = table.Column<Guid>(type: "uniqueidentifier", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_TB_PO", x => x.UID); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "TB_PO_DETAIL", |
|||
columns: table => new |
|||
{ |
|||
UID = table.Column<long>(type: "bigint", nullable: false) |
|||
.Annotation("SqlServer:Identity", "1, 1"), |
|||
PoBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
PoLine = table.Column<int>(type: "int", nullable: false), |
|||
BeginTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
EndTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
PartCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
ShippedQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), |
|||
ReceivedQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), |
|||
RejectQty = table.Column<string>(type: "nvarchar(max)", precision: 18, scale: 6, nullable: true), |
|||
PoUnit = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
LocUnit = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
Price = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), |
|||
Currency = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
PlanQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), |
|||
PackQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), |
|||
TempQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: true), |
|||
State = table.Column<int>(type: "int", nullable: false), |
|||
Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true), |
|||
UnConv = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), |
|||
DockCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Extend1 = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Extend2 = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Extend3 = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
SubSite = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Site = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreateUser = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
UpdateUser = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
UpdateInfo = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false), |
|||
GUID = table.Column<Guid>(type: "uniqueidentifier", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_TB_PO_DETAIL", x => x.UID); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "TB_RECEIVE_DETAIL_QAD", |
|||
columns: table => new |
|||
{ |
|||
UID = table.Column<long>(type: "bigint", nullable: false) |
|||
.Annotation("SqlServer:Identity", "1, 1"), |
|||
RecvBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
PoBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
PoLine = table.Column<int>(type: "int", nullable: false), |
|||
PartCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Batch = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Qty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), |
|||
DockCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
State = table.Column<int>(type: "int", nullable: false), |
|||
Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true), |
|||
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreateUser = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false), |
|||
GUID = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
BillType = table.Column<int>(type: "int", nullable: false), |
|||
VendBatch = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
PoUnit = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
LocUnit = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
ErpRecvBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
PurCost = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: true), |
|||
StdCost = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: true), |
|||
Site = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
Rate = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: true), |
|||
CurAmt = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: true), |
|||
Tax = table.Column<string>(type: "nvarchar(max)", precision: 18, scale: 6, nullable: true), |
|||
Extend1 = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Extend2 = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Extend3 = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
SubSite = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_TB_RECEIVE_DETAIL_QAD", x => x.UID); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "TB_RECEIVE_QAD", |
|||
columns: table => new |
|||
{ |
|||
UID = table.Column<long>(type: "bigint", nullable: false) |
|||
.Annotation("SqlServer:Identity", "1, 1"), |
|||
RecvBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
PoBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
AsnBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Site = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
VendId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
ShipTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
State = table.Column<int>(type: "int", nullable: false), |
|||
Remark = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreateUser = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false), |
|||
GUID = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
OperName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
BillType = table.Column<int>(type: "int", nullable: false), |
|||
ErpRecvBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
Tax = table.Column<string>(type: "nvarchar(max)", precision: 18, scale: 6, nullable: true), |
|||
Extend1 = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Extend2 = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Extend3 = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
SubSite = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_TB_RECEIVE_QAD", x => x.UID); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_TA_PART_Site_PartCode", |
|||
table: "TA_PART", |
|||
columns: new[] { "Site", "PartCode" }, |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_TA_VENDER_Site_VendId", |
|||
table: "TA_VENDER", |
|||
columns: new[] { "Site", "VendId" }, |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_TB_PO_Site_PoBillNum", |
|||
table: "TB_PO", |
|||
columns: new[] { "Site", "PoBillNum" }, |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_TB_PO_DETAIL_Site_PoBillNum_PoLine", |
|||
table: "TB_PO_DETAIL", |
|||
columns: new[] { "Site", "PoBillNum", "PoLine" }, |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_TB_RECEIVE_DETAIL_QAD_Site_ErpRecvBillNum_PartCode", |
|||
table: "TB_RECEIVE_DETAIL_QAD", |
|||
columns: new[] { "Site", "ErpRecvBillNum", "PartCode" }, |
|||
unique: true, |
|||
filter: "[PartCode] IS NOT NULL"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_TB_RECEIVE_QAD_Site_ErpRecvBillNum", |
|||
table: "TB_RECEIVE_QAD", |
|||
columns: new[] { "Site", "ErpRecvBillNum" }, |
|||
unique: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "TA_PART"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "TA_VENDER"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "TB_PO"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "TB_PO_DETAIL"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "TB_RECEIVE_DETAIL_QAD"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "TB_RECEIVE_QAD"); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,649 @@ |
|||
// <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.v1.EntityFrameworkCore; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore.Migrations |
|||
{ |
|||
[DbContext(typeof(V1ScpDbContext))] |
|||
partial class V1ScpDbContextModelSnapshot : 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.13") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("Win_in.Sfs.Scp.v1.Domain.TA_PART", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint") |
|||
.HasColumnName("UID") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b.Property<string>("Configuration") |
|||
.HasMaxLength(100) |
|||
.HasColumnType("nvarchar(100)"); |
|||
|
|||
b.Property<string>("ErpPartCode") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<bool?>("Ischeck") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("PalletSize") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("PartCode") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("PartDesc1") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<string>("PartDesc2") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<string>("PartGroup") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("ProjectId") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Qlevel") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("ReceivePort") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Remark") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<string>("Site") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("State") |
|||
.IsRequired() |
|||
.HasMaxLength(10) |
|||
.HasColumnType("nvarchar(10)"); |
|||
|
|||
b.Property<string>("Unit") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("ValidityDays") |
|||
.HasColumnType("int"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Site", "PartCode") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("TA_PART"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Win_in.Sfs.Scp.v1.Domain.TA_VENDER", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint") |
|||
.HasColumnName("UID") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b.Property<string>("Address") |
|||
.HasMaxLength(200) |
|||
.HasColumnType("nvarchar(200)"); |
|||
|
|||
b.Property<string>("City") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Contacter") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Country") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Currency") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Email") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Fax") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Phone") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal?>("Quota") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<int?>("ReceiveTimeScope") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("Remark") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<string>("Site") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("State") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<decimal?>("Tax") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("VendAbbCode") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("VendId") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("VendName") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("VendType") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("ZipCode") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Site", "VendId") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("TA_VENDER"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Win_in.Sfs.Scp.v1.Domain.TB_PO", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint") |
|||
.HasColumnName("UID") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b.Property<DateTime?>("BeginTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("Buyer") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("BuyerPhone") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Contacter") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<DateTime>("CreateTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("CreateUser") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<DateTime?>("EndTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("ErpBillNum") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Extend1") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend2") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend3") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<Guid>("GUID") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<int?>("ModType") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("PoBillNum") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Remark") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<string>("Site") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("State") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("SubSite") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("UpdateInfo") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<DateTime?>("UpdateTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("UpdateUser") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("VendId") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Site", "PoBillNum") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("TB_PO"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Win_in.Sfs.Scp.v1.Domain.TB_PO_DETAIL", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint") |
|||
.HasColumnName("UID") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b.Property<DateTime?>("BeginTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<DateTime>("CreateTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("CreateUser") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Currency") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("DockCode") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<DateTime?>("EndTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("Extend1") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend2") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend3") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<Guid>("GUID") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("LocUnit") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal>("PackQty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("PartCode") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal>("PlanQty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("PoBillNum") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("PoLine") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("PoUnit") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal>("Price") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<decimal>("ReceivedQty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("RejectQty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Remark") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<decimal>("ShippedQty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("Site") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("State") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("SubSite") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal?>("TempQty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<decimal>("UnConv") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("UpdateInfo") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<DateTime?>("UpdateTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("UpdateUser") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Site", "PoBillNum", "PoLine") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("TB_PO_DETAIL"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Win_in.Sfs.Scp.v1.Domain.TB_RECEIVE_DETAIL_QAD", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint") |
|||
.HasColumnName("UID") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b.Property<string>("Batch") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("BillType") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<DateTime>("CreateTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("CreateUser") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal?>("CurAmt") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("DockCode") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("ErpRecvBillNum") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Extend1") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend2") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend3") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<Guid>("GUID") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("LocUnit") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("PartCode") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("PoBillNum") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("PoLine") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("PoUnit") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<decimal?>("PurCost") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<decimal>("Qty") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<decimal?>("Rate") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("RecvBillNum") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Remark") |
|||
.HasMaxLength(500) |
|||
.HasColumnType("nvarchar(500)"); |
|||
|
|||
b.Property<string>("Site") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("State") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<decimal?>("StdCost") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("decimal(18,6)"); |
|||
|
|||
b.Property<string>("SubSite") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Tax") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("VendBatch") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Site", "ErpRecvBillNum", "PartCode") |
|||
.IsUnique() |
|||
.HasFilter("[PartCode] IS NOT NULL"); |
|||
|
|||
b.ToTable("TB_RECEIVE_DETAIL_QAD"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Win_in.Sfs.Scp.v1.Domain.TB_RECEIVE_QAD", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint") |
|||
.HasColumnName("UID") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b.Property<string>("AsnBillNum") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("BillType") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<DateTime>("CreateTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("CreateUser") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("ErpRecvBillNum") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Extend1") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend2") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Extend3") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<Guid>("GUID") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("OperName") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("PoBillNum") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("RecvBillNum") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Remark") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<DateTime>("ShipTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("Site") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<int>("State") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("SubSite") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<string>("Tax") |
|||
.HasPrecision(18, 6) |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("VendId") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Site", "ErpRecvBillNum") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("TB_RECEIVE_QAD"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,46 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Win_in.Sfs.Scp.v1.Domain; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore |
|||
{ |
|||
public class TbPoDetailRepository : EfCoreRepository<V1ScpDbContext, TB_PO_DETAIL>, ITbPoDetailRepository |
|||
{ |
|||
public TbPoDetailRepository(IDbContextProvider<V1ScpDbContext> dbContextProvider) : base(dbContextProvider) |
|||
{ |
|||
} |
|||
|
|||
public async Task<TB_PO_DETAIL> UpsertAsync(TB_PO_DETAIL tbPoDetail) |
|||
{ |
|||
TB_PO_DETAIL ret; |
|||
var dbSet = await GetDbSetAsync(); |
|||
var current = await dbSet.FirstOrDefaultAsync(p => p.Site == tbPoDetail.Site |
|||
&& p.PoBillNum == tbPoDetail.PoBillNum |
|||
&& p.PoLine ==tbPoDetail.PoLine); |
|||
if (current == null) |
|||
{ |
|||
ret = await InsertAsync(tbPoDetail); |
|||
} |
|||
else |
|||
{ |
|||
|
|||
//使用直接赋值
|
|||
current.PoUnit = tbPoDetail.PoUnit; |
|||
current.LocUnit = tbPoDetail.LocUnit; |
|||
current.PlanQty = tbPoDetail.PlanQty; |
|||
current.PackQty = tbPoDetail.PackQty; |
|||
current.UnConv = tbPoDetail.UnConv; |
|||
current.State = tbPoDetail.State; |
|||
current.Remark = tbPoDetail.Remark; |
|||
current.UpdateTime = tbPoDetail.UpdateTime; |
|||
current.UpdateUser = tbPoDetail.UpdateUser; |
|||
|
|||
ret = await UpdateAsync(current); |
|||
} |
|||
|
|||
return ret; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Win_in.Sfs.Scp.v1.Domain; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore |
|||
{ |
|||
public class TbReceiptDetailRepository : EfCoreRepository<V1ScpDbContext, TB_RECEIVE_DETAIL_QAD>, ITbReceiptDetailRepository |
|||
{ |
|||
public TbReceiptDetailRepository(IDbContextProvider<V1ScpDbContext> dbContextProvider) : base(dbContextProvider) |
|||
{ |
|||
} |
|||
|
|||
public async Task<TB_RECEIVE_DETAIL_QAD> UpsertAsync(TB_RECEIVE_DETAIL_QAD tbReceiptDetail) |
|||
{ |
|||
TB_RECEIVE_DETAIL_QAD ret; |
|||
var dbSet = await GetDbSetAsync(); |
|||
var current = await dbSet.FirstOrDefaultAsync(p => p.Site == tbReceiptDetail.Site |
|||
&& p.ErpRecvBillNum == tbReceiptDetail.ErpRecvBillNum |
|||
&& p.PartCode == tbReceiptDetail.PartCode); |
|||
if (current == null) |
|||
{ |
|||
ret = await InsertAsync(tbReceiptDetail); |
|||
} |
|||
else |
|||
{ |
|||
|
|||
//使用直接赋值
|
|||
current.PoBillNum = tbReceiptDetail.PoBillNum; |
|||
current.PoLine = tbReceiptDetail.PoLine; |
|||
current.Batch = tbReceiptDetail.Batch; |
|||
current.Remark = tbReceiptDetail.Remark; |
|||
current.State = tbReceiptDetail.State; |
|||
current.BillType = tbReceiptDetail.BillType; |
|||
current.Qty = tbReceiptDetail.Qty; |
|||
current.DockCode = tbReceiptDetail.DockCode; |
|||
current.Remark = tbReceiptDetail.Remark; |
|||
current.BillType = tbReceiptDetail.BillType; |
|||
current.VendBatch = tbReceiptDetail.VendBatch; |
|||
current.PoUnit = tbReceiptDetail.PoUnit; |
|||
current.LocUnit = tbReceiptDetail.LocUnit; |
|||
current.Rate = tbReceiptDetail.Rate; |
|||
|
|||
ret = await UpdateAsync(current); |
|||
} |
|||
|
|||
return ret; |
|||
} |
|||
} |
|||
} |
@ -1,13 +0,0 @@ |
|||
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Win_in.Sfs.Scp.v1.Domain; |
|||
|
|||
namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore |
|||
{ |
|||
public class TbRejectRepository : EfCoreRepository<V1ScpDbContext, TB_REJECT>, ITbRejectRepository |
|||
{ |
|||
public TbRejectRepository(IDbContextProvider<V1ScpDbContext> dbContextProvider) : base(dbContextProvider) |
|||
{ |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue