|
@@ -59,6 +59,7 @@ using Hotline.Share.Requests;
|
|
|
using Hotline.Share.Tools;
|
|
|
using Hotline.Snapshot;
|
|
|
using Hotline.Snapshot.IRepository;
|
|
|
+using Hotline.Special;
|
|
|
using Hotline.Tools;
|
|
|
using Hotline.Users;
|
|
|
using Hotline.Validators.FlowEngine;
|
|
@@ -1463,6 +1464,10 @@ public class OrderController : BaseController
|
|
|
dto.CallId = await _callApplication.PublishVisitRelevanceCallIdAsync(dto.Adapt<OrderRelevanceCallIdDto>(), HttpContext.RequestAborted);
|
|
|
dto.CallId = await _callApplication.GetOrSetCallIdAsync(dto.CallId, HttpContext.RequestAborted);
|
|
|
await _orderApplication.SaveOrderVisit(dto, HttpContext.RequestAborted);
|
|
|
+ if (dto.IsTransact.HasValue && dto.IsTransact.Value)
|
|
|
+ {
|
|
|
+ await Add(dto.OrderReTransact);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -4225,11 +4230,19 @@ public class OrderController : BaseController
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword), d => d.Title.Contains(dto.Keyword!) || d.No.Contains(dto.Keyword!))
|
|
|
.Select(d => new OrderHistoryOutDto
|
|
|
{
|
|
|
+ Id = d.Id,
|
|
|
+ Title = d.Title,
|
|
|
+ No = d.No,
|
|
|
+ CurrentStepName = d.CurrentStepName,
|
|
|
+ CreationTime = d.CreationTime,
|
|
|
+ ActualHandleOrgName = d.ActualHandleOrgName,
|
|
|
+ Status = d.Status,
|
|
|
IsScreen = d.OrderScreens.Any(x => x.Status == EScreenStatus.End),
|
|
|
- TerminateStatus = d.OrderTerminates.OrderByDescending(p => p.CreationTime).Select(p => p.Status).FirstOrDefault()
|
|
|
- }, true)
|
|
|
- //.MergeTable()
|
|
|
- //.OrderByIF(_appOptions.Value.IsZiGong, d => d.TerminateStatus, OrderByType.Desc)
|
|
|
+ IsTerminate = d.OrderTerminates.Any(p => p.Status == ETerminateStatus.End),
|
|
|
+ //TerminateStatus = SqlFunc.Subqueryable<OrderTerminate>().Where(s => s.OrderId == d.Id).OrderByDesc(s => s.CreationTime).Select(s => s.Status)
|
|
|
+ })
|
|
|
+ .MergeTable()
|
|
|
+ .OrderByIF(_appOptions.Value.IsZiGong, d => d.IsTerminate, OrderByType.Desc)
|
|
|
.OrderByDescending(d => d.CreationTime)
|
|
|
.ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
return new PagedDto<OrderHistoryOutDto>(total, _mapper.Map<IReadOnlyList<OrderHistoryOutDto>>(items));
|
|
@@ -4653,16 +4666,14 @@ public class OrderController : BaseController
|
|
|
//工单保存特殊身份验证
|
|
|
var specialIdentityVerification =
|
|
|
bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.SpecialIdentityVerification).SettingValue[0]);
|
|
|
+ var specialNumber = await _specialNumberRepository.GetAsync(p => p.PhoneNumber == dto.FromPhone, HttpContext.RequestAborted);
|
|
|
if (specialIdentityVerification)
|
|
|
{
|
|
|
- var specialNumber = await _specialNumberRepository.GetAsync(p => p.PhoneNumber == dto.FromPhone, HttpContext.RequestAborted);
|
|
|
if (specialNumber != null && specialNumber.PoliticalIdentityValue == "1")
|
|
|
{
|
|
|
- if (dto.OrderPushTypes == null || dto.OrderPushTypes.Count() == 0)
|
|
|
+ if (dto.OrderPushTypes == null || dto.OrderPushTypes.Count() == 0 || dto.OrderPushTypes.Exists(p => p.PushTypeCode == "9") == false)
|
|
|
throw UserFriendlyException.SameMessage("人大代表来电,请选择推送分类人大代表意见快办!");
|
|
|
|
|
|
- if (dto.OrderPushTypes.Exists(p => p.PushTypeCode == "9") == false)
|
|
|
- throw UserFriendlyException.SameMessage("人大代表来电,请选择推送分类人大代表意见快办!");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -4705,6 +4716,11 @@ public class OrderController : BaseController
|
|
|
var order = _mapper.Map<Orders.Order>(dto);
|
|
|
order.SignerId = _sessionContext.UserId;
|
|
|
order.SignerName = _sessionContext.UserName;
|
|
|
+ if (specialNumber != null)
|
|
|
+ {
|
|
|
+ order.PoliticalIdentityValue = specialNumber.PoliticalIdentityValue;
|
|
|
+ order.PoliticalIdentityName = specialNumber.PoliticalIdentityName;
|
|
|
+ }
|
|
|
order.InitId();
|
|
|
if (dto.Files.Any())
|
|
|
order.FileJson = await _fileRepository.AddFileAsync(dto.Files, order.Id, "", HttpContext.RequestAborted);
|
|
@@ -4913,15 +4929,12 @@ public class OrderController : BaseController
|
|
|
//工单保存特殊身份验证
|
|
|
var specialIdentityVerification =
|
|
|
bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.SpecialIdentityVerification).SettingValue[0]);
|
|
|
+ var specialNumber = await _specialNumberRepository.GetAsync(p => p.PhoneNumber == dto.FromPhone, HttpContext.RequestAborted);
|
|
|
if (specialIdentityVerification)
|
|
|
{
|
|
|
- var specialNumber = await _specialNumberRepository.GetAsync(p => p.PhoneNumber == dto.FromPhone, HttpContext.RequestAborted);
|
|
|
if (specialNumber != null && specialNumber.PoliticalIdentityValue == "1")
|
|
|
{
|
|
|
- if (dto.OrderPushTypes == null || dto.OrderPushTypes.Count() == 0)
|
|
|
- throw UserFriendlyException.SameMessage("人大代表来电,请选择推送分类人大代表意见快办!");
|
|
|
-
|
|
|
- if (dto.OrderPushTypes.Exists(p => p.PushTypeCode == "9") == false)
|
|
|
+ if (dto.OrderPushTypes == null || dto.OrderPushTypes.Count() == 0 || dto.OrderPushTypes.Exists(p => p.PushTypeCode == "9") == false)
|
|
|
throw UserFriendlyException.SameMessage("人大代表来电,请选择推送分类人大代表意见快办!");
|
|
|
}
|
|
|
}
|
|
@@ -4998,6 +5011,12 @@ public class OrderController : BaseController
|
|
|
if (order.SourceChannelCode != AppDefaults.SourceChannel.DianHua)
|
|
|
order.CallId = null;
|
|
|
|
|
|
+ if (specialNumber != null)
|
|
|
+ {
|
|
|
+ order.PoliticalIdentityValue = specialNumber.PoliticalIdentityValue;
|
|
|
+ order.PoliticalIdentityName = specialNumber.PoliticalIdentityName;
|
|
|
+ }
|
|
|
+
|
|
|
if (dto.IsEdit && !string.IsNullOrEmpty(dto.CenterOpinion) && order.CenterToOrgOpinion != dto.CenterOpinion)
|
|
|
order.CenterToOrgOpinion = dto.CenterOpinion;
|
|
|
if (dto.IsEdit && !string.IsNullOrEmpty(dto.FileOpinion) && order.FileOpinion != dto.FileOpinion)
|
|
@@ -5831,7 +5850,8 @@ public class OrderController : BaseController
|
|
|
CurrentStepOptions = definition?.Steps.Select(x => new Kv(x.Code, x.Name)),
|
|
|
IdentityTypeOptions = EnumExts.GetDescriptions<EIdentityType>(),
|
|
|
OrderTags = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.OrderTag),
|
|
|
- FocusOnEvents = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.FocusOnEvent)
|
|
|
+ FocusOnEvents = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.FocusOnEvent),
|
|
|
+ PoliticalIdentity = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.PoliticalIdentity)
|
|
|
};
|
|
|
return rsp;
|
|
|
}
|
|
@@ -9415,6 +9435,7 @@ public class OrderController : BaseController
|
|
|
{
|
|
|
var (total, items) = await _orderCopyRepository.Queryable()
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword), x => x.No.Contains(dto.Keyword!))
|
|
|
+ .WhereIF(_appOptions.Value.IsLuZhou,x=>x.AuditSource == EOrderUpdateSource.Alter)
|
|
|
.OrderByDescending(x => x.CreationTime)
|
|
|
.ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
|