Quellcode durchsuchen

添加申诉菜单

luocaiyang vor 3 Jahren
Ursprung
Commit
0fb2f068ba

+ 36 - 0
wispro.sp.api/Controllers/AppealController.cs

@@ -0,0 +1,36 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore;
+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 AppealController : ControllerBase
+    {
+        spDbContext Context;
+
+        public AppealController(spDbContext context)
+        {
+            Context = context;
+        }
+
+        public List<AppealType> GetAppealTypes()
+        {
+            return Context.AppealTypes.ToList();
+        }
+
+        public List<InputField> GetInputField(int appealTypeId,int state)
+        {
+            return Context.InputFields
+                .Where<InputField>(ip => ip.AppealTypeId == appealTypeId && ip.AppealState == state)
+                .Include(p=>p.SelectValues)
+                .ToList();
+        }
+    }
+}

+ 25 - 138
wispro.sp.api/spDbContext.cs

@@ -2,6 +2,7 @@
 using Microsoft.Extensions.Configuration;
 using System.Collections.Generic;
 using System.Configuration;
+using System.Data;
 using wispro.sp.entity;
 
 
@@ -493,152 +494,38 @@ namespace wispro.sp.api
                 }
                 );
 
-            BasePointRule[] rules = new BasePointRule[]
-            {
-                new BasePointRule(){Rule="p.DoItem==\"发明一次OA授权\" && p.ApplicationType==\"发明\"",PointExpress="0.2",Type="其它",Priority=1},
-                new BasePointRule(){Rule="p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"发文后客户取消申请\"",PointExpress="0.49",Type="新申请",Priority=2},
-                new BasePointRule(){Rule="p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"发文后客户取消申请\"",PointExpress="0.7",Type="新申请",Priority=3},
-                new BasePointRule(){Rule="p.CaseNo.StartsWith(\"PADE\")  && p.AgentFeedbackMemo==\"发文后客户原因取消申请,系统结案\"",PointExpress="1.33",Type="新申请",Priority=4},
-                new BasePointRule(){Rule="p.CaseNo.StartsWith(\"PAUS\")  && p.AgentFeedbackMemo==\"发文后客户原因取消申请,系统结案\"",PointExpress="1.26",Type="新申请",Priority=5},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"PCT首次英文案\"",PointExpress="1.8",Type="新申请",Priority=6},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"涉外实质改权\"",PointExpress="0.7",Type="新申请",Priority=7},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"首次中文案\"",PointExpress="1",Type="新申请",Priority=8},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"外-内首次申请\"",PointExpress="1.5",Type="新申请",Priority=9},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="0.7",Type="新申请",Priority=10},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="1",Type="新申请",Priority=11},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"欧洲案首次\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="1.8",Type="新申请",Priority=12},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\"  && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")",PointExpress="1",Type="新申请",Priority=13},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")",PointExpress="1",Type="新申请",Priority=14},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\")",PointExpress="0.7",Type="新申请",Priority=15},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\") && p.Customer.Name.Contains(\"OPPO\")",PointExpress="1",Type="新申请",Priority=16},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PADE\")",PointExpress="1.9",Type="新申请",Priority=17},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PADE\")",PointExpress="1.9",Type="新申请",Priority=18},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAGB\")",PointExpress="1.8",Type="新申请",Priority=19},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAUS\")",PointExpress="1.8",Type="新申请",Priority=20},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAUS\") && p.Customer.Name.Contains(\"OPPO\")",PointExpress="1.7",Type="新申请",Priority=21},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PCTCN\")",PointExpress="1.5",Type="新申请",Priority=22},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"英-中\" && p.WordCount !=null",PointExpress="p.WordCount/1000*0.1",Type="其它",Priority=23},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"中-英\" && p.WordCount !=null",PointExpress="p.WordCount/1000*0.16",Type="其它",Priority=24},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"中-德\" && p.WordCount !=null",PointExpress="p.WordCount/1000*0.18",Type="其它",Priority=25},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"检索结案\"",PointExpress="0.2",Type="其它",Priority=26},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"撰写中客户取消申请\"",PointExpress="0",Type="其它",Priority=27},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"我方代交\"",PointExpress="0",Type="其它",Priority=28},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"我方转格式、复核\"",PointExpress="0.2",Type="其它",Priority=29},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"改权\"",PointExpress="0.3",Type="其它",Priority=30},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"改权+改说明书\"",PointExpress="0.5",Type="其它",Priority=31},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.AgentFeedbackMemo==\"转格式\"",PointExpress="0.1",Type="其它",Priority=32},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\"  && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="0.1",Type="其它",Priority=33},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"同套大陆+台湾\"",PointExpress="0.1",Type="其它",Priority=34},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"台湾案转大陆案\"",PointExpress="0.2",Type="其它",Priority=35},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.CaseNo.StartsWith(\"PATW\") && p.AgentFeedbackMemo==\"大陆案转台湾案\"",PointExpress="0.2",Type="其它",Priority=36},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-分案\")",PointExpress="0.3",Type="其它",Priority=37},
-                new BasePointRule(){Rule="p.CaseNo.StartsWith(\"PAUS\") && (p.CaseNo.EndsWith(\"-同套\") || p.CaseNo.EndsWith(\"CA\") || p.CaseNo.EndsWith(\"CIP\") || p.CaseNo.EndsWith(\"分案\"))",PointExpress="0.5",Type="其它",Priority=38},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"实用新型\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseNo.EndsWith(\"-TS\")",PointExpress="0.1",Type="其它",Priority=39},
-                new BasePointRule(){Rule="p.DoItem==\"新申请\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="0.2",Type="其它",Priority=40},
-                new BasePointRule(){Rule="(p.ApplicationType==\"实用新型\" || p.ApplicationType==\"发明\") && p.CaseNo.StartsWith(\"PACN\") && p.AgentFeedbackMemo==\"客户不进行答辩\"",PointExpress="0",Type="其它",Priority=41},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"涉外OA不答辩,发报导函结案\"",PointExpress="0.1",Type="其它",Priority=42},
-                new BasePointRule(){Rule="p.ApplicationType==\"外观设计\"",PointExpress="0.2",Type="其它",Priority=43},
-                new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"内-外\"",PointExpress="0.7",Type="其它",Priority=44},
-                new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"外-内\"",PointExpress="0.5",Type="其它",Priority=45},
-                new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"内-外\"",PointExpress="0.3",Type="其它",Priority=46},
-                new BasePointRule(){Rule="p.DoItem==\"翻译校核\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"外-内\"",PointExpress="0.2",Type="其它",Priority=47},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"检索结案\"",PointExpress="0.2",Type="其它",Priority=48},
-                new BasePointRule(){Rule="p.DoItem==\"内部检索\"",PointExpress="0",Type="其它",Priority=49},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAAU\")",PointExpress="0.2",Type="其它",Priority=50},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PACN\")",PointExpress="0",Type="其它",Priority=51},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PCTCN\")",PointExpress="0",Type="其它",Priority=52},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"WOCN\")",PointExpress="0",Type="其它",Priority=53},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PADE\")",PointExpress="0.2",Type="其它",Priority=54},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="0.2",Type="其它",Priority=55},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAGB\")",PointExpress="0.2",Type="其它",Priority=56},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAIN\")",PointExpress="0.2",Type="其它",Priority=57},
-                new BasePointRule(){Rule="p.DoItem.Contains(\"补正\")  && p.CaseNo.StartsWith(\"PAUS\")",PointExpress="0.2",Type="其它",Priority=58},
-                new BasePointRule(){Rule="p.DoItem==\"Election Action\"",PointExpress="0.2",Type="其它",Priority=59},
-                new BasePointRule(){Rule="p.DoItem==\"OA答辩校核\"",PointExpress="0.2",Type="其它",Priority=60},
-                new BasePointRule(){Rule="p.DoItem==\"PPH\"",PointExpress="0.1",Type="其它",Priority=61},
-                new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PACN\")",PointExpress="0",Type="其它",Priority=62},
-                new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="0.2",Type="其它",Priority=63},
-                new BasePointRule(){Rule="p.DoItem==\"电询\"  && p.CaseNo.StartsWith(\"PAUS\")",PointExpress="0.2",Type="其它",Priority=64},
-                new BasePointRule(){Rule="p.DoItem==\"分案评估\"",PointExpress="0.1",Type="其它",Priority=65},
-                new BasePointRule(){Rule="p.DoItem==\"分案评估+分案\"",PointExpress="0.2",Type="其它",Priority=66},
-                new BasePointRule(){Rule="p.DoItem==\"绘图\"",PointExpress="0",Type="其它",Priority=67},
-                new BasePointRule(){Rule="p.DoItem==\"技术确认\"",PointExpress="0",Type="其它",Priority=68},
-                new BasePointRule(){Rule="p.DoItem==\"提交ids\" || p.DoItem==\"提交IDS\"",PointExpress="0.1",Type="其它",Priority=69},
-                new BasePointRule(){Rule="p.DoItem==\"询问放弃或复审\"",PointExpress="0",Type="其它",Priority=70},
-                new BasePointRule(){Rule="p.DoItem==\"知识点总结\"",PointExpress="0",Type="其它",Priority=71},
-                new BasePointRule(){Rule="p.DoItem==\"专利挖掘与布局\"",PointExpress="0",Type="其它",Priority=72},
-                new BasePointRule(){Rule="p.ApplicationType==\"外观设计\"",PointExpress="0.2",Type="其它",Priority=73},
-                new BasePointRule(){Rule="p.DoItem==\"请求优先审查\"",PointExpress="0",Type="其它",Priority=74},
-                new BasePointRule(){Rule="p.DoItem==\"翻译\" && p.AgentFeedbackMemo==\"英-中\"",PointExpress="p.WordCount/1000*0.1",Type="其它",Priority=75},
-                new BasePointRule(){Rule="p.DoItem==\"翻译\" && p.AgentFeedbackMemo==\"中-英\"",PointExpress="p.WordCount/1000*0.16",Type="其它",Priority=76},
-                new BasePointRule(){Rule="p.DoItem==\"翻译\" && p.AgentFeedbackMemo==\"中-德\"",PointExpress="p.WordCount/1000*0.18",Type="其它",Priority=77},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"实用新型\"  && p.AgentFeedbackMemo==\"不请款\"",PointExpress="0",Type="OA",Priority=78},
-                new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\" || p.CaseStage==\"六通\" || p.CaseStage==\"七通\" || p.CaseStage==\"八通\")",PointExpress="0",Type="OA",Priority=79},
-                new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && p.CaseStage==\"二通\" && p.AgentFeedbackMemo==\"请款\"",PointExpress="0.14",Type="OA",Priority=80},
-                new BasePointRule(){Rule="p.ApplicationType==\"实用新型\"  && p.DoItemCoefficient==\"实质\" && p.CaseStage==\"一通\" && p.AgentFeedbackMemo==\"请款\"",PointExpress="0.35",Type="OA",Priority=81},
-                new BasePointRule(){Rule="p.DoItem==\"请求复审\" && p.ApplicationType==\"实用新型\"  && p.AgentFeedbackMemo==\"请款\"",PointExpress="0.35",Type="OA",Priority=82},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"非实质\"  && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"",PointExpress="0.3",Type="OA",Priority=83},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"",PointExpress="0.5",Type="OA",Priority=84},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"形式\" && p.AgentFeedbackMemo==\"外所/他人首次转入OA\"",PointExpress="0.2",Type="OA",Priority=85},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"客户提供答辩点,撰写英文报导函\"",PointExpress="0.5",Type="OA",Priority=86},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.AgentFeedbackMemo==\"客户未提供答辩点,撰写英文报导函\"",PointExpress="0.8",Type="OA",Priority=87},
-                new BasePointRule(){Rule="p.DoItem==\"Advisory Action\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=88},
-                new BasePointRule(){Rule="p.DoItem==\"Advisory Action\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=89},
-                new BasePointRule(){Rule="p.DoItem==\"Final Action\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=90},
-                new BasePointRule(){Rule="p.DoItem==\"Final Action\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=91},
-                new BasePointRule(){Rule="p.DoItem==\"form 3\"",PointExpress="0.1",Type="OA",Priority=92},
-                new BasePointRule(){Rule="p.DoItem==\"form 3-8(2)\" ||  p.DoItem==\"Form 3-8(2)\"",PointExpress="0.1",Type="OA",Priority=93},
-                new BasePointRule(){Rule="p.DoItem==\"Non Final Action\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=94},
-                new BasePointRule(){Rule="p.DoItem==\"Non Final Action\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=95},
-                new BasePointRule(){Rule="p.DoItem==\"RCE\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=96},
-                new BasePointRule(){Rule="p.DoItem==\"RCE\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=97},
-                new BasePointRule(){Rule="p.DoItem==\"欧洲案答辩\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=98},
-                new BasePointRule(){Rule="p.DoItem==\"欧洲案答辩\" && p.DoItemCoefficient==\"形式\"",PointExpress="0.2",Type="OA",Priority=99},
-                new BasePointRule(){Rule="p.DoItem==\"口审评估\" && p.DoItemCoefficient==\"非实质\"",PointExpress="0.2",Type="OA",Priority=100},
-                new BasePointRule(){Rule="p.DoItem==\"口审评估\" && p.DoItemCoefficient==\"实质\"",PointExpress="1.5",Type="OA",Priority=101},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAUS\")",PointExpress="1.5",Type="OA",Priority=102},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAUS\")",PointExpress="0.2",Type="OA",Priority=103},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAAU\")",PointExpress="1.5",Type="OA",Priority=104},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PADE\")",PointExpress="1.6",Type="OA",Priority=105},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="1.5",Type="OA",Priority=106},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAGB\")",PointExpress="1.5",Type="OA",Priority=107},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PAIN\")",PointExpress="1.5",Type="OA",Priority=108},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAAU\")",PointExpress="0.2",Type="OA",Priority=109},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PADE\")",PointExpress="0.3",Type="OA",Priority=110},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAEPO\")",PointExpress="0.2",Type="OA",Priority=111},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAGB\")",PointExpress="0.2",Type="OA",Priority=112},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PAIN\")",PointExpress="0.2",Type="OA",Priority=113},
-                new BasePointRule(){Rule="p.DoItem==\"申復\" && p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PATW\")",PointExpress="0.5",Type="OA",Priority=114},
-                new BasePointRule(){Rule="p.DoItem==\"申復\" && p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PATW\")",PointExpress="0.2",Type="OA",Priority=115},
-                new BasePointRule(){Rule="p.DoItem==\"请求复审\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\")",PointExpress="0.5",Type="OA",Priority=116},
-                new BasePointRule(){Rule="p.DoItem==\"意见陈述\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"复审\"",PointExpress="0.2",Type="OA",Priority=117},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"非实质\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"",PointExpress="0.3",Type="OA",Priority=118},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PACN\")  && p.CaseStage==\"一通\"",PointExpress="0.5",Type="OA",Priority=119},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"一通\"",PointExpress="0.2",Type="OA",Priority=120},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"非实质\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"",PointExpress="0.3",Type="OA",Priority=121},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"实质\" && p.CaseNo.StartsWith(\"PCTCN\")  && p.CaseStage==\"一通\"",PointExpress="0.5",Type="OA",Priority=122},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.DoItemCoefficient==\"形式\" && p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"一通\"",PointExpress="0.2",Type="OA",Priority=123},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PACN\") && p.CaseStage==\"二通\"",PointExpress="0.2",Type="OA",Priority=124},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" &&  p.CaseNo.StartsWith(\"PCTCN\") && p.CaseStage==\"二通\"",PointExpress="0.2",Type="OA",Priority=125},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PACN\") &&  (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")",PointExpress="0",Type="OA",Priority=126},
-                new BasePointRule(){Rule="p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.CaseNo.StartsWith(\"PCTCN\") &&  (p.CaseStage==\"三通\" || p.CaseStage==\"四通\" || p.CaseStage==\"五通\")",PointExpress="0",Type="OA",Priority=127},
-                new BasePointRule(){Rule="p.AgentFeedbackMemo==\"已核算绩效\"",PointExpress="0",Type="其它",Priority=128},
-            };
+            #region 初始化绩效点数规则
+            //List<BasePointRule> rules = new List<BasePointRule>();
+            //DataTable dt = wispro.sp.utility.NPOIExcel.ExcelToDataTable("ExcelFiles\\20211109-绩效点数规则-lcy-v1.xlsx", true);
 
-            for(int i = 0; i < rules.Length ; i++)
-            {
-                rules[i].Id = i+1;
-            }
+            //foreach (DataRow row in dt.Rows)
+            //{
+            //    BasePointRule rule = new BasePointRule()
+            //    {
+            //        Rule = row["规则"].ToString(),
+            //        PointExpress = row["点数计算"].ToString(),
+            //        Priority = int.Parse(row["优先级修订"].ToString()),
+            //        Type = row["类型"].ToString()
 
-            modelBuilder.Entity<BasePointRule>().HasData(rules);
+            //    };
+            //}
+
+            //for (int i = 0; i < rules.Count; i++)
+            //{
+            //    rules[i].Id = i + 1;
+            //}
+
+
+            //modelBuilder.Entity<BasePointRule>().HasData(rules);
+            #endregion
 
-            
             AppealType[] appealTypes = new AppealType[]
             {
                 new AppealType(){Id=1, Name ="绩效点数分配比率",CanDoExpress = "p.ItemStaffs.Count()>1"},
                 new AppealType(){Id=2,Name ="案件系数复核",CanDoExpress = "p.DoItem==\"新申请\"",ReviewerExpress ="p.Reviewer"},
                 new AppealType(){Id=3,Name ="处理事项系数复核",CanDoExpress = "p.DoItem==\"新申请\"",ReviewerExpress ="p.Reviewer"},
-                new AppealType(){Id=4,Name ="案件缺漏申诉",CanDoExpress ="",ReviewerExpress ="p.Reviewer",Type =1}
+                new AppealType(){Id=4,Name ="案件缺漏申诉",CanDoExpress ="",ReviewerExpress ="p.Reviewer",Type =1},
+                new AppealType(){Id=5,Name ="案件严重超期说明",CanDoExpress ="p.isDanger()"}
             };
 
             InputField[] inputFields = new InputField[] {

+ 22 - 0
wispro.sp.web/Components/CreateAppeal.razor

@@ -0,0 +1,22 @@
+@inherits FeedbackComponent<AppealRecord>
+
+
+
+<Card Style="width:100%" Bordered>
+    <div>
+        <Row>
+            <AntDesign.Col Span="4"><b>我方文号:</b></AntDesign.Col>
+            <AntDesign.Col Span="8">@_Item.CaseNo</AntDesign.Col>
+            <AntDesign.Col Span="4"><b>处理事项:</b></AntDesign.Col>
+            <AntDesign.Col Span="8">@_Item.DoItem</AntDesign.Col>
+        </Row>
+        <Row><AntDesign.Col Span="24">&nbsp;</AntDesign.Col></Row>
+        <Row>
+            <AntDesign.Col Span="4"><b>案件名称:</b></AntDesign.Col>
+            <AntDesign.Col Span="20">@_Item.CaseName</AntDesign.Col>
+
+        </Row>
+    </div>
+</Card>
+
+

+ 64 - 0
wispro.sp.web/Components/CreateAppeal.razor.cs

@@ -0,0 +1,64 @@
+using AntDesign;
+using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Forms;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.Json;
+using System.Threading.Tasks;
+using wispro.sp.entity;
+using wispro.sp.web.Services;
+
+namespace wispro.sp.web.Components
+{
+    public partial class CreateAppeal
+    {
+
+        
+        public PerformanceItem _Item;
+
+        
+        public int _AppealTypeId;
+
+        [Inject]
+        protected AppealTypeService _atService { get; set; }
+
+        private List<InputField> inputFields;
+        private List<InputFieldValue> inputFieldValues;
+        private AppealType _CurrentAppealType;
+        private AppealRecord aRecord;
+
+        public async Task SetParameter(PerformanceItem item, int appealTypeId)
+        {
+            _Item = item;
+            _AppealTypeId = appealTypeId;
+
+            _CurrentAppealType =await _atService.GetItem(_AppealTypeId);
+
+            inputFields = await _atService.GetInputFields(_AppealTypeId, 0);
+
+            
+        }
+        //public override async Task<Task> SetParametersAsync(ParameterView parameters)
+        //{
+        //    int temOut;
+        //    if(parameters.TryGetValue("AppealTypeId",out temOut))
+        //    {
+        //        _CurrentAppealType =await _atService.GetItem(temOut);
+        //    }
+
+        //    return base.SetParametersAsync(parameters);
+        //}
+
+        private void OnFinish(EditContext editContext)
+        {
+            //Console.WriteLine($"Success:{JsonSerializer.Serialize(_model)}");
+            _ = base.FeedbackRef.CloseAsync();
+        }
+
+        private void OnFinishFailed(EditContext editContext)
+        {
+            //Console.WriteLine($"Failed:{JsonSerializer.Serialize(_model)}");
+        }
+    }
+}

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

@@ -124,17 +124,11 @@
                                             <AntDesign.DropdownButton OnClick="() => OnsubShensu(context)" Type="@((ButtonType.Primary, ButtonType.Default))" ButtonsStyle="@("background-color: #1890ff;")">
                                                 <Overlay>
                                                     <Menu>
-                                                        @if (((!context.CaseNo.Contains("CN") || context.CaseNo.Contains("WO")) && context.DoItem == "新申请") || context.DoItem == "翻译")
+                                                        @foreach(var apType in  apTypeService.GetItems(context))
                                                         {
-
-                                                            @*<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>
+                                                            <MenuItem @key="@($"{context.Id}-{apType.Id}")" OnClick="()=>ShowModel(context,apType)">@apType.Name</MenuItem>
                                                         }
+                                                       
                                                     </Menu>
                                                 </Overlay>
                                                 <ChildContent>申诉</ChildContent>

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

@@ -33,7 +33,9 @@ namespace wispro.sp.web.Pages.AppCase
             new() { Text = "D", Value = "D" }
         };
         
-        
+        [Inject]
+        protected AppealTypeService apTypeService { get; set; }
+
         private List<PerformanceItem> _Datas;
         private List<StaffStatistics> MyStatistics;
         IEnumerable<PerformanceItem> selectedItems= new List<PerformanceItem>();
@@ -75,6 +77,7 @@ namespace wispro.sp.web.Pages.AppCase
             }
 
             isFirstInit = false;
+            await apTypeService.GetItems();
             StateHasChanged();
             //Console.WriteLine($"OnInitializedAsync:[tota:{_total}\tPageIndex:{_pageIndex}\tPageSize:{_pageSize}]");
         }
@@ -167,6 +170,7 @@ namespace wispro.sp.web.Pages.AppCase
         {
             EditingItem = Item;
             _visible = true;
+
             //return new EventCallback();
         }
 
@@ -352,5 +356,10 @@ namespace wispro.sp.web.Pages.AppCase
             table.ReloadData();
             StateHasChanged();
         }
+
+        void ShowModel(PerformanceItem Item,AppealType appealType)
+        {
+            StateHasChanged();
+        }
     }
 }

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

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

+ 85 - 0
wispro.sp.web/Services/AppealTypeService.cs

@@ -0,0 +1,85 @@
+using DynamicExpresso;
+using Microsoft.AspNetCore.Components.Authorization;
+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;
+using wispro.sp.share;
+using wispro.sp.web.Auth;
+
+namespace wispro.sp.web.Services
+{
+    public class AppealTypeService
+    {
+        private readonly HttpClient _httpClient;
+        private readonly JwtAuthenticationStateProvider _jwt;
+        private  List<AppealType> AppealTypes;
+
+        public AppealTypeService(HttpClient httpClient, AuthenticationStateProvider jwt)
+        {
+            _httpClient = httpClient;
+            _jwt = (JwtAuthenticationStateProvider)jwt;
+
+            
+        }
+
+        public async Task<List<AppealType>> GetItems()
+        {
+            if (AppealTypes == null)
+            {
+                AppealTypes = await _httpClient.GetFromJsonAsync<List<AppealType>>($"http://localhost:39476/api/Appeal/GetAppealTypes");
+                
+            }
+            return AppealTypes;
+        }
+
+        public List<AppealType> GetItems(PerformanceItem item)
+        {
+            
+
+            List<AppealType> retList = new List<AppealType>();
+
+            foreach (var at in AppealTypes)
+            {
+                if (!string.IsNullOrWhiteSpace(at.CanDoExpress))
+                {
+                    var interpreter = new Interpreter();
+                    Func<PerformanceItem, bool> func = interpreter.ParseAsDelegate<Func<PerformanceItem, bool>>(at.CanDoExpress, "p");
+                    bool result = func.Invoke(item);
+
+                    if (result)
+                    {
+                        retList.Add(at);
+                    }
+                }
+                else
+                {
+                    retList.Add(at);
+                }
+            }
+
+            return retList;
+        }
+
+        public async Task<AppealType> GetItem(int appealTypeId)
+        {
+            if (AppealTypes == null)
+            {
+                AppealTypes = await _httpClient.GetFromJsonAsync<List<AppealType>>($"http://localhost:39476/api/Appeal/GetAppealTypes");
+            }
+
+            var retData = AppealTypes.Where<AppealType>(ap => ap.Id == appealTypeId).FirstOrDefault();
+
+            return retData;
+        }
+
+        public async Task<List<InputField>> GetInputFields(int appealTypeId,int State)
+        {
+            var data = await _httpClient.GetFromJsonAsync<List<InputField>>($"http://localhost:39476/api/Appeal/GetInputField?appealTypeId={appealTypeId}&state={State}");
+            return data;
+        }
+    }
+}

+ 2 - 0
wispro.sp.winClient/Form1.cs

@@ -172,6 +172,8 @@ namespace wispro.sp.winClient
         private async void button3_Click(object sender, EventArgs e)
         {
             //await TestQueryFilter();
+            List<PerformanceItem> retList = new List<PerformanceItem>();
+            var test= retList.Where<PerformanceItem>(p => p.isDanger());
 
             await InitRules(true);