Ver código fonte

提取计算绩效代码为一个工具类
添加按字数算绩效添加界面

luocaiyang 3 anos atrás
pai
commit
777b916943

+ 27 - 0
wispro.sp.api/Controllers/CalMonthController.cs

@@ -0,0 +1,27 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using wispro.sp.entity;
+
+namespace wispro.sp.api.Controllers
+{
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    public class CalMonthController : ControllerBase
+    {
+        spDbContext Context;
+
+        public CalMonthController(spDbContext context)
+        {
+            Context = context;
+        }
+
+        public CalMonth GetHandlingMonth()
+        {
+            return Context.CalMonths.Where<CalMonth>(c => c.Status != 4).FirstOrDefault();
+        }
+    }
+}

+ 70 - 42
wispro.sp.api/Controllers/PerformanceItemController.cs

@@ -135,57 +135,85 @@ namespace wispro.sp.api.Controllers
         /// 更新绩效记录信息
         /// </summary>
         /// <param name="id">绩效记录编号</param>
-        /// <param name="field">栏位:0:代理人反馈信息;1:案件系数;2:处理事项系数;3:翻译字数;4:撤回的案号</param>
-        /// <param name="value">栏位值</param>
+        /// <param name="field">栏位,多个位以|杠隔开</param>
+        /// <param name="value">栏位值,多个以|杠隔开</param>
         /// <returns></returns>
         public ApiSaveResponse UpdateFieldValue(int id,string field,string value)
         {
             ApiSaveResponse ret = new ApiSaveResponse();
+            ret.Success = true;
 
             var item = Context.PerformanceItems.FirstOrDefault<PerformanceItem>(p => p.Id == id);
 
-            if(item!= null)
+            if (item == null)
             {
-                switch (field) {
-                    case "AgentFeedbackMemo":
-                        item.AgentFeedbackMemo = value;
-                        
-                        break;
-                    case "CaseCoefficient":
-                        item.CaseCoefficient = value;
-
-                        //此处添加保存到流程系统的代码
-                        break;
-                    case "DoItemCoefficient":
-                        item.DoItemCoefficient = value;
-
-                        //此处添加保存到流程系统的代码
-                        break;
-                    case "WordCount":
-                        int wordCount;
-                        if(int.TryParse(value,out wordCount))
-                        {
-                            item.WordCount = wordCount;
-                        }
-                        else
-                        {
-                            ret.Success = false;
-                            ret.ErrorMessage = "所给的栏位值不能转换成数字!";
-                            return ret;
-                        }
-                        break;
-                    case "ReturnCasseNo":
-                        item.ReturnCasseNo = value;
-                        break;
-                }
+                ret.Success = false;
+                ret.ErrorMessage = $"不存在的{id}";
 
-                Context.SaveChanges();
+                return ret;
             }
-            else
+
+            if(string.IsNullOrEmpty(field) || string.IsNullOrEmpty(value))
             {
                 ret.Success = false;
-                ret.ErrorMessage = $"不存在的{id}";
+                ret.ErrorMessage = $"参数不对!";
+
+                return ret;
+            }
+
+            string[] fields = field.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
+            string[] values= value.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
+
+            if (fields.Length != values.Length) {
+                ret.Success = false;
+                ret.ErrorMessage = "栏位和值对不匹配";
             }
+            else 
+            {
+                for(int i = 0; i < fields.Length; i++)
+                {
+                    string temField = fields[i];
+                    string temValue = values[i];
+                    switch (temField)
+                    {
+                        case "AgentFeedbackMemo":
+                            item.AgentFeedbackMemo = temValue;
+
+                            break;
+                        case "CaseCoefficient":
+                            item.CaseCoefficient = temValue;
+
+                            //此处添加保存到流程系统的代码
+                            break;
+                        case "DoItemCoefficient":
+                            item.DoItemCoefficient = temValue;
+
+                            //此处添加保存到流程系统的代码
+                            break;
+                        case "WordCount":
+                            int wordCount;
+                            if (int.TryParse(temValue, out wordCount))
+                            {
+                                item.WordCount = wordCount;
+                            }
+                            else
+                            {
+                                ret.Success = false;
+                                ret.ErrorMessage = "所给的栏位值不能转换成数字!";
+                                return ret;
+                            }
+                            break;
+                        case "ReturnCasseNo":
+                            item.ReturnCasseNo = temValue;
+                            break;
+                    }
+                }
+                
+                Utility.Utility.CalBasePoint(item, Context.BasePointRules.ToList());
+
+                Context.SaveChanges();
+            }
+            
             return ret;
         }
         public ListApiResponse<PerformanceItem> Query(int pageIndex,int pageSize)
@@ -279,6 +307,8 @@ namespace wispro.sp.api.Controllers
             return ret;
         }
 
+
+
         /// <summary>
         /// 计算指定用户,指定年月的绩效统计信息
         /// </summary>
@@ -325,9 +355,7 @@ namespace wispro.sp.api.Controllers
 
                     foreach (PerformanceItem item in ItemList)
                     {
-                        if (item.CaseNo == "JPACN2136576") {
-                            System.Diagnostics.Debug.WriteLine(item.CaseNo);
-                        }
+                        
                         if (item.BasePoint != null && item.BasePoint.Value > 0)
                         {
                             double doPersonBasePoint = item.BasePoint.Value;
@@ -414,7 +442,7 @@ namespace wispro.sp.api.Controllers
                                 }
                                 else
                                 {
-                                    if (itemStaff.DoPerson.IsOnJob)
+                                    if (itemStaff.DoPerson.StaffGrade != null && itemStaff.DoPerson.IsOnJob)
                                     {
                                         temStatic = new StaffStatistics()
                                         {

+ 7 - 28
wispro.sp.api/Job/ImportReportJob.cs

@@ -187,46 +187,25 @@ namespace wispro.sp.api.Job
 
             return Task.CompletedTask;
         }
+
+
         private Task SavePerformanceItem(PerformanceItem item,List<BasePointRule> rules)
         {
             try
             {
-                
-
-                #region 计算基本点数值及绩效类型
-                
-                rules.Sort((a, b) => {
-                    var o = b.Priority - a.Priority;
-                    return o;
-                });
-
-                Func<BasePointRule, PerformanceItem, double> pow = (x, y) => (y.WordCount == null) ? x.Point : (double)y.WordCount / 1000.00 * 0.18;
-
-                foreach (BasePointRule rule in rules)
-                {
-                    var interpreter = new Interpreter();
-                    //item.ApplicationType
-                    Func<PerformanceItem, bool> func = interpreter.ParseAsDelegate<Func<PerformanceItem, bool>>(rule.Rule, "p");
-                    bool result = func.Invoke(item);
-
-                    if (result)
-                    {
-                        item.BasePoint = pow.Invoke(rule, item);
-                        item.Type = rule.Type;
-                        break;
-                    }
-                }
-                #endregion
-
+                Utility.Utility.CalBasePoint(item, rules);
                 new Controllers.PerformanceItemController(spDb).New(item);
             }
-            catch(Exception ex)
+            catch (Exception ex)
             {
 
             }
 
             return Task.CompletedTask;
         }
+
+        
+
         private PerformanceItem Row2Item_1(DataRow row,  CalMonth calMonth)
         {
             PerformanceItem item = new PerformanceItem();

+ 2 - 1
wispro.sp.api/Startup.cs

@@ -53,7 +53,8 @@ namespace wispro.sp.api
                 };
             });
 
-            services.AddControllers().AddNewtonsoftJson(o=>o.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore);
+            services.AddControllers().AddNewtonsoftJson(o=>
+            o.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore);
             services.AddDbContext<spDbContext>(optionsAction =>
                 optionsAction.UseSqlServer(Configuration.GetConnectionString("DefaultConnect"))
             );

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

@@ -0,0 +1,38 @@
+using DynamicExpresso;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using wispro.sp.entity;
+
+namespace wispro.sp.api.Utility
+{
+    public class Utility
+    {
+        public static void CalBasePoint(PerformanceItem item, List<BasePointRule> rules)
+        {
+            #region 计算基本点数值及绩效类型
+
+            rules.Sort((a, b) =>
+            {
+                var o = b.Priority - a.Priority;
+                return o;
+            });
+
+            foreach (BasePointRule rule in rules)
+            {
+                var interpreter = new Interpreter();
+                //item.ApplicationType
+                Func<PerformanceItem, bool> func = interpreter.ParseAsDelegate<Func<PerformanceItem, bool>>(rule.Rule, "p");
+                bool result = func.Invoke(item);
+
+                if (result)
+                {
+                    interpreter.SetVariable("p", item);
+                    item.BasePoint = (double?)interpreter.Eval(rule.PointExpress);
+                }
+            }
+            #endregion
+        }
+    }
+}

+ 3 - 2
wispro.sp.share/SharePackage.cs

@@ -16,10 +16,11 @@ namespace wispro.sp.share
 
     public class CalType
     {
-        public string Type { get; set; } = "按照字数计算绩效";
-
+       
         public int ReviewerId { get; set; }
 
+        public string AgentMemo { get; set; }
+
         public int wordCount { get; set; }
     }
 

+ 111 - 107
wispro.sp.web/Pages/AppCase/MyCaselist.razor

@@ -36,50 +36,41 @@
                                     <PageHeaderContent>
                                         <div style="border:1px solid #000000">
                                             <AntDesign.Row Align="center" Justify="center">
-                                                <AntDesign.Col Span="3" style="border-left:1px solid #000000"><center></center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border-left:1px solid #000000"><center></center></AntDesign.Col>
                                                 <AntDesign.Col Span="4" style="border:1px solid #000000"><center>新申请</center></AntDesign.Col>
                                                 <AntDesign.Col Span="4" style="border:1px solid #000000"><center>OA(国内、涉外)</center></AntDesign.Col>
                                                 <AntDesign.Col Span="4" style="border:1px solid #000000"><center>其它</center></AntDesign.Col>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"></AntDesign.Col>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"></AntDesign.Col>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"></AntDesign.Col>
+                                                <AntDesign.Col Span="4" style="border:1px solid #000000">一次OA授权</AntDesign.Col>
+                                                <AntDesign.Col Span="4" style="border:1px solid #000000"></AntDesign.Col>
                                             </AntDesign.Row>
                                             <AntDesign.Row>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"><center></center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>承办点数</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>核稿点数</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>承办点数</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>核稿点数</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>承办点数</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>核稿点数</center></AntDesign.Col>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"><center>调查案</center></AntDesign.Col>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"><center>一次OA授权</center></AntDesign.Col>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"><center>总计</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>代理人</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>承办</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>核稿</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>承办</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>核稿</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>承办</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>核稿</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>调查案</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>承办人</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>审核人</center></AntDesign.Col>
+                                                <AntDesign.Col Span="4" style="border:1px solid #000000"><center>总计</center></AntDesign.Col>
                                             </AntDesign.Row>
                                             <AntDesign.Row>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"><center>基础点数</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>3.23</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>1.8</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>1.63</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>0.2</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"></AntDesign.Col>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"><center>2.0</center></AntDesign.Col>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"></AntDesign.Col>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"><center>8.86</center></AntDesign.Col>
-                                            </AntDesign.Row>
-                                            <AntDesign.Row>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"><center>调整后点数</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>3.23</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>1.8</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>1.63</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>0.2</center></AntDesign.Col>
-                                                <AntDesign.Col Span="2" style="border:1px solid #000000"></AntDesign.Col>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"><center>2.0</center></AntDesign.Col>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"></AntDesign.Col>
-                                                <AntDesign.Col Span="3" style="border:1px solid #000000"><center>8.86</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@_userService.CurrentUser.Name</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("新申请处理")</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("新申请审核")</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("OA处理")</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("OA审核")</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("其它处理")</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("其它审核")</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center></center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("一次OA授权处理")</center></AntDesign.Col>
+                                                <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("一次OA授权审核")</center></AntDesign.Col>
+                                                <AntDesign.Col Span="4" style="border:1px solid #000000"><center>@GetStatistics("ALL")</center></AntDesign.Col>
                                             </AntDesign.Row>
+                                            
                                         </div>
                                     </PageHeaderContent>
                                 </PageHeader>
@@ -88,87 +79,98 @@
                                                  @bind-PageIndex="_pageIndex"
                                                  @bind-PageSize="_pageSize"
                                                  Total="_total"
-                                                 ScrollX="3800" Size="TableSize.Small" Bordered
+                                                 ScrollX="1150" Size="TableSize.Small" Bordered
                                                  @bind-SelectedRows="selectedItems"
                                                  OnRow="OnRow"
                                                  Loading="_loading"
                                                  RowClassName="@(x => x.Data.isDanger()?"danger":"")"
                                                  OnChange="HandleTableChange" RemoteDataSource>
-                                    <AntDesign.Selection Key="@(context.Id.ToString())" Width="50" Fixed="left" />
-                                    <AntDesign.Column Title="序号" TData="int" Width="50" Fixed="left">
-                                        @serialNumber(_pageIndex, _pageSize, context.Id )
-                                    </AntDesign.Column>
-                                    <AntDesign.Column Title="绩效特殊字段" DataIndex="@nameof(context.AgentFeedbackMemo)" TData="string" Width="280" Fixed="left">
-                                        
-                                        <Select DataSource="@_Reasons"
-                                                @bind-Value="@context.AgentFeedbackMemo"
-                                                LabelName="@nameof(Reason.Name)"
-                                                ValueName="@nameof(Reason.Value)"
-                                                Placeholder="请选项一项"
-                                                DefaultActiveFirstItem="false"
-                                                EnableSearch="true"
-                                                AllowClear="true"
-                                                Style="width:220px;"
-                                                OnSelectedItemChanged="SelectChanged"
-                                                OnFocus="()=>OnFocus(context)">
-                                        </Select>
-                                    </AntDesign.Column>
-                                    <AntDesign.Column Title="我方文号" @bind-Field="@context.CaseNo" Width="150" Sortable Filterable Fixed="left" />
-                                    <AntDesign.Column Title="案件类型" @bind-Field="@context.CaseType" Width="120" Sortable Filterable />
-                                    <AntDesign.Column Title="案件系数" @bind-Field="@context.CaseCoefficient" Width="120" Sortable Filterable />
+                                    <RowTemplate>
+                                        <AntDesign.Selection Key="@(context.Id.ToString())" Width="50" Fixed="left" />
+                                        <AntDesign.Column Title="序号" TData="int" Width="50" Fixed="left">
+                                            @serialNumber(_pageIndex, _pageSize, context.Id)
+                                        </AntDesign.Column>
+                                        <AntDesign.Column Title="绩效特殊字段" DataIndex="@nameof(context.AgentFeedbackMemo)" TData="string" Width="250" Fixed="left">
+
+                                            <Select DataSource="@_Reasons"
+                                                    @bind-Value="@context.AgentFeedbackMemo"
+                                                    LabelName="@nameof(Reason.Name)"
+                                                    ValueName="@nameof(Reason.Value)"
+                                                    Placeholder="请选项一项"
+                                                    DefaultActiveFirstItem="false"
+                                                    EnableSearch="true"
+                                                    AllowClear="true"
+                                                    Style="width:220px;"
+                                                    OnSelectedItemChanged="SelectChanged"
+                                                    OnClearSelected="()=>ClearSelect(context.Id)"
+                                                    OnFocus="()=>OnFocus(context)">
+                                            </Select>
 
-                                    <AntDesign.Column Title="处理事项" @bind-Field="@context.DoItem" Width="120" Sortable Filterable />
-                                    <AntDesign.Column Title="处理事项系数" @bind-Field="@context.DoItemCoefficient" Width="150" Sortable Filterable />
-                                    <AntDesign.Column Title="处理人" TData="string" DataIndex="@nameof(context.ItemStaffs)" Width="150">
-                                        @if (context.ItemStaffs != null)
-                                        {
-                                            foreach (ItemStaff itemStaff in context.ItemStaffs)
+                                        </AntDesign.Column>
+                                        <AntDesign.Column Title="基础点数" TData="string" Width="100">@(context.BasePoint ==null?"": context.BasePoint)</AntDesign.Column>
+                                        <AntDesign.Column Title="我方文号" @bind-Field="@context.CaseNo" Width="150" Sortable Filterable  />
+                                        <AntDesign.Column Title="案件类型" @bind-Field="@context.CaseType" Width="120" Sortable Filterable />
+                                        <AntDesign.Column Title="案件系数" @bind-Field="@context.CaseCoefficient" Width="120" Sortable Filterable />
+                                        <AntDesign.Column Title="处理事项" @bind-Field="@context.DoItem" Width="150" Sortable Filterable />
+                                        <AntDesign.Column Title="处理事项系数" @bind-Field="@context.DoItemCoefficient" Width="150" Sortable Filterable />
+                                        <AntDesign.Column Title="案件阶段" @bind-Field="@context.CaseStage" Width="100"></AntDesign.Column>
+                                        <AntDesign.Column Title="处理人" TData="string" DataIndex="@nameof(context.ItemStaffs)" Width="150">
+                                            @if (context.ItemStaffs != null)
                                             {
-                                                <span>@(itemStaff.DoPerson.Name)&nbsp;</span>
+                                                foreach (ItemStaff itemStaff in context.ItemStaffs)
+                                                {
+                                                    <span>@(itemStaff.DoPerson.Name)&nbsp;</span>
+                                                }
                                             }
-                                        }
-                                    </AntDesign.Column>
-                                    <AntDesign.Column Title="核稿人" TData="string" Width="100">@(context.Reviewer ==null?"": context.Reviewer.Name)</AntDesign.Column>
-                                    <AntDesign.Column Title="基础点数" TData="string" Width="100">@(context.BasePoint ==null?"": context.BasePoint)</AntDesign.Column>
-                                    <AntDesign.Column Title="完成时间" TData="string" Width="100">@(context.FinishedDate.HasValue? context.FinishedDate.Value.ToString("yyyy-MM-dd"):"")</AntDesign.Column>
-                                    <AntDesign.Column Title="完成时间" TData="string" Width="100">@(context.FinishedDate.HasValue? context.FinishedDate.Value.ToString("yyyy-MM-dd"):"")</AntDesign.Column>
-                                    <AntDesign.Column Title="返稿日" TData="string" Width="100">@(context.ReturnDate .HasValue? context.ReturnDate.Value.ToString("yyyy-MM-dd"):"")</AntDesign.Column>
-                                    <AntDesign.Column Title="客户期限" TData="string" Width="100">@(context.CustomerLimitDate.HasValue? context.CustomerLimitDate.Value.ToString("yyyy-MM-dd"):"")</AntDesign.Column>
-                                    <AntDesign.Column Title="初稿日" TData="string" Width="100">@(context.FirstDraftDate.HasValue? context.FirstDraftDate.Value.ToString("yyyy-MM-dd"):"")</AntDesign.Column>
-                                    <AntDesign.Column Title="内部期限" TData="string" Width="100">@(context.InternalDate.HasValue? context.InternalDate.Value.ToString("yyyy-MM-dd"):"")</AntDesign.Column>
-                                    <AntDesign.Column Title="案件阶段" TData="string" Width="100">@context.CaseStage</AntDesign.Column>
-                                    <AntDesign.Column Title="案件名称" TData="string" @bind-Field="@context.CaseName" Width="250"></AntDesign.Column>
-                                    <AntDesign.Column Title="案件状态" @bind-Field="@context.CaseState" Width="100"></AntDesign.Column>
-                                    <AntDesign.Column Title=" 申请人" @bind-Field="@context.ApplicationName" Width="200"></AntDesign.Column>
-                                    <AntDesign.Column Title="备注" @bind-Field="@context.CaseMemo"></AntDesign.Column>
-                                    <ActionColumn Fixed="right" Title="操作" Width="80">
-                                        <Space>
-                                             
-                                            @if ((!context.CaseNo.Contains("CN") || context.CaseNo.Contains("WO")) && context.DoItem == "新申请")
-                                            {
-                                                <SpaceItem>
-                                                    <Button Type="primary" OnClick="()=>OnsubShensu(context)" Style="float:right" Size="small">申诉</Button>
-                                                </SpaceItem>
+                                        </AntDesign.Column>
+                                        <AntDesign.Column Title="核稿人" TData="string" Width="100">@(context.Reviewer ==null?"": context.Reviewer.Name)</AntDesign.Column>
+                                        
+                                        <ActionColumn Fixed="right" Title="操作" Width="120">
+                                            <Space>
                                                 <SpaceItem>
                                                     <AntDesign.DropdownButton OnClick="()=>OnsubShensu(context)" Type="@((ButtonType.Primary, ButtonType.Default))" ButtonsStyle="@("background-color: #1890ff;")">
                                                         <Overlay>
                                                             <Menu>
-                                                                @*<MenuItem Key="1" icon="plus" Click="OnsubShensu"></MenuItem>*@
-                                                                <MenuItem Key="2" icon="plus" OnClick="()=>OnJXCal(context)">涉外绩效按字数计算</MenuItem>
+                                                                @if (((!context.CaseNo.Contains("CN") || context.CaseNo.Contains("WO")) && context.DoItem == "新申请") || context.DoItem == "翻译")
+                                                                {
+
+                                                                    @*<MenuItem Key="1" icon="plus" Click="OnsubShensu"></MenuItem>*@
+                                                                    <MenuItem Key="2" icon="plus" OnClick="() => OnJXCal(context)">计算字数</MenuItem>
+
+                                                                }
+                                                                @if(context.ItemStaffs.Count > 1)
+                                                                {
+                                                                     <MenuItem Key="3" icon="plus" OnClick="() => OnJXCal(context)">设定分配比例</MenuItem>
+                                                                }
                                                             </Menu>
-                                                        </Overlay>
+                                                            </Overlay>
+                                                        <ChildContent>申诉</ChildContent>
                                                     </AntDesign.DropdownButton>
                                                 </SpaceItem>
-                                            }
-                                            else
-                                            {
-                                                <SpaceItem>
-                                                    <Button Type="primary" OnClick="()=>OnsubShensu(context)" Style="float:right" Size="small">申诉</Button>
-                                                </SpaceItem>
-                                            }
-                                        </Space>
+                                            </Space>
 
-                                    </ActionColumn>
+                                        </ActionColumn>
+                                    </RowTemplate>
+                                    <ExpandTemplate>
+                                        <div style="width:1000px;margin-left:30px;">
+                                            <Card Title=@("详情")>
+                                                <Body>
+                                                    <Descriptions Bordered Size="@DescriptionsSize.Small">
+                                                        <DescriptionsItem Title="完成时间">@(context.Data.FinishedDate.HasValue?context.Data.FinishedDate.Value.ToString("yyyy-MM-dd"):"")</DescriptionsItem>
+                                                        <DescriptionsItem Title="返稿日">@(context.Data.ReturnDate.HasValue?context.Data.ReturnDate.Value.ToString("yyyy-MM-dd"):"")</DescriptionsItem>
+                                                        <DescriptionsItem Title="客户期限">@(context.Data.CustomerLimitDate.HasValue?context.Data.CustomerLimitDate.Value.ToString("yyyy-MM-dd"):"")</DescriptionsItem>
+                                                        <DescriptionsItem Title="初稿日">@(context.Data.FirstDraftDate.HasValue?context.Data.FirstDraftDate.Value.ToString("yyyy-MM-dd"):"")</DescriptionsItem>
+                                                        <DescriptionsItem Title="内部期限">@(context.Data.InternalDate.HasValue?context.Data.InternalDate.Value.ToString("yyyy-MM-dd"):"")</DescriptionsItem>
+                                                        <DescriptionsItem Title="案件状态">@context.Data.CaseState</DescriptionsItem>
+                                                        <DescriptionsItem Title="处理事项备注">@context.Data.DoItemMemo</DescriptionsItem>
+                                                        <DescriptionsItem Title="案件名称" Span="2">@context.Data.CaseName</DescriptionsItem>
+                                                        <DescriptionsItem Title="申请人" Span="3">@context.Data.ApplicationName</DescriptionsItem>
+                                                        <DescriptionsItem Title="备注" Span="3">@context.Data.CaseMemo</DescriptionsItem>
+                                                    </Descriptions>
+                                                </Body>
+                                            </Card>
+                                        </div>
+                                    </ExpandTemplate>
                                 </AntDesign.Table>
 
                             }
@@ -212,12 +214,7 @@
     </Card>
     <br />
     <Form Model="_calType" LabelColSpan="6" WrapperColSpan="16">
-        <FormItem Label="绩效计算方式">
-            <RadioGroup @bind-Value="@context.Type" Disabled="true">
-                <Radio Value="@("按照字数计算绩效")">按照字数计算绩效</Radio>
-                <Radio Value="@("按照件数计算绩效")">按照件数计算绩效</Radio>
-            </RadioGroup>
-        </FormItem>
+        
         <FormItem Label="请谁确认">
             <Select DataSource="@Reviewers"
                     @bind-Value="@context.ReviewerId"
@@ -230,6 +227,13 @@
                     EnableSearch>
             </Select>
         </FormItem>
+        <FormItem Label="绩效特殊字段备注">
+            <RadioGroup @bind-Value="@context.AgentMemo" Disabled="false">
+                <Radio Value="@("英-中")">英-中</Radio>
+                <Radio Value="@("英-德")">英-德</Radio>
+                <Radio Value="@("中-英")">中-英</Radio>
+            </RadioGroup>
+        </FormItem>
         <FormItem Label="字数">
             <AntDesign.InputNumber @bind-Value="context.wordCount" Min="1"></AntDesign.InputNumber>
         </FormItem>

+ 51 - 9
wispro.sp.web/Pages/AppCase/MyCaselist.razor.cs

@@ -57,12 +57,17 @@ namespace wispro.sp.web.Pages.AppCase
             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>();
+        private CalMonth HandlingCalMonth;
 
         int _pageIndex = 1;
         int _pageSize = 10;
@@ -77,6 +82,8 @@ namespace wispro.sp.web.Pages.AppCase
         [Inject] protected NavigationManager NavigationManager { get; set; }
         [Inject] protected IUserService _userService { get; set; }
 
+        [Inject] protected CalMonthServices _CalMonthService { get; set; }
+
 
         private bool isFirstInit = true;
         protected async override Task OnInitializedAsync()
@@ -84,11 +91,11 @@ namespace wispro.sp.web.Pages.AppCase
             if (isFirstInit)
             {
                 _loading = true;
+                var HandlingCalMonth =await  _CalMonthService.GetHandlingMonth();
 
-                //var data = await _ItemService.GetItems(_pageIndex, _pageSize);
+                MyStatistics = await _ItemService.CalMyStatistics(HandlingCalMonth.Year,HandlingCalMonth.Month, _userService.CurrentUser.Userid.Value);
                 var data = await _ItemService.GetMyList(_userService.CurrentUser.Userid.Value, jxType.doing,_pageIndex,_pageSize);
 
-
                 _Datas = data.Results;
                 _total = data.TotalCount;
                 _loading = false;
@@ -99,6 +106,26 @@ namespace wispro.sp.web.Pages.AppCase
             Console.WriteLine($"OnInitializedAsync:[tota:{_total}\tPageIndex:{_pageIndex}\tPageSize:{_pageSize}]");
         }
 
+        private string GetStatistics(string strType)
+        {
+            if (strType != "ALL")
+            {
+                var tem= MyStatistics.Where<StaffStatistics>(s => s.jxType == strType).FirstOrDefault();
+                if(tem != null)
+                {
+                    return (tem.totalBasePoint.HasValue?tem.totalBasePoint.Value.ToString("0.00"):"");
+                }
+                else
+                {
+                    return "";
+                }
+            }
+            else
+            {
+                return MyStatistics.Select(s => s.totalBasePoint.Value).Sum().ToString("0.00");
+            }
+        }
+
         private int serialNumber(int pageIndex, int pageSize, int id)
         {
             int iIndex = 0;
@@ -156,10 +183,20 @@ namespace wispro.sp.web.Pages.AppCase
         #endregion
 
         #region 绩效计算窗口事件
-        private void HandleOk1(MouseEventArgs e)
+        private async Task HandleOk1(MouseEventArgs e)
         {
-            Console.WriteLine(e);
+            
             _ShowJXModal = false;
+            
+            var respone = await  _ItemService.SaveFieldChange(EditingItem.Id, $"{strAgentFeedbackMemo}|{strWordCount}", $"{_calType.AgentMemo}|{_calType.wordCount}");
+
+            var HandlingCalMonth = await _CalMonthService.GetHandlingMonth();
+
+            MyStatistics = await _ItemService.CalMyStatistics(HandlingCalMonth.Year, HandlingCalMonth.Month, _userService.CurrentUser.Userid.Value);
+            EditingItem.AgentFeedbackMemo = _calType.AgentMemo;
+            StateHasChanged();
+
+
         }
 
         private void HandleCancel1(MouseEventArgs e)
@@ -175,10 +212,8 @@ namespace wispro.sp.web.Pages.AppCase
             new() { ChangeField = "核稿人", Name = "核稿人申诉"},
             new() { ChangeField = "处理人", Name =  "处理人申诉"},
             new() { ChangeField = "案件系数", Name =  "案件系数申诉"},
-            new() { ChangeField = "处理事项系数", Name =  "处理事项系数申诉"},
-            new() { Name =  "多人处理分配比率申诉"},
-            new() { Name =  "严重超期说明"},
-            //new() { Key = "logout", IconType = "logout", Option = "涉外新申请绩效计算备注"}
+            new() { ChangeField = "处理事项系数", Name =  "处理事项系数申诉"},            
+            new() { Name =  "严重超期说明"}
         };
 
         private shensuType _SelectedItem;
@@ -284,6 +319,13 @@ namespace wispro.sp.web.Pages.AppCase
             }
         }
 
+        void ClearSelect(int itemId)
+        {
+            Console.WriteLine($"ClearSelcet:{itemId}");
+            var respone = _ItemService.SaveFieldChange(itemId, strAgentFeedbackMemo,"");
+            EditingItem = null;
+        }
+
         Dictionary<string, object> OnRow(RowData<PerformanceItem> row)
         {
             Dictionary<string, object> ret = new Dictionary<string, object>();

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

@@ -35,7 +35,8 @@ namespace wispro.sp.web
             );
             builder.Services.AddScoped<AuthenticationStateProvider, JwtAuthenticationStateProvider>();
             builder.Services.AddScoped<IAuthService, AuthService>();
-            builder.Services.AddScoped<TaskService, TaskService>();
+            builder.Services.AddScoped<TaskService, TaskService>(); 
+            builder.Services.AddScoped<CalMonthServices, CalMonthServices>();
 
             await builder.Build().RunAsync();
         }

+ 28 - 0
wispro.sp.web/Services/CalMonthServices.cs

@@ -0,0 +1,28 @@
+using Blazored.LocalStorage;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Http;
+using System.Net.Http.Json;
+using System.Threading.Tasks;
+using wispro.sp.entity;
+
+namespace wispro.sp.web.Services
+{
+    public class CalMonthServices
+    {
+        private readonly HttpClient _httpClient;
+        private readonly ILocalStorageService _localStorageService;
+        
+        public CalMonthServices(HttpClient httpClient)
+        {
+            _httpClient = httpClient;
+            
+        }
+        public async  Task<CalMonth> GetHandlingMonth()
+        {
+            var data = await _httpClient.GetFromJsonAsync<CalMonth>($"http://localhost:39476/api/CalMonth/GetHandlingMonth");
+            return data;
+        }
+    }
+}

+ 7 - 0
wispro.sp.web/Services/PerformanceItemServices.cs

@@ -40,5 +40,12 @@ namespace wispro.sp.web.Services
             ListApiResponse<PerformanceItem> data = await _httpClient.GetFromJsonAsync<ListApiResponse<PerformanceItem>>($"http://localhost:39476/api/PerformanceItem/GetMyList?userid={userid}&Type={Convert.ToInt32(type)}&pageIndex={pageIndex}&pageSize={pageSize}");
             return data;
         }
+
+        public async Task<List<StaffStatistics>> CalMyStatistics(int year, int month, int? userid = null)
+        {
+
+            var data = await _httpClient.GetFromJsonAsync<List<StaffStatistics>>($"http://localhost:39476/api/PerformanceItem/CalMyStatistics?userid={userid}&year={year}&month={month}");
+            return data;
+        }
     }
 }

+ 135 - 124
wispro.sp.winClient/Form1.cs

@@ -24,6 +24,7 @@ namespace wispro.sp.winClient
             InitializeComponent();
         }
 
+        
         private void button1_Click(object sender, EventArgs e)
         {
             DateTime startTime = DateTime.Now;
@@ -97,129 +98,136 @@ namespace wispro.sp.winClient
         {
             List<BasePointRule> rules = new List<BasePointRule>()
             {
-                new BasePointRule(){Rule="p.ApplicationType==\"外观设计\"",Point=0.2,Type="新申请",Priority=1},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"检索结案\"",Point=0.2,Type="新申请",Priority=1},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"撰写中客户取消申请\"",Point=0,Type="新申请",Priority=2},
-                new BasePointRule(){Rule="p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"发文后客户取消申请\"",Point=0.49,Type="新申请",Priority=3},
-                new BasePointRule(){Rule="p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"发文后客户取消申请\"",Point=0.7,Type="新申请",Priority=4},
-                new BasePointRule(){Rule="p.CaseNo.StartsWith(\"PADE\")  && p.AgentFeedbackMemo==\"发文后客户原因取消申请,系统结案\"",Point=1.33,Type="新申请",Priority=5},
-                new BasePointRule(){Rule="p.CaseNo.StartsWith(\"PAUS\")  && p.AgentFeedbackMemo==\"发文后客户原因取消申请,系统结案\"",Point=1.26,Type="新申请",Priority=6},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"我方代交\"",Point=0,Type="新申请",Priority=7},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"我方转格式、复核\"",Point=0.2,Type="新申请",Priority=8},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"PCT首次英文案\"",Point=1.8,Type="新申请",Priority=9},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"改权\"",Point=0.3,Type="新申请",Priority=11},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"改权+改说明书\"",Point=0.5,Type="新申请",Priority=12},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"涉外实质改权\"",Point=0.7,Type="新申请",Priority=13},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"首次中文案\"",Point=1,Type="新申请",Priority=14},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"外-内首次申请\"",Point=1.5,Type="新申请",Priority=15},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"转格式\"",Point=0.1,Type="新申请",Priority=16},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",Point=0.1,Type="新申请",Priority=17},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",Point=0.7,Type="新申请",Priority=18},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",Point=0.1,Type="新申请",Priority=19},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"台湾案转大陆案\"",Point=0.2,Type="新申请",Priority=20},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",Point=1,Type="新申请",Priority=21},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"大陆案转台湾案\"",Point=0.2,Type="新申请",Priority=22},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAEPO\")",Point=1.8,Type="新申请",Priority=23},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-分案\")",Point=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(\"分案\")) ",Point=0.5,Type="新申请",Priority=25},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\"  && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")",Point=1,Type="新申请",Priority=26},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")",Point=0.1,Type="新申请",Priority=27},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")",Point=1,Type="新申请",Priority=28},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\") && p.Customer.Name.Contains(\"OPPO\")",Point=1,Type="新申请",Priority=30},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\")",Point=0.7,Type="新申请",Priority=29},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PADE\")",Point=1.9,Type="新申请",Priority=31},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PADE\")",Point=1.9,Type="新申请",Priority=32},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAEPO\")",Point=0.2,Type="新申请",Priority=33},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAGB\")",Point=1.8,Type="新申请",Priority=34},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAUS\") && p.Customer.Name.Contains(\"OPPO\")",Point=1.7,Type="新申请",Priority=36},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAUS\")",Point=1.8,Type="新申请",Priority=35},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PCTCN\")",Point=1.5,Type="新申请",Priority=37},
-                new BasePointRule(){Rule="(p.ApplicationType==\"实用新型\" || p.ApplicationType==\"发明\") && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"客户不进行答辩\"",Point=0,Type="新申请",Priority=38},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"涉外OA不答辩,发报导函结案\"",Point=0.1,Type="OA",Priority=39},
-                new BasePointRule(){Rule="p.ApplicationType==\"外观设计\"",Point=0.2,Type="OA",Priority=40},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"实用新型\"  && p.AgentFeedbackMemo==\"不请款\"",Point=0,Type="OA",Priority=41},
-                new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\" || p.CaseStage==\"六通\" || p.CaseStage==\"七通\" || p.CaseStage==\"八通\") ",Point=0,Type="OA",Priority=42},
-                new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && p.CaseStage==\"二通\" && p.AgentFeedbackMemo==\"请款\"",Point=0.14,Type="OA",Priority=43},
-                new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && p.CaseStage==\"一通\" && p.AgentFeedbackMemo==\"请款\"",Point=0.35,Type="OA",Priority=44},
-                new BasePointRule(){Rule="p.DoItem==\"请求复审\" && p.ApplicationType==\"实用新型\"  && p.AgentFeedbackMemo==\"请款\"",Point=0.35,Type="OA",Priority=45},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"非实质\"  && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"",Point=0.3,Type="OA",Priority=46},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"",Point=0.5,Type="OA",Priority=47},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"",Point=0.2,Type="OA",Priority=48},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"客户提供答辩点,撰写英文报导函\"",Point=0.5,Type="OA",Priority=49},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"客户未提供答辩点,撰写英文报导函\"",Point=0.8,Type="OA",Priority=50},
-                new BasePointRule(){Rule="p.DoItem==\"Advisory Action\" && p.DoItemCoefficient==\"实质\"",Point=1.5,Type="OA",Priority=51},
-                new BasePointRule(){Rule="p.DoItem==\"Advisory Action\" && p.DoItemCoefficient==\"形式\"",Point=0.2,Type="OA",Priority=52},
-                new BasePointRule(){Rule="p.DoItem==\"Final Action\" && p.DoItemCoefficient==\"实质\"",Point=1.5,Type="OA",Priority=53},
-                new BasePointRule(){Rule="p.DoItem==\"Final Action\" && p.DoItemCoefficient==\"形式\"",Point=0.2,Type="OA",Priority=54},
-                new BasePointRule(){Rule="p.DoItem==\"form 3\"",Point=0.1,Type="OA",Priority=55},
-                new BasePointRule(){Rule="p.DoItem==\"form 3-8(2)\" ||  p.DoItem==\"Form 3-8(2)\"",Point=0.1,Type="OA",Priority=56},
-                new BasePointRule(){Rule="p.DoItem==\"Non Final Action\" && p.DoItemCoefficient==\"实质\"",Point=1.5,Type="OA",Priority=57},
-                new BasePointRule(){Rule="p.DoItem==\"Non Final Action\" && p.DoItemCoefficient==\"形式\"",Point=0.2,Type="OA",Priority=58},
-                new BasePointRule(){Rule="p.DoItem==\"RCE\" && p.DoItemCoefficient==\"实质\"",Point=1.5,Type="OA",Priority=59},
-                new BasePointRule(){Rule="p.DoItem==\"RCE\" && p.DoItemCoefficient==\"形式\"",Point=0.2,Type="OA",Priority=60},
-                new BasePointRule(){Rule="p.DoItem==\"欧洲案答辩\" && p.DoItemCoefficient==\"实质\"",Point=1.5,Type="OA",Priority=61},
-                new BasePointRule(){Rule="p.DoItem==\"欧洲案答辩\" && p.DoItemCoefficient==\"形式\"",Point=0.2,Type="OA",Priority=62},
-                new BasePointRule(){Rule="p.DoItem==\"口审评估\" && p.DoItemCoefficient==\"非实质\"",Point=0.2,Type="OA",Priority=63},
-                new BasePointRule(){Rule="p.DoItem==\"口审评估\" && p.DoItemCoefficient==\"实质\"",Point=1.5,Type="OA",Priority=64},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAUS\")",Point=1.5,Type="OA",Priority=65},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAUS\")",Point=0.2,Type="OA",Priority=66},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAAU\")",Point=1.5,Type="OA",Priority=67},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PADE\")",Point=1.6,Type="OA",Priority=68},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAEPO\")",Point=1.5,Type="OA",Priority=69},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAGB\")",Point=1.5,Type="OA",Priority=70},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAIN\")",Point=1.5,Type="OA",Priority=71},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAAU\")",Point=0.2,Type="OA",Priority=72},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PADE\")",Point=0.3,Type="OA",Priority=73},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAEPO\")",Point=0.2,Type="OA",Priority=74},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAGB\")",Point=0.2,Type="OA",Priority=75},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAIN\")",Point=0.2,Type="OA",Priority=76},
-                new BasePointRule(){Rule="p.DoItem==\"申復\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PATW\")",Point=0.5,Type="OA",Priority=77},
-                new BasePointRule(){Rule="p.DoItem==\"申復\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PATW\")",Point=0.2,Type="OA",Priority=78},
-                new BasePointRule(){Rule="p.DoItem==\"请求复审\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")",Point=0.5,Type="OA",Priority=79},
-                new BasePointRule(){Rule="p.DoItem==\"意见陈述\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"复审\"",Point=0.2,Type="OA",Priority=80},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"非实质\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"",Point=0.3,Type="OA",Priority=81},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PACN\")  && p.CaseStage==\"一通\"",Point=0.5,Type="OA",Priority=82},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"",Point=0.2,Type="OA",Priority=83},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"非实质\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"",Point=0.3,Type="OA",Priority=84},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PCTCN\")  && p.CaseStage==\"一通\"",Point=0.5,Type="OA",Priority=85},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"",Point=0.2,Type="OA",Priority=86},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"二通\"",Point=0.2,Type="OA",Priority=87},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"二通\"",Point=0.2,Type="OA",Priority=88},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") &&  (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")",Point=0,Type="OA",Priority=89},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PCTCN\") &&  (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")",Point=0,Type="OA",Priority=90},
-                new BasePointRule(){Rule="p.DoItem==\"发明一次OA授权\" && p.ApplicationType==\"发明\"",Point=0.2,Type="一次OA授权",Priority=91},
-                new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"内-外\"",Point=0.7,Type="其它",Priority=92},
-                new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"外-内\"",Point=0.5,Type="其它",Priority=93},
-                new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"内-外\"",Point=0.3,Type="其它",Priority=94},
-                new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"外-内\"",Point=0.2,Type="其它",Priority=95},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"检索结案\"",Point=0.1,Type="其它",Priority=96},
-                new BasePointRule(){Rule="p.DoItem==\"内部检索\"",Point=0,Type="其它",Priority=97},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAAU\")",Point=0.2,Type="其它",Priority=98},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PACN\")",Point=0,Type="其它",Priority=99},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PCTCN\")",Point=0,Type="其它",Priority=100},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"WOCN\")",Point=0,Type="其它",Priority=101},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PADE\")",Point=0.2,Type="其它",Priority=102},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAEPO\")",Point=0.2,Type="其它",Priority=103},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAGB\")",Point=0.2,Type="其它",Priority=104},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAIN\")",Point=0.2,Type="其它",Priority=105},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAUS\")",Point=0.2,Type="其它",Priority=106},
-                new BasePointRule(){Rule="p.DoItem==\"Election Action\"",Point=0.2,Type="其它",Priority=107},
-                new BasePointRule(){Rule="p.DoItem==\"OA答辩校核\"",Point=0.2,Type="其它",Priority=108},
-                new BasePointRule(){Rule="p.DoItem==\"PPH\"",Point=0.1,Type="其它",Priority=109},
-                new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PACN\")",Point=0,Type="其它",Priority=110},
-                new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PAEPO\") ",Point=0.2,Type="其它",Priority=111},
-                new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PAUS\")",Point=0.2,Type="其它",Priority=112},
-                new BasePointRule(){Rule="p.DoItem==\"分案评估\"",Point=0.1,Type="其它",Priority=113},
-                new BasePointRule(){Rule="p.DoItem==\"分案评估+分案\"",Point=0.2,Type="其它",Priority=114},
-                new BasePointRule(){Rule="p.DoItem==\"绘图\"",Point=0,Type="其它",Priority=115},
-                new BasePointRule(){Rule="p.DoItem==\"技术确认\"",Point=0,Type="其它",Priority=116},
-                new BasePointRule(){Rule="p.DoItem==\"提交ids\"",Point=0.1,Type="其它",Priority=117},
-                new BasePointRule(){Rule="p.DoItem==\"询问放弃或复审\"",Point=0,Type="其它",Priority=118},
-                new BasePointRule(){Rule="p.DoItem==\"知识点总结\"",Point=0,Type="其它",Priority=119},
-                new BasePointRule(){Rule="p.DoItem==\"专利挖掘与布局\"",Point=0,Type="其它",Priority=120},
-                new BasePointRule(){Rule="p.ApplicationType==\"外观设计\"",Point=0.2,Type="其它",Priority=121},
-                new BasePointRule(){Rule="p.DoItem==\"提交ids\"",Point=0,Type="其它",Priority=122},
-                new BasePointRule(){Rule="p.DoItem==\"请求优先审查\"",Point=0,Type="其它",Priority=123}
+                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.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.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.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.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="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="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},
+                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="0.2",Type="新申请",Priority=33},
+                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAGB\")",PointExpress="1.8",Type="新申请",Priority=34},
+                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.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.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},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"非实质\"  && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"",PointExpress="0.3",Type="OA",Priority=49},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"",PointExpress="0.5",Type="OA",Priority=50},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"",PointExpress="0.2",Type="OA",Priority=51},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"客户提供答辩点,撰写英文报导函\"",PointExpress="0.5",Type="OA",Priority=52},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"客户未提供答辩点,撰写英文报导函\"",PointExpress="0.8",Type="OA",Priority=53},
+                new BasePointRule(){Rule="p.DoItem==\"Advisory Action\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=54},
+                new BasePointRule(){Rule="p.DoItem==\"Advisory Action\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=55},
+                new BasePointRule(){Rule="p.DoItem==\"Final Action\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=56},
+                new BasePointRule(){Rule="p.DoItem==\"Final Action\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=57},
+                new BasePointRule(){Rule="p.DoItem==\"form 3\"",PointExpress="0.1",Type="OA",Priority=58},
+                new BasePointRule(){Rule="p.DoItem==\"form 3-8(2)\" ||  p.DoItem==\"Form 3-8(2)\"",PointExpress="0.1",Type="OA",Priority=59},
+                new BasePointRule(){Rule="p.DoItem==\"Non Final Action\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=60},
+                new BasePointRule(){Rule="p.DoItem==\"Non Final Action\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=61},
+                new BasePointRule(){Rule="p.DoItem==\"RCE\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=62},
+                new BasePointRule(){Rule="p.DoItem==\"RCE\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=63},
+                new BasePointRule(){Rule="p.DoItem==\"欧洲案答辩\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=64},
+                new BasePointRule(){Rule="p.DoItem==\"欧洲案答辩\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=65},
+                new BasePointRule(){Rule="p.DoItem==\"口审评估\" && p.DoItemCoefficient==\"非实质\"",PointExpress="0.2",Type="OA",Priority=66},
+                new BasePointRule(){Rule="p.DoItem==\"口审评估\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=67},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAUS\")",PointExpress="1.5",Type="OA",Priority=68},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAUS\")",PointExpress="0.2",Type="OA",Priority=69},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAAU\")",PointExpress="1.5",Type="OA",Priority=70},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PADE\")",PointExpress="1.6",Type="OA",Priority=71},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="1.5",Type="OA",Priority=72},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAGB\")",PointExpress="1.5",Type="OA",Priority=73},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAIN\")",PointExpress="1.5",Type="OA",Priority=74},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAAU\")",PointExpress="0.2",Type="OA",Priority=75},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PADE\")",PointExpress="0.3",Type="OA",Priority=76},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="0.2",Type="OA",Priority=77},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAGB\")",PointExpress="0.2",Type="OA",Priority=78},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAIN\")",PointExpress="0.2",Type="OA",Priority=79},
+                new BasePointRule(){Rule="p.DoItem==\"申復\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PATW\")",PointExpress="0.5",Type="OA",Priority=80},
+                new BasePointRule(){Rule="p.DoItem==\"申復\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PATW\")",PointExpress="0.2",Type="OA",Priority=81},
+                new BasePointRule(){Rule="p.DoItem==\"请求复审\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")",PointExpress="0.5",Type="OA",Priority=82},
+                new BasePointRule(){Rule="p.DoItem==\"意见陈述\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"复审\"",PointExpress="0.2",Type="OA",Priority=83},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"非实质\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"",PointExpress="0.3",Type="OA",Priority=84},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PACN\")  && p.CaseStage==\"一通\"",PointExpress="0.5",Type="OA",Priority=85},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"",PointExpress="0.2",Type="OA",Priority=86},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"非实质\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"",PointExpress="0.3",Type="OA",Priority=87},
+                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PCTCN\")  && p.CaseStage==\"一通\"",PointExpress="0.5",Type="OA",Priority=88},
+                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==\"发明一次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.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(\"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},
+                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAIN\")",PointExpress="0.2",Type="其它",Priority=108},
+                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAUS\")",PointExpress="0.2",Type="其它",Priority=109},
+                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(\"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==\"提交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.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==\"翻译\") && 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},
             };
 
             foreach(BasePointRule rule in rules)
@@ -231,6 +239,9 @@ namespace wispro.sp.winClient
         {
 
             await InitRules();
+
+            return;
+
             await ImportUsers();
             await InputPerformanceItem("ExcelFiles\\21.01-21.06 工程师绩效报表-总表.xlsx", true, false, 0);
 
@@ -697,7 +708,7 @@ namespace wispro.sp.winClient
                 }
                 else
                 {
-                    System.Diagnostics.Debug.WriteLine($"保存错误: {obj.Rule}\t{obj.Point}\r\n{result.ErrorMessage}");
+                    System.Diagnostics.Debug.WriteLine($"保存错误: {obj.Rule}\t{obj.PointExpress}\r\n{result.ErrorMessage}");
                 }
             }
             else

+ 3 - 2
wospro.sp.entity/BasePointRule.cs

@@ -19,9 +19,9 @@ namespace wispro.sp.entity
         public string Rule { get; set; }
 
         /// <summary>
-        /// 基础点数
+        /// 基础点数表达式
         /// </summary>
-        public double Point { get; set; }
+        public string PointExpress { get; set; }
 
         /// <summary>
         /// 优先级
@@ -32,5 +32,6 @@ namespace wispro.sp.entity
         /// 绩效类型
         /// </summary>
         public string Type { get; set; }
+
     }
 }