示例#1
0
        //搜索
        private void bt_search_Click(object sender, EventArgs e)
        {
            string searchstr = this.tb_search.Text.Trim();

            if (searchstr.Length < 1)
            {
                MessageBox.Show("托盘号码不能为空!");
                return;
            }
            Rack r = ControlInterfaceMethod.searchRack(searchstr);

            if (r == null)
            {
                MessageBox.Show("托盘号码不正确!");
                return;
            }
            RackBll rb = new RackBll();

            rb.InsertRack(r);
            //1 新立库 2 双身为 3 配餐  4老库 5 窄巷道
            if (r.Rack_type == 1 || r.Rack_type == 1)
            {
                remote.setCustomView("v_cgk");
            }
            else if (r.Rack_type == 3)
            {
                remote.setCustomView("v_pcc");
            }
            else if (r.Rack_type == 4 || r.Rack_type == 5)
            {
                remote.setCustomView("v_cgk2");
            }
        }
示例#2
0
        private void setDdjData(CGKddj lastddj, CGKddj thisddj, int[] xmlIndex, int DdjId)
        {
            int DDJXmlIndex_state        = xmlIndex[0];
            int DDJXmlIndex_tgt          = xmlIndex[1];
            int DDJXmlIndex_source       = xmlIndex[2];
            int DDJXmlIndex_forktgt      = xmlIndex[3];
            int DDJXmlIndex_platformtgt  = xmlIndex[4];
            int DDJXmlIndex_pallertstate = xmlIndex[5];

            //堆垛机去取托盘的时候高亮显示目标托盘
            Rack r = getRackIdByModel(lastddj, thisddj, DdjId);

            if (r != null)
            {
                RackBll rb = new RackBll();
                rb.InsertRack(r);
            }
            lastddj = setOutModelDdj(lastddj);
            thisddj = setOutModelDdj(thisddj);


            if (lastddj == null)
            {
                if (thisddj.CGKddj_current == thisddj.CGKddj_tgt)
                {
                    ComTCPLib.SetOutputAsREAL32(1, DDJXmlIndex_source, thisddj.CGKddj_tgt);
                }
                else
                {
                    ComTCPLib.SetOutputAsREAL32(1, DDJXmlIndex_source, thisddj.CGKddj_source);
                }
                ComTCPLib.SetOutputAsUINT(1, DDJXmlIndex_state, thisddj.CGKddj_state);
                ComTCPLib.SetOutputAsREAL32(1, DDJXmlIndex_tgt, thisddj.CGKddj_tgt);
                ComTCPLib.SetOutputAsREAL32(1, DDJXmlIndex_forktgt, thisddj.CGKddj_forktgt);
                ComTCPLib.SetOutputAsREAL32(1, DDJXmlIndex_platformtgt, thisddj.CGKddj_platformtgt);
                ComTCPLib.SetOutputAsUINT(1, DDJXmlIndex_pallertstate, thisddj.CGKddj_pallertstate);
            }
            else if (!thisddj.Equals(lastddj))
            {
                if (thisddj.CGKddj_current == thisddj.CGKddj_tgt)
                {
                    ComTCPLib.SetOutputAsREAL32(1, DDJXmlIndex_source, thisddj.CGKddj_tgt);
                }
                else
                {
                    if (thisddj.CGKddj_source != lastddj.CGKddj_source)
                    {
                        ComTCPLib.SetOutputAsREAL32(1, DDJXmlIndex_source, thisddj.CGKddj_source);
                    }
                }
                if (thisddj.CGKddj_state != lastddj.CGKddj_state)
                {
                    ComTCPLib.SetOutputAsUINT(1, DDJXmlIndex_state, thisddj.CGKddj_state);
                }
                if (thisddj.CGKddj_tgt != lastddj.CGKddj_tgt)
                {
                    ComTCPLib.SetOutputAsREAL32(1, DDJXmlIndex_tgt, thisddj.CGKddj_tgt);
                }
                if (thisddj.CGKddj_forktgt != lastddj.CGKddj_forktgt)
                {
                    ComTCPLib.SetOutputAsREAL32(1, DDJXmlIndex_forktgt, thisddj.CGKddj_forktgt);
                }
                if (thisddj.CGKddj_platformtgt != lastddj.CGKddj_platformtgt)
                {
                    ComTCPLib.SetOutputAsREAL32(1, DDJXmlIndex_platformtgt, thisddj.CGKddj_platformtgt);
                }
                if (thisddj.CGKddj_pallertstate != lastddj.CGKddj_pallertstate)
                {
                    ComTCPLib.SetOutputAsUINT(1, DDJXmlIndex_pallertstate, thisddj.CGKddj_pallertstate);
                }
            }
        }