修改取消状态bug

master
jianghaiqing 7 months ago
parent 2fa9b3903d
commit 05f43e7dea

@ -1627,63 +1627,66 @@ namespace Myshipping.Application
_logger.LogInformation("批次={no} 取消状态前记录 出问题的地方 info={info} msg={msg}", batchNo,JSON.Serialize(info), JSON.Serialize(activitiesRunInfo)); _logger.LogInformation("批次={no} 取消状态前记录 出问题的地方 info={info} msg={msg}", batchNo,JSON.Serialize(info), JSON.Serialize(activitiesRunInfo));
var beforeObj = new if(activitiesRunInfo != null)
{ {
ACT_VAL = activitiesRunInfo.ACT_VAL, var beforeObj = new
ACT_REMARK = activitiesRunInfo.ACT_REMARK, {
ACT_DATE = activitiesRunInfo.ACT_DATE, ACT_VAL = activitiesRunInfo.ACT_VAL,
IS_YIELD = activitiesRunInfo.IS_YIELD ACT_REMARK = activitiesRunInfo.ACT_REMARK,
}; ACT_DATE = activitiesRunInfo.ACT_DATE,
IS_YIELD = activitiesRunInfo.IS_YIELD
};
_logger.LogInformation("批次={no} 取消状态前记录 msg={msg}", batchNo,JSON.Serialize(beforeObj)); _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;
activitiesRunInfo.IS_YIELD = 0; activitiesRunInfo.IS_YIELD = 0;
activitiesRunInfo.UpdatedTime = nowDate; activitiesRunInfo.UpdatedTime = nowDate;
activitiesRunInfo.UpdatedUserId = long.Parse(info.Main.OperUserId); activitiesRunInfo.UpdatedUserId = long.Parse(info.Main.OperUserId);
activitiesRunInfo.UpdatedUserName = info.Main.OperUserName; activitiesRunInfo.UpdatedUserName = info.Main.OperUserName;
await _serviceWorkFlowRunActivitiesInfoRepository.AsUpdateable(activitiesRunInfo) await _serviceWorkFlowRunActivitiesInfoRepository.AsUpdateable(activitiesRunInfo)
.UpdateColumns(it => new .UpdateColumns(it => new
{ {
it.ACT_DATE, it.ACT_DATE,
it.IS_YIELD, it.IS_YIELD,
it.ACT_REMARK, it.ACT_REMARK,
it.ACT_VAL, it.ACT_VAL,
it.UpdatedTime, it.UpdatedTime,
it.UpdatedUserId, it.UpdatedUserId,
it.UpdatedUserName it.UpdatedUserName
}).ExecuteCommandAsync(); }).ExecuteCommandAsync();
#region 写入运行日志 #region 写入运行日志
var runLog = activitiesRunInfo.Adapt<ServiceWorkFlowRunLogInfo>(); var runLog = activitiesRunInfo.Adapt<ServiceWorkFlowRunLogInfo>();
runLog.PK_ID = IDGen.NextID().ToString(); runLog.PK_ID = IDGen.NextID().ToString();
runLog.RUN_ID = activitiesRunInfo.RUN_ID; runLog.RUN_ID = activitiesRunInfo.RUN_ID;
runLog.RUN_DETAIL_ID = activitiesRunInfo.PK_ID; runLog.RUN_DETAIL_ID = activitiesRunInfo.PK_ID;
runLog.BATCH_NO = batchNo; runLog.BATCH_NO = batchNo;
runLog.OPER_TYPE = TrackingRunOperTypeEnum.CANCEL_STATUS.ToString(); runLog.OPER_TYPE = TrackingRunOperTypeEnum.CANCEL_STATUS.ToString();
runLog.EXEC_RESULT = "SUCC"; runLog.EXEC_RESULT = "SUCC";
runLog.EXEC_NOTE = "Update"; runLog.EXEC_NOTE = "Update";
runLog.MBL_NO = info.Main?.MBlNo.ToUpper(); runLog.MBL_NO = info.Main?.MBlNo.ToUpper();
runLog.VESSEL_VOYNO = info.Main?.VesselVoyno.ToUpper(); runLog.VESSEL_VOYNO = info.Main?.VesselVoyno.ToUpper();
runLog.ORDER_NO = info.Main?.OrderNo; runLog.ORDER_NO = info.Main?.OrderNo;
runLog.RELEASE_VERSION = detail.Main.RELEASE_VERSION; runLog.RELEASE_VERSION = detail.Main.RELEASE_VERSION;
runLog.BUSI_SYSTEM_CODE = info.Main.BusiSystemCode.ToUpper(); runLog.BUSI_SYSTEM_CODE = info.Main.BusiSystemCode.ToUpper();
runLog.BUSI_ID = info.Main.BusiId.ToUpper(); runLog.BUSI_ID = info.Main.BusiId.ToUpper();
runLog.SERVICE_WF_ID = detail.Main.SERVICE_WF_ID.ToUpper(); runLog.SERVICE_WF_ID = detail.Main.SERVICE_WF_ID.ToUpper();
runLog.SERVICE_PROJECT_CODE = detail.Main.SERVICE_PROJECT_CODE.ToUpper(); runLog.SERVICE_PROJECT_CODE = detail.Main.SERVICE_PROJECT_CODE.ToUpper();
runLog.SERVICE_PROJECT_NAME = detail.Main.SERVICE_PROJECT_NAME.ToUpper(); runLog.SERVICE_PROJECT_NAME = detail.Main.SERVICE_PROJECT_NAME.ToUpper();
runLog.ACT_VAL = beforeObj.ACT_VAL; runLog.ACT_VAL = beforeObj.ACT_VAL;
runLog.ACT_DATE = beforeObj.ACT_DATE; runLog.ACT_DATE = beforeObj.ACT_DATE;
runLog.ACT_REMARK = beforeObj.ACT_REMARK; runLog.ACT_REMARK = beforeObj.ACT_REMARK;
runLog.IS_YIELD = beforeObj.IS_YIELD; runLog.IS_YIELD = beforeObj.IS_YIELD;
runLog.SOURCE_TYPE = info.Main.SourceType.ToString(); runLog.SOURCE_TYPE = info.Main.SourceType.ToString();
await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog); await _serviceWorkFlowRunLogInfoRepository.InsertAsync(runLog);
#endregion #endregion
}
} }
}); });
}); });

Loading…
Cancel
Save