ソースを参照

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

Dun.Jason 4 ヶ月 前
コミット
1723a94d4b

+ 5 - 4
src/Hotline.Api/Controllers/OrderController.cs

@@ -3769,7 +3769,7 @@ public class OrderController : BaseController
         if (!validResult.IsValid)
             throw new UserFriendlyException(
                 $"非法参数, {string.Join(',', validResult.Errors.Select(d => d.ErrorMessage))}");
-        var order = await _orderDomainService.GetOrderAsync(dto.Data.OrderId, cancellationToken: HttpContext.RequestAborted);
+        var order = await _orderDomainService.GetOrderAsync(dto.Data.OrderId, withExtension: true, cancellationToken: HttpContext.RequestAborted);
         if (!string.IsNullOrEmpty(order.WorkflowId))
             throw new UserFriendlyException($"该工单已开启办理流程, No:{order.No}", "该工单已开启办理流程");
 
@@ -3802,7 +3802,8 @@ public class OrderController : BaseController
                 {
                     expiredTimeConfig = await _expireTime.CalcExpiredTime(DateTime.Now, DateTime.Now, EFlowDirection.CenterToCenter, order.Adapt<OrderTimeClacInfo>());
                 }
-                else {
+                else
+                {
                     expiredTimeConfig = await _expireTime.CalcExpiredTime(DateTime.Now, DateTime.Now, EFlowDirection.CenterToOrg, order.Adapt<OrderTimeClacInfo>());
                 }
             }
@@ -3849,7 +3850,7 @@ public class OrderController : BaseController
             throw new UserFriendlyException($"工单开启流程失败!, {e.Message}, {e.StackTrace}", "工单开启流程失败");
         }
 
-        if (_appOptions.Value.IsYiBin && order.Transpond.HasValue && order.Transpond.Value)
+        if ((_appOptions.Value.IsYiBin || _appOptions.Value.IsLuZhou) && order.Transpond.HasValue && order.Transpond.Value)
         {
             //开启流程处理事件,处理市州互转
             await _publisher.PublishAsync(new OrderStartWorkflowNotify(order.Id), PublishStrategy.ParallelWhenAll,
@@ -3972,7 +3973,7 @@ public class OrderController : BaseController
                 orderHandleFlowDto.CrossSteps = orderHandleFlowDto.CrossSteps.OrderBy(d => d.Sort).ToList();
                 var stepCount = orderHandleFlowDto.CrossSteps.Count;
                 var unhandleSteps = new List<WorkflowStep> { startStep };
-                for (int i = 0;i < stepCount;i++)
+                for (int i = 0; i < stepCount; i++)
                 {
                     var crossStep = orderHandleFlowDto.CrossSteps[i];
                     var tempSteps = new List<WorkflowStep>();

+ 2 - 1
src/Hotline.Application/Subscribers/DatasharingSubscriber.cs

@@ -874,7 +874,8 @@ namespace Hotline.Application.Subscribers
                         {
                             order.ActualOpinion += dto.Opinion;
                         }
-                        await _orderRepository.Updateable(order).UpdateColumns(d => d.ActualOpinion).ExecuteCommandAsync(cancellationToken);
+                        order.FileOpinion = order.ActualOpinion;
+                        await _orderRepository.Updateable(order).UpdateColumns(d => d.ActualOpinion).UpdateColumns(d=>d.FileOpinion).ExecuteCommandAsync(cancellationToken);
                         await _workflowDomainService.AppendFileOpinionAsync(order.WorkflowId, dto.Opinion, dto.Files, cancellationToken);
                     }
                     else

+ 9 - 1
src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

@@ -1446,7 +1446,7 @@ namespace Hotline.FlowEngine.Workflows
             var prevStep = workflow.Steps.FirstOrDefault(d => d.Id == endStep.PrevStepId);
             if (prevStep is null)
                 throw new UserFriendlyException($"未找到归档节点的前一节点, workflowId: {workflowId}, endStepId: {endStep.Id}");
-            prevStep.Opinion += opinion;
+            prevStep.Opinion = opinion;
 
             if (files != null && files.Any())
             {
@@ -1455,6 +1455,14 @@ namespace Hotline.FlowEngine.Workflows
             }
 
             await _workflowStepRepository.UpdateAsync(prevStep, cancellationToken);
+
+            var endTrace = workflow.Traces.FirstOrDefault(p => p.Id == prevStep.Id);
+            if (endTrace!=null)
+            {
+                endTrace.Opinion = prevStep.Opinion;
+                endTrace.FileJson = prevStep.FileJson;
+                await _workflowTraceRepository.UpdateAsync(endTrace, cancellationToken);
+            }
         }
 
         /// <summary>

+ 221 - 0
src/Hotline/Statistics/StatisticsDepart.cs

@@ -0,0 +1,221 @@
+using Hotline.Orders;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using XF.Domain.Repository;
+
+namespace Hotline.Statistics
+{
+	/// <summary>
+	/// 部门办件统计
+	/// </summary>
+	[Description("部门办件统计")]
+	[SugarIndex("index_statisticsDepart_insertTime", nameof(StatisticsDepart.InsertTime), OrderByType.Desc)]
+	public class StatisticsDepart : CreationEntity
+	{
+
+		/// <summary>
+		/// 部门标识
+		/// </summary>
+		[SugarColumn(ColumnDescription = "部门标识")]
+		public int DepartmentId { get; set; }
+
+		/// <summary>
+		/// 父级标识
+		/// </summary>
+		[SugarColumn(ColumnDescription = "父级标识")]
+		public int DepartmentPId { get; set; }
+
+		/// <summary>
+		/// 部门名称
+		/// </summary>
+		[SugarColumn(ColumnDescription = "部门名称")]
+		public string Name { get; set; }
+
+		/// <summary>
+		/// 部门类别
+		/// </summary>
+		[SugarColumn(ColumnDescription = "部门类别")]
+		public string Type { get; set; }
+
+		/// <summary>
+		/// 信件总量
+		/// </summary>
+		[SugarColumn(ColumnDescription = "信件总量")]
+		public int OrderAllNum { get; set; }
+
+		/// <summary>
+		/// 办件信息(已办件数)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "办件信息(已办件数)")]
+		public int OrderAlreadyNum { get; set; }
+
+		/// <summary>
+		/// 办件信息(在办件数)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "办件信息(在办件数)")]
+		public int OrderWaitNum { get; set; }
+
+		/// <summary>
+		/// 办件信息(办结率)
+		/// </summary>
+		[SugarColumn(Length = 10, DecimalDigits = 6, ColumnDescription = "办件信息(办结率)")]
+		public decimal OrderAlreadyRate { get; set; }
+
+		/// <summary>
+		/// 办件信息(按时办结率)
+		/// </summary>
+		[SugarColumn(Length = 10, DecimalDigits = 6, ColumnDescription = "办件信息(按时办结率)")]
+		public decimal OrderEndRate { get; set; }
+
+		/// <summary>
+		/// 延期次数(延期次数)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "延期次数(延期次数)")]
+		public int DelayNum { get; set; }
+
+		/// <summary>
+		/// 延期次数(会签延期次数)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "延期次数(会签延期次数)")]
+		public int DelayCoopNum { get; set; }
+
+		/// <summary>
+		/// 延期次数(延期率)
+		/// </summary>
+		[SugarColumn(Length = 10, DecimalDigits = 6, ColumnDescription = " 延期次数(延期率)")]
+		public decimal DelayRate { get; set; }
+
+		/// <summary>
+		/// 超期信息(已办超期)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "超期信息(已办超期)")]
+		public int OverdueAlreadyNum { get; set; }
+
+		/// <summary>
+		/// 超期信息(待办超期)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "超期信息(待办超期)")]
+		public int OverdueWaitNum { get; set; }
+
+		/// <summary>
+		/// 超期信息(会签已办超期)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "超期信息(会签已办超期)")]
+		public int OverdueCoopAlreadyNum { get; set; }
+
+		/// <summary>
+		/// 超期信息(会签待办超期)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "超期信息(会签待办超期)")]
+		public int OverdueCoopWaitNum { get; set; }
+
+		/// <summary>
+		/// 超期信息(超期件数)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "超期信息(超期件数)")]
+		public int OverdueNum { get; set; }
+
+		/// <summary>
+		/// 超期信息(超期率)
+		/// </summary>
+		[SugarColumn(Length = 10, DecimalDigits = 6, ColumnDescription = "超期信息(超期率)")]
+		public decimal OverdueRate { get; set; }
+
+		/// <summary>
+		/// 会签信息(会签待办)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "会签信息(会签待办)")]
+		public int CoopWaitNum { get; set; }
+
+		/// <summary>
+		/// 会签信息(会签已办)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "会签信息(会签已办)")]
+		public int CoopAlreadyNum { get; set; }
+
+		/// <summary>
+		/// 归档信息(待归档)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "归档信息(待归档)")]
+		public int FileWaitNum { get; set; }
+
+		/// <summary>
+		/// 归档信息(已归档)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "归档信息(已归档)")]
+		public int FileAlreadyNum { get; set; }
+
+		/// <summary>
+		/// 发布信息(待发布)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "发布信息(待发布)")]
+		public int PublishWaitNum { get; set; }
+
+		/// <summary>
+		/// 发布信息(公开件)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "发布信息(公开件)")]
+		public int PublishPublicNum { get; set; }
+
+		/// <summary>
+		/// 发布信息(不公开件)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "发布信息(不公开件)")]
+		public int PublishNotNum { get; set; }
+
+		/// <summary>
+		///  甄别件(申请总量)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "甄别件(申请总量)")]
+		public int ScreenApplyNum { get; set; }
+
+		/// <summary>
+		/// 甄别件(待甄别)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "甄别件(待甄别)")]
+		public int ScreenWaitNum { get; set; }
+
+		/// <summary>
+		/// 甄别件(已同意)
+		/// </summary>
+		[SugarColumn(ColumnDescription = " 甄别件(已同意)")]
+		public int ScreenYesNum { get; set; }
+
+		/// <summary>
+		/// 甄别件(未同意)
+		/// </summary>
+		[SugarColumn(ColumnDescription = "甄别件(未同意)")]
+		public int ScreenNoNum { get; set; }
+
+		/// <summary>
+		/// 总满意率
+		/// </summary>
+		[SugarColumn(Length = 10, DecimalDigits = 6, ColumnDescription = "总满意率")]
+		public decimal AllSatisfaction { get; set; }
+
+		/// <summary>
+		/// 统计日期
+		/// </summary>
+		[SugarColumn(ColumnDescription = "统计日期")]
+		public int DateTime { get; set; }
+
+		/// <summary>
+		/// 统计时限
+		/// </summary>
+		[SugarColumn(ColumnDescription = "统计时限")]
+		public int Month { get; set; }
+
+		/// <summary>
+		/// 入库时间
+		/// </summary>
+		[SugarColumn(ColumnDescription = "入库时间")]
+		public DateTime InsertTime { get; set; }
+
+
+	}
+}

+ 153 - 0
src/Hotline/Statistics/StatisticsDepartSatisfied.cs

@@ -0,0 +1,153 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using XF.Domain.Repository;
+
+namespace Hotline.Statistics
+{
+	/// <summary>
+	/// 部门满意度统计
+	/// </summary>
+	[Description("部门满意度统计")]
+	[SugarIndex("index_statisticsDepartSatisfied_insertTime", nameof(StatisticsDepartSatisfied.InsertTime), OrderByType.Desc)]
+	public class StatisticsDepartSatisfied : CreationEntity
+	{
+
+		/// <summary>
+		/// 部门标识
+		/// </summary>
+		[SugarColumn(ColumnDescription = "部门标识")]
+		public int DepartmentId { get; set; }
+
+		/// <summary>
+		/// 父级标识
+		/// </summary>
+		[SugarColumn(ColumnDescription = "父级标识")]
+		public int DepartmentPId { get; set; }
+
+		/// <summary>
+		/// 部门名称
+		/// </summary>
+		[SugarColumn(ColumnDescription = "部门名称")]
+		public string Name { get; set; }
+
+		/// <summary>
+		/// 部门类别
+		/// </summary>
+		[SugarColumn(ColumnDescription = "部门类别")]
+		public string Type { get; set; }
+
+		/// <summary>
+		/// 小计
+		/// </summary>
+		[SugarColumn(ColumnDescription = "小计")]
+		public int Total { get; set; }
+
+		/// <summary>
+		/// 非常满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = "非常满意")]
+		public int VerySatisfaction { get; set; }
+
+		/// <summary>
+		/// 满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = "满意")]
+		public int Satisfaction { get; set; }
+
+		/// <summary>
+		/// 视为满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = "视为满意")]
+		public int TreatSatisfaction { get; set; }
+
+		/// <summary>
+		/// 默认满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = " 默认满意")]
+		public int DefaultSatisfaction { get; set; }
+
+		/// <summary>
+		/// 不满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = " 不满意")]
+		public int Dissatisfaction { get; set; }
+
+		/// <summary>
+		/// 未做评价
+		/// </summary>
+		[SugarColumn(ColumnDescription = "未做评价")]
+		public int NotEvaluated { get; set; }
+
+		/// <summary>
+		/// 未接通
+		/// </summary>
+		[SugarColumn(ColumnDescription = " 未接通")]
+		public int BlockCall { get; set; }
+
+		/// <summary>
+		/// (泸州、自贡)一般
+		/// </summary>
+		[SugarColumn(ColumnDescription = "(泸州、自贡)一般")]
+		public int Ordinary { get; set; }
+
+		/// <summary>
+		/// (泸州、自贡)非常不满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = "(泸州、自贡)非常不满意")]
+		public int BeUnsatisfied { get; set; }
+
+		/// <summary>
+		/// (自贡)甄别为满意 自贡的视为满意名字是甄别为满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = "(自贡)甄别为满意 自贡的视为满意名字是甄别为满意")]
+		public int ScreenSatisfaction { get; set; }
+
+		/// <summary>
+		/// (泸州)公开件
+		/// </summary>
+		[SugarColumn(ColumnDescription = "(泸州)公开件")]
+		public int PublishPublicNum { get; set; }
+
+		/// <summary>
+		/// (泸州)不公开件
+		/// </summary>
+		[SugarColumn(ColumnDescription = "(泸州)不公开件")]
+		public int PublishNotNum { get; set; }
+
+		/// <summary>
+		/// (泸州)申请总量
+		/// </summary>
+		[SugarColumn(ColumnDescription = "(泸州)申请总量")]
+		public int ScreenApplyNum { get; set; }
+
+		/// <summary>
+		/// (泸州)待甄别
+		/// </summary>
+		[SugarColumn(ColumnDescription = "(泸州)待甄别")]
+		public int ScreenWaitNum { get; set; }
+
+
+		/// <summary>
+		/// 统计日期
+		/// </summary>
+		[SugarColumn(ColumnDescription = "统计日期")]
+		public int DateTime { get; set; }
+
+		/// <summary>
+		/// 统计时限
+		/// </summary>
+		[SugarColumn(ColumnDescription = "统计时限")]
+		public int Month { get; set; }
+
+		/// <summary>
+		/// 入库时间
+		/// </summary>
+		[SugarColumn(ColumnDescription = "入库时间")]
+		public DateTime InsertTime { get; set; }
+	}
+}

+ 122 - 0
src/Hotline/Statistics/StatisticsHotspotSatisfied.cs

@@ -0,0 +1,122 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using XF.Domain.Repository;
+
+namespace Hotline.Statistics
+{
+	/// <summary>
+	/// 热点类型满意度统计
+	/// </summary>
+	[Description("热点类型满意度统计")]
+	[SugarIndex("index_statisticsHotspotSatisfied_insertTime", nameof(StatisticsHotspotSatisfied.InsertTime), OrderByType.Desc)]
+	public class StatisticsHotspotSatisfied : CreationEntity
+	{
+
+		/// <summary>
+		/// 热点标识
+		/// </summary>
+		[SugarColumn(ColumnDescription = "热点标识")]
+		public string HotspotId { get; set; }
+
+		/// <summary>
+		/// 父级标识
+		/// </summary>
+		[SugarColumn(ColumnDescription = "父级标识")]
+		public string HotspotPId { get; set; }
+
+		/// <summary>
+		/// 热点名称
+		/// </summary>
+		[SugarColumn(ColumnDescription = "热点名称")]
+		public string HotspotName { get; set; }
+
+		/// <summary>
+		/// 小计
+		/// </summary>
+		[SugarColumn(ColumnDescription = "小计")]
+		public int Total { get; set; }
+
+		/// <summary>
+		/// 非常满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = "非常满意")]
+		public int VerySatisfaction { get; set; }
+
+		/// <summary>
+		/// 满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = "满意")]
+		public int Satisfaction { get; set; }
+
+		/// <summary>
+		/// 视为满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = "视为满意")]
+		public int TreatSatisfaction { get; set; }
+
+		/// <summary>
+		/// 默认满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = "默认满意")]
+		public int DefaultSatisfaction { get; set; }
+
+		/// <summary>
+		/// 不满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = " 不满意")]
+		public int Dissatisfaction { get; set; }
+
+		/// <summary>
+		/// 未做评价
+		/// </summary>
+		[SugarColumn(ColumnDescription = "未做评价")]
+		public int NotEvaluated { get; set; }
+
+		/// <summary>
+		/// 未接通
+		/// </summary>
+		[SugarColumn(ColumnDescription = " 未接通")]
+		public int BlockCall { get; set; }
+
+		/// <summary>
+		/// (泸州、自贡)一般
+		/// </summary>
+		[SugarColumn(ColumnDescription = "(泸州、自贡)一般")]
+		public int Ordinary { get; set; }
+
+		/// <summary>
+		/// (泸州、自贡)非常不满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = "(泸州、自贡)非常不满意")]
+		public int BeUnsatisfied { get; set; }
+
+		/// <summary>
+		/// (自贡)甄别为满意 自贡的视为满意名字是甄别为满意
+		/// </summary>
+		[SugarColumn(ColumnDescription = "(自贡)甄别为满意 自贡的视为满意名字是甄别为满意")]
+		public int ScreenSatisfaction { get; set; }
+
+		/// <summary>
+		/// 统计日期
+		/// </summary>
+		[SugarColumn(ColumnDescription = "统计日期")]
+		public int DateTime { get; set; }
+
+		/// <summary>
+		/// 统计时限
+		/// </summary>
+		[SugarColumn(ColumnDescription = "统计时限")]
+		public int Month { get; set; }
+
+		/// <summary>
+		/// 入库时间
+		/// </summary>
+		[SugarColumn(ColumnDescription = "入库时间")]
+		public DateTime InsertTime { get; set; }
+	}
+}

+ 123 - 0
src/Hotline/Statistics/StatisticsPurTypeSatisfied.cs

@@ -0,0 +1,123 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using XF.Domain.Repository;
+
+namespace Hotline.Statistics
+{
+	/// <summary>
+	/// 受理类型分时统计
+	/// </summary>
+	[Description("受理类型分时统计")]
+	[SugarIndex("index_statisticsPurTypeSatisfied_insertTime", nameof(StatisticsPurTypeSatisfied.InsertTime), OrderByType.Desc)]
+	public class StatisticsPurTypeSatisfied : CreationEntity
+	{
+
+		/// <summary>
+		/// 小计
+		/// </summary>
+		[SugarColumn(ColumnDescription = "小计")]
+		public int Total { get; set; }
+
+
+		/// <summary>
+		/// 咨询
+		/// </summary>
+		[SugarColumn(ColumnDescription = "咨询")]
+		public int Consult { get; set; }
+
+		/// <summary>
+		/// 建议
+		/// </summary>
+		[SugarColumn(ColumnDescription = "建议")]
+		public int Suggest { get; set; }
+
+		/// <summary>
+		/// 求助
+		/// </summary>
+		[SugarColumn(ColumnDescription = "求助")]
+		public int SeekHelp { get; set; }
+
+		/// <summary>
+		/// 表扬
+		/// </summary>
+		[SugarColumn(ColumnDescription = "表扬")]
+		public int Praise { get; set; }
+
+		/// <summary>
+		/// 举报
+		/// </summary>
+		[SugarColumn(ColumnDescription = "举报")]
+		public int Report { get; set; }
+
+		/// <summary>
+		/// 投诉
+		/// </summary>
+		[SugarColumn(ColumnDescription = "投诉")]
+		public int Complaint { get; set; }
+
+		/// <summary>
+		/// 其他
+		/// </summary>
+		[SugarColumn(ColumnDescription = "其他")]
+		public int Rests { get; set; }
+
+		/// <summary>
+		/// 大气污染举报
+		/// </summary>
+		[SugarColumn(ColumnDescription = "大气污染举报")]
+		public int PollutionReporting { get; set; }
+
+		/// <summary>
+		/// 惠民帮助
+		/// </summary>
+		[SugarColumn(ColumnDescription = "惠民帮助")]
+		public int PeopleHelp { get; set; }
+
+		/// <summary>
+		/// 意见
+		/// </summary>
+		[SugarColumn(ColumnDescription = "意见")]
+		public int Opinion { get; set; }
+
+		/// <summary>
+		/// 疫情
+		/// </summary>
+		[SugarColumn(ColumnDescription = "疫情")]
+		public int Epidemic { get; set; }
+
+		/// <summary>
+		/// 申报
+		/// </summary>
+		[SugarColumn(ColumnDescription = "申报")]
+		public int Declare { get; set; }
+
+		/// <summary>
+		/// 无效
+		/// </summary>
+		[SugarColumn(ColumnDescription = "无效")]
+		public int Invalid { get; set; }
+
+		/// <summary>
+		/// 统计日期
+		/// </summary>
+		[SugarColumn(ColumnDescription = "统计日期")]
+		public int DateTime { get; set; }
+
+		/// <summary>
+		/// 统计时限
+		/// </summary>
+		[SugarColumn(ColumnDescription = "统计时限")]
+		public int Month { get; set; }
+
+		/// <summary>
+		/// 入库时间
+		/// </summary>
+		[SugarColumn(ColumnDescription = "入库时间")]
+		public DateTime InsertTime { get; set; }
+	}
+}