Esempio n. 1
0
        protected void ctrlStationOffline_RmesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e)
        {
            if (e.MessageHead == "OFFLINE")
            {
                //string[]  txt = e.MessageBody.ToString().Split('^');
                //string sn = txt[0];
                //string quality_status = txt[1];
                string            sn      = e.MessageBody.ToString();
                ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn);     //获取sn信息
                //PlanSnEntity plansn1 = PlanSnFactory.GetBySn(sn);
                string plan_code = product.PLAN_CODE;
                //modify by thl 20161212 下线点对应的操作改到发动机第一次入库处执行
                if (dataConn.GetValue("select count(1) from data_complete where sn='" + sn + "' and plan_code='" + plan_code + "' and station_code='" + LoginInfo.StationInfo.STATION_CODE + "' ") == "1")
                {
                    dataConn.ExeSql("UPDATE DATA_PLAN SET OFFLINE_QTY=OFFLINE_QTY+1  WHERE plan_code='" + plan_code + "' ");
                }
                if (LoginInfo.ProductLineInfo.PLINE_CODE == "CL")
                {
                    ProductDataFactory.Station_OffLine(product.PLAN_CODE, sn, "Y");
                }
            }
            //else if (e.MessageHead == "SN")
            //{

            //    RMESEventArgs args = new RMESEventArgs();
            //    args.MessageHead = "OFFCTRL";
            //    args.MessageBody = "";
            //    SendDataChangeMessage(args);
            //}
        }
Esempio n. 2
0
        protected void ctrlProductScan_RmesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e)
        {
            string sn, quality_status = "A";

            if (e.MessageHead == null)
            {
                return;
            }
            if (e.MessageHead == "SN")
            {
                //上线后打印条码
                sn          = e.MessageBody.ToString();
                product     = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, sn);//获取sn信息
                ThePlancode = product.PLAN_CODE;
                TheSo       = product.PLAN_SO;
                PublicClass.PrintTmISDE(product.PLAN_CODE, ThisSmTm);
                txtGTH.Text     = "";
                arg.MessageHead = "CLEAR1";
                arg.MessageBody = "";
                SendDataChangeMessage(arg);
                timer1.Enabled = true;
            }
            if (e.MessageHead == "ONLINEONLINE")
            {
                DataTable dt = dataConn.GetTable("select plan_code from data_plan where plan_qty<=online_qty and plan_code='" + ThePlancode + "'");
                if (dt.Rows.Count > 0)
                {
                    ProductDataFactory.ISDE_CREATE_JK_SJJHB(PlineCode1);
                }
                timer1.Enabled = true;
            }
        }
Esempio n. 3
0
        private void 报废处理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //分装CL报废处理
            DialogResult drt = MessageBox.Show("执行该功能将对缸盖进行报废处理,要继续吗?", "提示", MessageBoxButtons.YesNo);

            if (drt == DialogResult.No)
            {
                return;
            }

            string ghtm = Microsoft.VisualBasic.Interaction.InputBox("请输入缸盖流水号", "输入");

            if (ghtm.Trim() == "")
            {
                return;
            }
            string outstr = "";

            ProductDataFactory.WGG_MODIFY_JHB(ghtm, LoginInfo.ProductLineInfo.PLINE_CODE, out outstr);
            if (outstr != "GOOD")
            {
                MessageBox.Show(outstr, "提示");
            }
            //刷新计划
            RMESEventArgs arg = new RMESEventArgs();

            arg.MessageHead = "REFRESHCLPLAN";
            arg.MessageBody = "";
            SendDataChangeMessage(arg);
        }
Esempio n. 4
0
        public PagedResult <IProductView> AllProducts()
        {
            var resultSet = new PagedResult <IProductView>();

            resultSet.Rows  = ProductDataFactory.AllProducts().ToList();
            resultSet.Total = resultSet.Rows.Count;

            return(resultSet);
        }
Esempio n. 5
0
        public PagedResult <IProductView> GetProducts(int Prdcat, int Anzahl, int Start)
        {
            PagedResult <IProductView> resultSet = new PagedResult <IProductView>();

            resultSet.Rows  = ProductDataFactory.GetProducts(Prdcat, Anzahl, Start);
            resultSet.Total = resultSet.Rows.Count;

            return(resultSet);
        }
Esempio n. 6
0
        protected void ctrlProcessComplete_RmesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e)
        {
            if (e.MessageHead == "SN")
            {
                //gridProcessList.Enabled = true;
                //sn = e.MessageBody as string;
                //PlanSnEntity ent_sn = PlanSnFactory.GetBySn(sn);
                //ordercode=ent_sn.ORDER_CODE;
                //if (ent_sn.PLAN_CODE != null) plancode = ent_sn.PLAN_CODE;
                //else plancode = PlanFactory.GetByOrder(ent_sn.ORDER_CODE).PLAN_CODE;

                InitProcessList();
                ShowProcessList();

                return;
            }
            if (e.MessageHead == "PLAN")
            {
                gridProcessList.Enabled = true;
                plancode = e.MessageBody as string;
                PlanEntity plan = PlanFactory.GetByKey(plancode);
                if (plan != null)
                {
                    ordercode = plan.ORDER_CODE;
                    InitProcessList();
                    ShowProcessList();
                }
            }
            else if (e.MessageHead == "PRCS")
            {
                //string[] msgbdy = (e.MessageBody as string).Split('^');
                //string process_code = msgbdy[0];
                //string complete_flag = msgbdy[1];
                //DealProcessComplete(process_code, complete_flag);
            }
            else if (e.MessageHead == "PAUSE")
            {
                this.gridProcessList.DataSource = null;
                return;
            }
            else if (e.MessageHead == "SCP" || e.MessageHead == "OFFLINE")
            {
                this.gridProcessList.DataSource = null;
                ProductDataFactory.ProcessControlComplete(company_code, pline_code, station_code, plancode, sn);
            }
            else if (e.MessageHead == "MESLL")
            {
                this.Visible = false;
                return;
            }
            if (e.MessageHead.ToString() == "WORK" || e.MessageHead.ToString() == "QUA")
            {
                this.Visible = true;
                return;
            }
        }
Esempio n. 7
0
        public PagedResult <IPrdcatView> AllProductCategorys()
        {
            var resultSet = new PagedResult <IPrdcatView>
            {
                Rows = ProductDataFactory.AllProductsCategorys().ToList(),
            };

            resultSet.Total = resultSet.Rows.Count;

            return(resultSet);
        }
Esempio n. 8
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                timer1.Enabled = false;
                string    sql = "select jhmc from isde_jk_sjjhb ";
                DataTable dt  = dataConn.GetTable(sql);
                if (dt.Rows.Count == 0)
                {
                    ProductDataFactory.ISDE_CREATE_JK_SJJHB(PlineCode1);
                }

                sql = " select ewghtm,jhdm,jhso,ggxhmc from isde_jk_sjsxb where czzt='0' and rownum=1 ";
                dt  = dataConn.GetTable(sql);
                if (dt.Rows.Count == 0)
                {
                    timer1.Enabled = true;
                    return;
                }
                TheEwm      = dt.Rows[0][0].ToString();
                ThePlancode = dt.Rows[0][1].ToString();
                TheSo       = dt.Rows[0][2].ToString();
                ThePmodel   = dt.Rows[0][3].ToString();
                if (ThePlancode == "")
                {
                    timer1.Enabled = true;
                    return;
                }
                //初始化sn框
                TheEwm      = TheEwm.Replace("\r\n", "").Trim();
                txtGTH.Text = TheEwm;
                string sn = TheEwm;
                TheSn           = sn;
                ThisSmTm        = TheSo + "^DCEC^" + sn;
                arg.MessageHead = "FILLSN";
                arg.MessageBody = sn + "^" + TheSo + "^" + ThePmodel + "^" + ThePlancode;
                SendDataChangeMessage(arg);
                arg.MessageHead = "FILLSN1";
                arg.MessageBody = ThisSmTm;
                SendDataChangeMessage(arg);
                arg.MessageHead = "PRINTISDE";
                arg.MessageBody = ThisSmTm + "|" + ThePlancode;
                SendDataChangeMessage(arg);

                //arg.MessageHead = "FILLSN2";
                //arg.MessageBody = TheSo + "^" + ThePmodel + "^" + ThePlancode;
                //SendDataChangeMessage(arg);
            }
            catch
            {
                timer1.Enabled = true;
            }
        }
Esempio n. 9
0
 public void GetByPlanStatonZJTS(string CompanyCode, string PlanCode, string PlineCode, string StationCode, string Sn, string fdjxl, string so, string stationcode1)
 {
     try
     {
         //大线生成计划对应的站点bom是根据当前登录的站点StationCode,返修点是根据选择的站点,这两个变量统一,但生成snbomtemp时,返修点要根据返修站点当前登录站点生成
         //调用存储过程 获取替换后的站点BOM 插入data_sn_bom_temp和rstbomqd、rstbomts
         StationEntity ent_st       = StationFactory.GetBySTATIONCODE(StationCode);
         string        station_name = ent_st.STATION_NAME;
         ProductDataFactory.PL_QUERY_ZJTS(so, StationCode, PlineCode, fdjxl, PlanCode, Sn);
     }
     catch (Exception e1)
     {
         return;
     }
 }
Esempio n. 10
0
        public void ASPxGridView1_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
        {
            string    ThisSO = "", PlineCode = "", StationCode = "";
            string    Chsql2 = "SELECT PLAN_SO,PLINE_CODE FROM DATA_PLAN WHERE PLAN_CODE='" + ASPxTextPlanCode.Text.Trim() + "'";
            DataTable Chdt2  = dc.GetTable(Chsql2);

            if (Chdt2.Rows.Count <= 0)
            {
                ASPxGridView1.JSProperties.Add("cpCallbackName", "Fail");
                ASPxGridView1.JSProperties.Add("cpCallbackRet", "计划号不存在!");

                return;
            }
            else
            {
                ThisSO    = Chdt2.Rows[0][0].ToString();
                PlineCode = Chdt2.Rows[0][1].ToString();
            }
            string    Chsql3 = "SELECT STATION_CODE FROM CODE_STATION WHERE STATION_NAME='" + ASPxTextSation.Text.ToUpper().Trim() + "'";
            DataTable Chdt3  = dc.GetTable(Chsql3);

            if (Chdt3.Rows.Count <= 0)
            {
                ASPxGridView1.JSProperties.Add("cpCallbackName", "Fail");
                ASPxGridView1.JSProperties.Add("cpCallbackRet", "站点名称不存在!");
                return;
            }
            else
            {
                StationCode = Chdt3.Rows[0][0].ToString();
            }
            ProductDataFactory.PL_QUERY_BOMZJTS(ThisSO, StationCode, PlineCode, "", ASPxTextPlanCode.Text.Trim(), "");
            ProductDataFactory.PL_UPDATE_BOMZJTS(ThisSO, StationCode, ASPxTextPlanCode.Text.Trim(), PlineCode, "");

            string Delsql = "delete from RSTBOMQD_XC ";

            dc.ExeSql(Delsql);
            string Insql = "INSERT INTO RSTBOMQD_XC (SELECT '" + ASPxTextPlanCode.Text.Trim() + "',GWMC,COMP,UDESC,QTY,GXMC,ZDMC,ZDDM,GYSMC from RSTBOMQD)";

            dc.ExeSql(Insql);

            string    sql = "SELECT GWMC,GXMC,COMP,QTY,GYSMC FROM rstbomqd_xc where zddm='" + StationCode + "' and jhmc='" + ASPxTextPlanCode.Text.Trim() + "' order by gwmc,gxmc";
            DataTable dt  = dc.GetTable(sql);

            Session["inv9500sql"]    = sql;
            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
        }
Esempio n. 11
0
        public ctrl_quality(string type, string sn, string stationcode1)
        {
            InitializeComponent();
            CompanyCode = LoginInfo.CompanyInfo.COMPANY_CODE;
            PlineID     = LoginInfo.ProductLineInfo.RMES_ID;
            PlineCode   = LoginInfo.ProductLineInfo.PLINE_CODE;
            StationCode = LoginInfo.StationInfo.STATION_CODE;
            stationname = LoginInfo.StationInfo.STATION_NAME;
            GridQuality.AutoGenerateColumns = false;
            GridQuality.RowHeadersVisible   = false;
            GridQuality.DataSource          = null;
            Thetype = type;
            TheSn   = sn;
            product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, TheSn);//获取sn信息
            if (product == null)
            {
                return;
            }
            //执行存储过程 获取RSTBOMQATS
            ProductDataFactory.PL_QUERY_QAZJTS(product.PLAN_SO, StationCode, PlineCode, "", product.PLAN_CODE, sn);
            string sql = "select count(1) from data_sn_qa where company_code='" + CompanyCode + "' and plan_code='" + product.PLAN_CODE + "' and sn='" + TheSn + "' and station_code='" + StationCode + "' and pline_code='" + PlineCode + "'  ";

            if (dataConn.GetValue(sql) == "0")
            {
                //插入data_sn_qa
                sql = " insert into data_sn_qa(rmes_id,sn,company_code,plan_code,pline_code,location_code,station_code,question,standard_answer,station_name)  "
                      + " select seq_rmes_id.nextval,'" + TheSn + "','" + CompanyCode + "','" + product.PLAN_CODE + "','" + PlineCode + "',gwdm,'" + StationCode + "',question,answer,'" + stationname + "'  from RSTBOMQATS where zddm='" + StationCode + "'    ";
                dataConn.ExeSql(sql);
            }
            ThePlancode = product.PLAN_CODE;
            GridQuality.Focus();
            IsABC = false;
            ShowData(type, TheSn, stationcode1);//A显示前道站点质量信息  B 显示当前站点质量信息
            try
            {
                if (GridQuality.Rows.Count > 0 && IsABC)
                {
                    PlanSnFactory.InitStationControl(CompanyCode, PlineID, LoginInfo.StationInfo.RMES_ID, product.PLAN_CODE, product.SN, "Rmes.WinForm.Controls.ctrl_quality");
                    dataConn.ExeSql("update data_sn_controls_complete set complete_flag='A' where station_code='" + LoginInfo.StationInfo.RMES_ID + "' and control_name='Rmes.WinForm.Controls.ctrl_quality' and sn='" + product.SN + "' and plan_code='" + product.PLAN_CODE + "' ");
                }
            }
            catch
            { }
            //this.RMesDataChanged += new RMesEventHandler(ctrl_Tj_RMesDataChanged);
        }
Esempio n. 12
0
 public void GetByPlanStatonDcecLQ(string CompanyCode, string PlanCode, string PlineCode, string StationCode, string Sn, string fdjxl, string so, string stationcode1, ProductInfoEntity productnew)
 {
     try
     {
         //大线生成计划对应的站点bom是根据当前登录的站点StationCode,返修点是根据选择的站点,这两个变量统一,但生成snbomtemp时,返修点要根据返修站点当前登录站点生成
         //调用存储过程 获取替换后的站点BOM 插入data_sn_bom_temp和rstbomqd、rstbomts
         StationEntity ent_st       = StationFactory.GetBySTATIONCODE(StationCode);
         string        station_name = ent_st.STATION_NAME;
         ProductDataFactory.PL_QUERY_BOMZJTS(so, StationCode, PlineCode, fdjxl, PlanCode, Sn);
         ProductDataFactory.PL_UPDATE_BOMZJTS(so, StationCode, PlanCode, PlineCode, Sn);
         ProductDataFactory.PL_UPDATE_BOMLSHTS(Sn, StationCode);
         ProductDataFactory.PL_UPDATE_BOMSOTHTS(so, PlanCode, StationCode, Sn, LoginInfo.UserInfo.USER_CODE, stationcode1);
         ProductDataFactory.PL_UPDATE_BOMSOTHTS_BOMLQ(productnew.PLAN_SO, productnew.PLAN_CODE, StationCode, Sn, LoginInfo.UserInfo.USER_CODE, stationcode1, PlineCode);
     }
     catch (Exception e1)
     {
         return;
     }
 }
Esempio n. 13
0
        protected void ctrlStationOnline_RmesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e)
        {
            string plan_code, sn, order_code, sn_flag;

            if (e.MessageHead == null)
            {
                return;
            }
            if (e.MessageHead == "ONLINE")
            {
                //DialogResult dlg=MessageBox.Show("是否上线", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question) ;
                //if (dlg == DialogResult.No) return;

                sn = e.MessageBody.ToString();

                //获取当前第一条计划的未上线流水号,打印流水号
                //流水号做上线
                PlanSnEntity ent_sn = PlanSnFactory.GetBySn(sn);
                if (ent_sn == null)//如果没有sn,则msgbd为plancode
                {
                    plan_code = "";
                    sn        = "";
                    MessageBox.Show("流水号非法!", "提示");
                    //sn = PlanFactory.GetByKey(plan_code).PLAN_BATCH;
                }
                else
                {
                    //order_code = PlanSnFactory.GetBySn(sn).ORDER_CODE;
                    //plan_code = PlanFactory.GetByOrder(order_code).PLAN_CODE;
                    plan_code = ent_sn.PLAN_CODE;
                }

                ProductDataFactory.Station_OnLine(plan_code, sn, DateTime.Now.ToString("yyyy-MM-dd"), LoginInfo.StationInfo.STATION_CODE, LoginInfo.ShiftInfo.SHIFT_CODE, LoginInfo.TeamInfo.TEAM_CODE, LoginInfo.UserInfo.USER_CODE);

                RMESEventArgs arg = new RMESEventArgs();
                arg.MessageHead = "SN";
                arg.MessageBody = sn;
                SendDataChangeMessage(arg);
            }
        }
Esempio n. 14
0
        private bool DealSn(string pSn)
        {
            string        sn      = pSn;
            RMESEventArgs arg     = new RMESEventArgs();
            PlanSnEntity  plansn1 = PlanSnFactory.GetBySn(sn);

            if (plansn1 == null)
            {
                return(false);
            }
            arg.MessageHead = plansn1.SN_FLAG == "N" ? "ONLINE" : "SN";
            string plan_code = plansn1.PLAN_CODE;
            string quality_status = "A", complete_flag = "0";

            List <ProductCompleteEntity> prc = ProductCompleteFactory.GetByPlanSn(CompanyCode, PlineCode, plan_code, sn, StationCode);

            if (prc.Count > 0)
            {
                complete_flag = prc.First <ProductCompleteEntity>().COMPLETE_FLAG;
            }
            if (complete_flag == "1")
            {
                MessageBox.Show("此项装配任务已经完成下线");
                return(false);
            }
            List <ProductDataEntity> prd = ProductDataFactory.GetProductDataByPlanSn(CompanyCode, PlineCode, plan_code, sn);

            //if (prd.Count > 0) quality_status = prd.First<ProductDataEntity>().QUALITY_STATUS;
            if (quality_status == "B")
            {
                DialogResult dlg = MessageBox.Show("此项装配工件质量不合格,要继续装配吗", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dlg == DialogResult.No)
                {
                    return(false);
                }
            }
            return(true);
        }
Esempio n. 15
0
        void ctrl_Tj_RMesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e)
        {
            RMESEventArgs arg = new RMESEventArgs();

            arg.MessageHead = "";
            arg.MessageBody = "";
            if (e.MessageHead == null)
            {
                return;
            }
            if (e.MessageHead == "SN" || e.MessageHead == "RESN" || e.MessageHead == "RECHECK")
            {
                TheSn   = e.MessageBody.ToString();
                product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, TheSn);//获取sn信息
                if (product == null)
                {
                    return;
                }
                ThePlancode = product.PLAN_CODE;
                //初始化质量数据
                //string sql = "select count(1) from data_sn_qa where company_code='"+CompanyCode+"' and plan_code='"+product.PLAN_CODE+"' and sn='"+TheSn+"' and station_code='"+StationCode+"' and pline_code='"+PlineCode+"'  ";
                //if (dataConn.GetValue(sql) == "0")
                //{
                //    //插入data_sn_qa
                //    sql = " insert into data_sn_qa(rmes_id,sn,company_code,plan_code,pline_code,location_code,station_code,question,standard_answer,station_name) values "
                //        + " select seq_rmes_id.nextval,'"+TheSn+"','" + CompanyCode + "','" + product.PLAN_CODE + "','" + PlineCode + "',gwdm,'" + StationCode + "',question,answer,'"+stationname+"'  from RSTBOMQATS where zddm='" + StationCode + "'    ";
                //    dataConn.ExeSql(sql);
                //}
                string type = "B";
                Thetype = type;
                string sn = TheSn;
                product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, TheSn);//获取sn信息
                if (product == null)
                {
                    return;
                }
                //执行存储过程 获取RSTBOMQATS
                ProductDataFactory.PL_QUERY_QAZJTS(product.PLAN_SO, StationCode, PlineCode, "", product.PLAN_CODE, sn);
                string sql = "select count(1) from data_sn_qa where company_code='" + CompanyCode + "' and plan_code='" + product.PLAN_CODE + "' and sn='" + TheSn + "' and station_code='" + StationCode + "' and pline_code='" + PlineCode + "'  ";
                if (dataConn.GetValue(sql) == "0")
                {
                    //插入data_sn_qa
                    sql = " insert into data_sn_qa(rmes_id,sn,company_code,plan_code,pline_code,location_code,station_code,question,standard_answer,station_name)  "
                          + " select seq_rmes_id.nextval,'" + TheSn + "','" + CompanyCode + "','" + product.PLAN_CODE + "','" + PlineCode + "',gwdm,'" + StationCode + "',question,answer,'" + stationname + "'  from RSTBOMQATS where zddm='" + StationCode + "'    ";
                    dataConn.ExeSql(sql);
                }
                ThePlancode = product.PLAN_CODE;
                GridQuality.Focus();
                IsABC = false;
                ShowData(type, TheSn, StationCode);//A显示前道站点质量信息  B 显示当前站点质量信息
                try
                {
                    if (GridQuality.Rows.Count > 0 && IsABC)
                    {
                        PlanSnFactory.InitStationControl(CompanyCode, PlineID, LoginInfo.StationInfo.RMES_ID, product.PLAN_CODE, product.SN, "Rmes.WinForm.Controls.ctrl_quality");
                        dataConn.ExeSql("update data_sn_controls_complete set complete_flag='A' where station_code='" + LoginInfo.StationInfo.RMES_ID + "' and control_name='Rmes.WinForm.Controls.ctrl_quality' and sn='" + product.SN + "' and plan_code='" + product.PLAN_CODE + "' ");
                    }
                }
                catch
                { }

                //
            }
        }
Esempio n. 16
0
 public IPrdcatView GetPrdcatByPrimaryKey(int prdcatId)
 {
     return(ProductDataFactory.GetPrdcatByPrimaryKey(prdcatId));
 }
Esempio n. 17
0
 public void AddPrdcat(IPrdcatView productCat)
 {
     ProductDataFactory.AddPrdcat(productCat);
 }
Esempio n. 18
0
 public void AddProduct(IProductView product)
 {
     ProductDataFactory.AddProduct(product);
 }