|
@@ -2507,7 +2507,10 @@ public class OrderController : BaseController
|
|
|
|
|
|
var (total, items) = await _orderApplication.MayScreenList(dto)
|
|
|
.ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
- return new PagedDto<OrderVisitDetailDto>(total, _mapper.Map<IReadOnlyList<OrderVisitDetailDto>>(items));
|
|
|
+ var data = _mapper.Map<List<OrderVisitDetailDto>>(items);
|
|
|
+ var isAdmin = _orderDomainService.IsCheckAdmin();
|
|
|
+ data.ForEach(d => d.IsShowOperate = isAdmin == true || (d.VisitOrgCode == _sessionContext.OrgId));
|
|
|
+ return new PagedDto<OrderVisitDetailDto>(total, data);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -3963,33 +3966,6 @@ public class OrderController : BaseController
|
|
|
return _sessionContext.OrgIsCenter ? dto : dto.DataMask();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// 上传附件
|
|
|
- /// </summary>
|
|
|
- /// <param name="dto"></param>
|
|
|
- /// <returns></returns>
|
|
|
- //[HttpPost]
|
|
|
- //[LogFilterAlpha("上传附件")]
|
|
|
- //public async Task UploadFiles(OrderUploadFiles dto) {
|
|
|
-
|
|
|
- // var fileJson = await _fileRepository.AddFileAsync(dto.Files, dto.Id, "", HttpContext.RequestAborted);
|
|
|
-
|
|
|
- // if (fileJson.Any())
|
|
|
- // {
|
|
|
- // var order = await _orderRepository.GetAsync(dto.Id);
|
|
|
- // if (order.FileJson != null && order.FileJson.Any())
|
|
|
- // {
|
|
|
- // order.FileJson.AddRange(fileJson);
|
|
|
- // }
|
|
|
- // else {
|
|
|
- // order.FileJson = fileJson;
|
|
|
- // }
|
|
|
- // await _orderRepository.Updateable().SetColumns(x => new Order { FileJson = order.FileJson }).Where(x => x.Id == dto.Id).ExecuteCommandAsync();
|
|
|
- // }
|
|
|
- //}
|
|
|
-
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 新增工单
|
|
|
/// </summary>
|
|
@@ -4739,8 +4715,10 @@ public class OrderController : BaseController
|
|
|
// }).Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
}
|
|
|
|
|
|
- var (_, currentStep, _, _) = await _workflowDomainService.NextAsync(_sessionContext, nextDto, order.ExpiredTime,
|
|
|
- isAutoFillSummaryOpinion, cancellationToken: cancellationToken);
|
|
|
+ var (_, currentStep, _, _) = await _workflowDomainService.NextAsync(_sessionContext, nextDto,
|
|
|
+ expiredTime: order.ExpiredTime,
|
|
|
+ isAutoFillSummaryOpinion: isAutoFillSummaryOpinion,
|
|
|
+ cancellationToken: cancellationToken);
|
|
|
if (currentStep.BusinessType is EBusinessType.Send)
|
|
|
{
|
|
|
await _orderRepository.Updateable().SetColumns(o => new Order()
|
|
@@ -4779,7 +4757,8 @@ public class OrderController : BaseController
|
|
|
OrgId = unhandleStep.HandlerOrgId,
|
|
|
OrgName = unhandleStep.HandlerOrgName,
|
|
|
};
|
|
|
- var (_, _, _, nextSteps) = await _workflowDomainService.NextAsync(operater, nextflowDto, order.ExpiredTime,
|
|
|
+ var (_, _, _, nextSteps) = await _workflowDomainService.NextAsync(operater, nextflowDto,
|
|
|
+ EHandleMode.CrossLevel, order.ExpiredTime,
|
|
|
isAutoFillSummaryOpinion, cancellationToken: cancellationToken);
|
|
|
tempSteps.AddRange(nextSteps);
|
|
|
}
|
|
@@ -4835,8 +4814,10 @@ public class OrderController : BaseController
|
|
|
NextWorkflowDto? flowDto, DateTime? expiredTime, bool isAutoFillSummaryOpinion, CancellationToken cancellation)
|
|
|
{
|
|
|
if (flowDto is null || !flowDto.NextHandlers.Any()) return;
|
|
|
- var (_, _, _, currentSteps) = await _workflowDomainService.NextAsync(current, flowDto, expiredTime,
|
|
|
- isAutoFillSummaryOpinion, cancellationToken: cancellation);
|
|
|
+ var (_, _, _, currentSteps) = await _workflowDomainService.NextAsync(current, flowDto,
|
|
|
+ expiredTime: expiredTime,
|
|
|
+ isAutoFillSummaryOpinion: isAutoFillSummaryOpinion,
|
|
|
+ cancellationToken: cancellation);
|
|
|
|
|
|
foreach (var currentStep in currentSteps)
|
|
|
{
|
|
@@ -5554,7 +5535,7 @@ public class OrderController : BaseController
|
|
|
if (order.Workflow.IsInCountersign) throw UserFriendlyException.SameMessage("工单会签中,无法进行退回!");
|
|
|
|
|
|
var (currentStep, prevStep, steps, isOrgToCenter, isSecondToFirstOrgLevel) = await _workflowApplication.GetPreviousInformationAsync(
|
|
|
- dto.WorkflowId, _sessionContext.RequiredUserId, _sessionContext.RequiredOrgId, _sessionContext.Roles,dto.AssignStepId, HttpContext.RequestAborted);
|
|
|
+ dto.WorkflowId, _sessionContext.RequiredUserId, _sessionContext.RequiredOrgId, _sessionContext.Roles, dto.AssignStepId, HttpContext.RequestAborted);
|
|
|
|
|
|
if (oneSendBack && isOrgToCenter && _appOptions.Value.IsZiGong)
|
|
|
{
|
|
@@ -5636,7 +5617,7 @@ public class OrderController : BaseController
|
|
|
{
|
|
|
var (currentStep, prevStep, steps, isOrgToCenter, isSecondToFirstOrgLevel) = await _workflowApplication.GetPreviousInformationAsync(
|
|
|
order.WorkflowId, sendBack.WorkflowUserId, sendBack.WorkflowOrgId, sendBack.WorkflowRoleIds.ToArray(), sendBack.AssignStepId,
|
|
|
- HttpContext.RequestAborted);
|
|
|
+ HttpContext.RequestAborted);
|
|
|
|
|
|
if (prevStep.BusinessType == EBusinessType.Send)
|
|
|
{
|
|
@@ -5693,7 +5674,7 @@ public class OrderController : BaseController
|
|
|
{
|
|
|
var (currentStep, prevStep, steps, isOrgToCenter, isSecondToFirstOrgLevel) = await _workflowApplication.GetPreviousInformationAsync(
|
|
|
order.WorkflowId, sendBack.WorkflowUserId, sendBack.WorkflowOrgId, sendBack.WorkflowRoleIds.ToArray(), sendBack.AssignStepId,
|
|
|
- HttpContext.RequestAborted);
|
|
|
+ HttpContext.RequestAborted);
|
|
|
if (prevStep.BusinessType == EBusinessType.Send)
|
|
|
{
|
|
|
// 平均派单
|
|
@@ -5814,7 +5795,7 @@ public class OrderController : BaseController
|
|
|
throw UserFriendlyException.SameMessage("该工单未开启流程");
|
|
|
|
|
|
var (currentStep, prevStep, steps, isOrgToCenter, isSecondToFirstOrgLevel) = await _workflowApplication.GetPreviousInformationAsync(
|
|
|
- order.WorkflowId, _sessionContext.RequiredUserId, _sessionContext.RequiredOrgId, _sessionContext.Roles,string.Empty, HttpContext.RequestAborted);
|
|
|
+ order.WorkflowId, _sessionContext.RequiredUserId, _sessionContext.RequiredOrgId, _sessionContext.Roles, string.Empty, HttpContext.RequestAborted);
|
|
|
///查询上一节点是否是领导节点
|
|
|
///ture 流程排除领导节点 排除当前节点 prevStep.BusinessType == EBusinessType.DepartmentLeader
|
|
|
if (_appOptions.Value.IsYiBin && prevStep.Name.Contains("领导"))
|
|
@@ -6913,9 +6894,9 @@ public class OrderController : BaseController
|
|
|
if (_appOptions.Value.IsZiGong)
|
|
|
{
|
|
|
step.Steps = step.Steps.Where(x => x.Key.ToLower() != "start").ToList();
|
|
|
- if (step.Steps.Where(x => x.BusinessType == EBusinessType.Department && x.OrgLevel == 1).Any())
|
|
|
+ if (step.Steps.Where(x => x.BusinessType == EBusinessType.Department && x.StepType == EStepType.Normal && x.OrgLevel == 1).Any())
|
|
|
{
|
|
|
- var stepdDefault = step.Steps.Where(x => x.BusinessType == EBusinessType.Department && x.OrgLevel == 1)
|
|
|
+ var stepdDefault = step.Steps.Where(x => x.BusinessType == EBusinessType.Department && x.StepType == EStepType.Normal && x.OrgLevel == 1)
|
|
|
.FirstOrDefault();
|
|
|
defaultStepKey = stepdDefault.Key;
|
|
|
}
|