Selaa lähdekoodia

解决序列化循环引用问题

luocaiyang 2 vuotta sitten
vanhempi
commit
8fc277294c
30 muutettua tiedostoa jossa 1126 lisäystä ja 114 poistoa
  1. 6 0
      StaffPerformance.sln
  2. 138 33
      wispro.sp.api/Controllers/AppealController.cs
  3. 9 3
      wispro.sp.api/Controllers/PerformanceItemController.cs
  4. 108 4
      wispro.sp.api/Controllers/ProjectController.cs
  5. 1 1
      wispro.sp.api/Job/AgentMessageJob.cs
  6. 2 2
      wispro.sp.api/Job/ImportProjectInfoJob.cs
  7. 2 2
      wispro.sp.api/Job/ImportReportJob.cs
  8. 2 2
      wispro.sp.api/Job/UpdateJXDataFromIPEasyJob.cs
  9. 1 1
      wispro.sp.api/Properties/launchSettings.json
  10. 20 9
      wispro.sp.api/Startup.cs
  11. 356 0
      wispro.sp.ipeasyApi/Controllers/ipEasyController.cs
  12. 26 0
      wispro.sp.ipeasyApi/Program.cs
  13. 31 0
      wispro.sp.ipeasyApi/Properties/launchSettings.json
  14. 56 0
      wispro.sp.ipeasyApi/Startup.cs
  15. 9 0
      wispro.sp.ipeasyApi/appsettings.Development.json
  16. 20 0
      wispro.sp.ipeasyApi/appsettings.json
  17. 16 0
      wispro.sp.ipeasyApi/wispro.sp.ipeasyApi.csproj
  18. 2 2
      wispro.sp.web/Pages/AppCase/CaseManager.razor
  19. 1 1
      wispro.sp.web/Pages/Organization/Department.razor.cs
  20. 1 1
      wispro.sp.web/Pages/StaffList.razor
  21. 63 0
      wispro.sp.web/Properties/Resources.Designer.cs
  22. 101 0
      wispro.sp.web/Properties/Resources.resx
  23. 11 14
      wispro.sp.web/Properties/launchSettings.json
  24. 17 8
      wispro.sp.web/Services/AppealTypeService.cs
  25. 45 7
      wispro.sp.web/wispro.sp.web.csproj
  26. 1 2
      wispro.sp.web/wwwroot/appsettings.json
  27. 21 21
      wispro.sp.web/wwwroot/index.html
  28. 1 1
      wispro.sp.winClient/Form1.cs
  29. 39 0
      wispro.sp.winClient/Form2.Designer.cs
  30. 20 0
      wispro.sp.winClient/Form2.cs

+ 6 - 0
StaffPerformance.sln

@@ -15,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wispro.sp.share", "wispro.s
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wispro.sp.web", "wispro.sp.web\wispro.sp.web.csproj", "{237D9F7B-801E-440F-BA1A-3B5F8468C14F}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wispro.sp.ipeasyApi", "wispro.sp.ipeasyApi\wispro.sp.ipeasyApi.csproj", "{5CF983AA-0815-4188-81E2-7472DA8CCAE6}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -45,6 +47,10 @@ Global
 		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Release|Any CPU.Build.0 = Release|Any CPU
+		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 138 - 33
wispro.sp.api/Controllers/AppealController.cs


+ 9 - 3
wispro.sp.api/Controllers/PerformanceItemController.cs

@@ -1016,7 +1016,10 @@ namespace wispro.sp.api.Controllers
                 {
                     try
                     {
-                        
+                        if(item.CaseNo == "S2216480-稳定性分析")
+                        {
+                            System.Diagnostics.Debug.WriteLine("");
+                        }
                         Utility.Utility.CalBasePoint(item, rules);
 
                         if (item.BasePoint > 0)
@@ -1967,7 +1970,7 @@ namespace wispro.sp.api.Controllers
 
             
 
-            if (temIStaffs.Where<ItemStaff>(p => p.PerformancePoint != null || p.PerformancePoint == 0).Count() > 0)
+            if (total >1 && temIStaffs.Where<ItemStaff>(p => p.PerformancePoint != null || p.PerformancePoint == 0).Count() > 0)
             {
                 total = temIStaffs.Select(i => i.PerformancePoint.Value).Sum();
                 isPJFP = false;
@@ -2726,6 +2729,7 @@ namespace wispro.sp.api.Controllers
                 if (item.Customer != null)
                 {
                     item.Customer.PerformanceItems = null;
+                    item.Customer.ResponseMan = null;
                 }
 
                 if (item.CalMonth != null)
@@ -2737,6 +2741,8 @@ namespace wispro.sp.api.Controllers
 
             ret.Results = retList.ToList();
 
+            //string str= System.Text.Json.JsonSerializer.Serialize(ret);
+
             return ret;
         }
 
@@ -3697,7 +3703,7 @@ namespace wispro.sp.api.Controllers
             if (temObj != null)
             {
                 var temList = spDb.StaffStatisticsforLevels.Where(l => l.CalMonthId == temObj.Id);
-                Context.StaffStatisticsforLevels.RemoveRange(temList);
+                spDb.StaffStatisticsforLevels.RemoveRange(temList);
 
                 var NewList = StatisticsCount(temObj.Id, spDb);
 

+ 108 - 4
wispro.sp.api/Controllers/ProjectController.cs

@@ -25,13 +25,57 @@ namespace wispro.sp.api.Controllers
             
 
         }
+
+        private void replaceDataforCycleSerialze(List<ProjectInfo> projects)
+        {
+            foreach (var project in projects)
+            {
+                if (project.Customer != null)
+                {
+                    var temCustomer = new Customer()
+                    {
+                        Address = project.Customer.Address,
+                        Name = project.Customer.Name,
+                        Id = project.Customer.Id
+                    };
+
+                    project.Customer = temCustomer;
+                }
+
+                if (project.Reviewer != null)
+                {
+                    var temStaff = new Staff()  
+                    {
+                        Name = project.Reviewer.Name,
+                        Id = project.Reviewer.Id,
+                    };
+
+                    project.Reviewer  = temStaff;
+                }
+
+                if (project.WorkflowUser != null)
+                {
+                    var temStaff = new Staff()
+                    {
+                        Name = project.WorkflowUser.Name,
+                        Id = project.WorkflowUser.Id,
+                    };
+
+                    project.WorkflowUser = temStaff;
+                }
+            }
+        }
         public List<ProjectInfo> GetProjects(int state)
         {
-            return Context.ProjectInfos
+            var retList = Context.ProjectInfos
                 .Include(p => p.Customer)
                 .Include(p=>p.Reviewer)
                 .Include(p => p.WorkflowUser)
                 .Where(s => s.CaseState == state).ToList();
+
+            replaceDataforCycleSerialze(retList);
+
+            return retList;
         }
 
         public List<ProjectInfo> GetAll()
@@ -42,6 +86,8 @@ namespace wispro.sp.api.Controllers
                 .Include(p => p.WorkflowUser)
                 .ToList();
 
+            replaceDataforCycleSerialze(retList);
+
             return retList;
         }
 
@@ -72,12 +118,69 @@ namespace wispro.sp.api.Controllers
 
         public List<ProjectContentRecord> GetMyProjects()
         {
-            return Context.ProjectContentRecords
-                .Include(p=>p.CalMonth)
+            var retList = Context.ProjectContentRecords
+                .Include(p => p.CalMonth)
                 .Include(p => p.Reviewer)
                 .Include(p => p.Project).ThenInclude(p => p.Customer)
-                .Include(p=>p.ProjectWorkContents)
+                .Include(p => p.ProjectWorkContents)
                 .Where(p => p.Staff.Name == User.Identity.Name).ToList();
+
+            NewMethod(retList);
+
+            return retList;
+        }
+
+        private static void NewMethod(List<ProjectContentRecord> retList)
+        {
+            foreach (var pcRecord in retList)
+            {
+                if (pcRecord.CalMonth != null)
+                {
+                    pcRecord.CalMonth = new CalMonth()
+                    {
+                        Id = pcRecord.CalMonth.Id,
+                        Year = pcRecord.CalMonth.Year,
+                        Month = pcRecord.CalMonth.Month,
+                        PerformanceItems = null
+
+                    };
+
+
+                }
+
+                if (pcRecord.Reviewer != null)
+                {
+                    var temStaff = new Staff()
+                    {
+                        Name = pcRecord.Reviewer.Name,
+                        Id = pcRecord.Reviewer.Id,
+                    };
+
+                    pcRecord.Reviewer = temStaff;
+                }
+
+                if (pcRecord.Project != null)
+                {
+                    ProjectInfo temProj = new ProjectInfo()
+                    {
+                        CaseNo = pcRecord.Project.CaseNo,
+                        CaseName = pcRecord.Project.CaseName,
+                        Customer = new Customer()
+                        {
+                            Name = (pcRecord.Project.Customer == null) ? "" : pcRecord.Project.Customer.Name,
+                            Id = (pcRecord.Project.Customer == null) ? 0 : pcRecord.Project.Customer.Id,
+                        }
+                    };
+                }
+
+                if (pcRecord.ProjectWorkContents != null)
+                {
+                    foreach (var pwContent in pcRecord.ProjectWorkContents)
+                    {
+                        pwContent.ContentRecord = null;
+                    }
+                }
+            }
         }
 
         public ProjectContents getProjectWorkContent(int Id)
@@ -322,6 +425,7 @@ namespace wispro.sp.api.Controllers
                                 if(item == null)
                                 {
                                     item = new PerformanceItem();
+                                    item.DoItem = "";
                                 }
 
                                 item.CalMonthId = saveObj.ProjectContentRecord.CalMonthId.Value;

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
wispro.sp.api/Job/AgentMessageJob.cs


+ 2 - 2
wispro.sp.api/Job/ImportProjectInfoJob.cs

@@ -172,7 +172,7 @@ namespace wispro.sp.api.Job
                     {
                         Name = temName,
                         Account = temName,
-                        Password = "12345678",
+                        Password = utility.MD5Utility.GetMD5("12345678"),
                         IsCalPerformsnce = false,
                         Status = "试用期",
                         StaffGradeId = 4
@@ -322,7 +322,7 @@ namespace wispro.sp.api.Job
                     {
                         Name = temName,
                         Account = temName,
-                        Password = "12345678",
+                        Password = utility.MD5Utility.GetMD5("12345678"),
                         IsCalPerformsnce = false,
                         Status = "试用期",
                         StaffGradeId = 4

+ 2 - 2
wispro.sp.api/Job/ImportReportJob.cs

@@ -302,7 +302,7 @@ namespace wispro.sp.api.Job
                     {
                         Name = temName,
                         Account = temName,
-                        Password = "12345678",
+                        Password = utility.MD5Utility.GetMD5("12345678"),
                         IsCalPerformsnce = false,
                         Status = "试用期",
                         StaffGradeId = 4
@@ -460,7 +460,7 @@ namespace wispro.sp.api.Job
                     {
                         Name = temName,
                         Account = temName,
-                        Password = "12345678",
+                        Password = utility.MD5Utility.GetMD5("12345678"),
                         IsCalPerformsnce = false,
                         Status = "试用期",
                         StaffGradeId = 4

+ 2 - 2
wispro.sp.api/Job/UpdateJXDataFromIPEasyJob.cs

@@ -118,8 +118,8 @@ namespace wispro.sp.api.Job
                     {
                         cmd.CommandText = strSql;
                         cmd.CommandType = CommandType.Text;
-                        cmd.Parameters.Add(new SqlParameter("DoItem", Item.DoItem));
-                        cmd.Parameters.Add(new SqlParameter("CaseNo", Item.CaseNo));
+                        cmd.Parameters.Add(new SqlParameter("DoItem", Item.DoItem.Trim()));
+                        cmd.Parameters.Add(new SqlParameter("CaseNo", Item.CaseNo.Trim()));
                         //if (!string.IsNullOrEmpty(Item.CaseStage))
                         //{
                         //    cmd.Parameters.Add(new SqlParameter("CaseStage", Item.CaseStage));

+ 1 - 1
wispro.sp.api/Properties/launchSettings.json

@@ -24,7 +24,7 @@
       "environmentVariables": {
         "ASPNETCORE_ENVIRONMENT": "Development"
       },
-      "applicationUrl": "https://localhost:44359;http://localhost:5000"
+      "applicationUrl": "http://localhost:5000"
     }
   }
 }

+ 20 - 9
wispro.sp.api/Startup.cs

@@ -57,13 +57,24 @@ namespace wispro.sp.api
                     ClockSkew = TimeSpan.Zero
                 };
             });
-            services.AddControllers().AddNewtonsoftJson(o =>
-            { 
-                o.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
-                o.SerializerSettings.DefaultValueHandling = DefaultValueHandling.Ignore;
-                o.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
-                
-            });
+            //services.AddControllers().AddNewtonsoftJson(o =>
+            //{
+            //    o.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
+            //    o.SerializerSettings.DefaultValueHandling = DefaultValueHandling.Ignore;
+            //    o.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
+
+            //});
+
+            services.AddControllers()
+                .AddJsonOptions(options =>
+                {
+                    //options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.Preserve;
+                    //json循环最大深度 如果你所需的资源确实超过了32层,可以加深深度来解决
+                    options.JsonSerializerOptions.MaxDepth = 64;
+                    //null值不序列化为json   
+                    options.JsonSerializerOptions.IgnoreNullValues = true;
+                    
+                });
 
             services.AddDbContext<spDbContext>(optionsAction =>
                   optionsAction.UseSqlServer(Configuration.GetConnectionString("DefaultConnect"))
@@ -86,8 +97,6 @@ namespace wispro.sp.api
                 app.UseDeveloperExceptionPage();
             }
 
-            app.UseHttpsRedirection();
-
             app.UseRouting();
 
             app.UseCors(MyAllowSpecificOrigins);
@@ -95,6 +104,8 @@ namespace wispro.sp.api
             app.UseAuthentication();
             app.UseAuthorization();
 
+            //app.UseHttpsRedirection();
+
             app.UseEndpoints(endpoints =>
             {
                 endpoints.MapControllers();

+ 356 - 0
wispro.sp.ipeasyApi/Controllers/ipEasyController.cs

@@ -0,0 +1,356 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Data.SqlClient;
+using System;
+using System.Data;
+using wispro.sp.utility;
+
+namespace wispro.sp.ipeasyApi.Controllers
+{
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    public class ipEasyController : ControllerBase
+    {
+		/// <summary>
+		/// 从维德系统中获取报表数据
+		/// </summary>
+		/// <param name="ReportName">报告名称</param>
+		/// <param name="isModifyDate">是否从上月1日开始取上月的整月数据</param>
+		/// <returns></returns>
+		[HttpGet,HttpPost]
+        public DataTable GetDataFromIPEasy(string ReportName, bool isModifyDate)
+        {
+            DataTable dt = new DataTable();
+            string strSQL = "";
+            switch (ReportName)
+            {
+                case "每月绩效统计--发客户超过一个月未完成案件":
+                    strSQL = @"SELECT  p_case_info.case_volume as 我方文号,
+		                i_apply_type.apply_type_zh_cn as 申请类型,
+		                i_business_type.business_type_zh_cn as 业务类型,
+		                i_ctrl_proc.ctrl_proc_zh_cn as 处理事项,
+		                (select case_status_zh_cn from i_case_status where case_status_id=p_proc_info.review_stage)  as 案件阶段,
+		                i_case_coefficient.case_coefficient_zh_cn as 案件系数,
+		                i_proc_coefficient.proc_coefficient_zh_cn as 处理事项系数,
+		                (select  proc_coefficient_zh_cn from p_proc_info pr 
+			                left join i_proc_coefficient pc on pc.proc_coefficient_id=pr.proc_coefficient_id 
+			                where case_id=p_case_info.case_id and ctrl_proc_id='8b96378e-05a0-4a8d-b3d1-39af92fddaf5' 
+				                and pr.seq=
+					                (select max(seq) from p_proc_info pr where case_id=p_case_info.case_id 
+						                and ctrl_proc_id='8b96378e-05a0-4a8d-b3d1-39af92fddaf5'and seq<p_proc_info.seq)
+					                ) as 前一次OA处理事项系数,
+		                (STUFF((SELECT ',' + u.cn_name from p_proc_pic_list as pl
+			                inner join s_user_info as u on u.user_id = pl.pic_id 
+			                inner join  p_proc_info pr1 on pr1.proc_id=pl.obj_id 
+				                where case_id=p_case_info.case_id and 
+					                ctrl_proc_id='8b96378e-05a0-4a8d-b3d1-39af92fddaf5' 
+					                and pr1.seq=(
+						                select max(seq) from p_proc_info pr2 where case_id=p_case_info.case_id 
+						                and ctrl_proc_id='8b96378e-05a0-4a8d-b3d1-39af92fddaf5' 
+						                and seq<p_proc_info.seq) FOR XML PATH('') ),1,1,'')) as 前一次OA处理人,
+		                STUFF((SELECT ',' + ur.rank_zh_cn from p_proc_pic_list as pl   
+			                inner join s_user_info as u on u.user_id = pl.pic_id 
+			                left join i_user_rank ur on ur.rank_id=u.rank_id 
+			                where pl.obj_id = p_proc_info.proc_id   FOR XML PATH('') ),1,1,'') as 处理人等级,
+		                STUFF((SELECT ',' + u.cn_name from p_proc_pic_list as pl   
+			                inner join s_user_info as u on u.user_id = pl.pic_id 
+			                where pl.obj_id = p_proc_info.proc_id   FOR XML PATH('') ),1,1,'') as 处理人,
+		                STUFF((SELECT ',' + u.cn_name from p_revise_user_list as pl   
+			                inner join s_user_info as u on u.user_id = pl.revise_user_id 
+			                where pl.obj_id = p_proc_info.proc_id   FOR XML PATH('') ),1,1,'') as 核稿人,
+		                c_customer.customer_name as 客户名称,
+		                STUFF((SELECT ',' + a.applicant_name_cn from p_applicant_list as al 
+			                inner join i_applicant as a on a.applicant_id = al.applicant_id 
+			                where al.obj_id = p_case_info.case_id order by al.seq FOR XML PATH('') ),1,1,'') as 申请人,
+		                p_proc_info.finish_date as 处理事项完成日,
+		                p_proc_info.finish_doc_date as 定稿日,
+		                p_proc_info.back_date as 返稿日,
+		                i_case_type.case_type_zh_cn as 案件类型,
+		                i_case_status.case_status_zh_cn as 案件状态,
+		                p_proc_info.proc_note as 处理事项备注,
+		                (select proc_status_zh_cn from i_proc_status where proc_status_id=p_proc_info.proc_status_id) as 处理状态,
+		                p_case_info.case_name as 案件名称,
+		                p_case_info.charge_date as 委案日期,
+		                p_proc_info.cus_due_date as 客户期限,
+		                p_proc_info.int_due_date as 内部期限,
+		                p_proc_info.first_doc_date as 初稿日,
+		                p_case_info.remark as 案件备注,
+		                p_proc_info.translate_count as 翻译字数,
+		                STUFF((SELECT ',' + ui.cn_name from p_sales_list as sl 
+			                inner join dbo.s_user_info as ui on ui.user_id = sl.sales_user_id 
+			                where sl.obj_id = p_case_info.case_id AND sl.is_enabled=1 order by sl.seq FOR XML PATH('') ),1,1,'') as 业务人员,
+		                i_country.country_zh_cn as '国家(地区)'  
+	                from p_case_info  
+		                inner join   p_case_advance_info  with(nolock)  on p_case_info.case_id=p_case_advance_info.case_id  
+		                inner join   i_apply_type  with(nolock)  on i_apply_type.apply_type_id=p_case_info.apply_type_id  
+		                inner join   i_case_type  with(nolock)  on i_case_type.case_type_id=p_case_info.case_type_id  
+		                inner join   i_country  with(nolock)  on i_country.country_id=p_case_info.country_id  
+		                inner join   i_case_status  with(nolock)  on i_case_status.case_status_id=p_case_info.case_status_id  
+		                inner join   c_customer  with(nolock)  on c_customer.customer_id=p_case_info.customer_id 
+		                left join i_case_coefficient on i_case_coefficient.case_coefficient_id=p_case_info.case_coefficient_id  
+		                inner join   p_proc_info  with(nolock)  on p_case_info.case_id=p_proc_info.case_id  
+		                inner join   i_ctrl_proc  with(nolock)  on p_proc_info.ctrl_proc_id=i_ctrl_proc.ctrl_proc_id 
+		                inner join i_business_type on i_business_type.business_type_id = p_case_info.business_type_id 
+		                inner join s_dept_info on s_dept_info.dept_id = p_case_info.charge_dept_id 
+		                left join p_proc_pic_list with(nolock) on p_proc_pic_list.obj_id=p_proc_info.proc_id 
+		                left join s_user_info with(nolock) on s_user_info.user_id=p_proc_pic_list.pic_id 
+		                left join i_proc_coefficient on i_proc_coefficient.proc_coefficient_id=p_proc_info.proc_coefficient_id 
+	                where 
+		                p_case_info.is_enabled=1 and p_proc_info.is_enabled=1 and 
+		                s_user_info.dept_id not in ('60e09ee0-fcc7-446f-badc-af9973079fee','34d0e351-71dc-418f-9b6b-bcb67af62fed','599cbe0c-044e-4ffc-9411-96dd9019d8a6') and 
+		                p_proc_info.finish_date is null 
+		                and p_proc_info.back_date<DATEADD(MM,-1,DATEADD(MM, DATEDIFF(MM,0,getdate()), 0)) and  
+		                (p_case_info.case_type_id='31D1A147-2931-43B5-94AE-B72B1525BA8A'   ) AND  
+		                ( i_ctrl_proc.ctrl_proc_zh_cn='新申请'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='Non'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='无效宣告'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='意见陈述'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='专利挖掘与布局'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='处理审查意见'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='Final'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='复审通知意见陈述'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='申復'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='RCE'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='翻译'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='提出异议复审'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='Advisory'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='复审'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='请求复审'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='提出报告'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='提出公众意见'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='诉讼'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='提出异议'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='补充理由和证据'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='无效分析'    
+			                or  i_ctrl_proc.ctrl_proc_zh_cn='无效答辩'   
+		                )";
+                    break;
+                case "每月绩效统计--上个月递交完成案件":
+                    strSQL = @"SELECT  
+	                    p_case_info.case_volume as 我方文号,
+	                    i_apply_type.apply_type_zh_cn as 申请类型,
+	                    i_business_type.business_type_zh_cn as 业务类型,
+	                    i_ctrl_proc.ctrl_proc_zh_cn as 处理事项,
+	                    (select case_status_zh_cn from i_case_status where case_status_id=p_proc_info.review_stage)  as 案件阶段,
+	                    i_case_coefficient.case_coefficient_zh_cn as 案件系数,
+	                    i_proc_coefficient.proc_coefficient_zh_cn as 处理事项系数,
+	                    (select  
+		                    proc_coefficient_zh_cn from p_proc_info pr 
+		                    left join i_proc_coefficient pc on pc.proc_coefficient_id=pr.proc_coefficient_id 
+	                    where case_id=p_case_info.case_id 
+		                    and ctrl_proc_id='8b96378e-05a0-4a8d-b3d1-39af92fddaf5' 
+		                    and pr.seq=(select max(seq) from p_proc_info pr where case_id=p_case_info.case_id 
+		                    and ctrl_proc_id='8b96378e-05a0-4a8d-b3d1-39af92fddaf5'and seq<p_proc_info.seq)
+	                    ) as 前一次OA处理事项系数,
+	                    (STUFF((SELECT ',' + u.cn_name from p_proc_pic_list as pl   
+		                    inner join s_user_info as u on u.user_id = pl.pic_id 
+		                    inner join  p_proc_info pr1 on pr1.proc_id=pl.obj_id 
+	                    where case_id=p_case_info.case_id 
+		                    and ctrl_proc_id='8b96378e-05a0-4a8d-b3d1-39af92fddaf5' 
+		                    and pr1.seq=(select max(seq) from p_proc_info pr2 where case_id=p_case_info.case_id 
+		                    and ctrl_proc_id='8b96378e-05a0-4a8d-b3d1-39af92fddaf5'and seq<p_proc_info.seq) FOR XML PATH('') ),1,1,'')
+	                    ) as 前一次OA处理人,
+	                    STUFF((SELECT ',' + ur.rank_zh_cn from p_proc_pic_list as pl   
+		                    inner join s_user_info as u on u.user_id = pl.pic_id 
+		                    left join i_user_rank ur on ur.rank_id=u.rank_id where pl.obj_id = p_proc_info.proc_id   FOR XML PATH('') ),1,1,'') as 处理人等级,
+	                    STUFF((SELECT ',' + u.cn_name from p_proc_pic_list as pl   
+		                    inner join s_user_info as u on u.user_id = pl.pic_id 
+		                    where pl.obj_id = p_proc_info.proc_id   FOR XML PATH('') ),1,1,'') as 处理人,
+	                    STUFF((SELECT ',' + u.cn_name from p_revise_user_list as pl   
+		                    inner join s_user_info as u on u.user_id = pl.revise_user_id 
+		                    where pl.obj_id = p_case_info.case_id   FOR XML PATH('') ),1,1,'') as 案件核稿人,
+	                    c_customer.customer_name as 客户名称,
+	                    STUFF((SELECT ',' + a.applicant_name_cn from p_applicant_list as al 
+		                    inner join i_applicant as a on a.applicant_id = al.applicant_id 
+	                    where al.obj_id = p_case_info.case_id order by al.seq FOR XML PATH('') ),1,1,'') as 申请人,
+	                    p_proc_info.finish_date as 处理事项完成日,
+	                    p_proc_info.finish_doc_date as 定稿日,
+	                    p_proc_info.back_date as 返稿日,
+	                    i_case_type.case_type_zh_cn as 案件类型,
+	                    i_case_status.case_status_zh_cn as 案件状态,
+	                    p_proc_info.proc_note as 处理事项备注,
+	                    (select proc_status_zh_cn from i_proc_status where proc_status_id=p_proc_info.proc_status_id) as 处理状态,
+	                    p_case_info.case_name as 案件名称,
+	                    p_case_info.charge_date as 委案日期,
+	                    p_proc_info.cus_due_date as 客户期限,
+	                    p_proc_info.int_due_date as 内部期限,
+	                    p_proc_info.first_doc_date as 初稿日,
+	                    p_case_info.remark as 案件备注,
+	                    p_proc_info.translate_count as 翻译字数,
+	                    STUFF((SELECT ',' + ui.cn_name from p_sales_list as sl 
+		                    inner join dbo.s_user_info as ui on ui.user_id = sl.sales_user_id 
+	                    where sl.obj_id = p_case_info.case_id AND sl.is_enabled=1 order by sl.seq FOR XML PATH('') ),1,1,'') as 业务人员,
+	                    i_country.country_zh_cn as '国家(地区)'  
+                    from p_case_info  
+	                    inner join   p_case_advance_info  with(nolock)  on p_case_info.case_id=p_case_advance_info.case_id  
+	                    inner join   i_apply_type  with(nolock)  on i_apply_type.apply_type_id=p_case_info.apply_type_id  
+	                    inner join   i_case_type  with(nolock)  on i_case_type.case_type_id=p_case_info.case_type_id  
+	                    inner join   i_country  with(nolock)  on i_country.country_id=p_case_info.country_id  
+	                    inner join   i_case_status  with(nolock)  on i_case_status.case_status_id=p_case_info.case_status_id  
+	                    inner join   c_customer  with(nolock)  on c_customer.customer_id=p_case_info.customer_id 
+	                    left join i_case_coefficient on i_case_coefficient.case_coefficient_id=p_case_info.case_coefficient_id  
+	                    inner join   p_proc_info  with(nolock)  on p_case_info.case_id=p_proc_info.case_id  
+	                    inner join   i_ctrl_proc  with(nolock)  on p_proc_info.ctrl_proc_id=i_ctrl_proc.ctrl_proc_id 
+	                    inner join i_business_type on i_business_type.business_type_id = p_case_info.business_type_id 
+	                    inner join s_dept_info on s_dept_info.dept_id = p_case_info.charge_dept_id 
+	                    left join p_proc_pic_list with(nolock) on p_proc_pic_list.obj_id=p_proc_info.proc_id 
+	                    left join s_user_info with(nolock) on s_user_info.user_id=p_proc_pic_list.pic_id 
+	                    left join i_proc_coefficient on i_proc_coefficient.proc_coefficient_id=p_proc_info.proc_coefficient_id 
+                    where 
+	                    p_case_info.is_enabled=1 
+	                    and p_proc_info.is_enabled=1 
+	                    and s_user_info.dept_id not in ('60e09ee0-fcc7-446f-badc-af9973079fee','34d0e351-71dc-418f-9b6b-bcb67af62fed','599cbe0c-044e-4ffc-9411-96dd9019d8a6') 
+	                    and  (p_case_info.case_type_id='31D1A147-2931-43B5-94AE-B72B1525BA8A'   ) 
+	                    AND  ((p_proc_info.finish_date >= @beginTime  and p_proc_info.finish_date<@endTime)) ";
+                    break;
+                case "每月绩效统计--中国一次OA授权表":
+                    strSQL = @"select 	
+	                    p_case_info.case_volume as 我方文号, 
+	                    p_case_info.case_name as 案件名称,
+	                    p_case_info.app_no as 申请号,
+	                    c_customer.customer_name as 客户名称,
+	                    STUFF((SELECT ',' + u.cn_name from p_proc_pic_list as pl   
+		                    inner join s_user_info as u on u.user_id = pl.pic_id 
+		                    where pl.obj_id = p_case_info.case_id   FOR XML PATH('') ),1,1,'') as 案件处理人,
+	                    STUFF((SELECT ',' + u.cn_name from p_revise_user_list as pl   
+		                    inner join s_user_info as u on u.user_id = pl.revise_user_id 
+		                    where pl.obj_id = p_case_info.case_id   FOR XML PATH('') ),1,1,'') as 案件核稿人,
+	                    p_file_list.post_date as 发文日期,
+	                    p_case_info.case_volume_customer as 客户文号,
+	                    p_case_info.app_date as 申请日,
+	                    i_country.country_zh_cn as '国家(地区)',
+	                    STUFF((SELECT ',' + a.applicant_name_cn from p_applicant_list as al 
+		                    inner join i_applicant as a on a.applicant_id = al.applicant_id 
+		                    where al.obj_id = p_case_info.case_id order by al.seq FOR XML PATH('') ),1,1,'') as 申请人,
+	                    p_file_list.upload_time as 上传日期,
+	                    i_file_desc.file_desc_zh_cn as 文件描述,
+	                    i_apply_type.apply_type_zh_cn as 申请类型,
+	                    STUFF((SELECT ',' + ui.cn_name from p_sales_list as sl 
+		                    inner join dbo.s_user_info as ui on ui.user_id = sl.sales_user_id 
+		                    where sl.obj_id = p_case_info.case_id AND sl.is_enabled=1 order by sl.seq FOR XML PATH('') ),1,1,'') as 业务人员 
+                    from p_case_info 
+	                    inner join i_apply_type on p_case_info.apply_type_id=i_apply_type.apply_type_id 
+	                    inner join p_proc_info on p_case_info.case_id=p_proc_info.case_id 
+	                    inner join p_file_list on p_file_list.obj_id=p_proc_info.proc_id 
+	                    inner join i_file_desc on i_file_desc.file_desc_id=p_file_list.file_desc_id 
+	                    inner join c_customer on p_case_info.customer_id=c_customer.customer_id 
+	                    inner join i_country on i_country.country_id=p_case_info.country_id 
+                    where 
+	                    p_case_info.is_enabled=1 
+	                    and p_proc_info.is_enabled=1 and p_case_info.country_id='CN' 
+	                    and p_file_list.file_desc_id='09800D39-D585-49F3-B9DE-50AC689DE9AB' 
+	                    and p_file_list.file_name not like '%.zip' 
+	                    and (select count(*) from p_proc_info where case_id=p_case_info.case_id and ctrl_proc_id='8b96378e-05a0-4a8d-b3d1-39af92fddaf5')=1 
+	                    and  (p_case_info.case_type_id='31D1A147-2931-43B5-94AE-B72B1525BA8A'   ) 
+	                    AND  ((p_file_list.upload_time >= @beginTime  and p_file_list.upload_time<@endTime))";
+                    break;
+                case "每月绩效统计--专案进度跟踪~S卷":
+                    strSQL = @"SELECT  p_case_info.case_volume as 我方文号,
+                            p_case_info.case_name as 案件名称,
+                            i_case_type.case_type_zh_cn as 案件类型,
+                            i_business_type.business_type_zh_cn as 业务类型,
+                            i_country.country_zh_cn as '国家(地区)',
+                            c_customer.customer_name as 客户名称,
+                            s_dept_info.dept_full_name as 承办部门,
+                            i_case_status.case_status_zh_cn as 案件状态,
+                            i_ctrl_proc.ctrl_proc_zh_cn as 处理事项,
+                            p_proc_info.int_due_date as 内部期限,
+                            p_proc_info.cus_due_date as 客户期限,
+                            p_proc_info.legal_due_date as 官方期限,
+                            p_proc_info.finish_doc_date as 定稿日,
+                            STUFF((SELECT ',' + u.cn_name from p_proc_pic_list as pl
+                               inner join s_user_info as u on u.user_id = pl.pic_id where pl.obj_id = p_proc_info.proc_id
+                               FOR XML PATH('') ),1,1,'') as 处理人,
+                            p_case_info.charge_date as 委案日期,
+                            (select proc_status_zh_cn from i_proc_status where proc_status_id=p_proc_info.proc_status_id) as 处理状态,
+                            p_proc_info.first_doc_date as 初稿日,
+                            STUFF((SELECT ',' + u.cn_name from c_customer_user as cu
+                             inner join s_user_info as u on u.user_id = cu.user_id 
+                             where cu.customer_id = p_case_info.customer_id FOR XML PATH('') ),1,1,'') as 流程负责人,
+                            p_proc_info.finish_date as 处理事项完成日,
+                            STUFF((SELECT ',' + ui.cn_name from p_sales_list as sl
+                             inner join dbo.s_user_info as ui on ui.user_id = sl.sales_user_id 
+                             where sl.obj_id = p_case_info.case_id AND sl.is_enabled=1 order by sl.seq FOR XML PATH('') ),1,1,'') as 业务人员
+                            from p_case_info
+                              inner join   p_case_advance_info  with(nolock)  on p_case_info.case_id=p_case_advance_info.case_id
+                              inner join   i_apply_type  with(nolock)  on i_apply_type.apply_type_id=p_case_info.apply_type_id
+                              inner join   i_case_type  with(nolock)  on i_case_type.case_type_id=p_case_info.case_type_id
+                              inner join   i_country  with(nolock)  on i_country.country_id=p_case_info.country_id
+                              inner join   i_case_status  with(nolock)  on i_case_status.case_status_id=p_case_info.case_status_id
+                              inner join   c_customer  with(nolock)  on c_customer.customer_id=p_case_info.customer_id
+                              inner join   p_proc_info  with(nolock)  on p_case_info.case_id=p_proc_info.case_id
+                              inner join   i_ctrl_proc  with(nolock)  on p_proc_info.ctrl_proc_id=i_ctrl_proc.ctrl_proc_id
+                              inner join i_business_type on i_business_type.business_type_id = p_case_info.business_type_id
+                              inner join s_dept_info on s_dept_info.dept_id = p_case_info.charge_dept_id 
+                             where p_case_info.is_enabled=1 and p_proc_info.is_enabled=1  and  
+                             (isnull (p_proc_info.finish_date,'') ='') AND  (i_ctrl_proc.ctrl_proc_zh_cn='提出报告')";
+                    break;
+                case "每月绩效统计--专案开卷报表~S卷":
+                    strSQL = @"SELECT  p_case_info.case_volume as 我方文号,
+	                        p_case_info.case_volume_customer as 客户文号,
+	                        p_case_info.case_name as 案件名称,
+	                        p_case_info.charge_date as 委案日期,
+	                        i_case_status.case_status_zh_cn as 案件状态,
+	                        i_case_type.case_type_zh_cn as 案件类型,
+	                        p_case_info.app_no as 申请号,
+	                        p_case_info.app_date as 申请日,
+	                        i_business_type.business_type_zh_cn as 业务类型,
+	                        STUFF((SELECT ',' + u.cn_name from c_customer_user as cu 
+		                        inner join s_user_info as u on u.user_id = cu.user_id where cu.customer_id = p_case_info.customer_id FOR XML PATH('') ),1,1,'') as 流程负责人,
+	                        c_customer.customer_name as 客户名称,
+	                        STUFF((SELECT ',' + u.cn_name from p_revise_user_list as pl
+		                        inner join s_user_info as u on u.user_id = pl.revise_user_id where pl.obj_id = p_case_info.case_id   FOR XML PATH('') ),1,1,'') as 案件核稿人,
+	                        STUFF((SELECT ',' + u.cn_name from p_proc_pic_list as pl
+		                        inner join s_user_info as u on u.user_id = pl.pic_id where pl.obj_id = p_case_info.case_id   FOR XML PATH('') ),1,1,'') as 案件处理人,
+	                        p_case_info.create_time as 开卷日期,
+	                        STUFF((SELECT ',' + ui.cn_name from p_sales_list as sl 
+		                        inner join dbo.s_user_info as ui on ui.user_id = sl.sales_user_id 
+		                        where sl.obj_id = p_case_info.case_id AND sl.is_enabled=1 order by sl.seq FOR XML PATH('') ),1,1,'') as 业务人员,
+	                        i_country.country_zh_cn as '国家(地区)'  
+                        from p_case_info
+	                        inner join   p_case_advance_info  with(nolock)  on p_case_info.case_id=p_case_advance_info.case_id  
+	                        inner join   i_apply_type  with(nolock)  on i_apply_type.apply_type_id=p_case_info.apply_type_id  
+	                        inner join   i_case_type  with(nolock)  on i_case_type.case_type_id=p_case_info.case_type_id  
+	                        inner join   i_country  with(nolock)  on i_country.country_id=p_case_info.country_id  
+	                        inner join   i_case_status  with(nolock)  on i_case_status.case_status_id=p_case_info.case_status_id  
+	                        inner join   c_customer  with(nolock)  on c_customer.customer_id=p_case_info.customer_id  
+	                        inner join i_business_type on i_business_type.business_type_id = p_case_info.business_type_id 
+	                        inner join s_dept_info on s_dept_info.dept_id = p_case_info.charge_dept_id 
+                        where p_case_info.is_enabled=1 p_case_info.is_enabled=1 and  p_case_info.case_volume like 'S%' and not p_case_info.case_volume like 'SC%'
+						and i_case_status.case_status_zh_cn<>'已完成' and i_case_status.case_status_zh_cn<>'结案'";
+                    break;
+            }
+
+
+            using (var conn = new SqlConnection(ConfigHelper.GetSectionValue("IPEasySetting:ConnectionStrings")))
+            {
+
+                try
+                {
+                    conn.Open();
+                    using (var cmd = conn.CreateCommand())
+                    {
+                        cmd.CommandText = strSQL;
+                        cmd.CommandType = CommandType.Text;
+
+                        if (isModifyDate)
+                        {
+                            cmd.Parameters.Add(new SqlParameter("beginTime", DateTime.Parse(DateTime.Now.AddMonths(-1).ToString("yyyy-MM") + "-01")));
+                            cmd.Parameters.Add(new SqlParameter("endTime", DateTime.Parse(DateTime.Now.ToString("yyyy-MM") + "-01")));
+                        }
+                        using (var reader = cmd.ExecuteReader())
+                        {
+                            dt.Load(reader);
+                        }
+                    }
+                }
+                catch (Exception ex)
+                {
+                    throw ex;
+                }
+            }
+
+            return dt;
+        }
+    }
+}

+ 26 - 0
wispro.sp.ipeasyApi/Program.cs

@@ -0,0 +1,26 @@
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace wispro.sp.ipeasyApi
+{
+    public class Program
+    {
+        public static void Main(string[] args)
+        {
+            CreateHostBuilder(args).Build().Run();
+        }
+
+        public static IHostBuilder CreateHostBuilder(string[] args) =>
+            Host.CreateDefaultBuilder(args)
+                .ConfigureWebHostDefaults(webBuilder =>
+                {
+                    webBuilder.UseStartup<Startup>();
+                });
+    }
+}

+ 31 - 0
wispro.sp.ipeasyApi/Properties/launchSettings.json

@@ -0,0 +1,31 @@
+{
+  "$schema": "http://json.schemastore.org/launchsettings.json",
+  "iisSettings": {
+    "windowsAuthentication": false,
+    "anonymousAuthentication": true,
+    "iisExpress": {
+      "applicationUrl": "http://localhost:22468",
+      "sslPort": 0
+    }
+  },
+  "profiles": {
+    "IIS Express": {
+      "commandName": "IISExpress",
+      "launchBrowser": true,
+      "launchUrl": "api/GetDataFromIPEasy",
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      }
+    },
+    "wispro.sp.ipeasyApi": {
+      "commandName": "Project",
+      "dotnetRunMessages": "true",
+      "launchBrowser": true,
+      "launchUrl": "api/GetDataFromIPEasy",
+      "applicationUrl": "http://localhost:5000",
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      }
+    }
+  }
+}

+ 56 - 0
wispro.sp.ipeasyApi/Startup.cs

@@ -0,0 +1,56 @@
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using Microsoft.OpenApi.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace wispro.sp.ipeasyApi
+{
+    public class Startup
+    {
+        public Startup(IConfiguration configuration)
+        {
+            Configuration = configuration;
+        }
+
+        public IConfiguration Configuration { get; }
+
+        // This method gets called by the runtime. Use this method to add services to the container.
+        public void ConfigureServices(IServiceCollection services)
+        {
+
+            services.AddControllers();
+            services.AddSwaggerGen(c =>
+            {
+                c.SwaggerDoc("v1", new OpenApiInfo { Title = "wispro.sp.ipeasyApi", Version = "v1" });
+            });
+        }
+
+        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
+        {
+            if (env.IsDevelopment())
+            {
+                app.UseDeveloperExceptionPage();
+                app.UseSwagger();
+                app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "wispro.sp.ipeasyApi v1"));
+            }
+
+            app.UseRouting();
+
+            app.UseAuthorization();
+
+            app.UseEndpoints(endpoints =>
+            {
+                endpoints.MapControllers();
+            });
+        }
+    }
+}

+ 9 - 0
wispro.sp.ipeasyApi/appsettings.Development.json

@@ -0,0 +1,9 @@
+{
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft": "Warning",
+      "Microsoft.Hosting.Lifetime": "Information"
+    }
+  }
+}

+ 20 - 0
wispro.sp.ipeasyApi/appsettings.json

@@ -0,0 +1,20 @@
+{
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft": "Warning",
+      "Microsoft.Hosting.Lifetime": "Information"
+    }
+  },
+  "IPEasySetting": {
+    "ConnectionStrings": "Data Source=(local);Initial Catalog=IPEasy;User ID=sa;Password=Lqftiu807005",
+    "DownloadFileSavePath": "c:\\temp",
+    "isHeadless": "true",
+    "Account": "caiyangl",
+    "Password": "j)wx*lier*@3",
+    "ChormeDriverPath": "D:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\100.0.4896.60",
+    "ScheduleSetting": "00 19 19 4 * ? *",
+    "IPEasyWeb": "http://47.106.221.167/Login.aspx"
+  },
+  "AllowedHosts": "*"
+}

+ 16 - 0
wispro.sp.ipeasyApi/wispro.sp.ipeasyApi.csproj

@@ -0,0 +1,16 @@
+<Project Sdk="Microsoft.NET.Sdk.Web">
+
+  <PropertyGroup>
+    <TargetFramework>net5.0</TargetFramework>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Microsoft.Data.SqlClient" Version="2.0.1" />
+    <PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\wispro.sp.utility\wispro.sp.utility.csproj" />
+  </ItemGroup>
+
+</Project>

+ 2 - 2
wispro.sp.web/Pages/AppCase/CaseManager.razor

@@ -23,7 +23,7 @@ RenderFragment gdIcon =
 
     <ChildContent>
         <div style="width:100%;overflow:auto;background:#FFFFFF;" id="div-Container">
-            <Card Title="最近5月绩效月份">
+            <Card Title="最近12月绩效月份">
                 <Space>
 
                     @{
@@ -55,7 +55,7 @@ RenderFragment gdIcon =
                         foreach (CalMonth month in calMonths)
                         {
                             iIndex++;
-                            if (iIndex > 5)
+                            if (iIndex > 12)
                             {
                                 break;
                             }

+ 1 - 1
wispro.sp.web/Pages/Organization/Department.razor.cs

@@ -156,7 +156,7 @@ namespace wispro.sp.web.Pages.Organization
 
         List<wispro.sp.entity.StaffGrade> _StaffGrade;
 
-        string[] _places = new string[] { "深圳", "苏州", "南通", "西安", "北京", "杭州", "武汉" };
+        string[] _places = new string[] { "深圳", "苏州", "南通", "西安", "北京", "杭州", "武汉","重庆","昆山" };
 
 
         bool _newUserModal = false;

+ 1 - 1
wispro.sp.web/Pages/StaffList.razor

@@ -162,7 +162,7 @@
 
     List<wispro.sp.entity.StaffGrade> _StaffGrade;
 
-    string[] _places = new string[] { "深圳", "苏州", "南通", "西安", "北京", "杭州", "武汉" };
+    string[] _places = new string[] { "深圳", "苏州", "南通", "西安", "北京", "杭州", "武汉","重庆","昆山" };
 
     int _SelectGradeId;
 

+ 63 - 0
wispro.sp.web/Properties/Resources.Designer.cs

@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
+//
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace wispro.sp.web.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   一个强类型的资源类,用于查找本地化的字符串等。
+    /// </summary>
+    // 此类是由 StronglyTypedResourceBuilder
+    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    // (以 /str 作为命令选项),或重新生成 VS 项目。
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   返回此类使用的缓存的 ResourceManager 实例。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("wispro.sp.web.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   重写当前线程的 CurrentUICulture 属性,对
+        ///   使用此强类型资源类的所有资源查找执行重写。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+    }
+}

+ 101 - 0
wispro.sp.web/Properties/Resources.resx

@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+	<!-- 
+		Microsoft ResX Schema
+
+		Version 1.3
+
+		The primary goals of this format is to allow a simple XML format 
+		that is mostly human readable. The generation and parsing of the 
+		various data types are done through the TypeConverter classes 
+		associated with the data types.
+
+		Example:
+
+		... ado.net/XML headers & schema ...
+		<resheader name="resmimetype">text/microsoft-resx</resheader>
+		<resheader name="version">1.3</resheader>
+		<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+		<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+		<data name="Name1">this is my long string</data>
+		<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+		<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+			[base64 mime encoded serialized .NET Framework object]
+		</data>
+		<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+			[base64 mime encoded string representing a byte array form of the .NET Framework object]
+		</data>
+
+		There are any number of "resheader" rows that contain simple 
+		name/value pairs.
+
+		Each data row contains a name, and value. The row also contains a 
+		type or mimetype. Type corresponds to a .NET class that support 
+		text/value conversion through the TypeConverter architecture. 
+		Classes that don't support this are serialized and stored with the 
+		mimetype set.
+
+		The mimetype is used for serialized objects, and tells the 
+		ResXResourceReader how to depersist the object. This is currently not 
+		extensible. For a given mimetype the value must be set accordingly:
+
+		Note - application/x-microsoft.net.object.binary.base64 is the format 
+		that the ResXResourceWriter will generate, however the reader can 
+		read any of the formats listed below.
+
+		mimetype: application/x-microsoft.net.object.binary.base64
+		value   : The object must be serialized with 
+			: System.Serialization.Formatters.Binary.BinaryFormatter
+			: and then encoded with base64 encoding.
+
+		mimetype: application/x-microsoft.net.object.soap.base64
+		value   : The object must be serialized with 
+			: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+			: and then encoded with base64 encoding.
+
+		mimetype: application/x-microsoft.net.object.bytearray.base64
+		value   : The object must be serialized into a byte array 
+			: using a System.ComponentModel.TypeConverter
+			: and then encoded with base64 encoding.
+	-->
+	
+	<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+		<xsd:element name="root" msdata:IsDataSet="true">
+			<xsd:complexType>
+				<xsd:choice maxOccurs="unbounded">
+					<xsd:element name="data">
+						<xsd:complexType>
+							<xsd:sequence>
+								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+								<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+							</xsd:sequence>
+							<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+							<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+							<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+						</xsd:complexType>
+					</xsd:element>
+					<xsd:element name="resheader">
+						<xsd:complexType>
+							<xsd:sequence>
+								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+							</xsd:sequence>
+							<xsd:attribute name="name" type="xsd:string" use="required" />
+						</xsd:complexType>
+					</xsd:element>
+				</xsd:choice>
+			</xsd:complexType>
+		</xsd:element>
+	</xsd:schema>
+	<resheader name="resmimetype">
+		<value>text/microsoft-resx</value>
+	</resheader>
+	<resheader name="version">
+		<value>1.3</value>
+	</resheader>
+	<resheader name="reader">
+		<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+	</resheader>
+	<resheader name="writer">
+		<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+	</resheader>
+</root>

+ 11 - 14
wispro.sp.web/Properties/launchSettings.json

@@ -1,12 +1,4 @@
 {
-  "iisSettings": {
-    "windowsAuthentication": true,
-    "anonymousAuthentication": true,
-    "iisExpress": {
-      "applicationUrl": "http://localhost:53775/",
-      "sslPort": 44358
-    }
-  },
   "profiles": {
     "IIS Express": {
       "commandName": "IISExpress",
@@ -14,19 +6,24 @@
       "environmentVariables": {
         "ASPNETCORE_ENVIRONMENT": "Development"
       },
-      "nativeDebugging": false,
+      "nativeDebugging": true,
       "jsWebView2Debugging": false,
       "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
     },
-    "WSL": {
-      "commandName": "WSL2",
-      "distributionName": ""
-    },
     "wispro.sp.web": {
       "commandName": "Project",
       "launchBrowser": true,
       "nativeDebugging": false,
-      "jsWebView2Debugging": true
+      "jsWebView2Debugging": true,
+      "applicationUrl": "http://localhost:5001"
+    }
+  },
+  "iisSettings": {
+    "windowsAuthentication": true,
+    "anonymousAuthentication": true,
+    "iisExpress": {
+      "applicationUrl": "http://127.0.0.1:53775/",
+      "sslPort": 0
     }
   }
 }

+ 17 - 8
wispro.sp.web/Services/AppealTypeService.cs

@@ -82,16 +82,25 @@ namespace wispro.sp.web.Services
 
         public async Task<List<AppealRecord>> GetUserAppeals(int? userid)
         {
-            if (userid.HasValue)
-            {
-                var data = await _httpClient.Get<List<AppealRecord>>($"Appeal/GetAppealRecords?userId={userid}");
-                return data;
+            try {
+                if (userid.HasValue)
+                {
+                    var data = await _httpClient.Get<List<AppealRecord>>($"Appeal/GetAppealRecords?userId={userid}");
+                    Console.WriteLine();
+                    return data;
+                }
+                else
+                {
+                    var data = await _httpClient.Get<List<AppealRecord>>($"Appeal/GetAppealRecords?userId=0");
+                    return data;
+                }
             }
-            else
-            {
-                var data = await _httpClient.Get<List<AppealRecord>>($"Appeal/GetAppealRecords?userId=0");
-                return data;
+            catch(Exception ex) {
+                Console.WriteLine(ex);
+                return new List<AppealRecord>();
             }
+
+            
             
         }
 

+ 45 - 7
wispro.sp.web/wispro.sp.web.csproj

@@ -1,5 +1,29 @@
 <Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
 
+  <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
+    <TypeScriptTarget>ES5</TypeScriptTarget>
+  </PropertyGroup>
+
+  <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
+    <TypeScriptTarget>ES5</TypeScriptTarget>
+  </PropertyGroup>
+
+  <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <TypeScriptTarget>ES5</TypeScriptTarget>
+  </PropertyGroup>
+
+  <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <TypeScriptTarget>ES5</TypeScriptTarget>
+  </PropertyGroup>
+
+  <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
+    <TypeScriptTarget>ES5</TypeScriptTarget>
+  </PropertyGroup>
+
+  <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
+    <TypeScriptTarget>ES5</TypeScriptTarget>
+  </PropertyGroup>
+
   <PropertyGroup>
     <TargetFramework>net5</TargetFramework>
     <RazorLangVersion>3.0</RazorLangVersion>
@@ -25,6 +49,8 @@
     <Content Remove="Pages\Project\ProjectList.razor" />
     <Content Remove="Pages\Project\ReadAssignPointMsg.razor" />
     <Content Remove="Pages\Project\ReadMessage.razor" />
+    <Content Remove="wwwroot\data\notice.json" />
+    <Content Remove="wwwroot\data\PerformanceItems.json" />
     <Content Remove="wwwroot\scripts\Helper.js.map" />
     <Content Remove="wwwroot\scripts\Helper.ts" />
   </ItemGroup>
@@ -43,16 +69,16 @@
     <PackageReference Include="Microsoft.AspNetCore.Authorization" Version="6.0.0" />
     <PackageReference Include="Microsoft.AspNetCore.Authorization.Policy" Version="2.2.0" />
     <PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="5.0.9" />
-    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
-    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0" PrivateAssets="all" />
+    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.17" />
+    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.17" PrivateAssets="all" />
     <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.11">
       <PrivateAssets>all</PrivateAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
     </PackageReference>
-    <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />
+    <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
     <PackageReference Include="ServiceStack" Version="5.13.2" />
     <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.6.0" />
-    <PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
+    <PackageReference Include="System.Net.Http.Json" Version="6.0.0" />
   </ItemGroup>
 
   <ItemGroup>
@@ -82,9 +108,6 @@
     <Content Update="wwwroot\data\menu.json">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
-    <Content Update="wwwroot\data\notice.json">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
     <Content Update="wwwroot\data\notices.json">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
@@ -97,6 +120,21 @@
     <Folder Include="wwwroot\scripts\" />
   </ItemGroup>
 
+  <ItemGroup>
+    <Compile Update="Properties\Resources.Designer.cs">
+      <DesignTime>True</DesignTime>
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+  </ItemGroup>
+
+  <ItemGroup>
+    <EmbeddedResource Update="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+  </ItemGroup>
+
   <ProjectExtensions><VisualStudio><UserProperties properties_4launchsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
 
 </Project>

+ 1 - 2
wispro.sp.web/wwwroot/appsettings.json

@@ -14,9 +14,8 @@
     "MenuRender": true,
     "MenuHeaderRender": true,
     "HeaderHeight": 48
-
   },
 
   "APIUrl": "http://localhost:39476/api/",
-  "Latest_feedback_date":"30"
+  "Latest_feedback_date": "8"
 }

+ 21 - 21
wispro.sp.web/wwwroot/index.html

@@ -231,33 +231,33 @@
     <script type="text/javascript" src="https://lib.baomitu.com/echarts/5.3.0/extension/bmap.min.js"></script>
     <script src="_content/AntDesign/js/ant-design-blazor.js"></script>
     <script type="module" src="_content/Blazor.ECharts/core.js"></script>
-    <script src="_framework/blazor.webassembly.js" autostart="false"></script>
+    <script src="_framework/blazor.webassembly.js" autostart="true"></script>
     <!--<script src="script/helper.js"></script>-->
 
 
 
 
     <script type="module">
-        import { BrotliDecode } from './decode.js';
-        Blazor.start({
-            loadBootResource: function (type, name, defaultUri, integrity) {
-                if (type !== 'dotnetjs' && location.hostname !== 'localhost') {
-                    return (async function () {
-                        const response = await fetch(defaultUri + '.br', { cache: 'no-cache' });
-                        if (!response.ok) {
-                            throw new Error(response.statusText);
-                        }
-                        const originalResponseBuffer = await response.arrayBuffer();
-                        const originalResponseArray = new Int8Array(originalResponseBuffer);
-                        const decompressedResponseArray = BrotliDecode(originalResponseArray);
-                        const contentType = type ===
-                            'dotnetwasm' ? 'application/wasm' : 'application/octet-stream';
-                        return new Response(decompressedResponseArray,
-                            { headers: { 'content-type': contentType } });
-                    })();
-                }
-            }
-        });
+        //import { BrotliDecode } from './decode.js';
+        //Blazor.start({
+        //    loadBootResource: function (type, name, defaultUri, integrity) {
+        //        if (type !== 'dotnetjs' && location.hostname !== 'localhost') {
+        //            return (async function () {
+        //                const response = await fetch(defaultUri + '.br', { cache: 'no-cache' });
+        //                if (!response.ok) {
+        //                    throw new Error(response.statusText);
+        //                }
+        //                const originalResponseBuffer = await response.arrayBuffer();
+        //                const originalResponseArray = new Int8Array(originalResponseBuffer);
+        //                const decompressedResponseArray = BrotliDecode(originalResponseArray);
+        //                const contentType = type ===
+        //                    'dotnetwasm' ? 'application/wasm' : 'application/octet-stream';
+        //                return new Response(decompressedResponseArray,
+        //                    { headers: { 'content-type': contentType } });
+        //            })();
+        //        }
+        //    }
+        //});
     </script>
 </body>
 

+ 1 - 1
wispro.sp.winClient/Form1.cs

@@ -955,7 +955,7 @@ namespace wispro.sp.winClient
             return retStr;
         }
 
-        string strAPIBaseUri = "http://47.106.221.167:8081"; // "http://localhost:39476";//   
+        string strAPIBaseUri = "http://1.116.113.26:081";// "http://47.106.221.167:8081"; //  "http://localhost:39476";//  
 
         userToken Token;
 

+ 39 - 0
wispro.sp.winClient/Form2.Designer.cs

@@ -0,0 +1,39 @@
+namespace wispro.sp.winClient
+{
+    partial class Form2
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(800, 450);
+            this.Text = "Form2";
+        }
+
+        #endregion
+    }
+}

+ 20 - 0
wispro.sp.winClient/Form2.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace wispro.sp.winClient
+{
+    public partial class Form2 : Form
+    {
+        public Form2()
+        {
+            InitializeComponent();
+        }
+    }
+}