|
@@ -988,18 +988,18 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
expiredTimeConfig.NearlyExpiredTime, expiredTimeConfig.NearlyExpiredTimeOne, dto.Workflow.Opinion,
|
|
|
_sessionContextProvider.SessionContext.RequiredUserId, _sessionContextProvider.SessionContext.UserName,
|
|
|
canUpdateOrderSender);
|
|
|
- //TODO发送短信即将超期
|
|
|
- //_capPublisher.PublishDelay(expiredTimeConfig.NearlyExpiredTime - DateTime.Now, EventNames.HotlineOrderNearlyExpiredTimeSms, new PublishNearlyExpiredTimeSmsDto() { OrderId = order.Id });
|
|
|
- //自动延期订阅
|
|
|
- var enabled = _systemSettingCacheManager.GetSetting(SettingConstants.EnabledAutomaticDelay)?.SettingValue[0];
|
|
|
- if (bool.Parse(enabled))
|
|
|
- {
|
|
|
- await _capPublisher.PublishDelayAsync(
|
|
|
- expiredTimeConfig.ExpiredTime - DateTime.Now.AddHours(1),
|
|
|
+ //TODO发送短信即将超期
|
|
|
+ //_capPublisher.PublishDelay(expiredTimeConfig.NearlyExpiredTime - DateTime.Now, EventNames.HotlineOrderNearlyExpiredTimeSms, new PublishNearlyExpiredTimeSmsDto() { OrderId = order.Id });
|
|
|
+ //自动延期订阅
|
|
|
+ var enabled = _systemSettingCacheManager.GetSetting(SettingConstants.EnabledAutomaticDelay)?.SettingValue[0];
|
|
|
+ if (bool.Parse(enabled))
|
|
|
+ {
|
|
|
+ await _capPublisher.PublishDelayAsync(
|
|
|
+ expiredTimeConfig.ExpiredTime - DateTime.Now.AddHours(1),
|
|
|
EventNames.HotlineOrderAutomaticDelay,
|
|
|
- new PublishAutomaticDelayDto() { OrderId = order.Id },
|
|
|
+ new PublishAutomaticDelayDto() { OrderId = order.Id },
|
|
|
cancellationToken: cancellationToken);
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
else if (dto.Workflow.FlowDirection is EFlowDirection.CenterToOrg)
|
|
|
{
|
|
@@ -1011,15 +1011,15 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
expiredTimeConfig.NearlyExpiredTime, expiredTimeConfig.NearlyExpiredTimeOne, dto.Workflow.Opinion,
|
|
|
_sessionContextProvider.SessionContext.RequiredUserId, _sessionContextProvider.SessionContext.UserName,
|
|
|
canUpdateOrderSender);
|
|
|
- //TODO发送短信即将超期
|
|
|
- //_capPublisher.PublishDelay(expiredTimeConfig.NearlyExpiredTime - DateTime.Now, EventNames.HotlineOrderNearlyExpiredTimeSms, new PublishNearlyExpiredTimeSmsDto() { OrderId = order.Id });
|
|
|
- //自动延期订阅
|
|
|
- var enabled = _systemSettingCacheManager.GetSetting(SettingConstants.EnabledAutomaticDelay)?.SettingValue[0];
|
|
|
- if (bool.Parse(enabled))
|
|
|
- {
|
|
|
- _capPublisher.PublishDelay(expiredTimeConfig.ExpiredTime - DateTime.Now.AddHours(1), EventNames.HotlineOrderAutomaticDelay,
|
|
|
- new PublishAutomaticDelayDto() { OrderId = order.Id });
|
|
|
- }
|
|
|
+ //TODO发送短信即将超期
|
|
|
+ //_capPublisher.PublishDelay(expiredTimeConfig.NearlyExpiredTime - DateTime.Now, EventNames.HotlineOrderNearlyExpiredTimeSms, new PublishNearlyExpiredTimeSmsDto() { OrderId = order.Id });
|
|
|
+ //自动延期订阅
|
|
|
+ var enabled = _systemSettingCacheManager.GetSetting(SettingConstants.EnabledAutomaticDelay)?.SettingValue[0];
|
|
|
+ if (bool.Parse(enabled))
|
|
|
+ {
|
|
|
+ _capPublisher.PublishDelay(expiredTimeConfig.ExpiredTime - DateTime.Now.AddHours(1), EventNames.HotlineOrderAutomaticDelay,
|
|
|
+ new PublishAutomaticDelayDto() { OrderId = order.Id });
|
|
|
+ }
|
|
|
}
|
|
|
else if (dto.Workflow.FlowDirection is EFlowDirection.CenterToCenter)
|
|
|
{
|
|
@@ -1029,15 +1029,15 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
order.CenterToCenter(expiredTimeConfig.TimeText, expiredTimeConfig.Count,
|
|
|
expiredTimeConfig.TimeType, expiredTimeConfig.ExpiredTime, expiredTimeConfig.NearlyExpiredTime,
|
|
|
expiredTimeConfig.NearlyExpiredTimeOne);
|
|
|
- //TODO发送短信即将超期
|
|
|
- //_capPublisher.PublishDelay(expiredTimeConfig.NearlyExpiredTime - DateTime.Now, EventNames.HotlineOrderNearlyExpiredTimeSms, new PublishNearlyExpiredTimeSmsDto() { OrderId = order.Id });
|
|
|
- //自动延期订阅
|
|
|
- var enabled = _systemSettingCacheManager.GetSetting(SettingConstants.EnabledAutomaticDelay)?.SettingValue[0];
|
|
|
- if (bool.Parse(enabled))
|
|
|
- {
|
|
|
- _capPublisher.PublishDelay(expiredTimeConfig.ExpiredTime - DateTime.Now.AddHours(1), EventNames.HotlineOrderAutomaticDelay,
|
|
|
- new PublishAutomaticDelayDto() { OrderId = order.Id });
|
|
|
- }
|
|
|
+ //TODO发送短信即将超期
|
|
|
+ //_capPublisher.PublishDelay(expiredTimeConfig.NearlyExpiredTime - DateTime.Now, EventNames.HotlineOrderNearlyExpiredTimeSms, new PublishNearlyExpiredTimeSmsDto() { OrderId = order.Id });
|
|
|
+ //自动延期订阅
|
|
|
+ var enabled = _systemSettingCacheManager.GetSetting(SettingConstants.EnabledAutomaticDelay)?.SettingValue[0];
|
|
|
+ if (bool.Parse(enabled))
|
|
|
+ {
|
|
|
+ _capPublisher.PublishDelay(expiredTimeConfig.ExpiredTime - DateTime.Now.AddHours(1), EventNames.HotlineOrderAutomaticDelay,
|
|
|
+ new PublishAutomaticDelayDto() { OrderId = order.Id });
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -1140,6 +1140,16 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
await _orderVisitRepository.UpdateAsync(visit, cancellationToken);
|
|
|
await _orderVisitedDetailRepository.UpdateRangeAsync(visit.OrderVisitDetails, cancellationToken);
|
|
|
await _orderRepository.UpdateAsync(visit.Order, cancellationToken);
|
|
|
+
|
|
|
+ //handle visit trace
|
|
|
+ //上面取得当前操作人,需求变动前暂时可以这样写
|
|
|
+ var visitor = new UserInfo(
|
|
|
+ _sessionContextProvider.SessionContext.UserId,
|
|
|
+ _sessionContextProvider.SessionContext.UserName,
|
|
|
+ _sessionContextProvider.SessionContext.OrgId,
|
|
|
+ _sessionContextProvider.SessionContext.OrgName);
|
|
|
+ await _workflowDomainService.HandleVisitTraceAsync(visit.Id, visitor, visit.VisitTime ?? DateTime.Now, cancellationToken);
|
|
|
+
|
|
|
var orderDto = _mapper.Map<OrderDto>(visit.Order);
|
|
|
await _publisher.PublishAsync(new UpdateOrderVisitNotify(visit.Adapt<OrderVisitNotifyDto>()), cancellationToken);
|
|
|
if (first != null)
|
|
@@ -1717,7 +1727,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
{
|
|
|
bool IsCenter = _sessionContextProvider.SessionContext.OrgIsCenter;
|
|
|
int orgLevel = _sessionContextProvider.SessionContext.OrgLevel;
|
|
|
- string orgLevelStr = ((orgLevel+1) * 3).ToString();
|
|
|
+ string orgLevelStr = ((orgLevel + 1) * 3).ToString();
|
|
|
var list = _orderVisitDetailRepository.Queryable()
|
|
|
.Where(x => x.OrderVisit.VisitTime >= dto.StartTime.Value && x.OrderVisit.VisitTime <= dto.EndTime.Value &&
|
|
|
x.VisitTarget == EVisitTarget.Org && x.OrderVisit.VisitState == EVisitState.Visited && !string.IsNullOrEmpty(x.VisitOrgCode))
|
|
@@ -1815,7 +1825,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgHandledAttitude, "Key") == "6", 1, 0))), //未接通
|
|
|
})
|
|
|
.MergeTable()
|
|
|
- .LeftJoin<SystemOrganize>((it, o) => it.OrgCode == o.Id && (o.Level == orgLevel || o.Level == (orgLevel+1)))
|
|
|
+ .LeftJoin<SystemOrganize>((it, o) => it.OrgCode == o.Id && (o.Level == orgLevel || o.Level == (orgLevel + 1)))
|
|
|
.Select((it, o) => new VisitAndOrgSatisfactionStatisticsDto()
|
|
|
{
|
|
|
OrgName = o.Name,
|
|
@@ -1857,7 +1867,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
.WhereIF(dto.VisitType != null, (x, it) => it.OrderVisit.VisitType == dto.VisitType)
|
|
|
.GroupBy((x, it) => new
|
|
|
{
|
|
|
- VisitOrgCode = it.VisitOrgCode.Substring(SqlFunc.MappingColumn<int>("0"),SqlFunc.MappingColumn<int>("9"))
|
|
|
+ VisitOrgCode = it.VisitOrgCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("9"))
|
|
|
})
|
|
|
.Select((x, it) => new VisitAndOrgSatisfactionStatisticsDto()
|
|
|
{
|
|
@@ -2593,7 +2603,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
.Select(x => new OrderScreenAuditVo
|
|
|
{
|
|
|
AuditName = x.HandlerName,
|
|
|
- AuditNum = SqlFunc.AggregateSum(SqlFunc.IIF(x.WorkflowTraceType == EWorkflowTraceType.Normal && x.TraceState == EWorkflowTraceState.Normal, 1, 0)),
|
|
|
+ AuditNum = SqlFunc.AggregateSum(SqlFunc.IIF(x.TraceType == EWorkflowTraceType.Normal && x.TraceState == EWorkflowTraceState.Normal, 1, 0)),
|
|
|
AuditBackNum = SqlFunc.AggregateSum(SqlFunc.IIF(x.TraceState == EWorkflowTraceState.StepRemoveByPrevious, 1, 0)),
|
|
|
});
|
|
|
return query;
|
|
@@ -2900,7 +2910,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
var query = _orderVisitRepository.Queryable()
|
|
|
.Includes(d => d.Order)
|
|
|
.Includes(d => d.Employee)
|
|
|
- .Includes(d=>d.OrderVisitDetails)
|
|
|
+ .Includes(d => d.OrderVisitDetails)
|
|
|
.WhereIF(dto.VisitStateQuery == EVisitStateQuery.NoVisit,
|
|
|
d => d.VisitState == EVisitState.WaitForVisit ||
|
|
|
d.VisitState == EVisitState.NoSatisfiedWaitForVisit)
|
|
@@ -2951,23 +2961,23 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
return query;
|
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 热点类型小类统计明细
|
|
|
- /// </summary>
|
|
|
- /// <param name="dto"></param>
|
|
|
- /// <returns></returns>
|
|
|
+ /// <summary>
|
|
|
+ /// 热点类型小类统计明细
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
|
|
|
- public ISugarQueryable<Order> HotspotStatisticsDetail(HotspotStatisticsRep dto)
|
|
|
+ public ISugarQueryable<Order> HotspotStatisticsDetail(HotspotStatisticsRep dto)
|
|
|
{
|
|
|
- var IsCenter = _sessionContext.OrgIsCenter;
|
|
|
- var query = _orderRepository.Queryable()
|
|
|
- .Includes(d => d.OrderVisits)
|
|
|
- .Where(d => d.CreationTime >= dto.StartTime && d.CreationTime <= dto.EndTime)
|
|
|
- .Where(d => d.HotspotId.StartsWith(dto.HotspotCode))
|
|
|
- .WhereIF(dto.TypeId == 1, d => d.IdentityType == EIdentityType.Citizen)
|
|
|
- .WhereIF(dto.TypeId == 2, d => d.IdentityType == EIdentityType.Enterprise)
|
|
|
- .WhereIF(IsCenter == false, d => d.ActualHandleOrgCode.StartsWith(_sessionContext.RequiredOrgId));
|
|
|
- return query;
|
|
|
+ var IsCenter = _sessionContext.OrgIsCenter;
|
|
|
+ var query = _orderRepository.Queryable()
|
|
|
+ .Includes(d => d.OrderVisits)
|
|
|
+ .Where(d => d.CreationTime >= dto.StartTime && d.CreationTime <= dto.EndTime)
|
|
|
+ .Where(d => d.HotspotId.StartsWith(dto.HotspotCode))
|
|
|
+ .WhereIF(dto.TypeId == 1, d => d.IdentityType == EIdentityType.Citizen)
|
|
|
+ .WhereIF(dto.TypeId == 2, d => d.IdentityType == EIdentityType.Enterprise)
|
|
|
+ .WhereIF(IsCenter == false, d => d.ActualHandleOrgCode.StartsWith(_sessionContext.RequiredOrgId));
|
|
|
+ return query;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|