|
@@ -6521,7 +6521,16 @@ public class OrderController : BaseController
|
|
|
var order = await _orderRepository.GetAsync(x => x.Id == special.OrderId);
|
|
|
if (special.State == 1)
|
|
|
{
|
|
|
- await _orderApplication.RecallAsync(dto, special, order, HttpContext.RequestAborted);
|
|
|
+ var (workflow, targetStepDefine, currentStep, targetStep, newStep, isOrgToCenter) =
|
|
|
+ await _orderApplication.RecallAsync(dto, special, order, HttpContext.RequestAborted);
|
|
|
+
|
|
|
+ if (string.IsNullOrEmpty(currentStep?.HandlerOrgId))
|
|
|
+ {
|
|
|
+ special.OrgId = currentStep.HandlerOrgId;
|
|
|
+ special.OrgName = currentStep.HandlerOrgName;
|
|
|
+ special.StepName = currentStep.Name;
|
|
|
+ special.StepCode = currentStep.Code;
|
|
|
+ }
|
|
|
|
|
|
if (order.Status >= EOrderStatus.Filed)
|
|
|
{
|
|
@@ -6580,12 +6589,12 @@ public class OrderController : BaseController
|
|
|
[LogFilter("批量审批工单特提")]
|
|
|
public async Task UpdateBatch([FromBody] BatchAuditOrderSpecialDto dto)
|
|
|
{
|
|
|
- foreach (string id in dto.ids)
|
|
|
+ var specials = await _orderSpecialRepository.Queryable()
|
|
|
+ .Includes(d => d.Order)
|
|
|
+ .Where(d => dto.ids.Contains(d.Id))
|
|
|
+ .ToListAsync(HttpContext.RequestAborted);
|
|
|
+ foreach (var special in specials)
|
|
|
{
|
|
|
- var special = await _orderSpecialRepository
|
|
|
- .Queryable()
|
|
|
- .Includes(d => d.Order)
|
|
|
- .FirstAsync(d => d.Id == id);
|
|
|
if (special is null) throw UserFriendlyException.SameMessage("无效特提审批信息!");
|
|
|
if (special.State != 0) throw UserFriendlyException.SameMessage("无效特提审批信息,特提审批信息错误,该信息已审核!");
|
|
|
special.State = dto.State;
|
|
@@ -6595,9 +6604,12 @@ public class OrderController : BaseController
|
|
|
else
|
|
|
special.ReplyFileJson = new List<Share.Dtos.File.FileJson>();
|
|
|
|
|
|
- var order = await _orderRepository.GetAsync(x => x.Id == special.OrderId);
|
|
|
+ //var order = await _orderRepository.GetAsync(x => x.Id == special.OrderId);
|
|
|
+ var order = special.Order;
|
|
|
if (special.State == 1)
|
|
|
{
|
|
|
+ #region MyRegion
|
|
|
+
|
|
|
//var recall = new RecallDto
|
|
|
//{
|
|
|
// WorkflowId = special.WorkflowId!,
|
|
@@ -6684,8 +6696,19 @@ public class OrderController : BaseController
|
|
|
// .ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
//}
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ var (workflow, targetStepDefine, currentStep, targetStep, newStep, isOrgToCenter) =
|
|
|
await _orderApplication.RecallAsync(dto, special, order, HttpContext.RequestAborted);
|
|
|
|
|
|
+ if (string.IsNullOrEmpty(currentStep?.HandlerOrgId))
|
|
|
+ {
|
|
|
+ special.OrgId = currentStep.HandlerOrgId;
|
|
|
+ special.OrgName = currentStep.HandlerOrgName;
|
|
|
+ special.StepName = currentStep.Name;
|
|
|
+ special.StepCode = currentStep.Code;
|
|
|
+ }
|
|
|
+
|
|
|
if (order.Status >= EOrderStatus.Filed)
|
|
|
{
|
|
|
var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == special.OrderId);
|
|
@@ -6732,8 +6755,10 @@ public class OrderController : BaseController
|
|
|
.Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
}
|
|
|
|
|
|
- await _orderSpecialRepository.UpdateAsync(special, HttpContext.RequestAborted);
|
|
|
+ //await _orderSpecialRepository.UpdateAsync(special, HttpContext.RequestAborted);
|
|
|
}
|
|
|
+
|
|
|
+ await _orderSpecialRepository.UpdateRangeAsync(specials, HttpContext.RequestAborted);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|