Example #1
0
        public static MOPNCheckResult MOPNCheck(string MO, string PN)
        {
            MOPNCheckResult ret          = new MOPNCheckResult();
            string          factoryID    = "LXXT";
            string          profitCenter = "SEE-D";
            string          outPartID    = "";

            if (MO == "")
            {
                ret.result = false;
                ret.msg    = "工单不能为空";
                return(ret);
            }

            if (PN == "")
            {
                ret.result = false;
                ret.msg    = "料号不能为空";
                return(ret);
            }

            MESDataServices a      = new MESDataServices();
            string          retMsg = a.CheckSfcMoPN(MO, PN, factoryID, profitCenter, ref outPartID);

            if (retMsg == "OK")
            {
                if (outPartID.Contains("#"))
                {
                    ret.result = false;
                    ret.msg    = "工单存在,料号不正确,正确的料号应为:" + outPartID.Split('#')[0];
                }
                else
                {
                    ret.result   = true;
                    ret.msg      = "工单料号匹配!";
                    ret.MONumber = int.Parse(outPartID);
                }
            }
            else
            {
                ret.result = false;
                ret.msg    = retMsg;
            }
            return(ret);
        }
Example #2
0
        public static SNData getITSN(string MO, string PN)
        {
            SNData          ret          = new SNData();
            string          stationID    = "HT001";
            string          userID       = "TestID";
            string          factoryID    = "LXXT";
            string          profitCenter = "SEE-D";
            string          strFSN       = "";
            MESDataServices a            = new MESDataServices();
            string          b            = a.GetSFCNewFSN(MO, "", stationID, true, true, userID, factoryID, profitCenter, ref strFSN);

            string[] aret = strFSN.Split('#');
            ret.FSN          = strFSN;
            ret.label        = aret[0];
            ret.showDate     = aret[1];
            ret.sn           = aret[2];
            ret.customerData = aret[3];
            ret.snDec        = aret[4];
            ret.MO           = MO;
            ret.PN           = PN;
            return(ret);
        }