|
@@ -124,7 +124,7 @@ public class OrderController : BaseController
|
|
|
private readonly Publisher _publisher;
|
|
|
private readonly IOrderAnalysisApplication _orderAnalysisApplication;
|
|
|
|
|
|
- public OrderController(
|
|
|
+ public OrderController(
|
|
|
IOrderDomainService orderDomainService,
|
|
|
IOrderRepository orderRepository,
|
|
|
IWorkflowApplication workflowApplication,
|
|
@@ -182,7 +182,7 @@ public class OrderController : BaseController
|
|
|
IOrderSendBackAuditApplication orderSendBackAuditApplication,
|
|
|
Publisher publisher,
|
|
|
IOrderAnalysisApplication orderAnalysisApplication
|
|
|
- )
|
|
|
+ )
|
|
|
{
|
|
|
_orderDomainService = orderDomainService;
|
|
|
_orderRepository = orderRepository;
|
|
@@ -242,7 +242,7 @@ public class OrderController : BaseController
|
|
|
_publisher = publisher;
|
|
|
_orderAnalysisApplication = orderAnalysisApplication;
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
#endregion
|
|
|
|
|
|
#region 工单发布
|
|
@@ -329,7 +329,7 @@ public class OrderController : BaseController
|
|
|
orderVisit.VisitState = EVisitState.WaitForVisit;
|
|
|
orderVisit.PublishTime = DateTime.Now;
|
|
|
orderVisit.IsCanHandle = true;
|
|
|
-
|
|
|
+ orderVisit.EmployeeId = _sessionContext.RequiredUserId;
|
|
|
if (order is { ProcessType: EProcessType.Zhiban, CounterSignType: null })
|
|
|
{
|
|
|
orderVisit.VisitState = EVisitState.Visited;
|
|
@@ -3627,7 +3627,7 @@ public class OrderController : BaseController
|
|
|
handleStatuses = handleStatuses.WhereIF(dto.IsHandled.HasValue,
|
|
|
d => dto.IsHandled!.Value
|
|
|
? d is not EOrderStatus.WaitForAccept and not EOrderStatus.BackToUnAccept and not EOrderStatus.SpecialToUnAccept and not EOrderStatus.HandOverToUnAccept
|
|
|
- : d is EOrderStatus.WaitForAccept or EOrderStatus.BackToUnAccept or EOrderStatus.SpecialToUnAccept or EOrderStatus.HandOverToUnAccept)
|
|
|
+ : d is EOrderStatus.WaitForAccept or EOrderStatus.BackToUnAccept or EOrderStatus.SpecialToUnAccept or EOrderStatus.HandOverToUnAccept)
|
|
|
.ToArray();
|
|
|
if (dto.EndTime.HasValue)
|
|
|
dto.EndTime = dto.EndTime.Value.AddDays(1).AddSeconds(-1);
|
|
@@ -3836,7 +3836,7 @@ public class OrderController : BaseController
|
|
|
EOrderStatus[] handleStatuses = EnumExts.GetFields<EOrderStatus>().Select(d => (EOrderStatus)d.Key).ToArray();
|
|
|
handleStatuses = handleStatuses.WhereIF(dto.IsHandled.HasValue,
|
|
|
d => dto.IsHandled!.Value
|
|
|
- ? d is not EOrderStatus.WaitForAccept and not EOrderStatus.BackToUnAccept and not EOrderStatus.SpecialToUnAccept and not EOrderStatus.HandOverToUnAccept
|
|
|
+ ? d is not EOrderStatus.WaitForAccept and not EOrderStatus.BackToUnAccept and not EOrderStatus.SpecialToUnAccept and not EOrderStatus.HandOverToUnAccept
|
|
|
: d is EOrderStatus.WaitForAccept or EOrderStatus.BackToUnAccept or EOrderStatus.SpecialToUnAccept or EOrderStatus.HandOverToUnAccept)
|
|
|
.ToArray();
|
|
|
|
|
@@ -3911,7 +3911,7 @@ public class OrderController : BaseController
|
|
|
WorkflowOrgId = _sessionContext.RequiredOrgId,
|
|
|
WorkflowUserId = _sessionContext.RequiredUserId,
|
|
|
WorkflowRoleIds = _sessionContext.Roles.ToList(),
|
|
|
- Status = order.Status,
|
|
|
+ Status = order.Status,
|
|
|
TraceId = currentStep.Id
|
|
|
};
|
|
|
if (oneSendBack || twoSendBack)
|
|
@@ -4008,9 +4008,10 @@ public class OrderController : BaseController
|
|
|
.Where(o => o.Id == sendBack.OrderId).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
//发送短信TODO
|
|
|
}
|
|
|
- else {
|
|
|
- await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { Status = sendBack.Status.Value })
|
|
|
- .Where(o => o.Id == sendBack.OrderId).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
+ else
|
|
|
+ {
|
|
|
+ await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { Status = sendBack.Status.Value })
|
|
|
+ .Where(o => o.Id == sendBack.OrderId).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
}
|
|
|
await _orderSendBackAuditRepository.UpdateAsync(sendBack, HttpContext.RequestAborted);
|
|
|
}
|
|
@@ -4057,10 +4058,10 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { Status = sendBack.Status.Value })
|
|
|
- .Where(o => o.Id == sendBack.OrderId).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
+ await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { Status = sendBack.Status.Value })
|
|
|
+ .Where(o => o.Id == sendBack.OrderId).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
}
|
|
|
- await _orderSendBackAuditRepository.UpdateAsync(sendBack, HttpContext.RequestAborted);
|
|
|
+ await _orderSendBackAuditRepository.UpdateAsync(sendBack, HttpContext.RequestAborted);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -4409,7 +4410,7 @@ public class OrderController : BaseController
|
|
|
await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderExpiredTimeUpdate, orderDto,
|
|
|
cancellationToken: HttpContext.RequestAborted);
|
|
|
//}
|
|
|
- await _workflowApplication.RecallAsync(recall, expiredTime.ExpiredTime, order.Status >= EOrderStatus.Filed, HttpContext.RequestAborted);
|
|
|
+ await _workflowApplication.RecallAsync(recall, expiredTime.ExpiredTime, order.Status >= EOrderStatus.Filed, EWorkflowTraceType.Recall, HttpContext.RequestAborted);
|
|
|
|
|
|
|
|
|
if (order != null && ("001171".Equals(model.OrgId) ||
|
|
@@ -4535,7 +4536,7 @@ public class OrderController : BaseController
|
|
|
var processType = dto.FlowDirection == EFlowDirection.OrgToCenter || dto.FlowDirection == EFlowDirection.CenterToCenter
|
|
|
? EProcessType.Zhiban
|
|
|
: EProcessType.Jiaoban;
|
|
|
- await _workflowApplication.RecallAsync(recall, endTime, order.Status >= EOrderStatus.Filed, HttpContext.RequestAborted);
|
|
|
+ await _workflowApplication.RecallAsync(recall, endTime, order.Status >= EOrderStatus.Filed, EWorkflowTraceType.Redo, HttpContext.RequestAborted);
|
|
|
//var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == dto.OrderId);
|
|
|
//if (publish != null)
|
|
|
//{
|
|
@@ -4622,7 +4623,7 @@ public class OrderController : BaseController
|
|
|
|
|
|
//todo 特提重办,按审批通过时间依据中心派至部门的规则计算期满时间,更新order
|
|
|
|
|
|
- await _workflowApplication.RecallAsync(recall, expiredTime.ExpiredTime, order.Status >= EOrderStatus.Filed, HttpContext.RequestAborted);
|
|
|
+ await _workflowApplication.RecallAsync(recall, expiredTime.ExpiredTime, order.Status >= EOrderStatus.Filed, EWorkflowTraceType.Recall, HttpContext.RequestAborted);
|
|
|
//var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == special.OrderId);
|
|
|
//if (publish != null)
|
|
|
//{
|
|
@@ -4668,10 +4669,10 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { Status = special.Status.Value })
|
|
|
- .Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
+ await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { Status = special.Status.Value })
|
|
|
+ .Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 批量审批工单特提
|
|
@@ -4731,7 +4732,7 @@ public class OrderController : BaseController
|
|
|
|
|
|
//todo 特提重办,按审批通过时间依据中心派至部门的规则计算期满时间,更新order
|
|
|
|
|
|
- await _workflowApplication.RecallAsync(recall, expiredTime.ExpiredTime, order.Status >= EOrderStatus.Filed, HttpContext.RequestAborted);
|
|
|
+ await _workflowApplication.RecallAsync(recall, expiredTime.ExpiredTime, order.Status >= EOrderStatus.Filed, EWorkflowTraceType.Recall, HttpContext.RequestAborted);
|
|
|
var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == special.OrderId);
|
|
|
if (publish != null)
|
|
|
{
|
|
@@ -4777,10 +4778,10 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { Status = special.Status.Value })
|
|
|
- .Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
+ await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { Status = special.Status.Value })
|
|
|
+ .Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -6439,87 +6440,87 @@ public class OrderController : BaseController
|
|
|
var status = EOrderStatus.HandOver;
|
|
|
if (step.BusinessType == EBusinessType.Seat && step.StepType == EStepType.Start)
|
|
|
status = EOrderStatus.HandOverToUnAccept;
|
|
|
- await _orderRepository.Updateable()
|
|
|
+ await _orderRepository.Updateable()
|
|
|
.SetColumns(o => new Orders.Order() { Status = status })
|
|
|
.Where(o => o.Id == dto.OrderId).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
- #region 分析报告
|
|
|
- /// <summary>
|
|
|
- /// 新增分析报告
|
|
|
- /// </summary>
|
|
|
- /// <param name="dtos"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpPost("analysis")]
|
|
|
- [LogFilter("新增分析报告")]
|
|
|
- public async Task OrderAnalysisAdd([FromBody] AddOrderAnalysisDto dto)
|
|
|
- {
|
|
|
- await _orderAnalysisApplication.AddAsync(dto, HttpContext.RequestAborted);
|
|
|
- }
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// 修改分析报告
|
|
|
- /// </summary>
|
|
|
- /// <param name="dtos"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpPut("analysis")]
|
|
|
- [LogFilter("修改分析报告")]
|
|
|
- public async Task OrderAnalysisUpdate([FromBody] UpdateOrderAnalysisDto dto)
|
|
|
- {
|
|
|
- await _orderAnalysisApplication.UpdateAsync(dto, HttpContext.RequestAborted);
|
|
|
- }
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// 删除分析报告
|
|
|
- /// </summary>
|
|
|
- /// <param name="dtos"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpDelete("analysis")]
|
|
|
- [LogFilter("删除分析报告")]
|
|
|
- public async Task OrderAnalysisDelete([FromBody] DeleteOrderAnalysisDto dto)
|
|
|
- {
|
|
|
- await _orderAnalysisApplication.DeleteAsync(dto, HttpContext.RequestAborted);
|
|
|
- }
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// 分析报告列表
|
|
|
- /// </summary>
|
|
|
- /// <param name="dtos"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpGet("analysis_list")]
|
|
|
- [LogFilter("分析报告列表")]
|
|
|
- public async Task<PagedDto<OrderAnalysisDto>> OrderAnalysisListQuery([FromQuery] OrderAnalysisListDto dto)
|
|
|
- {
|
|
|
- var (total, items) = await _orderAnalysisApplication.ListQuery(dto, HttpContext.RequestAborted).ToPagedListAsync(dto, HttpContext.RequestAborted);
|
|
|
- return new PagedDto<OrderAnalysisDto>(total, items);
|
|
|
- }
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// 分析报告明细
|
|
|
- /// </summary>
|
|
|
- /// <param name="dtos"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpGet("analysis_detail")]
|
|
|
- [LogFilter("分析报告明细")]
|
|
|
- public async Task<PagedDto<OrderDto>> OrderAnalysisDetailQuery([FromQuery] OrderAnalysisDetailDto dto)
|
|
|
- {
|
|
|
- var(total, items) = await _orderAnalysisApplication.DetailQuery(dto, HttpContext.RequestAborted).ToPagedListAsync(dto, HttpContext.RequestAborted);
|
|
|
- return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
|
|
|
- }
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// 生成分析报告
|
|
|
- /// </summary>
|
|
|
- /// <param name="dtos"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpGet("analysis_report")]
|
|
|
- [LogFilter("生成分析报告")]
|
|
|
- public async Task<object> OrderAnalysisReportQuery([FromQuery] OrderAnalysisDetailDto dto)
|
|
|
- {
|
|
|
- return await _orderAnalysisApplication.ReportQuery(dto, HttpContext.RequestAborted);
|
|
|
- }
|
|
|
- #endregion
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 分析报告
|
|
|
+ /// <summary>
|
|
|
+ /// 新增分析报告
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dtos"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("analysis")]
|
|
|
+ [LogFilter("新增分析报告")]
|
|
|
+ public async Task OrderAnalysisAdd([FromBody] AddOrderAnalysisDto dto)
|
|
|
+ {
|
|
|
+ await _orderAnalysisApplication.AddAsync(dto, HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 修改分析报告
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dtos"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPut("analysis")]
|
|
|
+ [LogFilter("修改分析报告")]
|
|
|
+ public async Task OrderAnalysisUpdate([FromBody] UpdateOrderAnalysisDto dto)
|
|
|
+ {
|
|
|
+ await _orderAnalysisApplication.UpdateAsync(dto, HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 删除分析报告
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dtos"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpDelete("analysis")]
|
|
|
+ [LogFilter("删除分析报告")]
|
|
|
+ public async Task OrderAnalysisDelete([FromBody] DeleteOrderAnalysisDto dto)
|
|
|
+ {
|
|
|
+ await _orderAnalysisApplication.DeleteAsync(dto, HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 分析报告列表
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dtos"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("analysis_list")]
|
|
|
+ [LogFilter("分析报告列表")]
|
|
|
+ public async Task<PagedDto<OrderAnalysisDto>> OrderAnalysisListQuery([FromQuery] OrderAnalysisListDto dto)
|
|
|
+ {
|
|
|
+ var (total, items) = await _orderAnalysisApplication.ListQuery(dto, HttpContext.RequestAborted).ToPagedListAsync(dto, HttpContext.RequestAborted);
|
|
|
+ return new PagedDto<OrderAnalysisDto>(total, items);
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 分析报告明细
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dtos"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("analysis_detail")]
|
|
|
+ [LogFilter("分析报告明细")]
|
|
|
+ public async Task<PagedDto<OrderDto>> OrderAnalysisDetailQuery([FromQuery] OrderAnalysisDetailDto dto)
|
|
|
+ {
|
|
|
+ var (total, items) = await _orderAnalysisApplication.DetailQuery(dto, HttpContext.RequestAborted).ToPagedListAsync(dto, HttpContext.RequestAborted);
|
|
|
+ return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 生成分析报告
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dtos"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("analysis_report")]
|
|
|
+ [LogFilter("生成分析报告")]
|
|
|
+ public async Task<object> OrderAnalysisReportQuery([FromQuery] OrderAnalysisDetailDto dto)
|
|
|
+ {
|
|
|
+ return await _orderAnalysisApplication.ReportQuery(dto, HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
}
|