浏览代码

零平台对接

枝江中职分支
ndbs 2 天前
父节点
当前提交
17435f5fbe
共有 4 个文件被更改,包括 919 次插入491 次删除
  1. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
  2. +448
    -42
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs
  3. +61
    -51
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml
  4. +409
    -398
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml

+ 1
- 0
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


+ 448
- 42
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();

/// <summary>
/// 标记登录的浏览器
/// </summary>
private string LoginUserMarkKey = "Learun_ADMS_V7_Mark";
#region 统一身份认证3.0
/// <summary>
/// 退出
@@ -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<ZeroResult>(response);

if (todoResult != null && todoResult.code == "200")
{
//totalRows
List<rows> ListTaskrows = new List<rows>();
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<ZeroResult>(response);

if (handleResult != null && handleResult.code == "200")
{
List<rows> ListFinishrows = new List<rows>();
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<ZeroResult>(response);

if (startResult != null && startResult.code == "200")
{
List<rows> ListMyListrows = new List<rows>();
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<ModuleEntity> modulelist = new List<ModuleEntity>();
List<string> 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<ZeroResult>(response);

if (todoResult != null && todoResult.code == "200")
{
//totalRows
List<rows> ListTaskrows = new List<rows>();
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<ZeroResult>(response);

if (handleResult != null && handleResult.code == "200")
{
List<rows> ListFinishrows = new List<rows>();
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<ZeroResult>(response);

if (startResult != null && startResult.code == "200")
{
List<rows> ListMyListrows = new List<rows>();
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<ModuleEntity> modulelist = new List<ModuleEntity>();
List<string> 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> 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> 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
{
/// <summary>
/// 待办
/// </summary>
public int todo { get; set; }
/// <summary>
/// 抄送
/// </summary>
public int cc { get; set; }
/// <summary>
/// 已办
/// </summary>
public int handler { get; set; }
}
/// <summary>
/// 第三方对接传参加密方法
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
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;
}
}
}

+ 61
- 51
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 += '<div class="inSec3Work">'
+ '<div class="inSec3WorkT">' + list[i].F_TaskName+'['+list[i].F_SchemeName+']</div>'
+ '<div class="inSec3WorkTime">' + list[i].F_CreateDate.replace("T", " ").slice(0,19)+'</div>'
+ '<div class="inSec3WorkBtn"><a style="color:#198BE3" href="/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&F_Id=' + list[i].F_Id + '&F_TaskId=' + list[i].F_TaskId + '&F_TaskType=' + list[i].F_TaskType + '" target="_blank">' + getStatus(list[i]) +'</a></div>'
+ '</div>';
//+ '<div class="inSec3WorkT">' + list2[i].F_TaskName + '[' + list2[i].F_SchemeName + ']</div>'
+ '<div class="inSec3WorkT">' + list[i].formName + '</div>'
//+ '<div class="inSec3WorkTime">' + list2[i].F_CreateDate.replace("T", " ").slice(0,19) + '</div>'
+ '<div class="inSec3WorkTime">' + list[i].createTime.replace("T", " ").slice(0, 19) + '</div>'
//+ '<div class="inSec3WorkBtn"><a style="color:#198BE3" href="/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&F_Id=' + list2[i].F_Id + '&F_TaskId=' + list2[i].F_TaskId + '&F_TaskType=' + list2[i].F_TaskType + '" target="_blank">' + getStatus(list2[i]) + '</a></div>'
//+ '</div>';
}
} else {
html += noHtml;
@@ -155,10 +157,12 @@
if (list2.length > 0) {
for (var i = 0; i < list2.length; i++) {
html += '<div class="inSec3Work">'
+ '<div class="inSec3WorkT">' + list2[i].F_TaskName + '[' + list2[i].F_SchemeName + ']</div>'
+ '<div class="inSec3WorkTime">' + list2[i].F_CreateDate.replace("T", " ").slice(0,19) + '</div>'
+ '<div class="inSec3WorkBtn"><a style="color:#198BE3" href="/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&F_Id=' + list2[i].F_Id + '&F_TaskId=' + list2[i].F_TaskId + '&F_TaskType=' + list2[i].F_TaskType + '" target="_blank">' + getStatus(list2[i]) +'</a></div>'
+ '</div>';
//+ '<div class="inSec3WorkT">' + list2[i].F_TaskName + '[' + list2[i].F_SchemeName + ']</div>'
+ '<div class="inSec3WorkT">' + list2[i].formName + '</div>'
//+ '<div class="inSec3WorkTime">' + list2[i].F_CreateDate.replace("T", " ").slice(0,19) + '</div>'
+ '<div class="inSec3WorkTime">' + list2[i].createTime.replace("T", " ").slice(0, 19) + '</div>'
//+ '<div class="inSec3WorkBtn"><a style="color:#198BE3" href="/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&F_Id=' + list2[i].F_Id + '&F_TaskId=' + list2[i].F_TaskId + '&F_TaskType=' + list2[i].F_TaskType + '" target="_blank">' + getStatus(list2[i]) + '</a></div>'
//+ '</div>';
}
} else {
html += noHtml;
@@ -168,10 +172,12 @@
if (list3.length > 0) {
for (var i = 0; i < list3.length; i++) {
html += '<div class="inSec3Work">'
+ '<div class="inSec3WorkT">' + list3[i].F_TaskName + '[' + list3[i].F_SchemeName + ']</div>'
+ '<div class="inSec3WorkTime">' + list3[i].F_CreateDate.replace("T", " ").slice(0,19) + '</div>'
+ '<div class="inSec3WorkBtn"><a style="color:#198BE3" href="/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&F_Id=' + list3[i].F_Id + '&F_TaskId=' + list3[i].F_TaskId + '&F_TaskType=' + list3[i].F_TaskType + '" target="_blank">' + getStatus(list3[i]) +'</a></div>'
+ '</div>';
//+ '<div class="inSec3WorkT">' + list2[i].F_TaskName + '[' + list2[i].F_SchemeName + ']</div>'
+ '<div class="inSec3WorkT">' + list3[i].formName + '</div>'
//+ '<div class="inSec3WorkTime">' + list2[i].F_CreateDate.replace("T", " ").slice(0,19) + '</div>'
+ '<div class="inSec3WorkTime">' + list3[i].createTime.replace("T", " ").slice(0, 19) + '</div>'
//+ '<div class="inSec3WorkBtn"><a style="color:#198BE3" href="/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&F_Id=' + list2[i].F_Id + '&F_TaskId=' + list2[i].F_TaskId + '&F_TaskType=' + list2[i].F_TaskType + '" target="_blank">' + getStatus(list2[i]) + '</a></div>'
//+ '</div>';
}
} else {
html += noHtml;
@@ -324,7 +330,7 @@
html += '</div>'
+ '</div>';
}
html+='</div>'
+'</div>'
+'</div>'
@@ -759,7 +765,7 @@
.searchLi > a > * {
display: inline-block;
vertical-align: middle;
}
}
</style>
<!-- / warpper -->
<div class="warpper">
@@ -785,29 +791,29 @@
</div>
<div class="searchR">
@*<div class="searchTop">
<span>服务角色</span>
<ul class="searchTopList">
<li class="active">全部</li>
<li>校领导</li>
<li>游客</li>
<li>教师</li>
<li>学生</li>
</ul>
</div>
<div class="searchTop">
<span>服务角色</span>
<ul class="searchTopList">
<li class="active">全部</li>
<li>最新应用</li>
<li>常用链接</li>
</ul>
</div>*@
<span>服务角色</span>
<ul class="searchTopList">
<li class="active">全部</li>
<li>校领导</li>
<li>游客</li>
<li>教师</li>
<li>学生</li>
</ul>
</div>
<div class="searchTop">
<span>服务角色</span>
<ul class="searchTopList">
<li class="active">全部</li>
<li>最新应用</li>
<li>常用链接</li>
</ul>
</div>*@
<div class="searchRBox">
@{
var searchModule = ViewBag.SearchModule as List<ModuleEntity>;

<div class="searchRTop">
<b>A-D</b> (<span>@searchModule.Where(x=>"abcd".Contains(x.FirstLetter)).Count()</span>)
<b>A-D</b> (<span>@searchModule.Where(x => "abcd".Contains(x.FirstLetter)).Count()</span>)
</div>
<div class="searchList clearfix">
@{
@@ -982,10 +988,10 @@
<!-- 第二级列表 -->
<ul class="inSec1List2 inSecShadow">
@*<li class="active">
<a href="/Home/Index?autoopen=92a85055-67f2-4a06-902a-f10ec5576d92" target="_blank">
<img src="~/Content/images/DragSSO/inSec1-2.png" alt="" /><span>人事管理系统</span>
</a>
</li>*@
<a href="/Home/Index?autoopen=92a85055-67f2-4a06-902a-f10ec5576d92" target="_blank">
<img src="~/Content/images/DragSSO/inSec1-2.png" alt="" /><span>人事管理系统</span>
</a>
</li>*@
</ul>
<!-- 第二级列表 -->
</div>
@@ -1159,15 +1165,16 @@
<div class="inSec2R inSecShadow">
<div class="inSec3WorkBox">
@{
var TaskListIEnumerable = ViewBag.TaskList as IEnumerable<NWFProcessEntity>;
var TaskListIEnumerable = ViewBag.TaskList as IEnumerable<Learun.Application.Web.Controllers.SSOSystemController.rows>;
if (TaskListIEnumerable.Any())
{
foreach (NWFProcessEntity item in ViewBag.TaskList)
foreach (Learun.Application.Web.Controllers.SSOSystemController.rows item in ViewBag.TaskList)
{
<div class="inSec3Work">
<div class="inSec3WorkT" title="@item.F_TaskName [@item.F_SchemeName]">@item.F_TaskName [@item.F_SchemeName]</div>
<div class="inSec3WorkTime">@item.F_CreateDate</div>
<div class="inSec3WorkBtn"><a style="color:#198BE3" href="/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&F_Id=@item.F_Id&F_TaskId=@item.F_TaskId&F_TaskType=@item.F_TaskType" target="_blank" data-F_IsFinished="@item.F_IsFinished" data-F_EnabledMark="@item.F_EnabledMark"></a></div>
<div class="inSec3WorkT" title="@item.formName ">@item.formName </div>
<div class="inSec3WorkTime">@item.createTime</div>
@*<div class="inSec3WorkBtn"><a style="color:#198BE3" href="/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&F_Id=@item.F_Id&F_TaskId=@item.F_TaskId&F_TaskType=@item.F_TaskType" target="_blank" data-F_IsFinished="@item.F_IsFinished" data-F_EnabledMark="@item.F_EnabledMark"></a></div>*@
<div class="inSec3WorkBtn"><a style="color:#198BE3" href="@item.url"></a></div>
</div>
}
}
@@ -1183,15 +1190,17 @@
</div>
<div class="inSec3WorkBox">
@{
var MyListIEnumerable = ViewBag.MyList as IEnumerable<NWFProcessEntity>;

var MyListIEnumerable = ViewBag.MyList as IEnumerable<Learun.Application.Web.Controllers.SSOSystemController.rows>;
if (MyListIEnumerable.Any())
{
foreach (NWFProcessEntity item in ViewBag.MyList)
foreach (Learun.Application.Web.Controllers.SSOSystemController.rows item in ViewBag.MyList)
{
<div class="inSec3Work">
<div class="inSec3WorkT" title="@item.F_TaskName [@item.F_SchemeName]">@item.F_TaskName [@item.F_SchemeName]</div>
<div class="inSec3WorkTime">@item.F_CreateDate</div>
<div class="inSec3WorkBtn"><a style="color:#198BE3" href="/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&F_Id=@item.F_Id&F_TaskId=@item.F_TaskId&F_TaskType=@item.F_TaskType" target="_blank" data-F_IsFinished="@item.F_IsFinished" data-F_EnabledMark="@item.F_EnabledMark"></a></div>
<div class="inSec3WorkT" title="@item.formName ">@item.formName </div>
<div class="inSec3WorkTime">@item.createTime</div>
@*<div class="inSec3WorkBtn"><a style="color:#198BE3" href="/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&F_Id=@item.F_Id&F_TaskId=@item.F_TaskId&F_TaskType=@item.F_TaskType" target="_blank" data-F_IsFinished="@item.F_IsFinished" data-F_EnabledMark="@item.F_EnabledMark"></a></div>*@
<div class="inSec3WorkBtn"><a style="color:#198BE3" href="@item.url"></a></div>
</div>
}
}
@@ -1207,15 +1216,16 @@
</div>
<div class="inSec3WorkBox">
@{
var FinishTaskListIEnumerable = ViewBag.FinishTaskList as IEnumerable<NWFProcessEntity>;
var FinishTaskListIEnumerable = ViewBag.FinishTaskList as IEnumerable<Learun.Application.Web.Controllers.SSOSystemController.rows>;
if (FinishTaskListIEnumerable.Any())
{
foreach (NWFProcessEntity item in ViewBag.FinishTaskList)
foreach (Learun.Application.Web.Controllers.SSOSystemController.rows item in ViewBag.FinishTaskList)
{
<div class="inSec3Work">
<div class="inSec3WorkT" title="@item.F_TaskName [@item.F_SchemeName]">@item.F_TaskName [@item.F_SchemeName]</div>
<div class="inSec3WorkTime">@item.F_CreateDate</div>
<div class="inSec3WorkBtn"><a style="color:#198BE3" href="/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&F_Id=@item.F_Id&F_TaskId=@item.F_TaskId&F_TaskType=@item.F_TaskType" target="_blank" data-F_IsFinished="@item.F_IsFinished" data-F_EnabledMark="@item.F_EnabledMark"></a></div>
<div class="inSec3WorkT" title="@item.formName ">@item.formName </div>
<div class="inSec3WorkTime">@item.createTime</div>
@*<div class="inSec3WorkBtn"><a style="color:#198BE3" href="/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&F_Id=@item.F_Id&F_TaskId=@item.F_TaskId&F_TaskType=@item.F_TaskType" target="_blank" data-F_IsFinished="@item.F_IsFinished" data-F_EnabledMark="@item.F_EnabledMark"></a></div>*@
<div class="inSec3WorkBtn"><a style="color:#198BE3" href="@item.url"></a></div>
</div>
}
}


+ 409
- 398
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml
文件差异内容过多而无法显示
查看文件


正在加载...
取消
保存