|
@@ -1969,19 +1969,20 @@ public class OrderController : BaseController
|
|
|
return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
|
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 工单延期修改延期时限
|
|
|
- /// </summary>
|
|
|
- /// <param name="dto"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpPost("alter_delay_day")]
|
|
|
- [LogFilter("工单延期修改延期时限")]
|
|
|
- public async Task AlterDelayDay([FromBody] AlterDelayDayDto dto) {
|
|
|
+ /// <summary>
|
|
|
+ /// 工单延期修改延期时限
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("alter_delay_day")]
|
|
|
+ [LogFilter("工单延期修改延期时限")]
|
|
|
+ public async Task AlterDelayDay([FromBody] AlterDelayDayDto dto)
|
|
|
+ {
|
|
|
if (dto.DelayNum < 1) throw UserFriendlyException.SameMessage("延期申请天数需大于等于1天!");
|
|
|
var deday = await _orderDelayRepository.Queryable().Includes(x => x.Order).FirstAsync(x => x.Id == dto.Id, HttpContext.RequestAborted);
|
|
|
- if (_appOptions.Value.IsLuZhou && dto.DelayNum > deday.Order.TimeLimitCount) throw UserFriendlyException.SameMessage("申请天数需小于等于工单办理时限!");
|
|
|
+ if (_appOptions.Value.IsLuZhou && dto.DelayNum > deday.Order.TimeLimitCount) throw UserFriendlyException.SameMessage("申请天数需小于等于工单办理时限!");
|
|
|
await _orderDelayRepository.Updateable().SetColumns(x => new OrderDelay { DelayNum = dto.DelayNum }).Where(x => x.Id == dto.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 申请延期
|
|
@@ -2254,9 +2255,9 @@ public class OrderController : BaseController
|
|
|
result.Steps.Remove(result.Steps.First(x => x.Value == "中心终审"));
|
|
|
}
|
|
|
}
|
|
|
- result.IsAlterDay = _appOptions.Value.IsLuZhou && currentStep.Name == "班长审批";
|
|
|
- return result;
|
|
|
- }
|
|
|
+ result.IsAlterDay = _appOptions.Value.IsLuZhou && currentStep.Name == "班长审批";
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return null;
|
|
@@ -4676,8 +4677,8 @@ public class OrderController : BaseController
|
|
|
|
|
|
if (workflowDto.BusinessType == EBusinessType.Send)
|
|
|
{
|
|
|
- // 宜宾需求: 1.是否是派单节点 2.是否存在历史派单节点 3.存在获取上个派单节点 4.不存在走平均派单 过滤历史派单节点不为派单池
|
|
|
- if (_appOptions.Value.IsYiBin || _appOptions.Value.IsZiGong)
|
|
|
+ // 宜宾需求: 1.是否是派单节点 2.是否存在历史派单节点 3.存在获取上个派单节点 4.不存在走平均派单 过滤历史派单节点不为派单池
|
|
|
+ if (_appOptions.Value.IsYiBin || _appOptions.Value.IsZiGong)
|
|
|
{
|
|
|
var sendOrderTraces = workflow.Traces.Where(x => x.BusinessType == EBusinessType.Send && x.HandlerId != AppDefaults.SendPoolId);
|
|
|
if (sendOrderTraces.Any())
|
|
@@ -4756,11 +4757,13 @@ public class OrderController : BaseController
|
|
|
// OrgId = unhandleStep.HandlerOrgId,
|
|
|
// OrgName = unhandleStep.HandlerOrgName,
|
|
|
//};
|
|
|
+ if (unhandleStep.BusinessType is EBusinessType.Department)
|
|
|
+ {
|
|
|
+ var operater = await _orderApplication.GetHandlerRandomAsync(unhandleStep, cancellationToken);
|
|
|
+ await _sessionContext.ChangeSessionAsync(operater.Id, cancellationToken);
|
|
|
+ }
|
|
|
|
|
|
- var operater = await _orderApplication.GetHandlerRandomAsync(unhandleStep, cancellationToken);
|
|
|
- await _sessionContext.ChangeSessionAsync(operater.Id, cancellationToken);
|
|
|
-
|
|
|
- var (_, _, _, nextSteps) = await _workflowDomainService.NextAsync(nextflowDto,
|
|
|
+ var (_, _, _, nextSteps) = await _workflowDomainService.NextAsync(nextflowDto,
|
|
|
EHandleMode.CrossLevel, order.ExpiredTime,
|
|
|
isAutoFillSummaryOpinion, cancellationToken: cancellationToken);
|
|
|
tempSteps.AddRange(nextSteps);
|
|
@@ -4862,7 +4865,11 @@ public class OrderController : BaseController
|
|
|
BusinessType = nextStepDefine.BusinessType,
|
|
|
};
|
|
|
|
|
|
- var operater = await _orderApplication.GetHandlerRandomAsync(currentStep, cancellation);
|
|
|
+ if (currentStep.BusinessType is EBusinessType.Department)
|
|
|
+ {
|
|
|
+ var operater = await _orderApplication.GetHandlerRandomAsync(currentStep, cancellation);
|
|
|
+ await _sessionContext.ChangeSessionAsync(operater.Id, cancellation);
|
|
|
+ }
|
|
|
await HandleNextInMainAndSecondaryAsync(definition, orgs, nextDto, expiredTime, isAutoFillSummaryOpinion, cancellation);
|
|
|
}
|
|
|
}
|