|
|
@ -12,6 +12,7 @@ using Microsoft.Extensions.Options;
|
|
|
|
using Myshipping.Application.Entity;
|
|
|
|
using Myshipping.Application.Entity;
|
|
|
|
using Myshipping.Core;
|
|
|
|
using Myshipping.Core;
|
|
|
|
using Myshipping.Core.Entity;
|
|
|
|
using Myshipping.Core.Entity;
|
|
|
|
|
|
|
|
using Npoi.Mapper;
|
|
|
|
using NPOI.OpenXmlFormats.Vml;
|
|
|
|
using NPOI.OpenXmlFormats.Vml;
|
|
|
|
using NPOI.SS.Formula.Functions;
|
|
|
|
using NPOI.SS.Formula.Functions;
|
|
|
|
using NPOI.SS.Formula.PTG;
|
|
|
|
using NPOI.SS.Formula.PTG;
|
|
|
@ -202,6 +203,19 @@ namespace Myshipping.Application
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunInfoRepository.InsertAsync(serviceWorkFlowRunInfo);
|
|
|
|
await _serviceWorkFlowRunInfoRepository.InsertAsync(serviceWorkFlowRunInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = serviceWorkFlowRunInfo.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = serviceWorkFlowRunInfo.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.PUSH_PROJECT.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Insert";
|
|
|
|
|
|
|
|
runLog.SOURCE_TYPE = info.Main.SourceType.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (tsk.OperType == "Update")
|
|
|
|
else if (tsk.OperType == "Update")
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -210,12 +224,31 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
runInfo.IS_YIELD = 1;
|
|
|
|
runInfo.IS_YIELD = 1;
|
|
|
|
runInfo.ACT_DATE = nowDate;
|
|
|
|
runInfo.ACT_DATE = nowDate;
|
|
|
|
|
|
|
|
runInfo.UpdatedTime = nowDate;
|
|
|
|
|
|
|
|
runInfo.UpdatedUserId = long.Parse(info.Main.OperUserId);
|
|
|
|
|
|
|
|
runInfo.UpdatedUserName = info.Main.OperUserName;
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunInfoRepository.AsUpdateable(runInfo).UpdateColumns(it => new
|
|
|
|
await _serviceWorkFlowRunInfoRepository.AsUpdateable(runInfo).UpdateColumns(it => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
it.ACT_DATE,
|
|
|
|
it.ACT_DATE,
|
|
|
|
it.IS_YIELD,
|
|
|
|
it.IS_YIELD,
|
|
|
|
|
|
|
|
it.UpdatedTime,
|
|
|
|
|
|
|
|
it.UpdatedUserId,
|
|
|
|
|
|
|
|
it.UpdatedUserName
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = runInfo.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = runInfo.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.PUSH_PROJECT.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Update";
|
|
|
|
|
|
|
|
runLog.SOURCE_TYPE = info.Main.SourceType.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -326,6 +359,24 @@ namespace Myshipping.Application
|
|
|
|
//写入run主表
|
|
|
|
//写入run主表
|
|
|
|
await _serviceWorkFlowRunInfoRepository.InsertAsync(serviceWorkFlowRunInfo);
|
|
|
|
await _serviceWorkFlowRunInfoRepository.InsertAsync(serviceWorkFlowRunInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = serviceWorkFlowRunInfo.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = serviceWorkFlowRunInfo.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.PUSH_STATUS.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Insert";
|
|
|
|
|
|
|
|
runLog.BUSI_SYSTEM_CODE = info.Main.BusiSystemCode.ToUpper();
|
|
|
|
|
|
|
|
runLog.BUSI_ID = info.Main.BusiId.ToUpper();
|
|
|
|
|
|
|
|
runLog.SERVICE_WF_ID = rt.WFPKId;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_CODE = rt.ProjectCode;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_NAME = rt.ProjectName;
|
|
|
|
|
|
|
|
runLog.SOURCE_TYPE = info.Main.SourceType.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
//获取状态最大数
|
|
|
|
//获取状态最大数
|
|
|
|
int endNum = rt.StatusList.Max(sku => sku.ActSortNo);
|
|
|
|
int endNum = rt.StatusList.Max(sku => sku.ActSortNo);
|
|
|
|
|
|
|
|
|
|
|
@ -359,15 +410,26 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusCode.Equals(sku.StatusSKUCode,StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (st.StatusCode.Equals(sku.StatusSKUCode,StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.IS_YIELD = 1;
|
|
|
|
bool currIsYield = true;
|
|
|
|
|
|
|
|
|
|
|
|
if(st.StatusDate.HasValue)
|
|
|
|
//完成时间为空,备注不为空只保存备注信息,不标记完成
|
|
|
|
|
|
|
|
if(!st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.ACT_DATE = st.StatusDate.Value;
|
|
|
|
currIsYield = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
if (currIsYield)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.ACT_DATE = nowDate;
|
|
|
|
activitiesRunInfo.IS_YIELD = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusDate.HasValue)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesRunInfo.ACT_DATE = st.StatusDate.Value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesRunInfo.ACT_DATE = nowDate;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
activitiesRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesRunInfo.ACT_VAL = st.StatusVal;
|
|
|
@ -377,6 +439,29 @@ namespace Myshipping.Application
|
|
|
|
//写入run活动表
|
|
|
|
//写入run活动表
|
|
|
|
await _serviceWorkFlowRunActivitiesInfoRepository.InsertAsync(activitiesRunInfo);
|
|
|
|
await _serviceWorkFlowRunActivitiesInfoRepository.InsertAsync(activitiesRunInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = activitiesRunInfo.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = activitiesRunInfo.RUN_ID;
|
|
|
|
|
|
|
|
runLog.RUN_DETAIL_ID = activitiesRunInfo.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.PUSH_STATUS.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Insert";
|
|
|
|
|
|
|
|
runLog.MBL_NO = info.Main?.MBlNo.ToUpper();
|
|
|
|
|
|
|
|
runLog.VESSEL_VOYNO = info.Main?.VesselVoyno.ToUpper();
|
|
|
|
|
|
|
|
runLog.ORDER_NO = info.Main?.OrderNo;
|
|
|
|
|
|
|
|
runLog.RELEASE_VERSION = rt.ReleaseVersion;
|
|
|
|
|
|
|
|
runLog.BUSI_SYSTEM_CODE = info.Main.BusiSystemCode.ToUpper();
|
|
|
|
|
|
|
|
runLog.BUSI_ID = info.Main.BusiId.ToUpper();
|
|
|
|
|
|
|
|
runLog.SERVICE_WF_ID = rt.WFPKId;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_CODE = rt.ProjectCode;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_NAME = rt.ProjectName;
|
|
|
|
|
|
|
|
runLog.SOURCE_TYPE = info.Main.SourceType.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
if (sku.SubStatusList != null && sku.SubStatusList.Count > 0)
|
|
|
|
if (sku.SubStatusList != null && sku.SubStatusList.Count > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string lastSubActId = string.Empty;
|
|
|
|
string lastSubActId = string.Empty;
|
|
|
@ -410,17 +495,27 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.IS_YIELD = 1;
|
|
|
|
bool currIsYield = true;
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusDate.HasValue)
|
|
|
|
//完成时间为空,备注不为空只保存备注信息,不标记完成
|
|
|
|
|
|
|
|
if (!st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.ACT_DATE = st.StatusDate.Value;
|
|
|
|
currIsYield = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
if (currIsYield)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.ACT_DATE = nowDate;
|
|
|
|
activitiesSubRunInfo.IS_YIELD = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusDate.HasValue)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesSubRunInfo.ACT_DATE = st.StatusDate.Value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesSubRunInfo.ACT_DATE = nowDate;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
activitiesSubRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesSubRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesSubRunInfo.ACT_REMARK = st.Remark;
|
|
|
|
activitiesSubRunInfo.ACT_REMARK = st.Remark;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -430,6 +525,29 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunActivitiesInfoRepository.InsertAsync(activitiesSubRunInfo);
|
|
|
|
await _serviceWorkFlowRunActivitiesInfoRepository.InsertAsync(activitiesSubRunInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = activitiesSubRunInfo.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = activitiesSubRunInfo.RUN_ID;
|
|
|
|
|
|
|
|
runLog.RUN_DETAIL_ID = activitiesSubRunInfo.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.PUSH_STATUS.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Insert";
|
|
|
|
|
|
|
|
runLog.MBL_NO = info.Main?.MBlNo.ToUpper();
|
|
|
|
|
|
|
|
runLog.VESSEL_VOYNO = info.Main?.VesselVoyno.ToUpper();
|
|
|
|
|
|
|
|
runLog.ORDER_NO = info.Main?.OrderNo;
|
|
|
|
|
|
|
|
runLog.RELEASE_VERSION = rt.ReleaseVersion;
|
|
|
|
|
|
|
|
runLog.BUSI_SYSTEM_CODE = info.Main.BusiSystemCode.ToUpper();
|
|
|
|
|
|
|
|
runLog.BUSI_ID = info.Main.BusiId.ToUpper();
|
|
|
|
|
|
|
|
runLog.SERVICE_WF_ID = rt.WFPKId;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_CODE = rt.ProjectCode;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_NAME = rt.ProjectName;
|
|
|
|
|
|
|
|
runLog.SOURCE_TYPE = info.Main.SourceType.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
lastSubActId = activitiesSubRunInfo.PK_ID;
|
|
|
|
lastSubActId = activitiesSubRunInfo.PK_ID;
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -463,6 +581,19 @@ namespace Myshipping.Application
|
|
|
|
it.UpdatedUserId,
|
|
|
|
it.UpdatedUserId,
|
|
|
|
it.UpdatedUserName
|
|
|
|
it.UpdatedUserName
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = runEntity.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = runEntity.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.PUSH_STATUS.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Update";
|
|
|
|
|
|
|
|
runLog.SOURCE_TYPE = info.Main.SourceType.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//批量写入活动表
|
|
|
|
//批量写入活动表
|
|
|
@ -500,15 +631,26 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusCode.Equals(sku.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (st.StatusCode.Equals(sku.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.IS_YIELD = 1;
|
|
|
|
bool currIsYield = true;
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusDate.HasValue)
|
|
|
|
//完成时间为空,备注不为空只保存备注信息,不标记完成
|
|
|
|
|
|
|
|
if (!st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.ACT_DATE = st.StatusDate.Value;
|
|
|
|
currIsYield = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
if (currIsYield)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.ACT_DATE = nowDate;
|
|
|
|
activitiesRunInfo.IS_YIELD = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusDate.HasValue)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesRunInfo.ACT_DATE = st.StatusDate.Value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesRunInfo.ACT_DATE = nowDate;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
activitiesRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesRunInfo.ACT_VAL = st.StatusVal;
|
|
|
@ -518,6 +660,28 @@ namespace Myshipping.Application
|
|
|
|
//写入run活动表
|
|
|
|
//写入run活动表
|
|
|
|
await _serviceWorkFlowRunActivitiesInfoRepository.InsertAsync(activitiesRunInfo);
|
|
|
|
await _serviceWorkFlowRunActivitiesInfoRepository.InsertAsync(activitiesRunInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = activitiesRunInfo.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = activitiesRunInfo.RUN_ID;
|
|
|
|
|
|
|
|
runLog.RUN_DETAIL_ID = activitiesRunInfo.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.PUSH_STATUS.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Insert";
|
|
|
|
|
|
|
|
runLog.MBL_NO = info.Main?.MBlNo.ToUpper();
|
|
|
|
|
|
|
|
runLog.VESSEL_VOYNO = info.Main?.VesselVoyno.ToUpper();
|
|
|
|
|
|
|
|
runLog.ORDER_NO = info.Main?.OrderNo;
|
|
|
|
|
|
|
|
runLog.RELEASE_VERSION = rt.ReleaseVersion;
|
|
|
|
|
|
|
|
runLog.BUSI_SYSTEM_CODE = info.Main.BusiSystemCode.ToUpper();
|
|
|
|
|
|
|
|
runLog.BUSI_ID = info.Main.BusiId.ToUpper();
|
|
|
|
|
|
|
|
runLog.SERVICE_WF_ID = rt.WFPKId;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_CODE = rt.ProjectCode;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_NAME = rt.ProjectName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
if (sku.SubStatusList != null && sku.SubStatusList.Count > 0)
|
|
|
|
if (sku.SubStatusList != null && sku.SubStatusList.Count > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string lastSubActId = string.Empty;
|
|
|
|
string lastSubActId = string.Empty;
|
|
|
@ -551,15 +715,26 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.IS_YIELD = 1;
|
|
|
|
bool currIsYield = true;
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusDate.HasValue)
|
|
|
|
//完成时间为空,备注不为空只保存备注信息,不标记完成
|
|
|
|
|
|
|
|
if (!st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.ACT_DATE = st.StatusDate.Value;
|
|
|
|
currIsYield = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
if (currIsYield)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.ACT_DATE = nowDate;
|
|
|
|
activitiesSubRunInfo.IS_YIELD = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusDate.HasValue)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesSubRunInfo.ACT_DATE = st.StatusDate.Value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesSubRunInfo.ACT_DATE = nowDate;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
activitiesSubRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesSubRunInfo.ACT_VAL = st.StatusVal;
|
|
|
@ -571,6 +746,28 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunActivitiesInfoRepository.InsertAsync(activitiesSubRunInfo);
|
|
|
|
await _serviceWorkFlowRunActivitiesInfoRepository.InsertAsync(activitiesSubRunInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = activitiesSubRunInfo.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = activitiesSubRunInfo.RUN_ID;
|
|
|
|
|
|
|
|
runLog.RUN_DETAIL_ID = activitiesSubRunInfo.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.PUSH_STATUS.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Insert";
|
|
|
|
|
|
|
|
runLog.MBL_NO = info.Main?.MBlNo.ToUpper();
|
|
|
|
|
|
|
|
runLog.VESSEL_VOYNO = info.Main?.VesselVoyno.ToUpper();
|
|
|
|
|
|
|
|
runLog.ORDER_NO = info.Main?.OrderNo;
|
|
|
|
|
|
|
|
runLog.RELEASE_VERSION = rt.ReleaseVersion;
|
|
|
|
|
|
|
|
runLog.BUSI_SYSTEM_CODE = info.Main.BusiSystemCode.ToUpper();
|
|
|
|
|
|
|
|
runLog.BUSI_ID = info.Main.BusiId.ToUpper();
|
|
|
|
|
|
|
|
runLog.SERVICE_WF_ID = rt.WFPKId;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_CODE = rt.ProjectCode;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_NAME = rt.ProjectName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
lastSubActId = activitiesSubRunInfo.PK_ID;
|
|
|
|
lastSubActId = activitiesSubRunInfo.PK_ID;
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -601,6 +798,19 @@ namespace Myshipping.Application
|
|
|
|
it.UpdatedUserId,
|
|
|
|
it.UpdatedUserId,
|
|
|
|
it.UpdatedUserName
|
|
|
|
it.UpdatedUserName
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = runEntity.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = runEntity.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.PUSH_STATUS.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Update";
|
|
|
|
|
|
|
|
runLog.SOURCE_TYPE = info.Main.SourceType.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//只需要更新完成标记和完成时间
|
|
|
|
//只需要更新完成标记和完成时间
|
|
|
|
rt.StatusList.ForEach(async sku =>
|
|
|
|
rt.StatusList.ForEach(async sku =>
|
|
|
@ -613,17 +823,37 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusCode.Equals(sku.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (st.StatusCode.Equals(sku.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.IS_YIELD = 1;
|
|
|
|
bool currIsYield = true;
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusDate.HasValue)
|
|
|
|
//完成时间为空,备注不为空只保存备注信息,不标记完成
|
|
|
|
|
|
|
|
if (!st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.ACT_DATE = st.StatusDate.Value;
|
|
|
|
currIsYield = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
var beforeObj = new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.ACT_DATE = nowDate;
|
|
|
|
ACT_VAL = activitiesRunInfo.ACT_VAL,
|
|
|
|
}
|
|
|
|
ACT_REMARK = activitiesRunInfo.ACT_REMARK,
|
|
|
|
|
|
|
|
ACT_DATE = activitiesRunInfo.ACT_DATE,
|
|
|
|
|
|
|
|
IS_YIELD = activitiesRunInfo.IS_YIELD
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("批次={no} 取消状态前记录 msg={msg}", batchNo, JSON.Serialize(beforeObj));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currIsYield)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesRunInfo.IS_YIELD = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusDate.HasValue)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesRunInfo.ACT_DATE = st.StatusDate.Value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesRunInfo.ACT_DATE = nowDate;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
activitiesRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesRunInfo.ACT_REMARK = st.Remark;
|
|
|
|
activitiesRunInfo.ACT_REMARK = st.Remark;
|
|
|
|
|
|
|
|
|
|
|
@ -641,6 +871,33 @@ namespace Myshipping.Application
|
|
|
|
it.UpdatedUserId,
|
|
|
|
it.UpdatedUserId,
|
|
|
|
it.UpdatedUserName
|
|
|
|
it.UpdatedUserName
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = activitiesRunInfo.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = activitiesRunInfo.RUN_ID;
|
|
|
|
|
|
|
|
runLog.RUN_DETAIL_ID = activitiesRunInfo.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.PUSH_STATUS.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Update";
|
|
|
|
|
|
|
|
runLog.MBL_NO = info.Main?.MBlNo.ToUpper();
|
|
|
|
|
|
|
|
runLog.VESSEL_VOYNO = info.Main?.VesselVoyno.ToUpper();
|
|
|
|
|
|
|
|
runLog.ORDER_NO = info.Main?.OrderNo;
|
|
|
|
|
|
|
|
runLog.RELEASE_VERSION = rt.ReleaseVersion;
|
|
|
|
|
|
|
|
runLog.BUSI_SYSTEM_CODE = info.Main.BusiSystemCode.ToUpper();
|
|
|
|
|
|
|
|
runLog.BUSI_ID = info.Main.BusiId.ToUpper();
|
|
|
|
|
|
|
|
runLog.SERVICE_WF_ID = rt.WFPKId;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_CODE = rt.ProjectCode;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_NAME = rt.ProjectName;
|
|
|
|
|
|
|
|
runLog.ACT_VAL = beforeObj.ACT_VAL;
|
|
|
|
|
|
|
|
runLog.ACT_DATE = beforeObj.ACT_DATE;
|
|
|
|
|
|
|
|
runLog.ACT_REMARK = beforeObj.ACT_REMARK;
|
|
|
|
|
|
|
|
runLog.IS_YIELD = beforeObj.IS_YIELD;
|
|
|
|
|
|
|
|
runLog.SOURCE_TYPE = info.Main.SourceType.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (sku.SubStatusList != null && sku.SubStatusList.Count > 0)
|
|
|
|
if (sku.SubStatusList != null && sku.SubStatusList.Count > 0)
|
|
|
@ -655,15 +912,36 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.IS_YIELD = 1;
|
|
|
|
bool currIsYield = true;
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusDate.HasValue)
|
|
|
|
//完成时间为空,备注不为空只保存备注信息,不标记完成
|
|
|
|
|
|
|
|
if (!st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.ACT_DATE = st.StatusDate.Value;
|
|
|
|
currIsYield = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
var beforeObj = new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.ACT_DATE = nowDate;
|
|
|
|
ACT_VAL = activitiesRunInfo.ACT_VAL,
|
|
|
|
|
|
|
|
ACT_REMARK = activitiesRunInfo.ACT_REMARK,
|
|
|
|
|
|
|
|
ACT_DATE = activitiesRunInfo.ACT_DATE,
|
|
|
|
|
|
|
|
IS_YIELD = activitiesRunInfo.IS_YIELD
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("批次={no} 取消状态前记录 msg={msg}", batchNo, JSON.Serialize(beforeObj));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currIsYield)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesSubRunInfo.IS_YIELD = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusDate.HasValue)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesSubRunInfo.ACT_DATE = st.StatusDate.Value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
activitiesSubRunInfo.ACT_DATE = nowDate;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
activitiesSubRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesSubRunInfo.ACT_VAL = st.StatusVal;
|
|
|
@ -683,6 +961,35 @@ namespace Myshipping.Application
|
|
|
|
it.UpdatedUserId,
|
|
|
|
it.UpdatedUserId,
|
|
|
|
it.UpdatedUserName
|
|
|
|
it.UpdatedUserName
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = activitiesSubRunInfo.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = activitiesSubRunInfo.RUN_ID;
|
|
|
|
|
|
|
|
runLog.RUN_DETAIL_ID = activitiesSubRunInfo.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.PUSH_STATUS.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Update";
|
|
|
|
|
|
|
|
runLog.MBL_NO = info.Main?.MBlNo.ToUpper();
|
|
|
|
|
|
|
|
runLog.VESSEL_VOYNO = info.Main?.VesselVoyno.ToUpper();
|
|
|
|
|
|
|
|
runLog.ORDER_NO = info.Main?.OrderNo;
|
|
|
|
|
|
|
|
runLog.RELEASE_VERSION = rt.ReleaseVersion;
|
|
|
|
|
|
|
|
runLog.ORDER_NO = info.Main?.OrderNo;
|
|
|
|
|
|
|
|
runLog.RELEASE_VERSION = rt.ReleaseVersion;
|
|
|
|
|
|
|
|
runLog.BUSI_SYSTEM_CODE = info.Main.BusiSystemCode.ToUpper();
|
|
|
|
|
|
|
|
runLog.BUSI_ID = info.Main.BusiId.ToUpper();
|
|
|
|
|
|
|
|
runLog.SERVICE_WF_ID = rt.WFPKId;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_CODE = rt.ProjectCode;
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_NAME = rt.ProjectName;
|
|
|
|
|
|
|
|
runLog.ACT_VAL = beforeObj.ACT_VAL;
|
|
|
|
|
|
|
|
runLog.ACT_DATE = beforeObj.ACT_DATE;
|
|
|
|
|
|
|
|
runLog.ACT_REMARK = beforeObj.ACT_REMARK;
|
|
|
|
|
|
|
|
runLog.IS_YIELD = beforeObj.IS_YIELD;
|
|
|
|
|
|
|
|
runLog.SOURCE_TYPE = info.Main.SourceType.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1043,12 +1350,31 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
runInfo.IS_YIELD = 0;
|
|
|
|
runInfo.IS_YIELD = 0;
|
|
|
|
runInfo.ACT_DATE = null;
|
|
|
|
runInfo.ACT_DATE = null;
|
|
|
|
|
|
|
|
runInfo.UpdatedTime = nowDate;
|
|
|
|
|
|
|
|
runInfo.UpdatedUserId = long.Parse(info.Main.OperUserId);
|
|
|
|
|
|
|
|
runInfo.UpdatedUserName = info.Main.OperUserName;
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunInfoRepository.AsUpdateable(runInfo).UpdateColumns(it => new
|
|
|
|
await _serviceWorkFlowRunInfoRepository.AsUpdateable(runInfo).UpdateColumns(it => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
it.ACT_DATE,
|
|
|
|
it.ACT_DATE,
|
|
|
|
it.IS_YIELD,
|
|
|
|
it.IS_YIELD,
|
|
|
|
|
|
|
|
it.UpdatedTime,
|
|
|
|
|
|
|
|
it.UpdatedUserId,
|
|
|
|
|
|
|
|
it.UpdatedUserName
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = runInfo.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = runInfo.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.CANCEL_PROJECT.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Update";
|
|
|
|
|
|
|
|
runLog.SOURCE_TYPE = info.Main.SourceType.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -1098,8 +1424,6 @@ namespace Myshipping.Application
|
|
|
|
&& wfArgs.Contains(main.SERVICE_WF_ID))
|
|
|
|
&& wfArgs.Contains(main.SERVICE_WF_ID))
|
|
|
|
.Select((main, detail) => new { Main = main, Detail = detail }).ToList();
|
|
|
|
.Select((main, detail) => new { Main = main, Detail = detail }).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//按照请求的状态列表轮询
|
|
|
|
//按照请求的状态列表轮询
|
|
|
|
info.Main.StatusList.ForEach(async st =>
|
|
|
|
info.Main.StatusList.ForEach(async st =>
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1130,6 +1454,16 @@ namespace Myshipping.Application
|
|
|
|
var activitiesRunInfo = _serviceWorkFlowRunActivitiesInfoRepository
|
|
|
|
var activitiesRunInfo = _serviceWorkFlowRunActivitiesInfoRepository
|
|
|
|
.AsQueryable().First(b => b.PK_ID == detail.Detail.PK_ID);
|
|
|
|
.AsQueryable().First(b => b.PK_ID == detail.Detail.PK_ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var beforeObj = new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ACT_VAL = activitiesRunInfo.ACT_VAL,
|
|
|
|
|
|
|
|
ACT_REMARK = activitiesRunInfo.ACT_REMARK,
|
|
|
|
|
|
|
|
ACT_DATE = activitiesRunInfo.ACT_DATE,
|
|
|
|
|
|
|
|
IS_YIELD = activitiesRunInfo.IS_YIELD
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("批次={no} 取消状态前记录 msg={msg}", batchNo,JSON.Serialize(beforeObj));
|
|
|
|
|
|
|
|
|
|
|
|
activitiesRunInfo.ACT_VAL = null;
|
|
|
|
activitiesRunInfo.ACT_VAL = null;
|
|
|
|
activitiesRunInfo.ACT_REMARK = null;
|
|
|
|
activitiesRunInfo.ACT_REMARK = null;
|
|
|
|
activitiesRunInfo.ACT_DATE = null;
|
|
|
|
activitiesRunInfo.ACT_DATE = null;
|
|
|
@ -1150,6 +1484,33 @@ namespace Myshipping.Application
|
|
|
|
it.UpdatedUserId,
|
|
|
|
it.UpdatedUserId,
|
|
|
|
it.UpdatedUserName
|
|
|
|
it.UpdatedUserName
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 写入运行日志
|
|
|
|
|
|
|
|
var runLog = activitiesRunInfo.Adapt<ServiceWorkFlowRunLogInfo>();
|
|
|
|
|
|
|
|
runLog.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
runLog.RUN_ID = activitiesRunInfo.RUN_ID;
|
|
|
|
|
|
|
|
runLog.RUN_DETAIL_ID = activitiesRunInfo.PK_ID;
|
|
|
|
|
|
|
|
runLog.BATCH_NO = batchNo;
|
|
|
|
|
|
|
|
runLog.OPER_TYPE = TrackingRunOperTypeEnum.CANCEL_STATUS.ToString();
|
|
|
|
|
|
|
|
runLog.EXEC_RESULT = "SUCC";
|
|
|
|
|
|
|
|
runLog.EXEC_NOTE = "Update";
|
|
|
|
|
|
|
|
runLog.MBL_NO = info.Main?.MBlNo.ToUpper();
|
|
|
|
|
|
|
|
runLog.VESSEL_VOYNO = info.Main?.VesselVoyno.ToUpper();
|
|
|
|
|
|
|
|
runLog.ORDER_NO = info.Main?.OrderNo;
|
|
|
|
|
|
|
|
runLog.RELEASE_VERSION = detail.Main.RELEASE_VERSION;
|
|
|
|
|
|
|
|
runLog.BUSI_SYSTEM_CODE = info.Main.BusiSystemCode.ToUpper();
|
|
|
|
|
|
|
|
runLog.BUSI_ID = info.Main.BusiId.ToUpper();
|
|
|
|
|
|
|
|
runLog.SERVICE_WF_ID = detail.Main.SERVICE_WF_ID.ToUpper();
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_CODE = detail.Main.SERVICE_PROJECT_CODE.ToUpper();
|
|
|
|
|
|
|
|
runLog.SERVICE_PROJECT_NAME = detail.Main.SERVICE_PROJECT_NAME.ToUpper();
|
|
|
|
|
|
|
|
runLog.ACT_VAL = beforeObj.ACT_VAL;
|
|
|
|
|
|
|
|
runLog.ACT_DATE = beforeObj.ACT_DATE;
|
|
|
|
|
|
|
|
runLog.ACT_REMARK = beforeObj.ACT_REMARK;
|
|
|
|
|
|
|
|
runLog.IS_YIELD = beforeObj.IS_YIELD;
|
|
|
|
|
|
|
|
runLog.SOURCE_TYPE = info.Main.SourceType.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -1466,7 +1827,10 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
//在获取运行表已有的记录
|
|
|
|
//在获取运行表已有的记录
|
|
|
|
var runList = InnerGetRunListBySingleBusiness(messageInfo);
|
|
|
|
var runList = InnerGetRunListBySingleBusiness(messageInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int lastWFSortNo = 0;
|
|
|
|
|
|
|
|
int calcNum = 1;
|
|
|
|
|
|
|
|
|
|
|
|
var resultList = statuList.Join(runList, l => l.WFPKId, r => r.WFPKId,
|
|
|
|
var resultList = statuList.Join(runList, l => l.WFPKId, r => r.WFPKId,
|
|
|
|
(l, r) => {
|
|
|
|
(l, r) => {
|
|
|
|
|
|
|
|
|
|
|
@ -1486,7 +1850,9 @@ namespace Myshipping.Application
|
|
|
|
ShowName = b.ShowName,
|
|
|
|
ShowName = b.ShowName,
|
|
|
|
IsYield = false,
|
|
|
|
IsYield = false,
|
|
|
|
StatusSKUCode = b.StatusSKUCode,
|
|
|
|
StatusSKUCode = b.StatusSKUCode,
|
|
|
|
ActRemark = b.ActRemark
|
|
|
|
ActRemark = b.ActRemark,
|
|
|
|
|
|
|
|
WFSortNo = l.SortNo,
|
|
|
|
|
|
|
|
CalcSortNo = (decimal)b.ActSortNo,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if(b.SubStatusList != null && b.SubStatusList.Count > 0)
|
|
|
|
if(b.SubStatusList != null && b.SubStatusList.Count > 0)
|
|
|
@ -1498,29 +1864,75 @@ namespace Myshipping.Application
|
|
|
|
ShowName = c.ShowName,
|
|
|
|
ShowName = c.ShowName,
|
|
|
|
IsYield = false,
|
|
|
|
IsYield = false,
|
|
|
|
StatusSKUCode = b.StatusSKUCode,
|
|
|
|
StatusSKUCode = b.StatusSKUCode,
|
|
|
|
ActRemark = b.ActRemark
|
|
|
|
ActRemark = b.ActRemark,
|
|
|
|
|
|
|
|
WFSortNo = l.SortNo,
|
|
|
|
|
|
|
|
CalcSortNo = (decimal)b.ActSortNo + (c.ActSortNo * 0.001m)
|
|
|
|
}).ToList());
|
|
|
|
}).ToList());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
rltList = runInfo.ActivitiesList.Select(b => new ServiceProjectStatusDto
|
|
|
|
runInfo.ActivitiesList.ForEach(b => {
|
|
|
|
{
|
|
|
|
rltList.Add(new ServiceProjectStatusDto
|
|
|
|
ActPKId = b.ActId,
|
|
|
|
{
|
|
|
|
ActSortNo = b.ExecSortNo,
|
|
|
|
ActPKId = b.ActId,
|
|
|
|
ShowName = b.ShowName,
|
|
|
|
ActSortNo = b.ExecSortNo,
|
|
|
|
IsYield = b.IsYield == 1 ? true : false,
|
|
|
|
ShowName = b.ShowName,
|
|
|
|
ActDate = b.ActDate,
|
|
|
|
IsYield = b.IsYield == 1 ? true : false,
|
|
|
|
ActVal = b.ActVal,
|
|
|
|
ActDate = b.ActDate,
|
|
|
|
StatusSKUCode = b.StatusSKUCode,
|
|
|
|
ActVal = b.ActVal,
|
|
|
|
ActRemark = b.ActRemark
|
|
|
|
StatusSKUCode = b.StatusSKUCode,
|
|
|
|
}).ToList();
|
|
|
|
ActRemark = b.ActRemark,
|
|
|
|
|
|
|
|
WFSortNo = l.SortNo,
|
|
|
|
|
|
|
|
CalcSortNo = (decimal)b.ExecSortNo
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (b.SubList != null && b.SubList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
rltList.AddRange(b.SubList.Select(c => new ServiceProjectStatusDto
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ActPKId = c.ActId,
|
|
|
|
|
|
|
|
ActSortNo = c.ExecSortNo,
|
|
|
|
|
|
|
|
ShowName = c.ShowName,
|
|
|
|
|
|
|
|
IsYield = c.IsYield == 1 ? true : false,
|
|
|
|
|
|
|
|
ActDate = c.ActDate,
|
|
|
|
|
|
|
|
ActVal = c.ActVal,
|
|
|
|
|
|
|
|
StatusSKUCode = c.StatusSKUCode,
|
|
|
|
|
|
|
|
ActRemark = c.ActRemark,
|
|
|
|
|
|
|
|
WFSortNo = l.SortNo,
|
|
|
|
|
|
|
|
CalcSortNo = (decimal)b.ExecSortNo + (c.ExecSortNo * 0.001m)
|
|
|
|
|
|
|
|
}).ToList());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (rltList != null && rltList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var maxSort = rltList.Max(t => t.CalcSortNo);
|
|
|
|
|
|
|
|
rltList.FirstOrDefault(t => t.CalcSortNo == maxSort).IsEnd = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
return rltList;
|
|
|
|
return rltList;
|
|
|
|
}).SelectMany(b=>b).ToList();
|
|
|
|
}).SelectMany(b => b).OrderBy(b => b.WFSortNo).Select(b => {
|
|
|
|
|
|
|
|
if(lastWFSortNo == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
b.GroupName = calcNum.ToString();
|
|
|
|
|
|
|
|
lastWFSortNo = b.WFSortNo;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(b.WFSortNo == lastWFSortNo)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
b.GroupName = calcNum.ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
++calcNum;
|
|
|
|
|
|
|
|
lastWFSortNo = b.WFSortNo;
|
|
|
|
|
|
|
|
b.GroupName = calcNum.ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
|
|
|
}).OrderBy(b => b.WFSortNo).ThenBy(b=>b.CalcSortNo).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.succ = true;
|
|
|
|
result.succ = true;
|
|
|
|