Ver código fonte

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

田爽 9 meses atrás
pai
commit
9c7759209f

+ 1 - 1
src/Hotline.Api/Controllers/OrderController.cs

@@ -1743,7 +1743,7 @@ public class OrderController : BaseController
     /// 工单甄别修改后下一步流程
     /// </summary>
     [HttpPost("screen/initial_nextFlow")]
-    [LogFilter("开始工单甄别流程")]
+    [LogFilter("办理工单甄别流程")]
     public async Task InitialNextFlow([FromBody] ScreenNextFlowDto dto)
     {
         var screen = await _orderScreenRepository.GetAsync(dto.Data.Id);

+ 14 - 8
src/Hotline.Api/Controllers/UserController.cs

@@ -185,10 +185,13 @@ public class UserController : BaseController
     public async Task Update([FromBody] UpdateUserDto dto)
     {
         //工号不能重复
-        var isStaffNoExists = await _userRepository.Queryable()
-            .AnyAsync(d => d.Id != dto.Id && d.StaffNo == dto.StaffNo, HttpContext.RequestAborted);
-        if (isStaffNoExists)
-            throw UserFriendlyException.SameMessage("工号已存在");
+        if (!string.IsNullOrEmpty(dto.StaffNo))
+        {
+            var isStaffNoExists = await _userRepository.Queryable()
+                .AnyAsync(d => d.Id != dto.Id && d.StaffNo == dto.StaffNo, HttpContext.RequestAborted);
+            if (isStaffNoExists)
+                throw UserFriendlyException.SameMessage("工号已存在");
+        }
 
         var user = await _userRepository.Queryable()
             .Includes(d => d.Account)
@@ -217,10 +220,13 @@ public class UserController : BaseController
     public async Task<string> Add([FromBody] AddUserDto dto)
     {
         //工号不能重复
-        var isStaffNoExists = await _userRepository.Queryable()
-            .AnyAsync(d => d.StaffNo == dto.StaffNo, HttpContext.RequestAborted);
-        if (isStaffNoExists)
-            throw UserFriendlyException.SameMessage("工号已存在");
+        if (!string.IsNullOrEmpty(dto.StaffNo))
+        {
+            var isStaffNoExists = await _userRepository.Queryable()
+                .AnyAsync(d => d.StaffNo == dto.StaffNo, HttpContext.RequestAborted);
+            if (isStaffNoExists)
+                throw UserFriendlyException.SameMessage("工号已存在");
+        }
 
         var account = await _accountRepository.GetAsync(d => d.UserName == dto.UserName, HttpContext.RequestAborted);
         if (account is null)

+ 11 - 7
src/Hotline.Application/StatisticalReport/OrderReportApplication.cs

@@ -42,7 +42,7 @@ namespace Hotline.Application.StatisticalReport
         private readonly IRepository<OrderScreen> _orderScreenRepository;
         private readonly IOrderSecondaryHandlingApplication _orderSecondaryHandlingApplication;
         private readonly ITimeLimitDomainService _timeLimitDomainService;
-        
+
 
         public OrderReportApplication(
             IOrderRepository orderRepository,
@@ -87,7 +87,7 @@ namespace Hotline.Application.StatisticalReport
             _orderScreenRepository = orderScreenRepository;
             _orderSecondaryHandlingApplication = orderSecondaryHandlingApplication;
             _timeLimitDomainService = timeLimitDomainService;
-            
+
         }
         /// <summary>
         /// 部门办件统计表---新
@@ -506,7 +506,7 @@ order by ""su"".""OrgCode""";
                     query = _workflowTraceRepository.Queryable()
                         .LeftJoin<Order>((t, o) => t.ExternalId == o.Id)
                          .Where((t, o) => t.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CreationTime >= dto.StartTime && o.CreationTime <= dto.EndTime
-                         && t.Status >= EWorkflowStepStatus.Handled)
+                         && t.Status >= EWorkflowStepStatus.Handled && t.TraceState != EWorkflowTraceState.StepRemoveByPrevious)
                          .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, (t, o) => o.Source == ESource.ProvinceStraight)
                          .WhereIF(dto.OrgCode == "001", (t, o) => t.HandlerOrgId == dto.OrgCode)
                          .WhereIF(dto.OrgCode != "001" && dto.OrgCode != dto.ParentOrgCode, (t, o) => t.HandlerOrgId.StartsWith(dto.OrgCode))
@@ -544,7 +544,8 @@ order by ""su"".""OrgCode""";
                     query = _workflowTraceRepository.Queryable()
                         .LeftJoin<Order>((t, o) => t.ExternalId == o.Id)
                          .Where((t, o) => t.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CreationTime >= dto.StartTime && o.CreationTime <= dto.EndTime
-                         && t.Status >= EWorkflowStepStatus.Handled && t.HandleTime > t.StepExpiredTime && t.CountersignPosition == ECountersignPosition.None)
+                         && t.Status >= EWorkflowStepStatus.Handled && t.HandleTime > t.StepExpiredTime && t.CountersignPosition == ECountersignPosition.None 
+                         && t.TraceState != EWorkflowTraceState.StepRemoveByPrevious)
                          .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, (t, o) => o.Source == ESource.ProvinceStraight)
                          .WhereIF(dto.OrgCode == "001", (t, o) => t.HandlerOrgId == dto.OrgCode)
                          .WhereIF(dto.OrgCode != "001" && dto.OrgCode != dto.ParentOrgCode, (t, o) => t.HandlerOrgId.StartsWith(dto.OrgCode))
@@ -570,7 +571,8 @@ order by ""su"".""OrgCode""";
                     query = _workflowTraceRepository.Queryable()
                         .LeftJoin<Order>((t, o) => t.ExternalId == o.Id)
                          .Where((t, o) => t.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CreationTime >= dto.StartTime && o.CreationTime <= dto.EndTime
-                         && t.Status >= EWorkflowStepStatus.Handled && t.HandleTime > t.StepExpiredTime && t.CountersignPosition > ECountersignPosition.None)
+                         && t.Status >= EWorkflowStepStatus.Handled && t.HandleTime > t.StepExpiredTime && t.CountersignPosition > ECountersignPosition.None
+                         && t.TraceState != EWorkflowTraceState.StepRemoveByPrevious)
                          .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, (t, o) => o.Source == ESource.ProvinceStraight)
                          .WhereIF(dto.OrgCode == "001", (t, o) => t.HandlerOrgId == dto.OrgCode)
                          .WhereIF(dto.OrgCode != "001" && dto.OrgCode != dto.ParentOrgCode, (t, o) => t.HandlerOrgId.StartsWith(dto.OrgCode))
@@ -596,7 +598,8 @@ order by ""su"".""OrgCode""";
                     var cqybquery = _workflowTraceRepository.Queryable()
                            .LeftJoin<Order>((t, o) => t.ExternalId == o.Id)
                             .Where((t, o) => t.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CreationTime >= dto.StartTime && o.CreationTime <= dto.EndTime
-                            && t.Status >= EWorkflowStepStatus.Handled && t.HandleTime > t.StepExpiredTime && t.CountersignPosition >= ECountersignPosition.None)
+                            && t.Status >= EWorkflowStepStatus.Handled && t.HandleTime > t.StepExpiredTime && t.CountersignPosition >= ECountersignPosition.None 
+                            && t.TraceState != EWorkflowTraceState.StepRemoveByPrevious)
                             .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, (t, o) => o.Source == ESource.ProvinceStraight)
                             .WhereIF(dto.OrgCode == "001", (t, o) => t.HandlerOrgId == dto.OrgCode)
                          .WhereIF(dto.OrgCode != "001" && dto.OrgCode != dto.ParentOrgCode, (t, o) => t.HandlerOrgId.StartsWith(dto.OrgCode))
@@ -621,7 +624,8 @@ order by ""su"".""OrgCode""";
                     query = _workflowTraceRepository.Queryable()
                            .LeftJoin<Order>((t, o) => t.ExternalId == o.Id)
                             .Where((t, o) => t.ModuleCode == WorkflowModuleConsts.OrderHandle && o.CreationTime >= dto.StartTime && o.CreationTime <= dto.EndTime
-                            && t.Status >= EWorkflowStepStatus.Handled && t.CountersignPosition > ECountersignPosition.None)
+                            && t.Status >= EWorkflowStepStatus.Handled && t.CountersignPosition > ECountersignPosition.None 
+                            && t.TraceState != EWorkflowTraceState.StepRemoveByPrevious)
                             .WhereIF(dto.IsProvince.HasValue && dto.IsProvince == true, (t, o) => o.Source == ESource.ProvinceStraight)
                             .WhereIF(dto.OrgCode == "001", (t, o) => t.HandlerOrgId == dto.OrgCode)
                          .WhereIF(dto.OrgCode != "001" && dto.OrgCode != dto.ParentOrgCode, (t, o) => t.HandlerOrgId.StartsWith(dto.OrgCode))

+ 4 - 0
src/Hotline.Share/Dtos/FlowEngine/RejectDto.cs

@@ -2,4 +2,8 @@
 
 public class RejectDto : EndWorkflowIdDto
 {
+    /// <summary>
+    /// 当前办理节点id
+    /// </summary>
+    public string StepId { get; set; }
 }