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