|
|
@ -511,20 +511,26 @@ namespace SiaSun.LMS.Implement |
|
|
|
su[i] = dt_nohave.Rows.Count;//记库存数
|
|
|
|
sm[i] = dt_manage_num.Rows.Count;//记任务数
|
|
|
|
} |
|
|
|
#region 原入库分配巷道逻辑
|
|
|
|
//int iMinIndex = 0;
|
|
|
|
//for (int i = 1; i < dt_laneway.Rows.Count; ++i)
|
|
|
|
//{
|
|
|
|
// if (sm[i] < sm[iMinIndex])
|
|
|
|
// {
|
|
|
|
// iMinIndex = i;
|
|
|
|
// }
|
|
|
|
// else if (sm[i] == sm[iMinIndex] && su[i] > su[iMinIndex])
|
|
|
|
// {
|
|
|
|
// iMinIndex = i;
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
//DEVICE_CODE = Convert.ToInt32(dt_laneway.Rows[iMinIndex]["DEVICE_CODE"]);
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
int iMinIndex = 0; |
|
|
|
for (int i = 1; i < dt_laneway.Rows.Count; ++i) |
|
|
|
{ |
|
|
|
if (sm[i] < sm[iMinIndex]) |
|
|
|
{ |
|
|
|
iMinIndex = i; |
|
|
|
} |
|
|
|
else if (sm[i] == sm[iMinIndex] && su[i] > su[iMinIndex]) |
|
|
|
{ |
|
|
|
iMinIndex = i; |
|
|
|
} |
|
|
|
} |
|
|
|
DEVICE_CODE = Convert.ToInt32(dt_laneway.Rows[iMinIndex]["DEVICE_CODE"]); |
|
|
|
#region 新入库分配巷道逻辑
|
|
|
|
index_n = SiaSun.LMS.Common.StringUtil.CheckMin(sm); |
|
|
|
DEVICE_CODE = Convert.ToInt32(dt_laneway.Rows[index_n]["DEVICE_CODE"]); |
|
|
|
#endregion
|
|
|
|
//index = SiaSun.LMS.Common.StringUtil.CheckMin(su);
|
|
|
|
//index_n = SiaSun.LMS.Common.StringUtil.CheckMin(sm);
|
|
|
|
|
|
|
@ -539,12 +545,12 @@ namespace SiaSun.LMS.Implement |
|
|
|
|
|
|
|
////优先入库双伸巷道的空货位数
|
|
|
|
//DataTable dt_cellnear = this.GetList(string.Format(@"SELECT CELL_ID
|
|
|
|
// FROM WH_CELL
|
|
|
|
// WHERE DEVICE_CODE = {0}
|
|
|
|
// FROM WH_CELL
|
|
|
|
// WHERE DEVICE_CODE = {0}
|
|
|
|
// AND CELL_STATUS = 'Nohave'
|
|
|
|
// AND RUN_STATUS = 'Enable'
|
|
|
|
// AND RUN_STATUS = 'Enable'
|
|
|
|
// AND CELL_FORK_TYPE = 'Near'
|
|
|
|
// AND CELL_TYPE ='Cell'", DEVICE_CODE));
|
|
|
|
// AND CELL_TYPE ='Cell'", DEVICE_CODE));
|
|
|
|
//if (dt_cellnear.Rows.Count == 2)
|
|
|
|
//{
|
|
|
|
// bResult = false;
|
|
|
|