From bacc52be7b206aa8eb9218cd59a37e235ca9f791 Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Wed, 27 Jul 2022 11:51:47 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=B8=88=E8=B5=84=E8=B4=A8=E8=AF=81?=
=?UTF-8?q?=E4=B9=A6=E6=8E=A8=E9=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/DataCollectionController.cs | 11 +++
.../Views/DataCollection/Index.cshtml | 3 +-
.../LR_Desktop/Views/DataCollection/Index.js | 12 +++-
.../DataCollection/DataCollectionBLL.cs | 20 ++++++
.../DataCollection/DataCollectionIBLL.cs | 1 +
.../DataCollection/DataCollectionService.cs | 70 ++++++++++++++++++-
6 files changed, 112 insertions(+), 5 deletions(-)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DataCollectionController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DataCollectionController.cs
index 5ecd8ef1c..97b648ccc 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DataCollectionController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DataCollectionController.cs
@@ -85,6 +85,17 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
dataCollectionIBLL.SyncTeacherTrain();
return Success("操作成功");
}
+ ///
+ /// 教师进修培训数据
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult SyncTeacherQualifications()
+ {
+ dataCollectionIBLL.SyncTeacherQualifications();
+ return Success("操作成功");
+ }
}
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.cshtml
index cdac17bde..39e049103 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.cshtml
@@ -13,7 +13,8 @@
课程信息数据
教材信息数据
排课数据
- 教师进修培训
+ 教师进修培训数据
+ 教师资质证书数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.js
index ce667ca6b..24b173a2b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.js
@@ -72,7 +72,17 @@ var bootstrap = function ($, learun) {
}
});
});
-
+ //教师资质证书数据
+ $('#lr_teacherQualifications').on('click', function () {
+ learun.layerConfirm('是否确认推送教师资质证书数据!', function (res) {
+ if (res) {
+ learun.postForm(top.$.rootUrl + '/LR_Desktop/DataCollection/SyncTeacherQualifications', function () {
+ refreshGirdData();
+ });
+ }
+ });
+ });
+
},
// 初始化列表
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionBLL.cs
index d442f34f7..362de6cf2 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionBLL.cs
@@ -143,5 +143,25 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
+
+ public void SyncTeacherQualifications()
+ {
+ try
+ {
+ dataCollectionService.SyncTeacherQualifications();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
}
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionIBLL.cs
index bc3998567..7e6a89b8b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionIBLL.cs
@@ -11,5 +11,6 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
void SyncTextBook();
void SyncArrangeLessonTerm();
void SyncTeacherTrain();
+ void SyncTeacherQualifications();
}
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs
index 0a0c40281..c24eb19b4 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs
@@ -78,8 +78,8 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
var login_res_str = HttpMethods.Get(login_url);
var login_res = JsonConvert.DeserializeObject(login_res_str);
var login_data = login_res.data;
- _redis.Write($"access_token", ((dynamic)login_data)?.access_token, TimeSpan.FromSeconds(250));
- _redis.Write($"client_secret", ((dynamic)login_data)?.client_secret, TimeSpan.FromSeconds(170000));
+ _redis.Write($"access_token", ((dynamic)login_data)?.access_token, TimeSpan.FromSeconds(200));
+ _redis.Write($"client_secret", ((dynamic)login_data)?.client_secret, TimeSpan.FromSeconds(160000));
_redis.Write($"refresh_token", ((dynamic)login_data)?.refresh_token, TimeSpan.FromSeconds(250));
}
///
@@ -101,7 +101,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
login();
return;
}
- _redis.Write($"access_token", ((dynamic)refresh_res)?.access_token, TimeSpan.FromSeconds(250));
+ _redis.Write($"access_token", ((dynamic)refresh_res)?.access_token, TimeSpan.FromSeconds(200));
_redis.Write($"refresh_token", ((dynamic)refresh_res)?.refresh_token, TimeSpan.FromSeconds(250));
}
///
@@ -494,6 +494,61 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
}
+
+
+ ///
+ /// 教师资质证书
+ ///
+ public void SyncTeacherQualifications()
+ {
+ try
+ {
+ //校区信息
+ var company = this.BaseRepository().FindList(x => x.F_DeleteMark == 0 && x.F_EnabledMark == 1).FirstOrDefault();
+ //教师数据
+ var teacherTrain = this.BaseRepository("CollegeMIS").FindList($@"select min(empid) as gzzyqksjid,count(1) as jszgzrs, sum(case when JobRank in (1,2,3,4) then 1 else 0 end) as gjzcrs,
+sum(case when JobRank in (5,6,7,8) then 1 else 0 end) as zjzcrs,
+sum(case when JobRank not in (1,2,3,4,5,6,7,8) then 1 else 0 end) as cjzcrs
+ from empinfo ");
+
+ ParamModel paramModel = new ParamModel();
+ paramModel.dataObjName = "ods_zzzssj";
+
+ var list = new List