Selaa lähdekoodia

Merge branch 'release' of http://110.188.24.182:10023/Fengwo/hotline into release

tangjiang 9 kuukautta sitten
vanhempi
commit
5cbc275a6e

+ 2 - 2
src/Hotline.Api/Controllers/Bi/BiOrderController.cs

@@ -2017,9 +2017,9 @@ namespace Hotline.Api.Controllers.Bi
             .WhereIF(!string.IsNullOrEmpty(dto.Keyword), d => d.Title.StartsWith(dto.Keyword!)) //标题
             .WhereIF(!string.IsNullOrEmpty(dto.ProvinceNo), d => d.ProvinceNo == dto.ProvinceNo) //省本地编号
             .WhereIF(!string.IsNullOrEmpty(dto.No), d => d.No == dto.No) //工单编码
-            .WhereIF(!string.IsNullOrEmpty(dto.AcceptType), d => d.AcceptType == dto.AcceptType)//受理类型
+            .WhereIF(!string.IsNullOrEmpty(dto.AcceptType), d => d.AcceptTypeCode == dto.AcceptType)//受理类型
             //.WhereIF(dto.AcceptTypes.Any(), d => dto.AcceptTypes.Contains(d.AcceptTypeCode)) //受理类型
-            .WhereIF(!string.IsNullOrEmpty(dto.Channel), d => d.SourceChannel == dto.Channel)
+            .WhereIF(!string.IsNullOrEmpty(dto.Channel), d => d.SourceChannelCode == dto.Channel)
             //.WhereIF(dto.Channels.Any(), d => dto.Channels.Contains(d.SourceChannelCode)) //来源渠道
             //.WhereIF(dto.HotspotIds.Any(), d => dto.HotspotIds.Contains(d.HotspotId)) //热点类型
             .WhereIF(!string.IsNullOrEmpty(dto.Hotspot), d => d.HotspotSpliceName != null && d.HotspotSpliceName.Contains(dto.Hotspot))

+ 55 - 2
src/Hotline.Api/Controllers/OrderController.cs

@@ -382,6 +382,38 @@ public class OrderController : BaseController
 
                     visitedDetail.Add(seatDetail);
                     await _orderVisitedDetailRepository.AddRangeAsync(visitedDetail, HttpContext.RequestAborted);
+
+                    if (orderVisit.VisitState == EVisitState.Visited)
+                    {
+                        //推省上
+                        await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderVisited,
+                            new PublishVisitDto()
+                            {
+                                Order = _mapper.Map<OrderDto>(order),
+                                No = orderVisit.No,
+                                VisitType = orderVisit.VisitType,
+                                VisitName = orderVisit.CreatorName,
+                                VisitTime = orderVisit.VisitTime,
+                                VisitRemark = orderVisit.NowEvaluate?.Value,
+                                AreaCode = order.AreaCode!,
+                                SubjectResultSatifyCode = orderVisit.NowEvaluate?.Key,
+                                FirstSatisfactionCode = orderVisit.NowEvaluate?.Key,
+                                ClientGuid = ""
+                            }, cancellationToken: HttpContext.RequestAborted);
+                    }
+
+                    //推门户
+                    await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderVisitedWeb, new PublishVisitAllDto()
+                    {
+                        Id = orderVisit.Id,
+                        Order = _mapper.Map<OrderDto>(order),
+                        OrderVisitDetails = _mapper.Map<List<VisitDetailDto>>(orderVisit.OrderVisitDetails),
+                        VisitName = _sessionContext.UserName,
+                        VisitTime = orderVisit.VisitTime,
+                        VisitType = orderVisit.VisitType,
+                        VisitState = orderVisit.VisitState,
+                        PublishTime = orderVisit.PublishTime,
+                    }, cancellationToken: HttpContext.RequestAborted);
                 }
                 catch
                 {
@@ -489,6 +521,27 @@ public class OrderController : BaseController
 
         visitedDetail.Add(seatDetail);
         await _orderVisitedDetailRepository.AddRangeAsync(visitedDetail, HttpContext.RequestAborted);
+
+
+        if (orderVisit.VisitState == EVisitState.Visited)
+        {
+            //推省上
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderVisited,
+                new PublishVisitDto()
+                {
+                    Order = _mapper.Map<OrderDto>(order),
+                    No = orderVisit.No,
+                    VisitType = orderVisit.VisitType,
+                    VisitName = orderVisit.CreatorName,
+                    VisitTime = orderVisit.VisitTime,
+                    VisitRemark = orderVisit.NowEvaluate?.Value,
+                    AreaCode = order.AreaCode!,
+                    SubjectResultSatifyCode = orderVisit.NowEvaluate?.Key,
+                    FirstSatisfactionCode = orderVisit.NowEvaluate?.Key,
+                    ClientGuid = ""
+                }, cancellationToken: HttpContext.RequestAborted);
+        }
+
         //推送回访信息
         //推门户
         await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderVisitedWeb, new PublishVisitAllDto()
@@ -4641,9 +4694,9 @@ public class OrderController : BaseController
             .WhereIF(!string.IsNullOrEmpty(dto.Keyword),
                 d => d.Title.Contains(dto.Keyword!) || d.No.Contains(dto.Keyword!))
             //.WhereIF(!string.IsNullOrEmpty(dto.Content), d => d.Content.Contains(dto.Content!))
-            .WhereIF(!string.IsNullOrEmpty(dto.AcceptType), d => d.AcceptType == dto.AcceptType)//受理类型
+            .WhereIF(!string.IsNullOrEmpty(dto.AcceptType), d => d.AcceptTypeCode == dto.AcceptType)//受理类型
                                                                                                 //.WhereIF(dto.AcceptTypes.Any(), d => dto.AcceptTypes.Contains(d.AcceptTypeCode)) //受理类型
-            .WhereIF(!string.IsNullOrEmpty(dto.Channel), d => d.SourceChannel == dto.Channel)//来源渠道
+            .WhereIF(!string.IsNullOrEmpty(dto.Channel), d => d.SourceChannelCode == dto.Channel)//来源渠道
             .WhereIF(!string.IsNullOrEmpty(dto.Hotspot), d => d.HotspotSpliceName != null && d.HotspotSpliceName.Contains(dto.Hotspot))
             .WhereIF(!string.IsNullOrEmpty(dto.TransferPhone), d => d.TransferPhone.Contains(dto.TransferPhone!))
             .WhereIF(!string.IsNullOrEmpty(dto.OrgName), d => d.CurrentHandleOrgName == dto.OrgName)//接办部门

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

@@ -496,9 +496,9 @@ public class OrderApplication : IOrderApplication, IScopeDependency
             .WhereIF(!string.IsNullOrEmpty(dto.Keyword), d => d.Title.StartsWith(dto.Keyword!)) //标题
             .WhereIF(!string.IsNullOrEmpty(dto.ProvinceNo), d => d.ProvinceNo == dto.ProvinceNo) //省本地编号
             .WhereIF(!string.IsNullOrEmpty(dto.No), d => d.No == dto.No) //工单编码
-            .WhereIF(!string.IsNullOrEmpty(dto.AcceptType), d => d.AcceptType == dto.AcceptType)//受理类型
+            .WhereIF(!string.IsNullOrEmpty(dto.AcceptType), d => d.AcceptTypeCode == dto.AcceptType)//受理类型
                                                                                                 //.WhereIF(dto.AcceptTypes.Any(), d => dto.AcceptTypes.Contains(d.AcceptTypeCode)) //受理类型
-            .WhereIF(!string.IsNullOrEmpty(dto.Channel), d => d.SourceChannel == dto.Channel)
+            .WhereIF(!string.IsNullOrEmpty(dto.Channel), d => d.SourceChannelCode == dto.Channel)
             //.WhereIF(dto.Channels.Any(), d => dto.Channels.Contains(d.SourceChannelCode)) //来源渠道
             //.WhereIF(dto.HotspotIds.Any(), d => dto.HotspotIds.Contains(d.HotspotId)) //热点类型
             .WhereIF(!string.IsNullOrEmpty(dto.Hotspot), d => d.HotspotSpliceName != null && d.HotspotSpliceName.Contains(dto.Hotspot))

+ 2 - 2
src/Hotline.Repository.SqlSugar/Extensions/SqlSugarStartupExtensions.cs

@@ -207,8 +207,8 @@ namespace Hotline.Repository.SqlSugar.Extensions
             /***写AOP等方法***/
             db.Aop.OnLogExecuting = (sql, pars) =>
             {
-                Log.Information("Sql: {0}", sql);
-                Log.Information("SqlParameters: {0}", string.Join(',', pars.Select(d => d.Value)));
+                //Log.Information("Sql: {0}", sql);
+                //Log.Information("SqlParameters: {0}", string.Join(',', pars.Select(d => d.Value)));
             };
             db.Aop.OnError = (exp) =>//SQL报错
             {

+ 1 - 1
src/Hotline/Caching/Services/SysDicDataCacheManager.cs

@@ -21,7 +21,7 @@ namespace Hotline.Caching.Services
         {
             var sysDicDataList = _cacheSysDicData.GetOrSet(code, k =>
             {
-                return _sysDicDataRepository.Queryable().Where(x => x.DicTypeCode == code).OrderBy(x=>x.Sort).ToTreeAsync(x => x.Children, it => it.ParentId, "").GetAwaiter().GetResult();
+                return _sysDicDataRepository.Queryable().Where(x => x.DicTypeCode == code && x.IsShow == true).OrderBy(x=>x.Sort).ToTreeAsync(x => x.Children, it => it.ParentId, "").GetAwaiter().GetResult();
             });
             return sysDicDataList;
         }

+ 11 - 4
src/Hotline/Settings/SystemDicData.cs

@@ -5,8 +5,8 @@ using XF.Domain.Repository;
 namespace Hotline.Settings
 {
     [Description("字典表")]
-    public class SystemDicData: CreationEntity
-    {
+    public class SystemDicData : FullStateEntity
+	{
         /// <summary>
         /// 字典类型Id
         /// </summary>
@@ -32,10 +32,17 @@ namespace Hotline.Settings
         /// </summary>
         [SugarColumn(DefaultValue = "0")]
         public int Sort { get; set; }
+
         /// <summary>
-        /// 上级ID
+        /// 是否显示
         /// </summary>
-        [SugarColumn(IsNullable = true)]
+        [SugarColumn(DefaultValue = "true")]
+		public bool IsShow { get; set; }
+
+		/// <summary>
+		/// 上级ID
+		/// </summary>
+		[SugarColumn(IsNullable = true)]
         public string? ParentId { get; set; }
 
         [SugarColumn(IsIgnore = true)]