qinchaoyue 5 ヶ月 前
コミット
91653acbe0

+ 2 - 0
src/Hotline.Application/Orders/OrderApplication.cs

@@ -2807,10 +2807,12 @@ public class OrderApplication : IOrderApplication, IScopeDependency
         if (order == null)
         {
             order = _mapper.Map<Order>(dto);
+            
             order.InitId();
             if (files != null && files.Any())
                 order.FileJson = await _fileRepository.AddFileAsync(files, order.Id, "", cancellationToken);
             await _orderDomainService.AddAsync(order, cancellationToken: cancellationToken);
+          
         }
         else
         {

+ 4 - 0
src/Hotline/Orders/OrderDomainService.cs

@@ -364,6 +364,10 @@ public class OrderDomainService : IOrderDomainService, IScopeDependency
         }
         order.Init();
         order.No = GenerateNewOrderNo();
+        if (order.Source == ESource.Police110)
+        {
+            order.Title = @"(非警情工单-"+order.No.Substring(order.No.Length - 6) +")";
+        }
         order.Password = Random.Shared.Next(100000, 1000000).ToString();
         order.ProvinceNo = string.IsNullOrEmpty(order.ProvinceNo) ? GenerateNewProvinceNo(order.No, order.SourceChannelCode) : order.ProvinceNo;
         return await _orderRepository.AddOrderNavAsync(order, cancellationToken);