Explorar el Código

添加代理人反馈字段选择项目的过滤

luocaiyang hace 3 años
padre
commit
154e1fab16

+ 1 - 1
wispro.sp.api/Controllers/AccountController.cs

@@ -32,7 +32,7 @@ namespace wispro.sp.api.Controllers
         {
             //添加验证代码
             spDbContext dbContext = new spDbContext();
-            Staff staff = dbContext.Staffs.Where<Staff>(s => s.Account == loginUser.Name && s.Password == loginUser.Password).FirstOrDefault();
+            Staff staff = dbContext.Staffs.Where<Staff>(s => s.Account == loginUser.Name && s.Password == utility.MD5Utility.GetMD5(loginUser.Password)).FirstOrDefault();
 
             if(staff != null)
             {

+ 10 - 1
wispro.sp.api/Controllers/CalMonthController.cs

@@ -21,7 +21,16 @@ namespace wispro.sp.api.Controllers
 
         public CalMonth GetHandlingMonth()
         {
-            return Context.CalMonths.Where<CalMonth>(c => c.Status != 4).FirstOrDefault();
+            CalMonth calMonth= Context.CalMonths.Where<CalMonth>(c => c.Status != 4).FirstOrDefault();
+
+            if(calMonth== null)
+            {
+                return null;
+            }
+            else
+            {
+                return calMonth;
+            }
         }
     }
 }

+ 0 - 866
wispro.sp.api/Migrations/20211021045210_CalMonth.Designer.cs

@@ -1,866 +0,0 @@
-// <auto-generated />
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using wispro.sp.api;
-
-namespace wispro.sp.api.Migrations
-{
-    [DbContext(typeof(spDbContext))]
-    [Migration("20211021045210_CalMonth")]
-    partial class CalMonth
-    {
-        protected override void BuildTargetModel(ModelBuilder modelBuilder)
-        {
-#pragma warning disable 612, 618
-            modelBuilder
-                .HasAnnotation("Relational:MaxIdentifierLength", 128)
-                .HasAnnotation("ProductVersion", "5.0.9")
-                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-            modelBuilder.Entity("wispro.sp.entity.AttachFile", b =>
-                {
-                    b.Property<Guid>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("uniqueidentifier");
-
-                    b.Property<string>("Name")
-                        .HasMaxLength(200)
-                        .HasColumnType("nvarchar(200)");
-
-                    b.Property<string>("SavePath")
-                        .HasMaxLength(200)
-                        .HasColumnType("nvarchar(200)");
-
-                    b.Property<int>("UploadUserId")
-                        .HasColumnType("int");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("UploadUserId");
-
-                    b.ToTable("AttachFile");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.BasePointRule", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<double>("Point")
-                        .HasColumnType("float");
-
-                    b.Property<string>("Rule")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("BasePointRules");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.CalMonth", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<int>("Month")
-                        .HasColumnType("int")
-                        .HasColumnName("month");
-
-                    b.Property<int>("Status")
-                        .HasColumnType("int")
-                        .HasColumnName("status");
-
-                    b.Property<int>("Year")
-                        .HasColumnType("int")
-                        .HasColumnName("year");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("CalMonth");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Customer", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<string>("Address")
-                        .HasMaxLength(500)
-                        .HasColumnType("nvarchar(500)");
-
-                    b.Property<string>("ContactMan")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("Name")
-                        .IsRequired()
-                        .HasMaxLength(200)
-                        .HasColumnType("nvarchar(200)");
-
-                    b.Property<string>("Phone")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<int?>("ResponseManId")
-                        .HasColumnType("int");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("ResponseManId");
-
-                    b.ToTable("Customer");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
-                {
-                    b.Property<int>("ItemId")
-                        .HasColumnType("int");
-
-                    b.Property<int>("DoPersonId")
-                        .HasColumnType("int");
-
-                    b.Property<double>("PerformancePoint")
-                        .HasColumnType("float");
-
-                    b.HasKey("ItemId", "DoPersonId");
-
-                    b.HasIndex("DoPersonId");
-
-                    b.ToTable("ItemStaff");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Message", b =>
-                {
-                    b.Property<Guid>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("uniqueidentifier");
-
-                    b.Property<int>("FromId")
-                        .HasColumnType("int");
-
-                    b.Property<string>("MessageInfo")
-                        .HasMaxLength(500)
-                        .HasColumnType("nvarchar(500)");
-
-                    b.Property<int>("Type")
-                        .HasColumnType("int");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("FromId");
-
-                    b.ToTable("Message");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.MessagePerformanceItem", b =>
-                {
-                    b.Property<int>("ItemId")
-                        .HasColumnType("int");
-
-                    b.Property<Guid>("MessageId")
-                        .HasColumnType("uniqueidentifier");
-
-                    b.HasKey("ItemId", "MessageId");
-
-                    b.HasIndex("MessageId");
-
-                    b.ToTable("MessagePerformanceItems");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.MessageReadRecord", b =>
-                {
-                    b.Property<Guid>("MessageId")
-                        .HasColumnType("uniqueidentifier");
-
-                    b.Property<int>("StaffId")
-                        .HasColumnType("int");
-
-                    b.Property<Guid?>("MessageId1")
-                        .HasColumnType("uniqueidentifier");
-
-                    b.Property<bool>("isReaded")
-                        .HasColumnType("bit");
-
-                    b.HasKey("MessageId", "StaffId");
-
-                    b.HasIndex("MessageId1");
-
-                    b.HasIndex("StaffId");
-
-                    b.ToTable("MessageReadRecord");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<string>("AgentFeedbackMemo")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("ApplicationName")
-                        .HasMaxLength(200)
-                        .HasColumnType("nvarchar(200)");
-
-                    b.Property<string>("ApplicationType")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<decimal?>("BasePoint")
-                        .HasColumnType("numeric(18,2)");
-
-                    b.Property<string>("BusinessType")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<int>("CalMonthId")
-                        .HasColumnType("int");
-
-                    b.Property<string>("CaseCoefficient")
-                        .HasMaxLength(10)
-                        .HasColumnType("nvarchar(10)");
-
-                    b.Property<string>("CaseMemo")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("CaseName")
-                        .HasMaxLength(500)
-                        .HasColumnType("nvarchar(500)");
-
-                    b.Property<string>("CaseNo")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("CaseStage")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("CaseState")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("CaseType")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<int?>("CustomerId")
-                        .HasColumnType("int");
-
-                    b.Property<DateTime?>("CustomerLimitDate")
-                        .HasColumnType("date");
-
-                    b.Property<string>("DoItem")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("DoItemCoefficient")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("DoItemMemo")
-                        .HasMaxLength(500)
-                        .HasColumnType("nvarchar(500)");
-
-                    b.Property<string>("DoItemState")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<DateTime?>("EntrustingDate")
-                        .HasColumnType("date");
-
-                    b.Property<DateTime?>("FinalizationDate")
-                        .HasColumnType("date");
-
-                    b.Property<DateTime?>("FinishedDate")
-                        .HasColumnType("date");
-
-                    b.Property<DateTime?>("FirstDraftDate")
-                        .HasColumnType("date");
-
-                    b.Property<DateTime?>("InternalDate")
-                        .HasColumnType("date");
-
-                    b.Property<string>("OverDueMemo")
-                        .HasMaxLength(100)
-                        .HasColumnType("nvarchar(100)");
-
-                    b.Property<int?>("PreOastaffId")
-                        .HasColumnType("int")
-                        .HasColumnName("PreOAStaffId");
-
-                    b.Property<DateTime?>("ReturnDate")
-                        .HasColumnType("date");
-
-                    b.Property<int?>("ReviewerId")
-                        .HasColumnType("int");
-
-                    b.Property<int?>("Status")
-                        .HasColumnType("int");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("CalMonthId");
-
-                    b.HasIndex("CustomerId");
-
-                    b.HasIndex("PreOastaffId");
-
-                    b.HasIndex("ReviewerId");
-
-                    b.ToTable("PerformanceItem");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Staff", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<string>("Account")
-                        .IsRequired()
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("Department")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<DateTime?>("EntyDate")
-                        .HasColumnType("date");
-
-                    b.Property<bool>("IsCalPerformsnce")
-                        .HasColumnType("bit")
-                        .HasColumnName("isCalPerformsnce");
-
-                    b.Property<string>("Mail")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("Memo")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("Name")
-                        .IsRequired()
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("Password")
-                        .IsRequired()
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<int>("StaffGradeId")
-                        .HasColumnType("int");
-
-                    b.Property<string>("Status")
-                        .IsRequired()
-                        .HasMaxLength(25)
-                        .HasColumnType("nvarchar(25)");
-
-                    b.Property<string>("WorkPlace")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("StaffGradeId");
-
-                    b.ToTable("Staff");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<double>("Coefficient")
-                        .HasColumnType("float");
-
-                    b.Property<string>("Grade")
-                        .IsRequired()
-                        .HasMaxLength(5)
-                        .HasColumnType("nchar(5)")
-                        .IsFixedLength(true);
-
-                    b.HasKey("Id");
-
-                    b.ToTable("StaffGrade");
-
-                    b.HasData(
-                        new
-                        {
-                            Id = 1,
-                            Coefficient = 1.2,
-                            Grade = "S级"
-                        },
-                        new
-                        {
-                            Id = 2,
-                            Coefficient = 1.1000000000000001,
-                            Grade = "A3级"
-                        },
-                        new
-                        {
-                            Id = 3,
-                            Coefficient = 1.1000000000000001,
-                            Grade = "A2级"
-                        },
-                        new
-                        {
-                            Id = 4,
-                            Coefficient = 1.1000000000000001,
-                            Grade = "A1级"
-                        },
-                        new
-                        {
-                            Id = 5,
-                            Coefficient = 1.0,
-                            Grade = "B3级"
-                        },
-                        new
-                        {
-                            Id = 6,
-                            Coefficient = 1.0,
-                            Grade = "B2级"
-                        },
-                        new
-                        {
-                            Id = 7,
-                            Coefficient = 0.90000000000000002,
-                            Grade = "B1级"
-                        },
-                        new
-                        {
-                            Id = 8,
-                            Coefficient = 0.90000000000000002,
-                            Grade = "C3级"
-                        },
-                        new
-                        {
-                            Id = 9,
-                            Coefficient = 0.69999999999999996,
-                            Grade = "C2级"
-                        },
-                        new
-                        {
-                            Id = 10,
-                            Coefficient = 0.69999999999999996,
-                            Grade = "C1级"
-                        },
-                        new
-                        {
-                            Id = 11,
-                            Coefficient = 0.59999999999999998,
-                            Grade = "D3级"
-                        },
-                        new
-                        {
-                            Id = 12,
-                            Coefficient = 0.59999999999999998,
-                            Grade = "D2级"
-                        },
-                        new
-                        {
-                            Id = 13,
-                            Coefficient = 0.5,
-                            Grade = "D1级"
-                        });
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
-                {
-                    b.Property<int>("CheckerId")
-                        .HasColumnType("int");
-
-                    b.Property<int>("DoPersonId")
-                        .HasColumnType("int");
-
-                    b.Property<double>("Coefficient")
-                        .HasColumnType("float");
-
-                    b.HasKey("CheckerId", "DoPersonId");
-
-                    b.HasIndex("DoPersonId");
-
-                    b.ToTable("VerifyCoefficient");
-
-                    b.HasData(
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 5,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 6,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 7,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 8,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 9,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 10,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 11,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 12,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 13,
-                            Coefficient = 0.5
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 5,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 6,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 7,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 8,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 9,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 10,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 11,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 12,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 13,
-                            Coefficient = 0.5
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 5,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 6,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 7,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 8,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 9,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 10,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 11,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 12,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 13,
-                            Coefficient = 0.5
-                        });
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.AttachFile", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Staff", "UploadUser")
-                        .WithMany()
-                        .HasForeignKey("UploadUserId")
-                        .HasConstraintName("FK_AttachFile_UpdateUser")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.Navigation("UploadUser");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Customer", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Staff", "ResponseMan")
-                        .WithMany("Customers")
-                        .HasForeignKey("ResponseManId")
-                        .HasConstraintName("FK_Customer_Staff");
-
-                    b.Navigation("ResponseMan");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Staff", "DoPerson")
-                        .WithMany("ItemStaffs")
-                        .HasForeignKey("DoPersonId")
-                        .HasConstraintName("FK_ItemStaff_Staff")
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.PerformanceItem", "Item")
-                        .WithMany("ItemStaffs")
-                        .HasForeignKey("ItemId")
-                        .HasConstraintName("FK_ItemStaff_PerformanceItem")
-                        .IsRequired();
-
-                    b.Navigation("DoPerson");
-
-                    b.Navigation("Item");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Message", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Staff", "From")
-                        .WithMany()
-                        .HasForeignKey("FromId")
-                        .HasConstraintName("FK_From_Staff")
-                        .IsRequired();
-
-                    b.Navigation("From");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.MessagePerformanceItem", b =>
-                {
-                    b.HasOne("wispro.sp.entity.PerformanceItem", "Item")
-                        .WithMany()
-                        .HasForeignKey("ItemId")
-                        .HasConstraintName("FK_MessagePerformanceItem_Item")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.Message", "Message")
-                        .WithMany("RelatedItem")
-                        .HasForeignKey("MessageId")
-                        .HasConstraintName("FK_MessagePerformanceItem_Message")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.Navigation("Item");
-
-                    b.Navigation("Message");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.MessageReadRecord", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Message", "Message")
-                        .WithMany()
-                        .HasForeignKey("MessageId")
-                        .HasConstraintName("FK_MessageReadRecord_Message")
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.Message", null)
-                        .WithMany("To")
-                        .HasForeignKey("MessageId1");
-
-                    b.HasOne("wispro.sp.entity.Staff", "Staff")
-                        .WithMany()
-                        .HasForeignKey("StaffId")
-                        .HasConstraintName("FK_MessageReadRecord_Staff")
-                        .IsRequired();
-
-                    b.Navigation("Message");
-
-                    b.Navigation("Staff");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
-                {
-                    b.HasOne("wispro.sp.entity.CalMonth", "CalMonth")
-                        .WithMany("PerformanceItems")
-                        .HasForeignKey("CalMonthId")
-                        .HasConstraintName("FK_PerformanceItem_CalMonth")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.Customer", "Customer")
-                        .WithMany("PerformanceItems")
-                        .HasForeignKey("CustomerId")
-                        .HasConstraintName("FK_PerformanceItem_Customer");
-
-                    b.HasOne("wispro.sp.entity.Staff", "PreOastaff")
-                        .WithMany()
-                        .HasForeignKey("PreOastaffId")
-                        .HasConstraintName("FK_PerformanceItem_Staff");
-
-                    b.HasOne("wispro.sp.entity.Staff", "Reviewer")
-                        .WithMany("ReviewerItems")
-                        .HasForeignKey("ReviewerId")
-                        .HasConstraintName("FK_PerformanceItem_Reviewer");
-
-                    b.Navigation("CalMonth");
-
-                    b.Navigation("Customer");
-
-                    b.Navigation("PreOastaff");
-
-                    b.Navigation("Reviewer");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Staff", b =>
-                {
-                    b.HasOne("wispro.sp.entity.StaffGrade", "StaffGrade")
-                        .WithMany("Staff")
-                        .HasForeignKey("StaffGradeId")
-                        .HasConstraintName("FK_Staff_StaffGrade")
-                        .IsRequired();
-
-                    b.Navigation("StaffGrade");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
-                {
-                    b.HasOne("wispro.sp.entity.StaffGrade", "Checker")
-                        .WithMany("VerifyCoefficientCheckers")
-                        .HasForeignKey("CheckerId")
-                        .HasConstraintName("FK_VerifyCoefficient_StaffGrade")
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.StaffGrade", "DoPerson")
-                        .WithMany("VerifyCoefficientDoPeople")
-                        .HasForeignKey("DoPersonId")
-                        .HasConstraintName("FK_VerifyCoefficient_StaffGrade1")
-                        .IsRequired();
-
-                    b.Navigation("Checker");
-
-                    b.Navigation("DoPerson");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.CalMonth", b =>
-                {
-                    b.Navigation("PerformanceItems");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Customer", b =>
-                {
-                    b.Navigation("PerformanceItems");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Message", b =>
-                {
-                    b.Navigation("RelatedItem");
-
-                    b.Navigation("To");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
-                {
-                    b.Navigation("ItemStaffs");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Staff", b =>
-                {
-                    b.Navigation("Customers");
-
-                    b.Navigation("ItemStaffs");
-
-                    b.Navigation("ReviewerItems");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
-                {
-                    b.Navigation("Staff");
-
-                    b.Navigation("VerifyCoefficientCheckers");
-
-                    b.Navigation("VerifyCoefficientDoPeople");
-                });
-#pragma warning restore 612, 618
-        }
-    }
-}

+ 0 - 475
wispro.sp.api/Migrations/20211021045210_CalMonth.cs

@@ -1,475 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace wispro.sp.api.Migrations
-{
-    public partial class CalMonth : Migration
-    {
-        protected override void Up(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.CreateTable(
-                name: "BasePointRules",
-                columns: table => new
-                {
-                    Id = table.Column<int>(type: "int", nullable: false)
-                        .Annotation("SqlServer:Identity", "1, 1"),
-                    Rule = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    Point = table.Column<double>(type: "float", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_BasePointRules", x => x.Id);
-                });
-
-            migrationBuilder.CreateTable(
-                name: "CalMonth",
-                columns: table => new
-                {
-                    Id = table.Column<int>(type: "int", nullable: false)
-                        .Annotation("SqlServer:Identity", "1, 1"),
-                    year = table.Column<int>(type: "int", nullable: false),
-                    month = table.Column<int>(type: "int", nullable: false),
-                    status = table.Column<int>(type: "int", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_CalMonth", x => x.Id);
-                });
-
-            migrationBuilder.CreateTable(
-                name: "StaffGrade",
-                columns: table => new
-                {
-                    Id = table.Column<int>(type: "int", nullable: false)
-                        .Annotation("SqlServer:Identity", "1, 1"),
-                    Grade = table.Column<string>(type: "nchar(5)", fixedLength: true, maxLength: 5, nullable: false),
-                    Coefficient = table.Column<double>(type: "float", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_StaffGrade", x => x.Id);
-                });
-
-            migrationBuilder.CreateTable(
-                name: "Staff",
-                columns: table => new
-                {
-                    Id = table.Column<int>(type: "int", nullable: false)
-                        .Annotation("SqlServer:Identity", "1, 1"),
-                    Account = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
-                    Password = table.Column<string>(type: "nvarchar(max)", nullable: false),
-                    Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
-                    Status = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: false),
-                    isCalPerformsnce = table.Column<bool>(type: "bit", nullable: false),
-                    StaffGradeId = table.Column<int>(type: "int", nullable: false),
-                    Department = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    WorkPlace = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    EntyDate = table.Column<DateTime>(type: "date", nullable: true),
-                    Mail = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    Memo = table.Column<string>(type: "nvarchar(max)", nullable: true)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_Staff", x => x.Id);
-                    table.ForeignKey(
-                        name: "FK_Staff_StaffGrade",
-                        column: x => x.StaffGradeId,
-                        principalTable: "StaffGrade",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                });
-
-            migrationBuilder.CreateTable(
-                name: "VerifyCoefficient",
-                columns: table => new
-                {
-                    CheckerId = table.Column<int>(type: "int", nullable: false),
-                    DoPersonId = table.Column<int>(type: "int", nullable: false),
-                    Coefficient = table.Column<double>(type: "float", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_VerifyCoefficient", x => new { x.CheckerId, x.DoPersonId });
-                    table.ForeignKey(
-                        name: "FK_VerifyCoefficient_StaffGrade",
-                        column: x => x.CheckerId,
-                        principalTable: "StaffGrade",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                    table.ForeignKey(
-                        name: "FK_VerifyCoefficient_StaffGrade1",
-                        column: x => x.DoPersonId,
-                        principalTable: "StaffGrade",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                });
-
-            migrationBuilder.CreateTable(
-                name: "AttachFile",
-                columns: table => new
-                {
-                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
-                    Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
-                    SavePath = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
-                    UploadUserId = table.Column<int>(type: "int", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_AttachFile", x => x.Id);
-                    table.ForeignKey(
-                        name: "FK_AttachFile_UpdateUser",
-                        column: x => x.UploadUserId,
-                        principalTable: "Staff",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Cascade);
-                });
-
-            migrationBuilder.CreateTable(
-                name: "Customer",
-                columns: table => new
-                {
-                    Id = table.Column<int>(type: "int", nullable: false)
-                        .Annotation("SqlServer:Identity", "1, 1"),
-                    Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
-                    ContactMan = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    Address = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
-                    Phone = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    ResponseManId = table.Column<int>(type: "int", nullable: true)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_Customer", x => x.Id);
-                    table.ForeignKey(
-                        name: "FK_Customer_Staff",
-                        column: x => x.ResponseManId,
-                        principalTable: "Staff",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                });
-
-            migrationBuilder.CreateTable(
-                name: "Message",
-                columns: table => new
-                {
-                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
-                    MessageInfo = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
-                    Type = table.Column<int>(type: "int", nullable: false),
-                    FromId = table.Column<int>(type: "int", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_Message", x => x.Id);
-                    table.ForeignKey(
-                        name: "FK_From_Staff",
-                        column: x => x.FromId,
-                        principalTable: "Staff",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                });
-
-            migrationBuilder.CreateTable(
-                name: "PerformanceItem",
-                columns: table => new
-                {
-                    Id = table.Column<int>(type: "int", nullable: false)
-                        .Annotation("SqlServer:Identity", "1, 1"),
-                    CaseNo = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    ApplicationType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    BusinessType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    AgentFeedbackMemo = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    DoItem = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    CaseStage = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    CaseCoefficient = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
-                    DoItemCoefficient = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    PreOAStaffId = table.Column<int>(type: "int", nullable: true),
-                    ReviewerId = table.Column<int>(type: "int", nullable: true),
-                    CustomerId = table.Column<int>(type: "int", nullable: true),
-                    ApplicationName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
-                    FinishedDate = table.Column<DateTime>(type: "date", nullable: true),
-                    FinalizationDate = table.Column<DateTime>(type: "date", nullable: true),
-                    ReturnDate = table.Column<DateTime>(type: "date", nullable: true),
-                    CaseType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    CaseState = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    DoItemMemo = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
-                    DoItemState = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
-                    CaseName = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
-                    CustomerLimitDate = table.Column<DateTime>(type: "date", nullable: true),
-                    EntrustingDate = table.Column<DateTime>(type: "date", nullable: true),
-                    InternalDate = table.Column<DateTime>(type: "date", nullable: true),
-                    FirstDraftDate = table.Column<DateTime>(type: "date", nullable: true),
-                    OverDueMemo = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
-                    BasePoint = table.Column<decimal>(type: "numeric(18,2)", nullable: true),
-                    Status = table.Column<int>(type: "int", nullable: true),
-                    CaseMemo = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CalMonthId = table.Column<int>(type: "int", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_PerformanceItem", x => x.Id);
-                    table.ForeignKey(
-                        name: "FK_PerformanceItem_CalMonth",
-                        column: x => x.CalMonthId,
-                        principalTable: "CalMonth",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Cascade);
-                    table.ForeignKey(
-                        name: "FK_PerformanceItem_Customer",
-                        column: x => x.CustomerId,
-                        principalTable: "Customer",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                    table.ForeignKey(
-                        name: "FK_PerformanceItem_Reviewer",
-                        column: x => x.ReviewerId,
-                        principalTable: "Staff",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                    table.ForeignKey(
-                        name: "FK_PerformanceItem_Staff",
-                        column: x => x.PreOAStaffId,
-                        principalTable: "Staff",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                });
-
-            migrationBuilder.CreateTable(
-                name: "MessageReadRecord",
-                columns: table => new
-                {
-                    MessageId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
-                    StaffId = table.Column<int>(type: "int", nullable: false),
-                    isReaded = table.Column<bool>(type: "bit", nullable: false),
-                    MessageId1 = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_MessageReadRecord", x => new { x.MessageId, x.StaffId });
-                    table.ForeignKey(
-                        name: "FK_MessageReadRecord_Message",
-                        column: x => x.MessageId,
-                        principalTable: "Message",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                    table.ForeignKey(
-                        name: "FK_MessageReadRecord_Message_MessageId1",
-                        column: x => x.MessageId1,
-                        principalTable: "Message",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                    table.ForeignKey(
-                        name: "FK_MessageReadRecord_Staff",
-                        column: x => x.StaffId,
-                        principalTable: "Staff",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                });
-
-            migrationBuilder.CreateTable(
-                name: "ItemStaff",
-                columns: table => new
-                {
-                    ItemId = table.Column<int>(type: "int", nullable: false),
-                    DoPersonId = table.Column<int>(type: "int", nullable: false),
-                    PerformancePoint = table.Column<double>(type: "float", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_ItemStaff", x => new { x.ItemId, x.DoPersonId });
-                    table.ForeignKey(
-                        name: "FK_ItemStaff_PerformanceItem",
-                        column: x => x.ItemId,
-                        principalTable: "PerformanceItem",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                    table.ForeignKey(
-                        name: "FK_ItemStaff_Staff",
-                        column: x => x.DoPersonId,
-                        principalTable: "Staff",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Restrict);
-                });
-
-            migrationBuilder.CreateTable(
-                name: "MessagePerformanceItems",
-                columns: table => new
-                {
-                    MessageId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
-                    ItemId = table.Column<int>(type: "int", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_MessagePerformanceItems", x => new { x.ItemId, x.MessageId });
-                    table.ForeignKey(
-                        name: "FK_MessagePerformanceItem_Item",
-                        column: x => x.ItemId,
-                        principalTable: "PerformanceItem",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Cascade);
-                    table.ForeignKey(
-                        name: "FK_MessagePerformanceItem_Message",
-                        column: x => x.MessageId,
-                        principalTable: "Message",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Cascade);
-                });
-
-            migrationBuilder.InsertData(
-                table: "StaffGrade",
-                columns: new[] { "Id", "Coefficient", "Grade" },
-                values: new object[,]
-                {
-                    { 1, 1.2, "S级" },
-                    { 2, 1.1000000000000001, "A3级" },
-                    { 3, 1.1000000000000001, "A2级" },
-                    { 4, 1.1000000000000001, "A1级" },
-                    { 5, 1.0, "B3级" },
-                    { 6, 1.0, "B2级" },
-                    { 7, 0.90000000000000002, "B1级" },
-                    { 8, 0.90000000000000002, "C3级" },
-                    { 9, 0.69999999999999996, "C2级" },
-                    { 10, 0.69999999999999996, "C1级" },
-                    { 11, 0.59999999999999998, "D3级" },
-                    { 12, 0.59999999999999998, "D2级" },
-                    { 13, 0.5, "D1级" }
-                });
-
-            migrationBuilder.InsertData(
-                table: "VerifyCoefficient",
-                columns: new[] { "CheckerId", "DoPersonId", "Coefficient" },
-                values: new object[,]
-                {
-                    { 2, 5, 0.20000000000000001 },
-                    { 2, 13, 0.5 },
-                    { 4, 12, 0.40000000000000002 },
-                    { 3, 12, 0.40000000000000002 },
-                    { 2, 12, 0.40000000000000002 },
-                    { 4, 11, 0.40000000000000002 },
-                    { 3, 11, 0.40000000000000002 },
-                    { 2, 11, 0.40000000000000002 },
-                    { 4, 10, 0.29999999999999999 },
-                    { 3, 10, 0.29999999999999999 },
-                    { 2, 10, 0.29999999999999999 },
-                    { 4, 9, 0.29999999999999999 },
-                    { 3, 13, 0.5 },
-                    { 3, 9, 0.29999999999999999 },
-                    { 4, 8, 0.20000000000000001 },
-                    { 3, 8, 0.20000000000000001 },
-                    { 2, 8, 0.20000000000000001 },
-                    { 4, 7, 0.20000000000000001 },
-                    { 3, 7, 0.20000000000000001 },
-                    { 2, 7, 0.20000000000000001 },
-                    { 4, 6, 0.20000000000000001 },
-                    { 3, 6, 0.20000000000000001 },
-                    { 2, 6, 0.20000000000000001 },
-                    { 4, 5, 0.20000000000000001 },
-                    { 3, 5, 0.20000000000000001 },
-                    { 2, 9, 0.29999999999999999 },
-                    { 4, 13, 0.5 }
-                });
-
-            migrationBuilder.CreateIndex(
-                name: "IX_AttachFile_UploadUserId",
-                table: "AttachFile",
-                column: "UploadUserId");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_Customer_ResponseManId",
-                table: "Customer",
-                column: "ResponseManId");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_ItemStaff_DoPersonId",
-                table: "ItemStaff",
-                column: "DoPersonId");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_Message_FromId",
-                table: "Message",
-                column: "FromId");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_MessagePerformanceItems_MessageId",
-                table: "MessagePerformanceItems",
-                column: "MessageId");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_MessageReadRecord_MessageId1",
-                table: "MessageReadRecord",
-                column: "MessageId1");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_MessageReadRecord_StaffId",
-                table: "MessageReadRecord",
-                column: "StaffId");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_PerformanceItem_CalMonthId",
-                table: "PerformanceItem",
-                column: "CalMonthId");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_PerformanceItem_CustomerId",
-                table: "PerformanceItem",
-                column: "CustomerId");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_PerformanceItem_PreOAStaffId",
-                table: "PerformanceItem",
-                column: "PreOAStaffId");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_PerformanceItem_ReviewerId",
-                table: "PerformanceItem",
-                column: "ReviewerId");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_Staff_StaffGradeId",
-                table: "Staff",
-                column: "StaffGradeId");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_VerifyCoefficient_DoPersonId",
-                table: "VerifyCoefficient",
-                column: "DoPersonId");
-        }
-
-        protected override void Down(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.DropTable(
-                name: "AttachFile");
-
-            migrationBuilder.DropTable(
-                name: "BasePointRules");
-
-            migrationBuilder.DropTable(
-                name: "ItemStaff");
-
-            migrationBuilder.DropTable(
-                name: "MessagePerformanceItems");
-
-            migrationBuilder.DropTable(
-                name: "MessageReadRecord");
-
-            migrationBuilder.DropTable(
-                name: "VerifyCoefficient");
-
-            migrationBuilder.DropTable(
-                name: "PerformanceItem");
-
-            migrationBuilder.DropTable(
-                name: "Message");
-
-            migrationBuilder.DropTable(
-                name: "CalMonth");
-
-            migrationBuilder.DropTable(
-                name: "Customer");
-
-            migrationBuilder.DropTable(
-                name: "Staff");
-
-            migrationBuilder.DropTable(
-                name: "StaffGrade");
-        }
-    }
-}

+ 0 - 878
wispro.sp.api/Migrations/20211022045200_basePointRule.Designer.cs

@@ -1,878 +0,0 @@
-// <auto-generated />
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using wispro.sp.api;
-
-namespace wispro.sp.api.Migrations
-{
-    [DbContext(typeof(spDbContext))]
-    [Migration("20211022045200_basePointRule")]
-    partial class basePointRule
-    {
-        protected override void BuildTargetModel(ModelBuilder modelBuilder)
-        {
-#pragma warning disable 612, 618
-            modelBuilder
-                .HasAnnotation("Relational:MaxIdentifierLength", 128)
-                .HasAnnotation("ProductVersion", "5.0.9")
-                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-            modelBuilder.Entity("wispro.sp.entity.AttachFile", b =>
-                {
-                    b.Property<Guid>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("uniqueidentifier");
-
-                    b.Property<string>("Name")
-                        .HasMaxLength(200)
-                        .HasColumnType("nvarchar(200)");
-
-                    b.Property<string>("SavePath")
-                        .HasMaxLength(200)
-                        .HasColumnType("nvarchar(200)");
-
-                    b.Property<int>("UploadUserId")
-                        .HasColumnType("int");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("UploadUserId");
-
-                    b.ToTable("AttachFile");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.BasePointRule", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<double>("Point")
-                        .HasColumnType("float");
-
-                    b.Property<int>("Priority")
-                        .HasColumnType("int");
-
-                    b.Property<string>("Rule")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("Type")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("BasePointRules");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.CalMonth", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<int>("Month")
-                        .HasColumnType("int")
-                        .HasColumnName("month");
-
-                    b.Property<int>("Status")
-                        .HasColumnType("int")
-                        .HasColumnName("status");
-
-                    b.Property<int>("Year")
-                        .HasColumnType("int")
-                        .HasColumnName("year");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("CalMonth");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Customer", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<string>("Address")
-                        .HasMaxLength(500)
-                        .HasColumnType("nvarchar(500)");
-
-                    b.Property<string>("ContactMan")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("Name")
-                        .IsRequired()
-                        .HasMaxLength(200)
-                        .HasColumnType("nvarchar(200)");
-
-                    b.Property<string>("Phone")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<int?>("ResponseManId")
-                        .HasColumnType("int");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("ResponseManId");
-
-                    b.ToTable("Customer");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
-                {
-                    b.Property<int>("ItemId")
-                        .HasColumnType("int");
-
-                    b.Property<int>("DoPersonId")
-                        .HasColumnType("int");
-
-                    b.Property<double>("PerformancePoint")
-                        .HasColumnType("float");
-
-                    b.HasKey("ItemId", "DoPersonId");
-
-                    b.HasIndex("DoPersonId");
-
-                    b.ToTable("ItemStaff");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Message", b =>
-                {
-                    b.Property<Guid>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("uniqueidentifier");
-
-                    b.Property<int>("FromId")
-                        .HasColumnType("int");
-
-                    b.Property<string>("MessageInfo")
-                        .HasMaxLength(500)
-                        .HasColumnType("nvarchar(500)");
-
-                    b.Property<int>("Type")
-                        .HasColumnType("int");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("FromId");
-
-                    b.ToTable("Message");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.MessagePerformanceItem", b =>
-                {
-                    b.Property<int>("ItemId")
-                        .HasColumnType("int");
-
-                    b.Property<Guid>("MessageId")
-                        .HasColumnType("uniqueidentifier");
-
-                    b.HasKey("ItemId", "MessageId");
-
-                    b.HasIndex("MessageId");
-
-                    b.ToTable("MessagePerformanceItems");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.MessageReadRecord", b =>
-                {
-                    b.Property<Guid>("MessageId")
-                        .HasColumnType("uniqueidentifier");
-
-                    b.Property<int>("StaffId")
-                        .HasColumnType("int");
-
-                    b.Property<Guid?>("MessageId1")
-                        .HasColumnType("uniqueidentifier");
-
-                    b.Property<bool>("isReaded")
-                        .HasColumnType("bit");
-
-                    b.HasKey("MessageId", "StaffId");
-
-                    b.HasIndex("MessageId1");
-
-                    b.HasIndex("StaffId");
-
-                    b.ToTable("MessageReadRecord");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<string>("AgentFeedbackMemo")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("ApplicationName")
-                        .HasMaxLength(200)
-                        .HasColumnType("nvarchar(200)");
-
-                    b.Property<string>("ApplicationType")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<decimal?>("BasePoint")
-                        .HasColumnType("numeric(18,2)");
-
-                    b.Property<string>("BusinessType")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<int>("CalMonthId")
-                        .HasColumnType("int");
-
-                    b.Property<string>("CaseCoefficient")
-                        .HasMaxLength(10)
-                        .HasColumnType("nvarchar(10)");
-
-                    b.Property<string>("CaseMemo")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("CaseName")
-                        .HasMaxLength(500)
-                        .HasColumnType("nvarchar(500)");
-
-                    b.Property<string>("CaseNo")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("CaseStage")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("CaseState")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("CaseType")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<int?>("CustomerId")
-                        .HasColumnType("int");
-
-                    b.Property<DateTime?>("CustomerLimitDate")
-                        .HasColumnType("date");
-
-                    b.Property<string>("DoItem")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("DoItemCoefficient")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("DoItemMemo")
-                        .HasMaxLength(500)
-                        .HasColumnType("nvarchar(500)");
-
-                    b.Property<string>("DoItemState")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<DateTime?>("EntrustingDate")
-                        .HasColumnType("date");
-
-                    b.Property<DateTime?>("FinalizationDate")
-                        .HasColumnType("date");
-
-                    b.Property<DateTime?>("FinishedDate")
-                        .HasColumnType("date");
-
-                    b.Property<DateTime?>("FirstDraftDate")
-                        .HasColumnType("date");
-
-                    b.Property<DateTime?>("InternalDate")
-                        .HasColumnType("date");
-
-                    b.Property<string>("OverDueMemo")
-                        .HasMaxLength(100)
-                        .HasColumnType("nvarchar(100)");
-
-                    b.Property<int?>("PreOastaffId")
-                        .HasColumnType("int")
-                        .HasColumnName("PreOAStaffId");
-
-                    b.Property<DateTime?>("ReturnDate")
-                        .HasColumnType("date");
-
-                    b.Property<int?>("ReviewerId")
-                        .HasColumnType("int");
-
-                    b.Property<int?>("Status")
-                        .HasColumnType("int");
-
-                    b.Property<string>("Type")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<int?>("WordCount")
-                        .HasColumnType("int");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("CalMonthId");
-
-                    b.HasIndex("CustomerId");
-
-                    b.HasIndex("PreOastaffId");
-
-                    b.HasIndex("ReviewerId");
-
-                    b.ToTable("PerformanceItem");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Staff", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<string>("Account")
-                        .IsRequired()
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("Department")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<DateTime?>("EntyDate")
-                        .HasColumnType("date");
-
-                    b.Property<bool>("IsCalPerformsnce")
-                        .HasColumnType("bit")
-                        .HasColumnName("isCalPerformsnce");
-
-                    b.Property<string>("Mail")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("Memo")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("Name")
-                        .IsRequired()
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("Password")
-                        .IsRequired()
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<int>("StaffGradeId")
-                        .HasColumnType("int");
-
-                    b.Property<string>("Status")
-                        .IsRequired()
-                        .HasMaxLength(25)
-                        .HasColumnType("nvarchar(25)");
-
-                    b.Property<string>("WorkPlace")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("StaffGradeId");
-
-                    b.ToTable("Staff");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<double>("Coefficient")
-                        .HasColumnType("float");
-
-                    b.Property<string>("Grade")
-                        .IsRequired()
-                        .HasMaxLength(5)
-                        .HasColumnType("nchar(5)")
-                        .IsFixedLength(true);
-
-                    b.HasKey("Id");
-
-                    b.ToTable("StaffGrade");
-
-                    b.HasData(
-                        new
-                        {
-                            Id = 1,
-                            Coefficient = 1.2,
-                            Grade = "S级"
-                        },
-                        new
-                        {
-                            Id = 2,
-                            Coefficient = 1.1000000000000001,
-                            Grade = "A3级"
-                        },
-                        new
-                        {
-                            Id = 3,
-                            Coefficient = 1.1000000000000001,
-                            Grade = "A2级"
-                        },
-                        new
-                        {
-                            Id = 4,
-                            Coefficient = 1.1000000000000001,
-                            Grade = "A1级"
-                        },
-                        new
-                        {
-                            Id = 5,
-                            Coefficient = 1.0,
-                            Grade = "B3级"
-                        },
-                        new
-                        {
-                            Id = 6,
-                            Coefficient = 1.0,
-                            Grade = "B2级"
-                        },
-                        new
-                        {
-                            Id = 7,
-                            Coefficient = 0.90000000000000002,
-                            Grade = "B1级"
-                        },
-                        new
-                        {
-                            Id = 8,
-                            Coefficient = 0.90000000000000002,
-                            Grade = "C3级"
-                        },
-                        new
-                        {
-                            Id = 9,
-                            Coefficient = 0.69999999999999996,
-                            Grade = "C2级"
-                        },
-                        new
-                        {
-                            Id = 10,
-                            Coefficient = 0.69999999999999996,
-                            Grade = "C1级"
-                        },
-                        new
-                        {
-                            Id = 11,
-                            Coefficient = 0.59999999999999998,
-                            Grade = "D3级"
-                        },
-                        new
-                        {
-                            Id = 12,
-                            Coefficient = 0.59999999999999998,
-                            Grade = "D2级"
-                        },
-                        new
-                        {
-                            Id = 13,
-                            Coefficient = 0.5,
-                            Grade = "D1级"
-                        });
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
-                {
-                    b.Property<int>("CheckerId")
-                        .HasColumnType("int");
-
-                    b.Property<int>("DoPersonId")
-                        .HasColumnType("int");
-
-                    b.Property<double>("Coefficient")
-                        .HasColumnType("float");
-
-                    b.HasKey("CheckerId", "DoPersonId");
-
-                    b.HasIndex("DoPersonId");
-
-                    b.ToTable("VerifyCoefficient");
-
-                    b.HasData(
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 5,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 6,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 7,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 8,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 9,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 10,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 11,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 12,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 13,
-                            Coefficient = 0.5
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 5,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 6,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 7,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 8,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 9,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 10,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 11,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 12,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 13,
-                            Coefficient = 0.5
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 5,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 6,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 7,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 8,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 9,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 10,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 11,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 12,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 13,
-                            Coefficient = 0.5
-                        });
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.AttachFile", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Staff", "UploadUser")
-                        .WithMany()
-                        .HasForeignKey("UploadUserId")
-                        .HasConstraintName("FK_AttachFile_UpdateUser")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.Navigation("UploadUser");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Customer", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Staff", "ResponseMan")
-                        .WithMany("Customers")
-                        .HasForeignKey("ResponseManId")
-                        .HasConstraintName("FK_Customer_Staff");
-
-                    b.Navigation("ResponseMan");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Staff", "DoPerson")
-                        .WithMany("ItemStaffs")
-                        .HasForeignKey("DoPersonId")
-                        .HasConstraintName("FK_ItemStaff_Staff")
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.PerformanceItem", "Item")
-                        .WithMany("ItemStaffs")
-                        .HasForeignKey("ItemId")
-                        .HasConstraintName("FK_ItemStaff_PerformanceItem")
-                        .IsRequired();
-
-                    b.Navigation("DoPerson");
-
-                    b.Navigation("Item");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Message", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Staff", "From")
-                        .WithMany()
-                        .HasForeignKey("FromId")
-                        .HasConstraintName("FK_From_Staff")
-                        .IsRequired();
-
-                    b.Navigation("From");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.MessagePerformanceItem", b =>
-                {
-                    b.HasOne("wispro.sp.entity.PerformanceItem", "Item")
-                        .WithMany()
-                        .HasForeignKey("ItemId")
-                        .HasConstraintName("FK_MessagePerformanceItem_Item")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.Message", "Message")
-                        .WithMany("RelatedItem")
-                        .HasForeignKey("MessageId")
-                        .HasConstraintName("FK_MessagePerformanceItem_Message")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.Navigation("Item");
-
-                    b.Navigation("Message");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.MessageReadRecord", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Message", "Message")
-                        .WithMany()
-                        .HasForeignKey("MessageId")
-                        .HasConstraintName("FK_MessageReadRecord_Message")
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.Message", null)
-                        .WithMany("To")
-                        .HasForeignKey("MessageId1");
-
-                    b.HasOne("wispro.sp.entity.Staff", "Staff")
-                        .WithMany()
-                        .HasForeignKey("StaffId")
-                        .HasConstraintName("FK_MessageReadRecord_Staff")
-                        .IsRequired();
-
-                    b.Navigation("Message");
-
-                    b.Navigation("Staff");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
-                {
-                    b.HasOne("wispro.sp.entity.CalMonth", "CalMonth")
-                        .WithMany("PerformanceItems")
-                        .HasForeignKey("CalMonthId")
-                        .HasConstraintName("FK_PerformanceItem_CalMonth")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.Customer", "Customer")
-                        .WithMany("PerformanceItems")
-                        .HasForeignKey("CustomerId")
-                        .HasConstraintName("FK_PerformanceItem_Customer");
-
-                    b.HasOne("wispro.sp.entity.Staff", "PreOastaff")
-                        .WithMany()
-                        .HasForeignKey("PreOastaffId")
-                        .HasConstraintName("FK_PerformanceItem_Staff");
-
-                    b.HasOne("wispro.sp.entity.Staff", "Reviewer")
-                        .WithMany("ReviewerItems")
-                        .HasForeignKey("ReviewerId")
-                        .HasConstraintName("FK_PerformanceItem_Reviewer");
-
-                    b.Navigation("CalMonth");
-
-                    b.Navigation("Customer");
-
-                    b.Navigation("PreOastaff");
-
-                    b.Navigation("Reviewer");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Staff", b =>
-                {
-                    b.HasOne("wispro.sp.entity.StaffGrade", "StaffGrade")
-                        .WithMany("Staff")
-                        .HasForeignKey("StaffGradeId")
-                        .HasConstraintName("FK_Staff_StaffGrade")
-                        .IsRequired();
-
-                    b.Navigation("StaffGrade");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
-                {
-                    b.HasOne("wispro.sp.entity.StaffGrade", "Checker")
-                        .WithMany("VerifyCoefficientCheckers")
-                        .HasForeignKey("CheckerId")
-                        .HasConstraintName("FK_VerifyCoefficient_StaffGrade")
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.StaffGrade", "DoPerson")
-                        .WithMany("VerifyCoefficientDoPeople")
-                        .HasForeignKey("DoPersonId")
-                        .HasConstraintName("FK_VerifyCoefficient_StaffGrade1")
-                        .IsRequired();
-
-                    b.Navigation("Checker");
-
-                    b.Navigation("DoPerson");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.CalMonth", b =>
-                {
-                    b.Navigation("PerformanceItems");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Customer", b =>
-                {
-                    b.Navigation("PerformanceItems");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Message", b =>
-                {
-                    b.Navigation("RelatedItem");
-
-                    b.Navigation("To");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
-                {
-                    b.Navigation("ItemStaffs");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Staff", b =>
-                {
-                    b.Navigation("Customers");
-
-                    b.Navigation("ItemStaffs");
-
-                    b.Navigation("ReviewerItems");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
-                {
-                    b.Navigation("Staff");
-
-                    b.Navigation("VerifyCoefficientCheckers");
-
-                    b.Navigation("VerifyCoefficientDoPeople");
-                });
-#pragma warning restore 612, 618
-        }
-    }
-}

+ 0 - 54
wispro.sp.api/Migrations/20211022045200_basePointRule.cs

@@ -1,54 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace wispro.sp.api.Migrations
-{
-    public partial class basePointRule : Migration
-    {
-        protected override void Up(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.AddColumn<string>(
-                name: "Type",
-                table: "PerformanceItem",
-                type: "nvarchar(max)",
-                nullable: true);
-
-            migrationBuilder.AddColumn<int>(
-                name: "WordCount",
-                table: "PerformanceItem",
-                type: "int",
-                nullable: true);
-
-            migrationBuilder.AddColumn<int>(
-                name: "Priority",
-                table: "BasePointRules",
-                type: "int",
-                nullable: false,
-                defaultValue: 0);
-
-            migrationBuilder.AddColumn<string>(
-                name: "Type",
-                table: "BasePointRules",
-                type: "nvarchar(max)",
-                nullable: true);
-        }
-
-        protected override void Down(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.DropColumn(
-                name: "Type",
-                table: "PerformanceItem");
-
-            migrationBuilder.DropColumn(
-                name: "WordCount",
-                table: "PerformanceItem");
-
-            migrationBuilder.DropColumn(
-                name: "Priority",
-                table: "BasePointRules");
-
-            migrationBuilder.DropColumn(
-                name: "Type",
-                table: "BasePointRules");
-        }
-    }
-}

+ 0 - 890
wispro.sp.api/Migrations/20211026062747_20211026.Designer.cs

@@ -1,890 +0,0 @@
-// <auto-generated />
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using wispro.sp.api;
-
-namespace wispro.sp.api.Migrations
-{
-    [DbContext(typeof(spDbContext))]
-    [Migration("20211026062747_20211026")]
-    partial class _20211026
-    {
-        protected override void BuildTargetModel(ModelBuilder modelBuilder)
-        {
-#pragma warning disable 612, 618
-            modelBuilder
-                .HasAnnotation("Relational:MaxIdentifierLength", 128)
-                .HasAnnotation("ProductVersion", "5.0.9")
-                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-            modelBuilder.Entity("wispro.sp.entity.AttachFile", b =>
-                {
-                    b.Property<Guid>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("uniqueidentifier");
-
-                    b.Property<string>("Name")
-                        .HasMaxLength(200)
-                        .HasColumnType("nvarchar(200)");
-
-                    b.Property<string>("SavePath")
-                        .HasMaxLength(200)
-                        .HasColumnType("nvarchar(200)");
-
-                    b.Property<int>("UploadUserId")
-                        .HasColumnType("int");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("UploadUserId");
-
-                    b.ToTable("AttachFile");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.BasePointRule", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<double>("Point")
-                        .HasColumnType("float");
-
-                    b.Property<int>("Priority")
-                        .HasColumnType("int");
-
-                    b.Property<string>("Rule")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("Type")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("BasePointRules");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.CalMonth", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<int>("Month")
-                        .HasColumnType("int")
-                        .HasColumnName("month");
-
-                    b.Property<int>("Status")
-                        .HasColumnType("int")
-                        .HasColumnName("status");
-
-                    b.Property<int>("Year")
-                        .HasColumnType("int")
-                        .HasColumnName("year");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("CalMonth");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Customer", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<string>("Address")
-                        .HasMaxLength(500)
-                        .HasColumnType("nvarchar(500)");
-
-                    b.Property<string>("ContactMan")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("Name")
-                        .IsRequired()
-                        .HasMaxLength(200)
-                        .HasColumnType("nvarchar(200)");
-
-                    b.Property<string>("Phone")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<int?>("ResponseManId")
-                        .HasColumnType("int");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("ResponseManId");
-
-                    b.ToTable("Customer");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
-                {
-                    b.Property<int>("ItemId")
-                        .HasColumnType("int");
-
-                    b.Property<int>("DoPersonId")
-                        .HasColumnType("int");
-
-                    b.Property<double>("PerformancePoint")
-                        .HasColumnType("float");
-
-                    b.HasKey("ItemId", "DoPersonId");
-
-                    b.HasIndex("DoPersonId");
-
-                    b.ToTable("ItemStaff");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Message", b =>
-                {
-                    b.Property<Guid>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("uniqueidentifier");
-
-                    b.Property<int>("FromId")
-                        .HasColumnType("int");
-
-                    b.Property<string>("MessageInfo")
-                        .HasMaxLength(500)
-                        .HasColumnType("nvarchar(500)");
-
-                    b.Property<int>("Type")
-                        .HasColumnType("int");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("FromId");
-
-                    b.ToTable("Message");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.MessagePerformanceItem", b =>
-                {
-                    b.Property<int>("ItemId")
-                        .HasColumnType("int");
-
-                    b.Property<Guid>("MessageId")
-                        .HasColumnType("uniqueidentifier");
-
-                    b.HasKey("ItemId", "MessageId");
-
-                    b.HasIndex("MessageId");
-
-                    b.ToTable("MessagePerformanceItems");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.MessageReadRecord", b =>
-                {
-                    b.Property<Guid>("MessageId")
-                        .HasColumnType("uniqueidentifier");
-
-                    b.Property<int>("StaffId")
-                        .HasColumnType("int");
-
-                    b.Property<Guid?>("MessageId1")
-                        .HasColumnType("uniqueidentifier");
-
-                    b.Property<bool>("isReaded")
-                        .HasColumnType("bit");
-
-                    b.HasKey("MessageId", "StaffId");
-
-                    b.HasIndex("MessageId1");
-
-                    b.HasIndex("StaffId");
-
-                    b.ToTable("MessageReadRecord");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<string>("AgentFeedbackMemo")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("ApplicationName")
-                        .HasMaxLength(200)
-                        .HasColumnType("nvarchar(200)");
-
-                    b.Property<string>("ApplicationType")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<decimal?>("BasePoint")
-                        .HasColumnType("numeric(18,2)");
-
-                    b.Property<string>("BusinessType")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<int>("CalMonthId")
-                        .HasColumnType("int");
-
-                    b.Property<string>("CaseCoefficient")
-                        .HasMaxLength(10)
-                        .HasColumnType("nvarchar(10)");
-
-                    b.Property<string>("CaseMemo")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("CaseName")
-                        .HasMaxLength(500)
-                        .HasColumnType("nvarchar(500)");
-
-                    b.Property<string>("CaseNo")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("CaseStage")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("CaseState")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("CaseType")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<int?>("CustomerId")
-                        .HasColumnType("int");
-
-                    b.Property<DateTime?>("CustomerLimitDate")
-                        .HasColumnType("date");
-
-                    b.Property<string>("DoItem")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("DoItemCoefficient")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("DoItemMemo")
-                        .HasMaxLength(500)
-                        .HasColumnType("nvarchar(500)");
-
-                    b.Property<string>("DoItemState")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<DateTime?>("EntrustingDate")
-                        .HasColumnType("date");
-
-                    b.Property<DateTime?>("FinalizationDate")
-                        .HasColumnType("date");
-
-                    b.Property<DateTime?>("FinishedDate")
-                        .HasColumnType("date");
-
-                    b.Property<DateTime?>("FirstDraftDate")
-                        .HasColumnType("date");
-
-                    b.Property<DateTime?>("InternalDate")
-                        .HasColumnType("date");
-
-                    b.Property<string>("OverDueMemo")
-                        .HasMaxLength(100)
-                        .HasColumnType("nvarchar(100)");
-
-                    b.Property<int?>("PreOastaffId")
-                        .HasColumnType("int")
-                        .HasColumnName("PreOAStaffId");
-
-                    b.Property<DateTime?>("ReturnDate")
-                        .HasColumnType("date");
-
-                    b.Property<int?>("ReviewerId")
-                        .HasColumnType("int");
-
-                    b.Property<int?>("Status")
-                        .HasColumnType("int");
-
-                    b.Property<string>("Type")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<int?>("WordCount")
-                        .HasColumnType("int");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("CalMonthId");
-
-                    b.HasIndex("CustomerId");
-
-                    b.HasIndex("PreOastaffId");
-
-                    b.HasIndex("ReviewerId");
-
-                    b.ToTable("PerformanceItem");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Staff", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<string>("Account")
-                        .IsRequired()
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("Department")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<DateTime?>("EntyDate")
-                        .HasColumnType("date");
-
-                    b.Property<bool>("IsCalPerformsnce")
-                        .HasColumnType("bit")
-                        .HasColumnName("isCalPerformsnce");
-
-                    b.Property<bool>("IsOnJob")
-                        .HasColumnType("bit");
-
-                    b.Property<string>("Mail")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("Memo")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("Mobile")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("Name")
-                        .IsRequired()
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.Property<string>("Password")
-                        .IsRequired()
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("Sex")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<int>("StaffGradeId")
-                        .HasColumnType("int");
-
-                    b.Property<string>("Status")
-                        .IsRequired()
-                        .HasMaxLength(25)
-                        .HasColumnType("nvarchar(25)");
-
-                    b.Property<string>("Tel")
-                        .HasColumnType("nvarchar(max)");
-
-                    b.Property<string>("WorkPlace")
-                        .HasMaxLength(50)
-                        .HasColumnType("nvarchar(50)");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("StaffGradeId");
-
-                    b.ToTable("Staff");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("int")
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
-                    b.Property<double>("Coefficient")
-                        .HasColumnType("float");
-
-                    b.Property<string>("Grade")
-                        .IsRequired()
-                        .HasMaxLength(5)
-                        .HasColumnType("nchar(5)")
-                        .IsFixedLength(true);
-
-                    b.HasKey("Id");
-
-                    b.ToTable("StaffGrade");
-
-                    b.HasData(
-                        new
-                        {
-                            Id = 1,
-                            Coefficient = 1.2,
-                            Grade = "S级"
-                        },
-                        new
-                        {
-                            Id = 2,
-                            Coefficient = 1.1000000000000001,
-                            Grade = "A3级"
-                        },
-                        new
-                        {
-                            Id = 3,
-                            Coefficient = 1.1000000000000001,
-                            Grade = "A2级"
-                        },
-                        new
-                        {
-                            Id = 4,
-                            Coefficient = 1.1000000000000001,
-                            Grade = "A1级"
-                        },
-                        new
-                        {
-                            Id = 5,
-                            Coefficient = 1.0,
-                            Grade = "B3级"
-                        },
-                        new
-                        {
-                            Id = 6,
-                            Coefficient = 1.0,
-                            Grade = "B2级"
-                        },
-                        new
-                        {
-                            Id = 7,
-                            Coefficient = 0.90000000000000002,
-                            Grade = "B1级"
-                        },
-                        new
-                        {
-                            Id = 8,
-                            Coefficient = 0.90000000000000002,
-                            Grade = "C3级"
-                        },
-                        new
-                        {
-                            Id = 9,
-                            Coefficient = 0.69999999999999996,
-                            Grade = "C2级"
-                        },
-                        new
-                        {
-                            Id = 10,
-                            Coefficient = 0.69999999999999996,
-                            Grade = "C1级"
-                        },
-                        new
-                        {
-                            Id = 11,
-                            Coefficient = 0.59999999999999998,
-                            Grade = "D3级"
-                        },
-                        new
-                        {
-                            Id = 12,
-                            Coefficient = 0.59999999999999998,
-                            Grade = "D2级"
-                        },
-                        new
-                        {
-                            Id = 13,
-                            Coefficient = 0.5,
-                            Grade = "D1级"
-                        });
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
-                {
-                    b.Property<int>("CheckerId")
-                        .HasColumnType("int");
-
-                    b.Property<int>("DoPersonId")
-                        .HasColumnType("int");
-
-                    b.Property<double>("Coefficient")
-                        .HasColumnType("float");
-
-                    b.HasKey("CheckerId", "DoPersonId");
-
-                    b.HasIndex("DoPersonId");
-
-                    b.ToTable("VerifyCoefficient");
-
-                    b.HasData(
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 5,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 6,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 7,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 8,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 9,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 10,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 11,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 12,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 2,
-                            DoPersonId = 13,
-                            Coefficient = 0.5
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 5,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 6,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 7,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 8,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 9,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 10,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 11,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 12,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 3,
-                            DoPersonId = 13,
-                            Coefficient = 0.5
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 5,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 6,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 7,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 8,
-                            Coefficient = 0.20000000000000001
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 9,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 10,
-                            Coefficient = 0.29999999999999999
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 11,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 12,
-                            Coefficient = 0.40000000000000002
-                        },
-                        new
-                        {
-                            CheckerId = 4,
-                            DoPersonId = 13,
-                            Coefficient = 0.5
-                        });
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.AttachFile", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Staff", "UploadUser")
-                        .WithMany()
-                        .HasForeignKey("UploadUserId")
-                        .HasConstraintName("FK_AttachFile_UpdateUser")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.Navigation("UploadUser");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Customer", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Staff", "ResponseMan")
-                        .WithMany("Customers")
-                        .HasForeignKey("ResponseManId")
-                        .HasConstraintName("FK_Customer_Staff");
-
-                    b.Navigation("ResponseMan");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Staff", "DoPerson")
-                        .WithMany("ItemStaffs")
-                        .HasForeignKey("DoPersonId")
-                        .HasConstraintName("FK_ItemStaff_Staff")
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.PerformanceItem", "Item")
-                        .WithMany("ItemStaffs")
-                        .HasForeignKey("ItemId")
-                        .HasConstraintName("FK_ItemStaff_PerformanceItem")
-                        .IsRequired();
-
-                    b.Navigation("DoPerson");
-
-                    b.Navigation("Item");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Message", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Staff", "From")
-                        .WithMany()
-                        .HasForeignKey("FromId")
-                        .HasConstraintName("FK_From_Staff")
-                        .IsRequired();
-
-                    b.Navigation("From");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.MessagePerformanceItem", b =>
-                {
-                    b.HasOne("wispro.sp.entity.PerformanceItem", "Item")
-                        .WithMany()
-                        .HasForeignKey("ItemId")
-                        .HasConstraintName("FK_MessagePerformanceItem_Item")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.Message", "Message")
-                        .WithMany("RelatedItem")
-                        .HasForeignKey("MessageId")
-                        .HasConstraintName("FK_MessagePerformanceItem_Message")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.Navigation("Item");
-
-                    b.Navigation("Message");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.MessageReadRecord", b =>
-                {
-                    b.HasOne("wispro.sp.entity.Message", "Message")
-                        .WithMany()
-                        .HasForeignKey("MessageId")
-                        .HasConstraintName("FK_MessageReadRecord_Message")
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.Message", null)
-                        .WithMany("To")
-                        .HasForeignKey("MessageId1");
-
-                    b.HasOne("wispro.sp.entity.Staff", "Staff")
-                        .WithMany()
-                        .HasForeignKey("StaffId")
-                        .HasConstraintName("FK_MessageReadRecord_Staff")
-                        .IsRequired();
-
-                    b.Navigation("Message");
-
-                    b.Navigation("Staff");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
-                {
-                    b.HasOne("wispro.sp.entity.CalMonth", "CalMonth")
-                        .WithMany("PerformanceItems")
-                        .HasForeignKey("CalMonthId")
-                        .HasConstraintName("FK_PerformanceItem_CalMonth")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.Customer", "Customer")
-                        .WithMany("PerformanceItems")
-                        .HasForeignKey("CustomerId")
-                        .HasConstraintName("FK_PerformanceItem_Customer");
-
-                    b.HasOne("wispro.sp.entity.Staff", "PreOastaff")
-                        .WithMany()
-                        .HasForeignKey("PreOastaffId")
-                        .HasConstraintName("FK_PerformanceItem_Staff");
-
-                    b.HasOne("wispro.sp.entity.Staff", "Reviewer")
-                        .WithMany("ReviewerItems")
-                        .HasForeignKey("ReviewerId")
-                        .HasConstraintName("FK_PerformanceItem_Reviewer");
-
-                    b.Navigation("CalMonth");
-
-                    b.Navigation("Customer");
-
-                    b.Navigation("PreOastaff");
-
-                    b.Navigation("Reviewer");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Staff", b =>
-                {
-                    b.HasOne("wispro.sp.entity.StaffGrade", "StaffGrade")
-                        .WithMany("Staff")
-                        .HasForeignKey("StaffGradeId")
-                        .HasConstraintName("FK_Staff_StaffGrade")
-                        .IsRequired();
-
-                    b.Navigation("StaffGrade");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
-                {
-                    b.HasOne("wispro.sp.entity.StaffGrade", "Checker")
-                        .WithMany("VerifyCoefficientCheckers")
-                        .HasForeignKey("CheckerId")
-                        .HasConstraintName("FK_VerifyCoefficient_StaffGrade")
-                        .IsRequired();
-
-                    b.HasOne("wispro.sp.entity.StaffGrade", "DoPerson")
-                        .WithMany("VerifyCoefficientDoPeople")
-                        .HasForeignKey("DoPersonId")
-                        .HasConstraintName("FK_VerifyCoefficient_StaffGrade1")
-                        .IsRequired();
-
-                    b.Navigation("Checker");
-
-                    b.Navigation("DoPerson");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.CalMonth", b =>
-                {
-                    b.Navigation("PerformanceItems");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Customer", b =>
-                {
-                    b.Navigation("PerformanceItems");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Message", b =>
-                {
-                    b.Navigation("RelatedItem");
-
-                    b.Navigation("To");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
-                {
-                    b.Navigation("ItemStaffs");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.Staff", b =>
-                {
-                    b.Navigation("Customers");
-
-                    b.Navigation("ItemStaffs");
-
-                    b.Navigation("ReviewerItems");
-                });
-
-            modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
-                {
-                    b.Navigation("Staff");
-
-                    b.Navigation("VerifyCoefficientCheckers");
-
-                    b.Navigation("VerifyCoefficientDoPeople");
-                });
-#pragma warning restore 612, 618
-        }
-    }
-}

+ 0 - 54
wispro.sp.api/Migrations/20211026062747_20211026.cs

@@ -1,54 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace wispro.sp.api.Migrations
-{
-    public partial class _20211026 : Migration
-    {
-        protected override void Up(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.AddColumn<bool>(
-                name: "IsOnJob",
-                table: "Staff",
-                type: "bit",
-                nullable: false,
-                defaultValue: false);
-
-            migrationBuilder.AddColumn<string>(
-                name: "Mobile",
-                table: "Staff",
-                type: "nvarchar(max)",
-                nullable: true);
-
-            migrationBuilder.AddColumn<string>(
-                name: "Sex",
-                table: "Staff",
-                type: "nvarchar(max)",
-                nullable: true);
-
-            migrationBuilder.AddColumn<string>(
-                name: "Tel",
-                table: "Staff",
-                type: "nvarchar(max)",
-                nullable: true);
-        }
-
-        protected override void Down(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.DropColumn(
-                name: "IsOnJob",
-                table: "Staff");
-
-            migrationBuilder.DropColumn(
-                name: "Mobile",
-                table: "Staff");
-
-            migrationBuilder.DropColumn(
-                name: "Sex",
-                table: "Staff");
-
-            migrationBuilder.DropColumn(
-                name: "Tel",
-                table: "Staff");
-        }
-    }
-}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2331 - 0
wispro.sp.api/Migrations/20211104013549_add-appealDB.Designer.cs


+ 846 - 0
wispro.sp.api/Migrations/20211104013549_add-appealDB.cs

@@ -0,0 +1,846 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace wispro.sp.api.Migrations
+{
+    public partial class addappealDB : Migration
+    {
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.CreateTable(
+                name: "AppealType",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "int", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    CanDoExpress = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
+                    ReviewerExpress = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_AppealType", x => x.Id);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "BasePointRule",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "int", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    Rule = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
+                    PointExpress = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
+                    Priority = table.Column<int>(type: "int", nullable: false),
+                    Type = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_BasePointRule", x => x.Id);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "CalMonth",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "int", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    year = table.Column<int>(type: "int", nullable: false),
+                    month = table.Column<int>(type: "int", nullable: false),
+                    status = table.Column<int>(type: "int", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_CalMonth", x => x.Id);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "StaffGrade",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "int", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    Grade = table.Column<string>(type: "nchar(5)", fixedLength: true, maxLength: 5, nullable: false),
+                    Coefficient = table.Column<double>(type: "float", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_StaffGrade", x => x.Id);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "InputField",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "int", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    FieldName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    FieldType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    FieldValue = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
+                    MapObjectField = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    AppealTypeId = table.Column<int>(type: "int", nullable: false),
+                    AppealState = table.Column<int>(type: "int", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_InputField", x => x.Id);
+                    table.ForeignKey(
+                        name: "FK_InputField_AppealType_AppealTypeId",
+                        column: x => x.AppealTypeId,
+                        principalTable: "AppealType",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Cascade);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "Staff",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "int", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    Account = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
+                    Password = table.Column<string>(type: "nvarchar(max)", nullable: false),
+                    Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
+                    Sex = table.Column<string>(type: "nvarchar(max)", nullable: true),
+                    Tel = table.Column<string>(type: "nvarchar(max)", nullable: true),
+                    Mobile = table.Column<string>(type: "nvarchar(max)", nullable: true),
+                    IsOnJob = table.Column<bool>(type: "bit", nullable: false),
+                    Status = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: false),
+                    isCalPerformsnce = table.Column<bool>(type: "bit", nullable: false),
+                    StaffGradeId = table.Column<int>(type: "int", nullable: true),
+                    Department = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    WorkPlace = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    EntyDate = table.Column<DateTime>(type: "date", nullable: true),
+                    Mail = table.Column<string>(type: "nvarchar(max)", nullable: true),
+                    Memo = table.Column<string>(type: "nvarchar(max)", nullable: true)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_Staff", x => x.Id);
+                    table.ForeignKey(
+                        name: "FK_Staff_StaffGrade",
+                        column: x => x.StaffGradeId,
+                        principalTable: "StaffGrade",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "VerifyCoefficient",
+                columns: table => new
+                {
+                    CheckerId = table.Column<int>(type: "int", nullable: false),
+                    DoPersonId = table.Column<int>(type: "int", nullable: false),
+                    Coefficient = table.Column<double>(type: "float", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_VerifyCoefficient", x => new { x.CheckerId, x.DoPersonId });
+                    table.ForeignKey(
+                        name: "FK_VerifyCoefficient_StaffGrade",
+                        column: x => x.CheckerId,
+                        principalTable: "StaffGrade",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                    table.ForeignKey(
+                        name: "FK_VerifyCoefficient_StaffGrade1",
+                        column: x => x.DoPersonId,
+                        principalTable: "StaffGrade",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "AppealRecord",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "int", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    CreaterId = table.Column<int>(type: "int", nullable: false),
+                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
+                    Reason = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
+                    State = table.Column<int>(type: "int", nullable: false),
+                    ReviewerId = table.Column<int>(type: "int", nullable: false),
+                    ReviewerMemo = table.Column<string>(type: "nvarchar(max)", nullable: true),
+                    ReviewTime = table.Column<DateTime>(type: "datetime2", nullable: true),
+                    TypeId = table.Column<int>(type: "int", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_AppealRecord", x => x.Id);
+                    table.ForeignKey(
+                        name: "FK_AppealRecord_AppealType_TypeId",
+                        column: x => x.TypeId,
+                        principalTable: "AppealType",
+                        principalColumn: "Id");
+                    table.ForeignKey(
+                        name: "FK_AppealRecord_Staff_CreaterId",
+                        column: x => x.CreaterId,
+                        principalTable: "Staff",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Cascade);
+                    table.ForeignKey(
+                        name: "FK_AppealRecord_Staff_ReviewerId",
+                        column: x => x.ReviewerId,
+                        principalTable: "Staff",
+                        principalColumn: "Id");
+                });
+
+            migrationBuilder.CreateTable(
+                name: "Customer",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "int", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
+                    ContactMan = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    Address = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
+                    Phone = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    ResponseManId = table.Column<int>(type: "int", nullable: true)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_Customer", x => x.Id);
+                    table.ForeignKey(
+                        name: "FK_Customer_Staff",
+                        column: x => x.ResponseManId,
+                        principalTable: "Staff",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "Message",
+                columns: table => new
+                {
+                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
+                    MessageInfo = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
+                    Type = table.Column<int>(type: "int", nullable: false),
+                    FromId = table.Column<int>(type: "int", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_Message", x => x.Id);
+                    table.ForeignKey(
+                        name: "FK_From_Staff",
+                        column: x => x.FromId,
+                        principalTable: "Staff",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "AttachFile",
+                columns: table => new
+                {
+                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
+                    Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
+                    SavePath = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
+                    UploadUserId = table.Column<int>(type: "int", nullable: false),
+                    AppealRecordId = table.Column<int>(type: "int", nullable: false),
+                    AppealRecordId1 = table.Column<int>(type: "int", nullable: true)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_AttachFile", x => x.Id);
+                    table.ForeignKey(
+                        name: "FK_AttachFile_AppealRecord",
+                        column: x => x.AppealRecordId,
+                        principalTable: "AppealRecord",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Cascade);
+                    table.ForeignKey(
+                        name: "FK_AttachFile_AppealRecord_AppealRecordId1",
+                        column: x => x.AppealRecordId1,
+                        principalTable: "AppealRecord",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                    table.ForeignKey(
+                        name: "FK_AttachFile_UpdateUser",
+                        column: x => x.UploadUserId,
+                        principalTable: "Staff",
+                        principalColumn: "Id");
+                });
+
+            migrationBuilder.CreateTable(
+                name: "InputFieldValue",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "int", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    InputFieldId = table.Column<int>(type: "int", nullable: false),
+                    Value = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
+                    AppealRecordId = table.Column<int>(type: "int", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_InputFieldValue", x => x.Id);
+                    table.ForeignKey(
+                        name: "FK_InputFieldValue_AppealRecord_AppealRecordId",
+                        column: x => x.AppealRecordId,
+                        principalTable: "AppealRecord",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Cascade);
+                    table.ForeignKey(
+                        name: "FK_InputFieldValue_InputField_InputFieldId",
+                        column: x => x.InputFieldId,
+                        principalTable: "InputField",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Cascade);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "PerformanceItem",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "int", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    CaseNo = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    ApplicationType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    BusinessType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    AgentFeedbackMemo = table.Column<string>(type: "nvarchar(max)", nullable: true),
+                    DoItem = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    CaseStage = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    CaseCoefficient = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
+                    DoItemCoefficient = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    PreOAStaffId = table.Column<int>(type: "int", nullable: true),
+                    ReviewerId = table.Column<int>(type: "int", nullable: true),
+                    CustomerId = table.Column<int>(type: "int", nullable: true),
+                    ApplicationName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
+                    FinishedDate = table.Column<DateTime>(type: "date", nullable: true),
+                    FinalizationDate = table.Column<DateTime>(type: "date", nullable: true),
+                    ReturnDate = table.Column<DateTime>(type: "date", nullable: true),
+                    CaseType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    CaseState = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    DoItemMemo = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
+                    DoItemState = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
+                    CaseName = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
+                    CustomerLimitDate = table.Column<DateTime>(type: "date", nullable: true),
+                    EntrustingDate = table.Column<DateTime>(type: "date", nullable: true),
+                    InternalDate = table.Column<DateTime>(type: "date", nullable: true),
+                    FirstDraftDate = table.Column<DateTime>(type: "date", nullable: true),
+                    OverDueMemo = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
+                    BasePoint = table.Column<decimal>(type: "numeric(18,2)", nullable: true),
+                    Status = table.Column<int>(type: "int", nullable: true),
+                    CaseMemo = table.Column<string>(type: "nvarchar(max)", nullable: true),
+                    WordCount = table.Column<int>(type: "int", nullable: true),
+                    ReturnCasseNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
+                    Type = table.Column<string>(type: "nvarchar(max)", nullable: true),
+                    CalMonthId = table.Column<int>(type: "int", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_PerformanceItem", x => x.Id);
+                    table.ForeignKey(
+                        name: "FK_PerformanceItem_CalMonth",
+                        column: x => x.CalMonthId,
+                        principalTable: "CalMonth",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Cascade);
+                    table.ForeignKey(
+                        name: "FK_PerformanceItem_Customer",
+                        column: x => x.CustomerId,
+                        principalTable: "Customer",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                    table.ForeignKey(
+                        name: "FK_PerformanceItem_Reviewer",
+                        column: x => x.ReviewerId,
+                        principalTable: "Staff",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                    table.ForeignKey(
+                        name: "FK_PerformanceItem_Staff",
+                        column: x => x.PreOAStaffId,
+                        principalTable: "Staff",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "MessageReadRecord",
+                columns: table => new
+                {
+                    MessageId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
+                    StaffId = table.Column<int>(type: "int", nullable: false),
+                    isReaded = table.Column<bool>(type: "bit", nullable: false),
+                    MessageId1 = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_MessageReadRecord", x => new { x.MessageId, x.StaffId });
+                    table.ForeignKey(
+                        name: "FK_MessageReadRecord_Message",
+                        column: x => x.MessageId,
+                        principalTable: "Message",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                    table.ForeignKey(
+                        name: "FK_MessageReadRecord_Message_MessageId1",
+                        column: x => x.MessageId1,
+                        principalTable: "Message",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                    table.ForeignKey(
+                        name: "FK_MessageReadRecord_Staff",
+                        column: x => x.StaffId,
+                        principalTable: "Staff",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "ItemStaff",
+                columns: table => new
+                {
+                    ItemId = table.Column<int>(type: "int", nullable: false),
+                    DoPersonId = table.Column<int>(type: "int", nullable: false),
+                    PerformancePoint = table.Column<double>(type: "float", nullable: true)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_ItemStaff", x => new { x.ItemId, x.DoPersonId });
+                    table.ForeignKey(
+                        name: "FK_ItemStaff_PerformanceItem",
+                        column: x => x.ItemId,
+                        principalTable: "PerformanceItem",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                    table.ForeignKey(
+                        name: "FK_ItemStaff_Staff",
+                        column: x => x.DoPersonId,
+                        principalTable: "Staff",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Restrict);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "MessagePerformanceItems",
+                columns: table => new
+                {
+                    MessageId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
+                    ItemId = table.Column<int>(type: "int", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_MessagePerformanceItems", x => new { x.ItemId, x.MessageId });
+                    table.ForeignKey(
+                        name: "FK_MessagePerformanceItem_Item",
+                        column: x => x.ItemId,
+                        principalTable: "PerformanceItem",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Cascade);
+                    table.ForeignKey(
+                        name: "FK_MessagePerformanceItem_Message",
+                        column: x => x.MessageId,
+                        principalTable: "Message",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Cascade);
+                });
+
+            migrationBuilder.InsertData(
+                table: "BasePointRule",
+                columns: new[] { "Id", "PointExpress", "Priority", "Rule", "Type" },
+                values: new object[,]
+                {
+                    { 1, "0.2", 1, "p.ApplicationType==\"外观设计\"", "新申请" },
+                    { 97, "0.3", 97, "p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"内-外\"", "其它" },
+                    { 96, "0.5", 96, "p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"外-内\"", "其它" },
+                    { 95, "0.7", 95, "p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"内-外\"", "其它" },
+                    { 94, "0.2", 94, "p.DoItem==\"发明一次OA授权\" && p.ApplicationType==\"发明\"", "一次OA授权" },
+                    { 93, "0.0", 93, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PCTCN\") &&  (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")", "OA" },
+                    { 92, "0.0", 92, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") &&  (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")", "OA" },
+                    { 91, "0.2", 91, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"二通\"", "OA" },
+                    { 90, "0.2", 90, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"二通\"", "OA" },
+                    { 89, "0.2", 89, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"", "OA" },
+                    { 88, "0.5", 88, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PCTCN\")  && p.CaseStage==\"一通\"", "OA" },
+                    { 87, "0.3", 87, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"非实质\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"", "OA" },
+                    { 86, "0.2", 86, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"", "OA" },
+                    { 85, "0.5", 85, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PACN\")  && p.CaseStage==\"一通\"", "OA" },
+                    { 84, "0.3", 84, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"非实质\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"", "OA" },
+                    { 83, "0.2", 83, "p.DoItem==\"意见陈述\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"复审\"", "OA" },
+                    { 82, "0.5", 82, "p.DoItem==\"请求复审\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")", "OA" },
+                    { 81, "0.2", 81, "p.DoItem==\"申復\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PATW\")", "OA" },
+                    { 80, "0.5", 80, "p.DoItem==\"申復\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PATW\")", "OA" },
+                    { 79, "0.2", 79, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAIN\")", "OA" },
+                    { 78, "0.2", 78, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAGB\")", "OA" },
+                    { 77, "0.2", 77, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAEPO\")", "OA" },
+                    { 76, "0.3", 76, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PADE\")", "OA" },
+                    { 75, "0.2", 75, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAAU\")", "OA" },
+                    { 74, "1.5", 74, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAIN\")", "OA" },
+                    { 72, "1.5", 72, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAEPO\")", "OA" },
+                    { 71, "1.6", 71, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PADE\")", "OA" },
+                    { 70, "1.5", 70, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAAU\")", "OA" },
+                    { 69, "0.2", 69, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAUS\")", "OA" },
+                    { 68, "1.5", 68, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAUS\")", "OA" },
+                    { 98, "0.2", 98, "p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"外-内\"", "其它" },
+                    { 67, "1.5", 67, "p.DoItem==\"口审评估\" && p.DoItemCoefficient==\"实质\"", "OA" },
+                    { 99, "0.1", 99, "p.AgentFeedbackMemo==\"检索结案\"", "其它" },
+                    { 101, "0.2", 101, "p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAAU\")", "其它" },
+                    { 130, "0.0", 130, "p.AgentFeedbackMemo==\"已核算绩效\"", "其它" },
+                    { 129, "p.WordCount/1000*0.18", 129, "p.DoItem==\"翻译\") && p.AgentFeedbackMemo==\"中-德\"", "其它" },
+                    { 128, "p.WordCount/1000*0.16", 128, "p.DoItem==\"翻译\") && p.AgentFeedbackMemo==\"中-英\"", "其它" },
+                    { 127, "p.WordCount/1000*0.1", 127, "p.DoItem==\"翻译\") && p.AgentFeedbackMemo==\"英-中\"", "其它" },
+                    { 126, "0.0", 126, "p.DoItem==\"请求优先审查\"", "其它" },
+                    { 125, "0.0", 125, "p.DoItem==\"提交ids\"", "其它" },
+                    { 124, "0.2", 124, "p.ApplicationType==\"外观设计\"", "其它" },
+                    { 123, "0.0", 123, "p.DoItem==\"专利挖掘与布局\"", "其它" }
+                });
+
+            migrationBuilder.InsertData(
+                table: "BasePointRule",
+                columns: new[] { "Id", "PointExpress", "Priority", "Rule", "Type" },
+                values: new object[,]
+                {
+                    { 122, "0.0", 122, "p.DoItem==\"知识点总结\"", "其它" },
+                    { 121, "0.0", 121, "p.DoItem==\"询问放弃或复审\"", "其它" },
+                    { 120, "0.1", 120, "p.DoItem==\"提交ids\"", "其它" },
+                    { 119, "0.0", 119, "p.DoItem==\"技术确认\"", "其它" },
+                    { 118, "0.0", 118, "p.DoItem==\"绘图\"", "其它" },
+                    { 117, "0.2", 117, "p.DoItem==\"分案评估+分案\"", "其它" },
+                    { 116, "0.1", 116, "p.DoItem==\"分案评估\"", "其它" },
+                    { 115, "0.2", 115, "p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PAUS\")", "其它" },
+                    { 114, "0.2", 114, "p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PAEPO\") ", "其它" },
+                    { 113, "0.0", 113, "p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PACN\")", "其它" },
+                    { 112, "0.1", 112, "p.DoItem==\"PPH\"", "其它" },
+                    { 111, "0.2", 111, "p.DoItem==\"OA答辩校核\"", "其它" },
+                    { 110, "0.2", 110, "p.DoItem==\"Election Action\"", "其它" },
+                    { 109, "0.2", 109, "p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAUS\")", "其它" },
+                    { 108, "0.2", 108, "p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAIN\")", "其它" },
+                    { 107, "0.2", 107, "p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAGB\")", "其它" },
+                    { 106, "0.2", 106, "p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAEPO\")", "其它" },
+                    { 105, "0.2", 105, "p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PADE\")", "其它" },
+                    { 104, "0.0", 104, "p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"WOCN\")", "其它" },
+                    { 103, "0.0", 103, "p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PCTCN\")", "其它" },
+                    { 102, "0.0", 102, "p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PACN\")", "其它" },
+                    { 100, "0.0", 100, "p.DoItem==\"内部检索\"", "其它" },
+                    { 66, "0.2", 66, "p.DoItem==\"口审评估\" && p.DoItemCoefficient==\"非实质\"", "OA" },
+                    { 73, "1.5", 73, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAGB\")", "OA" },
+                    { 64, "1.5", 64, "p.DoItem==\"欧洲案答辩\" && p.DoItemCoefficient==\"实质\"", "OA" },
+                    { 30, "0.7", 29, "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\")", "新申请" },
+                    { 29, "1.0", 30, "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\") && p.Customer.Name.Contains(\"OPPO\")", "新申请" },
+                    { 28, "1.0", 28, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")", "新申请" },
+                    { 27, "0.1", 27, "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")", "新申请" },
+                    { 65, "0.2", 65, "p.DoItem==\"欧洲案答辩\" && p.DoItemCoefficient==\"形式\"", "OA" },
+                    { 25, "0.5", 25, "p.CaseNo.StartsWith(\"PAUS\") && (p.CaseNo.EndsWith(\"-同套\") || p.CaseNo.EndsWith(\"CA\") || p.CaseNo.EndsWith(\"CIP\") || p.CaseNo.EndsWith(\"分案\")) ", "新申请" },
+                    { 24, "0.3", 24, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-分案\")", "新申请" },
+                    { 23, "1.8", 23, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAEPO\")", "新申请" },
+                    { 22, "0.2", 22, "p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"大陆案转台湾案\"", "新申请" },
+                    { 21, "1.0", 21, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"", "新申请" },
+                    { 20, "0.2", 20, "p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"台湾案转大陆案\"", "新申请" },
+                    { 19, "0.1", 19, "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"", "新申请" },
+                    { 18, "0.7", 18, "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"", "新申请" },
+                    { 17, "0.1", 17, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"", "新申请" },
+                    { 16, "0.1", 16, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"转格式\"", "新申请" },
+                    { 15, "1.5", 15, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"外-内首次申请\"", "新申请" },
+                    { 14, "1.0", 14, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"首次中文案\"", "新申请" }
+                });
+
+            migrationBuilder.InsertData(
+                table: "BasePointRule",
+                columns: new[] { "Id", "PointExpress", "Priority", "Rule", "Type" },
+                values: new object[,]
+                {
+                    { 13, "0.7", 13, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"涉外实质改权\"", "新申请" },
+                    { 12, "0.5", 12, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"改权+改说明书\"", "新申请" },
+                    { 11, "0.3", 11, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"改权\"", "新申请" },
+                    { 10, "1.8", 10, "p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"PCT首次英文案\"", "新申请" },
+                    { 9, "0.2", 9, "p.AgentFeedbackMemo==\"我方转格式、复核\"", "新申请" },
+                    { 8, "0.0", 8, "p.AgentFeedbackMemo==\"我方代交\"", "新申请" },
+                    { 7, "1.26", 7, "p.CaseNo.StartsWith(\"PAUS\")  && p.AgentFeedbackMemo==\"发文后客户原因取消申请,系统结案\"", "新申请" },
+                    { 6, "1.33", 6, "p.CaseNo.StartsWith(\"PADE\")  && p.AgentFeedbackMemo==\"发文后客户原因取消申请,系统结案\"", "新申请" },
+                    { 5, "0.7", 5, "p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"发文后客户取消申请\"", "新申请" },
+                    { 4, "0.49", 4, "p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"发文后客户取消申请\"", "新申请" },
+                    { 3, "0.0", 3, "p.AgentFeedbackMemo==\"撰写中客户取消申请\"", "新申请" },
+                    { 2, "0.2", 2, "p.AgentFeedbackMemo==\"检索结案\"", "新申请" },
+                    { 31, "1.9", 31, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PADE\")", "新申请" },
+                    { 32, "1.9", 32, "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PADE\")", "新申请" },
+                    { 26, "1.0", 26, "p.DoItem==\"新申请\"  && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")", "新申请" },
+                    { 34, "1.8", 34, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAGB\")", "新申请" },
+                    { 63, "0.2", 63, "p.DoItem==\"RCE\" && p.DoItemCoefficient==\"形式\"", "OA" },
+                    { 62, "1.5", 62, "p.DoItem==\"RCE\" && p.DoItemCoefficient==\"实质\"", "OA" },
+                    { 61, "0.2", 61, "p.DoItem==\"Non Final Action\" && p.DoItemCoefficient==\"形式\"", "OA" },
+                    { 60, "1.5", 60, "p.DoItem==\"Non Final Action\" && p.DoItemCoefficient==\"实质\"", "OA" },
+                    { 59, "0.1", 59, "p.DoItem==\"form 3-8(2)\" ||  p.DoItem==\"Form 3-8(2)\"", "OA" },
+                    { 58, "0.1", 58, "p.DoItem==\"form 3\"", "OA" },
+                    { 33, "0.2", 33, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAEPO\")", "新申请" },
+                    { 56, "1.5", 56, "p.DoItem==\"Final Action\" && p.DoItemCoefficient==\"实质\"", "OA" },
+                    { 55, "0.2", 55, "p.DoItem==\"Advisory Action\" && p.DoItemCoefficient==\"形式\"", "OA" },
+                    { 54, "1.5", 54, "p.DoItem==\"Advisory Action\" && p.DoItemCoefficient==\"实质\"", "OA" },
+                    { 53, "0.8", 53, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"客户未提供答辩点,撰写英文报导函\"", "OA" },
+                    { 52, "0.5", 52, "p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"客户提供答辩点,撰写英文报导函\"", "OA" },
+                    { 51, "0.2", 51, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"", "OA" },
+                    { 50, "0.5", 50, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"", "OA" },
+                    { 57, "0.2", 57, "p.DoItem==\"Final Action\" && p.DoItemCoefficient==\"形式\"", "OA" },
+                    { 48, "0.35", 48, "p.DoItem==\"请求复审\" && p.ApplicationType==\"实用新型\"  && p.AgentFeedbackMemo==\"请款\"", "OA" },
+                    { 49, "0.3", 49, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"非实质\"  && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"", "OA" },
+                    { 35, "1.7", 36, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAUS\") && p.Customer.Name.Contains(\"OPPO\")", "新申请" },
+                    { 36, "1.8", 35, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAUS\")", "新申请" },
+                    { 37, "1.5", 37, "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PCTCN\")", "新申请" },
+                    { 38, "0.0", 38, "(p.ApplicationType==\"实用新型\" || p.ApplicationType==\"发明\") && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"客户不进行答辩\"", "新申请" },
+                    { 40, "p.WordCount/1000*0.16", 40, "p.DoItem==\"新申请\") && p.AgentFeedbackMemo==\"中-英\" && p.WordCount !=null", "新申请" },
+                    { 39, "p.WordCount/1000*0.1", 39, "p.DoItem==\"新申请\") && p.AgentFeedbackMemo==\"英-中\" && p.WordCount !=null", "新申请" },
+                    { 42, "0.1", 42, "p.AgentFeedbackMemo==\"涉外OA不答辩,发报导函结案\"", "OA" },
+                    { 43, "0.2", 43, "p.ApplicationType==\"外观设计\"", "OA" },
+                    { 44, "0.0", 44, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"实用新型\"  && p.AgentFeedbackMemo==\"不请款\"", "OA" }
+                });
+
+            migrationBuilder.InsertData(
+                table: "BasePointRule",
+                columns: new[] { "Id", "PointExpress", "Priority", "Rule", "Type" },
+                values: new object[,]
+                {
+                    { 45, "0.0", 45, "p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\" || p.CaseStage==\"六通\" || p.CaseStage==\"七通\" || p.CaseStage==\"八通\") ", "OA" },
+                    { 46, "0.14", 46, "p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && p.CaseStage==\"二通\" && p.AgentFeedbackMemo==\"请款\"", "OA" },
+                    { 47, "0.35", 47, "p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && p.CaseStage==\"一通\" && p.AgentFeedbackMemo==\"请款\"", "OA" },
+                    { 41, "p.WordCount/1000*0.18", 41, "p.DoItem==\"新申请\") && p.AgentFeedbackMemo==\"中-德\" && p.WordCount !=null", "新申请" }
+                });
+
+            migrationBuilder.InsertData(
+                table: "StaffGrade",
+                columns: new[] { "Id", "Coefficient", "Grade" },
+                values: new object[,]
+                {
+                    { 14, 1.1000000000000001, "A级" },
+                    { 9, 0.69999999999999996, "C2级" },
+                    { 13, 0.5, "D1级" },
+                    { 12, 0.59999999999999998, "D2级" },
+                    { 11, 0.59999999999999998, "D3级" },
+                    { 10, 0.69999999999999996, "C1级" },
+                    { 8, 0.90000000000000002, "C3级" },
+                    { 1, 1.2, "S级" },
+                    { 6, 1.0, "B2级" },
+                    { 5, 1.0, "B3级" },
+                    { 4, 1.1000000000000001, "A1级" },
+                    { 3, 1.1000000000000001, "A2级" },
+                    { 2, 1.1000000000000001, "A3级" },
+                    { 15, 1.0, "C级" },
+                    { 7, 0.90000000000000002, "B1级" },
+                    { 16, 0.90000000000000002, "D级" }
+                });
+
+            migrationBuilder.InsertData(
+                table: "VerifyCoefficient",
+                columns: new[] { "CheckerId", "DoPersonId", "Coefficient" },
+                values: new object[,]
+                {
+                    { 1, 5, 0.29999999999999999 },
+                    { 6, 9, 0.29999999999999999 },
+                    { 1, 10, 0.40000000000000002 },
+                    { 2, 10, 0.29999999999999999 },
+                    { 3, 10, 0.29999999999999999 },
+                    { 4, 10, 0.29999999999999999 },
+                    { 5, 10, 0.29999999999999999 },
+                    { 6, 10, 0.29999999999999999 },
+                    { 1, 11, 0.5 },
+                    { 2, 11, 0.40000000000000002 },
+                    { 3, 11, 0.40000000000000002 },
+                    { 4, 11, 0.40000000000000002 },
+                    { 5, 11, 0.40000000000000002 },
+                    { 6, 11, 0.40000000000000002 },
+                    { 1, 12, 0.5 },
+                    { 2, 12, 0.40000000000000002 },
+                    { 3, 12, 0.40000000000000002 },
+                    { 4, 12, 0.40000000000000002 },
+                    { 5, 12, 0.40000000000000002 },
+                    { 6, 12, 0.40000000000000002 },
+                    { 1, 13, 0.59999999999999998 },
+                    { 2, 13, 0.5 },
+                    { 3, 13, 0.5 },
+                    { 4, 13, 0.5 },
+                    { 5, 9, 0.29999999999999999 },
+                    { 4, 9, 0.29999999999999999 },
+                    { 3, 9, 0.29999999999999999 },
+                    { 2, 9, 0.29999999999999999 },
+                    { 2, 5, 0.20000000000000001 },
+                    { 3, 5, 0.20000000000000001 },
+                    { 4, 5, 0.20000000000000001 },
+                    { 5, 5, 0.20000000000000001 },
+                    { 1, 6, 0.29999999999999999 },
+                    { 2, 6, 0.20000000000000001 },
+                    { 3, 6, 0.20000000000000001 },
+                    { 4, 6, 0.20000000000000001 },
+                    { 5, 6, 0.20000000000000001 },
+                    { 6, 5, 0.20000000000000001 },
+                    { 6, 6, 0.20000000000000001 },
+                    { 5, 13, 0.5 },
+                    { 1, 7, 0.29999999999999999 },
+                    { 3, 7, 0.20000000000000001 }
+                });
+
+            migrationBuilder.InsertData(
+                table: "VerifyCoefficient",
+                columns: new[] { "CheckerId", "DoPersonId", "Coefficient" },
+                values: new object[,]
+                {
+                    { 4, 7, 0.20000000000000001 },
+                    { 5, 7, 0.20000000000000001 },
+                    { 6, 7, 0.20000000000000001 },
+                    { 1, 8, 0.29999999999999999 },
+                    { 2, 8, 0.20000000000000001 },
+                    { 3, 8, 0.20000000000000001 },
+                    { 4, 8, 0.20000000000000001 },
+                    { 5, 8, 0.20000000000000001 },
+                    { 6, 8, 0.20000000000000001 },
+                    { 1, 9, 0.40000000000000002 },
+                    { 2, 7, 0.20000000000000001 },
+                    { 6, 13, 0.5 }
+                });
+
+            migrationBuilder.CreateIndex(
+                name: "IX_AppealRecord_CreaterId",
+                table: "AppealRecord",
+                column: "CreaterId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_AppealRecord_ReviewerId",
+                table: "AppealRecord",
+                column: "ReviewerId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_AppealRecord_TypeId",
+                table: "AppealRecord",
+                column: "TypeId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_AttachFile_AppealRecordId",
+                table: "AttachFile",
+                column: "AppealRecordId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_AttachFile_AppealRecordId1",
+                table: "AttachFile",
+                column: "AppealRecordId1");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_AttachFile_UploadUserId",
+                table: "AttachFile",
+                column: "UploadUserId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_Customer_ResponseManId",
+                table: "Customer",
+                column: "ResponseManId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_InputField_AppealTypeId",
+                table: "InputField",
+                column: "AppealTypeId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_InputFieldValue_AppealRecordId",
+                table: "InputFieldValue",
+                column: "AppealRecordId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_InputFieldValue_InputFieldId",
+                table: "InputFieldValue",
+                column: "InputFieldId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_ItemStaff_DoPersonId",
+                table: "ItemStaff",
+                column: "DoPersonId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_Message_FromId",
+                table: "Message",
+                column: "FromId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_MessagePerformanceItems_MessageId",
+                table: "MessagePerformanceItems",
+                column: "MessageId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_MessageReadRecord_MessageId1",
+                table: "MessageReadRecord",
+                column: "MessageId1");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_MessageReadRecord_StaffId",
+                table: "MessageReadRecord",
+                column: "StaffId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_PerformanceItem_CalMonthId",
+                table: "PerformanceItem",
+                column: "CalMonthId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_PerformanceItem_CustomerId",
+                table: "PerformanceItem",
+                column: "CustomerId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_PerformanceItem_PreOAStaffId",
+                table: "PerformanceItem",
+                column: "PreOAStaffId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_PerformanceItem_ReviewerId",
+                table: "PerformanceItem",
+                column: "ReviewerId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_Staff_StaffGradeId",
+                table: "Staff",
+                column: "StaffGradeId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_VerifyCoefficient_DoPersonId",
+                table: "VerifyCoefficient",
+                column: "DoPersonId");
+        }
+
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropTable(
+                name: "AttachFile");
+
+            migrationBuilder.DropTable(
+                name: "BasePointRule");
+
+            migrationBuilder.DropTable(
+                name: "InputFieldValue");
+
+            migrationBuilder.DropTable(
+                name: "ItemStaff");
+
+            migrationBuilder.DropTable(
+                name: "MessagePerformanceItems");
+
+            migrationBuilder.DropTable(
+                name: "MessageReadRecord");
+
+            migrationBuilder.DropTable(
+                name: "VerifyCoefficient");
+
+            migrationBuilder.DropTable(
+                name: "AppealRecord");
+
+            migrationBuilder.DropTable(
+                name: "InputField");
+
+            migrationBuilder.DropTable(
+                name: "PerformanceItem");
+
+            migrationBuilder.DropTable(
+                name: "Message");
+
+            migrationBuilder.DropTable(
+                name: "AppealType");
+
+            migrationBuilder.DropTable(
+                name: "CalMonth");
+
+            migrationBuilder.DropTable(
+                name: "Customer");
+
+            migrationBuilder.DropTable(
+                name: "Staff");
+
+            migrationBuilder.DropTable(
+                name: "StaffGrade");
+        }
+    }
+}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1451 - 10
wispro.sp.api/Migrations/spDbContextModelSnapshot.cs


+ 1 - 0
wispro.sp.api/Utility/Utility.cs

@@ -30,6 +30,7 @@ namespace wispro.sp.api.Utility
                 {
                     interpreter.SetVariable("p", item);
                     item.BasePoint = (double?)interpreter.Eval(rule.PointExpress);
+                    item.Type = rule.Type;
                     break;
                 }
             }

+ 1 - 1
wispro.sp.api/appsettings.json

@@ -26,7 +26,7 @@
     "Account": "caiyangl",
     "Password": "j)wx*lier*@3",
     "ChormeDriverPath": "D:\\source\\repos\\ConsoleApp2\\ConsoleApp2\\bin\\Debug",
-    "ScheduleSetting": "30 20 20 * * ? *"
+    "ScheduleSetting": "30 15 17 * * ? *"
   },
 
   "MailSetting": {

+ 224 - 1
wispro.sp.api/spDbContext.cs

@@ -35,6 +35,14 @@ namespace wispro.sp.api
 
         public virtual DbSet<BasePointRule> BasePointRules { get; set; }
 
+        public virtual DbSet<InputField> InputFields { get; set; }
+
+        public virtual DbSet<InputFieldValue> InputFieldValues { get; set; }
+
+        public virtual DbSet<AppealType> AppealTypes { get; set; }
+
+        public virtual DbSet<AppealRecord> AppealRecords { get; set; }
+
         protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
         {
             if (!optionsBuilder.IsConfigured)
@@ -46,6 +54,14 @@ namespace wispro.sp.api
 
         protected override void OnModelCreating(ModelBuilder modelBuilder)
         {
+            modelBuilder.Entity<BasePointRule>(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<CalMonth>(entity =>
                 {
                     entity.ToTable("CalMonth");
@@ -304,7 +320,76 @@ namespace wispro.sp.api
                 entity.HasOne(d => d.UploadUser)
                     .WithMany()
                     .HasForeignKey(d => d.UploadUserId)
-                    .HasConstraintName("FK_AttachFile_UpdateUser");
+                    .HasConstraintName("FK_AttachFile_UpdateUser")
+                    .OnDelete(DeleteBehavior.NoAction);
+
+                entity.HasOne(d => d.AppealRecord)
+                    .WithMany()
+                    .HasForeignKey(d => d.AppealRecordId)
+                    .HasConstraintName("FK_AttachFile_AppealRecord");
+            });
+
+            modelBuilder.Entity<AppealType>(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<AppealRecord>(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<InputField>(entity=> {
+                entity.ToTable("InputField");
+
+                entity.Property(e=>e.FieldName).HasMaxLength(50);
+                entity.Property(e => e.FieldType).HasMaxLength(50);
+                entity.Property(e => e.FieldValue).HasMaxLength(500);
+                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<InputFieldValue>(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<StaffGrade>().HasData(
@@ -395,6 +480,144 @@ namespace wispro.sp.api
                 }
                 );
 
+            BasePointRule[] rules = new BasePointRule[]
+            {
+                new BasePointRule(){Rule="p.DoItem==\"发明一次OA授权\" && p.ApplicationType==\"发明\"",PointExpress="0.2",Type="一次OA授权",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\"",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<BasePointRule>().HasData(rules);
 
             OnModelCreatingPartial(modelBuilder);
         }

+ 25 - 0
wispro.sp.utility/MD5.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Cryptography;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace wispro.sp.utility
+{
+    public class MD5Utility
+    {
+        public static string GetMD5(string myString)
+        {
+            MD5 md5 = new MD5CryptoServiceProvider();
+            byte[] fromData = System.Text.Encoding.Unicode.GetBytes(myString);
+            byte[] targetData = md5.ComputeHash(fromData);
+            string byte2String = null;
+            for (int i = 0; i < targetData.Length; i++)
+            {
+                byte2String += targetData[i].ToString("x");
+            }
+            return byte2String;
+        }
+    }
+}

+ 5 - 2
wispro.sp.web/Layouts/BasicLayout.razor

@@ -6,8 +6,11 @@
     <AuthorizeView>
         <Authorized>
             
-            <AntDesign.ProLayout.BasicLayout Logo="@("images/小美logo-64-64.png")" Collapsed="true"
-                           MenuData="_menuData" Theme="MenuTheme.Light" Layout="AntDesign.ProLayout.Layout.Mix">
+            <AntDesign.ProLayout.BasicLayout 
+                           Logo="@("images/小美logo-64-64.png")"
+                           MenuData="_menuData" 
+                           Theme="MenuTheme.Light" 
+                           Layout="AntDesign.ProLayout.Layout.Mix">
 
                 <RightContentRender>
                     <wispro.sp.web.Components.RightContent />

+ 3 - 1
wispro.sp.web/Pages/AppCase/MyCaselist.razor

@@ -2,6 +2,8 @@
 @using wispro.sp.web.Components
 @using wispro.sp.share 
 
+@inject IAgentFeedBackMemoItemsService _afService; 
+
 <PageContainer TabList="@tabList" OnTabChange="OnTabChange">
     <Breadcrumb>
         <Breadcrumb>
@@ -148,7 +150,7 @@
                                         <Body>
                                             <Descriptions Bordered Size="@DescriptionsSize.Small">
                                                 <DescriptionsItem Title="绩效特殊字段" Span="3">
-                                                    <Select DataSource="@_Reasons"
+                                                    <Select DataSource="@_afService.GetItems(context.Data)"
                                                             @bind-Value="@context.Data.AgentFeedbackMemo"
                                                             LabelName="@nameof(Reason.Name)"
                                                             ValueName="@nameof(Reason.Value)"

+ 6 - 41
wispro.sp.web/Pages/AppCase/MyCaselist.razor.cs

@@ -32,45 +32,8 @@ namespace wispro.sp.web.Pages.AppCase
             new() { Text = "C", Value = "C" },
             new() { Text = "D", Value = "D" }
         };
-        class Reason
-        {
-            public string Value { get; set; }
-            public string Name { get; set; }
-        }
-
-        List<Reason> _Reasons = new List<Reason>()
-        {
-            new Reason(){Name="PCT首次英文案",Value="PCT首次英文案"},
-            new Reason(){Name="我方转格式、复核",Value="我方转格式、复核"},
-            new Reason(){Name="台湾案转大陆案",Value="台湾案转大陆案"},
-            new Reason(){Name="大陆案转台湾案",Value="大陆案转台湾案"},
-            new Reason(){Name="同套大陆+台湾",Value="同套大陆+台湾"},
-            new Reason(){Name="不请款",Value="不请款"},
-            new Reason(){Name="撤回后重新递交",Value="撤回后重新递交"},
-            new Reason(){Name="发文后客户取消申请",Value="发文后客户取消申请"},
-            new Reason(){Name="发文后客户原因取消申请,系统结案",Value="发文后客户原因取消申请,系统结案"},
-            new Reason(){Name="改权",Value="改权"},
-            new Reason(){Name="改权+改说明书",Value="改权+改说明书"},
-            new Reason(){Name="客户不进行答辩",Value="客户不进行答辩"},
-            new Reason(){Name="客户提供答辩点,撰写英文报导函",Value="客户提供答辩点,撰写英文报导函"},
-            new Reason(){Name="客户未提供答辩点,撰写英文报导函",Value="客户未提供答辩点,撰写英文报导函辩"},
-            new Reason(){Name="内-外",Value="内-外"},
-            new Reason(){Name="外-内",Value="外-内"},
-            new Reason(){Name="外-内首次申请",Value="外-内首次申请"},
-            new Reason(){Name="请款",Value="请款"},
-            new Reason(){Name="涉外OA不答辩,发报导函结案",Value="涉外OA不答辩,发报导函结案"},
-            new Reason(){Name="涉外实质改权",Value="涉外实质改权"},
-            new Reason(){Name="首次中文案",Value="首次中文案"},
-            new Reason(){Name="我方转格式、复核",Value="我方转格式、复核"},
-            new Reason(){Name="外所/他人首次转入OA",Value="外所/他人首次转入OA"},
-            new Reason(){Name="我方代交",Value="我方代交"},
-            new Reason(){Name="转格式",Value="转格式"},
-            new Reason(){Name="撰写中客户取消申请",Value="撰写中客户取消申请"},
-            new Reason(){Name="中-英",Value="中-英"},
-            new Reason(){Name="英-中",Value="英-中"},
-            new Reason(){Name="英-德",Value="英-德"},
-            new Reason(){Name="已算绩效",Value="已算绩效"}
-        };
+        
+        
         private List<PerformanceItem> _Datas;
         private List<StaffStatistics> MyStatistics;
         IEnumerable<PerformanceItem> selectedItems= new List<PerformanceItem>();
@@ -119,8 +82,10 @@ namespace wispro.sp.web.Pages.AppCase
         private async Task RefreshMyStatistics()
         {
             var HandlingCalMonth = await _CalMonthService.GetHandlingMonth();
-
-            MyStatistics = await _ItemService.CalMyStatistics(HandlingCalMonth.Year, HandlingCalMonth.Month, _userService.CurrentUser.Userid.Value);
+            if (HandlingCalMonth != null)
+            {
+                MyStatistics = await _ItemService.CalMyStatistics(HandlingCalMonth.Year, HandlingCalMonth.Month, _userService.CurrentUser.Userid.Value);
+            }
             
         }
 

+ 2 - 0
wispro.sp.web/Program.cs

@@ -37,6 +37,8 @@ namespace wispro.sp.web
             builder.Services.AddScoped<IAuthService, AuthService>();
             builder.Services.AddScoped<TaskService, TaskService>(); 
             builder.Services.AddScoped<CalMonthServices, CalMonthServices>();
+            builder.Services.AddScoped<IAgentFeedBackMemoItemsService, AgentFeedbackMemoItemsServices>();
+
 
             await builder.Build().RunAsync();
         }

+ 110 - 0
wispro.sp.web/Services/AgentFeedbackMemoItemsServices.cs

@@ -0,0 +1,110 @@
+using DynamicExpresso;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using wispro.sp.entity;
+
+namespace wispro.sp.web.Services
+{
+    public class Reason
+    {
+        public string Value { get; set; }
+        public string Name { get; set; }
+
+        public List<string> Expresses {get;set;}
+    }
+
+    public interface IAgentFeedBackMemoItemsService
+    {
+        List<Reason> GetItems(PerformanceItem item);
+    }
+
+    public class AgentFeedbackMemoItemsServices:IAgentFeedBackMemoItemsService
+    {
+        List<Reason> _Reasons = new List<Reason>()
+        {
+            new Reason(){Name="PCT首次英文案",Value="PCT首次英文案", Expresses= new List<string>(){ "p.DoItem==\"新申请\"" } },
+            new Reason(){Name="我方转格式、复核",Value="我方转格式、复核" ,Expresses= new List<string>()},
+            new Reason(){Name="台湾案转大陆案",Value="台湾案转大陆案",Expresses= new List<string>(){ "p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PACN\") " } },
+            new Reason(){Name="大陆案转台湾案",Value="大陆案转台湾案",Expresses= new List<string>(){ "p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PATW\") " } },
+            new Reason(){Name="同套大陆+台湾",Value="同套大陆+台湾",Expresses= new List<string>(){
+                "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PATW\")",
+                "p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PACN\")",
+                "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\")",
+                "p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PATW\")"} },
+            new Reason(){Name="不请款",Value="不请款",Expresses= new List<string>(){ 
+                "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"实用新型\"", 
+                "p.DoItem==\"意见陈述\" && p.ApplicationType==\"实用新型\"" } },
+            new Reason(){Name="撤回后重新递交",Value="撤回后重新递交",Expresses= new List<string>()},
+            new Reason(){Name="发文后客户取消申请",Value="发文后客户取消申请",Expresses= new List<string>(){
+                "p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\")",
+                "p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")"} },
+            new Reason(){Name="发文后客户原因取消申请,系统结案",Value="发文后客户原因取消申请,系统结案",Expresses= new List<string>(){
+                "p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PADE\")",
+                "p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PAUS\")",
+                "p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PAIN\")",
+                "p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PAGB\")",
+                "p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PAEPO\")",
+            } },
+            new Reason(){Name="改权",Value="改权",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" } },
+            new Reason(){Name="改权+改说明书",Value="改权+改说明书",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" }},
+            new Reason(){Name="客户不进行答辩",Value="客户不进行答辩",Expresses= new List<string>(){ "p.DoItem==\"处理审查意见\"" } },
+            new Reason(){Name="客户提供答辩点,撰写英文报导函",Value="客户提供答辩点,撰写英文报导函",Expresses= new List<string>(){ 
+                "p.DoItem==\"处理审查意见\" && !p.CaseNo.Contains(\"CN\")" } },
+            new Reason(){Name="客户未提供答辩点,撰写英文报导函",Value="客户未提供答辩点,撰写英文报导函辩",Expresses= new List<string>(){ "p.DoItem==\"处理审查意见\" && !p.CaseNo.Contains(\"CN\")" }},
+            new Reason(){Name="内-外",Value="内-外",Expresses= new List<string>(){ "p.DoItem==\"翻译校核\"" } },
+            new Reason(){Name="外-内",Value="外-内",Expresses= new List<string>(){ "p.DoItem==\"翻译校核\"" }},
+            new Reason(){Name="外-内首次申请",Value="外-内首次申请",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" } },
+            new Reason(){Name="请款",Value="请款",Expresses= new List<string>(){
+                "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"实用新型\"  && p.CaseStage==\"二通\"",
+                "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"实用新型\"  && p.CaseStage==\"一通\"",
+                "p.DoItem==\"请求复审\" && p.ApplicationType==\"实用新型\"",
+                "p.DoItem==\"意见陈述\" && p.ApplicationType==\"实用新型\"",
+            } },
+            new Reason(){Name="涉外OA不答辩,发报导函结案",Value="涉外OA不答辩,发报导函结案",Expresses= new List<string>(){ "p.DoItem==\"处理审查意见\"" } },
+            new Reason(){Name="涉外实质改权",Value="涉外实质改权",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" } },
+            new Reason(){Name="首次中文案",Value="首次中文案",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" } },
+            new Reason(){Name="我方转格式、复核",Value="我方转格式、复核",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" } },
+            new Reason(){Name="外所/他人首次转入OA",Value="外所/他人首次转入OA",Expresses= new List<string>(){ "p.DoItem==\"处理审查意见\"" } },
+            new Reason(){Name="我方代交",Value="我方代交",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" } },
+            new Reason(){Name="转格式",Value="转格式",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" } },
+            new Reason(){Name="撰写中客户取消申请",Value="撰写中客户取消申请",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" }},
+            new Reason(){Name="中-英",Value="中-英",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" , "p.DoItem==\"翻译\"" } },
+            new Reason(){Name="英-中",Value="英-中",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" , "p.DoItem==\"翻译\"" }},
+            new Reason(){Name="英-德",Value="英-德",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" , "p.DoItem==\"翻译\"" }},
+            new Reason(){Name="已算绩效",Value="已算绩效",Expresses= new List<string>(){ "p.DoItem==\"新申请\"" , "p.DoItem==\"翻译\"" }}
+        };
+
+        public List<Reason> GetItems(PerformanceItem item)
+        {
+            List<Reason> retList = new List<Reason>();
+
+            foreach(var r in _Reasons)
+            {
+                if(r.Expresses == null || r.Expresses.Count == 0)
+                {
+                    retList.Add(r);
+                }
+                else
+                {
+                    foreach(string strExpress in r.Expresses)
+                    {
+                        var interpreter = new Interpreter();
+                        //item.ApplicationType
+                        Func<PerformanceItem, bool> func = interpreter.ParseAsDelegate<Func<PerformanceItem, bool>>(strExpress, "p");
+                        bool result = func.Invoke(item);
+
+                        if (result)
+                        {
+                            retList.Add(r);
+                            break;
+                        }
+                    }
+                }
+            }
+
+            return retList;
+        }
+    }
+}

+ 10 - 2
wispro.sp.web/Services/CalMonthServices.cs

@@ -21,8 +21,16 @@ namespace wispro.sp.web.Services
         }
         public async  Task<CalMonth> GetHandlingMonth()
         {
-            var data = await _httpClient.GetFromJsonAsync<CalMonth>($"http://localhost:39476/api/CalMonth/GetHandlingMonth");
-            return data;
+            try
+            {
+                var data = await _httpClient.GetFromJsonAsync<CalMonth>($"http://localhost:39476/api/CalMonth/GetHandlingMonth");
+                return data;
+            }
+            catch(Exception ex)
+            {
+                Console.WriteLine(ex.ToString());
+                return null;
+            }
         }
     }
 }

+ 1 - 0
wispro.sp.web/wispro.sp.web.csproj

@@ -14,6 +14,7 @@
     <PackageReference Include="AntDesign.Charts" Version="0.2.1" />
     <PackageReference Include="AntDesign.ProLayout" Version="0.1.8" />
     <PackageReference Include="Blazored.LocalStorage" Version="4.1.5" />
+    <PackageReference Include="DynamicExpresso.Core" Version="2.9.3" />
     <PackageReference Include="Microsoft.AspNetCore.Authorization" Version="5.0.9" />
     <PackageReference Include="Microsoft.AspNetCore.Authorization.Policy" Version="2.2.0" />
     <PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="5.0.9" />

+ 28 - 27
wispro.sp.winClient/Form1.cs

@@ -100,33 +100,33 @@ namespace wispro.sp.winClient
             {
                 new BasePointRule(){Rule="p.ApplicationType==\"外观设计\"",PointExpress="0.2",Type="新申请",Priority=1},
                 new BasePointRule(){Rule="p.AgentFeedbackMemo==\"检索结案\"",PointExpress="0.2",Type="新申请",Priority=2},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"撰写中客户取消申请\"",PointExpress="0",Type="新申请",Priority=3},
+                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"撰写中客户取消申请\"",PointExpress="0.0",Type="新申请",Priority=3},
                 new BasePointRule(){Rule="p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"发文后客户取消申请\"",PointExpress="0.49",Type="新申请",Priority=4},
                 new BasePointRule(){Rule="p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"发文后客户取消申请\"",PointExpress="0.7",Type="新申请",Priority=5},
                 new BasePointRule(){Rule="p.CaseNo.StartsWith(\"PADE\")  && p.AgentFeedbackMemo==\"发文后客户原因取消申请,系统结案\"",PointExpress="1.33",Type="新申请",Priority=6},
                 new BasePointRule(){Rule="p.CaseNo.StartsWith(\"PAUS\")  && p.AgentFeedbackMemo==\"发文后客户原因取消申请,系统结案\"",PointExpress="1.26",Type="新申请",Priority=7},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"我方代交\"",PointExpress="0",Type="新申请",Priority=8},
+                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"我方代交\"",PointExpress="0.0",Type="新申请",Priority=8},
                 new BasePointRule(){Rule="p.AgentFeedbackMemo==\"我方转格式、复核\"",PointExpress="0.2",Type="新申请",Priority=9},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"PCT首次英文案\"",PointExpress="1.8",Type="新申请",Priority=10},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"改权\"",PointExpress="0.3",Type="新申请",Priority=11},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"改权+改说明书\"",PointExpress="0.5",Type="新申请",Priority=12},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"涉外实质改权\"",PointExpress="0.7",Type="新申请",Priority=13},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"首次中文案\"",PointExpress="1",Type="新申请",Priority=14},
+                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"首次中文案\"",PointExpress="1.0",Type="新申请",Priority=14},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"外-内首次申请\"",PointExpress="1.5",Type="新申请",Priority=15},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"转格式\"",PointExpress="0.1",Type="新申请",Priority=16},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="0.1",Type="新申请",Priority=17},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="0.7",Type="新申请",Priority=18},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="0.1",Type="新申请",Priority=19},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"台湾案转大陆案\"",PointExpress="0.2",Type="新申请",Priority=20},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="1",Type="新申请",Priority=21},
+                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="1.0",Type="新申请",Priority=21},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"大陆案转台湾案\"",PointExpress="0.2",Type="新申请",Priority=22},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="1.8",Type="新申请",Priority=23},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-分案\")",PointExpress="0.3",Type="新申请",Priority=24},
                 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=25},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\"  && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")",PointExpress="1",Type="新申请",Priority=26},
+                new BasePointRule(){Rule="p.DoItem==\"新申请\"  && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")",PointExpress="1.0",Type="新申请",Priority=26},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")",PointExpress="0.1",Type="新申请",Priority=27},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")",PointExpress="1",Type="新申请",Priority=28},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\") && p.Customer.Name.Contains(\"OPPO\")",PointExpress="1",Type="新申请",Priority=30},
+                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")",PointExpress="1.0",Type="新申请",Priority=28},
+                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\") && p.Customer.Name.Contains(\"OPPO\")",PointExpress="1.0",Type="新申请",Priority=30},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\")",PointExpress="0.7",Type="新申请",Priority=29},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PADE\")",PointExpress="1.9",Type="新申请",Priority=31},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PADE\")",PointExpress="1.9",Type="新申请",Priority=32},
@@ -135,15 +135,15 @@ namespace wispro.sp.winClient
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAUS\") && p.Customer.Name.Contains(\"OPPO\")",PointExpress="1.7",Type="新申请",Priority=36},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAUS\")",PointExpress="1.8",Type="新申请",Priority=35},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PCTCN\")",PointExpress="1.5",Type="新申请",Priority=37},
-                new BasePointRule(){Rule="(p.ApplicationType==\"实用新型\" || p.ApplicationType==\"发明\") && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"客户不进行答辩\"",PointExpress="0",Type="新申请",Priority=38},
+                new BasePointRule(){Rule="(p.ApplicationType==\"实用新型\" || p.ApplicationType==\"发明\") && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"客户不进行答辩\"",PointExpress="0.0",Type="新申请",Priority=38},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\") && p.AgentFeedbackMemo==\"英-中\" && p.WordCount !=null",PointExpress="p.WordCount/1000*0.1",Type="新申请",Priority=39},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\") && p.AgentFeedbackMemo==\"中-英\" && p.WordCount !=null",PointExpress="p.WordCount/1000*0.16",Type="新申请",Priority=40},
                 new BasePointRule(){Rule="p.DoItem==\"新申请\") && p.AgentFeedbackMemo==\"中-德\" && p.WordCount !=null",PointExpress="p.WordCount/1000*0.18",Type="新申请",Priority=41},
 
                 new BasePointRule(){Rule="p.AgentFeedbackMemo==\"涉外OA不答辩,发报导函结案\"",PointExpress="0.1",Type="OA",Priority=42},
                 new BasePointRule(){Rule="p.ApplicationType==\"外观设计\"",PointExpress="0.2",Type="OA",Priority=43},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"实用新型\"  && p.AgentFeedbackMemo==\"不请款\"",PointExpress="0",Type="OA",Priority=44},
-                new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\" || p.CaseStage==\"六通\" || p.CaseStage==\"七通\" || p.CaseStage==\"八通\") ",PointExpress="0",Type="OA",Priority=45},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"实用新型\"  && p.AgentFeedbackMemo==\"不请款\"",PointExpress="0.0",Type="OA",Priority=44},
+                new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\" || p.CaseStage==\"六通\" || p.CaseStage==\"七通\" || p.CaseStage==\"八通\") ",PointExpress="0.0",Type="OA",Priority=45},
                 new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && p.CaseStage==\"二通\" && p.AgentFeedbackMemo==\"请款\"",PointExpress="0.14",Type="OA",Priority=46},
                 new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && p.CaseStage==\"一通\" && p.AgentFeedbackMemo==\"请款\"",PointExpress="0.35",Type="OA",Priority=47},
                 new BasePointRule(){Rule="p.DoItem==\"请求复审\" && p.ApplicationType==\"实用新型\"  && p.AgentFeedbackMemo==\"请款\"",PointExpress="0.35",Type="OA",Priority=48},
@@ -190,19 +190,19 @@ namespace wispro.sp.winClient
                 new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"",PointExpress="0.2",Type="OA",Priority=89},
                 new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"二通\"",PointExpress="0.2",Type="OA",Priority=90},
                 new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"二通\"",PointExpress="0.2",Type="OA",Priority=91},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") &&  (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")",PointExpress="0",Type="OA",Priority=92},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PCTCN\") &&  (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")",PointExpress="0",Type="OA",Priority=93},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") &&  (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")",PointExpress="0.0",Type="OA",Priority=92},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PCTCN\") &&  (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")",PointExpress="0.0",Type="OA",Priority=93},
                 new BasePointRule(){Rule="p.DoItem==\"发明一次OA授权\" && p.ApplicationType==\"发明\"",PointExpress="0.2",Type="一次OA授权",Priority=94},
                 new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"内-外\"",PointExpress="0.7",Type="其它",Priority=95},
                 new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"外-内\"",PointExpress="0.5",Type="其它",Priority=96},
                 new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"内-外\"",PointExpress="0.3",Type="其它",Priority=97},
                 new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"外-内\"",PointExpress="0.2",Type="其它",Priority=98},
                 new BasePointRule(){Rule="p.AgentFeedbackMemo==\"检索结案\"",PointExpress="0.1",Type="其它",Priority=99},
-                new BasePointRule(){Rule="p.DoItem==\"内部检索\"",PointExpress="0",Type="其它",Priority=100},
+                new BasePointRule(){Rule="p.DoItem==\"内部检索\"",PointExpress="0.0",Type="其它",Priority=100},
                 new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAAU\")",PointExpress="0.2",Type="其它",Priority=101},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PACN\")",PointExpress="0",Type="其它",Priority=102},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PCTCN\")",PointExpress="0",Type="其它",Priority=103},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"WOCN\")",PointExpress="0",Type="其它",Priority=104},
+                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PACN\")",PointExpress="0.0",Type="其它",Priority=102},
+                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PCTCN\")",PointExpress="0.0",Type="其它",Priority=103},
+                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"WOCN\")",PointExpress="0.0",Type="其它",Priority=104},
                 new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PADE\")",PointExpress="0.2",Type="其它",Priority=105},
                 new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="0.2",Type="其它",Priority=106},
                 new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAGB\")",PointExpress="0.2",Type="其它",Priority=107},
@@ -211,23 +211,24 @@ namespace wispro.sp.winClient
                 new BasePointRule(){Rule="p.DoItem==\"Election Action\"",PointExpress="0.2",Type="其它",Priority=110},
                 new BasePointRule(){Rule="p.DoItem==\"OA答辩校核\"",PointExpress="0.2",Type="其它",Priority=111},
                 new BasePointRule(){Rule="p.DoItem==\"PPH\"",PointExpress="0.1",Type="其它",Priority=112},
-                new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PACN\")",PointExpress="0",Type="其它",Priority=113},
+                new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PACN\")",PointExpress="0.0",Type="其它",Priority=113},
                 new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PAEPO\") ",PointExpress="0.2",Type="其它",Priority=114},
                 new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PAUS\")",PointExpress="0.2",Type="其它",Priority=115},
                 new BasePointRule(){Rule="p.DoItem==\"分案评估\"",PointExpress="0.1",Type="其它",Priority=116},
                 new BasePointRule(){Rule="p.DoItem==\"分案评估+分案\"",PointExpress="0.2",Type="其它",Priority=117},
-                new BasePointRule(){Rule="p.DoItem==\"绘图\"",PointExpress="0",Type="其它",Priority=118},
-                new BasePointRule(){Rule="p.DoItem==\"技术确认\"",PointExpress="0",Type="其它",Priority=119},
+                new BasePointRule(){Rule="p.DoItem==\"绘图\"",PointExpress="0.0",Type="其它",Priority=118},
+                new BasePointRule(){Rule="p.DoItem==\"技术确认\"",PointExpress="0.0",Type="其它",Priority=119},
                 new BasePointRule(){Rule="p.DoItem==\"提交ids\"",PointExpress="0.1",Type="其它",Priority=120},
-                new BasePointRule(){Rule="p.DoItem==\"询问放弃或复审\"",PointExpress="0",Type="其它",Priority=121},
-                new BasePointRule(){Rule="p.DoItem==\"知识点总结\"",PointExpress="0",Type="其它",Priority=122},
-                new BasePointRule(){Rule="p.DoItem==\"专利挖掘与布局\"",PointExpress="0",Type="其它",Priority=123},
+                new BasePointRule(){Rule="p.DoItem==\"询问放弃或复审\"",PointExpress="0.0",Type="其它",Priority=121},
+                new BasePointRule(){Rule="p.DoItem==\"知识点总结\"",PointExpress="0.0",Type="其它",Priority=122},
+                new BasePointRule(){Rule="p.DoItem==\"专利挖掘与布局\"",PointExpress="0.0",Type="其它",Priority=123},
                 new BasePointRule(){Rule="p.ApplicationType==\"外观设计\"",PointExpress="0.2",Type="其它",Priority=124},
-                new BasePointRule(){Rule="p.DoItem==\"提交ids\"",PointExpress="0",Type="其它",Priority=125},
-                new BasePointRule(){Rule="p.DoItem==\"请求优先审查\"",PointExpress="0",Type="其它",Priority=126},
+                new BasePointRule(){Rule="p.DoItem==\"提交ids\"",PointExpress="0.0",Type="其它",Priority=125},
+                new BasePointRule(){Rule="p.DoItem==\"请求优先审查\"",PointExpress="0.0",Type="其它",Priority=126},
                 new BasePointRule(){Rule="p.DoItem==\"翻译\") && p.AgentFeedbackMemo==\"英-中\"",PointExpress="p.WordCount/1000*0.1",Type="其它",Priority=127},
                 new BasePointRule(){Rule="p.DoItem==\"翻译\") && p.AgentFeedbackMemo==\"中-英\"",PointExpress="p.WordCount/1000*0.16",Type="其它",Priority=128},
                 new BasePointRule(){Rule="p.DoItem==\"翻译\") && p.AgentFeedbackMemo==\"中-德\"",PointExpress="p.WordCount/1000*0.18",Type="其它",Priority=129},
+                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"已核算绩效\"",PointExpress="0.0",Type="其它",Priority=130}
             };
 
             foreach(BasePointRule rule in rules)
@@ -254,9 +255,9 @@ namespace wispro.sp.winClient
         {
             //await TestQueryFilter();
 
-            await InitRules();
+            //await InitRules();
 
-            return;
+            //return;
 
             await ImportUsers();
             await InputPerformanceItem("ExcelFiles\\21.01-21.06 工程师绩效报表-总表.xlsx", true, false, 0);
@@ -666,7 +667,7 @@ namespace wispro.sp.winClient
                 //staff.IsCalPerformsnce = (row["是否核算绩效"].ToString() == "是");
                 //staff.Memo = row["备注"].ToString().Trim();
 
-                staff.Password = "12345678";
+                staff.Password = MD5Utility.GetMD5("12345678");
                 //staff.StaffGradeId = row["姓名"].ToString();
 
                 await SaveStaff(staff);

+ 2 - 0
wospro.sp.entity/AppealRecord.cs

@@ -12,6 +12,8 @@ namespace wispro.sp.entity
 
         public Staff Creater { get; set; }
 
+        public int CreaterId { get; set; }
+
         public DateTime CreateTime { get; set; } = DateTime.Now;
 
         public List<AttachFile> AttachFiles { get; set; }

+ 1 - 3
wospro.sp.entity/AppealType.cs

@@ -26,8 +26,6 @@ namespace wispro.sp.entity
         /// </summary>
         public string ReviewerExpress { get; set; }
 
-        public virtual List<InputField> CreateInputFields { get; set; }
-
-        public virtual List<InputField> ReviewFields { get; set; }
+        
     }
 }

+ 2 - 1
wospro.sp.entity/InputFieldValue.cs

@@ -9,7 +9,6 @@ namespace wispro.sp.entity
     public class InputFieldValue
     {
         public int Id { get; set; }
-
         public virtual InputField InputField { get; set; }
         public int InputFieldId { get; set; }
 
@@ -17,6 +16,8 @@ namespace wispro.sp.entity
 
         public int AppealRecordId { get; set; }
 
+        public virtual AppealRecord AppealRecord { get; set; }
+