コード例 #1
0
        public bool IsSpecialProcess(RepairProcessParam repairParam, ref string isSpecialProcess, ref string restr)
        {
            isSpecialProcess = false.ToString();

            ModuleProcessModel moduleProcese = bllModuleProcess.GetProcessByWorkStationID(repairParam.StartDevStation);

            if (moduleProcese == null)
            {
                restr = "开始工位中心号错误:" + repairParam.StartDevStation + ",线体服务查无此工作中心号!";
                return(false);
            }
            if (repairParam.ProcessNum.ToUpper().Contains(moduleProcese.LineName) == true)
            {
                restr            = "此加工流程不为特殊返修流程";
                isSpecialProcess = false.ToString();
                return(true);
            }

            else
            {
                restr            = "此加工流程为特殊返修流程";
                isSpecialProcess = true.ToString();
                return(true);
            }
        }
コード例 #2
0
        protected virtual bool IsMatchProcess(RepairProcessParam repairParam)
        {
            List <DBAccess.Model.RepairProcessModel> repairProcessList = bllRepairProcess.GetProesses(repairParam.StartDevStation, repairParam.ProcessNum);

            if (repairProcessList != null && repairProcessList.Count > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #3
0
        public bool GetRepairProcessParamByCode(string moduleCode, ref RepairProcessParam repairProcessParam, ref string restr)
        {
            try
            {
                repairProcessParam = new RepairProcessParam();
                if (SysCfgModel.IsRequireRequireFromMes == false)
                {
                    repairProcessParam.StartDevStation = SysCfgModel.StartWorkStationID;
                    repairProcessParam.ProcessNum      = SysCfgModel.ProcessID;
                    restr = "获取MES返修流程参数成功:开始工位编号:" + repairProcessParam.StartDevStation + ",流程参数:" + repairProcessParam.ProcessNum;
                    return(true);
                }
                string     M_WORKSTATION_SN = "";
                string     M_DEVICE_SN      = "";
                string     M_UNION_SN       = "";
                string     M_CONTAINER_SN   = "";
                string     M_LEVEL          = "";
                string     M_ITEMVALUE      = "";
                int        flag             = 16;
                RootObject rObj             = new RootObject();

                //List<DBAccess.Model.BatteryModuleModel> modelList = modBll.GetModelList(string.Format("palletID='{0}'  and palletBinded=1", rfid)); //modBll.GetModelByPalletID(this.rfidUID, this.nodeName);
                //if (modelList == null || modelList.Count == 0)
                //{
                //    restr = "获取返修加工参数失败,工装板上的模块数量为空:" + rfid;
                //    return false;
                //}
                //foreach (DBAccess.Model.BatteryModuleModel bat in modelList)
                //{
                string barcode = moduleCode;
                string strJson = "";

                rObj = WShelper.DevDataUpload(flag, M_DEVICE_SN, M_WORKSTATION_SN, barcode, M_UNION_SN, M_CONTAINER_SN, M_LEVEL, M_ITEMVALUE, ref strJson, "");

                restr = rObj.RES;

                List <ContentDetail> content = rObj.M_COMENT;;
                if (content != null && content.Count > 0)
                {
                    if (repairProcessParam.StartDevStation == "" || repairProcessParam.ProcessNum == "")
                    {
                        restr = "二维码:" + barcode + "请求起始工位及流程代号失败,返回起始工位号或者流程代码为空:" + restr;
                        return(false);
                    }
                    repairProcessParam.StartDevStation = content[0].M_WORKSTATION_SN;
                    repairProcessParam.ProcessNum      = content[0].M_ROUTE;

                    restr = "获取MES返修流程参数成功:开始工位编号:" + repairProcessParam.StartDevStation + ",流程参数:" + repairProcessParam.ProcessNum;
                }
                else
                {
                    restr = "二维码:" + barcode + "请求起始工位及流程代号失败,MES返回ContentDetail数据为空:" + restr;
                    return(false);
                }


                //}
                this.repairParam = repairProcessParam;

                return(true);
            }
            catch (Exception ex)
            {
                restr = ex.ToString();
                return(false);
            }
        }