|
@@ -68,7 +68,54 @@ namespace wispro.sp.api.Job
|
|
|
|
|
|
|
|
|
|
spDbContext spDb = new spDbContext();
|
|
spDbContext spDb = new spDbContext();
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ public Task ImportData(string ReportName)
|
|
|
|
+ {
|
|
|
|
+ CalMonth calMonth = new CalMonth()
|
|
|
|
+ {
|
|
|
|
+ Year = DateTime.Now.AddMonths(-1).Year,
|
|
|
|
+ Month = DateTime.Now.AddMonths(-1).Month,
|
|
|
|
+ Status = 0
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ var temCalMonth = spDb.CalMonths.Where<CalMonth>(x => x.Year == calMonth.Year && x.Month == calMonth.Month).FirstOrDefault();
|
|
|
|
+
|
|
|
|
+ if (temCalMonth != null)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ var iCount = spDb.PerformanceItems.Where<PerformanceItem>(p => p.CalMonthId == temCalMonth.Id).Count<PerformanceItem>();
|
|
|
|
+
|
|
|
|
+ calMonth = temCalMonth;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ spDb.CalMonths.Add(calMonth);
|
|
|
|
+ spDb.SaveChanges();
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ switch (ReportName)
|
|
|
|
+ {
|
|
|
|
+ case "每月绩效统计--发客户超过一个月未完成案件":
|
|
|
|
+ DownloadReport_SQL(ReportName, calMonth, false);
|
|
|
|
+ break;
|
|
|
|
+ case "每月绩效统计--上个月递交完成案件":
|
|
|
|
+ DownloadReport_SQL(ReportName, calMonth, true);
|
|
|
|
+ break;
|
|
|
|
+ case "每月绩效统计--中国一次OA授权表":
|
|
|
|
+ DownloadReport_SQL(ReportName, calMonth, true, true);
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ DownloadReport_SQL(ReportName, calMonth, false);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return Task.CompletedTask;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
public Task ImportData(int i)
|
|
public Task ImportData(int i)
|
|
{
|
|
{
|
|
CalMonth calMonth = new CalMonth()
|
|
CalMonth calMonth = new CalMonth()
|
|
@@ -155,6 +202,9 @@ namespace wispro.sp.api.Job
|
|
DownloadReport_SQL("每月绩效统计--中国一次OA授权表", calMonth, true, true);
|
|
DownloadReport_SQL("每月绩效统计--中国一次OA授权表", calMonth, true, true);
|
|
//DownloadReport("每月绩效统计--中国一次OA授权表", calMonth, true,true);
|
|
//DownloadReport("每月绩效统计--中国一次OA授权表", calMonth, true,true);
|
|
|
|
|
|
|
|
+ //新申请返稿超2个月未定稿
|
|
|
|
+ ImportData("新申请返稿超2个月未定稿");
|
|
|
|
+
|
|
return Task.CompletedTask;
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|
|
|
|
|