|
@@ -4710,7 +4710,7 @@ public class OrderController : BaseController
|
|
|
.AnyAsync();
|
|
|
if (specialAny) throw UserFriendlyException.SameMessage("工单已存在待审批特提信息!");
|
|
|
var order = await _orderRepository.Queryable().Includes(d => d.Workflow).FirstAsync(d => d.Id == dto.OrderId);
|
|
|
- SpecialVerify(dto, order);
|
|
|
+ //SpecialVerify(dto, order);
|
|
|
|
|
|
var model = _mapper.Map<OrderSpecial>(dto);
|
|
|
var orgs = order.HandlerOrgs;
|
|
@@ -4890,40 +4890,40 @@ public class OrderController : BaseController
|
|
|
/// 特提验证
|
|
|
/// </summary>
|
|
|
/// <param name="dto"></param>
|
|
|
- public async void SpecialVerify(OrderSpecialAddDto dto,Order order) {
|
|
|
- var screen = await _orderScreenRepository.Queryable().Where(x => x.OrderId == dto.OrderId && (int)x.Status < 2).ToListAsync(HttpContext.RequestAborted);
|
|
|
- //var order = await _orderRepository.Queryable().Includes(d => d.Workflow).FirstAsync(d => d.Id == dto.OrderId);
|
|
|
- var sendBackAudit = await _orderSendBackAuditRepository.Queryable().Where(x => x.OrderId == dto.OrderId && x.State == ESendBackAuditState.Apply).ToListAsync(HttpContext.RequestAborted);
|
|
|
- if (_appOptions.Value.IsYiBin)
|
|
|
- {
|
|
|
- if (screen.Any()) {
|
|
|
- _orderScreenRepository.RemoveRangeAsync(screen,true, HttpContext.RequestAborted);
|
|
|
- }
|
|
|
-
|
|
|
- if (sendBackAudit.Any())
|
|
|
- {
|
|
|
- _orderSendBackAuditRepository.RemoveRangeAsync(sendBackAudit, true, HttpContext.RequestAborted);
|
|
|
- }
|
|
|
-
|
|
|
- if (order.Workflow.IsInCountersign)
|
|
|
- {
|
|
|
- var workflowStep = await _workflowStepRepository.Queryable().Where(x => x.Id == order.Workflow.TopCountersignStepId).FirstAsync(HttpContext.RequestAborted);
|
|
|
- if (workflowStep != null)
|
|
|
- {
|
|
|
- var dtoEnd = new EndCountersignDto() { CountersignId = workflowStep.StartCountersignId };
|
|
|
- await EndCountersign(dtoEnd);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else {
|
|
|
- if (screen.Any()) throw UserFriendlyException.SameMessage("工单存在甄别中的信息!");
|
|
|
-
|
|
|
- if (sendBackAudit.Any())
|
|
|
- throw UserFriendlyException.SameMessage("该工单存在正在审核中的退回,不能办理");
|
|
|
-
|
|
|
- if (order.Workflow.IsInCountersign) throw UserFriendlyException.SameMessage("工单会签中,无法进行特提!");
|
|
|
- }
|
|
|
- }
|
|
|
+ // public async void SpecialVerify(OrderSpecialAddDto dto,Order order) {
|
|
|
+ // var screen = await _orderScreenRepository.Queryable().Where(x => x.OrderId == dto.OrderId && (int)x.Status < 2).ToListAsync(HttpContext.RequestAborted);
|
|
|
+ // //var order = await _orderRepository.Queryable().Includes(d => d.Workflow).FirstAsync(d => d.Id == dto.OrderId);
|
|
|
+ // var sendBackAudit = await _orderSendBackAuditRepository.Queryable().Where(x => x.OrderId == dto.OrderId && x.State == ESendBackAuditState.Apply).ToListAsync(HttpContext.RequestAborted);
|
|
|
+ // if (_appOptions.Value.IsYiBin)
|
|
|
+ // {
|
|
|
+ // if (screen.Any()) {
|
|
|
+ // _orderScreenRepository.RemoveRangeAsync(screen,true, HttpContext.RequestAborted);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if (sendBackAudit.Any())
|
|
|
+ // {
|
|
|
+ // _orderSendBackAuditRepository.RemoveRangeAsync(sendBackAudit, true, HttpContext.RequestAborted);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if (order.Workflow.IsInCountersign)
|
|
|
+ // {
|
|
|
+ // var workflowStep = await _workflowStepRepository.Queryable().Where(x => x.Id == order.Workflow.TopCountersignStepId).FirstAsync(HttpContext.RequestAborted);
|
|
|
+ // if (workflowStep != null)
|
|
|
+ // {
|
|
|
+ // var dtoEnd = new EndCountersignDto() { CountersignId = workflowStep.StartCountersignId };
|
|
|
+ // await EndCountersign(dtoEnd);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // else {
|
|
|
+ // if (screen.Any()) throw UserFriendlyException.SameMessage("工单存在甄别中的信息!");
|
|
|
+
|
|
|
+ // if (sendBackAudit.Any())
|
|
|
+ // throw UserFriendlyException.SameMessage("该工单存在正在审核中的退回,不能办理");
|
|
|
+
|
|
|
+ // if (order.Workflow.IsInCountersign) throw UserFriendlyException.SameMessage("工单会签中,无法进行特提!");
|
|
|
+ // }
|
|
|
+ //}
|
|
|
|
|
|
|
|
|
/// <summary>
|