diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs index 6b627d5f8..1d72a80c4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs @@ -107,6 +107,7 @@ namespace Learun.Application.Web.Controllers { url += "?appkey=" + Md5Helper.Encrypt(Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&no=" + DESEncrypt.Encrypt(userinfo.IdentityCardNo, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&acc=" + DESEncrypt.Encrypt(userinfo.enCode, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&type=" + type + "&m=" + DESEncrypt.Encrypt(userinfo.loginMark) + "&t=" + DESEncrypt.Encrypt(userinfo.token); } + Util.Log.LogHelper.Info($"1{url};"); return Redirect(url); } else 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..297941ad9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs @@ -2,22 +2,24 @@ using Learun.Application.OA; using Learun.Application.Organization; using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Application.TwoDevelopment.LR_Desktop; using Learun.Application.TwoDevelopment.Permission; +using Learun.Application.TwoDevelopment.PersonnelManagement; using Learun.Application.WorkFlow; +using Learun.Cache.Base; +using Learun.Cache.Factory; using Learun.Util; using Learun.Util.Operat; - +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Configuration; using System.Linq; +using System.Net.Http; +using System.Security.Cryptography; +using System.Text; using System.Web; using System.Web.Mvc; -using Learun.Cache.Base; -using Learun.Cache.Factory; -using Newtonsoft.Json; -using Learun.Application.TwoDevelopment.LR_Desktop; -using Learun.Application.TwoDevelopment.PersonnelManagement; namespace Learun.Application.Web.Controllers { @@ -58,7 +60,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 /// /// 退出 @@ -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,38 @@ 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); } + Util.Log.LogHelper.Info($"2{url};"); + 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 { @@ -1248,23 +1274,155 @@ namespace Learun.Application.Web.Controllers } ViewBag.NewsListOfzhuanti = newsListOfzhuanti; ViewBag.NewsListOfzhuantiStr = JsonConvert.SerializeObject(ViewBag.NewsListOfzhuanti); + #region 流程 + string Zero = ConfigurationManager.AppSettings["Zero"]; + string URL = ""; + var response = ""; + //接口请求地址 + URL = $"http://{Zero}/api/openapi/task/query/todo?pageNo=1&pageSize=10"; + // 发送POST请求 + response = SendPostRequestAsync(URL); + + var todoResult = JsonConvert.DeserializeObject(response); + + if (todoResult != null && todoResult.code == "200") + { + //totalRows + List ListTaskrows = new List(); + if (todoResult.data.rows.Count() > 0) + { + foreach (var item in todoResult.data.rows) + { + var Taskrowss = new rows(); + Taskrowss.appId = item.appId; + Taskrowss.taskId = item.taskId; + Taskrowss.instanceId = item.instanceId; + Taskrowss.applyName = item.applyName; + Taskrowss.applyId = item.applyId; + Taskrowss.createTime = item.createTime; + Taskrowss.formName = item.formName; + Taskrowss.stage = item.stage; + Taskrowss.url = item.url; + ListTaskrows.Add(item); + } + ViewBag.TaskTotalNum = todoResult.data.totalRows; + ViewBag.TaskListStr = JsonConvert.SerializeObject(ListTaskrows); + ViewBag.TaskList = ViewBag.TaskListStr; + } + else + { + ViewBag.TaskTotalNum = 0; + ViewBag.TaskListStr = JsonConvert.SerializeObject(ListTaskrows); + ViewBag.TaskList = ViewBag.TaskListStr; + } + } + else + { + Util.Log.LogHelper.Info($"请求失败,<待办>发送POST请求失败;"); + } //办公事项-待办任务 paginationobj.sidx = "F_CreateDate"; paginationobj.rows = 4; - var taskListAll = nWFProcessIBLL.GetMyTaskPageList(userInfo, "{}"); - ViewBag.TaskList = nWFProcessIBLL.GetMyTaskPageList(userInfo, paginationobj, "{}"); - ViewBag.TaskListStr = JsonConvert.SerializeObject(ViewBag.TaskList); - ViewBag.TaskTotalNum = taskListAll.Count(); + //var taskListAll = nWFProcessIBLL.GetMyTaskPageList(userInfo, "{}"); + //ViewBag.TaskList = nWFProcessIBLL.GetMyTaskPageList(userInfo, paginationobj, "{}"); + //ViewBag.TaskListStr = JsonConvert.SerializeObject(ViewBag.TaskList); + //ViewBag.TaskTotalNum = taskListAll.Count(); + //办公事项-已办任务 - var finishTaskListAll = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, "{}"); - ViewBag.FinishTaskList = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, paginationobj, "{}"); - ViewBag.FinishTaskListStr = JsonConvert.SerializeObject(ViewBag.FinishTaskList); - ViewBag.FinishTaskTotalNum = finishTaskListAll.Count(); + //var finishTaskListAll = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, "{}"); + //ViewBag.FinishTaskList = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, paginationobj, "{}"); + //ViewBag.FinishTaskListStr = JsonConvert.SerializeObject(ViewBag.FinishTaskList); + //ViewBag.FinishTaskTotalNum = finishTaskListAll.Count(); + + URL = $"http://{Zero}/api/openapi/task/query/handle?pageNo=1&pageSize=10"; + // 发送POST请求 + response = SendPostRequestAsync(URL); + var handleResult = JsonConvert.DeserializeObject(response); + + if (handleResult != null && handleResult.code == "200") + { + List ListFinishrows = new List(); + if (handleResult.data.rows.Count() > 0) + { + foreach (var item in handleResult.data.rows) + { + var Finishrowss = new rows(); + Finishrowss.appId = item.appId; + Finishrowss.taskId = item.taskId; + Finishrowss.instanceId = item.instanceId; + Finishrowss.applyName = item.applyName; + Finishrowss.applyId = item.applyId; + Finishrowss.createTime = item.createTime; + Finishrowss.formName = item.formName; + Finishrowss.stage = item.stage; + Finishrowss.url = item.url; + ListFinishrows.Add(item); + } + ViewBag.FinishTaskTotalNum = handleResult.data.totalRows; + ViewBag.FinishTaskListStr = JsonConvert.SerializeObject(ListFinishrows); + ViewBag.FinishTaskList = ViewBag.FinishTaskListStr; + } + else + { + ViewBag.FinishTaskTotalNum = 0; + ViewBag.FinishTaskListStr = JsonConvert.SerializeObject(ListFinishrows); + ViewBag.FinishTaskList = ViewBag.FinishTaskListStr; + } + //待办条数 + } + else + { + Util.Log.LogHelper.Info($"请求失败,<已办>发送POST请求失败;"); + } + //办公事项-我发起的 - var myListAll = nWFProcessIBLL.GetMyPageList(userInfo.userId, "{}"); - ViewBag.MyList = nWFProcessIBLL.GetMyPageList(userInfo.userId, paginationobj, "{}"); - ViewBag.MyListStr = JsonConvert.SerializeObject(ViewBag.MyList); - ViewBag.MyListTotalNum = myListAll.Count(); + //var myListAll = nWFProcessIBLL.GetMyPageList(userInfo.userId, "{}"); + //ViewBag.MyList = nWFProcessIBLL.GetMyPageList(userInfo.userId, paginationobj, "{}"); + //ViewBag.MyListStr = JsonConvert.SerializeObject(ViewBag.MyList); + //ViewBag.MyListTotalNum = myListAll.Count(); + + URL = $"http://{Zero}/api/openapi/task/query/start?pageNo=1&pageSize=10"; + + // 发送POST请求 + response = SendPostRequestAsync(URL); + var startResult = JsonConvert.DeserializeObject(response); + + if (startResult != null && startResult.code == "200") + { + List ListMyListrows = new List(); + if (startResult.data.rows.Count() > 0) + { + foreach (var item in startResult.data.rows) + { + var MyListrowss = new rows(); + MyListrowss.appId = item.appId; + MyListrowss.taskId = item.taskId; + MyListrowss.instanceId = item.instanceId; + MyListrowss.applyName = item.applyName; + MyListrowss.applyId = item.applyId; + MyListrowss.createTime = item.createTime; + MyListrowss.formName = item.formName; + MyListrowss.stage = item.stage; + MyListrowss.url = item.url; + ListMyListrows.Add(item); + } + ViewBag.MyListTotalNum = startResult.data.totalRows; + ViewBag.MyListStr = JsonConvert.SerializeObject(ListMyListrows); + ViewBag.TaskList = ViewBag.MyListStr; + } + else + { + ViewBag.MyListTotalNum = 0; + ViewBag.MyListStr = JsonConvert.SerializeObject(ListMyListrows); + ViewBag.TaskList = ViewBag.MyListStr; + } + } + else + { + Util.Log.LogHelper.Info($"请求失败,<我发起的>发送POST请求失败;"); + } + + #endregion //常用服务 List modulelist = new List(); List offenused = LogBLL.GetGroupLog(userInfo.userId).Select(m => m.F_Module).Take(20).ToList(); @@ -1593,23 +1751,159 @@ namespace Learun.Application.Web.Controllers } ViewBag.NewsListOfzhuanti = newsListOfzhuanti; ViewBag.NewsListOfzhuantiStr = JsonConvert.SerializeObject(ViewBag.NewsListOfzhuanti); + #region 流程 + string Zero = ConfigurationManager.AppSettings["Zero"]; + string URL = ""; + var response = ""; + //接口请求地址 + URL = $"http://{Zero}/api/openapi/task/query/todo?pageNo=1&pageSize=10"; + // 发送POST请求 + response = SendPostRequestAsync(URL); + + var todoResult = JsonConvert.DeserializeObject(response); + + if (todoResult != null && todoResult.code == "200") + { + //totalRows + List ListTaskrows = new List(); + if (todoResult.data.rows.Count() > 0) + { + foreach (var item in todoResult.data.rows) + { + var Taskrowss = new rows(); + Taskrowss.appId = item.appId; + Taskrowss.taskId = item.taskId; + Taskrowss.instanceId = item.instanceId; + Taskrowss.applyName = item.applyName; + Taskrowss.applyId = item.applyId; + Taskrowss.createTime = item.createTime; + Taskrowss.formName = item.formName; + Taskrowss.stage = item.stage; + Taskrowss.url = item.url; + ListTaskrows.Add(item); + } + ViewBag.TaskTotalNum = todoResult.data.totalRows; + ViewBag.TaskListStr = JsonConvert.SerializeObject(ListTaskrows); + ViewBag.TaskList = ViewBag.TaskListStr; + } + else + { + ViewBag.TaskTotalNum = 0; + ViewBag.TaskListStr = JsonConvert.SerializeObject(ListTaskrows); + ViewBag.TaskList = ViewBag.TaskListStr; + } + + } + else + { + Util.Log.LogHelper.Info($"请求失败,<待办>发送POST请求失败;"); + } //办公事项-待办任务 paginationobj.sidx = "F_CreateDate"; paginationobj.rows = 4; - var taskListAll = nWFProcessIBLL.GetMyTaskPageList(userInfo, "{}"); - ViewBag.TaskList = nWFProcessIBLL.GetMyTaskPageList(userInfo, paginationobj, "{}"); - ViewBag.TaskListStr = JsonConvert.SerializeObject(ViewBag.TaskList); - ViewBag.TaskTotalNum = taskListAll.Count(); + //var taskListAll = nWFProcessIBLL.GetMyTaskPageList(userInfo, "{}"); + //ViewBag.TaskList = nWFProcessIBLL.GetMyTaskPageList(userInfo, paginationobj, "{}"); + //ViewBag.TaskListStr = JsonConvert.SerializeObject(ViewBag.TaskList); + //ViewBag.TaskTotalNum = taskListAll.Count(); + //办公事项-已办任务 - var finishTaskListAll = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, "{}"); - ViewBag.FinishTaskList = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, paginationobj, "{}"); - ViewBag.FinishTaskListStr = JsonConvert.SerializeObject(ViewBag.FinishTaskList); - ViewBag.FinishTaskTotalNum = finishTaskListAll.Count(); + //var finishTaskListAll = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, "{}"); + //ViewBag.FinishTaskList = nWFProcessIBLL.GetMyFinishTaskPageList(userInfo, paginationobj, "{}"); + //ViewBag.FinishTaskListStr = JsonConvert.SerializeObject(ViewBag.FinishTaskList); + //ViewBag.FinishTaskTotalNum = finishTaskListAll.Count(); + + URL = $"http://{Zero}/api/openapi/task/query/handle?pageNo=1&pageSize=10"; + // 发送POST请求 + response = SendPostRequestAsync(URL); + var handleResult = JsonConvert.DeserializeObject(response); + + if (handleResult != null && handleResult.code == "200") + { + List ListFinishrows = new List(); + if (handleResult.data.rows.Count() > 0) + { + foreach (var item in handleResult.data.rows) + { + var Finishrowss = new rows(); + Finishrowss.appId = item.appId; + Finishrowss.taskId = item.taskId; + Finishrowss.instanceId = item.instanceId; + Finishrowss.applyName = item.applyName; + Finishrowss.applyId = item.applyId; + Finishrowss.createTime = item.createTime; + Finishrowss.formName = item.formName; + Finishrowss.stage = item.stage; + Finishrowss.url = item.url; + ListFinishrows.Add(item); + } + //待办条数 + ViewBag.FinishTaskTotalNum = handleResult.data.totalRows; + ViewBag.FinishTaskListStr = JsonConvert.SerializeObject(ListFinishrows); + ViewBag.FinishTaskList = ViewBag.FinishTaskListStr; + } + else + { + //待办条数 + ViewBag.FinishTaskTotalNum = 0; + ViewBag.FinishTaskListStr = JsonConvert.SerializeObject(ListFinishrows); + ViewBag.FinishTaskList = ViewBag.FinishTaskListStr; + } + + } + else + { + Util.Log.LogHelper.Info($"请求失败,<已办>发送POST请求失败;"); + } + //办公事项-我发起的 - var myListAll = nWFProcessIBLL.GetMyPageList(userInfo.userId, "{}"); - ViewBag.MyList = nWFProcessIBLL.GetMyPageList(userInfo.userId, paginationobj, "{}"); - ViewBag.MyListStr = JsonConvert.SerializeObject(ViewBag.MyList); - ViewBag.MyListTotalNum = myListAll.Count(); + //var myListAll = nWFProcessIBLL.GetMyPageList(userInfo.userId, "{}"); + //ViewBag.MyList = nWFProcessIBLL.GetMyPageList(userInfo.userId, paginationobj, "{}"); + //ViewBag.MyListStr = JsonConvert.SerializeObject(ViewBag.MyList); + //ViewBag.MyListTotalNum = myListAll.Count(); + + URL = $"http://{Zero}/api/openapi/task/query/start?pageNo=1&pageSize=10"; + + // 发送POST请求 + response = SendPostRequestAsync(URL); + var startResult = JsonConvert.DeserializeObject(response); + + if (startResult != null && startResult.code == "200") + { + List ListMyListrows = new List(); + if (startResult.data.rows.Count() > 0) + { + foreach (var item in startResult.data.rows) + { + var MyListrowss = new rows(); + MyListrowss.appId = item.appId; + MyListrowss.taskId = item.taskId; + MyListrowss.instanceId = item.instanceId; + MyListrowss.applyName = item.applyName; + MyListrowss.applyId = item.applyId; + MyListrowss.createTime = item.createTime; + MyListrowss.formName = item.formName; + MyListrowss.stage = item.stage; + MyListrowss.url = item.url; + ListMyListrows.Add(item); + } + ViewBag.MyListTotalNum = startResult.data.totalRows; + ViewBag.MyListStr = JsonConvert.SerializeObject(ListMyListrows); + ViewBag.MyList = ViewBag.MyListStr; + } + else + { + ViewBag.MyListTotalNum = 0; + ViewBag.MyListStr = JsonConvert.SerializeObject(ListMyListrows); + ViewBag.MyList = ViewBag.MyListStr; + } + } + else + { + Util.Log.LogHelper.Info($"请求失败,<我发起的>发送POST请求失败;"); + } + + #endregion + //常用服务 List modulelist = new List(); List offenused = LogBLL.GetGroupLog(userInfo.userId).Select(m => m.F_Module).Take(20).ToList(); @@ -2051,5 +2345,117 @@ namespace Learun.Application.Web.Controllers return Success("操作成功"); } + public class ZeroResult + { + public bool? success { get; set; } + public string code { get; set; } + public string message { get; set; } + public Result data { get; set; } + } + public class Result + { + public string pageNo { get; set; } + public string pageSize { get; set; } + public string totalPage { get; set; } + public string totalRows { get; set; } + public List rows { get; set; } + public ranbow ranbow { get; set; } + } + public class rows + { + public string appId { get; set; } + public string taskId { get; set; } + public string instanceId { get; set; } + public string applyName { get; set; } + public string applyId { get; set; } + public DateTime createTime { get; set; } + public string formName { get; set; } + public string stage { get; set; } + public List formData { get; set; } + public string model { get; set; } + public string name { get; set; } + public string value { get; set; } + public string url { get; set; } + + } + public class formData + { + public string model { get; set; } + public string name { get; set; } + public string value { get; set; } + } + public class ranbow + { + + } + public class Countsdata + { + /// + /// 待办 + /// + public int todo { get; set; } + /// + /// 抄送 + /// + public int cc { get; set; } + /// + /// 已办 + /// + public int handler { get; set; } + } + /// + /// 第三方对接传参加密方法 + /// + /// + /// + static string Sha1Hex(string input) + { + using (SHA1Managed sha1 = new SHA1Managed()) + { + byte[] hashBytes = sha1.ComputeHash(Encoding.UTF8.GetBytes(input)); + StringBuilder hexString = new StringBuilder(); + foreach (byte b in hashBytes) + { + hexString.AppendFormat("{0:x2}", b); + } + return hexString.ToString(); + } + } + + static string SendPostRequestAsync(string url) + { + HttpClient Clientnew = new HttpClient(); + string AppName = ConfigurationManager.AppSettings["AppName"]; + string AppKey = ConfigurationManager.AppSettings["AppKey"]; + string Secret = ConfigurationManager.AppSettings["Secret"]; + ///盐 随机数 + Random ran = new Random(); + var Nonce = ran.Next(100000).ToString(); + ///时间戳当前时间 + TimeSpan ts = DateTime.Now - new DateTime(); + DateTime now = DateTime.UtcNow; + DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + TimeSpan span = now - epoch; + long timestamp = (long)span.TotalSeconds; + string CurTime = timestamp.ToString(); + //拼接CheckSum并加密 + string CheckSum = Secret + Nonce + CurTime; + CheckSum = Sha1Hex(CheckSum); + var requestBody = new + { + + account = "cs00123" + //account = userInfo.account + }; + string jsonBody = JsonConvert.SerializeObject(requestBody); + + HttpContent content = new StringContent(jsonBody, Encoding.UTF8, "application/json"); + content.Headers.Add("AppKey", AppKey); + content.Headers.Add("Nonce", Nonce); + content.Headers.Add("CurTime", CurTime); + content.Headers.Add("CheckSum", CheckSum); + var response = Clientnew.PostAsync(url, content).Result.Content.ReadAsStringAsync().Result; + return response; + } } } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml index c3c2737c8..98e8ea8c7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml @@ -142,10 +142,12 @@ if (list.length > 0) { for (var i = 0; i < list.length; i++) { html += '
' - + '
' + list[i].F_TaskName+'['+list[i].F_SchemeName+']
' - + '
' + list[i].F_CreateDate.replace("T", " ").slice(0,19)+'
' - + '' - + '
'; + //+ '
' + list2[i].F_TaskName + '[' + list2[i].F_SchemeName + ']
' + + '
' + list[i].formName + '
' + //+ '
' + list2[i].F_CreateDate.replace("T", " ").slice(0,19) + '
' + + '
' + list[i].createTime.replace("T", " ").slice(0, 19) + '
' + //+ '' + //+ ''; } } else { html += noHtml; @@ -155,10 +157,12 @@ if (list2.length > 0) { for (var i = 0; i < list2.length; i++) { html += '
' - + '
' + list2[i].F_TaskName + '[' + list2[i].F_SchemeName + ']
' - + '
' + list2[i].F_CreateDate.replace("T", " ").slice(0,19) + '
' - + '' - + '
'; + //+ '
' + list2[i].F_TaskName + '[' + list2[i].F_SchemeName + ']
' + + '
' + list2[i].formName + '
' + //+ '
' + list2[i].F_CreateDate.replace("T", " ").slice(0,19) + '
' + + '
' + list2[i].createTime.replace("T", " ").slice(0, 19) + '
' + //+ '' + //+ ''; } } else { html += noHtml; @@ -168,10 +172,12 @@ if (list3.length > 0) { for (var i = 0; i < list3.length; i++) { html += '
' - + '
' + list3[i].F_TaskName + '[' + list3[i].F_SchemeName + ']
' - + '
' + list3[i].F_CreateDate.replace("T", " ").slice(0,19) + '
' - + '' - + '
'; + //+ '
' + list2[i].F_TaskName + '[' + list2[i].F_SchemeName + ']
' + + '
' + list3[i].formName + '
' + //+ '
' + list2[i].F_CreateDate.replace("T", " ").slice(0,19) + '
' + + '
' + list3[i].createTime.replace("T", " ").slice(0, 19) + '
' + //+ '' + //+ ''; } } else { html += noHtml; @@ -324,7 +330,7 @@ html += '' + ''; } - + html+='' +'' +'' @@ -759,7 +765,7 @@ .searchLi > a > * { display: inline-block; vertical-align: middle; - } + }
@@ -785,29 +791,29 @@
@*
- 服务角色 -
    -
  • 全部
  • -
  • 校领导
  • -
  • 游客
  • -
  • 教师
  • -
  • 学生
  • -
-
-
- 服务角色 -
    -
  • 全部
  • -
  • 最新应用
  • -
  • 常用链接
  • -
-
*@ + 服务角色 +
    +
  • 全部
  • +
  • 校领导
  • +
  • 游客
  • +
  • 教师
  • +
  • 学生
  • +
+
+
+ 服务角色 +
    +
  • 全部
  • +
  • 最新应用
  • +
  • 常用链接
  • +
+
*@
@{ var searchModule = ViewBag.SearchModule as List;
- A-D (@searchModule.Where(x=>"abcd".Contains(x.FirstLetter)).Count()) + A-D (@searchModule.Where(x => "abcd".Contains(x.FirstLetter)).Count())
@{ @@ -982,10 +988,10 @@
@@ -1159,15 +1165,16 @@
@{ - var TaskListIEnumerable = ViewBag.TaskList as IEnumerable; + var TaskListIEnumerable = ViewBag.TaskList as IEnumerable; if (TaskListIEnumerable.Any()) { - foreach (NWFProcessEntity item in ViewBag.TaskList) + foreach (Learun.Application.Web.Controllers.SSOSystemController.rows item in ViewBag.TaskList) {
-
@item.F_TaskName [@item.F_SchemeName]
-
@item.F_CreateDate
-
+
@item.formName
+
@item.createTime
+ @*
*@ +
} } @@ -1183,15 +1190,17 @@
@{ - var MyListIEnumerable = ViewBag.MyList as IEnumerable; + + var MyListIEnumerable = ViewBag.MyList as IEnumerable; if (MyListIEnumerable.Any()) { - foreach (NWFProcessEntity item in ViewBag.MyList) + foreach (Learun.Application.Web.Controllers.SSOSystemController.rows item in ViewBag.MyList) {
-
@item.F_TaskName [@item.F_SchemeName]
-
@item.F_CreateDate
-
+
@item.formName
+
@item.createTime
+ @*
*@ +
} } @@ -1207,15 +1216,16 @@
@{ - var FinishTaskListIEnumerable = ViewBag.FinishTaskList as IEnumerable; + var FinishTaskListIEnumerable = ViewBag.FinishTaskList as IEnumerable; if (FinishTaskListIEnumerable.Any()) { - foreach (NWFProcessEntity item in ViewBag.FinishTaskList) + foreach (Learun.Application.Web.Controllers.SSOSystemController.rows item in ViewBag.FinishTaskList) {
-
@item.F_TaskName [@item.F_SchemeName]
-
@item.F_CreateDate
-
+
@item.formName
+
@item.createTime
+ @*
*@ +
} } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml index bfb405687..520a56dc9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml @@ -8,8 +8,10 @@ @{ - ViewBag.Title = "网上办事大厅拖拽版"; - Layout = "~/Views/SSOSystem/_LayoutSSODrag.cshtml"; + /**/ + + ViewBag.Title = "网上办事大厅拖拽版"; + Layout = "~/Views/SSOSystem/_LayoutSSODrag.cshtml"; } @@ -17,10 +19,10 @@
@@ -784,21 +795,21 @@ @*
服务角色
    -
  • 全部
  • -
  • 校领导
  • -
  • 游客
  • -
  • 教师
  • -
  • 学生
  • +
  • 全部
  • +
  • 校领导
  • +
  • 游客
  • +
  • 教师
  • +
  • 学生
-
-
+
+
服务角色
    -
  • 全部
  • -
  • 最新应用
  • -
  • 常用链接
  • +
  • 全部
  • +
  • 最新应用
  • +
  • 常用链接
-
*@ +
*@
@{ var searchModule = ViewBag.SearchModule as List; @@ -980,9 +991,9 @@
@@ -1222,7 +1233,7 @@ @if (string.IsNullOrEmpty(desktopItem.CardSort)) { } else @@ -1233,69 +1244,69 @@ { case "card1": break; case "card2": break; case "card3": break; case "card4": break; case "card5": break; case "card6": break; case "card7": break; case "card8": break; case "card9": break; case "card10": break; case "card11": break; case "card12": break; case "card13": break; default: @@ -1310,69 +1321,69 @@ { case "card1": break; case "card2": break; case "card3": break; case "card4": break; case "card5": break; case "card6": break; case "card7": break; case "card8": break; case "card9": break; case "card10": break; case "card11": break; case "card12": break; case "card13": break; default: @@ -1404,7 +1415,7 @@
-
@item.DesktopName@(item.DefaultFlag == "1" ? "(默认桌面)" : "")
+
@@( )
8/8 @@ -1412,7 +1423,7 @@
- @(item.DefaultFlag == "1" ? "确认恢复默认设置?" : "确认删除该桌面?") + @( )
@@ -1606,24 +1617,24 @@ })