@ -2156,6 +2156,120 @@ namespace WcfControlMonitorLib
}
}
}
}
#endregion
#endregion
#region 双伸位的堆垛机在执行起点是里位(1,4排)的任务时,判读是否有起点是外位(2,3排)的任务 同时判断 送货到货位时(终点为2,3)判断有没有(1,4)的任务,控制近远叉取送货先后
if ( devinfo . StackReach = = 2 & & DeviceKind = = 1 & & ( order = = 4 ) ) // 双伸堆垛机, 取货
{
int [ ] zxy = ccf . GetCoordinatesFromMonitorTask ( minMidx ) ;
string neighborzxy = string . Empty ;
string sqlstrzxy = string . Empty ; //
string sqlman = string . Empty ;
//bool insidecell = false;//当前任务对应的里位还是外位
bool check = false ;
if ( zxy ! = null )
{
int getZ = zxy [ 0 ] ; //取货的排坐标
int sendZ = zxy [ 3 ] ; //送货位置对应的排坐标
int newZ , newX , newY ;
int tempZ = getZ ;
// if (tempZ>4)
//{
tempZ = getZ % 4 ;
//}
if ( tempZ = = 1 | | tempZ = = 0 ) //里位取货时,要判读是否有外位的取货任务
{ //获取外位坐标
if ( tempZ = = 1 )
{
newZ = getZ + 1 ;
}
else
{
newZ = getZ - 1 ;
}
neighborzxy = string . Format ( "{0:D3}-{1:D3}-{2:D3}" , newZ , zxy [ 1 ] , zxy [ 2 ] ) ; //获得外位坐标
sqlstrzxy = string . Format ( "SELECT F_MonitorIndex FROM T_Monitor_Task WHERE (F_DeviceCommandIndex =4) and (F_NumParam1 = {0}) AND (F_NumParam2 = {1}) AND (F_NumParam3 = {2}) and (F_DeviceIndex={3})" , newZ , zxy [ 1 ] , zxy [ 2 ] , DeviceIdx ) ;
//sqlstrzxy
sqlman = string . Format ( "SELECT FID FROM T_Manage_Task WHERE (FSTATUS = 0) AND(FSTARTDEVICE = {0}) AND (FSTARTCELL = '{1}') " , StartDevice , neighborzxy ) ;
//sqlstrzxy
check = true ;
if ( check )
{
dvdv = dbo . ExceSQL ( sqlstrzxy ) . Tables [ 0 ] . DefaultView ;
if ( dvdv . Count > 0 ) //
{
AheadDetectUnallow . Append ( string . Format ( "存在相邻货位{0}的优先任务,该任务暂时不能执行! " , neighborzxy ) ) ;
UpdateAheadDetectUnallow ( AheadDetectUnallow , minMidx ) ;
return false ; //不能执行出库任务
}
dvdv = dbo . ExceSQL ( sqlman ) . Tables [ 0 ] . DefaultView ;
if ( dvdv . Count > 0 ) //
{
AheadDetectUnallow . Append ( string . Format ( "存在相邻货位{0}的优先任务,该任务暂时不能执行! " , neighborzxy ) ) ;
UpdateAheadDetectUnallow ( AheadDetectUnallow , minMidx ) ;
return false ; //不能执行出库任务
}
}
}
tempZ = sendZ ;
//if (tempZ>4)
//{
tempZ = sendZ % 4 ;
//}
if ( tempZ = = 2 | | tempZ = = 3 ) //外位送货时,要判读是否有里位的送货任务
{ //获取里位坐标
if ( tempZ = = 2 )
{
newZ = sendZ - 1 ;
}
else
{
newZ = sendZ + 1 ;
}
neighborzxy = string . Format ( "{0:D3}-{1:D3}-{2:D3}" , newZ , zxy [ 4 ] , zxy [ 5 ] ) ; //获得外位坐标
sqlstrzxy = string . Format ( "SELECT F_MonitorIndex FROM T_Monitor_Task WHERE ( F_DeviceCommandIndex =5) and (F_NumParam4 = {0}) AND (F_NumParam5 = {1}) AND (F_NumParam6 = {2}) and (F_DeviceIndex={3})" , newZ , zxy [ 4 ] , zxy [ 5 ] , DeviceIdx ) ;
sqlman = string . Format ( "SELECT FID FROM T_Manage_Task WHERE (FSTATUS = 0) AND(FENDDEVICE = {0}) AND (FENDCELL = '{1}') " , EndDevice , neighborzxy ) ;
check = true ;
if ( check )
{
dvdv = dbo . ExceSQL ( sqlstrzxy ) . Tables [ 0 ] . DefaultView ;
if ( dvdv . Count > 0 ) //
{
AheadDetectUnallow . Append ( string . Format ( "存在相邻货位{0}的优先任务,该任务暂时不能执行! " , neighborzxy ) ) ;
UpdateAheadDetectUnallow ( AheadDetectUnallow , minMidx ) ;
return false ; //不能执行出库任务
}
dvdv = dbo . ExceSQL ( sqlman ) . Tables [ 0 ] . DefaultView ;
if ( dvdv . Count > 0 ) //
{
AheadDetectUnallow . Append ( string . Format ( "存在相邻货位{0}的优先任务,该任务暂时不能执行! " , neighborzxy ) ) ;
UpdateAheadDetectUnallow ( AheadDetectUnallow , minMidx ) ;
return false ; //不能执行出库任务
}
}
}
}
}
#endregion
#region lzm20250225 注释其他项目
#region lzm20250225 注释其他项目
//20101011
//20101011
//#region 双叉堆垛机的取货任务在此判断是否关联双叉、验证双叉任务是否为双叉极限货位
//#region 双叉堆垛机的取货任务在此判断是否关联双叉、验证双叉任务是否为双叉极限货位