Ejemplo n.º 1
0
        /// <summary>
        /// 查询抽检点设置数据。
        /// 查询条件:
        /// 产品料号<see cref="PartName"/>(可选,如果为空,不作为查询条件);
        /// 工序名称<see cref="OperationName"/>(可选,如果为空,不作为查询条件)。
        /// </summary>
        /// <returns>
        /// 包含抽检点设置数据的数据集。
        /// [ROW_KEY(分组中最小的ROW_KEY),TOPRODUCT,PART_TYPE,OPERATION_NAME,POINT_STATUS,
        /// POINT_STATE_DESCRIPTION,EQUIPMENT_NAME(用逗号分隔开),EQUIPMENT_KEY(用逗号分隔开),
        /// ACTION_NAME,EDC_NAME,SP_NAME,GROUP_KEY(标识分组的键)]
        /// </returns>
        public DataSet SearchEdcPoint()
        {
            DataSet   dsReturn  = new DataSet();
            DataTable dataTable = null;
            Hashtable hashTable = new Hashtable();

            if (_partName != string.Empty)
            {
                hashTable.Add(EDC_POINT_FIELDS.FIELD_TOPRODUCT, _partName);
            }
            if (_operationName != string.Empty)
            {
                hashTable.Add(EDC_POINT_FIELDS.FIELD_OPERATION_NAME, _operationName);
            }
            if (hashTable.Count > 0)
            {
                dataTable = FanHai.Hemera.Share.Common.CommonUtils.ParseToDataTable(hashTable);
            }
            try
            {
                IServerObjFactory iServerObjFactory = CallRemotingService.GetRemoteObject();
                dsReturn  = iServerObjFactory.CreateIEDCPiont().SearchEdcPoint(dataTable);
                _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn);
            }
            catch (Exception ex)
            {
                _errorMsg = ex.Message;
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
            return(dsReturn);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 查找正在使用的相同类型的抽检点数据是否存在。
        /// </summary>
        /// <param name="groupKey">表示抽检点设置分组的键。</param>
        /// <returns>true:存在。false:不存在。</returns>
        public bool FindExistUsedEDCPoint(string pointRowKey)
        {
            bool bReturn = false;

            try
            {
                IServerObjFactory iServerObjFactory = CallRemotingService.GetRemoteObject();
                bReturn = iServerObjFactory.CreateIEDCPiont().FindExistUsedEDCPoint(pointRowKey);
            }
            catch (Exception ex)
            {
                _errorMsg = ex.Message;
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
            return(bReturn);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 获取包含抽检点设置数据的集合。
        /// </summary>
        /// <param name="factoryRoomKey">车间主键。</param>
        /// <param name="operationName">工序名称。</param>
        /// <param name="partType">成品类型。</param>
        /// <param name="equipmentKey">设备主键。</param>
        /// <returns>
        /// 包含抽检点设置数据的集合。
        /// 【ROW_KEY,TOPRODUCT,OPERATION_NAME,EQUIPMENT_KEY,ACTION_NAME,SP_KEY,EDC_KEY,EDC_NAME,STATUS,PART_TYPE,EQUIPMENT_NAME,SP_NAME,SP_DESCRIPTIONS】
        /// </returns>
        public DataSet GetEDCPoint(string factoryRoomKey, string operationName, string partType, string equipmentKey)
        {
            DataSet dsReturn = null;

            try
            {
                IServerObjFactory iServerObjFactory = CallRemotingService.GetRemoteObject();
                dsReturn  = iServerObjFactory.CreateIEDCPiont().GetEDCPoint(factoryRoomKey, operationName, partType, equipmentKey);
                _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn);
            }
            catch (Exception ex)
            {
                _errorMsg = ex.Message;
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
            return(dsReturn);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 捞取修改抽检点的his
        /// </summary>
        /// <param name="?"></param>
        /// <returns></returns>
        /// Q.003
        public DataSet GetEdcPointParamsTrans(ref PagingQueryConfig config)
        {
            DataSet dsReturn = new DataSet();

            try
            {
                IServerObjFactory obj = CallRemotingService.GetRemoteObject();
                dsReturn  = obj.CreateIEDCPiont().GetEdcPiontParamsTrans(_pointRowKey, ref config);
                _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn);
            }
            catch (Exception ex)
            {
                _errorMsg = ex.Message;
            }
            finally
            {
                CallRemotingService.GetRemoteObject();
            }
            return(dsReturn);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 创建抽检点设置数据。
        /// </summary>
        /// <param name="dataSet">
        /// 包含抽检点设置数据的数据集对象。包含一个键值对的数据表。
        /// </param>
        /// <returns>-1 失败。非-1值成功。</returns>
        public int CreateEdcPoint(DataSet dataSet)
        {
            int     code     = -1;
            DataSet dsReturn = new DataSet();

            try
            {
                IServerObjFactory obj = CallRemotingService.GetRemoteObject();
                dsReturn  = obj.CreateIEDCPiont().CreateEdcPoint(dataSet);
                _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn, ref code);
            }
            catch (Exception ex)
            {
                _errorMsg = ex.Message;
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
            return(code);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 更新抽检点数据的状态。
        /// </summary>
        /// <param name="groupKey">表示抽检点设置分组的键。</param>
        /// <param name="pointStatus">新的抽检点设置状态。</param>
        /// <returns>包含执行结果的数据集。</returns>
        public bool UpdateEDCPointStatus(string groupKey, string pointStatus)
        {
            bool bReturn = false;

            try
            {
                IServerObjFactory iServerObjFactory = CallRemotingService.GetRemoteObject();
                DataSet           dsReturn          = iServerObjFactory.CreateIEDCPiont().UpdateEDCPointStatus(groupKey, pointStatus);
                _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn);
                if (_errorMsg == string.Empty)
                {
                    bReturn = true;
                }
            }
            catch (Exception ex)
            {
                _errorMsg = ex.Message;
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
            return(bReturn);
        }