@ -1373,7 +1373,10 @@ namespace WcfControlMonitorLib
try
{
string bResult = "" ;
DataView dv = new DataView ( ) ; DataView dvl = new DataView ( ) ;
DataView dataIOtaskstart = new DataView ( ) ;
//DataView dvl = new DataView();
DataView dataIOtask2finish = new DataView ( ) ;
DataView dataIOBacktaskfinish = new DataView ( ) ;
string dtime = DateTime . Now . ToString ( "u" ) ;
dtime = dtime . Substring ( 0 , dtime . Length - 1 ) ;
//int AutoManageIdx = 0; int a = 0;
@ -1384,7 +1387,7 @@ namespace WcfControlMonitorLib
#region 发送任务开始执行给LCS
sql . Clear ( ) ;
sql . Append ( "select * from IO_CONTROL WHERE CONTROL_STATUS < 900 and CONTROL_Status<>0 and IsSendLCS=0 and CONTROL_TASK_TYPE<>99 " ) ; //查询还未发送给WMS但是任务状态已经是拆分完的状态的任务 数据库加一个IsSendLCS字段
DataView dataIOtaskstart = dbo . ExceSQL ( sql . ToString ( ) ) . Tables [ 0 ] . DefaultView ;
dataIOtaskstart = dbo . ExceSQL ( sql . ToString ( ) ) . Tables [ 0 ] . DefaultView ;
if ( dataIOtaskstart . Count > 0 ) {
for ( int i = 0 ; i < dataIOtaskstart . Count ; i + + )
{
@ -1405,8 +1408,9 @@ namespace WcfControlMonitorLib
#endregion
#region 发送任务完成给LCS
sql . Clear ( ) ;
sql . Append ( "select * from IO_CONTROL WHERE CONTROL_STATUS = 999 OR CONTROL_STATUS = 900 OR CONTROL_STATUS = 970 and IsSendLCS=1 and and CONTROL_TASK_TYPE<>99 " ) ; //查询还未发送给WMS但是任务状态已经是完成的状态的任务
DataView dataIOtask2finish = dbo . ExceSQL ( sql . ToString ( ) ) . Tables [ 0 ] . DefaultView ;
sql . Append ( "select * from IO_CONTROL WHERE CONTROL_STATUS = 999 OR CONTROL_STATUS = 900 OR CONTROL_STATUS = 970 and IsSendLCS=1 and CONTROL_TASK_TYPE<>99 " ) ; //查询还未发送给WMS但是任务状态已经是完成的状态的任务
dataIOtask2finish = dbo . ExceSQL ( sql . ToString ( ) ) . Tables [ 0 ] . DefaultView ;
if ( dataIOtask2finish . Count > 0 )
{
for ( int i = 0 ; i < dataIOtask2finish . Count ; i + + )
@ -1429,7 +1433,7 @@ namespace WcfControlMonitorLib
#region 处理回退任务
sql . Clear ( ) ;
sql . Append ( "select * from IO_CONTROL WHERE ( CONTROL_STATUS = 999 OR CONTROL_STATUS = 900 OR CONTROL_STATUS = 970 ) and CONTROL_TASK_TYPE=99" ) ; //直接删除回退任务 //ControlTaskType=99是回退任务
DataView dataIOBacktaskfinish = dbo . ExceSQL ( sql . ToString ( ) ) . Tables [ 0 ] . DefaultView ;
dataIOBacktaskfinish = dbo . ExceSQL ( sql . ToString ( ) ) . Tables [ 0 ] . DefaultView ;
if ( dataIOBacktaskfinish . Count > 0 )
{
for ( int i = 0 ; i < dataIOBacktaskfinish . Count ; i + + )
@ -1466,8 +1470,8 @@ namespace WcfControlMonitorLib
string dtime = DateTime . Now . ToString ( "u" ) ;
dtime = dtime . Substring ( 0 , dtime . Length - 1 ) ;
sql . Clear ( ) ;
sql . Append ( "select * from IO_CONTROL_APPLY WHERE CONTROL_APPLY_TYPE =1 and APPLY_TASK_STATUS=0" ) ; //查询扫码请求
DataView dataInRequest = dbo . ExceSQL ( sql . ToString ( ) ) . Tables [ 0 ] . DefaultView ;
DataView dataInRequest = dbo . ExceSQL ( sql . ToString ( ) ) . Tables [ 0 ] . DefaultView ;
if ( dataInRequest . Count > 0 )
{
for ( int i = 0 ; i < dataInRequest . Count ; i + + )
@ -1478,7 +1482,7 @@ namespace WcfControlMonitorLib
{ //成功
IO_CONTROL iO_CONTROL = new IO_CONTROL ( resp_data . data , DateTime . Now . ToString ( "yyyy-MM-dd HH:mm:ss" ) ) ;
iO_CONTROL . Insert_IOCONTROL ( ) ; //暂不考虑插入失败的情况 写入IO入库任务
CommonClassLib . CCarryConvert . WriteDarkCasket ( "CallService" , "inboundApply " , "开始调用wms服务成功败:" , $"返回信息{resp_data.data}:{resp_data.msg}" ) ;
CommonClassLib . CCarryConvert . WriteDarkCasket ( "CallService" , " " , "开始调用wms服务成功败:" , $"返回信息{resp_data.data}:{resp_data.msg}" ) ;
}
else
{