|
@@ -112,6 +112,9 @@ namespace Hotline.Application.Orders
|
|
var model =await _orderSecondaryHandlingRepository.GetAsync(dto.Id, cancellationToken);
|
|
var model =await _orderSecondaryHandlingRepository.GetAsync(dto.Id, cancellationToken);
|
|
model.State = ESecondaryHandlingState.NotApply;
|
|
model.State = ESecondaryHandlingState.NotApply;
|
|
model.SendBackContent = dto.SendBackContent;
|
|
model.SendBackContent = dto.SendBackContent;
|
|
|
|
+ model.AuditUser = _sessionContext.UserName;
|
|
|
|
+ model.AuditTime = DateTime.Now;
|
|
|
|
+ model.SendBackNum = model.SendBackNum is null ? 1 : model.SendBackNum + 1;
|
|
await _orderSecondaryHandlingRepository.UpdateAsync(model, cancellationToken);
|
|
await _orderSecondaryHandlingRepository.UpdateAsync(model, cancellationToken);
|
|
var visit = await _orderVisitRepository.GetAsync(x => x.Id == model.VisitId , cancellationToken);
|
|
var visit = await _orderVisitRepository.GetAsync(x => x.Id == model.VisitId , cancellationToken);
|
|
if (visit != null)
|
|
if (visit != null)
|
|
@@ -128,7 +131,6 @@ namespace Hotline.Application.Orders
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
public async Task AuditAsync(AuditOrderSecondaryHandlingDto dto, OrderSecondaryHandling model, CancellationToken cancellationToken)
|
|
public async Task AuditAsync(AuditOrderSecondaryHandlingDto dto, OrderSecondaryHandling model, CancellationToken cancellationToken)
|
|
{
|
|
{
|
|
-
|
|
|
|
model.State = dto.State;
|
|
model.State = dto.State;
|
|
model.AuditContent = dto.AuditContent;
|
|
model.AuditContent = dto.AuditContent;
|
|
model.AuditId = _sessionContext.UserId;
|
|
model.AuditId = _sessionContext.UserId;
|
|
@@ -201,8 +203,8 @@ namespace Hotline.Application.Orders
|
|
.Includes(x => x.OrderVisit)
|
|
.Includes(x => x.OrderVisit)
|
|
.Includes(x => x.OrderVisit, y => y.Order)
|
|
.Includes(x => x.OrderVisit, y => y.Order)
|
|
.Includes(x => x.OrderVisit, y => y.Employee)
|
|
.Includes(x => x.OrderVisit, y => y.Employee)
|
|
- .Includes(x=>x.SecondaryHandling)
|
|
|
|
- .LeftJoin<OrderScreen>((x, s) => x.Id == s.VisitDetailId && s.Status < EScreenStatus.End && s.IsDeleted == false)
|
|
|
|
|
|
+ .Includes(x => x.SecondaryHandling)
|
|
|
|
+ .LeftJoin<OrderScreen>((x, s) => x.Id == s.VisitDetailId && s.Status < EScreenStatus.End && s.IsDeleted == false)
|
|
.Where((x, s) => s.Id == null && (x.SecondaryHandling.State == ESecondaryHandlingState.NotApply || x.SecondaryHandling.Id == null))
|
|
.Where((x, s) => s.Id == null && (x.SecondaryHandling.State == ESecondaryHandlingState.NotApply || x.SecondaryHandling.Id == null))
|
|
.WhereIF(dto.IsHomePage.HasValue && dto.IsHomePage == true, x => x.OrderVisit.VisitTime < dto.CreationTimeEnd && x.OrderVisit.VisitTime > dto.CreationTimeStart)
|
|
.WhereIF(dto.IsHomePage.HasValue && dto.IsHomePage == true, x => x.OrderVisit.VisitTime < dto.CreationTimeEnd && x.OrderVisit.VisitTime > dto.CreationTimeStart)
|
|
.WhereIF(!string.IsNullOrEmpty(dto.No), x => x.OrderVisit.Order!.No!.Contains(dto.No!))
|
|
.WhereIF(!string.IsNullOrEmpty(dto.No), x => x.OrderVisit.Order!.No!.Contains(dto.No!))
|
|
@@ -221,7 +223,9 @@ namespace Hotline.Application.Orders
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgProcessingResults), x => SqlFunc.JsonField(x.OrgProcessingResults, "Key") == dto.OrgProcessingResults)
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgProcessingResults), x => SqlFunc.JsonField(x.OrgProcessingResults, "Key") == dto.OrgProcessingResults)
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgHandledAttitude), x => SqlFunc.JsonListObjectAny(x.OrgHandledAttitude, "Key", dto.OrgHandledAttitude))
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgHandledAttitude), x => SqlFunc.JsonListObjectAny(x.OrgHandledAttitude, "Key", dto.OrgHandledAttitude))
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgNoSatisfiedReason), x => SqlFunc.JsonField(x.OrgNoSatisfiedReason, "Key") == dto.OrgNoSatisfiedReason)
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgNoSatisfiedReason), x => SqlFunc.JsonField(x.OrgNoSatisfiedReason, "Key") == dto.OrgNoSatisfiedReason)
|
|
- .Where((x, s) => x.OrderVisit.VisitState != EVisitState.None && x.OrderVisit.IsCanHandle);
|
|
|
|
|
|
+ .Where((x, s) => x.OrderVisit.VisitState != EVisitState.None && x.OrderVisit.IsCanHandle)
|
|
|
|
+ //.Where((x, s) => x.OrderVisit.Order.CounterSignType == null && x.OrderVisit.Order.ActualHandleOrgCode == _sessionContext.OrgId)
|
|
|
|
+ ;
|
|
if (_sessionContext.OrgId != null && !_sessionContext.OrgIsCenter)
|
|
if (_sessionContext.OrgId != null && !_sessionContext.OrgIsCenter)
|
|
{
|
|
{
|
|
query.WhereIF(!string.IsNullOrEmpty(dto.Keyword),
|
|
query.WhereIF(!string.IsNullOrEmpty(dto.Keyword),
|