Sfoglia il codice sorgente

【修改】加签页面:部门跟人员调整为可多选;审核页面:加签按钮调整为转审按钮;

西昌缴费二期
dyy 3 anni fa
parent
commit
aa8125a381
7 ha cambiato i file con 246 aggiunte e 9 eliminazioni
  1. +13
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs
  2. +16
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs
  3. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.cshtml
  4. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js
  5. +7
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignFlowForm.js
  6. +197
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs
  7. +10
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessIBLL.cs

+ 13
- 2
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs Vedi File

@@ -599,8 +599,19 @@ namespace Learun.Application.Organization
{
try
{
var ids = departmentId.Split(',');
return this.BaseRepository().FindList<UserEntity>(a => ids.Contains(a.F_DepartmentId)).ToList();
if (string.IsNullOrEmpty(departmentId))
{
return new List<UserEntity>();
}
if (departmentId.IndexOf(',') == -1)
{
return this.BaseRepository().FindList<UserEntity>(a => a.F_DepartmentId == departmentId && a.F_DeleteMark == 0).ToList();
}
else
{
var ids = departmentId.Split(',');
return this.BaseRepository().FindList<UserEntity>(a => ids.Contains(a.F_DepartmentId) && a.F_DeleteMark == 0).ToList();
}
}
catch (Exception ex)
{


+ 16
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs Vedi File

@@ -705,6 +705,22 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
return Success("流程加签成功");
}
/// <summary>
/// 流程加签
/// </summary>
/// <param name="processId">流程进程主键</param>
/// <param name="taskId">流程任务主键</param>
/// <param name="userId">加签人员(可多人)</param>
/// <param name="des">加签说明</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult SignFlowTwo(string processId, string taskId, string userId, string des)
{
UserInfo userInfo = LoginUserInfo.Get();
nWFProcessIBLL.SignFlowTwo(processId, taskId, userId, des, userInfo);
return Success("流程加签成功");
}
/// <summary>
/// 流程加签审核
/// </summary>
/// <param name="operationCode">审核操作码</param>


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.cshtml Vedi File

@@ -80,7 +80,7 @@
<div class="col-xs-12 flow-btn">
<a id="release" class="btn btn-success">创建流程</a>
<a id="savedraft" class="btn btn-default">保存草稿</a>
<a id="sign" class="btn btn-info">加签</a>
<a id="sign" class="btn btn-info">转审</a>
<a id="confirm" class="btn btn-info">确认阅读</a>
</div>
<div class="col-xs-12 tab-flow-audit">


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js Vedi File

@@ -785,7 +785,7 @@ var bootstrap = function ($, learun) {
processId: nwflow.processId,
taskId: nwflow.taskId
};
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/SignFlow', postData, function (data) {
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/SignFlowTwo', postData, function (data) {
learun.loading(false);
if (data) {
//learun.frameTab.parentIframe().refreshGirdData();
@@ -936,7 +936,7 @@ var bootstrap = function ($, learun) {
processId: nwflow.processId,
taskId: nwflow.taskId
};
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/SignFlow', postData, function (data) {
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/SignFlowTwo', postData, function (data) {
learun.loading(false);
if (data) {
//learun.frameTab.parentIframe().refreshGirdData();


+ 7
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignFlowForm.js Vedi File

@@ -19,18 +19,21 @@ var bootstrap = function ($, learun) {
maxHeight: 190,
// 是否允许搜索
allowSearch: true,
type: 'multiple',
select: function (item) {
if (item) {
auditorName = item.F_RealName;
}
//if (item) {
// auditorName = item.F_RealName;
//}
}
});
$('#department').lrDepartmentSelect({
type: 'treemultiple',
maxHeight: 220
}).on('change', function () {
var value = $(this).lrselectGet();
//人员列表根据多部门列表查找
$('#auditorId').lrselectRefresh({
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetList',
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentIds',
param: { departmentId: value }
});
});


+ 197
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs Vedi File

@@ -11,6 +11,7 @@ using System.Data;
using Learun.Application.TwoDevelopment.LogisticsManagement;
using Learun.Application.TwoDevelopment.LR_LGManager;
using Newtonsoft.Json;
using System.Linq;

namespace Learun.Application.WorkFlow
{
@@ -2547,6 +2548,202 @@ namespace Learun.Application.WorkFlow
_SendMsg(pTaskMsgList, pNWFIEngine);
_SendMsg(taskMsgList, nWFIEngine);
}
/// <summary>
/// 流程加签
/// </summary>
/// <param name="processId">流程进程主键</param>
/// <param name="taskId">流程任务主键</param>
/// <param name="userId">加签人员(可多人)</param>
/// <param name="des">加签说明</param>
/// <param name="userInfo">当前操作人信息</param>
public void SignFlowTwo(string processId, string taskId, string userId, string des, UserInfo userInfo)
{
// 初始化流程引擎
NWFIEngine nWFIEngine = _Bootstraper("", processId, taskId, userInfo);
NWFEngineParamConfig nWFEngineParamConfig = nWFIEngine.GetConfig();
// 获取任务实体
var taskEntiy = nWFTaskIBLL.GetEntity(taskId);
if (taskEntiy == null)
{
throw (new Exception("找不到对应流程任务!"));
}
if (taskEntiy.F_IsFinished != 0)
{
throw (new Exception("该任务已经结束!"));
}

taskEntiy.F_ModifyDate = DateTime.Now;
taskEntiy.F_ModifyUserId = userInfo.userId;
taskEntiy.F_ModifyUserName = userInfo.realName;
taskEntiy.F_IsFinished = 1;
string taskUserId = userInfo.userId;
// 获取当前任务的执行人列表
List<NWFTaskRelationEntity> taskUserList = (List<NWFTaskRelationEntity>)nWFTaskIBLL.GetTaskUserList(taskId);
bool isMyTask = false;
Dictionary<string, string> taskUserMap = new Dictionary<string, string>();
foreach (var item in taskUserList)
{
if (item.F_UserId == userInfo.userId)
{
isMyTask = true;
}
if (!taskUserMap.ContainsKey(userInfo.userId))
{
taskUserMap.Add(userInfo.userId, "1");
}
}
if (!isMyTask)
{
// 如果是委托任务
List<UserInfo> delegateList = nWFProcessSerive.GetDelegateProcess(userInfo.userId);
foreach (var item in delegateList)
{
if (taskUserMap.ContainsKey(item.userId))
{
taskUserId = item.userId;
}
}
}

//UserEntity userEntity = userIBLL.GetEntityByUserId(userId);
//todo:
List<UserEntity> userEntities = userIBLL.GetListByUserIds(userId);
// 创建任务日志信息
NWFTaskLogEntity nWFTaskLogEntity = new NWFTaskLogEntity()
{
F_ProcessId = processId,
F_OperationCode = "sign",
//F_OperationName = "请求【" + userEntity.F_RealName + "】加签",
//todo:
F_OperationName = "请求【" + string.Join(",", userEntities.Select(x => x.F_RealName).ToArray()) + "】加签",
F_NodeId = taskEntiy.F_NodeId,
F_NodeName = taskEntiy.F_NodeName,
F_PrevNodeId = taskEntiy.F_PrevNodeId,
F_PrevNodeName = taskEntiy.F_PrevNodeName,
F_Des = des,
F_TaskId = taskId,
F_TaskType = 8,
F_CreateUserId = userInfo.userId,
F_CreateUserName = userInfo.realName,
F_TaskUserId = userInfo.userId,
F_TaskUserName = userInfo.realName
};
if (userInfo.userId != taskUserId)
{
// 说明是委托任务
nWFTaskLogEntity.F_TaskUserId = taskUserId;
nWFTaskLogEntity.F_TaskUserName = userIBLL.GetEntityByUserId(taskUserId).F_RealName;
}
nWFTaskLogEntity.Create();
// 给流程发起者一条通知信息
NWFTaskMsgEntity nWFTaskMsgEntity = new NWFTaskMsgEntity()
{
F_ProcessId = nWFEngineParamConfig.ProcessId,
F_FromUserId = nWFEngineParamConfig.CurrentUser.Id,
F_FromUserAccount = nWFEngineParamConfig.CurrentUser.Account,
F_FromUserName = nWFEngineParamConfig.CurrentUser.Name,
F_ToUserId = nWFEngineParamConfig.CreateUser.Id,
F_ToAccount = nWFEngineParamConfig.CreateUser.Account,
F_ToName = nWFEngineParamConfig.CreateUser.Name,
F_Title = nWFEngineParamConfig.SchemeName,
F_Content = "你的流程有状态的更新:" + nWFEngineParamConfig.CurrentUser.Name + "加签",
NodeId = nWFIEngine.GetStartNode().id,
F_NodeName = nWFIEngine.GetStartNode().name
};
nWFTaskMsgEntity.Create();

NWFTaskRelationEntity nWFTaskRelationEntity = taskUserList.Find(t => t.F_UserId == taskUserId);
nWFTaskRelationEntity.F_Time = DateTime.Now;
nWFTaskRelationEntity.F_Result = 4;

// 创建任务
List<NWFTaskEntity> taskList = new List<NWFTaskEntity>();

NWFNodeInfo nodeInfo = nWFIEngine.GetNode(taskEntiy.F_NodeId);
NWFTaskEntity nWFTaskEntity = new NWFTaskEntity();
nWFTaskEntity.Create();
nWFTaskEntity.F_ProcessId = nWFEngineParamConfig.ProcessId;
nWFTaskEntity.F_NodeId = taskEntiy.F_NodeId;
nWFTaskEntity.F_NodeName = taskEntiy.F_NodeName;
nWFTaskEntity.F_PrevNodeId = taskEntiy.F_NodeId;
nWFTaskEntity.F_PrevNodeName = taskEntiy.F_NodeName;

nWFTaskEntity.F_CreateUserId = userInfo.userId;
nWFTaskEntity.F_CreateUserName = userInfo.realName;
nWFTaskEntity.F_TimeoutAction = taskEntiy.F_TimeoutAction;
nWFTaskEntity.F_TimeoutInterval = taskEntiy.F_TimeoutInterval;
nWFTaskEntity.F_TimeoutNotice = taskEntiy.F_TimeoutNotice;
nWFTaskEntity.F_TimeoutStrategy = taskEntiy.F_TimeoutStrategy;
nWFTaskEntity.nWFUserInfoList = new List<NWFUserInfo>();

//nWFTaskEntity.nWFUserInfoList.Add(new NWFUserInfo()
//{
// Id = userId,
// Account = userEntity.F_Account,
// Name = userEntity.F_RealName
//});
//todo:
foreach (var userItem in userEntities)
{
nWFTaskEntity.nWFUserInfoList.Add(new NWFUserInfo()
{
Id = userItem.F_UserId,
Account = userItem.F_Account,
Name = userItem.F_RealName
});
}

nWFTaskEntity.F_Type = 3;

if (string.IsNullOrEmpty(taskEntiy.F_FirstUserId))
{
nWFTaskEntity.F_FirstUserId = taskUserId;
}
else
{
nWFTaskEntity.F_FirstUserId = taskEntiy.F_FirstUserId;
}

taskList.Add(nWFTaskEntity);
// 创建任务消息
List<NWFTaskMsgEntity> taskMsgList = _CreateTaskMsg(taskList, nWFEngineParamConfig);

List<NWFTaskMsgEntity> pTaskMsgList = new List<NWFTaskMsgEntity>();
NWFEngineParamConfig pNWFEngineParamConfig = null;
NWFIEngine pNWFIEngine = null;

if (nWFEngineParamConfig.IsChild == 1)
{
pNWFIEngine = _Bootstraper("", nWFEngineParamConfig.ParentProcessId, nWFEngineParamConfig.ParentTaskId, userInfo);
pNWFEngineParamConfig = pNWFIEngine.GetConfig();
// 获取父级流程
nWFTaskMsgEntity.F_ToUserId = pNWFEngineParamConfig.CreateUser.Id;
nWFTaskMsgEntity.F_ToName = pNWFEngineParamConfig.CreateUser.Name;
nWFTaskMsgEntity.F_ToAccount = pNWFEngineParamConfig.CreateUser.Account;
nWFTaskMsgEntity.F_Title = pNWFEngineParamConfig.SchemeName;
nWFTaskMsgEntity.F_Content = "你的流程【子流程:" + nWFEngineParamConfig.SchemeName + "】有状态的更新:" + nWFEngineParamConfig.CurrentUser.Name + "加签";
nWFTaskMsgEntity.NodeId = pNWFIEngine.GetStartNode().id;
nWFTaskMsgEntity.F_NodeName = pNWFIEngine.GetStartNode().name;

pTaskMsgList.Add(nWFTaskMsgEntity);
}
else
{
taskMsgList.Add(nWFTaskMsgEntity);
}
// 保存流程进程信息
NWFProcessEntity nWFProcessEntity = new NWFProcessEntity()
{
F_Id = nWFEngineParamConfig.ProcessId,
F_IsStart = 1
};
nWFProcessSerive.Save(nWFTaskLogEntity, nWFTaskRelationEntity, taskEntiy, nWFProcessEntity, null, null, taskList, taskMsgList);

// 触发消息
_SendMsg(pTaskMsgList, pNWFIEngine);
_SendMsg(taskMsgList, nWFIEngine);
}

/// <summary>
/// 流程加签审核
/// </summary>


+ 10
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessIBLL.cs Vedi File

@@ -209,6 +209,16 @@ namespace Learun.Application.WorkFlow
/// <param name="des">加签说明</param>
/// <param name="userInfo">当前操作人信息</param>
void SignFlow(string processId, string taskId, string userId, string des, UserInfo userInfo);
/// <summary>
/// 流程加签
/// </summary>
/// <param name="processId">流程进程主键</param>
/// <param name="taskId">流程任务主键</param>
/// <param name="userId">加签人员(可多人)</param>
/// <param name="des">加签说明</param>
/// <param name="userInfo">当前操作人信息</param>
void SignFlowTwo(string processId, string taskId, string userId, string des, UserInfo userInfo);

/// <summary>
/// 流程加签审核
/// </summary>


Caricamento…
Annulla
Salva