using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using System.Collections.Generic; using System.Configuration; using wispro.sp.entity; namespace wispro.sp.api { public partial class spDbContext : DbContext { public spDbContext() { } public spDbContext(DbContextOptions options) : base(options) { } public virtual DbSet CalMonths { get; set; } public virtual DbSet Customers { get; set; } public virtual DbSet ItemStaffs { get; set; } public virtual DbSet PerformanceItems { get; set; } public virtual DbSet StaffGrades { get; set; } public virtual DbSet VerifyCoefficients { get; set; } public virtual DbSet Staffs { get; set; } public virtual DbSet Messages { get; set; } public virtual DbSet MessageReadRecords { get;set;} public virtual DbSet MessagePerformanceItems { get; set; } public virtual DbSet AttachFiles { get; set; } public virtual DbSet BasePointRules { get; set; } public virtual DbSet InputFields { get; set; } public virtual DbSet InputFieldValues { get; set; } public virtual DbSet AppealTypes { get; set; } public virtual DbSet AppealRecords { get; set; } public virtual DbSet SelectValues { get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (!optionsBuilder.IsConfigured) { optionsBuilder.UseSqlServer(utility.ConfigHelper.GetSectionValue("ConnectionStrings:DefaultConnect"));// "Data Source=(local);Initial Catalog=spDB;User ID=sa;Password=Lqftiu807005");// Configuration.GetConnectionString("DefaultConnect")); //ConfigurationManager.AppSettings["ValidAudience"] } } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(entity=> { entity.ToTable("BasePointRule"); entity.Property(e => e.PointExpress).HasMaxLength(100); entity.Property(e => e.Rule).HasMaxLength(1000); entity.Property(e => e.Type).HasMaxLength(20); }); modelBuilder.Entity(entity => { entity.ToTable("CalMonth"); entity.Property(e => e.Year).HasColumnName("year"); entity.Property(e => e.Month).HasColumnName("month"); entity.Property(e => e.Status).HasColumnName("status"); } ) ; modelBuilder.Entity(entity => { entity.ToTable("Customer"); entity.Property(e => e.Address).HasMaxLength(500); entity.Property(e => e.ContactMan).HasMaxLength(50); entity.Property(e => e.Name) .IsRequired() .HasMaxLength(200); entity.Property(e => e.Phone).HasMaxLength(50); entity.HasOne(d => d.ResponseMan) .WithMany(p => p.Customers) .HasForeignKey(d => d.ResponseManId) .HasConstraintName("FK_Customer_Staff"); }); modelBuilder.Entity(entity => { entity.HasKey(e => new { e.ItemId, e.DoPersonId }); entity.ToTable("ItemStaff"); entity.Property(e => e.PerformancePoint);//.HasColumnType("numeric(18, 2)"); entity.HasOne(d => d.DoPerson) .WithMany(p => p.ItemStaffs) .HasForeignKey(d => d.DoPersonId) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FK_ItemStaff_Staff"); entity.HasOne(d => d.Item) .WithMany(p => p.ItemStaffs) .HasForeignKey(d => d.ItemId) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FK_ItemStaff_PerformanceItem"); }); modelBuilder.Entity(entity => { entity.ToTable("PerformanceItem"); entity.Property(e => e.ApplicationName).HasMaxLength(200); entity.Property(e => e.ApplicationType).HasMaxLength(50); entity.Property(e => e.BasePoint).HasColumnType("numeric(18, 2)"); entity.Property(e => e.BusinessType).HasMaxLength(50); entity.Property(e => e.CaseCoefficient).HasMaxLength(10); entity.Property(e => e.CaseName).HasMaxLength(500); entity.Property(e => e.CaseNo).HasMaxLength(50); entity.Property(e => e.CaseStage).HasMaxLength(50); entity.Property(e => e.CaseState).HasMaxLength(50); entity.Property(e => e.CaseType).HasMaxLength(50); entity.Property(e => e.EntrustingDate).HasColumnType("date"); entity.Property(e => e.CustomerLimitDate).HasColumnType("date"); entity.Property(e => e.DoItem).HasMaxLength(50); entity.Property(e => e.DoItemCoefficient).HasMaxLength(50); entity.Property(e => e.DoItemMemo).HasMaxLength(500); entity.Property(e => e.DoItemState).HasMaxLength(50); entity.Property(e => e.FinalizationDate).HasColumnType("date"); entity.Property(e => e.FinishedDate).HasColumnType("date"); entity.Property(e => e.FirstDraftDate).HasColumnType("date"); entity.Property(e => e.InternalDate).HasColumnType("date"); entity.Property(e => e.OverDueMemo).HasMaxLength(100); entity.Property(e => e.PreOastaffId).HasColumnName("PreOAStaffId"); entity.Property(e => e.ReturnDate).HasColumnType("date"); entity.HasOne(d => d.Customer) .WithMany(p => p.PerformanceItems) .HasForeignKey(d => d.CustomerId) .HasConstraintName("FK_PerformanceItem_Customer"); entity.HasOne(d => d.PreOastaff) .WithMany() .HasForeignKey(d => d.PreOastaffId) .HasConstraintName("FK_PerformanceItem_Staff"); entity.HasOne(d => d.Reviewer) .WithMany(p => p.ReviewerItems) .HasForeignKey(d => d.ReviewerId) .HasConstraintName("FK_PerformanceItem_Reviewer"); entity.HasOne(d => d.CalMonth) .WithMany(p => p.PerformanceItems) .HasForeignKey(d => d.CalMonthId) .HasConstraintName("FK_PerformanceItem_CalMonth"); }); modelBuilder.Entity(entity => { entity.ToTable("StaffGrade"); entity.Property(e => e.Coefficient);//.HasColumnType("numeric(18, 2)"); entity.Property(e => e.Grade) .IsRequired() .HasMaxLength(5) .IsFixedLength(true); }); modelBuilder.Entity(entity => { entity.HasKey(e => new { e.CheckerId, e.DoPersonId }); entity.ToTable("VerifyCoefficient"); entity.Property(e => e.Coefficient);//.HasColumnType("numeric(18, 2)"); entity.HasOne(d => d.Checker) .WithMany(p => p.VerifyCoefficientCheckers) .HasForeignKey(d => d.CheckerId) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FK_VerifyCoefficient_StaffGrade"); entity.HasOne(d => d.DoPerson) .WithMany(p => p.VerifyCoefficientDoPeople) .HasForeignKey(d => d.DoPersonId) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FK_VerifyCoefficient_StaffGrade1"); }); modelBuilder.Entity(entity => { entity.ToTable("Staff"); //entity.Property(e => e.Id).ValueGeneratedNever(); entity.Property(e => e.Account) .IsRequired() .HasMaxLength(50); entity.Property(e => e.Department).HasMaxLength(50); entity.Property(e => e.EntyDate).HasColumnType("date"); entity.Property(e => e.IsCalPerformsnce).HasColumnName("isCalPerformsnce"); entity.Property(e => e.Name) .IsRequired() .HasMaxLength(50); entity.Property(e => e.Password).IsRequired(); entity.Property(e => e.Status) .IsRequired() .HasMaxLength(25); entity.Property(e => e.WorkPlace).HasMaxLength(50); entity.HasOne(d => d.StaffGrade) .WithMany(p => p.Staff) .HasForeignKey(d => d.StaffGradeId) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FK_Staff_StaffGrade"); }); modelBuilder.Entity(entity => { //entity.HasKey(e => e.Id); entity.ToTable("Message"); entity.Property(e => e.Type); entity.Property(e => e.MessageInfo).HasMaxLength(500); entity.HasOne(d => d.From) .WithMany() .HasForeignKey(d => d.FromId) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FK_From_Staff"); }); modelBuilder.Entity(entity => { entity.HasKey(e => new { e.MessageId,e.StaffId}); entity.ToTable("MessageReadRecord"); entity.Property(e => e.isReaded); entity.HasOne(d => d.Staff) .WithMany() .HasForeignKey(d => d.StaffId) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FK_MessageReadRecord_Staff"); entity.HasOne(d => d.Message) .WithMany() .HasForeignKey(d => d.MessageId) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FK_MessageReadRecord_Message"); }); modelBuilder.Entity( entity => { entity.HasKey(e=> new { e.ItemId,e.MessageId}); entity.HasOne(d => d.Message) .WithMany(m => m.RelatedItem) .HasForeignKey(d => d.MessageId) .HasConstraintName("FK_MessagePerformanceItem_Message"); entity.HasOne(d => d.Item ) .WithMany() .HasForeignKey(d => d.ItemId) .HasConstraintName("FK_MessagePerformanceItem_Item"); }); modelBuilder.Entity(entity => { entity.ToTable("AttachFile"); entity.Property(e=>e.Name).HasMaxLength(200); entity.Property(e => e.SavePath).HasMaxLength(200); entity.HasOne(d => d.UploadUser) .WithMany() .HasForeignKey(d => d.UploadUserId) .HasConstraintName("FK_AttachFile_UpdateUser") .OnDelete(DeleteBehavior.NoAction); entity.HasOne(d => d.AppealRecord) .WithMany() .HasForeignKey(d => d.AppealRecordId) .HasConstraintName("FK_AttachFile_AppealRecord"); }); modelBuilder.Entity(entity => { entity.ToTable("AppealType"); entity.Property(e => e.Name).HasMaxLength(50); entity.Property(e => e.ReviewerExpress).HasMaxLength(500); entity.Property(e => e.CanDoExpress).HasMaxLength(500); }); modelBuilder.Entity(entity => { entity.ToTable("AppealRecord"); entity.Property(e => e.Reason).HasMaxLength(500); entity.HasOne(d => d.Creater) .WithMany() .HasForeignKey(d => d.CreaterId); entity.HasOne(d => d.Reviewer) .WithMany().OnDelete(DeleteBehavior.NoAction) .HasForeignKey(d => d.ReviewerId); entity.HasOne(d => d.Type) .WithMany() .OnDelete(DeleteBehavior.NoAction) .HasForeignKey(d => d.TypeId); }) ; modelBuilder.Entity(entity=> { entity.ToTable("InputField"); entity.Property(e=>e.FieldName).HasMaxLength(50); entity.Property(e => e.FieldType).HasMaxLength(50); entity.Property(e => e.MapObjectField).HasMaxLength(50); entity.HasOne(d => d.AppealType) .WithMany() .HasForeignKey(d=>d.AppealTypeId); //entity.HasKey(d=>new { d.AppealTypeId,d.AppealState}); }); modelBuilder.Entity(entity => { entity.ToTable("SelectValue"); entity.HasOne(d => d.InputField) .WithMany(s=>s.SelectValues) .HasForeignKey(d => d.InputFieldId); //entity.HasKey(d=>new { d.AppealTypeId,d.AppealState}); }); modelBuilder.Entity(entity => { entity.ToTable("InputFieldValue"); entity.Property(e => e.Value).HasMaxLength(500); entity.HasOne(d => d.InputField) .WithMany() .HasForeignKey(d => d.InputFieldId); entity.HasOne(d => d.AppealRecord) .WithMany() .HasForeignKey(d => d.AppealRecordId); //entity.HasKey(d=>new { d.AppealRecordId,d.InputFieldId}); }); modelBuilder.Entity().HasData( new StaffGrade[] { new StaffGrade() {Id=1, Grade = "S级", Coefficient = 1.2}, new StaffGrade() {Id=2, Grade = "A3级", Coefficient = 1.1}, new StaffGrade() {Id =3, Grade = "A2级", Coefficient = 1.1}, new StaffGrade() {Id=4, Grade = "A1级", Coefficient = 1.1}, new StaffGrade() {Id=5, Grade = "B3级", Coefficient = 1.0}, new StaffGrade() {Id=6, Grade = "B2级", Coefficient = 1.0}, new StaffGrade() {Id=7, Grade = "B1级", Coefficient = 0.9}, new StaffGrade() {Id=8, Grade = "C3级", Coefficient = 0.9}, new StaffGrade() {Id=9, Grade = "C2级", Coefficient = 0.7}, new StaffGrade() {Id= 10, Grade = "C1级", Coefficient = 0.7}, new StaffGrade() {Id=11, Grade = "D3级", Coefficient = 0.6}, new StaffGrade() {Id=12, Grade = "D2级", Coefficient = 0.6}, new StaffGrade() {Id=13, Grade = "D1级", Coefficient = 0.5}, new StaffGrade() {Id=14, Grade = "A级", Coefficient = 1.1}, new StaffGrade() {Id=15, Grade = "C级", Coefficient = 1.0}, new StaffGrade() {Id=16, Grade = "D级", Coefficient = 0.9} }); modelBuilder.Entity().HasData( new VerifyCoefficient[] { new VerifyCoefficient() { CheckerId = 1, DoPersonId =5, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 1, DoPersonId =6, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 1, DoPersonId =7, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 1, DoPersonId =8, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 1, DoPersonId =9, Coefficient =0.4}, new VerifyCoefficient() { CheckerId = 1, DoPersonId =10, Coefficient =0.4}, new VerifyCoefficient() { CheckerId = 1, DoPersonId =11, Coefficient =0.5}, new VerifyCoefficient() { CheckerId = 1, DoPersonId =12, Coefficient =0.5}, new VerifyCoefficient() { CheckerId = 1, DoPersonId =13, Coefficient =0.6}, new VerifyCoefficient() { CheckerId = 2, DoPersonId =5, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 2, DoPersonId =6, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 2, DoPersonId =7, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 2, DoPersonId =8, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 2, DoPersonId =9, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 2, DoPersonId =10, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 2, DoPersonId =11, Coefficient =0.4}, new VerifyCoefficient() { CheckerId = 2, DoPersonId =12, Coefficient =0.4}, new VerifyCoefficient() { CheckerId = 2, DoPersonId =13, Coefficient =0.5}, new VerifyCoefficient() { CheckerId = 3, DoPersonId =5, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 3, DoPersonId =6, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 3, DoPersonId =7, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 3, DoPersonId =8, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 3, DoPersonId =9, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 3, DoPersonId =10, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 3, DoPersonId =11, Coefficient =0.4}, new VerifyCoefficient() { CheckerId = 3, DoPersonId =12, Coefficient =0.4}, new VerifyCoefficient() { CheckerId = 3, DoPersonId =13, Coefficient =0.5}, new VerifyCoefficient() { CheckerId = 4, DoPersonId =5, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 4, DoPersonId =6, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 4, DoPersonId =7, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 4, DoPersonId =8, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 4, DoPersonId =9, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 4, DoPersonId =10, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 4, DoPersonId =11, Coefficient =0.4}, new VerifyCoefficient() { CheckerId = 4, DoPersonId =12, Coefficient =0.4}, new VerifyCoefficient() { CheckerId = 4, DoPersonId =13, Coefficient =0.5}, new VerifyCoefficient() { CheckerId = 5, DoPersonId =5, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 5, DoPersonId =6, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 5, DoPersonId =7, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 5, DoPersonId =8, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 5, DoPersonId =9, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 5, DoPersonId =10, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 5, DoPersonId =11, Coefficient =0.4}, new VerifyCoefficient() { CheckerId = 5, DoPersonId =12, Coefficient =0.4}, new VerifyCoefficient() { CheckerId = 5, DoPersonId =13, Coefficient =0.5}, new VerifyCoefficient() { CheckerId = 6, DoPersonId =5, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 6, DoPersonId =6, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 6, DoPersonId =7, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 6, DoPersonId =8, Coefficient =0.2}, new VerifyCoefficient() { CheckerId = 6, DoPersonId =9, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 6, DoPersonId =10, Coefficient =0.3}, new VerifyCoefficient() { CheckerId = 6, DoPersonId =11, Coefficient =0.4}, new VerifyCoefficient() { CheckerId = 6, DoPersonId =12, Coefficient =0.4}, new VerifyCoefficient() { CheckerId = 6, DoPersonId =13, Coefficient =0.5} } ); BasePointRule[] rules = new BasePointRule[] { new BasePointRule(){Rule="p.DoItem==\"发明一次OA授权\" && p.ApplicationType==\"发明\"",PointExpress="0.2",Type="其它",Priority=1}, new BasePointRule(){Rule="p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"发文后客户取消申请\"",PointExpress="0.49",Type="新申请",Priority=2}, new BasePointRule(){Rule="p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"发文后客户取消申请\"",PointExpress="0.7",Type="新申请",Priority=3}, new BasePointRule(){Rule="p.CaseNo.StartsWith(\"PADE\")  && p.AgentFeedbackMemo==\"发文后客户原因取消申请,系统结案\"",PointExpress="1.33",Type="新申请",Priority=4}, new BasePointRule(){Rule="p.CaseNo.StartsWith(\"PAUS\")  && p.AgentFeedbackMemo==\"发文后客户原因取消申请,系统结案\"",PointExpress="1.26",Type="新申请",Priority=5}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"PCT首次英文案\"",PointExpress="1.8",Type="新申请",Priority=6}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"涉外实质改权\"",PointExpress="0.7",Type="新申请",Priority=7}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"首次中文案\"",PointExpress="1",Type="新申请",Priority=8}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"外-内首次申请\"",PointExpress="1.5",Type="新申请",Priority=9}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="0.7",Type="新申请",Priority=10}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="1",Type="新申请",Priority=11}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"欧洲案首次\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="1.8",Type="新申请",Priority=12}, new BasePointRule(){Rule="p.DoItem==\"新申请\"  && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")",PointExpress="1",Type="新申请",Priority=13}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")",PointExpress="1",Type="新申请",Priority=14}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\")",PointExpress="0.7",Type="新申请",Priority=15}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\") && p.Customer.Name.Contains(\"OPPO\")",PointExpress="1",Type="新申请",Priority=16}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PADE\")",PointExpress="1.9",Type="新申请",Priority=17}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PADE\")",PointExpress="1.9",Type="新申请",Priority=18}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAGB\")",PointExpress="1.8",Type="新申请",Priority=19}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAUS\")",PointExpress="1.8",Type="新申请",Priority=20}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAUS\") && p.Customer.Name.Contains(\"OPPO\")",PointExpress="1.7",Type="新申请",Priority=21}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PCTCN\")",PointExpress="1.5",Type="新申请",Priority=22}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"英-中\" && p.WordCount !=null",PointExpress="p.WordCount/1000*0.1",Type="其它",Priority=23}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"中-英\" && p.WordCount !=null",PointExpress="p.WordCount/1000*0.16",Type="其它",Priority=24}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"中-德\" && p.WordCount !=null",PointExpress="p.WordCount/1000*0.18",Type="其它",Priority=25}, new BasePointRule(){Rule="p.AgentFeedbackMemo==\"检索结案\"",PointExpress="0.2",Type="其它",Priority=26}, new BasePointRule(){Rule="p.AgentFeedbackMemo==\"撰写中客户取消申请\"",PointExpress="0",Type="其它",Priority=27}, new BasePointRule(){Rule="p.AgentFeedbackMemo==\"我方代交\"",PointExpress="0",Type="其它",Priority=28}, new BasePointRule(){Rule="p.AgentFeedbackMemo==\"我方转格式、复核\"",PointExpress="0.2",Type="其它",Priority=29}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"改权\"",PointExpress="0.3",Type="其它",Priority=30}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"改权+改说明书\"",PointExpress="0.5",Type="其它",Priority=31}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"转格式\"",PointExpress="0.1",Type="其它",Priority=32}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="0.1",Type="其它",Priority=33}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="0.1",Type="其它",Priority=34}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"台湾案转大陆案\"",PointExpress="0.2",Type="其它",Priority=35}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"大陆案转台湾案\"",PointExpress="0.2",Type="其它",Priority=36}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-分案\")",PointExpress="0.3",Type="其它",Priority=37}, new BasePointRule(){Rule="p.CaseNo.StartsWith(\"PAUS\") && (p.CaseNo.EndsWith(\"-同套\") || p.CaseNo.EndsWith(\"CA\") || p.CaseNo.EndsWith(\"CIP\") || p.CaseNo.EndsWith(\"分案\"))",PointExpress="0.5",Type="其它",Priority=38}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")",PointExpress="0.1",Type="其它",Priority=39}, new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="0.2",Type="其它",Priority=40}, new BasePointRule(){Rule="(p.ApplicationType==\"实用新型\" || p.ApplicationType==\"发明\") && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"客户不进行答辩\"",PointExpress="0",Type="其它",Priority=41}, new BasePointRule(){Rule="p.AgentFeedbackMemo==\"涉外OA不答辩,发报导函结案\"",PointExpress="0.1",Type="其它",Priority=42}, new BasePointRule(){Rule="p.ApplicationType==\"外观设计\"",PointExpress="0.2",Type="其它",Priority=43}, new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"内-外\"",PointExpress="0.7",Type="其它",Priority=44}, new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"外-内\"",PointExpress="0.5",Type="其它",Priority=45}, new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"内-外\"",PointExpress="0.3",Type="其它",Priority=46}, new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"外-内\"",PointExpress="0.2",Type="其它",Priority=47}, new BasePointRule(){Rule="p.AgentFeedbackMemo==\"检索结案\"",PointExpress="0.2",Type="其它",Priority=48}, new BasePointRule(){Rule="p.DoItem==\"内部检索\"",PointExpress="0",Type="其它",Priority=49}, new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAAU\")",PointExpress="0.2",Type="其它",Priority=50}, new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PACN\")",PointExpress="0",Type="其它",Priority=51}, new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PCTCN\")",PointExpress="0",Type="其它",Priority=52}, new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"WOCN\")",PointExpress="0",Type="其它",Priority=53}, new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PADE\")",PointExpress="0.2",Type="其它",Priority=54}, new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="0.2",Type="其它",Priority=55}, new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAGB\")",PointExpress="0.2",Type="其它",Priority=56}, new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAIN\")",PointExpress="0.2",Type="其它",Priority=57}, new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAUS\")",PointExpress="0.2",Type="其它",Priority=58}, new BasePointRule(){Rule="p.DoItem==\"Election Action\"",PointExpress="0.2",Type="其它",Priority=59}, new BasePointRule(){Rule="p.DoItem==\"OA答辩校核\"",PointExpress="0.2",Type="其它",Priority=60}, new BasePointRule(){Rule="p.DoItem==\"PPH\"",PointExpress="0.1",Type="其它",Priority=61}, new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PACN\")",PointExpress="0",Type="其它",Priority=62}, new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="0.2",Type="其它",Priority=63}, new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PAUS\")",PointExpress="0.2",Type="其它",Priority=64}, new BasePointRule(){Rule="p.DoItem==\"分案评估\"",PointExpress="0.1",Type="其它",Priority=65}, new BasePointRule(){Rule="p.DoItem==\"分案评估+分案\"",PointExpress="0.2",Type="其它",Priority=66}, new BasePointRule(){Rule="p.DoItem==\"绘图\"",PointExpress="0",Type="其它",Priority=67}, new BasePointRule(){Rule="p.DoItem==\"技术确认\"",PointExpress="0",Type="其它",Priority=68}, new BasePointRule(){Rule="p.DoItem==\"提交ids\" || p.DoItem==\"提交IDS\"",PointExpress="0.1",Type="其它",Priority=69}, new BasePointRule(){Rule="p.DoItem==\"询问放弃或复审\"",PointExpress="0",Type="其它",Priority=70}, new BasePointRule(){Rule="p.DoItem==\"知识点总结\"",PointExpress="0",Type="其它",Priority=71}, new BasePointRule(){Rule="p.DoItem==\"专利挖掘与布局\"",PointExpress="0",Type="其它",Priority=72}, new BasePointRule(){Rule="p.ApplicationType==\"外观设计\"",PointExpress="0.2",Type="其它",Priority=73}, new BasePointRule(){Rule="p.DoItem==\"请求优先审查\"",PointExpress="0",Type="其它",Priority=74}, new BasePointRule(){Rule="p.DoItem==\"翻译\" && p.AgentFeedbackMemo==\"英-中\"",PointExpress="p.WordCount/1000*0.1",Type="其它",Priority=75}, new BasePointRule(){Rule="p.DoItem==\"翻译\" && p.AgentFeedbackMemo==\"中-英\"",PointExpress="p.WordCount/1000*0.16",Type="其它",Priority=76}, new BasePointRule(){Rule="p.DoItem==\"翻译\" && p.AgentFeedbackMemo==\"中-德\"",PointExpress="p.WordCount/1000*0.18",Type="其它",Priority=77}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"实用新型\"  && p.AgentFeedbackMemo==\"不请款\"",PointExpress="0",Type="OA",Priority=78}, new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\" || p.CaseStage==\"六通\" || p.CaseStage==\"七通\" || p.CaseStage==\"八通\")",PointExpress="0",Type="OA",Priority=79}, new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && p.CaseStage==\"二通\" && p.AgentFeedbackMemo==\"请款\"",PointExpress="0.14",Type="OA",Priority=80}, new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && p.CaseStage==\"一通\" && p.AgentFeedbackMemo==\"请款\"",PointExpress="0.35",Type="OA",Priority=81}, new BasePointRule(){Rule="p.DoItem==\"请求复审\" && p.ApplicationType==\"实用新型\"  && p.AgentFeedbackMemo==\"请款\"",PointExpress="0.35",Type="OA",Priority=82}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"非实质\"  && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"",PointExpress="0.3",Type="OA",Priority=83}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"",PointExpress="0.5",Type="OA",Priority=84}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"",PointExpress="0.2",Type="OA",Priority=85}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"客户提供答辩点,撰写英文报导函\"",PointExpress="0.5",Type="OA",Priority=86}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"客户未提供答辩点,撰写英文报导函\"",PointExpress="0.8",Type="OA",Priority=87}, new BasePointRule(){Rule="p.DoItem==\"Advisory Action\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=88}, new BasePointRule(){Rule="p.DoItem==\"Advisory Action\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=89}, new BasePointRule(){Rule="p.DoItem==\"Final Action\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=90}, new BasePointRule(){Rule="p.DoItem==\"Final Action\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=91}, new BasePointRule(){Rule="p.DoItem==\"form 3\"",PointExpress="0.1",Type="OA",Priority=92}, new BasePointRule(){Rule="p.DoItem==\"form 3-8(2)\" ||  p.DoItem==\"Form 3-8(2)\"",PointExpress="0.1",Type="OA",Priority=93}, new BasePointRule(){Rule="p.DoItem==\"Non Final Action\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=94}, new BasePointRule(){Rule="p.DoItem==\"Non Final Action\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=95}, new BasePointRule(){Rule="p.DoItem==\"RCE\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=96}, new BasePointRule(){Rule="p.DoItem==\"RCE\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=97}, new BasePointRule(){Rule="p.DoItem==\"欧洲案答辩\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=98}, new BasePointRule(){Rule="p.DoItem==\"欧洲案答辩\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=99}, new BasePointRule(){Rule="p.DoItem==\"口审评估\" && p.DoItemCoefficient==\"非实质\"",PointExpress="0.2",Type="OA",Priority=100}, new BasePointRule(){Rule="p.DoItem==\"口审评估\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=101}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAUS\")",PointExpress="1.5",Type="OA",Priority=102}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAUS\")",PointExpress="0.2",Type="OA",Priority=103}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAAU\")",PointExpress="1.5",Type="OA",Priority=104}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PADE\")",PointExpress="1.6",Type="OA",Priority=105}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="1.5",Type="OA",Priority=106}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAGB\")",PointExpress="1.5",Type="OA",Priority=107}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAIN\")",PointExpress="1.5",Type="OA",Priority=108}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAAU\")",PointExpress="0.2",Type="OA",Priority=109}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PADE\")",PointExpress="0.3",Type="OA",Priority=110}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="0.2",Type="OA",Priority=111}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAGB\")",PointExpress="0.2",Type="OA",Priority=112}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAIN\")",PointExpress="0.2",Type="OA",Priority=113}, new BasePointRule(){Rule="p.DoItem==\"申復\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PATW\")",PointExpress="0.5",Type="OA",Priority=114}, new BasePointRule(){Rule="p.DoItem==\"申復\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PATW\")",PointExpress="0.2",Type="OA",Priority=115}, new BasePointRule(){Rule="p.DoItem==\"请求复审\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")",PointExpress="0.5",Type="OA",Priority=116}, new BasePointRule(){Rule="p.DoItem==\"意见陈述\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"复审\"",PointExpress="0.2",Type="OA",Priority=117}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"非实质\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"",PointExpress="0.3",Type="OA",Priority=118}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PACN\")  && p.CaseStage==\"一通\"",PointExpress="0.5",Type="OA",Priority=119}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"",PointExpress="0.2",Type="OA",Priority=120}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"非实质\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"",PointExpress="0.3",Type="OA",Priority=121}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PCTCN\")  && p.CaseStage==\"一通\"",PointExpress="0.5",Type="OA",Priority=122}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"",PointExpress="0.2",Type="OA",Priority=123}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"二通\"",PointExpress="0.2",Type="OA",Priority=124}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"二通\"",PointExpress="0.2",Type="OA",Priority=125}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") &&  (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")",PointExpress="0",Type="OA",Priority=126}, new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PCTCN\") &&  (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")",PointExpress="0",Type="OA",Priority=127}, new BasePointRule(){Rule="p.AgentFeedbackMemo==\"已核算绩效\"",PointExpress="0",Type="其它",Priority=128}, }; for(int i = 0; i < rules.Length ; i++) { rules[i].Id = i+1; } modelBuilder.Entity().HasData(rules); AppealType[] appealTypes = new AppealType[] { new AppealType(){Id=1, Name ="绩效点数分配比率",CanDoExpress = "p.ItemStaffs.Count()>1"}, new AppealType(){Id=2,Name ="案件系数复核",CanDoExpress = "p.DoItem==\"新申请\"",ReviewerExpress ="p.Reviewer"}, new AppealType(){Id=3,Name ="处理事项系数复核",CanDoExpress = "p.DoItem==\"新申请\"",ReviewerExpress ="p.Reviewer"}, new AppealType(){Id=4,Name ="案件缺漏申诉",CanDoExpress ="",ReviewerExpress ="p.Reviewer",Type =1} }; InputField[] inputFields = new InputField[] { new InputField(){Id=1,AppealTypeId =1,AppealState =0,FieldName ="分配比率", MapObjectField ="ItemStaffs.PerformancePoint",FieldType = typeof(double).ToString() }, new InputField(){Id=2,AppealTypeId =1,AppealState =0,FieldName ="处理人", MapObjectField ="ItemStaffs.DoPerson.Name" ,FieldType =typeof(string).ToString() }, new InputField(){Id=3,AppealTypeId =1,AppealState =0,FieldName ="原因",FieldType =typeof(string).ToString() }, new InputField(){Id=4,AppealTypeId =1,AppealState =1,FieldName ="备注",FieldType =typeof(string).ToString() }, new InputField(){Id=5,AppealTypeId =1,AppealState =1,FieldName ="审核意见",FieldType =typeof(string).ToString()}, new InputField(){Id=6,AppealTypeId =2,AppealState =0,FieldName ="案件系数", MapObjectField ="CaseCoefficient",FieldType = typeof(double).ToString() }, new InputField(){Id=9,AppealTypeId =2,AppealState =1,FieldName ="备注",FieldType =typeof(string).ToString() }, new InputField(){Id=10,AppealTypeId =2,AppealState =1,FieldName ="审核意见",FieldType =typeof(string).ToString()}, new InputField(){Id=11,AppealTypeId =3,AppealState =0,FieldName ="处理事项系数", MapObjectField ="DoItemCoefficient",FieldType = typeof(double).ToString() }, new InputField(){Id=12,AppealTypeId =3,AppealState =1,FieldName ="备注",FieldType =typeof(string).ToString() }, new InputField(){Id=13,AppealTypeId =3,AppealState =1,FieldName ="审核意见",FieldType =typeof(string).ToString()}, new InputField(){Id=14,AppealTypeId =4,AppealState =0,FieldName ="我方文号", FieldType = typeof(double).ToString() }, new InputField(){Id=15,AppealTypeId =4,AppealState =0,FieldName ="处理事项", FieldType = typeof(double).ToString() }, new InputField(){Id=16,AppealTypeId =4,AppealState =1,FieldName ="备注",FieldType =typeof(string).ToString() }, new InputField(){Id=17,AppealTypeId =4,AppealState =1,FieldName ="审核意见",FieldType =typeof(string).ToString()} }; List selectValues = new List() { new SelectValue(){Id =1, InputFieldId =5, Value ="同意" }, new SelectValue(){Id =2, InputFieldId =5, Value ="拒绝" }, new SelectValue(){Id =3, InputFieldId =10, Value ="同意" }, new SelectValue(){Id =4, InputFieldId =10, Value ="拒绝" }, new SelectValue(){Id =5, InputFieldId =13, Value ="同意" }, new SelectValue(){Id =6, InputFieldId =13, Value ="拒绝" }, new SelectValue(){Id =7, InputFieldId =17, Value ="同意" }, new SelectValue(){Id =8, InputFieldId =17, Value ="拒绝" } }; modelBuilder.Entity().HasData(appealTypes); modelBuilder.Entity().HasData(inputFields); modelBuilder.Entity().HasData(selectValues); OnModelCreatingPartial(modelBuilder); } partial void OnModelCreatingPartial(ModelBuilder modelBuilder); } }