@@ -353,7 +353,18 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ label: "发起者", name: "F_CreateUserName", width: 70, align: "center" }, | |||
{ label: "发起者", name: "F_CreateUserName", width: 100, align: "center" }, | |||
{ | |||
label: "发起者部门", name: "F_DepartmentId", width: 120, align: "center", | |||
formatterAsync: function (callback, value, row) { | |||
learun.clientdata.getAsync('department', { | |||
key: value, | |||
callback: function (item) { | |||
callback(item.name); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "时间", name: "F_CreateDate", width: 150, align: "left", | |||
formatter: function (cellvalue) { | |||
@@ -195,6 +195,17 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ label: "发起者", name: "F_CreateUserName", width: 80, align: "center" }, | |||
{ | |||
label: "发起者部门", name: "F_DepartmentId", width: 120, align: "center", | |||
formatterAsync: function (callback, value, row) { | |||
learun.clientdata.getAsync('department', { | |||
key: value, | |||
callback: function (item) { | |||
callback(item.name); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "时间", name: "F_CreateDate", width: 150, align: "left", | |||
formatter: function (cellvalue) { | |||
@@ -13,7 +13,7 @@ namespace Learun.Application.AppMagager | |||
/// 日 期:2018-06-26 10:32 | |||
/// 描 述:我的常用移动应用 | |||
/// </summary> | |||
public class MyFunctionService: RepositoryFactory | |||
public class MyFunctionService : RepositoryFactory | |||
{ | |||
#region 构造函数和属性 | |||
@@ -44,7 +44,7 @@ namespace Learun.Application.AppMagager | |||
strSql.Append("SELECT "); | |||
strSql.Append(fieldSql); | |||
strSql.Append(" FROM LR_App_MyFunction t where t.F_UserId = @userId Order by t.F_Sort "); | |||
return this.BaseRepository().FindList<MyFunctionEntity>(strSql.ToString(),new { userId }); | |||
return this.BaseRepository().FindList<MyFunctionEntity>(strSql.ToString(), new { userId }); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -66,22 +66,30 @@ namespace Learun.Application.AppMagager | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void SaveEntity(string userId,string strFunctionId) | |||
public void SaveEntity(string userId, string strFunctionId) | |||
{ | |||
var db = this.BaseRepository().BeginTrans(); | |||
try | |||
{ | |||
string[] functionIds = strFunctionId.Split(','); | |||
db.Delete<MyFunctionEntity>(t=>t.F_UserId.Equals(userId)); | |||
int num = 0; | |||
foreach (var functionId in functionIds) { | |||
MyFunctionEntity entity = new MyFunctionEntity(); | |||
entity.Create(); | |||
entity.F_UserId = userId; | |||
entity.F_FunctionId = functionId; | |||
entity.F_Sort = num; | |||
db.Insert(entity); | |||
num++; | |||
if (!string.IsNullOrEmpty(strFunctionId)) | |||
{ | |||
string[] functionIds = strFunctionId.Split(','); | |||
db.Delete<MyFunctionEntity>(t => t.F_UserId.Equals(userId)); | |||
int num = 0; | |||
foreach (var functionId in functionIds) | |||
{ | |||
MyFunctionEntity entity = new MyFunctionEntity(); | |||
entity.Create(); | |||
entity.F_UserId = userId; | |||
entity.F_FunctionId = functionId; | |||
entity.F_Sort = num; | |||
db.Insert(entity); | |||
num++; | |||
} | |||
} | |||
else | |||
{ | |||
db.Delete<MyFunctionEntity>(t => t.F_UserId.Equals(userId)); | |||
} | |||
db.Commit(); | |||
} | |||
@@ -180,7 +180,11 @@ namespace Learun.Application.WorkFlow | |||
/// </summary> | |||
[NotMapped] | |||
public bool? LeaderIsAgree { get; set; } | |||
/// <summary> | |||
/// 流程发起的部门 | |||
/// </summary> | |||
[NotMapped] | |||
public string F_DepartmentId { get; set; } | |||
#endregion | |||
} | |||
} |
@@ -6,6 +6,7 @@ using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
using Learun.Application.TwoDevelopment.LR_LGManager; | |||
using Learun.Application.Organization; | |||
using Dapper; | |||
using Learun.Application.Organization; | |||
using System.Collections.Concurrent; | |||
@@ -163,10 +164,21 @@ namespace Learun.Application.WorkFlow | |||
} | |||
} | |||
expression = expression.And(t => t.F_EnabledMark != 2); | |||
//20221125增加作废不显示liang | |||
expression = expression.And(t => t.F_EnabledMark != 3); | |||
expression = expression.And(t => t.F_IsChild == 0); | |||
var result = this.BaseRepository().FindList<NWFProcessEntity>(expression, pagination); | |||
if (result.Count()>0 ) | |||
{ | |||
foreach (var item in result) | |||
{ | |||
if (!string.IsNullOrEmpty(item.F_CreateUserName)) | |||
{ | |||
item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; | |||
} | |||
} | |||
} | |||
return result; | |||
} | |||
@@ -466,7 +478,12 @@ namespace Learun.Application.WorkFlow | |||
foreach (var item in aa) | |||
{ | |||
item.F_TaskId = this.BaseRepository().FindEntity<NWFTaskEntity>(x => x.F_ProcessId == item.F_Id)?.F_Id; | |||
item.F_TaskType = this.BaseRepository().FindEntity<NWFTaskEntity>(x => x.F_ProcessId == item.F_Id)?.F_Type; | |||
item.F_TaskName = this.BaseRepository().FindEntity<NWFTaskEntity>(x => x.F_ProcessId == item.F_Id)?.F_NodeName; | |||
if (!string.IsNullOrEmpty(item.F_CreateUserName)) | |||
{ | |||
item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; | |||
} | |||
//合同流程审批专用 如果第一步校长审批同意的话 可以打印授权委托书 | |||
if (item.F_SchemeCode == "LC_Contract_") | |||
{ | |||
@@ -628,8 +645,18 @@ namespace Learun.Application.WorkFlow | |||
{ | |||
strSql.Append(" AND t.F_IsBatchAudit = 1 "); | |||
} | |||
return this.BaseRepository().FindList<NWFProcessEntity>(strSql.ToString(), new { userId, startTime, endTime, keyword, schemeCode }, pagination); | |||
var data = this.BaseRepository().FindList<NWFProcessEntity>(strSql.ToString(), new { userId, startTime, endTime, keyword, schemeCode }, pagination); | |||
if (data.Count() > 0) | |||
{ | |||
foreach (var item in data) | |||
{ | |||
if (!string.IsNullOrEmpty(item.F_CreateUserName)) | |||
{ | |||
item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; | |||
} | |||
} | |||
} | |||
return data; | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -818,8 +845,11 @@ namespace Learun.Application.WorkFlow | |||
{ | |||
item.NextNodeIsAudited = true; | |||
} | |||
if (!string.IsNullOrEmpty(item.F_CreateUserName)) | |||
{ | |||
item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; | |||
} | |||
} | |||
return data; | |||
} | |||
catch (Exception ex) | |||
@@ -1942,6 +1972,32 @@ namespace Learun.Application.WorkFlow | |||
} | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="processId"></param> | |||
/// <param name="EnabledMark"></param> | |||
public void UpdateEnabledMark(string processId, string EnabledMark) | |||
{ | |||
try | |||
{ | |||
var entity = this.BaseRepository().FindEntity<NWFProcessEntity>(t => t.F_Id == processId); | |||
entity.F_EnabledMark = Convert.ToInt32(EnabledMark); | |||
this.BaseRepository().Update(entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 删除流程进程所有信息(流程撤销) | |||
/// </summary> | |||