|
|
|
@ -8,7 +8,6 @@ using DS.WMS.Core.Flow.Interface;
|
|
|
|
|
using DS.WMS.Core.Sys.Entity;
|
|
|
|
|
using DS.WMS.Core.Sys.Interface;
|
|
|
|
|
using Mapster;
|
|
|
|
|
using MathNet.Numerics.Distributions;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using SqlSugar;
|
|
|
|
@ -152,7 +151,8 @@ public class FlowInstanceService : IFlowInstanceService
|
|
|
|
|
Content = "【创建】"
|
|
|
|
|
+ userInfo.UserName
|
|
|
|
|
+ "创建了一个流程进程【"
|
|
|
|
|
+ instance.CustomName + "】"
|
|
|
|
|
+ instance.CustomName + "】",
|
|
|
|
|
UserName = userInfo.UserName
|
|
|
|
|
};
|
|
|
|
|
db.Insertable(history).ExecuteCommand();
|
|
|
|
|
// var info = db.Queryable<FlowInstance>().Where(x => x.Id == req.Id).First();
|
|
|
|
@ -208,13 +208,13 @@ public class FlowInstanceService : IFlowInstanceService
|
|
|
|
|
instance.Content = JsonConvert.SerializeObject(wfruntime.ToFlowRoot(), Formatting.None, serializerSettings);
|
|
|
|
|
db.Updateable(instance).ExecuteCommand();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var userInfo = db.Queryable<SysUser>().First(x => x.Id == long.Parse(user.UserId));
|
|
|
|
|
var history = new FlowInstanceHistory
|
|
|
|
|
{
|
|
|
|
|
InstanceId = instance.Id,
|
|
|
|
|
Content = $"【撤销】由{userInfo.UserName}撤销,备注:{req.Note}"
|
|
|
|
|
Content = $"【撤销】由{userInfo.UserName}撤销,备注:{req.Note}",
|
|
|
|
|
Result = -1,
|
|
|
|
|
UserName = userInfo.UserName
|
|
|
|
|
};
|
|
|
|
|
db.Insertable(history).ExecuteCommand();
|
|
|
|
|
return DataResult.Successed("撤销成功!", MultiLanguageConst.FlowInstanceCancelSuccess);
|
|
|
|
@ -278,7 +278,8 @@ public class FlowInstanceService : IFlowInstanceService
|
|
|
|
|
var history = new FlowInstanceHistory
|
|
|
|
|
{
|
|
|
|
|
InstanceId = instance.Id,
|
|
|
|
|
Content = $"【启动】由{userInfo.UserName}启动该流程。"
|
|
|
|
|
Content = $"【启动】由{userInfo.UserName}启动该流程。",
|
|
|
|
|
UserName = userInfo.UserName
|
|
|
|
|
};
|
|
|
|
|
db.Insertable(history).ExecuteCommand();
|
|
|
|
|
return DataResult.Successed("更新成功!", MultiLanguageConst.FlowInstanceUpdateSuccess);
|
|
|
|
@ -406,7 +407,10 @@ public class FlowInstanceService : IFlowInstanceService
|
|
|
|
|
Content = "【" + runtime.CurrentNode.Name
|
|
|
|
|
+ "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm")
|
|
|
|
|
+ "】" + (tag.Taged == 1 ? "同意" : "不同意") + ",备注:"
|
|
|
|
|
+ tag.Description
|
|
|
|
|
+ tag.Description,
|
|
|
|
|
UserName = tag.UserName,
|
|
|
|
|
Result = status,
|
|
|
|
|
Note = auditNote
|
|
|
|
|
};
|
|
|
|
|
db.Insertable(history).ExecuteCommand();
|
|
|
|
|
|
|
|
|
@ -499,7 +503,7 @@ public class FlowInstanceService : IFlowInstanceService
|
|
|
|
|
var users = db.Queryable<SysRoleUser>().Where(x =>
|
|
|
|
|
wfruntime.CurrentNode.Roles.Contains(x.RoleId.ToString()))
|
|
|
|
|
.Select(x => x.UserId).Distinct().ToList();
|
|
|
|
|
//makerList = GenericHelper.ArrayToString(users, makerList);
|
|
|
|
|
|
|
|
|
|
makerList = string.Join(',', users);
|
|
|
|
|
}
|
|
|
|
|
else if (wfruntime.CurrentNode.AssigneeType == "user")
|
|
|
|
|