瀏覽代碼

Merge branch 'master' of http://110.188.24.182:10023/Fengwo/hotline

xf 1 年之前
父節點
當前提交
2041d1798a

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

@@ -20,6 +20,7 @@ using Hotline.Share.Mq;
 using MapsterMapper;
 using MediatR;
 using Microsoft.AspNetCore.Mvc;
+using Microsoft.IdentityModel.Tokens;
 using SqlSugar;
 using XF.Domain.Authentications;
 using XF.Domain.Constants;
@@ -33,7 +34,8 @@ namespace Hotline.Api.Controllers;
 /// </summary>
 public class OrderController : BaseController
 {
-    private readonly IOrderDomainService _orderDomainService;
+	
+	private readonly IOrderDomainService _orderDomainService;
     private readonly IOrderRepository _orderRepository;
     private readonly IWorkflowApplication _workflowApplication;
     private readonly IWorkflowDomainService _workflowDomainService;
@@ -53,6 +55,9 @@ public class OrderController : BaseController
     private readonly ITimeLimitApplication _timeLimitApplication;
     private readonly ISystemSettingCacheManager _systemSettingCacheManager;
     private readonly IOrderRedoRepository _orderRedoRepository;
+    private readonly IOrderSuperviseRepository _orderSuperviseRepository;
+    private readonly IOrderUrgeRepository _orderUrgeRepository;
+
 
     public OrderController(
         IOrderDomainService orderDomainService,
@@ -74,7 +79,10 @@ public class OrderController : BaseController
         IOrderDelayRepository orderDelayRepository,
         ITimeLimitApplication timeLimitApplication,
         ISystemSettingCacheManager systemSettingCacheManager,
-        IOrderRedoRepository orderRedoRepository)
+        IOrderRedoRepository orderRedoRepository,
+        IOrderSuperviseRepository orderSuperviseRepository,
+        IOrderUrgeRepository orderUrgeRepository
+        )
     {
         _orderDomainService = orderDomainService;
         _orderRepository = orderRepository;
@@ -96,6 +104,8 @@ public class OrderController : BaseController
         _timeLimitApplication = timeLimitApplication;
         _systemSettingCacheManager = systemSettingCacheManager;
         _orderRedoRepository = orderRedoRepository;
+        _orderSuperviseRepository = orderSuperviseRepository;
+        _orderUrgeRepository = orderUrgeRepository;
     }
 
     #region 工单发布
@@ -510,8 +520,209 @@ public class OrderController : BaseController
 
     #region 工单督办
 
+    /// <summary>
+    /// 工单督办列表
+    /// </summary>
+    /// <param name="dto"></param>
+    /// <returns></returns>
+    [Permission(EPermission.SuperviseOrderList)]
+    [HttpGet("supervise")]
+    public async Task<PagedDto<SuperviseOrderDto>> SuperviseList([FromQuery] SuperviseListDto dto)
+    {
+        var (total, items) = await _orderSuperviseRepository.Queryable()
+            .Includes(x => x.Order)
+            .Includes(x => x.Organize)
+            .Includes(x => x.CrOrganize)
+			.WhereIF(!string.IsNullOrEmpty(dto.Keyword), d => d.Order.Title.Contains(dto.Keyword!) || d.Order.No.Contains(dto.Keyword!))
+            .WhereIF(dto.SuperviseState > 0, x => x.State == dto.SuperviseState)
+            .OrderByDescending(x => x.CreationTime)
+            .ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
+
+        return new PagedDto<SuperviseOrderDto>(total, _mapper.Map<IReadOnlyList<SuperviseOrderDto>>(items));
+    }
+
+    /// <summary>
+    /// 申请督办
+    /// </summary>
+    /// <param name="dto"></param>
+    /// <returns></returns>
+    [Permission(EPermission.ApplySupervise)]
+    [HttpPost("supervise/apply")]
+    public async Task ApplySupervise([FromBody] ApplyOrderSuperviseDto dto)
+    {
+        //验证工单是否可以申请
+        var order = await _orderRepository.GetAsync(dto.OrderId, HttpContext.RequestAborted);
+        if (order is null)
+            throw UserFriendlyException.SameMessage("无效工单");
+
+        var model = _mapper.Map<OrderSupervise>(dto);
+        model.State = 0;
+        await _orderSuperviseRepository.AddAsync(model, HttpContext.RequestAborted);
+    }
+
+    /// <summary>
+    /// 回复督办
+    /// </summary>
+    /// <param name="dto"></param>
+    /// <returns></returns>
+    [Permission(EPermission.ReplySupervise)]
+    [HttpPost("supervise/reply")]
+    public async Task ReplySupervise([FromBody] ReplyOrderSuperviseDto dto)
+    {
+        //验证是否存在督办
+        var supervise = await _orderSuperviseRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
+        if (supervise is null)
+            throw UserFriendlyException.SameMessage("无效督办");
+        if (supervise.State > 0)
+	        throw UserFriendlyException.SameMessage("督办已回复,请勿重复回复");
+
+		var model = _mapper.Map<OrderSupervise>(dto);
+        model.ReplyId = _sessionContext.UserId;
+        model.ReplyTime = DateTime.Now;
+        model.State = 1;
+		model.Id = dto.Id;
+		await _orderSuperviseRepository.UpdateAsync(model, HttpContext.RequestAborted);
+    }
+
+    /// <summary>
+    /// 签收督办
+    /// </summary>
+    /// <param name="dto"></param>
+    /// <returns></returns>
+    [Permission(EPermission.SignSupervise)]
+    [HttpPost("supervise/sign")]
+    public async Task SignSupervise([FromBody] SignOrderSuperviseDto dto)
+    {
+        //验证是否存在督办
+        var supervise = await _orderSuperviseRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
+        if (supervise is null)
+            throw UserFriendlyException.SameMessage("无效督办");
+
+        var model = _mapper.Map<OrderSupervise>(dto);
+        model.SignTime = DateTime.Now;
+        model.Id = dto.Id;
+		await _orderSuperviseRepository.UpdateAsync(model, HttpContext.RequestAborted);
+    }
+
+
+    /// <summary>
+    /// 督办详情
+    /// </summary>
+    /// <param name="id"></param>
+    /// <returns></returns>
+    [Permission(EPermission.SuperviseEntity)]
+    [HttpGet("supervise/{id}")]
+    public async Task<OrderSupervise> SuperviseEntity(string id)
+    {
+        return await _orderSuperviseRepository.Queryable()
+            .Includes(x => x.Order)
+            .Includes(x => x.Organize)
+            .FirstAsync(x => x.Id == id);
+    }
+
+    #endregion
+
+    #region 工单催办
+
+    /// <summary>
+    /// 工单催办列表
+    /// </summary>
+    /// <param name="dto"></param>
+    /// <returns></returns>
+    [Permission(EPermission.UrgeOrderList)]
+    [HttpGet("urge")]
+    public async Task<PagedDto<UrgeOrderDto>> UrgeList([FromQuery] UrgeListDto dto)
+    {
+        var (total, items) = await _orderUrgeRepository.Queryable()
+            .Includes(x => x.Order)
+            .Includes(x => x.Organize)
+            .Includes(x => x.CrOrganize)
+			.WhereIF(!string.IsNullOrEmpty(dto.Keyword), d => d.Order.Title.Contains(dto.Keyword!) || d.Order.No.Contains(dto.Keyword!))
+            .WhereIF(dto.SuperviseState > 0, x => x.State == dto.SuperviseState)
+            .OrderByDescending(x => x.CreationTime)
+            .ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
+
+        return new PagedDto<UrgeOrderDto>(total, _mapper.Map<IReadOnlyList<UrgeOrderDto>>(items));
+    }
+
+    /// <summary>
+    /// 申请催办
+    /// </summary>
+    /// <param name="dto"></param>
+    /// <returns></returns>
+    [Permission(EPermission.ApplyUrge)]
+    [HttpPost("urge/apply")]
+    public async Task ApplyUrge([FromBody] ApplyOrderUrgeDto dto)
+    {
+        //验证工单是否可以申请
+        var order = await _orderRepository.GetAsync(dto.OrderId, HttpContext.RequestAborted);
+        if (order is null)
+            throw UserFriendlyException.SameMessage("无效工单");
+
+        var model = _mapper.Map<OrderUrge>(dto);
+        await _orderUrgeRepository.AddAsync(model, HttpContext.RequestAborted);
+    }
+
+    /// <summary>
+    /// 回复催办
+    /// </summary>
+    /// <param name="dto"></param>
+    /// <returns></returns>
+    [Permission(EPermission.ReplyUrge)]
+    [HttpPost("urge/reply")]
+    public async Task ReplyUrge([FromBody] ReplyOrderUrgeDto dto)
+    {
+        //验证是否存在催办
+        var urge = await _orderUrgeRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
+        if (urge is null)
+            throw UserFriendlyException.SameMessage("无效催办");
+        if (urge.State > 0)
+	        throw UserFriendlyException.SameMessage("督办已回复,请勿重复回复");
+
+		var model = _mapper.Map<OrderUrge>(dto);
+        model.ReplyId = _sessionContext.UserId;
+        model.ReplyTime = DateTime.Now;
+        model.State = 1;
+		model.Id = dto.Id;
+		await _orderUrgeRepository.UpdateAsync(model, HttpContext.RequestAborted);
+    }
+
+    /// <summary>
+    /// 签收催办
+    /// </summary>
+    /// <param name="dto"></param>
+    /// <returns></returns>
+    [Permission(EPermission.SignUrge)]
+    [HttpPost("urge/sign")]
+    public async Task SignUrge([FromBody] SignOrderUrgeDto dto)
+    {
+        //验证是否存在催办
+        var urge = await _orderUrgeRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
+        if (urge is null)
+            throw UserFriendlyException.SameMessage("无效催办");
+
+        var model = _mapper.Map<OrderUrge>(dto);
+        model.SignTime = DateTime.Now;
+        model.Id = dto.Id;
+		await _orderUrgeRepository.UpdateAsync(model, HttpContext.RequestAborted);
+    }
 
 
+    /// <summary>
+    /// 催办详情
+    /// </summary>
+    /// <param name="id"></param>
+    /// <returns></returns>
+    [Permission(EPermission.UrgeEntity)]
+    [HttpGet("urge/{id}")]
+    public async Task<OrderUrge> UrgeEntity(string id)
+    {
+        return await _orderUrgeRepository.Queryable()
+            .Includes(x => x.Order)
+            .Includes(x => x.Organize)
+            .FirstAsync(x => x.Id == id);
+    }
+
     #endregion
 
     #region 工单办理

+ 13 - 0
src/Hotline.Repository.SqlSugar/Orders/OrderSuperviseRepository.cs

@@ -0,0 +1,13 @@
+using Hotline.Orders;
+using Hotline.Repository.SqlSugar.DataPermissions;
+using SqlSugar;
+using XF.Domain.Dependency;
+
+namespace Hotline.Repository.SqlSugar.Orders;
+
+public class OrderSuperviseRepository : BaseRepository<OrderSupervise>, IOrderSuperviseRepository, IScopeDependency
+{
+    public OrderSuperviseRepository(ISugarUnitOfWork<HotlineDbContext> uow, IDataPermissionFilterBuilder dataPermissionFilterBuilder) : base(uow, dataPermissionFilterBuilder)
+    {
+    }
+}

+ 165 - 1
src/Hotline.Share/Dtos/Order/OrderDto.cs

@@ -1,5 +1,6 @@
 using Hotline.Share.Dtos.FlowEngine;
 using Hotline.Share.Dtos.Hotspots;
+using Hotline.Share.Dtos.Org;
 using Hotline.Share.Enums.FlowEngine;
 using Hotline.Share.Enums.Order;
 using Hotline.Share.Enums.Settings;
@@ -666,6 +667,169 @@ namespace Hotline.Share.Dtos.Order
         /// 附件
         /// </summary>
         public string ClientGuid { get; set; }
-    }
+	}
+
+    public class SuperviseOrderDto {
+
+        /// <summary>
+        /// 督办ID
+        /// </summary>
+		public string Id { get; set; }
+
+        /// <summary>
+        /// 工单ID
+        /// </summary>
+        public string OrderId { get; set; }
+
+        /// <summary>
+        /// 督办回复时限
+        /// </summary>
+        public DateTime ReplyLimitTime { get; set; }
+
+        /// <summary>
+        /// 被督办部门ID
+        /// </summary>
+        public string OrgId { get; set; }
+
+        /// <summary>
+        /// 督办状态
+        /// </summary>
+        public int State { get; set; }
+
+        /// <summary>
+        /// 督办签收时间
+        /// </summary>
+        public DateTime? SignTime { get; set; }
+
+        /// <summary>
+        /// 督办回复时间
+        /// </summary>
+        public DateTime? ReplyTime { get; set; }
+
+        /// <summary>
+        /// 督办申请内容
+        /// </summary>
+        public string? ApplyContent { get; set; }
+
+        /// <summary>
+        /// 督办回复内容
+        /// </summary>
+        public string? ReplyContent { get; set; }
+
+        /// <summary>
+        /// 回复人
+        /// </summary>
+        public string? ReplyId { get; set; }
+
+        /// <summary>
+        /// 附件
+        /// </summary>
+        public List<string>? Additions { get; set; } = new();
+
+        public DateTime? LastModificationTime { get; set; }
+
+        public string? CreatorId { get; set; }
+
+        public string? CreatorOrgId { get; set; }
+
+        public DateTime CreationTime { get; set; }
+
+		/// <summary>
+		/// 工单对象
+		/// </summary>
+		public OrderDto Order { get; set; }
+
+		/// <summary>
+		/// 机构对象
+		/// </summary>
+		public OrgDto Organize { get; set; }
+
+		/// <summary>
+		/// 机构对象
+		/// </summary>
+		public OrgDto CrOrganize { get; set; }
+	}
+
+
+    public class UrgeOrderDto
+    {
 
+	    /// <summary>
+	    /// 催办ID
+	    /// </summary>
+	    public string Id { get; set; }
+
+	    /// <summary>
+	    /// 工单ID
+	    /// </summary>
+	    public string OrderId { get; set; }
+
+	    /// <summary>
+	    /// 催办回复时限
+	    /// </summary>
+	    public DateTime ReplyLimitTime { get; set; }
+
+	    /// <summary>
+	    /// 被催办部门ID
+	    /// </summary>
+	    public string OrgId { get; set; }
+
+	    /// <summary>
+	    /// 催办状态
+	    /// </summary>
+	    public int State { get; set; }
+
+	    /// <summary>
+	    /// 催办签收时间
+	    /// </summary>
+	    public DateTime? SignTime { get; set; }
+
+	    /// <summary>
+	    /// 催办回复时间
+	    /// </summary>
+	    public DateTime? ReplyTime { get; set; }
+
+	    /// <summary>
+	    /// 催办申请内容
+	    /// </summary>
+	    public string? ApplyContent { get; set; }
+
+	    /// <summary>
+	    /// 催办回复内容
+	    /// </summary>
+	    public string? ReplyContent { get; set; }
+
+	    /// <summary>
+	    /// 回复人
+	    /// </summary>
+	    public string? ReplyId { get; set; }
+
+	    /// <summary>
+	    /// 附件
+	    /// </summary>
+	    public List<string>? Additions { get; set; } = new();
+
+	    public DateTime? LastModificationTime { get; set; }
+
+	    public string? CreatorId { get; set; }
+
+	    public string? CreatorOrgId { get; set; }
+
+	    public DateTime CreationTime { get; set; }
+
+	    /// <summary>
+	    /// 工单对象
+	    /// </summary>
+	    public OrderDto Order { get; set; }
+
+	    /// <summary>
+	    /// 机构对象
+	    /// </summary>
+	    public OrgDto  Organize { get; set; }
+
+	    /// <summary>
+	    /// 机构对象
+	    /// </summary>
+	    public OrgDto CrOrganize { get; set; }
+	}
 }

+ 69 - 0
src/Hotline.Share/Dtos/Order/OrderSuperviseDto.cs

@@ -0,0 +1,69 @@
+using Hotline.Share.Requests;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Hotline.Share.Dtos.Order
+{
+	public class OrderSuperviseDto
+	{
+
+		/// <summary> 
+		/// 督办状态
+		/// </summary>
+		public int? State { get; set; }
+
+		/// <summary>
+		/// 附件
+		/// </summary>
+		public List<string>? Additions { get; set; } = new();
+	}
+
+	public class ApplyOrderSuperviseDto : OrderSuperviseDto
+	{
+		/// <summary>
+		/// 工单ID
+		/// </summary>
+		public string OrderId { get; set; }
+
+		/// <summary>
+		/// 被督办部门ID
+		/// </summary>
+		public string OrgId { get; set; }
+
+		/// <summary>
+		/// 督办回复时限
+		/// </summary>
+		public DateTime ReplyLimitTime { get; set; }
+
+		/// <summary>
+		/// 督办申请内容
+		/// </summary>
+		public string ApplyContent { get; set; }
+	}
+	public class ReplyOrderSuperviseDto : OrderSuperviseDto
+	{
+
+		public string Id { get; set; }
+
+		/// <summary>
+		/// 督办回复内容
+		/// </summary>
+		public string ReplyContent { get; set; }
+
+
+		/// <summary>
+		/// 回复人
+		/// </summary>
+		public string? ReplyId { get; set; }
+	}
+
+	public class SignOrderSuperviseDto 
+	{
+		public string Id { get; set; }
+	}
+
+
+}

+ 67 - 0
src/Hotline.Share/Dtos/Order/OrderUrgeDto.cs

@@ -0,0 +1,67 @@
+using Hotline.Share.Requests;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Hotline.Share.Dtos.Order
+{
+	public class OrderUrgeDto
+	{
+		/// <summary> 
+		/// 督办状态
+		/// </summary>
+		public int? State { get; set; }
+
+		/// <summary>
+		/// 附件
+		/// </summary>
+		public List<string>? Additions { get; set; } = new();
+	}
+
+	public class ApplyOrderUrgeDto : OrderUrgeDto
+	{
+		/// <summary>
+		/// 工单ID
+		/// </summary>
+		public string OrderId { get; set; }
+
+		/// <summary>
+		/// 被督办部门ID
+		/// </summary>
+		public string OrgId { get; set; }
+		/// <summary>
+		/// 督办回复时限
+		/// </summary>
+		public DateTime ReplyLimitTime { get; set; }
+
+		/// <summary>
+		/// 督办申请内容
+		/// </summary>
+		public string ApplyContent { get; set; }
+	}
+	public class ReplyOrderUrgeDto : OrderUrgeDto
+	{
+
+		public string Id { get; set; }
+
+		/// <summary>
+		/// 督办回复内容
+		/// </summary>
+		public string ReplyContent { get; set; }
+
+
+		/// <summary>
+		/// 回复人
+		/// </summary>
+		public string ReplyId { get; set; }
+	}
+
+	public class SignOrderUrgeDto 
+	{
+		public string Id { get; set; }
+	}
+
+
+}

+ 32 - 1
src/Hotline.Share/Dtos/Order/QueryOrderDto.cs

@@ -248,8 +248,39 @@ namespace Hotline.Share.Dtos.Order
         public bool IsApply { get; set; }
     }
 
+    public record SuperviseOrderListDto : PagedKeywordRequest
+    {
+		/// <summary>
+		/// 受理时间(工单创建时间)
+		/// </summary>
+		public DateTime? CreationTimeStart { get; set; }
+		public DateTime? CreationTimeEnd { get; set; }
+	}
+
+
+    public record ApplySuperviseDto
+	{
+	    public string OrderId { get; set; }
+    }
+
+    public record SuperviseListDto : PagedKeywordRequest
+    {
+	    /// <summary>
+	    /// 督办回复状态
+	    /// </summary>
+	    public int? SuperviseState { get; set; }
+    }
+    public record UrgeListDto : PagedKeywordRequest
+    {
+	    /// <summary>
+	    /// 督办回复状态
+	    /// </summary>
+	    public int? SuperviseState { get; set; }
+    }
+
+	
 
-    public enum EVisitStateQuery
+	public enum EVisitStateQuery
     {
         /// <summary>
         /// 全部

+ 8 - 0
src/Hotline/Orders/IOrderSuperviseRepository.cs

@@ -0,0 +1,8 @@
+using XF.Domain.Repository;
+
+namespace Hotline.Orders
+{
+	public interface IOrderSuperviseRepository : IRepository<OrderSupervise>
+	{
+	}
+}

+ 4 - 4
src/Hotline/Orders/IOrderUrgeRepository.cs

@@ -1,8 +1,8 @@
 using XF.Domain.Repository;
 
-namespace Hotline.Orders;
-
-public interface IOrderUrgeRepository : IRepository<OrderUrge>
-{
+namespace Hotline.Orders {
+	public interface IOrderUrgeRepository : IRepository<OrderUrge>
+	{
 
+	}
 }

+ 86 - 5
src/Hotline/Orders/OrderSupervise.cs

@@ -1,9 +1,90 @@
-using System.ComponentModel;
+using Hotline.Settings;
+using Hotline.Users;
+using SqlSugar;
+using System.ComponentModel;
+using XF.Domain.Repository;
 
-namespace Hotline.Orders;
+namespace Hotline.Orders {
+	[Description("督办")]
+	public class OrderSupervise : FullStateEntity
+	{
+		/// <summary>
+		/// 工单ID
+		/// </summary>
+		[SugarColumn(ColumnDescription = "工单ID")]
+		public string OrderId { get; set; }
 
-[Description("督办")]
-public class OrderSupervise
-{
+		/// <summary>
+		/// 督办回复时限
+		/// </summary>
+		[SugarColumn(ColumnDescription = "督办回复时限")]
+		public DateTime ReplyLimitTime { get; set; }
 
+		/// <summary>
+		/// 被督办部门ID
+		/// </summary>
+		[SugarColumn(ColumnDescription = "被督办部门ID")]
+		public string OrgId { get; set; }
+
+		/// <summary>
+		/// 督办状态
+		/// </summary>
+		[SugarColumn(ColumnDescription = "督办状态   0 待回复  1 已回复")]
+		public int State { get; set; }
+
+		/// <summary>
+		/// 督办签收时间
+		/// </summary>
+		[SugarColumn(ColumnDescription = "督办签收时间")]
+		public DateTime? SignTime { get; set; }
+
+		/// <summary>
+		/// 督办回复时间
+		/// </summary>
+		[SugarColumn(ColumnDescription = "督办回复时间")]
+		public DateTime? ReplyTime { get; set; }
+
+		/// <summary>
+		/// 督办申请内容
+		/// </summary>
+		[SugarColumn(ColumnDescription = "督办申请内容", ColumnDataType = "varchar(2000)")]
+		public string? ApplyContent { get; set; }
+
+		/// <summary>
+		/// 督办回复内容
+		/// </summary>
+		[SugarColumn(ColumnDescription = "督办回复内容", ColumnDataType = "varchar(2000)")]
+		public string? ReplyContent { get; set; }
+
+		/// <summary>
+		/// 回复人
+		/// </summary>
+		[SugarColumn(ColumnDescription = "回复人")]
+		public string? ReplyId { get; set; }
+
+		/// <summary>
+		/// 附件
+		/// </summary>
+		[SugarColumn(ColumnDataType = "json", IsJson = true)]
+		public List<string>? Additions { get; set; } = new();
+
+
+		/// <summary>
+		/// 
+		/// </summary>
+		[Navigate(NavigateType.OneToOne, nameof(OrderId))]
+		public Order? Order { get; set; }
+
+		/// <summary>
+		/// 
+		/// </summary>
+		[Navigate(NavigateType.OneToOne, nameof(OrgId))]
+		public SystemOrganize? Organize { get; set; }
+
+		/// <summary>
+		/// 
+		/// </summary>
+		[Navigate(NavigateType.OneToOne, nameof(CreatorOrgId))]
+		public SystemOrganize? CrOrganize { get; set; }
+	}
 }

+ 79 - 9
src/Hotline/Orders/OrderUrge.cs

@@ -1,16 +1,86 @@
 using System.ComponentModel;
+using Hotline.Settings;
 using NpgsqlTypes;
 using SqlSugar;
 using XF.Domain.Repository;
 
-namespace Hotline.Orders;
+namespace Hotline.Orders {
+	[Description("催办")]
+	public class OrderUrge : FullStateEntity
+	{
+		/// <summary>
+		/// 工单ID
+		/// </summary>
+		[SugarColumn(ColumnDescription = "工单ID")]
+		public string OrderId { get; set; }
 
-[Description("催办")]
-public class OrderUrge : CreationEntity
-{
-    public string Content { get; set; }
+		/// <summary>
+		/// 被催办部门ID
+		/// </summary>
+		[SugarColumn(ColumnDescription = "被催办部门ID")]
+		public string OrgId { get; set; }
+
+		/// <summary>
+		/// 催办状态
+		/// </summary>
+		[SugarColumn(ColumnDescription = "催办状态   0 待回复  1 已回复")]
+		public int State { get; set; }
+
+		/// <summary>
+		/// 催办签收时间
+		/// </summary>
+		[SugarColumn(ColumnDescription = "催办签收时间")]
+		public DateTime? SignTime { get; set; }
+
+		/// <summary>
+		/// 催办回复时间
+		/// </summary>
+		[SugarColumn(ColumnDescription = "催办回复时间")]
+		public DateTime? ReplyTime { get; set; }
+
+		/// <summary>
+		/// 催办申请内容
+		/// </summary>
+		[SugarColumn(ColumnDescription = "催办申请内容", ColumnDataType = "varchar(2000)")]
+		public string? ApplyContent { get; set; }
+
+		/// <summary>
+		/// 催办回复内容
+		/// </summary>
+		[SugarColumn(ColumnDescription = "催办回复内容", ColumnDataType = "varchar(2000)")]
+		public string? ReplyContent { get; set; }
+
+		/// <summary>
+		/// 回复人
+		/// </summary>
+		[SugarColumn(ColumnDescription = "回复人")]
+		public string? ReplyId { get; set; }
+
+		/// <summary>
+		/// 附件
+		/// </summary>
+		[SugarColumn(ColumnDataType = "json", IsJson = true)]
+		public List<string>? Additions { get; set; } = new();
+
+
+		/// <summary>
+		/// 
+		/// </summary>
+		[Navigate(NavigateType.OneToOne, nameof(OrderId))]
+		public Order? Order { get; set; }
+
+		/// <summary>
+		/// 
+		/// </summary>
+		[Navigate(NavigateType.OneToOne, nameof(OrgId))]
+		public SystemOrganize? Organize { get; set; }
+
+		/// <summary>
+		/// 
+		/// </summary>
+		[Navigate(NavigateType.OneToOne, nameof(CreatorOrgId))]
+		public SystemOrganize? CrOrganize { get; set; }
+
+	}
+}
 
-    [SugarColumn(IsNullable = true, ColumnDataType = "tsvector")]
-    public NpgsqlTsVector? TsVector { get; set; }
-    
-}

+ 75 - 10
src/Hotline/Permissions/EPermission.cs

@@ -960,16 +960,81 @@ namespace Hotline.Permissions
         /// </summary>
         [Display(GroupName = "OrderDelay",Name = "延期详情",Description ="延期详情")]
         DelayEntity = 500403,
-        #endregion
-
-        #endregion
-
-        #region 公用(999)
-        #region 上/下班
-        /// <summary>
-        /// 上班
-        /// </summary>
-        [Display(GroupName = "公用", Name = "上班", Description = "上班")]
+		#endregion
+
+		#region 工单督办管理
+        /// <summary>
+        ///工单督办列表
+        /// </summary>
+		[Display(GroupName = "OrderSupervise", Name = "工单督办列表", Description = "工单督办列表")]
+		SuperviseOrderList = 500601,
+
+		/// <summary>
+		/// 申请督办
+		/// </summary>
+		[Display(GroupName = "OrderSupervise", Name = "申请督办", Description = "申请督办")]
+		ApplySupervise = 500602,
+
+        /// <summary>
+        /// 回复督办
+        /// </summary>
+		[Display(GroupName = "OrderSupervise", Name = "回复督办", Description = "回复督办")]
+        ReplySupervise = 500603,
+
+		/// <summary>
+		/// 签收督办
+		/// </summary>
+		[Display(GroupName = "OrderSupervise", Name = "签收督办", Description = "签收督办")]
+		SignSupervise = 500604,
+
+		/// <summary>
+		/// 督办详情
+		/// </summary>
+		[Display(GroupName = "OrderDelay", Name = "督办详情", Description = "督办详情")]
+		SuperviseEntity = 500605,
+		#endregion
+
+
+		#region 工单催办管理
+		/// <summary>
+		///工单催办列表
+		/// </summary>
+		[Display(GroupName = "OrderUrge", Name = "工单催办列表", Description = "工单催办列表")]
+		UrgeOrderList = 500701,
+
+		/// <summary>
+		/// 申请催办
+		/// </summary>
+		[Display(GroupName = "OrderUrge", Name = "申请催办", Description = "申请催办")]
+		ApplyUrge = 500702,
+
+		/// <summary>
+		/// 回复催办
+		/// </summary>
+		[Display(GroupName = "OrderUrge", Name = "回复催办", Description = "回复催办")]
+		ReplyUrge = 500703,
+
+		/// <summary>
+		/// 签收催办
+		/// </summary>
+		[Display(GroupName = "OrderUrge", Name = "签收催办", Description = "签收催办")]
+		SignUrge = 500704,
+
+		/// <summary>
+		/// 催办详情
+		/// </summary>
+		[Display(GroupName = "OrderUrge", Name = "催办详情", Description = "催办详情")]
+		UrgeEntity = 500705,
+		#endregion
+
+		#endregion
+
+		#region 公用(999)
+		#region 上/下班
+		/// <summary>
+		/// 上班
+		/// </summary>
+		[Display(GroupName = "公用", Name = "上班", Description = "上班")]
         OnDuty = 999101,
         /// <summary>
         /// 下班