|
@@ -2995,7 +2995,7 @@ public class OrderController : BaseController
|
|
dto.IsReturnUnderApproval = true;
|
|
dto.IsReturnUnderApproval = true;
|
|
}
|
|
}
|
|
//省退回
|
|
//省退回
|
|
- var orderSendback = await _orderSendBackRepository.Queryable().Where(x => x.OrderId == order.Id).OrderByDescending(x=>x.AuditTime).FirstAsync();
|
|
|
|
|
|
+ var orderSendback = await _orderSendBackRepository.Queryable().Where(x => x.OrderId == order.Id).OrderByDescending(x => x.AuditTime).FirstAsync();
|
|
if (orderSendback is not null)
|
|
if (orderSendback is not null)
|
|
{
|
|
{
|
|
string stateStr = "";
|
|
string stateStr = "";
|
|
@@ -3015,7 +3015,7 @@ public class OrderController : BaseController
|
|
stateStr = "未知";
|
|
stateStr = "未知";
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- dto.ProvinceSendBackString = "该工单已向省平台发送退回申请!退回状态:"+ stateStr;
|
|
|
|
|
|
+ dto.ProvinceSendBackString = "该工单已向省平台发送退回申请!退回状态:" + stateStr;
|
|
}
|
|
}
|
|
|
|
|
|
var isProvinceorderRevoke = await _orderRevokeRepository.Queryable().AnyAsync(x => x.OrderId == order.Id && x.IsProRevoke == true);
|
|
var isProvinceorderRevoke = await _orderRevokeRepository.Queryable().AnyAsync(x => x.OrderId == order.Id && x.IsProRevoke == true);
|
|
@@ -3748,9 +3748,9 @@ public class OrderController : BaseController
|
|
var (total, items) = await _orderRepository
|
|
var (total, items) = await _orderRepository
|
|
.Queryable(hasHandled: isHandled, isAdmin: isAdmin)
|
|
.Queryable(hasHandled: isHandled, isAdmin: isAdmin)
|
|
.Includes(d => d.OrderSpecials)
|
|
.Includes(d => d.OrderSpecials)
|
|
- .Where(d => d.Status != EOrderStatus.WaitForAccept &&
|
|
|
|
- d.Status != EOrderStatus.BackToUnAccept &&
|
|
|
|
- d.Status != EOrderStatus.SpecialToUnAccept &&
|
|
|
|
|
|
+ .Where(d => d.Status != EOrderStatus.WaitForAccept &&
|
|
|
|
+ d.Status != EOrderStatus.BackToUnAccept &&
|
|
|
|
+ d.Status != EOrderStatus.SpecialToUnAccept &&
|
|
d.Status != EOrderStatus.HandOverToUnAccept)
|
|
d.Status != EOrderStatus.HandOverToUnAccept)
|
|
.WhereIF(dto.IsProvince.HasValue, d => d.IsProvince == dto.IsProvince)
|
|
.WhereIF(dto.IsProvince.HasValue, d => d.IsProvince == dto.IsProvince)
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword), d => d.Title.StartsWith(dto.Keyword))
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword), d => d.Title.StartsWith(dto.Keyword))
|
|
@@ -3772,7 +3772,7 @@ public class OrderController : BaseController
|
|
.WhereIF(dto.IsUrgent.HasValue, d => d.IsUrgent == dto.IsUrgent!.Value)
|
|
.WhereIF(dto.IsUrgent.HasValue, d => d.IsUrgent == dto.IsUrgent!.Value)
|
|
.OrderByDescending(d => new { d.IsUrgent, d.StartTime })
|
|
.OrderByDescending(d => new { d.IsUrgent, d.StartTime })
|
|
.ToPagedListAsync(dto, HttpContext.RequestAborted);
|
|
.ToPagedListAsync(dto, HttpContext.RequestAborted);
|
|
-
|
|
|
|
|
|
+
|
|
return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
|
|
return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4054,7 +4054,7 @@ public class OrderController : BaseController
|
|
if (averageSendOrder)
|
|
if (averageSendOrder)
|
|
{
|
|
{
|
|
var handler = await _orderDomainService.AverageOrder(HttpContext.RequestAborted);
|
|
var handler = await _orderDomainService.AverageOrder(HttpContext.RequestAborted);
|
|
- dto.NextHandlers = new List<FlowStepHandler> { handler };
|
|
|
|
|
|
+ dto.Handler = handler;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4354,7 +4354,7 @@ public class OrderController : BaseController
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
- if (order.Status >= EOrderStatus.Filed || order.Status == EOrderStatus.BackToProvince || !order.IsProvince || order.ActualHandleOrgCode!="001")
|
|
|
|
|
|
+ if (order.Status >= EOrderStatus.Filed || order.Status == EOrderStatus.BackToProvince || !order.IsProvince || (!string.IsNullOrEmpty(order.ActualHandleOrgCode) && order.ActualHandleOrgCode != "001"))
|
|
{
|
|
{
|
|
errorCount++;
|
|
errorCount++;
|
|
continue;
|
|
continue;
|
|
@@ -4405,7 +4405,7 @@ public class OrderController : BaseController
|
|
var order = await _orderRepository.GetAsync(dto.OrderId, HttpContext.RequestAborted);
|
|
var order = await _orderRepository.GetAsync(dto.OrderId, HttpContext.RequestAborted);
|
|
if (order is null)
|
|
if (order is null)
|
|
throw UserFriendlyException.SameMessage("无效工单");
|
|
throw UserFriendlyException.SameMessage("无效工单");
|
|
- if (order.Status >= EOrderStatus.Filed || order.Status == EOrderStatus.BackToProvince || !order.IsProvince || order.ActualHandleOrgCode != "001")
|
|
|
|
|
|
+ if (order.Status >= EOrderStatus.Filed || order.Status == EOrderStatus.BackToProvince || !order.IsProvince || (!string.IsNullOrEmpty(order.ActualHandleOrgCode) && order.ActualHandleOrgCode != "001"))
|
|
throw UserFriendlyException.SameMessage("工单状态无效,请确认当前工单状态");
|
|
throw UserFriendlyException.SameMessage("工单状态无效,请确认当前工单状态");
|
|
if (order.Source <= ESource.HotlineImport)
|
|
if (order.Source <= ESource.HotlineImport)
|
|
throw UserFriendlyException.SameMessage("工单来源无效,请确认当前工单来源");
|
|
throw UserFriendlyException.SameMessage("工单来源无效,请确认当前工单来源");
|
|
@@ -6162,7 +6162,7 @@ public class OrderController : BaseController
|
|
|
|
|
|
order.FirstVisitResultCode = _sysDicDataCacheManager
|
|
order.FirstVisitResultCode = _sysDicDataCacheManager
|
|
.GetSysDicDataCache(SysDicTypeConsts.VisitSatisfaction)
|
|
.GetSysDicDataCache(SysDicTypeConsts.VisitSatisfaction)
|
|
- .FirstOrDefault(m => m.DicDataName == item.VisitResult)?.DicDataValue
|
|
|
|
|
|
+ .FirstOrDefault(m => m.DicDataName == item.VisitResult)?.DicDataValue
|
|
?? order.FirstVisitResultCode;
|
|
?? order.FirstVisitResultCode;
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
@@ -6170,7 +6170,7 @@ public class OrderController : BaseController
|
|
if (order.Id.IsNullOrEmpty())
|
|
if (order.Id.IsNullOrEmpty())
|
|
{
|
|
{
|
|
//order.Source = item;
|
|
//order.Source = item;
|
|
- var id = await _orderDomainService.AddAsync(order,false, HttpContext.RequestAborted);
|
|
|
|
|
|
+ var id = await _orderDomainService.AddAsync(order, false, HttpContext.RequestAborted);
|
|
if (!string.IsNullOrEmpty(id))
|
|
if (!string.IsNullOrEmpty(id))
|
|
{
|
|
{
|
|
addCount++;
|
|
addCount++;
|
|
@@ -6581,14 +6581,15 @@ public class OrderController : BaseController
|
|
/// <param name="dto"></param>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpPost("modify-externalcitizens")]
|
|
[HttpPost("modify-externalcitizens")]
|
|
- public async Task ModifyExternalcitizens([FromBody]ModifyExternalcitizensDto dto)
|
|
|
|
|
|
+ public async Task ModifyExternalcitizens([FromBody] ModifyExternalcitizensDto dto)
|
|
{
|
|
{
|
|
-
|
|
|
|
|
|
+ if (dto.PhoneNum.Length != 11)
|
|
|
|
+ throw UserFriendlyException.SameMessage("手机号不合法");
|
|
bool isHas = await _externalCitizensRepository.Queryable().AnyAsync(x => x.Id != dto.Id && x.PhoneNum == dto.PhoneNum);
|
|
bool isHas = await _externalCitizensRepository.Queryable().AnyAsync(x => x.Id != dto.Id && x.PhoneNum == dto.PhoneNum);
|
|
if (isHas)
|
|
if (isHas)
|
|
throw UserFriendlyException.SameMessage("已存在当前电话,请核对后再修改");
|
|
throw UserFriendlyException.SameMessage("已存在当前电话,请核对后再修改");
|
|
var model = await _externalCitizensRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
|
|
var model = await _externalCitizensRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
|
|
- if( model == null )
|
|
|
|
|
|
+ if (model == null)
|
|
throw UserFriendlyException.SameMessage("无效数据");
|
|
throw UserFriendlyException.SameMessage("无效数据");
|
|
model.PhoneNum = dto.PhoneNum;
|
|
model.PhoneNum = dto.PhoneNum;
|
|
model.Name = dto.Name;
|
|
model.Name = dto.Name;
|