예제 #1
0
        protected void ctrlInitOnline_RmesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e)
        {
            if (e.MessageHead == null)
            {
                return;
            }
            if (e.MessageHead == "ONLINE")
            {
                //上线完成 自动刷下一个 打印条码
                string       sn  = e.MessageBody.ToString();
                PlanSnEntity ent = PlanSnFactory.GetBySnPline(sn, PlineCode1);          //获取sn信息
                product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn); //获取sn信息

                if (product == null)
                {
                    return;
                }
                //if (check1.Checked)
                PublicClass.PrintTmFzSx(sn, product.PLAN_SO, product.CUSTOMER_NAME, "", product.PRODUCT_MODEL, 1);
                //timer1.Enabled = true;
                //timer1.Start();
                //timer1_Tick(timer1, new EventArgs());
            }
        }
예제 #2
0
        void ctrl_Fx_RMesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e)
        {
            try
            {
                RMESEventArgs arg = new RMESEventArgs();
                arg.MessageHead = "";
                arg.MessageBody = "";
                if (e.MessageHead == null)
                {
                    return;
                }
                if (e.MessageHead == "SN")
                {
                    TheSn   = e.MessageBody.ToString();
                    product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, TheSn);//获取sn信息
                    if (product == null)
                    {
                        return;
                    }
                    TheSo       = product.PLAN_SO;
                    ThePlancode = product.PLAN_CODE;
                }
                if (e.MessageHead == "CHECKFX")
                {
                    //检查返修站点提交的流水号信息 做如下处理: 获取流水号对应的信息;线下返修做返修上线;
                    TheSn = e.MessageBody.ToString();
                    PlanSnEntity ent = PlanSnFactory.GetBySnPline(TheSn, PlineCode);           //获取sn信息
                    product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, TheSn); //获取sn信息
                    if (product == null)
                    {
                        return;
                    }
                    TheSo       = product.PLAN_SO;
                    ThePlancode = product.PLAN_CODE;

                    //判断是否线下返修未上线
                    if (ent.SN_FLAG == "P" || ent.SN_FLAG == "N")         //未上线 初始为N 打印为P  上线未Y
                    {
                        if (LoginInfo.StationInfo.STATION_TYPE == "ST05") //当前站点是返修站点
                        {
                            arg.MessageHead = "ONLINE";
                            arg.MessageBody = TheSn;
                            SendDataChangeMessage(arg);
                        }
                        else
                        {
                            MessageBox.Show("此发动机流水号未上线");
                            return;
                        }
                    }
                    else
                    {
                        arg.MessageHead = "SN";
                        arg.MessageBody = TheSn;
                        SendDataChangeMessage(arg);
                    }

                    //显示BOM 显示装机提示
                    arg.MessageHead = "SHOWBOMFX1";
                    arg.MessageBody = TheSn;
                    SendDataChangeMessage(arg);
                    //显示检测数据
                    arg.MessageHead = "SHOWDETECTFX1";
                    arg.MessageBody = TheSn;
                    SendDataChangeMessage(arg);
                }
            }
            catch (Exception e1)
            {
                MessageBox.Show(e1.Message);
            }
        }