Exemple #1
0
        /// <summary>
        /// 前工序校验
        /// </summary>
        /// <param name="_session"></param>
        /// <param name="_transData"></param>
        private void ExecutePRC(MesSession _session, TransData _transData)
        {
            //1、参数校验---equipmentID---------------------------------
            string equipmentID = string.Empty;

            if (!EmployeeComm.CheckEquipmentID(_session, _transData, out equipmentID, EmployeeName))
            {
                return;
            }

            if (!GlobalData.IsDebug)
            {
                //3、执行前工序校验
                if (!CheckRouteOnlyCheck(_session, _transData, equipmentID))
                {
                    return;
                }

                //4、执行报工
                EmployeeComm.WorkingEfficiency(_session, _transData, equipmentID, EmployeeName, "103IN");
            }

            //5、API执行成功  ---------------------------------
            EmployeeComm.SendMsg(_session, _transData, CheckResult.OK);
        }
Exemple #2
0
        /// <summary>
        /// 条码打印请求
        /// </summary>
        /// <param name="_session"></param>
        /// <param name="_transData"></param>
        private void ExecutePTR(MesSession _session, TransData _transData)
        {
            EmployeeName = "条码打印请求";

            //1、参数校验---WorkOrder---------------------------------
            string workOrder = string.Empty;

            if (!EmployeeComm.CheckWorkOrder(_session, _transData, out workOrder, EmployeeName, DataFrom.SQLite))
            {
                return;
            }

            if (_transData.DeviceCode == "OP010")
            {
                EmployeeName = "产品" + EmployeeName;
                //2、获取条码 ---------------------------------
                if (!GetSN(_session, _transData, workOrder))
                {
                    return;
                }

                //4、开始打印打印 ---------------------------------
                if (!Print(_session, _transData))
                {
                    return;
                }

                //5、参数校验---equipmentID---------------------------------
                string equipmentID = string.Empty;
                if (!EmployeeComm.CheckEquipmentID(_session, _transData, out equipmentID, $"EmployeeName <103IN 报工获取设备ID>"))
                {
                    return;
                }

                if (!GlobalData.IsDebug)
                {
                    //5、首站选择在这里获取条码回来后进行执行报工
                    EmployeeComm.WorkingEfficiency(_session, _transData, equipmentID, EmployeeName, "103IN");
                }
            }
            else
            {
                EmployeeName = "成品" + EmployeeName;
                //3、获取条码 ---------------------------------
                if (!GetFinishSN(_session, _transData, workOrder))
                {
                    return;
                }

                //4、开始打印打印 ---------------------------------
                if (!Print(_session, _transData))
                {
                    return;
                }
            }

            //5、API执行成功  ---------------------------------
            EmployeeComm.SendMsg(_session, _transData, CheckResult.OK);
        }
Exemple #3
0
 private static void QueueServer_ProcessItem(TestItemFlex item)
 {
     try
     {
         if (string.IsNullOrEmpty(item.Type))
         {
             InsertNdqData(item);
         }
         else
         {
             EmployeeComm.WorkingEfficiency(item.MesSession, item.TransData, item.EquipmentID, item.EmployeeName, item.Type);
         }
     }
     catch (Exception e)
     {
         throw;
     }
 }