From a9fbea8ae70eb4d2598917d616065331a21ad67d Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Thu, 9 Jan 2025 14:36:24 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E6=96=B0=E9=97=BB=E5=85=AC=E5=91=8A=E4=B8=8B=E5=8F=91=EF=BC=8C?= =?UTF-8?q?=E4=B8=8B=E5=8F=91=E5=AE=98=E7=BD=91=E4=BF=AE=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XmlConfig/database.config | 4 +- .../XmlConfig/system.config | 6 +-- .../Learun.Application.OA/News/NewsService.cs | 39 ++++++++++--------- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config index fcac9f60a..a813cc226 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config index f1ede9b8d..2baf08745 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -191,9 +191,9 @@ - + - + - + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs index 62e52d7e1..90f800805 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs @@ -202,20 +202,25 @@ namespace Learun.Application.OA { newEntity.F_Status = "0"; } - } - this.BaseRepository().Update(newEntity); + this.BaseRepository().Update(newEntity); - if (newEntity.IsSend == "1" && status == 2) - { - BaseRepository() - .ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'准备开始run task') "); - Task.Run(async () => { sendNew(newEntity); }); + if (newEntity.IsSend == "1" && status == 2) + { + BaseRepository().ExecuteBySql($"insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson,F_Module,F_OperateTime) VALUES (newid(),2222,'准备开始run task','{newEntity.F_NewsId}','{DateTime.Now}') "); + try + { + Task.Run(async () => { sendNew(newEntity); }); + } + catch (Exception ex) + { + BaseRepository().ExecuteBySql($"insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson,F_Module,F_OperateTime) VALUES (newid(),2222,'run task 报错:{ex.Message}','{newEntity.F_NewsId}','{DateTime.Now}') "); + } + } } + } catch (Exception ex) { - BaseRepository() - .ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'run task 报错"+ex.Message+"') "); if (ex is ExceptionEx) { throw; @@ -242,8 +247,7 @@ namespace Learun.Application.OA string ports = ConfigurationManager.AppSettings["Ports"]; #endregion - BaseRepository() - .ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'准备开始组装实体') "); + BaseRepository().ExecuteBySql($"insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson,F_Module,F_OperateTime) VALUES (newid(),2222,'准备开始组装实体','{newEntity.F_NewsId}','{DateTime.Now}') "); SemdNewList SendNew = new SemdNewList { Title = newEntity.F_FullHead, @@ -259,12 +263,10 @@ namespace Learun.Application.OA { { "X-SS-API-KEY", ApiKey } }; - BaseRepository() - .ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'准备开始post cms') "); + BaseRepository().ExecuteBySql($"insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson,F_Module,F_OperateTime) VALUES (newid(),2222,'准备开始post cms','{newEntity.F_NewsId}','{DateTime.Now}') "); string responses = HttpMethods.HttpPosts("http://" + ports + "/api/v1/contents/" + siteId + "/" + channelId, SendNew.ToJson(), ApiId); - BaseRepository() - .ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'"+HttpUtility.UrlEncode(responses)+"') "); + BaseRepository().ExecuteBySql($"insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson,F_Module,F_OperateTime) VALUES (newid(),2222,'post cms响应结果:{HttpUtility.UrlEncode(responses)}','{newEntity.F_NewsId}','{DateTime.Now}') "); //#region 修改审核状态 //string Nid = JsonConvert.DeserializeObject(responses).value.id; @@ -287,8 +289,7 @@ namespace Learun.Application.OA } catch (Exception ex) { - BaseRepository() - .ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'"+ex.Message + "') "); + BaseRepository().ExecuteBySql($"insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson,F_Module,F_OperateTime) VALUES (newid(),2222,'下发官网异常:{ex.Message}','{newEntity.F_NewsId}','{DateTime.Now}') "); } } @@ -298,10 +299,10 @@ namespace Learun.Application.OA return this.BaseRepository().FindList().Count(); } - public Dictionary GetNewMonthSum() + public Dictionary GetNewMonthSum() { var dt = new DateTime(DateTime.Now.Year, 1, 1); - var ls = this.BaseRepository().FindList(x=>x.F_CreateDate>=dt).Select(x => new { Year = x.F_CreateDate.Value.Year, Month = x.F_CreateDate.Value.Month }).GroupBy(x => new { x.Year, x.Month }).ToDictionary(x => x.Key.Month, a => a.Count()); + var ls = this.BaseRepository().FindList(x => x.F_CreateDate >= dt).Select(x => new { Year = x.F_CreateDate.Value.Year, Month = x.F_CreateDate.Value.Month }).GroupBy(x => new { x.Year, x.Month }).ToDictionary(x => x.Key.Month, a => a.Count()); return ls; } } From ab626519a60ca93ff8b01f88eb78e543c9ee2a06 Mon Sep 17 00:00:00 2001 From: dao Date: Wed, 15 Jan 2025 16:15:17 +0800 Subject: [PATCH 2/4] --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 84ba09487..348891c79 100644 --- a/.gitignore +++ b/.gitignore @@ -83,3 +83,5 @@ Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js /Learun.Framework.Ultimate V7/Learun.Application.Web/Properties/PublishProfiles /Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/QRCode /Learun.Framework.Ultimate V7/Learun.Application.WebApi/logs/ +/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Log/LogInfo +/Learun.Framework.Ultimate V7/Learun.Application.Web/Log/LogInfo/20250106 From 06a377ba3646c19b2d5f05d14fb37de9c305ca62 Mon Sep 17 00:00:00 2001 From: dao Date: Thu, 16 Jan 2025 15:23:38 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=BD=91=E4=B8=8A=E5=8A=9E=E4=BA=8B?= =?UTF-8?q?=E5=A4=A7=E5=8E=85=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/SSOSystemController.cs | 49 ++++++++++++++----- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs index 404049e80..fc75f49da 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs @@ -18,6 +18,7 @@ using Learun.Cache.Factory; using Newtonsoft.Json; using Learun.Application.TwoDevelopment.LR_Desktop; using Learun.Application.TwoDevelopment.PersonnelManagement; +using Learun.Application.WeChat; namespace Learun.Application.Web.Controllers { @@ -58,7 +59,10 @@ namespace Learun.Application.Web.Controllers private StuConsumptionIBLL stuConsumptionIBLL = new StuConsumptionBLL(); private MealCardRunTabIBLL mealCardRunTabIBLL = new MealCardRunTabBLL(); private Sys_UpdateRecordIBLL sys_UpdateRecordIBLL = new Sys_UpdateRecordBLL(); - + /// + /// 标记登录的浏览器 + /// + private string LoginUserMarkKey = "Learun_ADMS_V7_Mark"; #region 统一身份认证3.0 /// /// 退出 @@ -951,6 +955,7 @@ namespace Learun.Application.Web.Controllers { try { + //var user = LoginUserInfo.Get(); string redi = Request.QueryString["redi"]; if (!string.IsNullOrEmpty(redi)) { @@ -966,6 +971,11 @@ namespace Learun.Application.Web.Controllers functionVisitEntity.PDate = DateTime.Now; functionVisitEntity.PUId = userid; var userinfo = userBll.GetEntityByUserId(userid); + var type = 0;//1学生 0教师 + if (userinfo.F_Description == "学生") + { + type = 1; + } functionVisitEntity.PUName = userinfo.F_RealName; if (uplist == null) { @@ -980,22 +990,37 @@ namespace Learun.Application.Web.Controllers { if (!string.IsNullOrEmpty(perfun.FInterfaceUrl)) { - if (!string.IsNullOrEmpty(perfun.UPUserName) && !string.IsNullOrEmpty(perfun.UPPass)) + var url = perfun.FUrl; + var token = OperatorHelper.Instance.AddLoginUser(userinfo.F_Account, "Learun_ADMS_6.1_PC", null);//写入缓存信息 + string loginMark = WebHelper.GetCookie(LoginUserMarkKey).ToString(); + if (url.Contains("?")) { - var user = LoginUserInfo.Get(); - functionVisitEntity.PIsLoginSuccess = true; - functionVisitEntity.PContent = "成功转到统一认证网站:" + perfun.FUrl; - functionVisitIbll.SaveEntity(null, functionVisitEntity); - return Redirect(perfun.FInterfaceUrl + "?u=" + DESEncrypt.Encrypt(DESEncrypt.Encrypt(perfun.UPUserName, secretkey), publickey) + "&p=" + DESEncrypt.Encrypt(DESEncrypt.Encrypt(perfun.UPPass, secretkey), publickey) + "&t=" + DESEncrypt.Encrypt(DESEncrypt.Encrypt(DateTime.Now.ToString("yyyyMMddHHmmss"), secretkey), publickey) + "&ip=" + DESEncrypt.Encrypt(DESEncrypt.Encrypt(GetIP(), secretkey), publickey)+"&m=" + DESEncrypt.Encrypt(user.loginMark) + "&t=" + DESEncrypt.Encrypt(user.token)); + url += "&appkey=" + Md5Helper.Encrypt(Util.DESEncrypt.Decrypt(perfun.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), 32) + "&name=" + DESEncrypt.Encrypt(userinfo.F_RealName, Util.DESEncrypt.Decrypt(perfun.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&no=" + DESEncrypt.Encrypt(userinfo.F_IdentityCardNo, Util.DESEncrypt.Decrypt(perfun.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&acc=" + DESEncrypt.Encrypt(userinfo.F_EnCode, Util.DESEncrypt.Decrypt(perfun.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&type=" + type + "&m=" + DESEncrypt.Encrypt(loginMark) + "&t=" + DESEncrypt.Encrypt(token); } else { - functionVisitEntity.PIsLoginSuccess = false; - functionVisitEntity.PContent = "用户未配置转到用户名密码配置页面"; - functionVisitIbll.SaveEntity(null, functionVisitEntity); - //用户未配置转到用户名密码配置页面 - return Redirect("/SSOSystem/FirstLogin?sysid=" + sysid + "&openid=" + openid); + url += "?appkey=" + Md5Helper.Encrypt(Util.DESEncrypt.Decrypt(perfun.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), 32) + "&name=" + DESEncrypt.Encrypt(userinfo.F_RealName, Util.DESEncrypt.Decrypt(perfun.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&no=" + DESEncrypt.Encrypt(userinfo.F_IdentityCardNo, Util.DESEncrypt.Decrypt(perfun.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&acc=" + DESEncrypt.Encrypt(userinfo.F_EnCode, Util.DESEncrypt.Decrypt(perfun.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&type=" + type + "&m=" + DESEncrypt.Encrypt(loginMark) + "&t=" + DESEncrypt.Encrypt(token); } + return Redirect(url); + + + //if (!string.IsNullOrEmpty(perfun.UPUserName) && !string.IsNullOrEmpty(perfun.UPPass)) + //{ + // var token = OperatorHelper.Instance.AddLoginUser(userinfo.F_Account, "Learun_ADMS_6.1_PC", null);//写入缓存信息 + // string loginMark = WebHelper.GetCookie(LoginUserMarkKey).ToString(); + // functionVisitEntity.PIsLoginSuccess = true; + // functionVisitEntity.PContent = "成功转到统一认证网站:" + perfun.FUrl; + // functionVisitIbll.SaveEntity(null, functionVisitEntity); + // //return Redirect(perfun.FInterfaceUrl + "?u=" + DESEncrypt.Encrypt(DESEncrypt.Encrypt(perfun.UPUserName, secretkey), publickey) + "&p=" + DESEncrypt.Encrypt(DESEncrypt.Encrypt(perfun.UPPass, secretkey), publickey) + "&t=" + DESEncrypt.Encrypt(DESEncrypt.Encrypt(DateTime.Now.ToString("yyyyMMddHHmmss"), secretkey), publickey) + "&ip=" + DESEncrypt.Encrypt(DESEncrypt.Encrypt(GetIP(), secretkey), publickey)+"&m=" + DESEncrypt.Encrypt(loginMark) + "&t=" + DESEncrypt.Encrypt(token)); + //} + //else + //{ + // functionVisitEntity.PIsLoginSuccess = false; + // functionVisitEntity.PContent = "用户未配置转到用户名密码配置页面"; + // functionVisitIbll.SaveEntity(null, functionVisitEntity); + // //用户未配置转到用户名密码配置页面 + // return Redirect("/SSOSystem/FirstLogin?sysid=" + sysid + "&openid=" + openid); + //} } else { From e85352350619a34b38fa472637a630330d8fd8c1 Mon Sep 17 00:00:00 2001 From: yxq Date: Sat, 18 Jan 2025 17:16:53 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=91=A8=E5=B7=A5=E4=BD=9C=E8=AE=A1?= =?UTF-8?q?=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/pages.json | 13 + .../departmentWeek/list.vue | 394 ++++++++++++++++++ .../departmentWeek/single.vue | 285 +++++++++++++ .../LearunApp-2.2.0/pages/home.vue | 2 + 4 files changed, 694 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/departmentWeek/list.vue create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/departmentWeek/single.vue diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json index b2adace95..c5388f6f2 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json @@ -1295,6 +1295,19 @@ "style": { "navigationBarTitleText": "信息化办公设备" } + }, + // 部门周计划 + { + "path": "pages/EducationalAdministration/departmentWeek/list", + "style": { + "navigationBarTitleText": "部门周计划" + } + }, + { + "path": "pages/EducationalAdministration/departmentWeek/single", + "style": { + "navigationBarTitleText": "部门周计划" + } } ], diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/departmentWeek/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/departmentWeek/list.vue new file mode 100644 index 000000000..a402937f4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/departmentWeek/list.vue @@ -0,0 +1,394 @@ + + + + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/departmentWeek/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/departmentWeek/single.vue new file mode 100644 index 000000000..47be34c2e --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/departmentWeek/single.vue @@ -0,0 +1,285 @@ + + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue index ede9c56b1..35aee272c 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue @@ -611,6 +611,8 @@ export default { let categoryId = null; if (titleName == "待办事项") { this.NAV_TO("/pages/nworkflow/myflow/list", {tab:1}, true); + }else if (titleName == "周工作计划") { + this.NAV_TO("/pages/EducationalAdministration/departmentWeek/list",{Status:3}); }else{ if(titleName == "通知公告")categoryId= 1; if(titleName == "校园新闻")categoryId= 2;