diff --git a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs index 23e17c76..3c3fc948 100644 --- a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs +++ b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs @@ -129,7 +129,7 @@ public class FlowInstanceService : ServiceBase, IFlowInstanceService { if (!wfruntime.CurrentNode.Users.Contains(User.UserId)) { - return DataResult.Failed("该工作流指定用户非本人!", MultiLanguageConst.FlowInstanceAssignUser); + return DataResult.Failed("该工作流指定用户非本人,没有发起审批的权限", MultiLanguageConst.FlowInstanceAssignUser); } } @@ -140,7 +140,7 @@ public class FlowInstanceService : ServiceBase, IFlowInstanceService var intersectRoles = wfruntime.CurrentNode.Roles.Intersect(userRoles).ToList(); if (intersectRoles.Count == 0) { - return DataResult.Failed("该工作流指定角色非本人!", MultiLanguageConst.FlowInstanceAssignRole); + return DataResult.Failed("该工作流指定角色非本人,没有发起审批的权限", MultiLanguageConst.FlowInstanceAssignRole); } } diff --git a/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientBankReq.cs b/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientBankReq.cs index b215c5ba..74109c37 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientBankReq.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientBankReq.cs @@ -79,6 +79,11 @@ public class ClientBankReq /// public long? CountryId { get; set; } + /// + /// 国家名称 + /// + public string? CountryName { get; set; } + /// /// Desc:是否开票默认账户 /// @@ -92,8 +97,7 @@ public class ClientBankReq /// /// 备注 /// - public string Note { get; set; } = ""; - + public string? Note { get; set; } } diff --git a/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientBankRes.cs b/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientBankRes.cs index 944c6671..2bb352e4 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientBankRes.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientBankRes.cs @@ -78,6 +78,11 @@ public class ClientBankRes /// public long? CountryId { get; set; } + /// + /// 国家名称 + /// + public string? CountryName { get; set; } + /// /// Desc:是否开票默认账户 /// diff --git a/ds-wms-service/DS.WMS.Core/Info/Entity/InfoClientBank.cs b/ds-wms-service/DS.WMS.Core/Info/Entity/InfoClientBank.cs index 82b6166a..c82a4680 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Entity/InfoClientBank.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Entity/InfoClientBank.cs @@ -88,6 +88,12 @@ public class InfoClientBank : BaseModelV2 [SugarColumn(ColumnDescription = "国家Id", IsNullable = true)] public long? CountryId { get; set; } + /// + /// 国家名称 + /// + [SugarColumn(ColumnDescription = "国家名称", Length = 50,IsNullable = true)] + public string? CountryName { get; set; } + /// /// Desc:是否开票默认账户 /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs index bc2816c8..16ed5da1 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs @@ -57,10 +57,10 @@ namespace DS.WMS.Core.Op.Interface.TaskInteraction Task UpdateBusinessAsync(FlowCallback callback); /// - /// 通知更新任务接收人 + /// 通知审批执行人变更 /// /// 回调信息 /// - Task UpdateReceiverAsync(MarkerChangedCallback callback); + Task MarkerChangedAsync(MarkerChangedCallback callback); } } diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/SeaExportTaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/SeaExportTaskService.cs index de510e03..6ff402b0 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/SeaExportTaskService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/SeaExportTaskService.cs @@ -199,12 +199,12 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction return extArray.Select(x => x["projectName"]?.Value() ?? string.Empty).ToArray(); } - public override async Task UpdateReceiverAsync(MarkerChangedCallback callback) + public override async Task MarkerChangedAsync(MarkerChangedCallback callback) { if (callback.Type != AuditType.SeaExport) return; - await base.UpdateReceiverAsync(callback); + await base.MarkerChangedAsync(callback); } /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs index 4fec1e4f..83dd6997 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs @@ -131,7 +131,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction return result; //创建&启动工作流 - result = await Create_StartWorkflow(task); + result = await Create_StartWorkflow(task, false); if (!result.Succeeded) return result; @@ -267,10 +267,6 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction try { - var result = await ManagerService.InitTaskJob(info); - if (!result.Succeeded) - return result; - task = new BusinessTask { BusinessId = request.BusinessId, @@ -284,8 +280,12 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction task.NextType = GetNextType(task); await TenantDb.Insertable(task).ExecuteCommandAsync(); + DataResult result = await ManagerService.InitTaskJob(info); + if (!result.Succeeded) + return result; + //待审核,需创建工作流 - if (task.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT) + if (request.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT) { result = await Create_StartWorkflow(task); if (!result.Succeeded) @@ -343,14 +343,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction { string[] ids = FlowInstanceService.GetMarkers(instance); //变更任务接收人为所有审批执行人 - await UpdateReceiverAsync(new MarkerChangedCallback - { - BusinessId = task.BusinessId, - BusinessType = task.BusinessType, - InstanceId = instance.Id, - Type = instance.Type, - NextUserId = ids.Select(long.Parse).ToArray() - }); + var users = await GetRecvUsers(ids.Select(long.Parse).ToArray()); + await ManagerService.TransferTask(task.BusinessId, task.TaskType, users); } } @@ -448,17 +442,18 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction } /// - /// 通知更新任务接收人 + /// 通知审批执行人变更 /// /// 回调信息 /// /// 为null时引发 - public virtual async Task UpdateReceiverAsync(MarkerChangedCallback callback) + public virtual async Task MarkerChangedAsync(MarkerChangedCallback callback) { ArgumentNullException.ThrowIfNull(callback, nameof(callback)); long userId = long.Parse(User.UserId); var users = await GetRecvUsers(userId); + await ManagerService.SetTaskUserStatus( callback.BusinessId, TaskBaseTypeEnum.WAIT_ORDER_AUDIT, diff --git a/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportTaskController.cs b/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportTaskController.cs index 144cb9c8..5b44c8cc 100644 --- a/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportTaskController.cs +++ b/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportTaskController.cs @@ -94,14 +94,14 @@ namespace DS.WMS.OpApi.Controllers } /// - /// 通知更新任务接收人(无需客户端手动调用) + /// 通知审批执行人变更(无需客户端手动调用) /// /// 回调信息 /// - [HttpPost, Route("UpdateReceiver")] - public virtual async Task UpdateReceiverAsync([FromBody] MarkerChangedCallback callback) + [HttpPost, Route("MarkerChanged")] + public virtual async Task MarkerChangedAsync([FromBody] MarkerChangedCallback callback) { - await taskService.UpdateReceiverAsync(callback); + await taskService.MarkerChangedAsync(callback); return StatusCode((int)HttpStatusCode.NoContent); } }