|
@@ -6026,6 +6026,9 @@ public class OrderController : BaseController
|
|
{
|
|
{
|
|
order.CenterToOrgHandlerId = newStep.HandlerId;
|
|
order.CenterToOrgHandlerId = newStep.HandlerId;
|
|
order.CenterToOrgHandlerName = newStep.HandlerName;
|
|
order.CenterToOrgHandlerName = newStep.HandlerName;
|
|
|
|
+ await _orderRepository.Updateable(order)
|
|
|
|
+ .UpdateColumns(d => new { d.CenterToOrgHandlerId, d.CenterToOrgHandlerName })
|
|
|
|
+ .ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
}
|
|
}
|
|
|
|
|
|
if (order.Status >= EOrderStatus.Filed)
|
|
if (order.Status >= EOrderStatus.Filed)
|
|
@@ -6351,7 +6354,7 @@ public class OrderController : BaseController
|
|
special.ReplyFileJson = await _fileRepository.AddFileAsync(dto.Files, special.Id, "", HttpContext.RequestAborted);
|
|
special.ReplyFileJson = await _fileRepository.AddFileAsync(dto.Files, special.Id, "", HttpContext.RequestAborted);
|
|
else
|
|
else
|
|
special.ReplyFileJson = new List<Share.Dtos.File.FileJson>();
|
|
special.ReplyFileJson = new List<Share.Dtos.File.FileJson>();
|
|
- await _orderSpecialRepository.UpdateAsync(special, HttpContext.RequestAborted);
|
|
|
|
|
|
+ //await _orderSpecialRepository.UpdateAsync(special, HttpContext.RequestAborted);
|
|
var order = await _orderRepository.GetAsync(x => x.Id == special.OrderId);
|
|
var order = await _orderRepository.GetAsync(x => x.Id == special.OrderId);
|
|
if (special.State == 1)
|
|
if (special.State == 1)
|
|
{
|
|
{
|
|
@@ -6441,16 +6444,9 @@ public class OrderController : BaseController
|
|
// }
|
|
// }
|
|
|
|
|
|
//todo 特提重办,按审批通过时间依据中心派至部门的规则计算期满时间,更新order
|
|
//todo 特提重办,按审批通过时间依据中心派至部门的规则计算期满时间,更新order
|
|
-
|
|
|
|
- // StepAssignInfo? stepAssignInfo = null;
|
|
|
|
- // if (handler is not null)
|
|
|
|
- // {
|
|
|
|
- // stepAssignInfo = _mapper.Map<StepAssignInfo>(handler);
|
|
|
|
- // stepAssignInfo.FlowAssignType = EFlowAssignType.User;
|
|
|
|
- // }
|
|
|
|
- //
|
|
|
|
- // var reverseFlowStepAssignInfo = _orderDomainService.GetOrderRecallAssignInfo(dto.BusinessType, stepAssignInfo);
|
|
|
|
- await _workflowDomainService.RecallAsync(recall, recall.NextHandlers.FirstOrDefault(), EWorkflowTraceType.Recall,
|
|
|
|
|
|
+
|
|
|
|
+ var (workflow, targetStepDefine, currentStep, targetStep, newStep, isOrgToCenter) = await _workflowDomainService.RecallAsync(
|
|
|
|
+ recall, recall.NextHandlers.FirstOrDefault(), EWorkflowTraceType.Recall,
|
|
expiredTime.ExpiredTime, order.Status >= EOrderStatus.Filed, EHandleMode.Recall,
|
|
expiredTime.ExpiredTime, order.Status >= EOrderStatus.Filed, EHandleMode.Recall,
|
|
async (workflow, prevStepDefine, prevStep, newStep) =>
|
|
async (workflow, prevStepDefine, prevStep, newStep) =>
|
|
{
|
|
{
|
|
@@ -6461,22 +6457,22 @@ public class OrderController : BaseController
|
|
var validator = new StepAssignInfoValidator();
|
|
var validator = new StepAssignInfoValidator();
|
|
await validator.ValidateAndThrowAsync(stepAssignInfo, HttpContext.RequestAborted);
|
|
await validator.ValidateAndThrowAsync(stepAssignInfo, HttpContext.RequestAborted);
|
|
newStep.Assign(stepAssignInfo);
|
|
newStep.Assign(stepAssignInfo);
|
|
-
|
|
|
|
- if (special.BusinessType == EBusinessType.Send)
|
|
|
|
- {
|
|
|
|
- await _orderSpecialRepository.Updateable().SetColumns(x => new OrderSpecial
|
|
|
|
- { NextHandlers = new List<StepAssignInfo> { stepAssignInfo } })
|
|
|
|
- .Where(x => x.Id == special.Id).ExecuteCommandAsync();
|
|
|
|
-
|
|
|
|
- await _orderRepository.Updateable().SetColumns(o => new Orders.Order()
|
|
|
|
- { CenterToOrgHandlerId = stepAssignInfo.UserId, CenterToOrgHandlerName = stepAssignInfo.Username })
|
|
|
|
- .Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
|
- }
|
|
|
|
}, HttpContext.RequestAborted);
|
|
}, HttpContext.RequestAborted);
|
|
- //await _workflowApplication.RecallAsync(recall, expiredTime.ExpiredTime, order.Status >= EOrderStatus.Filed, EWorkflowTraceType.Recall,
|
|
|
|
- // HttpContext.RequestAborted);
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ if (_appOptions.Value.IsZiGong && dto.BusinessType == EBusinessType.Send)
|
|
|
|
+ {
|
|
|
|
+ special.NextHandlers = new List<StepAssignInfo> { newStep.GetWorkflowStepHandler() };
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ if (dto.BusinessType == EBusinessType.Send)
|
|
|
|
+ {
|
|
|
|
+ order.CenterToOrgHandlerId = newStep.HandlerId;
|
|
|
|
+ order.CenterToOrgHandlerName = newStep.HandlerName;
|
|
|
|
+ await _orderRepository.Updateable(order)
|
|
|
|
+ .UpdateColumns(d => new { d.CenterToOrgHandlerId, d.CenterToOrgHandlerName })
|
|
|
|
+ .ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (order.Status >= EOrderStatus.Filed)
|
|
if (order.Status >= EOrderStatus.Filed)
|
|
{
|
|
{
|
|
var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == special.OrderId);
|
|
var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == special.OrderId);
|
|
@@ -6521,6 +6517,8 @@ public class OrderController : BaseController
|
|
await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { Status = special.Status.Value })
|
|
await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { Status = special.Status.Value })
|
|
.Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
.Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ await _orderSpecialRepository.UpdateAsync(special, HttpContext.RequestAborted);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -6546,7 +6544,7 @@ public class OrderController : BaseController
|
|
special.ReplyFileJson = await _fileRepository.AddFileAsync(dto.Files, special.Id, "", HttpContext.RequestAborted);
|
|
special.ReplyFileJson = await _fileRepository.AddFileAsync(dto.Files, special.Id, "", HttpContext.RequestAborted);
|
|
else
|
|
else
|
|
special.ReplyFileJson = new List<Share.Dtos.File.FileJson>();
|
|
special.ReplyFileJson = new List<Share.Dtos.File.FileJson>();
|
|
- await _orderSpecialRepository.UpdateAsync(special, HttpContext.RequestAborted);
|
|
|
|
|
|
+ // await _orderSpecialRepository.UpdateAsync(special, HttpContext.RequestAborted);
|
|
var order = await _orderRepository.GetAsync(x => x.Id == special.OrderId);
|
|
var order = await _orderRepository.GetAsync(x => x.Id == special.OrderId);
|
|
if (special.State == 1)
|
|
if (special.State == 1)
|
|
{
|
|
{
|
|
@@ -6634,16 +6632,9 @@ public class OrderController : BaseController
|
|
// .Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
// .Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
// }
|
|
// }
|
|
//todo 特提重办,按审批通过时间依据中心派至部门的规则计算期满时间,更新order
|
|
//todo 特提重办,按审批通过时间依据中心派至部门的规则计算期满时间,更新order
|
|
-
|
|
|
|
- // StepAssignInfo? stepAssignInfo = null;
|
|
|
|
- // if (handler is not null)
|
|
|
|
- // {
|
|
|
|
- // stepAssignInfo = _mapper.Map<StepAssignInfo>(handler);
|
|
|
|
- // stepAssignInfo.FlowAssignType = EFlowAssignType.User;
|
|
|
|
- // }
|
|
|
|
- //
|
|
|
|
- // var reverseFlowStepAssignInfo = _orderDomainService.GetOrderRecallAssignInfo(dto.BusinessType, stepAssignInfo);
|
|
|
|
- await _workflowDomainService.RecallAsync(recall, recall.NextHandlers.FirstOrDefault(), EWorkflowTraceType.Recall,
|
|
|
|
|
|
+
|
|
|
|
+ var (workflow, targetStepDefine, currentStep, targetStep, newStep, isOrgToCenter) = await _workflowDomainService.RecallAsync(
|
|
|
|
+ recall, recall.NextHandlers.FirstOrDefault(), EWorkflowTraceType.Recall,
|
|
expiredTime.ExpiredTime, order.Status >= EOrderStatus.Filed, EHandleMode.Recall,
|
|
expiredTime.ExpiredTime, order.Status >= EOrderStatus.Filed, EHandleMode.Recall,
|
|
async (workflow, prevStepDefine, prevStep, newStep) =>
|
|
async (workflow, prevStepDefine, prevStep, newStep) =>
|
|
{
|
|
{
|
|
@@ -6654,20 +6645,22 @@ public class OrderController : BaseController
|
|
var validator = new StepAssignInfoValidator();
|
|
var validator = new StepAssignInfoValidator();
|
|
await validator.ValidateAndThrowAsync(stepAssignInfo, HttpContext.RequestAborted);
|
|
await validator.ValidateAndThrowAsync(stepAssignInfo, HttpContext.RequestAborted);
|
|
newStep.Assign(stepAssignInfo);
|
|
newStep.Assign(stepAssignInfo);
|
|
-
|
|
|
|
- if (special.BusinessType == EBusinessType.Send)
|
|
|
|
- {
|
|
|
|
- await _orderSpecialRepository.Updateable().SetColumns(x => new OrderSpecial
|
|
|
|
- { NextHandlers = new List<StepAssignInfo> { stepAssignInfo } })
|
|
|
|
- .Where(x => x.Id == special.Id).ExecuteCommandAsync();
|
|
|
|
-
|
|
|
|
- await _orderRepository.Updateable().SetColumns(o => new Orders.Order()
|
|
|
|
- { CenterToOrgHandlerId = stepAssignInfo.UserId, CenterToOrgHandlerName = stepAssignInfo.Username })
|
|
|
|
- .Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
|
- }
|
|
|
|
}, HttpContext.RequestAborted);
|
|
}, HttpContext.RequestAborted);
|
|
- //await _workflowApplication.RecallAsync(recall, expiredTime.ExpiredTime, order.Status >= EOrderStatus.Filed, EWorkflowTraceType.Recall,
|
|
|
|
- // HttpContext.RequestAborted);
|
|
|
|
|
|
+
|
|
|
|
+ if (_appOptions.Value.IsZiGong && dto.BusinessType == EBusinessType.Send)
|
|
|
|
+ {
|
|
|
|
+ special.NextHandlers = new List<StepAssignInfo> { newStep.GetWorkflowStepHandler() };
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (dto.BusinessType == EBusinessType.Send)
|
|
|
|
+ {
|
|
|
|
+ order.CenterToOrgHandlerId = newStep.HandlerId;
|
|
|
|
+ order.CenterToOrgHandlerName = newStep.HandlerName;
|
|
|
|
+ await _orderRepository.Updateable(order)
|
|
|
|
+ .UpdateColumns(d => new { d.CenterToOrgHandlerId, d.CenterToOrgHandlerName })
|
|
|
|
+ .ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (order.Status >= EOrderStatus.Filed)
|
|
if (order.Status >= EOrderStatus.Filed)
|
|
{
|
|
{
|
|
var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == special.OrderId);
|
|
var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == special.OrderId);
|
|
@@ -6713,6 +6706,8 @@ public class OrderController : BaseController
|
|
await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { Status = special.Status.Value })
|
|
await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { Status = special.Status.Value })
|
|
.Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
.Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ await _orderSpecialRepository.UpdateAsync(special, HttpContext.RequestAborted);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|