瀏覽代碼

添加手动从维德系统中刷新绩效记录信息

luocaiyang 3 年之前
父節點
當前提交
8cfd5352bd

+ 55 - 0
wispro.sp.api/AppealHandler/SpecialPointsHandler.cs

@@ -0,0 +1,55 @@
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using wispro.sp.share;
+
+namespace wispro.sp.api.AppealHandler
+{
+    public class SpecialPointsHandler : IDoAppealObject
+    {
+        public void DoAppeal(AppealObject appeal, int appealRecordId, DbContext spContext)
+        {
+            bool isAggree = true;
+            
+            if (isAggree)
+            {
+                var apRecord = ((spDbContext)spContext).AppealRecords.FirstOrDefault(p => p.Id == appealRecordId);
+
+                if (apRecord != null)
+                {
+                    var Item = ((spDbContext)spContext).PerformanceItems.FirstOrDefault(p=>p.Id == apRecord.ItemId);
+
+                    foreach (var iv in appeal.inputFieldValues)
+                    {
+                        if (iv.InputField == null)
+                        {
+                            iv.InputField = ((spDbContext)spContext).InputFields.FirstOrDefault(s => s.Id == iv.InputFieldId);
+                        }
+
+                        if (iv.InputField.FieldName == "给定点数")
+                        {
+                            Item.BasePoint = double.Parse(iv.Value);
+                        }
+
+                        if (iv.InputField.FieldName == "绩效类型")
+                        {
+                            Item.Type = iv.Value;
+                        }
+
+                    }
+
+                    Item.AgentFeedbackMemo = "特殊点数申诉";
+
+                }
+                else
+                {
+                    throw new ApplicationException("没找到指定的申诉记录!");
+                }
+
+
+            }
+        }
+    }
+}

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

@@ -250,10 +250,13 @@ namespace wispro.sp.api.Controllers
                             break;
                     }
                 }
-                
-                 Utility.Utility.CalBasePoint(item, Context.BasePointRules.ToList());
 
-                Context.SaveChanges();
+                if (item.AgentFeedbackMemo != "特殊点数申诉")
+                {
+                    Utility.Utility.CalBasePoint(item, Context.BasePointRules.ToList());
+
+                    Context.SaveChanges();
+                }
             }
             
             return ret;
@@ -514,9 +517,12 @@ namespace wispro.sp.api.Controllers
                 //if (item.BasePoint == null)
                 //{
 
-                    Utility.Utility.CalBasePoint(item,Rules);
+                if (item.AgentFeedbackMemo != "特殊点数申诉")
+                {
+                    Utility.Utility.CalBasePoint(item, Rules);
 
                     Context.SaveChanges();
+                }
                 //}
 
                 if (item.BasePoint != null && item.BasePoint.Value > 0)
@@ -589,8 +595,11 @@ namespace wispro.sp.api.Controllers
             var rules = spDb.BasePointRules.ToList();
             foreach (var item in lstItem)
             {
-                Utility.Utility.CalBasePoint(item, rules);
-                spDb.SaveChanges();
+                if (item.AgentFeedbackMemo != "特殊点数申诉")
+                {
+                    Utility.Utility.CalBasePoint(item, rules);
+                    spDb.SaveChanges();
+                }
             }
         }
         public ApiSaveResponse RefreshBasePoint()
@@ -603,6 +612,33 @@ namespace wispro.sp.api.Controllers
             };
         }
 
+        public ApiSaveResponse RefreshFromIPEasyById(int itemId)
+        {
+            var Item = Context.PerformanceItems.FirstOrDefault(p => p.Id == itemId);
+            if (Item != null)
+            {
+                new Job.UpdateJXDataFromIPEasyJob().UpdateFromIPEasy(Item, Context);
+            }
+
+            return new ApiSaveResponse()
+            {
+                Success = true
+            };
+        }
+        public ApiSaveResponse RefreshFromIPEasy(string CaseNo,string DoItem,string caseStage)
+        {
+            var Item = Context.PerformanceItems.FirstOrDefault(p=>p.CaseNo == CaseNo && p.DoItem == DoItem && p.CaseStage == caseStage);
+            if(Item != null)
+            {
+                new Job.UpdateJXDataFromIPEasyJob().UpdateFromIPEasy(Item,Context);
+            }
+
+            return new ApiSaveResponse()
+            {
+                Success = true
+            };
+        }
+
         private List<StaffStatistics> _calItemJX(CalMonth calMonth, List<VerifyCoefficient> verifyCoefficients, PerformanceItem item,spDbContext spDb)
         {
             System.Collections.Hashtable doPersonsBL = new System.Collections.Hashtable();

+ 181 - 171
wispro.sp.api/Job/UpdateJXDataFromIPEasyJob.cs

@@ -2,6 +2,7 @@
 using Quartz;
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Threading.Tasks;
 using wispro.sp.entity;
@@ -10,213 +11,212 @@ namespace wispro.sp.api.Job
 {
     public class UpdateJXDataFromIPEasyJob : IJob
     {
-        public Task Execute(IJobExecutionContext context)
+        public void UpdateFromIPEasy(PerformanceItem Item,spDbContext spDb)
         {
-            spDbContext spDb = new spDbContext();
+            dynamic retObj = utility.IPEasyUtility.GetPerformanceRecord(Item.CaseNo, Item.DoItem, string.IsNullOrEmpty(Item.CaseStage) ? null : Item.CaseStage);
 
-            var lstItem = spDb.PerformanceItems.Where<PerformanceItem>(p =>
-                ((p.AgentFeedbackMemo != "已算绩效" || p.AgentFeedbackMemo==null ) && p.CalMonth.Status == 0 && !p.CaseNo.StartsWith("J")))
-                .Include(p=>p.Reviewer)
-                .Include(p=>p.CalMonth)
-                .ToList<PerformanceItem>();
-           
 
-            if (lstItem != null)
+            IDictionary<String, Object> keyValuePairs = (IDictionary<String, Object>)retObj;
+
+            if (keyValuePairs.ContainsKey("DoItemCoefficient") && Item.DoItemCoefficient != retObj.DoItemCoefficient)
             {
-                int i = 0;
-                foreach (var Item in lstItem)
-                {
-                    System.Diagnostics.Debug.WriteLine($"{DateTime.Now}\t{++i}\t{Item.CaseNo}");
-                    int iTryCount = 0;    
-                TryAgain:
-                    try
-                    {
-                        iTryCount++;
-                        dynamic retObj = utility.IPEasyUtility.GetPerformanceRecord(Item.CaseNo, Item.DoItem,string.IsNullOrEmpty(Item.CaseStage)?null: Item.CaseStage);
+                Item.DoItemCoefficient = retObj.DoItemCoefficient;
+            }
 
+            if (keyValuePairs.ContainsKey("DoItemMemo") && Item.DoItemMemo != retObj.DoItemMemo && !string.IsNullOrEmpty(retObj.DoItemMemo))
+            {
+                Item.DoItemMemo = retObj.DoItemMemo;
+            }
 
-                        IDictionary<String, Object> keyValuePairs = (IDictionary<String, Object>)retObj;
+            if (keyValuePairs.ContainsKey("DoItemState") && Item.DoItemState != retObj.DoItemState && !string.IsNullOrEmpty(retObj.DoItemState))
+            {
+                Item.DoItemState = retObj.DoItemState;
+            }
 
-                        if (keyValuePairs.ContainsKey("DoItemCoefficient") && Item.DoItemCoefficient != retObj.DoItemCoefficient)
-                        {
-                            Item.DoItemCoefficient = retObj.DoItemCoefficient;
-                        }
+            if (keyValuePairs.ContainsKey("CustomerLimitDate"))
+            {
+                if (!string.IsNullOrEmpty(retObj.CustomerLimitDate))
+                {
+                    DateTime date = DateTime.Parse(retObj.CustomerLimitDate);
 
-                        if (keyValuePairs.ContainsKey("DoItemMemo") && Item.DoItemMemo != retObj.DoItemMemo && !string.IsNullOrEmpty(retObj.DoItemMemo))
-                        {
-                            Item.DoItemMemo = retObj.DoItemMemo;
-                        }
+                    if (date != Item.CustomerLimitDate)
+                        Item.CustomerLimitDate = date;
+                }
+            }
 
-                        if (keyValuePairs.ContainsKey("DoItemState") && Item.DoItemState != retObj.DoItemState && !string.IsNullOrEmpty(retObj.DoItemState))
-                        {
-                            Item.DoItemState = retObj.DoItemState;
-                        }
+            if (keyValuePairs.ContainsKey("EntrustingDate"))
+            {
+                if (!string.IsNullOrEmpty(retObj.EntrustingDate))
+                {
+                    DateTime date = DateTime.Parse(retObj.EntrustingDate);
 
-                        if (keyValuePairs.ContainsKey("CustomerLimitDate"))
-                        {
-                            if (!string.IsNullOrEmpty(retObj.CustomerLimitDate))
-                            {
-                                DateTime date = DateTime.Parse(retObj.CustomerLimitDate);
+                    if (date != Item.EntrustingDate)
+                        Item.EntrustingDate = date;
+                }
+            }
 
-                                if (date != Item.CustomerLimitDate)
-                                    Item.CustomerLimitDate = date;
-                            }
-                        }
+            if (keyValuePairs.ContainsKey("FinalizationDate"))
+            {
+                if (!string.IsNullOrEmpty(retObj.FinalizationDate))
+                {
+                    DateTime date = DateTime.Parse(retObj.FinalizationDate);
 
-                        if (keyValuePairs.ContainsKey("EntrustingDate"))
-                        {
-                            if (!string.IsNullOrEmpty(retObj.EntrustingDate))
-                            {
-                                DateTime date = DateTime.Parse(retObj.EntrustingDate);
+                    if (date != Item.FinalizationDate)
+                        Item.FinalizationDate = date;
+                }
+            }
 
-                                if (date != Item.EntrustingDate)
-                                    Item.EntrustingDate = date;
-                            }
-                        }
+            if (keyValuePairs.ContainsKey("FinishedDate"))
+            {
+                if (!string.IsNullOrEmpty(retObj.FinishedDate))
+                {
+                    DateTime date = DateTime.Parse(retObj.FinishedDate);
 
-                        if (keyValuePairs.ContainsKey("FinalizationDate"))
-                        {
-                            if (!string.IsNullOrEmpty(retObj.FinalizationDate))
-                            {
-                                DateTime date = DateTime.Parse(retObj.FinalizationDate);
+                    if (date != Item.FinishedDate)
+                        Item.FinishedDate = date;
+                }
+            }
 
-                                if (date != Item.FinalizationDate)
-                                    Item.FinalizationDate = date;
-                            }
-                        }
+            if (keyValuePairs.ContainsKey("FirstDraftDate"))
+            {
+                if (!string.IsNullOrEmpty(retObj.FirstDraftDate))
+                {
+                    DateTime date = DateTime.Parse(retObj.FirstDraftDate);
 
-                        if (keyValuePairs.ContainsKey("FinishedDate"))
-                        {
-                            if (!string.IsNullOrEmpty(retObj.FinishedDate))
-                            {
-                                DateTime date = DateTime.Parse(retObj.FinishedDate);
+                    if (date != Item.FirstDraftDate)
+                        Item.FirstDraftDate = date;
+                }
+            }
 
-                                if (date != Item.FinishedDate)
-                                    Item.FinishedDate = date;
-                            }
-                        }
+            if (keyValuePairs.ContainsKey("InternalDate"))
+            {
+                if (!string.IsNullOrEmpty(retObj.InternalDate))
+                {
+                    DateTime date = DateTime.Parse(retObj.InternalDate);
 
-                        if (keyValuePairs.ContainsKey("FirstDraftDate"))
-                        {
-                            if (!string.IsNullOrEmpty(retObj.FirstDraftDate))
-                            {
-                                DateTime date = DateTime.Parse(retObj.FirstDraftDate);
+                    if (date != Item.InternalDate)
+                        Item.InternalDate = date;
+                }
+            }
 
-                                if (date != Item.FirstDraftDate)
-                                    Item.FirstDraftDate = date;
-                            }
-                        }
+            if (keyValuePairs.ContainsKey("ReturnDate"))
+            {
+                if (!string.IsNullOrEmpty(retObj.ReturnDate))
+                {
+                    DateTime date = DateTime.Parse(retObj.ReturnDate);
 
-                        if (keyValuePairs.ContainsKey("InternalDate"))
-                        {
-                            if (!string.IsNullOrEmpty(retObj.InternalDate))
-                            {
-                                DateTime date = DateTime.Parse(retObj.InternalDate);
+                    if (date != Item.ReturnDate)
+                        Item.ReturnDate = date;
+                }
+            }
 
-                                if (date != Item.InternalDate)
-                                    Item.InternalDate = date;
-                            }
-                        }
+            if (keyValuePairs.ContainsKey("WordCount"))
+            {
+                if (!string.IsNullOrEmpty(retObj.WordCount))
+                {
+                    var wordCount = int.Parse(retObj.WordCount);
 
-                        if (keyValuePairs.ContainsKey("ReturnDate"))
-                        {
-                            if (!string.IsNullOrEmpty(retObj.ReturnDate))
-                            {
-                                DateTime date = DateTime.Parse(retObj.ReturnDate);
+                    if (wordCount != Item.WordCount)
+                        Item.WordCount = wordCount;
+                }
+            }
 
-                                if (date != Item.ReturnDate)
-                                    Item.ReturnDate = date;
-                            }
-                        }
 
-                        if (keyValuePairs.ContainsKey("WordCount"))
-                        {
-                            if (!string.IsNullOrEmpty(retObj.WordCount))
-                            {
-                                var wordCount = int.Parse(retObj.WordCount);
+            if (keyValuePairs.ContainsKey("Reviewer") && (Item.Reviewer == null || Item.Reviewer.Name != retObj.Reviewer) && !string.IsNullOrEmpty(retObj.Reviewer))
+            {
+                string name = retObj.Reviewer;
 
-                                if (wordCount != Item.WordCount)
-                                    Item.WordCount = wordCount;
-                            }
-                        }
+                if (!string.IsNullOrEmpty(name))
+                {
+                    var temReviewer = spDb.Staffs.Where<Staff>(s => s.Name == name).FirstOrDefault();
+                    if (temReviewer == null)
+                    {
+                        //Item.Reviewer = new Staff() { Name = retObj.Reviewer };
+                    }
+                    else
+                    {
+                        //Item.Reviewer = temReviewer;
+                        Item.ReviewerId = temReviewer.Id;
+                    }
+                }
+            }
 
+            if (keyValuePairs.ContainsKey("ApplicationType") && Item.ApplicationType != retObj.ApplicationType && !string.IsNullOrEmpty(retObj.ApplicationType))
+            {
+                Item.ApplicationType = retObj.ApplicationType;
+            }
 
-                        if (keyValuePairs.ContainsKey("Reviewer") && (Item.Reviewer ==null || Item.Reviewer.Name != retObj.Reviewer) && !string.IsNullOrEmpty(retObj.Reviewer))
-                        {
-                            string name = retObj.Reviewer;
-
-                            if (!string.IsNullOrEmpty(name))
-                            {
-                                var temReviewer = spDb.Staffs.Where<Staff>(s => s.Name == name).FirstOrDefault();
-                                if (temReviewer == null)
-                                {
-                                    //Item.Reviewer = new Staff() { Name = retObj.Reviewer };
-                                }
-                                else
-                                {
-                                    //Item.Reviewer = temReviewer;
-                                    Item.ReviewerId = temReviewer.Id;
-                                }
-                            }
-                        }
+            if (keyValuePairs.ContainsKey("BusinessType") && Item.BusinessType != retObj.BusinessType && !string.IsNullOrEmpty(retObj.BusinessType))
+            {
+                Item.BusinessType = retObj.BusinessType;
+            }
 
-                        if (keyValuePairs.ContainsKey("ApplicationType") && Item.ApplicationType != retObj.ApplicationType && !string.IsNullOrEmpty(retObj.ApplicationType))
-                        {
-                            Item.ApplicationType = retObj.ApplicationType;
-                        }
+            if (keyValuePairs.ContainsKey("CaseCoefficient") && Item.CaseCoefficient != retObj.CaseCoefficient && !string.IsNullOrEmpty(retObj.CaseCoefficient))
+            {
+                if (!string.IsNullOrEmpty(retObj.CaseCoefficient))
+                {
+                    Item.CaseCoefficient = retObj.CaseCoefficient;
+                }
+            }
 
-                        if (keyValuePairs.ContainsKey("BusinessType") && Item.BusinessType != retObj.BusinessType && !string.IsNullOrEmpty(retObj.BusinessType))
-                        {
-                            Item.BusinessType = retObj.BusinessType;
-                        }
+            //if (keyValuePairs.ContainsKey("CaseMemo") && Item.CaseMemo != retObj.CaseMemo && !string.IsNullOrEmpty(retObj.CaseMemo))
+            //{
+            //    Item.CaseMemo = retObj.CaseMemo;
+            //}
 
-                        if (keyValuePairs.ContainsKey("CaseCoefficient") && Item.CaseCoefficient != retObj.CaseCoefficient && !string.IsNullOrEmpty(retObj.CaseCoefficient))
-                        {
-                            if (!string.IsNullOrEmpty(retObj.CaseCoefficient)){
-                                Item.CaseCoefficient = retObj.CaseCoefficient;
-                            }
-                        }
+            if (keyValuePairs.ContainsKey("CaseStage") && Item.CaseStage != retObj.CaseStage && !string.IsNullOrEmpty(retObj.CaseStage))
+            {
+                Item.CaseStage = retObj.CaseStage;
+            }
 
-                        //if (keyValuePairs.ContainsKey("CaseMemo") && Item.CaseMemo != retObj.CaseMemo && !string.IsNullOrEmpty(retObj.CaseMemo))
-                        //{
-                        //    Item.CaseMemo = retObj.CaseMemo;
-                        //}
+            if (keyValuePairs.ContainsKey("CaseState") && Item.CaseState != retObj.CaseState && !string.IsNullOrEmpty(retObj.CaseState))
+            {
+                Item.CaseState = retObj.CaseState;
+            }
 
-                        if (keyValuePairs.ContainsKey("CaseStage") && Item.CaseStage != retObj.CaseStage && !string.IsNullOrEmpty(retObj.CaseStage))
-                        {
-                            Item.CaseStage = retObj.CaseStage;
-                        }
+            if (keyValuePairs.ContainsKey("CaseType") && Item.CaseType != retObj.CaseType && !string.IsNullOrEmpty(retObj.CaseType))
+            {
+                Item.CaseType = retObj.CaseType;
+            }
 
-                        if (keyValuePairs.ContainsKey("CaseState") && Item.CaseState != retObj.CaseState && !string.IsNullOrEmpty(retObj.CaseState))
-                        {
-                            Item.CaseState = retObj.CaseState;
-                        }
+            if (spDb.Entry(Item).State != EntityState.Unchanged)
+            {
+                if (Item.AgentFeedbackMemo != "特殊点数申诉")
+                {
+                    Utility.Utility.CalBasePoint(Item, spDb.BasePointRules.ToList());
+                    spDb.SaveChanges();
+                }
+            }
 
-                        if (keyValuePairs.ContainsKey("CaseType") && Item.CaseType != retObj.CaseType && !string.IsNullOrEmpty(retObj.CaseType))
-                        {
-                            Item.CaseType = retObj.CaseType;
-                        }
+        }
+        
+        public Task Execute(IJobExecutionContext context)
+        {
+            spDbContext spDb = new spDbContext();
+
+            var lstItem = spDb.PerformanceItems.Where<PerformanceItem>(p =>
+                ((p.AgentFeedbackMemo != "已算绩效" || p.AgentFeedbackMemo==null ) && p.CalMonth.Status == 0 && !p.CaseNo.StartsWith("J")))
+                .Include(p=>p.Reviewer)
+                .Include(p=>p.CalMonth)
+                .ToList<PerformanceItem>();
+           
+
+            if (lstItem != null)
+            {
+                int i = 0;
+                foreach (var Item in lstItem)
+                {
+                    
+                    int iTryCount = 0;    
+                TryAgain:
+                    try
+                    {
+                        iTryCount++;
 
-                        //if (Item.FinishedDate.HasValue && 
-                        //    Item.FinishedDate.Value.ToString("yyyy-MM") != DateTime.Parse($"{Item.CalMonth.Year}-{Item.CalMonth.Month}-01").ToString("yyyy-MM"))
-                        //{
-                        //    //删除完成日变成下一个月的记录
-                        //    var ItemStaffs = spDb.ItemStaffs.Where(p => p.ItemId == Item.Id).ToList();
-                        //    foreach(var itemstaff in ItemStaffs)
-                        //    {
-                        //        spDb.Remove(itemstaff);
-                        //    }
-                        //    spDb.PerformanceItems.Remove(Item);
-                        //    spDb.SaveChanges();
+                        UpdateFromIPEasy(Item, spDb);
 
-                        //}
-                        //else
-                        //{
-                            if (spDb.Entry(Item).State != EntityState.Unchanged)
-                            {
-                                Utility.Utility.CalBasePoint(Item, spDb.BasePointRules.ToList());
-                                spDb.SaveChanges();
-                            }
+                        Log($"{DateTime.Now}\t{++i}\t{Item.CaseNo}");
+                        System.Diagnostics.Debug.WriteLine($"{DateTime.Now}\t{i}\t{Item.CaseNo}");
                         //}
                     }
                     catch(Exception ex)
@@ -227,11 +227,21 @@ namespace wispro.sp.api.Job
                         }
 
                         System.Diagnostics.Debug.WriteLine(ex.ToString());
+                        Log($"{DateTime.Now}\t{++i}\t{Item.CaseNo}\r\n{ex.ToString()}");
                     }
                 }
             }
 
             return Task.CompletedTask;
         }
+
+        private void Log(string strMessage)
+        {
+            StreamWriter sw = File.AppendText("c:\\temp\\log.txt");
+            sw.Write($"{strMessage}\r\n");
+            sw.Flush();
+            sw.Close();
+            sw.Dispose();
+        }
     }
 }

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

@@ -11,7 +11,7 @@
     "DefaultConnect": "Data Source=(local);Initial Catalog=spDB;User ID=sa;Password=Lqftiu807005"
   },
 
-  "UpdateScheduleSetting": "00 15 12 1,2,3,4,5,6,7,8, * ? *",
+  "UpdateScheduleSetting": "00 15 09 1,2,3,4,5,6,7,8, * ? *",
 
   "ValidAudience": "StaffPerformance",
   "ValidIssuer": "http://localhost:39476",

+ 4 - 1
wispro.sp.web/Pages/AppCase/CaseManager.razor

@@ -124,7 +124,7 @@ RenderFragment gdIcon =
                                 @serialNumber(_pageIndex, _pageSize, context.Id)
                             </AntDesign.Column>
 
-                            <AntDesign.Column Title="基础点数" TData="string" Width="100">@(context.BasePoint == null ? "" : context.BasePoint)</AntDesign.Column>
+                            <AntDesign.Column Title="基础点数" TData="string" Width="100" Sortable>@(context.BasePoint == null ? "" : context.BasePoint)</AntDesign.Column>
                             <AntDesign.Column Title="我方文号" @bind-Field="@context.CaseNo" Width="150" Sortable Filterable />
                             <AntDesign.Column Title="案件类型" @bind-Field="@context.CaseType" Width="120" Sortable Filterable />
                             <AntDesign.Column Title="案件系数"
@@ -147,6 +147,9 @@ RenderFragment gdIcon =
                                 }
                             </AntDesign.Column>
                             <AntDesign.Column Title="核稿人" TData="string" Width="100">@(context.Reviewer == null ? "" : context.Reviewer.Name)</AntDesign.Column>
+                            <ActionColumn>
+                                <Button Icon="refresh" @onclick="()=>OnRefresh(context)">刷新</Button>
+                            </ActionColumn>
                         </RowTemplate>
                         <ExpandTemplate>
                             <div style="width:1000px;margin-left:30px;">

+ 6 - 0
wispro.sp.web/Pages/AppCase/CaseManager.razor.cs

@@ -132,5 +132,11 @@ namespace wispro.sp.web.Pages.AppCase
             isDownloading = false;
 
         }
+
+        async Task OnRefresh(PerformanceItem item)
+        {
+            item = await _ItemService.RefreshItem(item.Id);
+            StateHasChanged();
+        }
     }
 }

+ 2 - 0
wispro.sp.web/Pages/AppCase/MyCaselist.razor.cs

@@ -419,5 +419,7 @@ namespace wispro.sp.web.Pages.AppCase
             };
             StateHasChanged();
         }
+
+        
     }
 }

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

@@ -315,6 +315,14 @@ namespace wispro.sp.web.Services
             return data;
         }
 
+        public async Task<PerformanceItem> RefreshItem(int Id)
+        {
+            var data = await _httpClient.Get<ApiSaveResponse>($"PerformanceItem/RefreshFromIPEasyById?itemId={Id}");
+
+            return await _httpClient.Get<PerformanceItem>($"PerformanceItem/PerformanceItem?Id={Id}");
+           
+        }
+
         public async Task<List<StaffStatistics>> CalMyStatistics(int year, int month, int? userid = null)
         {
             var data = await _httpClient.Get<List<StaffStatistics>>($"PerformanceItem/CalMyStatistics?userid={userid}&year={year}&month={month}");

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

@@ -543,6 +543,8 @@ namespace wispro.sp.winClient
 
             await RefreshItemAsync();
 
+            await GetDoItemInfo("PACN2027395", "处理审查意见", "一通");
+
         }
 
         private async Task UserField2String()
@@ -1003,6 +1005,15 @@ namespace wispro.sp.winClient
             return data;
         }
 
+        private async Task<PerformanceItem> GetDoItemInfo(string CaseNo, string DoItem, string caseStage)
+        {
+            HttpClient http = CreateHttp();
+            http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", Token.Token);
+            PerformanceItem data = await http.GetFromJsonAsync<PerformanceItem>($"{strAPIBaseUri}/api/IPEasy/GetDoItemInfo?CaseNo={CaseNo}&DoItem={DoItem}&caseStage={caseStage}");
+
+            return data;
+        }
+
         private void button4_Click(object sender, EventArgs e)
         {
             Stopwatch watch = new Stopwatch();

+ 2 - 3
wispro.sp.winClient/appsettings.json

@@ -4,10 +4,9 @@
     "isHeadless": "false",
     "Account": "caiyangl",
     "Password": "j)wx*lier*@3",
-    "ChormeDriverPath": "D:\\source\\repos\\ConsoleApp2\\ConsoleApp2\\bin\\Debug",
-    "ScheduleSetting": "30 15 17 * * ? *",
+    "ChormeDriverPath": "D:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\97.0.4692.71",
+    "ScheduleSetting": "00 55 10 3 * ? *",
     "IPEasyWeb": "http://47.106.221.167/Login.aspx"
-
   },
   "MailSetting": {
     "Server": "smtp.exmail.qq.com",