|
@@ -72,31 +72,32 @@ public class OrderVisitRepository : BaseRepository<OrderVisit>, IOrderVisitRepos
|
|
|
|
|
|
if (orderVisit.VisitState == EVisitState.Visited)
|
|
|
{
|
|
|
- await _orderRepository.GetAsync(orderVisit.OrderId)
|
|
|
- .Then(async order => {
|
|
|
+ await _orderRepository.GetAsync(orderVisit.OrderId)
|
|
|
+ .Then(async order =>
|
|
|
+ {
|
|
|
order.Visited(replyTxt, replySplit[0]);
|
|
|
await _orderRepository.UpdateAsync(order);
|
|
|
});
|
|
|
|
|
|
}
|
|
|
- await _orderVisitDetailRepository.Queryable()
|
|
|
+ var detailOrg = await _orderVisitDetailRepository.Queryable()
|
|
|
.Where(m => m.VisitId == orderVisit.Id && m.VisitTarget == EVisitTarget.Org)
|
|
|
- .FirstAsync()
|
|
|
- .Then(async detailOrg =>
|
|
|
- {
|
|
|
- detailOrg.OrgProcessingResults = new Share.Dtos.Kv(visitSatisfaction.DicDataValue, visitSatisfaction.DicDataName);
|
|
|
- detailOrg.OrgHandledAttitude = new Share.Dtos.Kv(visitSatisfaction.DicDataValue, visitSatisfaction.DicDataName);
|
|
|
- await _orderVisitDetailRepository.UpdateAsync(detailOrg);
|
|
|
- });
|
|
|
+ .ToListAsync();
|
|
|
+ foreach (var item in detailOrg)
|
|
|
+ {
|
|
|
+ item.OrgProcessingResults = new Share.Dtos.Kv(visitSatisfaction.DicDataValue, visitSatisfaction.DicDataName);
|
|
|
+ item.OrgHandledAttitude = new Share.Dtos.Kv(visitSatisfaction.DicDataValue, visitSatisfaction.DicDataName);
|
|
|
+ await _orderVisitDetailRepository.UpdateAsync(item);
|
|
|
+ }
|
|
|
|
|
|
await _orderVisitDetailRepository.Queryable()
|
|
|
.Where(m => m.VisitId == orderVisit.Id && m.VisitTarget == EVisitTarget.Seat)
|
|
|
.FirstAsync()
|
|
|
- .Then(async detailSeat =>
|
|
|
- {
|
|
|
- detailSeat.SeatEvaluate ??= replySplit[2].ToEnum<ESeatEvaluate>();
|
|
|
+ .Then(async detailSeat =>
|
|
|
+ {
|
|
|
+ detailSeat.SeatEvaluate ??= replySplit[2].ToEnum<ESeatEvaluate>();
|
|
|
detailSeat.VoiceEvaluate ??= replySplit[3].ToEnum<EVoiceEvaluate>();
|
|
|
- await _orderVisitDetailRepository.UpdateAsync(detailSeat);
|
|
|
+ await _orderVisitDetailRepository.UpdateAsync(detailSeat);
|
|
|
});
|
|
|
}
|
|
|
}
|