Пример #1
0
        /***************************  控件事件  **************************************/
        //
        //工单单号
        //
        private void txb_OrderID_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == System.Windows.Input.Key.Enter && txb_OrderID.IsFocused)
            {
                Maticsoft.BLL.WorkOrder   _M_WorkOrder = new Maticsoft.BLL.WorkOrder();
                Maticsoft.Model.WorkOrder _WorkOrder   = new Maticsoft.Model.WorkOrder();
                _WorkOrder = _M_WorkOrder.GetModel(txb_OrderID.Text.Trim());
                if (_WorkOrder != null)
                {
                    //控件赋值
                    txb_OrderCount.Text    = _WorkOrder.Count;
                    Info_PeoductName.Text  = _WorkOrder.ProductName;
                    Info_Model.Text        = _WorkOrder.Model;
                    Info_DeliveryDate.Text = _WorkOrder.DeliveryDate;

                    //赋值包装批号
                    Maticsoft.BLL.PackBatch _temPackBatch = new PackBatch();
                    cmb_BatchNo.DataContext       = _temPackBatch.GetList("OrderID='" + txb_OrderID.Text.Trim() + "'").Tables[0];
                    cmb_BatchNo.DisplayMemberPath = "BatchNo";
                }
                else
                {
                    My_MessageBox.My_MessageBox_Message("未找到工单信息!");
                }
            }
        }
Пример #2
0
        /// <summary>
        /// 导出方法设置
        /// </summary>
        /// <param name="_M_PackExfo"></param>
        /// <param name="_Report_Exfo"></param>
        /// <param name="_report_exfo"></param>
        /// <param name="_M_WorkOrder"></param>
        /// <param name="_WorkOrder"></param>
        private void ExportMethod_Set(Pack_Exfo _M_PackExfo, Report _Report_Exfo, Report_Exfo _report_exfo, Maticsoft.BLL.WorkOrder _M_WorkOrder, Maticsoft.Model.WorkOrder _WorkOrder)
        {
            //双并导出
            if (_WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.双并检测)
            {
                //获取每一个SN的已包装数据
                ArrayList temDatalist = new ArrayList();
                ArrayList temSnList   = new ArrayList();
                Maticsoft.BLL.SerialNumber _M_seriarlnumber = new SerialNumber();

                temSnList = _M_seriarlnumber.Get_SN_List(MCP_CS._M_PackBatch.GetModel(cmb_Report_BatchNo_3D.Text.Trim()), Maticsoft.Model.E_SerialNumber_Type.ClientSN, Maticsoft.Model.E_Barcode_State.Yet_Pack);
                foreach (string _sn in temSnList)
                {
                    temDatalist.Add(_M_PackExfo.Get_PackData(_sn));
                }

                //导出Exfo数据
                Report.ImportEventArgs ep = new Report.ImportEventArgs(temDatalist, _TemPlate, temSavePatch + "\\" + temBatchNo);
                _Report_Exfo.Export_TextReport += _report_exfo.Export_Twin;
                ep.OrderInfo      = _WorkOrder;
                ep.UpProgressBar += UpProgressBar;
                _Report_Exfo.StatExport(ep);
            }
            else if (_WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.四芯检测 ||
                     _WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.一码一签_跳线)
            {
                //获取每一个SN的已包装数据
                ArrayList temDatalist = new ArrayList();
                ArrayList temSnList   = new ArrayList();
                Maticsoft.BLL.SerialNumber _M_seriarlnumber = new SerialNumber();
                Maticsoft.Model.PackBatch  temPack          = MCP_CS._M_PackBatch.GetModel(cmb_Report_BatchNo_3D.Text.Trim());

                temSnList = _M_seriarlnumber.Get_SN_List(temPack, Maticsoft.Model.E_SerialNumber_Type.ClientSN, Maticsoft.Model.E_Barcode_State.Yet_Pack);
                foreach (string _sn in temSnList)
                {
                    temDatalist.Add(_M_PackExfo.Get_PackData(_sn));
                }

                //导出Exfo数据
                Report.ImportEventArgs ep = new Report.ImportEventArgs(temDatalist, _TemPlate, temSavePatch + "\\" + temBatchNo);
                _Report_Exfo.Export_TextReport += _report_exfo.Export_fourCore;
                ep.OrderInfo      = _WorkOrder;
                ep.UpProgressBar += UpProgressBar;
                _Report_Exfo.StatExport(ep);
            }
            else if (_WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.MPO检测)
            {
                Maticsoft.BLL.PackBatch _M_BatchNo = new PackBatch();
                //导出Exfo数据
                Maticsoft.Model.WorkOrder _temorder = _M_WorkOrder.GetModel(txb_Report_OrderID_3D.Text);

                Report.ImportEventArgs ep = new Report.ImportEventArgs(_M_PackExfo.Get_PackData(_temorder.OrderID, _temorder.InspectMethod), _TemPlate, temSavePatch + "\\" + temBatchNo);

                ep.BatchNo = _M_BatchNo.GetModel(cmb_Report_BatchNo_3D.Text.Trim());
                _Report_Exfo.Export_TextReport += _report_exfo.Export_Exfo_MPO;
                ep.OrderInfo      = _WorkOrder;
                ep.UpProgressBar += UpProgressBar;
                _Report_Exfo.StatExport(ep);
            }
            else if (_WorkOrder.InspectMethod == Maticsoft.Model.E_InspectMethod.八芯检测)
            {
                Maticsoft.BLL.PackBatch _M_BatchNo = new PackBatch();
                //导出Exfo数据
                Maticsoft.Model.WorkOrder _temorder = _M_WorkOrder.GetModel(txb_Report_OrderID_3D.Text);

                Report.ImportEventArgs ep = new Report.ImportEventArgs(_M_PackExfo.Get_PackData(_temorder.OrderID, _temorder.InspectMethod), _TemPlate, temSavePatch + "\\" + temBatchNo);

                ep.BatchNo = _M_BatchNo.GetModel(cmb_Report_BatchNo_3D.Text.Trim());
                _Report_Exfo.Export_TextReport += _report_exfo.Export_EightCore;
                ep.OrderInfo      = _WorkOrder;
                ep.UpProgressBar += UpProgressBar;
                _Report_Exfo.StatExport(ep);
            }
            else
            {
                //导出Exfo数据
                Maticsoft.Model.WorkOrder _temorder = _M_WorkOrder.GetModel(txb_Report_OrderID_3D.Text);
                Report.ImportEventArgs    ep        = new Report.ImportEventArgs(_M_PackExfo.Get_PackData(cmb_Report_BatchNo_3D.Text.Trim(), _temorder.InspectMethod), _TemPlate, temSavePatch + "\\" + temBatchNo);
                _Report_Exfo.Export_TextReport += _report_exfo.Export_Exfo_One;
                ep.OrderInfo      = _WorkOrder;
                ep.UpProgressBar += UpProgressBar;
                _Report_Exfo.StatExport(ep);
            }
        }
Пример #3
0
        /*********************************************************
         * 显示 第一二三站的领料信息
         */

        /// <summary>
        /// 获取工单信息
        /// </summary>
        /// <param name="_Order">工单</param>
        public ObservableCollection <Customer> GetOrderInfo(string[] _OrderList)
        {
            OrderList = _OrderList;
            customers.Clear();   //清空列表!
            Maticsoft.BLL.MoveStore_ProductControl _M_MoveStore = new Maticsoft.BLL.MoveStore_ProductControl();
            Maticsoft.BLL.WorkOrder _wo = new WorkOrder();
            //总批量
            customers.Add(new Customer()
            {
                Type = "总批量", Count = _wo.GetOrderListCount(OrderList).ToString()
            });
            customers.Add(new Customer()
            {
                Type = "-------------", Count = "-------------"
            });

            //第一站
            customers.Add(new Customer()
            {
                Type = "一站在制品", Count = ""
            });

            //FerInfo
            Maticsoft.BLL.Material_Inject _M_Material_Inject = new Maticsoft.BLL.Material_Inject();
            DataSet _FerReceive = _M_Material_Inject.GetInjectView(_OrderList);

            foreach (DataRow dr in _FerReceive.Tables[0].Rows)
            {
                double FerReceiveCount = 0, FerInjectCount = 0;
                double.TryParse(dr["已领数量"].ToString(), out FerReceiveCount); // 已领取数量
                double.TryParse(dr["投入"].ToString(), out FerInjectCount);    //已投入数量
                customers.Add(new Customer()
                {
                    Type = dr["别名"].ToString() + "领取数量", Count = FerReceiveCount.ToString()
                });
                customers.Add(new Customer()
                {
                    Type = dr["别名"].ToString() + "投入数量", Count = FerInjectCount.ToString()
                });
                customers.Add(new Customer()
                {
                    Type = "剩余", Count = (FerReceiveCount - FerInjectCount).ToString()
                });
            }

            // double Not_YanMuo = _M_MoveStore.GetViewStateCount(Order.OrderID, "State='待研磨'");  //已研磨
            // double Not_Test  = _M_MoveStore.GetViewStateCount(Order.OrderID, "State='待测试'"); //已研磨
            // double Yet_InStorage = _M_MoveStore.GetViewStateCount(Order.OrderID, "State='成品'"); //已研磨


            //第二站
            double Two_Send    = _M_MoveStore.GetWKCount_Send(OrderList, "第二站");
            double Two_Recieve = _M_MoveStore.GetWKCount_Receive(OrderList, "第二站");

            customers.Add(new Customer()
            {
                Type = "-------------", Count = "-------------"
            });
            customers.Add(new Customer()
            {
                Type = "二站在制品", Count = (Two_Recieve - Two_Send).ToString()
            });
            customers.Add(new Customer()
            {
                Type = "接收", Count = Two_Recieve.ToString()
            });
            customers.Add(new Customer()
            {
                Type = "发出", Count = Two_Send.ToString()
            });

            //第三站
            double Three_Send    = _M_MoveStore.GetWKCount_Send(OrderList, "第三站");
            double Three_Recieve = _M_MoveStore.GetWKCount_Receive(OrderList, "第三站");
            double Three_Storege = _M_MoveStore.GetWKCount_Receive(OrderList, "仓库");

            customers.Add(new Customer()
            {
                Type = "-------------", Count = "-------------"
            });
            customers.Add(new Customer()
            {
                Type = "三站在制品", Count = (Three_Recieve - Three_Send).ToString()
            });
            customers.Add(new Customer()
            {
                Type = "接收", Count = Three_Recieve.ToString()
            });
            customers.Add(new Customer()
            {
                Type = "发出", Count = (Three_Send - Three_Storege).ToString()
            });
            // customers.Add(new Customer() { Type = "入库", Count = Three_Storege.ToString() });

            //仓库
            customers.Add(new Customer()
            {
                Type = "-------------", Count = "-------------"
            });
            customers.Add(new Customer()
            {
                Type = "入库数量", Count = Three_Storege.ToString()
            });

            //获取工单料件流动明细
            GetOrderMaterialInfo = _M_MoveStore.GetOrderMaterialInfo(OrderList);
            return(customers);
        }