浏览代码

流程任务与流程监控 显示创建人的部门

新疆警官学校中职
ndbs 1年前
父节点
当前提交
ade8bfa376
共有 4 个文件被更改,包括 62 次插入9 次删除
  1. +12
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js
  2. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndex.js
  3. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessEntity.cs
  4. +34
    -8
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs

+ 12
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js 查看文件

@@ -340,7 +340,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", label: "时间", name: "F_CreateDate", width: 150, align: "left",
formatter: function (cellvalue) { formatter: function (cellvalue) {


+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/MonitorIndex.js 查看文件

@@ -175,6 +175,17 @@ var bootstrap = function ($, learun) {
} }
}, },
{ label: "发起者", name: "F_CreateUserName", width: 80, align: "center" }, { 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", label: "时间", name: "F_CreateDate", width: 150, align: "left",
formatter: function (cellvalue) { formatter: function (cellvalue) {


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessEntity.cs 查看文件

@@ -180,6 +180,11 @@ namespace Learun.Application.WorkFlow
/// </summary> /// </summary>
[NotMapped] [NotMapped]
public bool? LeaderIsAgree { get; set; } public bool? LeaderIsAgree { get; set; }
/// <summary>
/// 流程发起的部门
/// </summary>
[NotMapped]
public string F_DepartmentId { get; set; }
#endregion #endregion
} }
} }

+ 34
- 8
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs 查看文件

@@ -6,6 +6,7 @@ using System.Data;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Learun.Application.TwoDevelopment.LR_LGManager; using Learun.Application.TwoDevelopment.LR_LGManager;
using Learun.Application.Organization;


namespace Learun.Application.WorkFlow namespace Learun.Application.WorkFlow
{ {
@@ -151,11 +152,20 @@ namespace Learun.Application.WorkFlow
} }
expression = expression.And(t => t.F_EnabledMark != 2); expression = expression.And(t => t.F_EnabledMark != 2);
//20221125增加作废不显示liang //20221125增加作废不显示liang
expression = expression.And(t=>t.F_EnabledMark!=3);
expression = expression.And(t => t.F_EnabledMark != 3);
expression = expression.And(t => t.F_IsChild == 0); expression = expression.And(t => t.F_IsChild == 0);


var result = this.BaseRepository().FindList<NWFProcessEntity>(expression, pagination); 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; return result;
} }
@@ -252,7 +262,10 @@ namespace Learun.Application.WorkFlow
item.F_TaskId = this.BaseRepository().FindEntity<NWFTaskEntity>(x => x.F_ProcessId == item.F_Id)?.F_Id; 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_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; 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_") if (item.F_SchemeCode == "LC_Contract_")
{ {
@@ -414,8 +427,18 @@ namespace Learun.Application.WorkFlow
{ {
strSql.Append(" AND t.F_IsBatchAudit = 1 "); 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) catch (Exception ex)
{ {
@@ -604,8 +627,11 @@ namespace Learun.Application.WorkFlow
{ {
item.NextNodeIsAudited = true; 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; return data;
} }
catch (Exception ex) catch (Exception ex)
@@ -1463,8 +1489,8 @@ namespace Learun.Application.WorkFlow
{ {
try try
{ {
var entity= this.BaseRepository().FindEntity<NWFProcessEntity>(t => t.F_Id == processId);
entity.F_EnabledMark =Convert.ToInt32(EnabledMark) ;
var entity = this.BaseRepository().FindEntity<NWFProcessEntity>(t => t.F_Id == processId);
entity.F_EnabledMark = Convert.ToInt32(EnabledMark);
this.BaseRepository().Update(entity); this.BaseRepository().Update(entity);
} }
catch (Exception ex) catch (Exception ex)


正在加载...
取消
保存