zhangxiaofeng 4 months ago
commit ae9686ff6c

@ -2,7 +2,6 @@
using System.Net.Http.Headers;
using System.Text;
using DS.Module.Core.Extensions;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Newtonsoft.Json;
namespace DS.Module.Core

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>D:\ds8deploy</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
</PropertyGroup>
</Project>

@ -254,6 +254,11 @@ public class FlowInstanceService : ServiceBase, IFlowInstanceService
return DataResult<List<FlowInstanceHistoryRes>>.Success(data);
}
/// <summary>
/// 启动
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public DataResult StartFlowInstance(string id)
{
var instance = Db.Queryable<FlowInstance>().First(x => x.Id == long.Parse(id));
@ -389,7 +394,7 @@ public class FlowInstanceService : ServiceBase, IFlowInstanceService
//获取会签下一执行人,进行通知
if (!string.IsNullOrEmpty(marker) && !instance.MarkerNotifyURL.IsNullOrEmpty())
{
Task.Factory.StartNew(() => NotifyMakerChangedAsync(status, instance, long.Parse(marker)));
Task.Factory.StartNew(() => NotifyMarkerChangedAsync(status, instance, long.Parse(marker)));
}
}
@ -461,7 +466,7 @@ public class FlowInstanceService : ServiceBase, IFlowInstanceService
/// <param name="instance">运行实例</param>
/// <param name="nextUserId">下一执行人ID</param>
/// <returns></returns>
protected virtual async Task NotifyMakerChangedAsync(int status, FlowInstance instance, params long[] nextUserId)
protected virtual async Task NotifyMarkerChangedAsync(int status, FlowInstance instance, params long[] nextUserId)
{
ArgumentNullException.ThrowIfNull(instance, nameof(instance));
@ -513,7 +518,7 @@ public class FlowInstanceService : ServiceBase, IFlowInstanceService
if (result.Succeeded)
{
//更新回调执行标识
await Db.Updateable<FlowInstance>().SetColumns(it => new FlowInstance { IsCallbackExecuted = true })
await Db.Updateable<FlowInstance>().SetColumns(it => it.IsCallbackExecuted == true)
.Where(it => it.Id == instance.Id).ExecuteCommandAsync();
}
}

@ -81,7 +81,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
TaskTenatName = tenatName
}
};
info.Main.TaskDesp = info.Main.TaskTitle = $"{item.TaskType.GetDescription()} {biz.Vessel} {biz.Voyno} ETD:{biz.ETD?.ToString("yyyy-MM-dd")} BLNo:{biz.MBLNO}";
info.Main.TaskDesp = info.Main.TaskTitle = $"{item.TaskType.GetDescription()} {biz?.Vessel} {biz?.Voyno} ETD:{biz?.ETD?.ToString("yyyy-MM-dd")} BLNo:{biz?.MBLNO}";
var result = await ManagerService.InitTaskJob(info);
if (!result.Succeeded)
@ -169,28 +169,28 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
return extArray.Select(x => x["projectName"]?.Value<string>() ?? string.Empty).ToArray();
}
public override async Task MarkerChangedAsync(MarkerChangedCallback callback)
{
if (callback.Type != AuditType.SeaExport)
return;
//public override async Task MarkerChangedAsync(MarkerChangedCallback callback)
//{
// if (callback.Type != AuditType.SeaExport)
// return;
await base.MarkerChangedAsync(callback);
}
// await base.MarkerChangedAsync(callback);
//}
/// <summary>
/// 审批完成回调更新
/// </summary>
/// <param name="callback">回调信息</param>
/// <returns></returns>
public override async Task UpdateBusinessAsync(FlowCallback callback)
{
if (callback.Type != AuditType.SeaExport)
return;
///// <summary>
///// 审批完成回调更新
///// </summary>
///// <param name="callback">回调信息</param>
///// <returns></returns>
//public override async Task UpdateBusinessAsync(FlowCallback callback)
//{
// if (callback.Type != AuditType.SeaExport)
// return;
await base.UpdateBusinessAsync(callback);
// await base.UpdateBusinessAsync(callback);
//todo:海运出口主表信息
}
// //todo:海运出口主表信息
//}
}
}

@ -273,7 +273,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
x.ETD,
}).FirstAsync(x => x.Id == request.BusinessId);
info.Main.TaskDesp = info.Main.TaskTitle = $"{request.TaskType.GetDescription()} {biz?.Vessel} {biz?.Voyno} ETD:{biz?.ETD?.ToString("yyyy-MM-dd")} BLNo:{biz?.MBLNO}";
info.Main.TaskDesp = info.Main.TaskTitle = $"{request.TaskType.GetDescription()} {biz?.Vessel} {biz?.Voyno} ETD:{biz?.ETD?.ToString("yyyy-MM-dd")} BLNo:{biz?.MBLNO}";
}
if (useTransaction)
@ -391,10 +391,6 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
try
{
var result = await ManagerService.SetTaskStatus(request.BusinessId, request.TaskType, request.TaskStatus, DateTime.Now);
if (!result.Succeeded)
return DataResult<TaskBaseTypeEnum?>.Failed(result.Message, result.MultiCode);
BusinessTask task = await GetQuery(request.BusinessId, request.BusinessType, request.TaskType).FirstAsync();
if (task == null)
return DataResult<TaskBaseTypeEnum?>.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
@ -403,6 +399,10 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
if (task.TaskStatus == TaskStatusEnum.Cancel)
return DataResult<TaskBaseTypeEnum?>.FailedWithDesc(nameof(MultiLanguageConst.TaskCancelled));
var result = await ManagerService.SetTaskStatus(request.BusinessId, request.TaskType, request.TaskStatus, DateTime.Now);
if (!result.Succeeded)
return DataResult<TaskBaseTypeEnum?>.Failed(result.Message, result.MultiCode);
//触发任务状态变更通知
if (task.TaskStatus != request.TaskStatus)
await OnTaskStatusChanged(request);

@ -41,7 +41,7 @@ if (!policyName.IsNullOrEmpty())
// if (app.Environment.IsDevelopment())
// {
var apis = new List<string> { "WmsMainAPI", "WmsAdminAPI", "WmsOpAPI", "WmsFeeAPI", "WmsCheckAPI", "WmsFinanceAPI", "WmsPrintAPI", "WmsTaskAPI", "TestApi" };
var apis = new List<string> { "WmsMainAPI", "WmsAdminAPI", "WmsOpAPI", "WmsFeeAPI", "WmsCheckAPI", "WmsFinanceAPI", "WmsPrintAPI", "WmsTaskAPI", "WmsContainerManagementAPI", "TestApi" };
app
.UseSwagger()

@ -199,24 +199,6 @@
"Type": "RoundRobin"
}
},
{
"DownstreamPathTemplate": "/containerManagementApi/{url}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 3005
}
],
"UpstreamPathTemplate": "/containerManagementApi/{url}",
"UpstreamHttpMethod": [
"Get",
"Post"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
}
},
{
"DownstreamPathTemplate": "/LinkAttach/{url}",
"DownstreamScheme": "http",
@ -317,6 +299,24 @@
"ReRouteIsCaseSensitive": false,
"UseServiceDiscovery": false
},
{
"DownstreamPathTemplate": "/containerManagementApi/{url}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 3010
}
],
"UpstreamPathTemplate": "/containerManagementApi/{url}",
"UpstreamHttpMethod": [
"Get",
"Post"
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
}
},
{
"DownstreamPathTemplate": "/WmsContainerManagementAPI/swagger.json",
"DownstreamScheme": "http",

Loading…
Cancel
Save