Parcourir la source

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

新疆警官学校中职
ndbs il y a 1 an
Parent
révision
8eec60cc44
1 fichiers modifiés avec 28 ajouts et 18 suppressions
  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 Voir le fichier

@@ -373,7 +373,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
@@ -399,6 +400,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)");

@@ -415,7 +419,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))
@@ -428,16 +432,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)
@@ -588,11 +592,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
");
@@ -611,7 +621,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))
{
@@ -627,10 +637,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;
}


Chargement…
Annuler
Enregistrer