Ejemplo n.º 1
0
        public bool GetWoSnListCount(string woId, string sntype, int Flag)
        {
            int    count     = 0;
            string table     = "SFCR.T_WO_SNLIST";
            string fieldlist = "WOID,SNTYPE,SNVAL,STATUS,SEQ,ESN";
            string filter    = null;

            if (Flag == 0)
            {
                filter = "WOID={0} and SNTYPE={1}  LIMIT 1";
            }
            if (Flag == 1)
            {
                filter = "WOID={0} and SNTYPE={1} AND STATUS=1";
            }
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("WOID", woId);
            mst.Add("SNTYPE", sntype);
            DataTable dt = TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count).Tables[0];

            if (dt.Rows.Count != 0)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Ejemplo n.º 2
0
        public string Get_Carton_No(string woId, string LineCode)
        {
            string Prefix   = woId + "C";
            string cartonno = string.Empty;

            int count = 0;

            string fieldlist = " MAX(PALLETNUMBER)";
            string filter    = "PALLETNUMBER LIKE {0}";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("PALLETNUMBER", Prefix + "%");
            DataTable dt = TransactionManager.GetData("SFCR.T_PALLET_INFO", fieldlist, filter, mst, null, null, out count).Tables[0];


            if (dt.Rows.Count > 0)
            {
                if (string.IsNullOrEmpty(dt.Rows[0][0].ToString()))
                {
                    cartonno = Prefix + "0001";
                }
                else
                {
                    int num = Convert.ToInt32(dt.Rows[0][0].ToString().Substring(Prefix.Length, 4));;
                    cartonno = Prefix + (num + 1).ToString().PadLeft(4, '0');
                }
            }
            else
            {
                cartonno = Prefix + "0001";
            }
            return(cartonno);
        }
Ejemplo n.º 3
0
        public System.Data.DataSet QueryMaterialInOutPut(string woId, string kpnumber, bool Total)
        {
            int    count = 0;
            string table = "sfcr.t_smt_kp_monnitor";
            string group = null;

            string fieldlist = string.Empty;

            if (Total)
            {
                fieldlist = "woId as 工单 ,kpnumber as 料号,sum(qty) as 数量";
                group     = "woId,kpnumber";
            }
            else
            {
                fieldlist = "masterid as SEQ,woid as 工单,machineid as 机器代码,kpnumber as 料号,stationno as 料站号码,vendercode as 厂商代码,datecode as 生产周期,lotid as 生产批次,qty as 数量,cdata as 标志位,scarcitytime as 缺料时间,scarcityuser as 刷缺料人员,supplytime as 补料时间,supplyuser as 补料人员,trsn";
            }
            string filter = "woId={0}";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("woId", woId);
            if (!string.IsNullOrEmpty(kpnumber))
            {
                filter += " and kpnumber={1} ";
                mst.Add("kpnumber", kpnumber);
            }
            filter += " and cdata>1";
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, group, out count));
        }
Ejemplo n.º 4
0
        public System.Data.DataSet GetPartnumberAData(string partnumber, string lineid, string pcbside)
        {
            int    x         = 0;
            int    count     = 0;
            string table     = "SFCR.T_SMT_KP_MASTER a,SFCR.T_SMT_KP_DETALT b";
            string fieldlist = "a.partnumber,a.lineId,a.pcbside,a.bomver,b.stationno,b.kpnumber,b.kpdesc,b.replacegroup,b.loction";
            string filter    = "a.masterId=b.masterId and a.partnumber={0}";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("partnumber", partnumber);
            if (!string.IsNullOrEmpty(lineid))
            {
                x       = x + 1;
                filter += " and a.lineId like {" + x.ToString() + "}";
                mst.Add("lineId", lineid + "%");
            }
            if (!string.IsNullOrEmpty(pcbside))
            {
                x       = x + 1;
                filter += " and a.pcbside={" + x.ToString() + "}";
                mst.Add("pcbside", pcbside);
            }

            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 5
0
        public System.Data.DataSet GetTargetPlan2(String liness, String getDate, String ctype)
        {
            //      MySqlCommand cmd = new MySqlCommand();
              //      if (!String.IsNullOrEmpty(liness))
              //      {
              //          cmd.CommandText = "SELECT woId,craftid,class,lineId,sum(passQty) passQty,sum(failQty) failQty FROM SFCR.T_STATION_RECOUNT" +
              //" where classDate = @getDate and lineId = @liness and class=@ctype group by woId,craftid,class,lineId";
              //          cmd.Parameters.Add("liness", MySqlDbType.VarChar).Value = liness;
              //      }
              //      else
              //      {
              //          cmd.CommandText = "SELECT woId,craftid,class,lineId,sum(passQty) passQty,sum(failQty) failQty FROM SFCR.T_STATION_RECOUNT" +
              //" where classDate = @getDate and class=@ctype group by woId,craftid,class,lineId";

              //      }
              //      cmd.Parameters.Add("getDate", MySqlDbType.VarChar).Value = getDate;
              //      cmd.Parameters.Add("ctype", MySqlDbType.VarChar).Value = ctype;
              //      return BLL.BllMsSqllib.Instance.ExecuteDataSet(cmd);

            int count = 0;
            string table = "SFCR.T_STATION_RECOUNT";
            string fieldlist = "woId,craftid,class,lineId,sum(passQty) passQty,sum(failQty) failQty";
            string filter = "classDate ={0} and class={1} ";
            IDictionary<string, object> mst = new Dictionary<string, object>();
            mst.Add("classDate", getDate);
            mst.Add("class", ctype);

            if (!String.IsNullOrEmpty(liness))
            {
                filter += " and lineId ={2} ";
                mst.Add("lineId", liness);
            }

            return TransactionManager.GetData(table, fieldlist, filter, mst, null, "woId,craftid,class,lineId", out count);
        }
Ejemplo n.º 6
0
        public bool CheckSCARCITYStation(string Masterid, string woId, string Machine, string Station)
        {
            int    count     = 0;
            string table     = "sfcr.t_smt_kp_monnitor";
            string fieldlist = "stationno";
            string filter    = "masterId={0} and woId={1} and machineId={2} and cdata<2";

            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("masterId", Masterid);
            mst.Add("woId", woId);
            mst.Add("machineId", Machine);
            DataSet ds = TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count);

            DataTable dt = ds.Tables[0];  /// BLL.BllMsSqllib.Instance.ExecuteDataSet(cmd).Tables[0];

            if ((dt == null) || (dt.Rows.Count == 0))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 7
0
        public string GetReworkNo(string UserId)
        {
            try
            {
                string reworkno  = "";
                int    count     = 0;
                string table     = "sfcr.t_rework_detail_info";
                string fieldlist = "max(reworkno)";
                string filter    = "reworkno like {0}";

                IDictionary <string, object> mst = new Dictionary <string, object>();
                mst.Add("reworkno", UserId + DateTime.Now.ToString("yyyyMMdd") + "%");
                DataSet ds = TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count);

                reworkno = UserId + DateTime.Now.ToString("yyyyMMdd") + "0001";

                string rework = ds.Tables[0].Rows[0][0].ToString();
                if (!string.IsNullOrEmpty(rework))
                {
                    reworkno = UserId + DateTime.Now.ToString("yyyyMMdd") + (Convert.ToInt32((rework.Substring(rework.Length - 4, 4))) + 1).ToString().PadLeft(4, '0');
                }

                return(reworkno.ToUpper());
            }
            catch (Exception ex)
            {
                return(ex.Message);
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 检查序列号是否在这个工单里是否存在(工单号可以为空=查询整张表的记录,序列号类型可以为空)
        /// </summary>
        /// <param name="serial"></param>
        /// <param name="sntype"></param>
        /// <param name="woid"></param>
        /// <returns></returns>
        public System.Data.DataSet ChkKeyParts(string serial, string sntype, string woid)
        {
            IDictionary <string, object> mst = new Dictionary <string, object>();
            int    x     = 0;
            int    count = 0;
            string table = "SFCR.T_WIP_KEYPART_ONLINE";

            if (DB_Flag == 1)
            {
                table = "SFCR.T_WIP_KEYPART";
            }
            string fieldlist = "esn,sntype".ToUpper();
            string filter    = "SNVAL={" + x.ToString() + "}";

            mst.Add("SNVAL", serial);
            if (!string.IsNullOrEmpty(woid))
            {
                x       = x + 1;
                filter += " AND WOID={" + x.ToString() + "}";
                mst.Add("WOID", woid);
            }
            if (!string.IsNullOrEmpty(sntype))
            {
                x       = x + 1;
                filter += " AND SNTYPE={" + x.ToString() + "}";
                mst.Add("SNTYPE", sntype);
            }
            else
            {
                filter += " and sntype not in ('ESN') ";
            }

            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 9
0
        public DataSet getPlan_Rate_Set_bypn(string workmonth, string workdate, string pn)
        {
            int    count     = 0;
            string table     = "sfcr.t_plan_rate_report a,sfcb.b_user_info b";
            string fieldlist = @"a.work_month,a.work_date,a.work_class,a.business_unit,a.productname,a.partnumber,a.productcolor,a.section_name,
                               a.craftname,a.cumulative_plan,a.cumulative_qty,a.target_qty,a.actual_qty,b.username,a.recdate";
            string filter    = "a.userid=b.userid ";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            if (!string.IsNullOrEmpty(workdate) && string.IsNullOrEmpty(pn))
            {
                filter += "and a.work_date={0}";
                mst.Add("work_date", workdate);
            }
            if (string.IsNullOrEmpty(workdate) && !string.IsNullOrEmpty(pn))
            {
                filter += "and a.partnumber={0}";
                mst.Add("partnumber", pn);
            }
            if (!string.IsNullOrEmpty(workdate) && !string.IsNullOrEmpty(pn))
            {
                filter += "and a.work_date={0} and a.partnumber={1}";
                mst.Add("work_date", workdate);
                mst.Add("partnumber", pn);
            }
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 10
0
        public DataSet getPlan_Rate_Set_bydate(string workmonth, string workdate)
        {
            int    count     = 0;
            string table     = "sfcr.t_plan_rate_report";
            string fieldlist = "work_month,work_date,work_class,business_unit,productname,partnumber,productcolor,section_name,craftname,cumulative_plan,cumulative_qty,target_qty,actual_qty,userid,recdate ";
            string filter    = "";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            if (!string.IsNullOrEmpty(workmonth) && string.IsNullOrEmpty(workdate))
            {
                filter = "work_month={0} ";
                mst.Add("work_month", workmonth);
            }
            if (string.IsNullOrEmpty(workmonth) && !string.IsNullOrEmpty(workdate))
            {
                filter = "work_date={0} ";
                mst.Add("work_date", workdate);
            }
            if (!string.IsNullOrEmpty(workmonth) && !string.IsNullOrEmpty(workdate))
            {
                filter = "work_month={0} and work_date={1} ";
                mst.Add("work_month", workmonth);
                mst.Add("work_date", workdate);
            }
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 11
0
        public DataSet Sel_Fqc_report(string UserID, string Wo_ID, DateTime Dt_Sta, DateTime dt_End)  //ok
        {
            int    count     = 0;
            string table     = "SFCR.T_FQCREPORT";
            string fieldlist = "QC_NO,QC_WO_ID,PRO_COUNT,QC_COUNT,ERROR_COUNT,USERID,IN_STATION_DATE,R_CHECKDATE,PALLETNUMBER,CHECK_NUMBER";
            string filter    = " WORK_DATE>={0} and WORK_DATE<={1} ";

            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("WORK_DATE1", Dt_Sta.ToString("yyyyMMdd"));
            mst.Add("WORK_DATE2", dt_End.ToString("yyyyMMdd"));
            int x = 1;

            if (!string.IsNullOrEmpty(UserID))
            {
                x++;
                filter += " AND USERID={" + x.ToString() + "} ";
                mst.Add("USERID", UserID);
            }
            if (!string.IsNullOrEmpty(Wo_ID))
            {
                x++;
                filter += " AND QC_WO_ID={" + x.ToString() + "} ";
                mst.Add("QC_WO_ID", Wo_ID);
            }

            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 12
0
        //public System.Data.DataSet GetTargetPlan(string Line, string Flag, string MyGroup, out string Err)
        //{
        //    //return BLL.BllMsSqllib.Instance.GetTargetPlan(Line,Flag,MyGroup,out Err);
        //    List<Entity.ProcedureKey> LsPdk = new List<Entity.ProcedureKey>();
        //    Entity.ProcedureKey Pdk = null;
        //    Pdk = new Entity.ProcedureKey();
        //    Pdk.Variable = "LINE";
        //    Pdk.Value = Line;
        //    LsPdk.Add(Pdk);
        //    Pdk = new Entity.ProcedureKey();
        //    Pdk.Variable = "FLAG";
        //    Pdk.Value = Flag;
        //    LsPdk.Add(Pdk);
        //    Pdk = new Entity.ProcedureKey();
        //    Pdk.Variable = "MYGROUP";
        //    Pdk.Value = MyGroup;
        //    LsPdk.Add(Pdk);
        //    return BLL.BllMsSqllib.Instance.PublicReurnDataSetOutString("PRO_GETTARGETPLAN", LsPdk, "RESGRID", out Err);
        //}
        public System.Data.DataSet GetTargetPlan1(String liness, String getDate, String ctype)
        {
            //      MySqlCommand cmd = new MySqlCommand();
              //      if (!String.IsNullOrEmpty(liness))
              //      {
              //          cmd.CommandText = "SELECT a.Line line,a.Locstation Throughout,a.woId,a.PartNumber Part_Number,b.productname Product_Name,a.TargetQty Target_Qty,'0' Plan_Out,'0' Actual,'0' Hit_Rate,'100%' Yield_Rate,a.StartTime,a.EndTime " +
              //"FROM SFCR.T_TARGET_PLAN a,B_PRODUCT b where WorkDate = @getDate and a.PartNumber = b.partnumber and a.Line=@liness and a.class=@ctype";
              //          cmd.Parameters.Add("liness", MySqlDbType.VarChar).Value = liness;
              //      }
              //      else
              //      {
              //          cmd.CommandText = "SELECT a.Line line,a.Locstation Throughout,a.woId,a.PartNumber Part_Number,b.productname Product_Name,a.TargetQty Target_Qty,'0' Plan_Out,'0' Actual,'0' Hit_Rate,'100%' Yield_Rate,a.StartTime,a.EndTime " +
              //"FROM SFCR.T_TARGET_PLAN a,B_PRODUCT b where WorkDate = @getDate and a.PartNumber = b.partnumber and a.class = @ctype";
              //      }
              //      cmd.Parameters.Add("getDate", MySqlDbType.VarChar).Value = getDate;
              //      cmd.Parameters.Add("ctype", MySqlDbType.VarChar).Value = ctype;
              //      return BLL.BllMsSqllib.Instance.ExecuteDataSet(cmd);
            int count = 0;
            string table = "SFCR.T_TARGET_PLAN a,B_PRODUCT b";
            string fieldlist = "a.Line line,a.Locstation Throughout,a.woId,a.PartNumber Part_Number,b.productname Product_Name,a.TargetQty Target_Qty,'0' Plan_Out,'0' Actual,'0' Hit_Rate,'100%' Yield_Rate,a.StartTime,a.EndTime";
            string filter = "WorkDate = {0} and a.PartNumber = b.partnumber and a.class = {1} ";
            IDictionary<string, object> mst = new Dictionary<string, object>();
            mst.Add("WorkDate", getDate);
            mst.Add("class", ctype);

            if (!String.IsNullOrEmpty(liness))
            {
                filter += " and a.Line={2} ";
                mst.Add("Line", liness);
            }

            return TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count);
        }
Ejemplo n.º 13
0
        ///// <summary>
        ///// 返回用户的部分信息
        ///// </summary>
        ///// <returns></returns>
        //public System.Data.DataSet GetJurUserInfo(string UserId, string UserName, string PWD)
        //{
        //    //MySqlCommand cmd = new MySqlCommand();
        //    //cmd.CommandText = "select  username,userId,deptname from SFCB.B_USER_INFO";
        //    //return  BLL.BllMsSqllib.Instance.ExecuteDataSet(cmd);

        //    string table = "SFCB.B_USER_INFO";
        //    string fieldlist = "username,userId,deptname";
        //    int count = 0;
        //    IAdminProvider dp = (IAdminProvider)DpFactory.Create(typeof(IAdminProvider), DpFactory.ADMIN);
        //    IDictionary<string, object> mst = new Dictionary<string, object>();
        //    if (!string.IsNullOrEmpty(UserId))
        //        mst.Add("USERID", UserId);
        //    if (!string.IsNullOrEmpty(UserName))
        //        mst.Add("USERNAME", UserName);
        //    if (!string.IsNullOrEmpty(PWD))
        //        mst.Add("PWD", PWD);

        //   return dp.GetData(table, fieldlist,mst, out count);

        //}

        ///// <summary>
        ///// 根据用户工号返回用户的信息
        ///// </summary>
        ///// <returns></returns>
        //public System.Data.DataSet GetJurUserInfoById(string userId)
        //{
        //    MySqlCommand cmd = new MySqlCommand();
        //    cmd.CommandText = "select  username,userId,deptname from SFCB.B_USER_INFO where userId=@userId";
        //    cmd.Parameters.Add("userId", MySqlDbType.VarChar, 15).Value = userId;

        //    return  BLL.BllMsSqllib.Instance.ExecuteDataSet(cmd);
        //}

        ///// <summary>
        ///// 根据用户名返回用户的信息
        ///// </summary>
        ///// <returns></returns>
        //public System.Data.DataSet GetJurUserInfoByName(string username)
        //{
        //    MySqlCommand cmd = new MySqlCommand();
        //    cmd.CommandText = "select username,userId,deptname from SFCB.B_USER_INFO where username like @username";
        //    cmd.Parameters.Add("username", MySqlDbType.VarChar, 15).Value = username;

        //    return  BLL.BllMsSqllib.Instance.ExecuteDataSet(cmd);
        //}

        /// <summary>
        /// 返回所有功能
        /// </summary>
        /// <returns></returns>
        public System.Data.DataSet GetAllProgFunctionInfo()
        {
            int    count     = 0;
            string table     = "SFCB.B_FUNCTION_LIST f,SFCB.B_PROG_INFO p";
            string fieldlist = "0 as Jurisdiction, p.progId,p.progname ,f.funId,f.funname,f.fundesc";
            string filter    = "p.progId=f.progId";

            return(TransactionManager.GetData(table, fieldlist, filter, null, null, null, out count));
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 按号码类型查询资料
        /// </summary>
        /// <param name="SN_Type"></param>
        /// <param name="SN"></param>
        /// <returns></returns>
        public DataSet Sel_Product_Info(string SN_Type, string SN)
        {
            int    count  = 0;
            string Fileds = @"ESN,SN,MAC,IMEI,CARTONNUMBER,PALLETNUMBER,TRAYNO,PARTNUMBER,STOREHOUSEID,STATUS";
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add(SN_Type, SN);
            return(TransactionManager.GetData("SFCR.Z_WHS_TRACKING", Fileds, null, dic, null, null, out count));
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 获取所有部门信息
        /// </summary>
        /// <returns></returns>
        public System.Data.DataSet GetDeptInfo()
        {
            int    count     = 0;
            string table     = "SFCB.B_DEPT_INFO d,SFCB.B_FAC_INFO f";
            string fieldlist = "f.facname as 名称,d.deptname as 部门名称,d.userId as 负责人,d.deptdesc as 部门描述,d.facId as 工厂编号";
            string filter    = "f.facId=d.facId";

            return(TransactionManager.GetData(table, fieldlist, filter, null, null, null, out count));
        }
Ejemplo n.º 16
0
        public System.Data.DataSet Get_Erp_woinfo()
        {
            int    count     = 0;
            string table     = "mesdb.t_wo_info_erp".ToUpper();
            string fieldlist = "WOID,POID,QTY,PARTNUMBER,BOMVER,SAPWOTYPE,SAPROUTETYPE,SAPROUTEGROUP,SAPROUTEINDEX,WOSTARTTIME,WOFINISHTIME,WORLSFLAG,FACTORYID,LOC";
            string filter    = "woid not in (select woid from sfcr.t_wo_info) and WORLSFLAG='0'".ToUpper();

            return(TransactionManager.GetData(table, fieldlist, filter, null, null, null, out count));
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 获取所有线别信息
        /// </summary>
        /// <returns></returns>
        public System.Data.DataSet GetAllLineInfo()
        {
            int    count     = 0;
            string table     = "SFCB.B_LINE_INFO l,SFCB.B_WS_INFO w";
            string fieldlist = "l.lineId as 线别,l.linedesc as 线体描述,l.userId as 负责人,w.wsname as 车间名称,l.startIpAddr as 开始IP地址,l.endIpAddr as 结束IP地址,l.wsId as 车间编号,l.plotId as 计划ID".ToUpper();
            string filter    = "w.wsId=l.wsId";

            return(TransactionManager.GetData(table, fieldlist, filter, null, null, null, out count));
        }
Ejemplo n.º 18
0
        public System.Data.DataSet GetKeyParts()
        {
            int    count     = 0;
            string table     = "SFCB.B_KEYPART a,SFCB.B_PART_KEYPARTS b";
            string fieldlist = "a.kpnumber,b.partnumber,a.kpname,a.kpdesc".ToUpper();
            string filter    = "a.kpnumber = b.kpnumber";

            return(TransactionManager.GetData(table, fieldlist, filter, null, null, null, out count));
        }
Ejemplo n.º 19
0
        /// <summary>
        /// 根据客户编号,模糊查询
        /// </summary>
        /// <param name="customername"></param>
        /// <returns></returns>
        public System.Data.DataSet GetCustomerByName(string customername)
        {
            int    count     = 0;
            string table     = "SFCB.B_CUSTOMER";
            string fieldlist = "*";
            string filter    = "customername like {0}";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("customername", '%' + customername + '%');
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 20
0
        /// <summary>
        /// 20151015替换方法 20151131后停用
        /// </summary>
        /// <param name="woId"></param>
        /// <returns></returns>
        public System.Data.DataSet GetWOSnRule(string woId)
        {
            int    count     = 0;
            string table     = "SFCR.T_WO_SN_RULE a,SFCR.T_WO_INFO b";
            string fieldlist = "a.woId,a.sntype,a.snprefix,a.snpostfix,a.snstart,a.snend,a.snleng,a.ver,a.reve,a.recdate,b.partnumber,b.qty,b.pver,a.usenum";
            string filter    = "a.woId=b.woId and  a.woId={0}";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("WOID", woId);
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 21
0
        private DataSet Get_T_WO_SN_RULE(string SN)
        {
            int    count     = 0;
            string table     = "SFCR.T_WO_SN_RULE";
            string fieldlist = "woId";
            string filter    = "{0} between snstart and snend";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("SN", SN);
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 22
0
        public System.Data.DataSet GetMaxTrsn()
        {
            int    count     = 0;
            string table     = "SFCR.T_PART_STOREHOUSE_HAD";
            string fieldlist = "max(trsn) as trsn";
            string filter    = "trsn like {0}";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("trsn", "999999%");
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 由流程Id获取开始和结束流程
        /// </summary>
        /// <param name="routgroupId"></param>
        /// <returns></returns>
        public System.Data.DataSet GetRouteStartAndEndByroutgroupId(string routgroupId)
        {
            int    count     = 0;
            string table     = "SFCB.B_ROUTE_INFO";
            string fieldlist = "distinct  routgroupId,craftId,routedesc";
            string filter    = "routgroupId = @routgroupId and routedesc in('IN','OUT')";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("routgroupId", routgroupId);
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 获取表中所有钢板的信息
        /// </summary>
        /// <returns></returns>
        public System.Data.DataSet Getgangwang()
        {
            int    count     = 0;
            string table     = "SFCR.T_PART_STOREHOUSE_HAD";
            string fieldlist = "trsn,vendercode,kpnumber,storehouseId,locId, case sstatus  when 0 then '仓库' when 1 then '线边仓' when 2 then '生产线' when 3 then '已使用' when 6 then '退回仓库'when 7 then '维修' when 8 then '外借' when 9 then '报废' end as sstatus,recdate,remark";
            string filter    = "trsn like {0}";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("trsn", "999999%");
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 由料号查询流程Id与BOM编号
        /// </summary>
        /// <param name="partnumber"></param>
        /// <returns></returns>
        public DataSet GetRouteManageByPartnumber(string partnumber)
        {
            int    count     = 0;
            string table     = "SFCB.B_ROUTE_MANAGE a,SFCB.B_ROUTE_INFO b";
            string fieldlist = "distinct b.routgroupId,b.craftname,b.routedesc,a.bomnumber";
            string filter    = "a.routgroupId=b.routgroupId and a.partnumber={0} and b.routedesc in('IN','OUT')";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("partnumber", partnumber);
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 26
0
        public DataSet Get_Smt_WO_Merge(string woId)
        {
            int    count     = 0;
            string table     = "SFCR.T_SMT_WO_MERGE";
            string fieldlist = "DISTINCT  merge_num";
            string filter    = "new_woid={0} OR old_woid={1}";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("NEW_WOID", woId);
            mst.Add("OLD_WOID", woId);
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 27
0
        public System.Data.DataSet GetPackParametersByWoid(string woid)
        {
            int    count     = 0;
            string table     = "sfcb.b_pack_parameters p,sfcr.t_wo_info w".ToUpper();
            string fieldlist = "p.PartNumber,VersionCode,TrayQty,CartonQty,PalletQty,p.RecDate".ToUpper();
            string filter    = "p.PartNumber=w.partnumber and w.woId={0}".ToUpper();

            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("WOID", woid);
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 28
0
        /// <summary>
        /// 获取当天最大QCNO
        /// </summary>
        /// <param name="Dt">当天时间</param>
        /// <returns></returns>
        public DataSet Sel_QCNO_Date(DateTime Dt, string Line)
        {
            int    count     = 0;
            string table     = "sfcr.t_fqc_info".ToUpper();
            string fieldlist = "QC_NO,WO_ID,TRAY_NO,PALLET_NO,CARTON_ID,ESN,IS_PASS,ERROR_CODE,USERID,IN_STATION_TIME,REMARK";
            string filter    = "WORK_DATE={0} and QC_No like {1}";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("WORK_DATE", Dt.ToString("yyyyMMdd"));
            mst.Add("QC_No", Line + "%");
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 29
0
        public System.Data.DataSet QueryKpMasterAudit(int Days)
        {
            int    count     = 0;
            string table     = "SFCR.T_SMT_KP_MASTER";
            string fieldlist = "masterId,lineId,userId,partnumber,modelname,bomver,pcbside,recdate,reserve1,Auditinguser,case reserve2 when '0' then '待审核' when '1' then '审核通过' else '审核失败' end as reserve2";
            // string filter = "recdate>DATE_SUB(NOW(),INTERVAL {0} DAY";
            string filter = "recdate>{0}";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("recdate", System.DateTime.Now.AddDays(-Days));
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }
Ejemplo n.º 30
0
        public System.Data.DataSet GetQueliaoStationList(string sSEQ, string sMO)
        {
            int    count     = 0;
            string table     = "sfcr.t_smt_kp_monnitor".ToUpper();
            string fieldlist = "MASTERID,WOID,MACHINEID,STATIONNO,CDATA,KPNUMBER,SCARCITYTIME,SCARCITYUSER,SUPPLYTIME,SUPPLYUSER,FLAG,QTY,VENDERCODE,DATECODE,LOTID,TRSN";
            string filter    = "masterid={0}  and woId={1} and (cdata='0' or cdata='1')";
            IDictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("masterid", sSEQ);
            mst.Add("woId", sMO);
            return(TransactionManager.GetData(table, fieldlist, filter, mst, null, null, out count));
        }