|
@@ -5931,10 +5931,77 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// 部门批量重提 该部门及下级部门回访结果 不满意 未评价 视为满意
|
|
|
- /// </summary>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpPost("org_batch_special")]
|
|
|
+ /// 退回基础数据
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("sendback/base/{id}")]
|
|
|
+ public async Task<object> SendBackBaseData(string id)
|
|
|
+ {
|
|
|
+ var order = await _orderRepository.GetAsync(id, HttpContext.RequestAborted);
|
|
|
+ var isInstaShot = order.SourceChannel.Contains("随手拍");
|
|
|
+ var defaultStepKey = string.Empty;
|
|
|
+ var defaultHandlerKey = string.Empty;
|
|
|
+ List<Kv> orgs = new();
|
|
|
+ if (order == null) throw UserFriendlyException.SameMessage("无效工单信息!");
|
|
|
+ //中心会签调取方法
|
|
|
+ var org = await _workflowDomainService.GetLevelOneOrgsAsync(order.WorkflowId, HttpContext.RequestAborted);
|
|
|
+ orgs.AddRange(org);
|
|
|
+ var step = await _workflowApplication.GetRecallStepsAsync(order.WorkflowId, HttpContext.RequestAborted);
|
|
|
+ if (_appOptions.Value.IsZiGong)
|
|
|
+ {
|
|
|
+ step.Steps = step.Steps.Where(x => x.Key.ToLower() != "start").ToList();
|
|
|
+ if (step.Steps.Where(x => x.BusinessType == EBusinessType.Department && x.OrgLevel == 1).Any())
|
|
|
+ {
|
|
|
+ var stepdDefault = step.Steps.Where(x => x.BusinessType == EBusinessType.Department && x.OrgLevel == 1)
|
|
|
+ .FirstOrDefault();
|
|
|
+ defaultStepKey = stepdDefault.Key;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (_appOptions.Value.IsYiBin)
|
|
|
+ {
|
|
|
+ if (order.ProcessType == EProcessType.Zhiban)
|
|
|
+ {
|
|
|
+ var stepdDefault = step.Steps.Where(x => x.Key.ToLower() == "start").FirstOrDefault();
|
|
|
+ defaultStepKey = stepdDefault.Key;
|
|
|
+ defaultHandlerKey = stepdDefault.Handler.Key;
|
|
|
+
|
|
|
+ }
|
|
|
+ if (order.ProcessType == EProcessType.Jiaoban)
|
|
|
+ {
|
|
|
+ if (step.Steps.Where(x => x.BusinessType == EBusinessType.Department && x.OrgLevel == 1).Any())
|
|
|
+ {
|
|
|
+ var stepdDefault = step.Steps.Where(x => x.BusinessType == EBusinessType.Department && x.OrgLevel == 1)
|
|
|
+ .FirstOrDefault();
|
|
|
+ defaultStepKey = stepdDefault.Key;
|
|
|
+ defaultHandlerKey = stepdDefault.Handler.Key;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //获取部门信息
|
|
|
+ var rsp = new
|
|
|
+ {
|
|
|
+ SpecialTimeType = EnumExts.GetDescriptions<ETimeType>(),
|
|
|
+ SpecialReason = isInstaShot
|
|
|
+ ? _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.InstaShotSpecialReason)
|
|
|
+ : _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.SpecialReason),
|
|
|
+ ReTransactErrorType = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.ReTransactErrorType),
|
|
|
+ IsTerminate =
|
|
|
+ await _orderTerminateRepository.Queryable().Where(d => d.OrderId == order.Id && d.Status == ETerminateStatus.End).AnyAsync(),
|
|
|
+ Step = step,
|
|
|
+ Orgs = orgs,
|
|
|
+ DefaultStepKey = defaultStepKey,
|
|
|
+ DefaultHandlerKey= defaultHandlerKey
|
|
|
+ };
|
|
|
+ return rsp;
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 部门批量重提 该部门及下级部门回访结果 不满意 未评价 视为满意
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("org_batch_special")]
|
|
|
[AllowAnonymous]
|
|
|
public async Task OrgBatchSpecial([FromBody] OrgBatchSpecialDto model)
|
|
|
{
|