소스 검색

添加更新记录进度文件

luocaiyang 2 년 전
부모
커밋
ec5c9e0665
27개의 변경된 파일836개의 추가작업 그리고 213개의 파일을 삭제
  1. 64 2
      wispro.sp.api/AppealHandler/MissingCaseReviewHandler.cs
  2. 0 1
      wispro.sp.api/Controllers/AccountController.cs
  3. 215 41
      wispro.sp.api/Controllers/AppealController.cs
  4. 10 0
      wispro.sp.api/Controllers/OrganizationController.cs
  5. 125 18
      wispro.sp.api/Controllers/PerformanceItemController.cs
  6. 11 0
      wispro.sp.api/Controllers/ProjectController.cs
  7. 7 0
      wispro.sp.api/Job/ImportReportJob.cs
  8. 23 8
      wispro.sp.api/Job/InvalidDataMessageJob.cs
  9. 45 0
      wispro.sp.api/Job/UpdateJXDataFromIPEasyJob.cs
  10. 5 4
      wispro.sp.api/appsettings.json
  11. 2 0
      wispro.sp.utility/ConfigHelper.cs
  12. 5 5
      wispro.sp.utility/IPEasyUtility.cs
  13. 16 0
      wispro.sp.web/Components/ReviewerAppeal.razor
  14. 2 0
      wispro.sp.web/Components/ReviewerAppeal.razor.cs
  15. 1 1
      wispro.sp.web/Components/SSTable.razor
  16. 3 0
      wispro.sp.web/Models/ReviewerAppealModel.cs
  17. 10 0
      wispro.sp.web/Pages/AppCase/CaseManager.razor
  18. 22 1
      wispro.sp.web/Pages/AppCase/CaseManager.razor.cs
  19. 55 54
      wispro.sp.web/Pages/AppCase/MyCaselist.razor.cs
  20. 1 1
      wispro.sp.web/Pages/Organization/Department.razor.cs
  21. 1 1
      wispro.sp.web/Pages/StaffList.razor
  22. 62 55
      wispro.sp.web/Pages/Welcome.razor.cs
  23. 19 3
      wispro.sp.web/Services/AppealTypeService.cs
  24. 36 8
      wispro.sp.winClient/Form1.Designer.cs
  25. 46 0
      wispro.sp.winClient/Form1.cs
  26. 3 2
      wispro.sp.winClient/appsettings.json
  27. 47 8
      wospro.sp.entity/CaseCoefficientStatistics.cs

+ 64 - 2
wispro.sp.api/AppealHandler/MissingCaseReviewHandler.cs

@@ -40,7 +40,9 @@ namespace wispro.sp.api.AppealHandler
             {
                 var result = ((spDbContext)spContext).InputFieldValues.Where<InputFieldValue>(f => f.AppealRecordId == appealRecordId  && f.InputField.AppealState == 0).ToList();
 
-                string strCaseNo="";
+                var appealRecord = ((spDbContext)spContext).AppealRecords.Where<AppealRecord>(f => f.Id == appealRecordId).Include(f=>f.Creater).FirstOrDefault();
+
+                string strCaseNo ="";
                 string strDoItem="";
                 string strCaseStage = "";
                 foreach (var iv in result)
@@ -70,7 +72,53 @@ namespace wispro.sp.api.AppealHandler
                 }
 
                 var itemControler = new PerformanceItemController((spDbContext)spContext,new Services.FileTaskCacheService());
-                PerformanceItem Item = itemControler.GetItemInfoByCaseStage(strCaseNo,strDoItem, strCaseStage);
+
+                PerformanceItem Item = null;
+                if (strDoItem == "发明一次OA授权")
+                {
+                    try
+                    {
+                        Item = itemControler.GetItemInfoByCaseStage(strCaseNo, "处理审查意见", "");
+                    }
+                    catch { }
+
+                    if(Item == null || Item.ItemStaffs.Where(s => s.DoPerson.Name == appealRecord.Creater.Name).Count() ==0 )
+                    {
+                        Item = null;
+                        try
+                        {
+                            Item = itemControler.GetItemInfoByCaseStage(strCaseNo, "电询", "");
+                        }
+                        catch { }
+                        
+                    }
+
+                    if (Item == null || Item.ItemStaffs.Where(s => s.DoPerson.Name == appealRecord.Creater.Name).Count() == 0)
+                    {
+                        Item = null;
+                        try
+                        {
+                            Item = itemControler.GetItemInfoByCaseStage(strCaseNo, "补正", "");
+                        }
+                        catch { }
+                    }
+
+                    if (Item == null || Item.ItemStaffs.Where(s => s.DoPerson.Name == appealRecord.Creater.Name).Count() == 0)
+                    {
+                        Item = null;
+                        
+                        try
+                        {
+                            Item = itemControler.GetItemInfoByCaseStage(strCaseNo, "新申请", "");
+                        }
+                        catch { }
+                    }
+                }
+                else
+                {
+                    Item = itemControler.GetItemInfoByCaseStage(strCaseNo, strDoItem, strCaseStage);
+                }
+
                 CalMonth calMonth = ((spDbContext)spContext).CalMonths.FirstOrDefault(c=>c.Status == 0);
 
                 if (calMonth != null )
@@ -78,6 +126,20 @@ namespace wispro.sp.api.AppealHandler
                     if (Item.Id == 0 || Item.CalMonthId != calMonth.Id)
                     {
                         Item.Id = 0;
+
+                        if (strDoItem == "发明一次OA授权")
+                        {
+                            if (Item.ItemStaffs.Where(s => s.DoPerson.Name == appealRecord.Creater.Name).Count() == 0)
+                            {
+                                throw new Exception($"最后一次{Item.DoItem}处理人与缺漏申请人不一致!");
+                            }
+                            else
+                            {
+                                Item.DoItem = strDoItem;
+                                Item.AgentFeedbackMemo = strDoItem;
+                            }
+                        }
+
                         SaveToDb(Item, (spDbContext)spContext, calMonth);
 
                         itemControler.RefreshPoint(Item);

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

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

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 215 - 41
wispro.sp.api/Controllers/AppealController.cs


+ 10 - 0
wispro.sp.api/Controllers/OrganizationController.cs

@@ -268,6 +268,16 @@ namespace wispro.sp.api.Controllers
                             temCustomer.Address = customer.Address;
                         }
 
+                        if(temCustomer.ARate != customer.ARate)
+                        {
+                            temCustomer.ARate = customer.ARate;
+                        }
+
+                        if (temCustomer.SRate != customer.SRate)
+                        {
+                            temCustomer.SRate = customer.SRate;
+                        }
+
                         Context.SaveChanges();
 
                         //ret.Success = false;

+ 125 - 18
wispro.sp.api/Controllers/PerformanceItemController.cs

@@ -1095,6 +1095,109 @@ namespace wispro.sp.api.Controllers
 
         }
 
+        private int? GetStaff(string v)
+        {
+            if (!string.IsNullOrEmpty(v))
+            {
+                string temName = v.Split(new char[] { '-' }, StringSplitOptions.RemoveEmptyEntries)[0];
+
+                if (!v.Contains("君龙"))
+                {
+                    temName = v;
+                }
+                var staff = Context.Staffs.Where<Staff>(s => s.Name == temName).FirstOrDefault();
+
+                if (staff != null)
+                {
+                    return staff.Id;
+                }
+            }
+
+            return null;
+        }
+
+        public ApiSaveResponse UpdateOAStaff()
+        {
+            string strExcelFile = @"c:\temp\每月绩效统计--中国一次OA授权表.xlsx";
+            DataTable dt = NPOIExcel.ExcelToDataTable(strExcelFile, true, false);
+
+            foreach(DataRow row in dt.Rows)
+            {
+                string strCaseNo = row["我方文号"].ToString().Trim();
+                string strDoItem ="发明一次OA授权"; //row["处理事项"].ToString().Trim();
+
+                PerformanceItem item = Context.PerformanceItems
+                    .Where<PerformanceItem>(p => p.CaseNo == strCaseNo && 
+                    p.DoItem == strDoItem 
+                    && p.CalMonth.Status == 0)
+                .Include(p => p.Reviewer)
+                .Include(p => p.CalMonth)
+                .Include(p => p.Customer)
+                .Include(p => p.ItemStaffs).ThenInclude(p => p.DoPerson)
+                .FirstOrDefault();
+
+                if(item != null)
+                {
+                    string strHandler = strHandler = row["处理事项处理人"].ToString().Trim();
+
+                    string[] temHandlers = strHandler.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
+                    item.ItemStaffs = item.ItemStaffs;
+                    if(item.ItemStaffs == null)
+                    {
+                        item.ItemStaffs = new List<ItemStaff>();
+                    }
+
+                    foreach (string name in temHandlers)
+                    {
+                        ItemStaff itemStaff = new ItemStaff();
+                        string temName = name.Split(new char[] { '-' }, StringSplitOptions.RemoveEmptyEntries)[0];
+                        if (!name.Contains("君龙"))
+                        {
+                            temName = name.Trim();
+                        }
+                        int? iTem = GetStaff(temName);
+                        if ((iTem != null))
+                        {
+                            //itemStaff.Item = item;
+                            itemStaff.DoPersonId = iTem.Value;
+
+                            if (item.ItemStaffs.Where(itemS => itemS.DoPersonId == iTem.Value).Count() == 0)
+                            {
+                                item.ItemStaffs.Add(itemStaff);
+                            }
+                        }
+                        else
+                        {
+                            itemStaff.DoPerson = new Staff()
+                            {
+                                Name = temName,
+                                Account = temName,
+                                Password = utility.MD5Utility.GetMD5("12345678"),
+                                IsCalPerformsnce = false,
+                                Status = "试用期",
+                                StaffGradeId = 4
+                            };
+                            item.ItemStaffs.Add(itemStaff);
+                        }
+                    }
+
+                }
+
+                
+                Context.SaveChanges();
+
+            }
+
+
+
+                
+
+            return new ApiSaveResponse()
+            {
+                Success = true
+            };
+        }
+
         public ApiSaveResponse RefreshFromIPEasyById(int itemId)
         {
             var Item = Context.PerformanceItems.Include(p => p.Customer).Include(p => p.ItemStaffs).ThenInclude(p => p.DoPerson).FirstOrDefault(p => p.Id == itemId);
@@ -2028,7 +2131,7 @@ namespace wispro.sp.api.Controllers
                         }
                         else
                         {
-                            if (item.ItemStaffs.Count == 1 && itemStaff.PerformancePoint == 0)
+                            if (item.ItemStaffs.Count == 1 )
                             {
                                 handlerBasePoint = item.BasePoint.Value;
                             }
@@ -2131,7 +2234,7 @@ namespace wispro.sp.api.Controllers
                                 }
                                 else
                                 {
-                                    if (itemStaff.DoPerson.Status != "试用期" && item.Reviewer.IsCalPerformsnce)  //判断是否在职
+                                    if (itemStaff.DoPerson.IsCalPerformsnce && item.Reviewer.IsCalPerformsnce)  //判断是否在职
                                     {
                                         temReviewerStatic = new StaffStatistics()
                                         {
@@ -2239,7 +2342,10 @@ namespace wispro.sp.api.Controllers
 
             foreach (StaffStatistics ss in xsqList)
             {
-                
+                if(totalFPBLPoint * (totalActionPoint + jlPoint) == 0)
+                {
+                    Console.WriteLine("");
+                }
                 ss.FinianlPoint = ss.FinianlPoint / totalFPBLPoint * (totalActionPoint + jlPoint);
                 spDb.SaveChanges();
                 
@@ -2953,70 +3059,71 @@ namespace wispro.sp.api.Controllers
 
                 try
                 {
-                    if (temObj.ApplicationType != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("ApplicationType") && temObj.ApplicationType != null)
                         retObj.ApplicationType = temObj.ApplicationType.ToString();
 
-                    if (temObj.CaseMemo != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("CaseMemo") && temObj.CaseMemo != null)
                         retObj.CaseMemo = temObj.CaseMemo.ToString();
 
-                    if (temObj.BusinessType != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("BusinessType") && temObj.BusinessType != null)
                         retObj.BusinessType = temObj.BusinessType.ToString();
 
                     if (temObj.DoItem != null)
                         retObj.DoItem = temObj.DoItem.ToString();
 
-                    if (temObj.CaseStage != null)
+                    
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("CaseStage") && temObj.CaseStage != null)
                         retObj.CaseStage = temObj.CaseStage.ToString();
 
-                    if (temObj.CaseType != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("CaseType") && temObj.CaseType != null)
                         retObj.CaseType = temObj.CaseType.ToString();
 
-                    if (temObj.DoItemState != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("DoItemState") && temObj.DoItemState != null)
                         retObj.DoItemState = temObj.DoItemState.ToString();
 
-                    if (temObj.DoItemCoefficient != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("DoItemCoefficient") && temObj.DoItemCoefficient != null)
                         retObj.DoItemCoefficient = temObj.DoItemCoefficient.ToString();
 
-                    if (temObj.CaseCoefficient != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("CaseCoefficient") && temObj.CaseCoefficient != null)
                         retObj.CaseCoefficient = temObj.CaseCoefficient.ToString();
 
-                    if (temObj.EntrustingDate != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("EntrustingDate") && temObj.EntrustingDate != null)
                     {
                         if (!string.IsNullOrEmpty(temObj.EntrustingDate.ToString()))
                             retObj.EntrustingDate = DateTime.Parse(temObj.EntrustingDate.ToString());
                     }
 
-                    if(temObj.Country != null)
+                    if(((IDictionary<String, Object>)temObj).Keys.Contains("Country") && temObj.Country != null)
                     {
                         retObj.Country = temObj.Country.ToString();
                     }
                         
 
-                    if (temObj.InternalDate != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("InternalDate") && temObj.InternalDate != null)
                     {
                         if (!string.IsNullOrEmpty(temObj.InternalDate.ToString()))
                             retObj.InternalDate = DateTime.Parse(temObj.InternalDate.ToString());
                     }
 
-                    if (temObj.CustomerLimitDate != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("CustomerLimitDate") && temObj.CustomerLimitDate != null)
                     {
                         if (!string.IsNullOrEmpty(temObj.CustomerLimitDate.ToString()))
                             retObj.CustomerLimitDate = DateTime.Parse(temObj.CustomerLimitDate.ToString());
                     }
 
 
-                    if (temObj.ReturnDate != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("ReturnDate") && temObj.ReturnDate != null)
                     {
                         if (!string.IsNullOrEmpty(temObj.ReturnDate.ToString()))
                             retObj.ReturnDate = DateTime.Parse(temObj.ReturnDate.ToString());
                     }
 
-                    if (temObj.FinalizationDate != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("FinalizationDate") && temObj.FinalizationDate != null)
                     {
                         if (!string.IsNullOrEmpty(temObj.FinalizationDate.ToString()))
                             retObj.FinalizationDate = DateTime.Parse(temObj.FinalizationDate.ToString());
                     }
-                    if (temObj.FinishedDate != null)
+                    if (((IDictionary<String, Object>)temObj).Keys.Contains("FinishedDate") && temObj.FinishedDate != null)
                     {
                         if (!string.IsNullOrEmpty(temObj.FinishedDate.ToString()))
                             retObj.FinishedDate = DateTime.Parse(temObj.FinishedDate.ToString());

+ 11 - 0
wispro.sp.api/Controllers/ProjectController.cs

@@ -416,6 +416,11 @@ namespace wispro.sp.api.Controllers
 
                             foreach (string strKey in finanlJXDic.Keys)
                             {
+                                if(finanlJXDic[strKey] == 0.00)
+                                {
+                                    continue;
+                                }
+
                                 PerformanceItem item = Context.PerformanceItems.FirstOrDefault(p =>
                                     p.CaseNo == saveObj.ProjectContentRecord.ProjectNo &&
                                     p.ItemStaffs.Where(s => s.DoPersonId == saveObj.ProjectContentRecord.StaffId).Count() > 0 &&
@@ -567,6 +572,12 @@ namespace wispro.sp.api.Controllers
             {
                 ProjectContents ret = new ProjectContents();
 
+                if(retObj.Project.Customer != null)
+                {
+                    retObj.Project.Customer.ResponseMan = null;
+                }
+                
+
                 ret.ProjectContentRecord = retObj;
                 ret.ProjectWorkContents = new List<ViewProjectWorkContent>();
 

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

@@ -287,6 +287,13 @@ namespace wispro.sp.api.Job
                 {
                     strHandler = row["案件处理人"].ToString().Trim();
                 }
+                else
+                {
+                    if (row.Table.Columns.Contains("处理事项处理人"))
+                    {
+                        strHandler = row["处理事项处理人"].ToString().Trim();
+                    }
+                }
             }
 
             string[] temHandlers = strHandler.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 23 - 8
wispro.sp.api/Job/InvalidDataMessageJob.cs


+ 45 - 0
wispro.sp.api/Job/UpdateJXDataFromIPEasyJob.cs

@@ -450,6 +450,9 @@ namespace wispro.sp.api.Job
         {
             spDbContext spDb = new spDbContext();
 
+            int lastUpdate = getInt();
+            
+
             var lstItem = spDb.PerformanceItems.Where<PerformanceItem>(p =>
                 ((p.AgentFeedbackMemo != "已算绩效" || p.AgentFeedbackMemo==null ) 
                     && p.CalMonth.Status == 0 && 
@@ -465,6 +468,11 @@ namespace wispro.sp.api.Job
                 int i = 0;
                 foreach (var Item in lstItem)
                 {
+                    if (i < lastUpdate)
+                    {
+                        continue;
+                    }
+
                     System.Threading.Thread.Sleep(100);
                     int iTryCount = 0;    
                 TryAgain:
@@ -492,9 +500,16 @@ namespace wispro.sp.api.Job
                 }
             }
 
+            try
+            {
+                System.IO.File.Delete(updateFilePath);
+            }
+            catch { }
+
             return Task.CompletedTask;
         }
 
+        
         private void Log(string strMessage)
         {
             StreamWriter sw = File.AppendText("c:\\temp\\log.txt");
@@ -503,5 +518,35 @@ namespace wispro.sp.api.Job
             sw.Close();
             sw.Dispose();
         }
+
+        #region 添加一个记录更新绩效记录的进度文件,用于解决重新启动更新数据时重新从第一条开始导致更新时间漫长的问题
+        string updateFilePath = "c:\\temp\\update.txt";
+        private int getInt()
+        {
+            try
+            {
+                string sw = File.ReadAllText(updateFilePath);
+                return int.Parse(sw);
+            }
+            catch
+            {
+                return 0;
+            }
+            
+        }
+
+        private void save(int i)
+        {
+            try
+            {
+                StreamWriter sw = File.CreateText(updateFilePath);
+                sw.Write(i);
+                sw.Flush();
+                sw.Close();
+                sw.Dispose();
+            }
+            catch { }
+        }
+        #endregion
     }
 }

+ 5 - 4
wispro.sp.api/appsettings.json

@@ -11,10 +11,10 @@
     "DefaultConnect": "Data Source=(local);Initial Catalog=spDB;User ID=sa;Password=Lqftiu807005"
   },
 
-  "UpdateScheduleSetting": "00 01 12 1-9 * ? *",
+  "UpdateScheduleSetting": "00 09 00 1-9 * ? *",
   "InvalidDataScheduleSetting": "00 29 16 1-6 * ? *",
   "AgentMessageScheduleSetting": "00 10 06 7 * ? *",
-  "ImportProjectScheduleSetting": "0 13 10 * * ?",
+  "ImportProjectScheduleSetting": "00 13 00 1-9 * ?",
 
   "ValidAudience": "StaffPerformance",
   "ValidIssuer": "http://localhost:39476",
@@ -27,10 +27,10 @@
   },
   "IPEasySetting": {
     "DownloadFileSavePath": "c:\\temp",
-    "isHeadless": "false",
+    "isHeadless": "true",
     "Account": "caiyangl",
     "Password": "j)wx*lier*@3",
-    "ChormeDriverPath": "D:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\110.0.5481.77",
+    "ChormeDriverPath": "D:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\114.0.5735.90",
     "ScheduleSetting": "00 55 15 16 * ? *",
     "IPEasyWeb": "http://47.106.221.167/Login.aspx"
   },
@@ -41,6 +41,7 @@
     "Password": "Qj7eGb3ffQfJ3tpt",
     "mail": "luocaiyang@china-wispro.com"
   },
+  "InvalidDataMessageMails": "罗才洋|luocaiyang@china-wispro.com,何青瓦|heqingwa@china-wispro.com,钟子敏|zhongzimin@china-wispro.com,吴芳|wufang@china-wispro.com,邢丽霞|xinglixia@china-wispro.com,田婵玉|tianchanyu@china-wispro.com,周珊珊|zhoushanshan@china-wispro.com",
 
   "Authorize": {
     "/Department": "[94]-[1],[128]-[7],[44]-[5],[2]-[7]",

+ 2 - 0
wispro.sp.utility/ConfigHelper.cs

@@ -34,5 +34,7 @@ namespace wispro.sp.utility
         {
             return _configuration.GetSection(key).Value;
         }
+
+        
     }
 }

+ 5 - 5
wispro.sp.utility/IPEasyUtility.cs

@@ -336,7 +336,7 @@ namespace wispro.sp.utility
 
             dynamic retObject = new ExpandoObject();
 
-            retObject.CaseNo = caseNo;
+            retObject.CaseNo = caseNo.Trim();
 
             using (IWebDriver driver = new OpenQA.Selenium.Chrome.ChromeDriver(ConfigHelper.GetSectionValue("IPEasySetting:ChormeDriverPath"), options))
             {
@@ -368,7 +368,7 @@ namespace wispro.sp.utility
                     driver.SwitchTo().Frame(1);
 
                     var inputSearch = driver.FindElement(By.Id("case_volume"));
-                    inputSearch.SendKeys(caseNo);
+                    inputSearch.SendKeys(caseNo.Trim());
 
                     var btnSearch = driver.FindElement(By.Id("btn_Search"));
                     btnSearch.Click();
@@ -437,7 +437,7 @@ namespace wispro.sp.utility
 
             dynamic retObject = new ExpandoObject();
 
-            retObject.CaseNo = caseNo;
+            retObject.CaseNo = caseNo.Trim();
             retObject.DoItem = doItemName;
 
             using (var Service = ChromeDriverService.CreateDefaultService(ConfigHelper.GetSectionValue("IPEasySetting:ChormeDriverPath")))
@@ -476,13 +476,13 @@ namespace wispro.sp.utility
                         driver.SwitchTo().Frame(1);
 
                         var inputSearch = driver.FindElement(By.Id("case_volume"));
-                        inputSearch.SendKeys(caseNo);
+                        inputSearch.SendKeys(caseNo.Trim());
 
                         var btnSearch = driver.FindElement(By.Id("btn_Search"));
                         btnSearch.Click();
                         System.Threading.Thread.Sleep(500);
 
-                        var caseLink = driver.FindElement(By.XPath($"//a[normalize-space()='{caseNo}']"));
+                        var caseLink = driver.FindElement(By.XPath($"//a[normalize-space()='{caseNo.Trim()}']"));
                         caseLink.Click();
                         System.Threading.Thread.Sleep(500);
 

+ 16 - 0
wispro.sp.web/Components/ReviewerAppeal.razor

@@ -18,6 +18,22 @@
                     <AntDesign.Col Span="4"><b>案件名称:</b></AntDesign.Col>
                     <AntDesign.Col Span="20">@_Model.Item.CaseName</AntDesign.Col>
                 </Row>
+
+                @if (_Model.AppealRecord.Type.Name == "案件系数复核")
+                {
+                    <Row>
+                        <AntDesign.Col Span="24">
+                        <Alert Type="@AlertType.Info"
+                           Message=@($"【{_Model.cssObject.customer.Name}】本月新申请案件总数为:{_Model.cssObject.Totals}件; \r\n其中,S案件{_Model.cssObject.SCount}件, \r\n A案件{_Model.cssObject.ACount}")
+                           ShowIcon="true" />
+
+                        <Alert Type="@AlertType.Info"
+                           Message=@($"本月新申请案件总数为:{_Model.MonthCCSObj.Totals}件; \r\n其中,S案件{_Model.MonthCCSObj.SCount}件, \r\n A案件{_Model.MonthCCSObj.ACount}")
+                           ShowIcon="true" />
+                        
+                        </AntDesign.Col>
+                    </Row>
+                }
                 
             </div>
         </Panel>

+ 2 - 0
wispro.sp.web/Components/ReviewerAppeal.razor.cs

@@ -28,6 +28,8 @@ namespace wispro.sp.web.Components
         protected override void OnInitialized()
         {
             _Model = base.Options ?? new ReviewerAppealModel();
+
+            //Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(_Model));
             base.OnInitialized();
             feedbackRef = base.FeedbackRef;
         }

+ 1 - 1
wispro.sp.web/Components/SSTable.razor

@@ -70,7 +70,7 @@ else
 
     @if (CurrentAppealRecord != null && CurrentAppealRecord.Item != null)
     {
-
+        Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(CurrentAppealRecord.Item));
         <div>
             <Row>
                 <AntDesign.Col Span="4"><b>我方文号:</b></AntDesign.Col>

+ 3 - 0
wispro.sp.web/Models/ReviewerAppealModel.cs

@@ -27,6 +27,8 @@ namespace wispro.sp.web.Models
 
         public CaseCoefficientStatistics cssObject { get; set; }
 
+        public CaseCoefficientStatistics MonthCCSObj { get; set; }
+
         public async Task Init(AppealTypeService _atService, int appealRecordId)
         {
             this.AppealRecord =await _atService.getAppealRecord(appealRecordId);
@@ -39,6 +41,7 @@ namespace wispro.sp.web.Models
             if(AppealRecord.Type.Name == "案件系数复核")
             {
                 cssObject = await _atService.GetCaseCoefficientStatistics(Item.CustomerId, Item.CalMonthId);
+                MonthCCSObj = await _atService.GetCaseCoefficientStatistics(null, Item.CalMonthId);
             }
             
 

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

@@ -132,6 +132,16 @@ RenderFragment gdIcon =
                     {
                         <Button Icon="download" Type="@ButtonType.Text" OnClick="() => ExportDataAsync(HandlingCalMonth)">导出</Button>
                     }
+
+                    @if (isDownloading)
+                    {
+                        <Button Icon="download" Type="@ButtonType.Text" Loading>导出客户案件统计</Button>
+                    }
+                    else
+                    {
+                        <Button Icon="download" Type="@ButtonType.Text" OnClick="() => ExportCCSDataAsync(HandlingCalMonth)">导出客户案件统计</Button>
+                    }
+                    
                     </Extra>
 
                     

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

@@ -52,6 +52,8 @@ namespace wispro.sp.web.Pages.AppCase
 
         [Inject] protected IAuthService _authService { get; set; }
 
+        [Inject] protected AppealTypeService AppealTypeService { get;set; }
+
         protected override async Task OnInitializedAsync()
         {
             await _authService.CanVisitResource();
@@ -164,7 +166,7 @@ namespace wispro.sp.web.Pages.AppCase
             {
                 fileData = await _ItemService.getExportDataProcessing(fileData.Id);
                 await Task.Delay(20);
-            }
+            } 
 
             NavigationManager.NavigateTo($"{_configuration.GetValue<string>("APIUrl")}FileProcesTask/Download?Id={fileData.Id}");
 
@@ -174,6 +176,25 @@ namespace wispro.sp.web.Pages.AppCase
 
         }
 
+        private async Task ExportCCSDataAsync(CalMonth calMonth)
+        {
+            isDownloading = true;
+            var fileData = await AppealTypeService.ExportCustomerCCSFile(calMonth.Id);
+
+            while (!fileData.Finished)
+            {
+                fileData = await _ItemService.getExportDataProcessing(fileData.Id);
+                await Task.Delay(20);
+            }
+
+            NavigationManager.NavigateTo($"{_configuration.GetValue<string>("APIUrl")}FileProcesTask/Download?Id={fileData.Id}");
+
+            isDownloading = false;
+
+
+
+        }
+
         private async Task ExportCurrentMonthJXList()
         {
             isDownloading = true;

+ 55 - 54
wispro.sp.web/Pages/AppCase/MyCaselist.razor.cs

@@ -435,62 +435,63 @@ namespace wispro.sp.web.Pages.AppCase
             {
                 try
                 {
-                    if (templateOptions.AppealType.Name == "案件系数复核")
-                    {
-                        var ifValue = templateOptions.inputFieldValues.Where(iv => iv.InputField.FieldName == "案件系数").FirstOrDefault();
-                        //Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(templateOptions));
-                        var temCssObj = new CaseCoefficientStatistics()
-                        {
-                            Totals = templateOptions.cssObject.Totals,
-                            SCount = templateOptions.cssObject.SCount,
-                            ACount = templateOptions.cssObject.ACount,
-                            customer = templateOptions.cssObject.customer
-                        };
-
-                        if (ifValue != null)
-                        {
-                            switch (ifValue.Value)
-                            {
-                                case "S":
-                                    temCssObj.SCount += 1;
-                                    break;
-                                case "A":
-                                    temCssObj.ACount += 1;
-                                    break;
-                            }
-                        }
-
-                        switch (templateOptions.Item.CaseCoefficient)
-                        {
-                            case "S":
-                                temCssObj.SCount -= 1;
-                                break;
-                            case "A":
-                                temCssObj.ACount -= 1;
-                                break;
-                        }
-
-                        Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(temCssObj));
-
-                        if (temCssObj.isExceedingLimit())
-                        {
-                            var reviewer = await _UserService.GetUser(templateOptions.AppealRecord.ReviewerId.Value);
+                    #region 案件系数复核 判断20230607修改为不需要判断
+                    //if (templateOptions.AppealType.Name == "案件系数复核")
+                    //{
+                    //    var ifValue = templateOptions.inputFieldValues.Where(iv => iv.InputField.FieldName == "案件系数").FirstOrDefault();
+                    //    //Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(templateOptions));
+                    //    var temCssObj = new CaseCoefficientStatistics()
+                    //    {
+                    //        Totals = templateOptions.cssObject.Totals,
+                    //        SCount = templateOptions.cssObject.SCount,
+                    //        ACount = templateOptions.cssObject.ACount,
+                    //        customer = templateOptions.cssObject.customer
+                    //    };
+
+                    //    if (ifValue != null)
+                    //    {
+                    //        switch (ifValue.Value)
+                    //        {
+                    //            case "S":
+                    //                temCssObj.SCount += 1;
+                    //                break;
+                    //            case "A":
+                    //                temCssObj.ACount += 1;
+                    //                break;
+                    //        }
+                    //    }
+
+                    //    switch (templateOptions.Item.CaseCoefficient)
+                    //    {
+                    //        case "S":
+                    //            temCssObj.SCount -= 1;
+                    //            break;
+                    //        case "A":
+                    //            temCssObj.ACount -= 1;
+                    //            break;
+                    //    }
+
+                    //    Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(temCssObj));
+
+                    //    if (temCssObj.isExceedingLimit())
+                    //    {
+                    //        var reviewer = await _UserService.GetUser(templateOptions.AppealRecord.ReviewerId.Value);
                             
-                            if (reviewer.Name != "钟子敏")
-                            {
-                                var SuccessConfig1 = new ConfirmOptions()
-                                {
-                                    Content = $"客户:【{temCssObj.customer.Name}】新申请案件系数A或者S超出阈值,需要提交给“钟子敏”审核!"
-                                };
-
-                                _ModalService.Error(SuccessConfig1);
+                    //        if (reviewer.Name != "钟子敏")
+                    //        {
+                    //            var SuccessConfig1 = new ConfirmOptions()
+                    //            {
+                    //                Content = $"客户:【{temCssObj.customer.Name}】新申请案件系数A或者S超出阈值,需要提交给“钟子敏”审核!"
+                    //            };
+
+                    //            _ModalService.Error(SuccessConfig1);
                                 
-                                //await JSRuntime.InvokeAsync<object>("alert", $"客户:【{temCssObj.customer.Name}】新申请案件系数A或者S超出阈值,需要提交给“钟子敏”审核!");
-                                return;
-                            }
-                        }
-                    }
-
+                    //            //await JSRuntime.InvokeAsync<object>("alert", $"客户:【{temCssObj.customer.Name}】新申请案件系数A或者S超出阈值,需要提交给“钟子敏”审核!");
+                    //            return;
+                    //        }
+                    //    }
+                    //}
+                    #endregion
                     await _atService.CreateAppeal(templateOptions);
                     await _modalRef.CloseAsync();
 

+ 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;
 

+ 62 - 55
wispro.sp.web/Pages/Welcome.razor.cs

@@ -132,61 +132,6 @@ namespace wispro.sp.web.Pages
 
             Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(templateOptions));
 
-            if (templateOptions.AppealRecord.Type.Name == "案件系数复核")
-            {
-                var ifValue = templateOptions.CreateAppealFieldValues.Where(iv => iv.InputField.FieldName == "案件系数").FirstOrDefault();
-
-                if (ifValue.Value == "A" || ifValue.Value == "S")
-                {
-                    var temCssObj = new CaseCoefficientStatistics()
-                    {
-                        Totals = templateOptions.cssObject.Totals,
-                        SCount = templateOptions.cssObject.SCount,
-                        ACount = templateOptions.cssObject.ACount,
-                        customer = templateOptions.cssObject.customer
-                    };
-
-                    if (ifValue != null)
-                    {
-                        switch (ifValue.Value)
-                        {
-                            case "S":
-                                temCssObj.SCount += 1;
-                                break;
-                            case "A":
-                                temCssObj.ACount += 1;
-                                break;
-                        }
-                    }
-
-                    switch (templateOptions.Item.CaseCoefficient)
-                    {
-                        case "S":
-                            temCssObj.SCount -= 1;
-                            break;
-                        case "A":
-                            temCssObj.ACount -= 1;
-                            break;
-                    }
-
-
-                    if (temCssObj.isExceedingLimit())
-                    {
-                        var reviewer = await UserService.GetUser(templateOptions.AppealRecord.ReviewerId.Value);
-                        if (reviewer.Name != "钟子敏")
-                        {
-                            var SuccessConfig1 = new ConfirmOptions()
-                            {
-                                Content = $"客户:【{temCssObj.customer.Name}】新申请案件系数A或者S超出阈值,请将审核人变更为“钟子敏”!"
-                            };
-
-                            _ModalService.Error(SuccessConfig1);
-                            //await JSRuntime.InvokeAsync<object>("alert", $"客户:【{temCssObj.customer.Name}】新申请案件系数A或者S超出阈值,请将审核人变更为“钟子敏”!");
-                            return;
-                        }
-                    }
-                }
-            }
             
 
             var modalConfig = new ModalOptions();
@@ -208,6 +153,68 @@ namespace wispro.sp.web.Pages
             {
                 try
                 {
+                    if (templateOptions.AppealRecord.Type.Name == "案件系数复核")
+                    {
+                        var ifValue = templateOptions.CreateAppealFieldValues.Where(iv => iv.InputField.FieldName == "案件系数").FirstOrDefault();
+
+                        if (ifValue.Value == "A" || ifValue.Value == "S")
+                        {
+                            var temCssObj = new CaseCoefficientStatistics()
+                            {
+                                Totals = templateOptions.cssObject.Totals,
+                                SCount = templateOptions.cssObject.SCount,
+                                ACount = templateOptions.cssObject.ACount,
+                                customer = templateOptions.cssObject.customer
+                            };
+
+                            if (ifValue != null)
+                            {
+                                switch (ifValue.Value)
+                                {
+                                    case "S":
+                                        temCssObj.SCount += 1;
+                                        break;
+                                    case "A":
+                                        temCssObj.ACount += 1;
+                                        break;
+                                }
+                            }
+
+                            switch (templateOptions.Item.CaseCoefficient)
+                            {
+                                case "S":
+                                    temCssObj.SCount -= 1;
+                                    break;
+                                case "A":
+                                    temCssObj.ACount -= 1;
+                                    break;
+                            }
+
+
+                            if (temCssObj.isExceedingLimit())
+                            {
+                                var shyjObj = templateOptions.inputFieldValues.Where(i => i.InputField.FieldName == "审核意见").FirstOrDefault();
+                                if (shyjObj!= null && shyjObj.Value == "同意")
+                                {
+
+                                    Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(templateOptions));
+                                    var reviewer = await UserService.GetUser(templateOptions.AppealRecord.ReviewerId.Value);
+                                    if (reviewer.Name != "钟子敏")
+                                    {
+                                        var SuccessConfig1 = new ConfirmOptions()
+                                        {
+                                            Content = $"客户:【{temCssObj.customer.Name}】新申请案件系数A或者S超出阈值,请将审核人变更为“钟子敏”!"
+                                        };
+
+                                        _ModalService.Error(SuccessConfig1);
+                                        //await JSRuntime.InvokeAsync<object>("alert", $"客户:【{temCssObj.customer.Name}】新申请案件系数A或者S超出阈值,请将审核人变更为“钟子敏”!");
+                                        return;
+                                    }
+                                }
+                            }
+                        }
+                    }
+
                     var retData = await _atService.ReviewerAppeal(templateOptions);
 
                     if (retData.Success)

+ 19 - 3
wispro.sp.web/Services/AppealTypeService.cs

@@ -222,9 +222,25 @@ namespace wispro.sp.web.Services
 
         public async Task<CaseCoefficientStatistics> GetCaseCoefficientStatistics(int? customerId,int calmonthId)
         {
-            CaseCoefficientStatistics caseCoefficients =
-                    await _httpClient.Get<CaseCoefficientStatistics>($"Appeal/GetCCSRecord?CustomerId={customerId.Value}&CalmonthId={calmonthId}");
-            return caseCoefficients;
+            if (customerId == null)
+            {
+                CaseCoefficientStatistics caseCoefficients =
+                       await _httpClient.Get<CaseCoefficientStatistics>($"Appeal/GetCCSRecord?CalmonthId={calmonthId}");
+                return caseCoefficients;
+            }
+            else
+            {
+                CaseCoefficientStatistics caseCoefficients =
+                        await _httpClient.Get<CaseCoefficientStatistics>($"Appeal/GetCCSRecord?CustomerId={customerId.Value}&CalmonthId={calmonthId}");
+                return caseCoefficients;
+            }
+        }
+
+        public async Task<FileProcessTask> ExportCustomerCCSFile(int calMonthId)
+        {
+            FileProcessTask file =
+                   await _httpClient.Get<FileProcessTask>($"Appeal/GetStaticsReport?CalMonthId={calMonthId}");
+            return file;
         }
     }
 }

+ 36 - 8
wispro.sp.winClient/Form1.Designer.cs

@@ -36,12 +36,14 @@ namespace wispro.sp.winClient
             this.button6 = new System.Windows.Forms.Button();
             this.button7 = new System.Windows.Forms.Button();
             this.button4 = new System.Windows.Forms.Button();
+            this.button8 = new System.Windows.Forms.Button();
+            this.button9 = new System.Windows.Forms.Button();
             this.SuspendLayout();
             // 
             // button1
             // 
             this.button1.Location = new System.Drawing.Point(61, 80);
-            this.button1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.button1.Margin = new System.Windows.Forms.Padding(4);
             this.button1.Name = "button1";
             this.button1.Size = new System.Drawing.Size(304, 79);
             this.button1.TabIndex = 0;
@@ -52,7 +54,7 @@ namespace wispro.sp.winClient
             // button2
             // 
             this.button2.Location = new System.Drawing.Point(415, 80);
-            this.button2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.button2.Margin = new System.Windows.Forms.Padding(4);
             this.button2.Name = "button2";
             this.button2.Size = new System.Drawing.Size(304, 79);
             this.button2.TabIndex = 0;
@@ -63,7 +65,7 @@ namespace wispro.sp.winClient
             // button3
             // 
             this.button3.Location = new System.Drawing.Point(749, 80);
-            this.button3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.button3.Margin = new System.Windows.Forms.Padding(4);
             this.button3.Name = "button3";
             this.button3.Size = new System.Drawing.Size(304, 79);
             this.button3.TabIndex = 0;
@@ -74,7 +76,7 @@ namespace wispro.sp.winClient
             // button5
             // 
             this.button5.Location = new System.Drawing.Point(318, 186);
-            this.button5.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.button5.Margin = new System.Windows.Forms.Padding(4);
             this.button5.Name = "button5";
             this.button5.Size = new System.Drawing.Size(202, 52);
             this.button5.TabIndex = 1;
@@ -85,7 +87,7 @@ namespace wispro.sp.winClient
             // button6
             // 
             this.button6.Location = new System.Drawing.Point(584, 186);
-            this.button6.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.button6.Margin = new System.Windows.Forms.Padding(4);
             this.button6.Name = "button6";
             this.button6.Size = new System.Drawing.Size(202, 52);
             this.button6.TabIndex = 1;
@@ -96,7 +98,7 @@ namespace wispro.sp.winClient
             // button7
             // 
             this.button7.Location = new System.Drawing.Point(850, 186);
-            this.button7.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.button7.Margin = new System.Windows.Forms.Padding(4);
             this.button7.Name = "button7";
             this.button7.Size = new System.Drawing.Size(202, 52);
             this.button7.TabIndex = 1;
@@ -107,7 +109,7 @@ namespace wispro.sp.winClient
             // button4
             // 
             this.button4.Location = new System.Drawing.Point(33, 184);
-            this.button4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.button4.Margin = new System.Windows.Forms.Padding(4);
             this.button4.Name = "button4";
             this.button4.Size = new System.Drawing.Size(252, 51);
             this.button4.TabIndex = 2;
@@ -115,6 +117,28 @@ namespace wispro.sp.winClient
             this.button4.UseVisualStyleBackColor = true;
             this.button4.Click += new System.EventHandler(this.button4_Click_1);
             // 
+            // button8
+            // 
+            this.button8.Location = new System.Drawing.Point(329, 4);
+            this.button8.Margin = new System.Windows.Forms.Padding(4);
+            this.button8.Name = "button8";
+            this.button8.Size = new System.Drawing.Size(202, 52);
+            this.button8.TabIndex = 1;
+            this.button8.Text = "更新绩效数据";
+            this.button8.UseVisualStyleBackColor = true;
+            this.button8.Click += new System.EventHandler(this.button8_ClickAsync);
+            // 
+            // button9
+            // 
+            this.button9.Location = new System.Drawing.Point(607, 4);
+            this.button9.Margin = new System.Windows.Forms.Padding(4);
+            this.button9.Name = "button9";
+            this.button9.Size = new System.Drawing.Size(202, 52);
+            this.button9.TabIndex = 1;
+            this.button9.Text = "更新绩效数据";
+            this.button9.UseVisualStyleBackColor = true;
+            this.button9.Click += new System.EventHandler(this.button9_Click);
+            // 
             // Form1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(13F, 28F);
@@ -122,13 +146,15 @@ namespace wispro.sp.winClient
             this.ClientSize = new System.Drawing.Size(1093, 251);
             this.Controls.Add(this.button4);
             this.Controls.Add(this.button7);
+            this.Controls.Add(this.button9);
+            this.Controls.Add(this.button8);
             this.Controls.Add(this.button6);
             this.Controls.Add(this.button5);
             this.Controls.Add(this.button3);
             this.Controls.Add(this.button2);
             this.Controls.Add(this.button1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Form1";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "人力绩效计算工具";
@@ -145,6 +171,8 @@ namespace wispro.sp.winClient
         private System.Windows.Forms.Button button6;
         private System.Windows.Forms.Button button7;
         private System.Windows.Forms.Button button4;
+        private System.Windows.Forms.Button button8;
+        private System.Windows.Forms.Button button9;
     }
 }
 

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

@@ -1446,5 +1446,51 @@ namespace wispro.sp.winClient
             //await StatisticsLevelCount(2022, 6);
 
         }
+
+        private int getInt()
+        {
+            string sw = File.ReadAllText("c:\\temp\\update.txt");
+            return int.Parse(sw);
+
+        }
+
+        private void save(int i)
+        {
+            StreamWriter sw = File.CreateText("c:\\temp\\update.txt");
+            sw.Write(i);
+            sw.Flush();
+            sw.Close();
+            sw.Dispose();
+        }
+
+        private async void button8_ClickAsync(object sender, EventArgs e)
+        {
+            //await RefreshPerformanceItem(1);
+
+            //await RefreshPerformanceItem(2);
+
+            //await RefreshPerformanceItem(3);
+            for(int i=0; i<10; i++)
+            {
+                save(i);
+            }
+
+            System.Diagnostics.Debug.WriteLine(getInt().ToString());
+
+        }
+
+        private async void button9_Click(object sender, EventArgs e)
+        {
+            if (Token == null)
+            {
+                await Login();
+            }
+
+            HttpClient http = CreateHttp();//
+            http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", Token.Token);
+            var data = await http.GetFromJsonAsync<ApiSaveResponse>($"{strAPIBaseUri}/api/PerformanceItem/UpdateOAStaff");
+
+
+        }
     }
 }

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

@@ -4,7 +4,7 @@
     "isHeadless": "false",
     "Account": "caiyangl",
     "Password": "j)wx*lier*@3",
-    "ChormeDriverPath": "D:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\113.0.5672.63",
+    "ChormeDriverPath": "D:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\114.0.5735.90",
     "ScheduleSetting": "00 55 10 3 * ? *",
     "IPEasyWeb": "http://47.106.221.167/Login.aspx"
   },
@@ -15,5 +15,6 @@
     "Password": "Lqftiu807005",
     "mail": "luocaiyang@china-wispro.com"
 
-  }
+  },
+  "InvalidDataMessageMails":"罗才洋|luocaiyang@china-wispro.com,何青瓦|heqingwa@china-wispro.com,钟子敏|zhongzimin@china-wispro.com,吴芳|wufang@china-wispro.com,邢丽霞|xinglixia@china-wispro.com,田婵玉|tianchanyu@china-wispro.com,周珊珊|zhoushanshan@china-wispro.com"
 }

+ 47 - 8
wospro.sp.entity/CaseCoefficientStatistics.cs

@@ -16,7 +16,51 @@ namespace wispro.sp.entity
         public int ACount { get; set; }
 
         public int SCount { get; set; }
-        
+
+        public bool ExceedingSLimit()
+        {
+            if (customer != null)
+            {
+                Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(customer));
+
+                double dSRate = 0.05;
+                
+                if (customer.SRate != null)
+                {
+                    dSRate = Convert.ToDouble(customer.SRate) / 100.00;
+                }
+
+                if (Totals > 0)
+                {
+                    return (Convert.ToDouble(SCount) / Convert.ToDouble(Totals) > dSRate);
+                }
+            }
+
+            return false;
+        }
+
+
+        public bool ExceedingALimit()
+        {
+            if (customer != null)
+            {
+                Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(customer));
+
+                double dARate = 0.3;
+                if (customer.ARate != null)
+                {
+                    dARate = Convert.ToDouble(customer.ARate) / 100.00;
+                }
+
+                if (Totals > 0)
+                {
+                    return (Convert.ToDouble(ACount + SCount) / Convert.ToDouble(Totals) > dARate);
+                }
+
+            }
+
+            return false;
+        }
         public bool isExceedingLimit()
         {
             if (customer != null)
@@ -34,16 +78,11 @@ namespace wispro.sp.entity
                 {
                     dSRate = Convert.ToDouble(customer.SRate) / 100.00;
                 }
-
                 
                 if (Totals > 0)
                 {
-                    if (Convert.ToDouble(ACount) / Convert.ToDouble(Totals) > dARate ||
-                            Convert.ToDouble(SCount) / Convert.ToDouble(Totals) > dSRate)
-                    {
-                        return true;
-                    }
-
+                    return (Convert.ToDouble(ACount + SCount) / Convert.ToDouble(Totals) > dARate ||
+                            Convert.ToDouble(SCount) / Convert.ToDouble(Totals) > dSRate);
                 }
 
             }