|
@@ -174,7 +174,7 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
//if (withAssigns)
|
|
|
// query = query.Includes(d => d.Assigns);
|
|
|
if (withCountersigns)
|
|
|
- query = query.Includes(d => d.Countersigns);
|
|
|
+ query = query.Includes(d => d.Countersigns, x => x.Members);
|
|
|
if (withSteps)
|
|
|
query = query.Includes(d => d.Steps);
|
|
|
|
|
@@ -1208,6 +1208,13 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
ECounterSignType? counterSignType, DateTime expiredTime, string? parentId = null,
|
|
|
CancellationToken cancellationToken = default)
|
|
|
{
|
|
|
+ var members = handlers.Select(d => new WorkflowCountersignMember
|
|
|
+ {
|
|
|
+ Id = d.Key,
|
|
|
+ Name = d.Value,
|
|
|
+ FlowAssignType = flowAssignType
|
|
|
+ }).ToList();
|
|
|
+
|
|
|
var countersign = new WorkflowCountersign
|
|
|
{
|
|
|
WorkflowId = workflowId,
|
|
@@ -1223,12 +1230,16 @@ namespace Hotline.FlowEngine.Workflows
|
|
|
StarterOrgAreaName = _sessionContext.OrgAreaName,
|
|
|
|
|
|
ParentId = parentId,
|
|
|
- Members = _mapper.Map<List<CountersignMember>>(handlers),
|
|
|
+ Members = members,
|
|
|
FlowAssignType = flowAssignType,
|
|
|
CounterSignType = counterSignType,
|
|
|
ExpiredTime = expiredTime,
|
|
|
};
|
|
|
- await _workflowCountersignRepository.AddAsync(countersign, cancellationToken);
|
|
|
+ //await _workflowCountersignRepository.AddAsync(countersign, cancellationToken);
|
|
|
+
|
|
|
+ await _workflowCountersignRepository.AddNav(countersign)
|
|
|
+ .Include(d => d.Members)
|
|
|
+ .ExecuteCommandAsync();
|
|
|
return countersign;
|
|
|
}
|
|
|
|