|
@@ -703,9 +703,11 @@ public class OrderController : BaseController
|
|
|
{
|
|
|
if (order.Source != ESource.ProvinceStraight && order.FileOrgIsCenter.Value == false)
|
|
|
{
|
|
|
+ var isOpenSendVisitSms = _systemSettingCacheManager.GetSetting(SettingConstants.IsOpenSendVisitSms)?.SettingValue[0];
|
|
|
+
|
|
|
var code = "";
|
|
|
//受理类型为“投诉、举报”
|
|
|
- if ((order.AcceptTypeCode == "30" || order.AcceptTypeCode == "35") && orderVisit.VisitState != EVisitState.Visited)
|
|
|
+ if ((order.AcceptTypeCode == "30" || order.AcceptTypeCode == "35") && orderVisit.VisitState != EVisitState.Visited && isOpenSendVisitSms == "true")
|
|
|
{
|
|
|
code = "1017";
|
|
|
orderVisit.VisitState = EVisitState.SMSVisiting;
|
|
@@ -4393,15 +4395,13 @@ public class OrderController : BaseController
|
|
|
if (_systemSettingCacheManager.Snapshot)
|
|
|
{
|
|
|
await _orderSnapshotRepository.Queryable()
|
|
|
- .Where(m => m.Id == order.Id)
|
|
|
- .Select(m => new { m.IndustryId, m.IndustryName, m.IndustryCase })
|
|
|
+ .LeftJoin<IndustryCase>((snapshot, industryCase) => snapshot.IndustryCase == industryCase.Id)
|
|
|
+ .Where((snapshot, industryCase) => snapshot.Id == order.Id)
|
|
|
+ .Select((snapshot, industryCase) => new { snapshot.IndustryId, snapshot.IndustryName, industryCase.Name, })
|
|
|
.FirstAsync(HttpContext.RequestAborted)
|
|
|
.Then(async snapshot =>
|
|
|
{
|
|
|
- if (snapshot.IndustryCase.IsNullOrEmpty())
|
|
|
- dto.IndustryName = snapshot.IndustryName;
|
|
|
- else
|
|
|
- dto.IndustryName = snapshot.IndustryName + " " + snapshot.IndustryCase;
|
|
|
+ dto.IndustryName = snapshot.IndustryName + " " + snapshot.Name;
|
|
|
dto.IndustryId = snapshot.IndustryId;
|
|
|
});
|
|
|
}
|
|
@@ -4453,6 +4453,15 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (_systemSettingCacheManager.Snapshot)
|
|
|
+ {
|
|
|
+ await _orderSnapshotRepository.Queryable()
|
|
|
+ .Where(m => m.Id == id)
|
|
|
+ .Select(m => new { m.IndustryId, m.IndustryName })
|
|
|
+ .FirstAsync(HttpContext.RequestAborted)
|
|
|
+ .Then(m => { dto.IndustryName = m.IndustryName; dto.IndustryId = m.IndustryId; });
|
|
|
+ }
|
|
|
+
|
|
|
return _sessionContext.OrgIsCenter ? dto : dto.DataMask();
|
|
|
}
|
|
|
|
|
@@ -4760,6 +4769,14 @@ public class OrderController : BaseController
|
|
|
if (dto.IsEdit != true && order.Status > EOrderStatus.HandOverToUnAccept)
|
|
|
throw UserFriendlyException.SameMessage("工单已发起流程,不可编辑");
|
|
|
}
|
|
|
+ if (_systemSettingCacheManager.Snapshot)
|
|
|
+ {
|
|
|
+ await _orderSnapshotRepository.Updateable()
|
|
|
+ .SetColumns(m => m.IndustryId, dto.IndustryId)
|
|
|
+ .SetColumns(m => m.IndustryName, dto.IndustryName)
|
|
|
+ .Where(m => m.Id == dto.Id)
|
|
|
+ .ExecuteCommandAsync();
|
|
|
+ }
|
|
|
|
|
|
// 副本工单
|
|
|
var copy = new OrderCopy();
|
|
@@ -4998,27 +5015,31 @@ public class OrderController : BaseController
|
|
|
[HttpGet("startflow")]
|
|
|
public async Task<NextStepsDto> GetFlowStartOptions([FromQuery] string? orderId)
|
|
|
{
|
|
|
- var outDto = await _workflowApplication.GetStartStepsAsync(WorkflowModuleConsts.OrderHandle,
|
|
|
+ var dto = await _workflowApplication.GetStartStepsAsync(WorkflowModuleConsts.OrderHandle,
|
|
|
HttpContext.RequestAborted);
|
|
|
if (orderId.NotNullOrEmpty())
|
|
|
{
|
|
|
- outDto.Opinion = await _typeCache.GetAsync($"tmp_opinion_{orderId}{_sessionContext.UserId}", HttpContext.RequestAborted);
|
|
|
- outDto.Content = (await _orderRepository.GetAsync(orderId, HttpContext.RequestAborted))?.Content;
|
|
|
+ dto.Opinion = await _typeCache.GetAsync($"tmp_opinion_{orderId}{_sessionContext.UserId}", HttpContext.RequestAborted);
|
|
|
+ dto.Content = (await _orderRepository.GetAsync(orderId, HttpContext.RequestAborted))?.Content;
|
|
|
}
|
|
|
|
|
|
//随手拍
|
|
|
- bool.TryParse(_systemSettingCacheManager.GetSetting(SettingConstants.Snapshot)?.SettingValue[0],
|
|
|
- out bool isSnapshotEnable);
|
|
|
+ var isSnapshotEnable = _systemSettingCacheManager.Snapshot;
|
|
|
+ var isAqyh = false;//行业类型是否为随手拍安全隐患
|
|
|
if (isSnapshotEnable)
|
|
|
{
|
|
|
- var orderSnapshot = await _orderSnapshotRepository.GetAsync(orderId, HttpContext.RequestAborted);
|
|
|
- if (orderSnapshot != null && string.CompareOrdinal(orderSnapshot.IndustryName, "安全隐患") == 0)
|
|
|
+ var orderSnapShot = await _orderSnapshotRepository.GetAsync(orderId, HttpContext.RequestAborted);
|
|
|
+ if(orderSnapShot != null && string.CompareOrdinal(orderSnapShot.IndustryName, "安全隐患") == 0)
|
|
|
{
|
|
|
- outDto.Steps = outDto.Steps.Where(d => d.BusinessType != EBusinessType.Send).ToList();
|
|
|
+ isAqyh = true;
|
|
|
+ dto.Steps.RemoveAll(d => d.BusinessType == EBusinessType.Send);
|
|
|
}
|
|
|
}
|
|
|
+ if (!isAqyh)
|
|
|
+ dto.Steps = dto.Steps.Where(d => string.CompareOrdinal(d.Value, "网格员") != 0
|
|
|
+ && string.CompareOrdinal(d.Value, "工单标记") != 0).ToList();
|
|
|
|
|
|
- return outDto;
|
|
|
+ return dto;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -5269,7 +5290,7 @@ public class OrderController : BaseController
|
|
|
orderHandleFlowDto.CrossSteps = orderHandleFlowDto.CrossSteps.OrderBy(d => d.Sort).ToList();
|
|
|
var stepCount = orderHandleFlowDto.CrossSteps.Count;
|
|
|
var unhandleSteps = new List<WorkflowStep> { startStep };
|
|
|
- for (int i = 0; i < stepCount; i++)
|
|
|
+ for (int i = 0;i < stepCount;i++)
|
|
|
{
|
|
|
var crossStep = orderHandleFlowDto.CrossSteps[i];
|
|
|
var tempSteps = new List<WorkflowStep>();
|
|
@@ -5461,15 +5482,15 @@ public class OrderController : BaseController
|
|
|
if (string.IsNullOrEmpty(order.WorkflowId))
|
|
|
throw UserFriendlyException.SameMessage("该工单未开启流程");
|
|
|
var dto = await _workflowApplication.GetNextStepsAsync(order.WorkflowId, HttpContext.RequestAborted);
|
|
|
+ var isAqyh = false;//行业类型是否为随手拍安全隐患
|
|
|
if (isSnapshotEnable)
|
|
|
{
|
|
|
var orderSnapShot = await _orderSnapshotRepository.GetAsync(orderId, HttpContext.RequestAborted);
|
|
|
- if (orderSnapShot != null && string.CompareOrdinal(orderSnapShot.IndustryName, "安全隐患") != 0)
|
|
|
- {
|
|
|
- dto.Steps = dto.Steps.Where(d => string.CompareOrdinal(d.Value, "网格员") != 0
|
|
|
- && string.CompareOrdinal(d.Value, "工单标记") != 0).ToList();
|
|
|
- }
|
|
|
+ isAqyh = orderSnapShot != null && string.CompareOrdinal(orderSnapShot.IndustryName, "安全隐患") == 0;
|
|
|
}
|
|
|
+ if(!isAqyh)
|
|
|
+ dto.Steps = dto.Steps.Where(d => string.CompareOrdinal(d.Value, "网格员") != 0
|
|
|
+ && string.CompareOrdinal(d.Value, "工单标记") != 0).ToList();
|
|
|
|
|
|
dto.ExpiredTime = order.ExpiredTime;
|
|
|
dto.Content = order.Content;
|