Ver código fonte

修正更新Job,使所有的案件信息都能更新

luocaiyang 3 anos atrás
pai
commit
60ee9ea176

Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 2
wispro.sp.api/Controllers/AppealController.cs


+ 2 - 2
wispro.sp.api/Controllers/PerformanceItemController.cs

@@ -495,7 +495,7 @@ namespace wispro.sp.api.Controllers
 
             List<PerformanceItem> ItemList = results
                 .Include(pi => pi.ItemStaffs).ThenInclude(iStaff => iStaff.DoPerson)
-                .Include(pi => pi.Reviewer)
+                .Include(pi => pi.Reviewer).ThenInclude(p=>p.StaffGrade)
                 .Include(pi => pi.Customer)
                 .OrderByDescending(o => o.Id)
                 .ToList<PerformanceItem>();
@@ -639,7 +639,7 @@ namespace wispro.sp.api.Controllers
                     #region 取审核人等级审核等级系数
                     VerifyCoefficient vcoefficient
                         = verifyCoefficients.Where<VerifyCoefficient>(v =>
-                            v.CheckerId == item.Reviewer.StaffGrade.Id
+                            v.CheckerId == item.Reviewer.StaffGradeId
                             && v.DoPersonId == itemStaff.DoPerson.StaffGradeId)
                     .FirstOrDefault<VerifyCoefficient>();
                     #endregion

+ 1 - 1
wispro.sp.api/Controllers/ProjectController.cs

@@ -367,7 +367,7 @@ namespace wispro.sp.api.Controllers
 
             var retList = Context.ProjectContentRecords
                 .Include(p=>p.Project).ThenInclude(p=>p.Customer)
-                .Where(p => p.State == 0 && p.CalMonth.Status == 0 && p.ReviewerId == user.Id).Select(p=>p.Project).Distinct().ToList();
+                .Where(p => p.State == 1 && p.CalMonth.Status == 0 && p.ReviewerId == user.Id).Select(p=>p.Project).Distinct().ToList();
 
             return retList;
         }

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
wispro.sp.api/Job/ImportReportJob.cs


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

@@ -15,11 +15,7 @@ namespace wispro.sp.api.Job
             spDbContext spDb = new spDbContext();
 
             var lstItem = spDb.PerformanceItems.Where<PerformanceItem>(p =>
-                (p.DoItem == "新申请" && (p.CaseCoefficient == null || p.CaseCoefficient == "") && p.CalMonth.Status == 0) ||
-                (p.DoItem == "处理审查意见" && (p.CaseStage == "一通" || p.CaseStage == "二通") && (p.DoItemCoefficient == null || p.DoItemCoefficient == "") && p.CalMonth.Status == 0) ||
-                ((p.DoItem == "Final Action") || (p.DoItem == "翻译校核") || (p.DoItem == "申復") || (p.DoItem == "口审评估") ||
-                (p.DoItem == "欧洲案答辩") || (p.DoItem == "RCE") || (p.DoItem == "Non Final Action") || (p.DoItem == "Advisory Action") && (p.DoItemCoefficient == null || p.DoItemCoefficient =="") && p.CalMonth.Status == 0) ||
-                (p.FinishedDate == null && p.CalMonth.Status == 0))
+                ((p.AgentFeedbackMemo != "已算绩效" || p.AgentFeedbackMemo==null ) && p.CalMonth.Status == 0 && !p.CaseNo.StartsWith("J")))
                 .Include(p=>p.Reviewer)
                 .Include(p=>p.CalMonth)
                 .ToList<PerformanceItem>();
@@ -30,10 +26,6 @@ namespace wispro.sp.api.Job
                 int i = 0;
                 foreach (var Item in lstItem)
                 {
-                    if (Item.CaseNo == "PAIN2134921" || Item.CaseNo == "PAUS2010405" || Item.CaseNo == "PAUS2016667")
-                    {
-                        Console.WriteLine("");
-                    }
                     System.Diagnostics.Debug.WriteLine($"{DateTime.Now}\t{++i}\t{Item.CaseNo}");
                     int iTryCount = 0;    
                 TryAgain:
@@ -163,7 +155,7 @@ namespace wispro.sp.api.Job
                                 else
                                 {
                                     //Item.Reviewer = temReviewer;
-                                    //Item.ReviewerId = temReviewer.Id;
+                                    Item.ReviewerId = temReviewer.Id;
                                 }
                             }
                         }

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

@@ -11,7 +11,7 @@
     "DefaultConnect": "Data Source=(local);Initial Catalog=spDB;User ID=sa;Password=Lqftiu807005"
   },
 
-  "UpdateScheduleSetting": "00 48 09 * * ? *",
+  "UpdateScheduleSetting": "00 02 16 1,2,3,4,5,6,7,8, * ? *",
 
   "ValidAudience": "StaffPerformance",
   "ValidIssuer": "http://localhost:39476",
@@ -27,7 +27,7 @@
     "isHeadless": "true",
     "Account": "caiyangl",
     "Password": "j)wx*lier*@3",
-    "ChormeDriverPath": "D:\\source\\repos\\ConsoleApp2\\ConsoleApp2\\bin\\Debug",
+    "ChormeDriverPath": "D:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\97.0.4692.71",
     "ScheduleSetting": "00 55 10 3 * ? *",
     "IPEasyWeb": "http://47.106.221.167/Login.aspx"
   },
@@ -43,8 +43,8 @@
   "Authorize": {
     "/Department": "[94]-[1],[128]-[7]",
     "/Workflow/Manage": "[94]-[1]",
-    "/CaseManager": "[128]-[7]",
-    "/Project/ProjectSearch": "[128]-[7]",
+    "/CaseManager": "[94]-[1],[128]-[7]",
+    "/Project/ProjectSearch": "[94]-[1],[128]-[7]",
     "/AppealRecords": "[94]-[1],[128]-[7]",
     "/CustomerList": "[94]-[1],[128]-[7]",
     "/StaffGrade": "[94]-[1],[128]-[7]"