Browse Source

流程任务待办和已办添加部门和发起者关键字查询;已办搜索条件报错

新疆影视学院高职^2
ndbs 1 year ago
parent
commit
5637917891
1 changed files with 28 additions and 18 deletions
  1. +28
    -18
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs

+ 28
- 18
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs View File

@@ -591,7 +591,8 @@ namespace Learun.Application.WorkFlow
p.F_ParentProcessId,
p.F_CreateUserId,
p.F_CreateUserName,
p.F_IsStart
p.F_IsStart,
d.F_DepartmentId,d.F_FullName
FROM
(
SELECT
@@ -617,6 +618,9 @@ namespace Learun.Application.WorkFlow
) r
LEFT JOIN LR_NWF_Task t ON t.F_Id = r.F_TaskId
LEFT JOIN LR_NWF_Process p ON p.F_Id = t.F_ProcessId
LEFT JOIN(
SELECT t.F_DepartmentId,t.F_FullName,u.F_RealName,u.F_UserId
FROM LR_Base_Department t left join LR_BASE_USER u on t.F_DepartmentId = u.F_DepartmentId) d ON d.F_UserId=t.F_CreateUserId
WHERE
t.F_IsFinished = 0 AND (p.F_IsFinished = 0 OR t.F_Type = 2 OR t.F_Type = 4 OR t.F_Type = 6)");

@@ -633,7 +637,7 @@ namespace Learun.Application.WorkFlow
if (!queryParam["keyword"].IsEmpty())
{
keyword = "%" + queryParam["keyword"].ToString() + "%";
strSql.Append(" AND ( p.F_Title like @keyword OR p.F_SchemeName like @keyword ) ");
strSql.Append(" AND ( p.F_Title like @keyword OR p.F_SchemeName like @keyword OR p.F_CreateUserName like @keyword OR d.F_FullName like @keyword ) ");
}

if (!string.IsNullOrEmpty(schemeCode))
@@ -646,16 +650,16 @@ namespace Learun.Application.WorkFlow
strSql.Append(" AND t.F_IsBatchAudit = 1 ");
}
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;
}
}
}
//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)
@@ -806,11 +810,17 @@ namespace Learun.Application.WorkFlow
p.F_CreateUserId,
p.F_CreateUserName,
p.F_IsStart,
t.F_NodeId
t.F_NodeId,
d.F_DepartmentId,d.F_FullName
FROM
LR_NWF_Task t
LEFT JOIN LR_NWF_TaskRelation r on r.F_TaskId = t.F_Id
LEFT JOIN LR_NWF_Process p ON t.F_ProcessId = p.F_Id
LEFT JOIN(
SELECT t.F_DepartmentId,t.F_FullName,u.F_RealName,u.F_UserId
FROM LR_Base_Department t
left join LR_BASE_USER u on t.F_DepartmentId = u.F_DepartmentId
) d ON d.F_UserId=t.F_CreateUserId
WHERE
(r.F_Result = 1 OR r.F_Result = 2 OR r.F_Result = 4) AND r.F_UserId = @userId
");
@@ -829,7 +839,7 @@ namespace Learun.Application.WorkFlow
if (!queryParam["keyword"].IsEmpty())
{
keyword = "%" + queryParam["keyword"].ToString() + "%";
strSql.Append(" AND ( p.F_ProcessName like @keyword OR p.F_SchemeName like @keyword ) ");
strSql.Append(" AND ( p.F_Title like @keyword OR p.F_SchemeName like @keyword OR p.F_CreateUserName like @keyword OR p.F_CreateUserName like @keyword OR d.F_FullName like @keyword) ");
}
if (!string.IsNullOrEmpty(schemeCode))
{
@@ -845,10 +855,10 @@ 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;
}
//if (!string.IsNullOrEmpty(item.F_CreateUserName))
//{
// item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId;
//}
}
return data;
}


Loading…
Cancel
Save