diff --git a/WcfControlMonitorLib/CCallService.cs b/WcfControlMonitorLib/CCallService.cs index 9dccf55..3ed1c33 100644 --- a/WcfControlMonitorLib/CCallService.cs +++ b/WcfControlMonitorLib/CCallService.cs @@ -1381,9 +1381,9 @@ namespace WcfControlMonitorLib //int FSTARTDEVICE = 0; int FENDDEVICE = 0; //int flaneway = 0; int fstack = 0; //int FControlTaskType = 0; - + #region 发送任务开始执行给LCS sql.Clear(); - sql.Append("select * from IO_CONTROL WHERE CONTROL_STATUS < 900 and CONTROL_Status<>0 and IsSendLCS=0 ");//查询还未发送给WMS但是任务状态已经是拆分完的状态的任务 数据库加一个IsSendLCS字段 + 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; if (dataIOtaskstart.Count > 0) { for (int i = 0; i < dataIOtaskstart.Count; i++) @@ -1398,11 +1398,14 @@ namespace WcfControlMonitorLib } else { CommonClassLib.CCarryConvert.WriteDarkCasket("CallService", "taskStatusReporstart", "开始调用wms服务失败:", $"返回报错{resp_data.data}:{resp_data.msg}"); + return; } } } + #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 CONTROL_TASK_TYPE=1");//查询还未发送给WMS但是任务状态已经是完成的状态的任务 + 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; if (dataIOtask2finish.Count > 0) { @@ -1418,11 +1421,14 @@ namespace WcfControlMonitorLib } else { CommonClassLib.CCarryConvert.WriteDarkCasket("CallService", "taskStatusReporstart", "开始调用wms服务失败:", $"返回报错{resp_data.data}:{resp_data.msg}"); + return; } } } + #endregion + #region 处理回退任务 sql.Clear(); - sql.Append("select * from IO_CONTROL WHERE CONTROL_STATUS = 999 OR CONTROL_STATUS = 900 OR CONTROL_STATUS = 970 and CONTROL_TASK_TYP991");//直接删除回退任务 + 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; if (dataIOBacktaskfinish.Count > 0) { @@ -1433,12 +1439,12 @@ namespace WcfControlMonitorLib dbo.ExceSQL(sql.ToString()); } } - + #endregion } catch (Exception ex) { _CCallServiceError = ex.StackTrace + ex.Message; - CommonClassLib.CCarryConvert.WriteDarkCasket("CallService", "DealCallService", "调用接口时异常:", "19999", "清除所有申请!"); + CommonClassLib.CCarryConvert.WriteDarkCasket("CallService", "DealCallService", "调用接口时异常:", "19999", ex.Message.ToString()); //dbo.ExecuteSql(string.Format("UPDATE IO_CONTROL_APPLY set APPLY_TASK_STATUS = 2 where APPLY_TASK_STATUS = 0")); } finally @@ -1447,7 +1453,9 @@ namespace WcfControlMonitorLib } } } - + /// + /// 扫码请求 + /// private static void BeginListenUpdatestatus() {//20091107 while (!exitThreadInRequestDeal) @@ -1458,7 +1466,7 @@ 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");//查询还未发送给WMS但是任务状态已经是拆分完的状态的任务 数据库加一个IsSendLCS字段 + 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; if (dataInRequest.Count > 0) { diff --git a/WcfControlMonitorLib/CDisassembleTask.cs b/WcfControlMonitorLib/CDisassembleTask.cs index 933dafc..ba02def 100644 --- a/WcfControlMonitorLib/CDisassembleTask.cs +++ b/WcfControlMonitorLib/CDisassembleTask.cs @@ -2200,7 +2200,7 @@ namespace WcfControlMonitorLib { #region ɸ߶ͻ - int mindex = ccf.GetMonitorIndex(ManFID, Mankind); + int mindex = ccf.GetMonitorIndex(ManFID, Mankind);//ID TriggerTaskNo = mindex; //20101124 sql.Remove(0, sql.Length);