|
@@ -1323,18 +1323,20 @@ public class OrderController : BaseController
|
|
|
model.LaunchOrgName = _sessionContext.OrgName;
|
|
|
model.CrUser = _sessionContext.UserName;
|
|
|
model.State = 0;
|
|
|
- var id = await _orderSuperviseRepository.AddAsync(model, HttpContext.RequestAborted);
|
|
|
- if (dto.Files.Any()) await _fileRepository.AddFileAsync(dto.Files, id, HttpContext.RequestAborted);
|
|
|
+ model.InitId();
|
|
|
+ if (dto.Files.Any()) model.FileJson = await _fileRepository.AddFileAsync(dto.Files, model.Id, HttpContext.RequestAborted);
|
|
|
+ await _orderSuperviseRepository.AddAsync(model, HttpContext.RequestAborted);
|
|
|
+
|
|
|
if (dto.AcceptSms)
|
|
|
{
|
|
|
//TODO 发送短信
|
|
|
}
|
|
|
|
|
|
//推省上
|
|
|
- if (!string.IsNullOrEmpty(id) && order.Source == ESource.ProvinceStraight)
|
|
|
+ if (!string.IsNullOrEmpty(model.Id) && order.Source == ESource.ProvinceStraight)
|
|
|
{
|
|
|
var orderDto = _mapper.Map<OrderDto>(order);
|
|
|
- var supervise = await _orderSuperviseRepository.GetAsync(x => x.Id == id);
|
|
|
+ var supervise = await _orderSuperviseRepository.GetAsync(x => x.Id == model.Id);
|
|
|
if (supervise != null)
|
|
|
{
|
|
|
var superviseDto = _mapper.Map<SuperviseOrderDto>(supervise);
|
|
@@ -1368,7 +1370,7 @@ public class OrderController : BaseController
|
|
|
supervise.ReUser = _sessionContext.UserName;
|
|
|
supervise.ReplyTime = DateTime.Now;
|
|
|
supervise.State = 1;
|
|
|
- if (dto.Files.Any()) await _fileRepository.AddFileAsync(dto.Files, supervise.Id, HttpContext.RequestAborted);
|
|
|
+ if (dto.Files.Any()) supervise.ReplyFileJson = await _fileRepository.AddFileAsync(dto.Files, supervise.Id, HttpContext.RequestAborted);
|
|
|
await _orderSuperviseRepository.UpdateAsync(supervise, HttpContext.RequestAborted);
|
|
|
var order = await _orderRepository.GetAsync(supervise.OrderId, HttpContext.RequestAborted);
|
|
|
//推省上
|
|
@@ -1480,18 +1482,19 @@ public class OrderController : BaseController
|
|
|
model.CreatorOrgName = _sessionContext.OrgName;
|
|
|
model.CrUser = _sessionContext.UserName;
|
|
|
model.State = 0;
|
|
|
- var id = await _orderUrgeRepository.AddAsync(model, HttpContext.RequestAborted);
|
|
|
- if (dto.Files.Any()) await _fileRepository.AddFileAsync(dto.Files, id, HttpContext.RequestAborted);
|
|
|
+ model.InitId();
|
|
|
+ if (dto.Files.Any()) await _fileRepository.AddFileAsync(dto.Files, model.Id, HttpContext.RequestAborted);
|
|
|
+ await _orderUrgeRepository.AddAsync(model, HttpContext.RequestAborted);
|
|
|
if (dto.AcceptSms)
|
|
|
{
|
|
|
//TODO 发送短信
|
|
|
}
|
|
|
|
|
|
//推省上
|
|
|
- if (!string.IsNullOrEmpty(id) && order.Source == ESource.ProvinceStraight)
|
|
|
+ if (!string.IsNullOrEmpty(model.Id) && order.Source == ESource.ProvinceStraight)
|
|
|
{
|
|
|
var orderDto = _mapper.Map<OrderDto>(order);
|
|
|
- var urge = await _orderUrgeRepository.GetAsync(x => x.Id == id);
|
|
|
+ var urge = await _orderUrgeRepository.GetAsync(x => x.Id == model.Id);
|
|
|
if (urge != null)
|
|
|
{
|
|
|
var urgeDto = _mapper.Map<UrgeOrderDto>(urge);
|