change - 入库任务执行异常

master
wenjy 3 weeks ago
parent 953396af5b
commit 44fa4d57cb

@ -561,11 +561,11 @@ namespace AUCMA.STORE.Business
{ {
LogHelper.Pilerlog($"入库任务:{baseTaskQueue.pilerTaskCode};内容:{JsonChange.ModeToJson(baseTaskQueue)}"); LogHelper.Pilerlog($"入库任务:{baseTaskQueue.pilerTaskCode};内容:{JsonChange.ModeToJson(baseTaskQueue)}");
_ = baseTaskQueueBusiness.DeleteTaskQueue(baseTaskQueue);
Mapper.Initialize(cret => cret.CreateMap<BaseTaskQueue, PlcDirectiveDTO>()); Mapper.Initialize(cret => cret.CreateMap<BaseTaskQueue, PlcDirectiveDTO>());
PlcDirectiveDTO taskDTO = Mapper.Map<PlcDirectiveDTO>(baseTaskQueue); PlcDirectiveDTO taskDTO = Mapper.Map<PlcDirectiveDTO>(baseTaskQueue);
LogHelper.Pilerlog($"入库任务:{baseTaskQueue.pilerTaskCode};映射为PlcDirectiveDTO");
#region 将入库任务转换成字节发送 #region 将入库任务转换成字节发送
byte[] buffer = new byte[42]; byte[] buffer = new byte[42];
taskDTO.inStorePlatformCode = 0; taskDTO.inStorePlatformCode = 0;
@ -621,6 +621,11 @@ namespace AUCMA.STORE.Business
taskCode = taskDTO.pilerTaskCode.ToString(); taskCode = taskDTO.pilerTaskCode.ToString();
taskQueue = baseTaskQueue; taskQueue = baseTaskQueue;
TaskInfoRefreshEvent?.Invoke(Convert.ToInt32(baseTaskQueue.pilerTaskCode), TaskType.InStore, locationArea, $"{taskQueue.pilerUnloadRows} - {taskQueue.pilerUnloadLine} - {taskQueue.pilerUnloadTier}"); TaskInfoRefreshEvent?.Invoke(Convert.ToInt32(baseTaskQueue.pilerTaskCode), TaskType.InStore, locationArea, $"{taskQueue.pilerUnloadRows} - {taskQueue.pilerUnloadLine} - {taskQueue.pilerUnloadTier}");
bool res = baseTaskQueueBusiness.DeleteTaskQueue(baseTaskQueue).Result;
LogHelper.Pilerlog($"入库任务:{baseTaskQueue.pilerTaskCode};移除");
UpdateLocationStatus("A", locationArea, $"{taskQueue.pilerUnloadRows}-{taskQueue.pilerUnloadLine}-{taskQueue.pilerUnloadTier}", LocationStatus.Occupy); UpdateLocationStatus("A", locationArea, $"{taskQueue.pilerUnloadRows}-{taskQueue.pilerUnloadLine}-{taskQueue.pilerUnloadTier}", LocationStatus.Occupy);
return buffer; return buffer;
} }
@ -633,6 +638,7 @@ namespace AUCMA.STORE.Business
catch (Exception ex) catch (Exception ex)
{ {
LogHelper.Pilerlog($"获取入库任务逻辑处理异常:{ex.Message}"); LogHelper.Pilerlog($"获取入库任务逻辑处理异常:{ex.Message}");
LogHelper.Error($"获取入库任务逻辑处理异常:{ex.Message}",ex);
return null; return null;
} }
} }

@ -1131,6 +1131,12 @@ namespace AUCMA.STORE
} }
public virtual void ReFresh_TaskInfo_dgv(TaskDTO inStoreTask,int state) public virtual void ReFresh_TaskInfo_dgv(TaskDTO inStoreTask,int state)
{
try
{
LogHelper.Pilerlog($"任务:{inStoreTask.taskCode};修改界面展示");
if(dataGridView1 != null)
{ {
if (dataGridView1.Rows.Count > 0) if (dataGridView1.Rows.Count > 0)
{ {
@ -1139,7 +1145,7 @@ namespace AUCMA.STORE
if (dataGridView1.Rows[i].Cells[0].FormattedValue.ToString() == inStoreTask.taskCode) if (dataGridView1.Rows[i].Cells[0].FormattedValue.ToString() == inStoreTask.taskCode)
{ {
if(inStoreTask.locationArea == LocationArea.Location_Left) if (inStoreTask.locationArea == LocationArea.Location_Left)
{ {
dataGridView1.Rows[i].Cells[3].Value = "1#库"; dataGridView1.Rows[i].Cells[3].Value = "1#库";
} }
@ -1157,6 +1163,16 @@ namespace AUCMA.STORE
} }
} }
} }
else
{
LogHelper.Pilerlog($"任务:{inStoreTask.taskCode};修改界面展示失败任务列表为null");
}
}catch(Exception ex)
{
LogHelper.Error($"ReFresh_TaskInfo_dgv异常:{ex.Message}", ex);
}
}
/// <summary> /// <summary>
/// 将界面任务状态改为异常;并将库位设置锁库 /// 将界面任务状态改为异常;并将库位设置锁库

Loading…
Cancel
Save