fix-优化一楼叫空托到2楼小包入口bug

master
liuwf 1 year ago
parent f6183b7a08
commit 03a79ced11

@ -148,8 +148,10 @@ namespace Khd.Core.Wcs.Wcs
{ {
if (wcsTask.endPointId == 36)//目的地是小包入口 if (wcsTask.endPointId == 36)//目的地是小包入口
{ {
bool hasTask = dbContext.WcsTask.Where(t => t.endPointId == inEquip.objid).Any(); bool hasTask = dbContext.WcsTask.Where(t => t.endPointId == inEquip.objid && t.objid!=wcsTask.objid).Any();
if (agvPutValue != null && Convert.ToInt32(agvPutValue) == 1 && !hasTask && Convert.ToInt32(PalletInIsHas2F) == 0 && Convert.ToInt32(ConnectStatus2F) == 1)//小包入口要料
if (agvPutValue != null && Convert.ToInt32(agvPutValue) == 1 && !hasTask && Convert.ToInt32(PalletInIsHas2F) == 0 && Convert.ToInt32(ConnectStatus2F) == 1)//小包入口要料
{ {
dbContext.Remove(wcsTask); dbContext.Remove(wcsTask);
WcsTask newTask = CoreMapper.Map<WcsTask>(wcsTask); WcsTask newTask = CoreMapper.Map<WcsTask>(wcsTask);
@ -193,6 +195,7 @@ namespace Khd.Core.Wcs.Wcs
newTask.endPointNo = endEquip.equipNo; newTask.endPointNo = endEquip.equipNo;
newTask.taskType = StaticTaskType.SecondLiftToTransit;//到周转位 newTask.taskType = StaticTaskType.SecondLiftToTransit;//到周转位
newTask.useFlag = 1; newTask.useFlag = 1;
newTask.qty = 10;
dbContext.Add(newTask); dbContext.Add(newTask);
WcsTaskLog wcsTaskLog = CoreMapper.Map<WcsTaskLog>(newTask); WcsTaskLog wcsTaskLog = CoreMapper.Map<WcsTaskLog>(newTask);
dbContext.Add(wcsTaskLog); dbContext.Add(wcsTaskLog);

Loading…
Cancel
Save