|
|
@ -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);
|
|
|
|
|
|
|
|
|
|
|
@ -358,6 +409,16 @@ namespace Myshipping.Application
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusCode.Equals(sku.StatusSKUCode,StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (st.StatusCode.Equals(sku.StatusSKUCode,StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bool currIsYield = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//完成时间为空,备注不为空只保存备注信息,不标记完成
|
|
|
|
|
|
|
|
if(!st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
currIsYield = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currIsYield)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.IS_YIELD = 1;
|
|
|
|
activitiesRunInfo.IS_YIELD = 1;
|
|
|
|
|
|
|
|
|
|
|
@ -369,6 +430,7 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.ACT_DATE = nowDate;
|
|
|
|
activitiesRunInfo.ACT_DATE = nowDate;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
activitiesRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesRunInfo.ACT_REMARK = st.Remark;
|
|
|
|
activitiesRunInfo.ACT_REMARK = st.Remark;
|
|
|
@ -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;
|
|
|
@ -409,6 +494,16 @@ namespace Myshipping.Application
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bool currIsYield = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//完成时间为空,备注不为空只保存备注信息,不标记完成
|
|
|
|
|
|
|
|
if (!st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
currIsYield = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currIsYield)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.IS_YIELD = 1;
|
|
|
|
activitiesSubRunInfo.IS_YIELD = 1;
|
|
|
|
|
|
|
|
|
|
|
@ -420,7 +515,7 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.ACT_DATE = nowDate;
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//批量写入活动表
|
|
|
|
//批量写入活动表
|
|
|
@ -499,6 +630,16 @@ namespace Myshipping.Application
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusCode.Equals(sku.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (st.StatusCode.Equals(sku.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bool currIsYield = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//完成时间为空,备注不为空只保存备注信息,不标记完成
|
|
|
|
|
|
|
|
if (!st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
currIsYield = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currIsYield)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.IS_YIELD = 1;
|
|
|
|
activitiesRunInfo.IS_YIELD = 1;
|
|
|
|
|
|
|
|
|
|
|
@ -510,6 +651,7 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.ACT_DATE = nowDate;
|
|
|
|
activitiesRunInfo.ACT_DATE = nowDate;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
activitiesRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesRunInfo.ACT_REMARK = st.Remark;
|
|
|
|
activitiesRunInfo.ACT_REMARK = st.Remark;
|
|
|
@ -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;
|
|
|
@ -550,6 +714,16 @@ namespace Myshipping.Application
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bool currIsYield = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//完成时间为空,备注不为空只保存备注信息,不标记完成
|
|
|
|
|
|
|
|
if (!st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
currIsYield = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currIsYield)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.IS_YIELD = 1;
|
|
|
|
activitiesSubRunInfo.IS_YIELD = 1;
|
|
|
|
|
|
|
|
|
|
|
@ -561,6 +735,7 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.ACT_DATE = nowDate;
|
|
|
|
activitiesSubRunInfo.ACT_DATE = nowDate;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
activitiesSubRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesSubRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesSubRunInfo.ACT_REMARK = st.Remark;
|
|
|
|
activitiesSubRunInfo.ACT_REMARK = st.Remark;
|
|
|
@ -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 =>
|
|
|
@ -612,6 +822,26 @@ namespace Myshipping.Application
|
|
|
|
.First(p=>p.PK_ID == currRunDetail.PK_ID);
|
|
|
|
.First(p=>p.PK_ID == currRunDetail.PK_ID);
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusCode.Equals(sku.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (st.StatusCode.Equals(sku.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bool currIsYield = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//完成时间为空,备注不为空只保存备注信息,不标记完成
|
|
|
|
|
|
|
|
if (!st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
currIsYield = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currIsYield)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.IS_YIELD = 1;
|
|
|
|
activitiesRunInfo.IS_YIELD = 1;
|
|
|
|
|
|
|
|
|
|
|
@ -623,7 +853,7 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesRunInfo.ACT_DATE = nowDate;
|
|
|
|
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)
|
|
|
@ -654,6 +911,26 @@ namespace Myshipping.Application
|
|
|
|
.First(p=> currRunDetailSub.STATUS_SKU_CODE.Equals(sub.StatusSKUCode));
|
|
|
|
.First(p=> currRunDetailSub.STATUS_SKU_CODE.Equals(sub.StatusSKUCode));
|
|
|
|
|
|
|
|
|
|
|
|
if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bool currIsYield = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//完成时间为空,备注不为空只保存备注信息,不标记完成
|
|
|
|
|
|
|
|
if (!st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
currIsYield = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currIsYield)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.IS_YIELD = 1;
|
|
|
|
activitiesSubRunInfo.IS_YIELD = 1;
|
|
|
|
|
|
|
|
|
|
|
@ -665,6 +942,7 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
activitiesSubRunInfo.ACT_DATE = nowDate;
|
|
|
|
activitiesSubRunInfo.ACT_DATE = nowDate;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
activitiesSubRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesSubRunInfo.ACT_VAL = st.StatusVal;
|
|
|
|
activitiesSubRunInfo.ACT_REMARK = st.Remark;
|
|
|
|
activitiesSubRunInfo.ACT_REMARK = st.Remark;
|
|
|
@ -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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -1467,6 +1828,9 @@ 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,14 +1864,17 @@ 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,
|
|
|
|
ActPKId = b.ActId,
|
|
|
|
ActSortNo = b.ExecSortNo,
|
|
|
|
ActSortNo = b.ExecSortNo,
|
|
|
@ -1514,13 +1883,56 @@ namespace Myshipping.Application
|
|
|
|
ActDate = b.ActDate,
|
|
|
|
ActDate = b.ActDate,
|
|
|
|
ActVal = b.ActVal,
|
|
|
|
ActVal = b.ActVal,
|
|
|
|
StatusSKUCode = b.StatusSKUCode,
|
|
|
|
StatusSKUCode = b.StatusSKUCode,
|
|
|
|
ActRemark = b.ActRemark
|
|
|
|
ActRemark = b.ActRemark,
|
|
|
|
}).ToList();
|
|
|
|
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;
|
|
|
|