Beispiel #1
0
        public int GetLogs()
        {
            IList <IDataParameter> paramList = new List <IDataParameter>();

            try
            {
                using (IRAPSQLConnection conn =
                           new IRAPSQLConnection(
                               SysParams.Instance.DBConnectionString))
                {
                    string strSQL =
                        "SELECT * FROM IRAP..stb_Log_WebServiceShuttling " +
                        "WHERE ErrCode!=0 AND Retried=0 ORDER BY LinkedLogID";
                    IList <TEntityCustomLog> lstDatas =
                        conn.CallTableFunc <TEntityCustomLog>(strSQL, paramList);

                    ArrangeLogs(lstDatas.ToList(), ref logs);
                }
            }
            catch (Exception error)
            {
                error.Data["ErrCode"] = 999999;
                error.Data["ErrText"] =
                    string.Format(
                        "获取 IRAP..stb_Log_WebServiceShuttling 表的记录时发生异常:{0}",
                        error.Message);
                throw error;
            }

            return(logs.Count);
        }
Beispiel #2
0
        private void GetLocations()
        {
            TWaitting.Instance.ShowWaitForm("正在获取库位列表");

            IList <IDataParameter> paramList = new List <IDataParameter>();

            try
            {
                using (IRAPSQLConnection conn =
                           new IRAPSQLConnection(
                               SysParams.Instance.DBConnectionString))
                {
                    string strSQL =
                        "SELECT * FROM IRAPMDM..stb058 " +
                        "WHERE PartitioningKey=600100106 " +
                        "ORDER BY LeafID";
                    IList <TTableMDM058> lstDatas =
                        conn.CallTableFunc <TTableMDM058>(strSQL, paramList);

                    locations = lstDatas.ToList();
                }
            }
            catch (Exception error)
            {
                locations.Clear();

                error.Data["ErrCode"] = 999999;
                error.Data["ErrText"] = error.Message;
                throw error;
            }
            finally
            {
                TWaitting.Instance.CloseWaitForm();
            }
        }
Beispiel #3
0
        private static List <Entities.TTableStockDetail> GetDataRecord(
            string strSQL,
            IList <IDataParameter> paramList)
        {
            try
            {
                using (IRAPSQLConnection conn =
                           new IRAPSQLConnection(SysParams.Instance.DBConnectionString))
                {
                    IList <Entities.TTableStockDetail> lstDatas =
                        conn.CallTableFunc <Entities.TTableStockDetail>(strSQL, paramList);

                    return(lstDatas.ToList());
                }
            }
            catch (Exception error)
            {
                error.Data["ErrCode"] = 999999;
                error.Data["ErrText"] =
                    string.Format(
                        "在获取四班库存记录时发生错误:[{0}]",
                        error.Message);
                throw error;
            }
        }
Beispiel #4
0
        public static List <TTableMaterialStore> GetMaterialStore(string skuID)
        {
            try
            {
                using (IRAPSQLConnection conn =
                           new IRAPSQLConnection(SysParams.Instance.DBConnectionString))
                {
                    IList <IDataParameter> paramList = new List <IDataParameter>();
                    paramList.Add(new IRAPProcParameter("@SKUID", DbType.String, skuID));

                    IList <TTableMaterialStore> lstDatas =
                        conn.CallTableFunc <TTableMaterialStore>(
                            "SELECT * FROM IRAPRIMCS..utb_MaterialStore " +
                            "WHERE SKUID=@SKUID",
                            paramList);

                    return(lstDatas.ToList());
                }
            }
            catch (Exception error)
            {
                error.Data["ErrCode"] = 999999;
                error.Data["ErrText"] =
                    string.Format(
                        "获取 SKUID[{0}] 物料的记录时发生异常:{1}",
                        skuID,
                        error.Message);
                throw error;
            }
        }
Beispiel #5
0
        public IRAPJsonResult ufn_GetKanban_AndonMaterialCall(
            long sysLogID,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <AndonMaterialEvent> datas = new List <AndonMaterialEvent>();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 ufn_GetKanban_AndonMaterialCall," +
                        "参数:SysLogID={0}",
                        sysLogID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM ufn_GetKanban_AndonMaterialCall(" +
                                        "@SysLogID) ORDER BY Ordinal";

                        IList <AndonMaterialEvent> lstDatas = conn.CallTableFunc <AndonMaterialEvent>(strSQL, paramList);
                        datas   = lstDatas.ToList <AndonMaterialEvent>();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 ufn_GetKanban_AndonMaterialCall 函数发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #6
0
        public IRAPJsonResult sfn_AccessibleFilteredLeafSet(int communityID, int treeID, int scenarioIndex,
                                                            string dicingFilter, int nodeDepth, string keyword, long sysLogID, out int errCode, out string errText)
        {
            string strProcedureName = string.Format("{0}.{1}", className, MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <LeafSet> datas = new List <LeafSet>();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@communityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@treeID", DbType.Int32, treeID));
                paramList.Add(new IRAPProcParameter("@scenarioIndex", DbType.Int32, scenarioIndex));
                paramList.Add(new IRAPProcParameter("@dicingFilter", DbType.String, dicingFilter));
                paramList.Add(new IRAPProcParameter("@nodeDepth", DbType.Int32, nodeDepth));
                paramList.Add(new IRAPProcParameter("@keyword", DbType.String, keyword));
                paramList.Add(new IRAPProcParameter("@sysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAP..sfn_AccessibleFilteredLeafSet," +
                        "参数:communityID={0}|treeID={1}|scenarioIndex={2}|dicingFilter={3}|nodeDepth={4}|keyword={5}|sysLogID={6}",
                        communityID, treeID, scenarioIndex, dicingFilter, nodeDepth, keyword, sysLogID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAP..sfn_AccessibleFilteredLeafSet(" +
                                        "@communityID, @treeID, @scenarioIndex, @dicingFilter, @nodeDepth, @keyword, @sysLogID)";

                        IList <LeafSet> lstDatas = conn.CallTableFunc <LeafSet>(strSQL, paramList);
                        datas   = lstDatas.ToList <LeafSet>();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAP..sfn_AccessibleFilteredLeafSet 函数发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #7
0
        /// <summary>
        /// 获取机构中用户角色清单用于登录时角色选择
        /// </summary>
        /// <param name="userCode">用户代码</param>
        public List <TRoleInfo> sfn_UserRoles(
            string userCode,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                $"{className}.{MethodBase.GetCurrentMethod().Name}";

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <TRoleInfo> datas = new List <TRoleInfo>();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@UserCode", DbType.String, userCode));
                WriteLog.Instance.Write(
                    "调用函数 IRAP..sfn_UserRolesInAgency," +
                    $"参数:UserCode={userCode}",
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn =
                               new IRAPSQLConnection(
                                   TParams.Instance.DBConnectionStr))
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAP..sfn_UserRoles(" +
                                        "@UserCode)";
                        WriteLog.Instance.Write(strSQL, strProcedureName);

                        IList <TRoleInfo> lstDatas =
                            conn.CallTableFunc <TRoleInfo>(strSQL, paramList);
                        datas   = lstDatas.ToList();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAP..sfn_UserRolesInAgency 函数发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(datas);
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #8
0
        /// <summary>
        /// 获取社区级全局字串型参数清单
        /// 1、当传入社区标识为 0 时,返回平台全局共享字串型参数清单
        /// 2、当传入社区标识非 0 时,返回社区个性以及社区分享的平台字串型参数清单
        /// </summary>
        /// <param name="communityID">社区标识</param>
        /// <param name="languageID">语言标识:0-英文;30-简体中文;28=繁体中文</param>
        /// <param name="filterParamIDs">参数标识号</param>
        /// <returns></returns>
        public IRAPJsonResult sfn_IRAPStrParameters(int communityID, int languageID, string filterParamIDs, out int errCode, out string errText)
        {
            string strProcedureName = string.Format("{0}.{1}",
                                                    className,
                                                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <StrParamInfo> datas = new List <StrParamInfo>();

                try
                {
                    #region 创建数据库调用参数组,并赋值
                    IList <IDataParameter> paramList = new List <IDataParameter>();
                    paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                    paramList.Add(new IRAPProcParameter("@LanguageID", DbType.Int32, languageID));
                    WriteLog.Instance.Write(string.Format("执行函数 IRAP..sfn_IRAPStrParameters,参数:" +
                                                          "CommunityID={0}|LanguageID={1}|ParameterID={2}",
                                                          communityID, languageID, filterParamIDs),
                                            strProcedureName);
                    #endregion

                    #region 执行数据库函数或存储过程
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAP..sfn_IRAPStrParameters(@CommunityID, " +
                                        "@LanguageID)";
                        if (filterParamIDs != "")
                        {
                            strSQL += string.Format(" WHERE ParameterID IN ({0})", filterParamIDs);
                        }

                        IList <StrParamInfo> lstDatas = conn.CallTableFunc <StrParamInfo>(strSQL, paramList);
                        datas = lstDatas.ToList <StrParamInfo>();

                        errCode = 0;
                        errText = string.Format("调用成功,共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                    #endregion
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAP..sfn_IRAPStrParameters 时发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #9
0
        public IRAPJsonResult sfn_UserRoles(int communityID, string userCode, out int errCode, out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <RoleInfo> datas = new List <RoleInfo>();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@UserCode", DbType.String, userCode));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAP..sfn_UserRoles," +
                        "参数:CommunityID={0}|UserCode={1}",
                        communityID, userCode),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAP..sfn_UserRoles(" +
                                        "@CommunityID, @UserCode)";

                        IList <RoleInfo> lstDatas = conn.CallTableFunc <RoleInfo>(strSQL, paramList);
                        datas   = lstDatas.ToList <RoleInfo>();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAP..sfn_UserRoles 函数发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #10
0
        /// <summary>
        /// 获取工艺流程或工作流程清单
        /// ⒈ 绑定工位或产线的站点获取产品工艺路线清单;
        /// ⒉ 不与任何工位或产线绑定的站点获取工作流清单。
        /// </summary>
        /// <param name="communityID">社区标识</param>
        /// <param name="sysLogID">系统登录标识</param>
        /// <returns>List[ProcessInfo]</returns>
        public IRAPJsonResult ufn_GetKanban_Processes(
            int communityID,
            long sysLogID,
            out int errCode,
            out string errText)
        {
            string strProcedureName = string.Format("{0}.{1}",
                                                    className,
                                                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <ProcessInfo> datas = new List <ProcessInfo>();

                try
                {
                    #region 创建数据库调用参数组,并赋值
                    IList <IDataParameter> paramList = new List <IDataParameter>();
                    paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                    paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                    WriteLog.Instance.Write(string.Format("执行函数 IRAP..ufn_GetKanban_Processes,参数:" +
                                                          "CommunityID={0}|SysLogID={1}",
                                                          communityID, sysLogID),
                                            strProcedureName);
                    #endregion

                    #region 执行数据库函数或存储过程
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAP..ufn_GetKanban_Processes(@CommunityID, @SysLogID)";

                        IList <ProcessInfo> lstDatas = conn.CallTableFunc <ProcessInfo>(strSQL, paramList);
                        datas = lstDatas.ToList <ProcessInfo>();

                        errCode = 0;
                        errText = string.Format("调用成功,共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                    #endregion
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAP..ufn_GetKanban_Processes 时发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #11
0
        /// <summary>
        /// 获取炉前光谱、浇三角试样、炉水出炉的参数
        /// </summary>
        /// <param name="communityID">社区标识</param>
        /// <param name="opType">检验类型 --LQGP 炉前光谱,SSJSY 烧三角试验,LLCL 炉水出炉</param>
        /// <param name="t131LeafID">环别叶标识</param>
        /// <param name="t216LeafID">工序代码</param>
        /// <param name="batchNumber">熔炼容次号</param>
        /// <param name="sysLogID">语言标识</param>
        /// <returns></returns>
        public IRAPJsonResult ufn_GetList_SmeltMethodItemsByOpType(int communityID, string opType, int t131LeafID, int t216LeafID,
                                                                   string batchNumber, long sysLogID, out int errCode, out string errText)
        {
            string strProcedureName = string.Format("{0}.{1}", className, MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <SmeltMethodItemByOpType> datas = new List <SmeltMethodItemByOpType>();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@OpType", DbType.String, opType));
                paramList.Add(new IRAPProcParameter("@T131LeafID", DbType.Int32, t131LeafID));
                paramList.Add(new IRAPProcParameter("@T216LeafID", DbType.Int32, t216LeafID));
                paramList.Add(new IRAPProcParameter("@BatchNumber", DbType.String, batchNumber));
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数ufn_GetList_SmeltMethodItemsByOpType," +
                        "参数:CommunityID={0}|OpType={1}|T131LeafID={2}|T216LeafID={3}|BatchNumber={4}||SysLogID={5}",
                        communityID, opType, t131LeafID, t216LeafID, batchNumber, sysLogID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAPMES..ufn_GetList_SmeltMethodItemsByOpType(" +
                                        "@CommunityID,@OpType,@T131LeafID,@T216LeafID, @BatchNumber, @SysLogID)";
                        IList <SmeltMethodItemByOpType> lstDatas = conn.CallTableFunc <SmeltMethodItemByOpType>(strSQL, paramList);
                        datas   = lstDatas.ToList <SmeltMethodItemByOpType>();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用函数ufn_GetList_SmeltMethodItemsByOpType发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #12
0
        public IRAPJsonResult sfn_GetList_PortalLinks(int portalID, bool logonForMe, string myPlainPWD, long sysLogID, out int errCode, out string errText)
        {
            string strProcedureName = string.Format("{0}.{1}",
                                                    className,
                                                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <PortalLink> datas = new List <PortalLink>();

                try
                {
                    #region 创建数据库调用参数组,并赋值
                    IList <IDataParameter> paramList = new List <IDataParameter>();
                    paramList.Add(new IRAPProcParameter("@PortalID", DbType.Int32, portalID));
                    paramList.Add(new IRAPProcParameter("@LogonForMe", DbType.Boolean, logonForMe));
                    paramList.Add(new IRAPProcParameter("@MyPlainPassword", DbType.String, myPlainPWD));
                    paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                    WriteLog.Instance.Write(string.Format("执行函数 IRAP..sfn_GetList_PortalLinks,参数:" +
                                                          "PortalID={0}|LogonForMe={1}|MyPlainPassword={2}|SysLogID={4}",
                                                          portalID, logonForMe, myPlainPWD, sysLogID),
                                            strProcedureName);
                    #endregion

                    #region 执行数据库函数或存储过程
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAP..sfn_GetList_PortalLinks(@ProtalID, " +
                                        "@LogonForMe, @MyPlainPassword, @SysLogID)";

                        IList <PortalLink> lstDatas = conn.CallTableFunc <PortalLink>(strSQL, paramList);
                        datas = lstDatas.ToList <PortalLink>();

                        errCode = 0;
                        errText = string.Format("调用成功,共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                    #endregion
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAP..sfn_GetList_PortalLinks 时发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #13
0
        /// <summary>
        /// 获取导入导出关联的树及其叶选择提示信息
        /// </summary>
        /// <param name="communityID">社区标识</param>
        /// <param name="t19LeafID">导入导出叶标识</param>
        /// <param name="sysLogID">系统登录标识</param>
        /// <returns></returns>
        public IRAPJsonResult sfn_GetInfo_LinkedTreeOfImpExp(int communityID, int t19LeafID, long sysLogID, out int errCode,
                                                             out string errText)
        {
            string strProcedureName = string.Format("{0}.{1}", className, MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <LinkedTreeTip> datas = new List <LinkedTreeTip>();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@T19LeafID", DbType.Int32, t19LeafID));
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAP..sfn_GetInfo_LinkedTreeOfImpExp," +
                        "参数:CommunityID={0}|T19LeafID={1}|SysLogID={2}",
                        communityID, t19LeafID, sysLogID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAP..sfn_GetInfo_LinkedTreeOfImpExp(" +
                                        "@CommunityID, @T19LeafID, @SysLogID)";

                        IList <LinkedTreeTip> lstDatas = conn.CallTableFunc <LinkedTreeTip>(strSQL, paramList);
                        datas   = lstDatas.ToList <LinkedTreeTip>();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAP..sfn_GetInfo_LinkedTreeOfImpExp 函数发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #14
0
        public static List <TTableRSFactPWOMaterialTrack> GetMaterialTrack(
            string skuID,
            string moNumber,
            int moLineNo)
        {
            try
            {
                using (IRAPSQLConnection conn =
                           new IRAPSQLConnection(SysParams.Instance.DBConnectionString))
                {
                    IList <IDataParameter> paramList = new List <IDataParameter>();
                    paramList.Add(new IRAPProcParameter("@MONumber", DbType.String, moNumber));
                    paramList.Add(new IRAPProcParameter("@MOLineNo", DbType.Int32, moLineNo));
                    paramList.Add(new IRAPProcParameter("@SKUID", DbType.String, skuID));

                    IList <TTableRSFactPWOMaterialTrack> lstDatas =
                        conn.CallTableFunc <TTableRSFactPWOMaterialTrack>(
                            "SELECT A.* FROM IRAPMES..RSFact_PWOMaterialTrack A " +
                            "INNER JOIN IRAPMES..AuxFact_PWOIssuing B " +
                            "ON A.WFInstanceID=B.WFInstanceID AND B.MONumber=@MONumber AND " +
                            "B.MOLineNo=@MOLineNo AND A.SKUID=@SKUID",
                            paramList);

                    return(lstDatas.ToList());
                }
            }
            catch (Exception error)
            {
                error.Data["ErrCode"] = 999999;
                error.Data["ErrText"] =
                    string.Format(
                        "获取订单号[{0}]行号[{1}]的提料记录时发生异常:{2}",
                        moNumber,
                        moLineNo,
                        error.Message);
                throw error;
            }
        }
Beispiel #15
0
        public static TEntityCustomLog GetLastUnsuccessedLogWithLinkedLogID(
            long linkedLogID)
        {
            try
            {
                using (IRAPSQLConnection conn =
                           new IRAPSQLConnection(SysParams.Instance.DBConnectionString))
                {
                    IList <IDataParameter> paramList = new List <IDataParameter>();
                    paramList.Add(new IRAPProcParameter("@LinkedLogID", DbType.Int64, linkedLogID));

                    IList <TEntityCustomLog> lstDatas =
                        conn.CallTableFunc <TEntityCustomLog>(
                            "SELECT * FROM IRAP..stb_Log_WebServiceShuttling " +
                            "WHERE LinkedLogID=@LinkedLogID AND ErrCode!=0 AND Retried=0",
                            paramList);

                    if (lstDatas.Count > 0)
                    {
                        return(lstDatas[0]);
                    }
                    else
                    {
                        return(null);
                    }
                }
            }
            catch (Exception error)
            {
                error.Data["ErrCode"] = 999999;
                error.Data["ErrText"] =
                    string.Format(
                        "获取 WebService 日志时发生异常:{0}",
                        error.Message);
                throw error;
            }
        }
Beispiel #16
0
        /// <summary>
        /// 获取SPC控制图信息:⒈ 支持彩虹图;⒉ 支持Xbar-R图
        /// </summary>
        /// <param name="communityID">社区标识</param>
        /// <param name="pwoNo">生产工单号</param>
        /// <param name="t47LeafID">SPC控制图类型代码:373564-彩虹图;373565-Xbar-R图</param>
        /// <param name="t216LeafID">工序叶标识</param>
        /// <param name="t133LeafID">设备叶标识</param>
        /// <param name="t20LeafID">工艺参数叶标识</param>
        /// <param name="sysLogID">系统登录标识</param>
        public IRAPJsonResult ufn_GetInfo_SPCChart(
            int communityID,
            string pwoNo,
            int t47LeafID,
            int t216LeafID,
            int t133LeafID,
            int t20LeafID,
            long sysLogID,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                EntitySPCChart rlt = new EntitySPCChart();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("PWONo", DbType.String, pwoNo));
                paramList.Add(new IRAPProcParameter("T47LeafID", DbType.Int32, t47LeafID));
                paramList.Add(new IRAPProcParameter("T216LeafID", DbType.Int32, t216LeafID));
                paramList.Add(new IRAPProcParameter("@T133LeafID", DbType.Int32, t133LeafID));
                paramList.Add(new IRAPProcParameter("@T20LeafID", DbType.String, t20LeafID));
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAPMES.dbo.ufn_GetInfo_SPCChart,参数:" +
                        "CommunityID={0}|PWONo={1}|T47LeafID={2}|T216LeafID={3}" +
                        "T133LeafID={4}|T20LeafID={5}|SysLogID={6}",
                        communityID,
                        pwoNo,
                        t47LeafID,
                        t216LeafID,
                        t133LeafID,
                        t20LeafID,
                        sysLogID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string sqlCmd = "SELECT * FROM IRAPMES..ufn_GetInfo_SPCChart(" +
                                        "@CommunityID, @PWONo, @T47LeafID, @T216LeafID, @T133LeafID, " +
                                        "@T20LeafID, @SysLogID)";
                        IList <EntitySPCChart> objs =
                            conn.CallTableFunc <EntitySPCChart>(sqlCmd, paramList);
                        if (objs != null && objs.Count > 0)
                        {
                            rlt = objs[0].Clone();

                            errCode = 0;
                            errText = "调用成功!";
                            WriteLog.Instance.Write(errText, strProcedureName);
                        }
                        else
                        {
                            errCode = 99999;
                            errText = "未得到 SPC 控制图信息";
                        }
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAPMES.dbo.ufn_GetInfo_SPCChart 函数发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                }
                #endregion

                return(Json(rlt));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
                WriteLog.Instance.Write("");
            }
        }
Beispiel #17
0
        /// <summary>
        /// 获取未完成包装信息
        /// </summary>
        /// <param name="communityID">社区标识</param>
        /// <param name="productLeaf">产品叶标识</param>
        /// <param name="workUnitLeaf">工位叶标识</param>
        /// <param name="packagingSpecNo">包装规格序号</param>
        /// <param name="sysLogID">系统登录标识</param>
        /// <returns></returns>
        public IRAPJsonResult ufn_GetInfo_UncompletedPackage(
            int communityID,
            int productLeaf,
            int workUnitLeaf,
            int packagingSpecNo,
            long sysLogID,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                UncompletedPackage data = new UncompletedPackage();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@ProductLeaf", DbType.Int32, productLeaf));
                paramList.Add(new IRAPProcParameter("@WorkUnitLeaf", DbType.Int32, workUnitLeaf));
                paramList.Add(new IRAPProcParameter("@PackagingSpecNo", DbType.Int32, packagingSpecNo));
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAPMES..ufn_GetInfo_UncompletedPackage,参数:CommunityID={0}|" +
                        "ProductLeaf={1}|WorkUnitLeaf={2}|PackagingSpecNo={3}|" +
                        "SysLogID={4}",
                        communityID, productLeaf, workUnitLeaf, packagingSpecNo,
                        sysLogID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAPMES..ufn_GetInfo_UncompletedPackage(" +
                                        "@CommunityID, @ProductLeaf, @WorkUnitLeaf, " +
                                        "@PackagingSpecNo, @SysLogID)";
                        WriteLog.Instance.Write(strSQL, strProcedureName);

                        IList <UncompletedPackage> lstDatas =
                            conn.CallTableFunc <UncompletedPackage>(strSQL, paramList);
                        if (lstDatas.Count > 0)
                        {
                            data    = lstDatas[0].Clone();
                            errCode = 0;
                            errText = "调用成功!";
                        }
                        else
                        {
                            errCode = 99001;
                            errText = string.Format("在包装规格序号[{0}]在系统中不存在", packagingSpecNo);
                        }
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText =
                        string.Format(
                            "调用 IRAPMES..ufn_GetInfo_UncompletedPackage 函数发生异常:{0}",
                            error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(data));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #18
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="communityID">社区标识</param>
        /// <param name="systemID">系统标识</param>
        /// <param name="menuCacheID">系统登录标识或菜单缓冲区标识的相反数</param>
        /// <param name="progLanguageID">编程语言标识</param>
        /// <param name="availableOnly">是否仅呈现可用菜单</param>
        public IRAPJsonResult sfn_AvailableCSFunctions(
            int communityID,
            int systemID,
            int menuCacheID,
            int progLanguageID,
            bool availableOnly,
            out int errCode,
            out string errText)
        {
            string strProcedureName = string.Format("{0}.{1}",
                                                    className,
                                                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <SystemMenuInfoButtonStyle> datas = new List <SystemMenuInfoButtonStyle>();

                try
                {
                    #region 创建数据库调用参数组,并赋值
                    IList <IDataParameter> paramList = new List <IDataParameter>();
                    paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                    paramList.Add(new IRAPProcParameter("@SystemID", DbType.Int32, systemID));
                    paramList.Add(new IRAPProcParameter("@MenuCacheID", DbType.Int32, menuCacheID));
                    paramList.Add(new IRAPProcParameter("@ProgLanguageID", DbType.Int32, progLanguageID));
                    paramList.Add(new IRAPProcParameter("@AvailableOnly", DbType.Boolean, availableOnly));
                    WriteLog.Instance.Write(string.Format("执行函数 IRAP..sfn_AvailableCSFunctions,参数:" +
                                                          "CommunityID={0}|SystemID={1}|MenuCacheID={2}|ProgLanguageID={3}|AvailableOnly={4}",
                                                          communityID, systemID, menuCacheID, progLanguageID, availableOnly),
                                            strProcedureName);
                    #endregion

                    #region 执行数据库函数或存储过程
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAP..sfn_AvailableCSFunctions(@CommunityID, " +
                                        "@SystemID, @MenuCacheID, @ProgLanguageID, @AvailableOnly) " +
                                        "ORDER BY Ordinal";
                        WriteLog.Instance.Write(strSQL, strProcedureName);

                        IList <SystemMenuInfoButtonStyle> lstDatas = conn.CallTableFunc <SystemMenuInfoButtonStyle>(strSQL, paramList);
                        datas = lstDatas.ToList <SystemMenuInfoButtonStyle>();

                        errCode = 0;
                        errText = string.Format("调用成功,共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                    #endregion
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAP..sfn_AvailableCSFunctions 时发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #19
0
        /// <param name="communityID">社区标识</param>
        /// <param name="sysLogID">系统登录标识</param>
        public IRAPJsonResult sfn_GetInfo_Station(int communityID, long sysLogID, out int errCode, out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                StationInfo data = new StationInfo();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAP..sfn_GetInfo_Station," +
                        "参数:CommunityID={0}|SysLogID={1}",
                        communityID, sysLogID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * FROM IRAP..sfn_GetInfo_Station(" +
                                        "@CommunityID, @SysLogID)";

                        IList <StationInfo> lstDatas = conn.CallTableFunc <StationInfo>(strSQL, paramList);
                        if (lstDatas.Count > 0)
                        {
                            data    = lstDatas[0].Clone();
                            errCode = 0;
                            errText = string.Format("调用成功!共获得 {0} 条记录", lstDatas.Count);
                        }
                        else
                        {
                            errCode = 99001;
                            errText = string.Format("没有登录标识[{0}]的站点信息", sysLogID);
                        }
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAP..sfn_GetInfo_Station 函数发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(data));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #20
0
        /// <summary>
        /// 获取当前签到的员工
        /// </summary>
        /// <param name="communityID">社区标识</param>
        /// <returns>List[EmployeeAtWork]</returns>
        public IRAPJsonResult ufn_GetInfo_AtWork(
            int communityID,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <EmployeeAtWork> datas = new List <EmployeeAtWork>();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAPFVS..ufn_GetInfo_AtWork," +
                        "参数:CommunityID={0}",
                        communityID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL =
                            "SELECT * " +
                            "FROM IRAPFVS..ufn_GetInfo_AtWork(" +
                            "@CommunityID) " +
                            "ORDER BY QdTime";
                        WriteLog.Instance.Write(strSQL, strProcedureName);

                        IList <EmployeeAtWork> lstDatas =
                            conn.CallTableFunc <EmployeeAtWork>(strSQL, paramList);
                        datas   = lstDatas.ToList();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format(
                        "调用 IRAPFVS..ufn_GetInfo_AtWork 函数发生异常:{0}",
                        error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #21
0
        /// <summary>
        /// 获取测试数据采集行集事实(测试数据)
        /// </summary>
        /// <param name="communityID">社区标识</param>
        /// <param name="rsFactPK">行集事实分区键</param>
        /// <param name="factID">事实编号</param>
        /// <param name="failOnly">是否仅包括失败的测试项</param>
        /// <param name="sysLogID">系统登录标识</param>
        /// <returns>List[RSFactTestData]</returns>
        public IRAPJsonResult ufn_GetRSFact_TestData(
            int communityID,
            long rsFactPK,
            long factID,
            bool failOnly,
            long sysLogID,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <RSFactTestData> datas = new List <RSFactTestData>();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@RSFactPK", DbType.Int64, rsFactPK));
                paramList.Add(new IRAPProcParameter("@FactID", DbType.Int64, factID));
                paramList.Add(new IRAPProcParameter("@FailOnly", DbType.Boolean, failOnly));
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAPMES..ufn_GetRSFact_TestData," +
                        "参数:CommunityID={0}|RSFactPK={1}|FactID={2}|" +
                        "FailOnly={3}|SysLogID={4}",
                        communityID, rsFactPK, factID, failOnly,
                        sysLogID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAPMES..ufn_GetRSFact_TestData(" +
                                        "@CommunityID, @RSFactPK, @FactID, " +
                                        "@FailOnly, @SysLogID)" +
                                        "ORDER BY Ordinal";

                        IList <RSFactTestData> lstDatas =
                            conn.CallTableFunc <RSFactTestData>(strSQL, paramList);
                        datas   = lstDatas.ToList();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText =
                        string.Format(
                            "调用 IRAPMES..ufn_GetRSFact_TestData 函数发生异常:{0}",
                            error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #22
0
        /// <summary>
        /// 获取制造订单跟踪看板
        /// </summary>
        /// <param name="communityID">社区标识</param>
        /// <param name="t132ClickStream">产品族点击流</param>
        /// <param name="sysLogID">系统登录标识</param>
        public IRAPJsonResult ufn_Dashboard_MOTrack(
            int communityID,
            string t132ClickStream,
            long sysLogID,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <Dashboard_MOTrack> datas = new List <Dashboard_MOTrack>();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@T132ClickStream", DbType.String, t132ClickStream));
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAPFVS..ufn_Dashboard_MOTrack," +
                        "参数:CommunityID={0}|T132ClickStream={1}|SysLogID={2}",
                        communityID, t132ClickStream, sysLogID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAPFVS..ufn_Dashboard_MOTrack(" +
                                        "@CommunityID, @T132ClickStream, @SysLogID)" +
                                        "ORDER BY Ordinal";

                        IList <Dashboard_MOTrack> lstDatas =
                            conn.CallTableFunc <Dashboard_MOTrack>(strSQL, paramList);
                        datas   = lstDatas.ToList <Dashboard_MOTrack>();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAPFVS..ufn_Dashboard_MOTrack 函数发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #23
0
        /// <summary>
        /// 获取可用应用系统清单
        /// </summary>
        /// <param name="communityID"></param>
        /// <param name="sysLogID"></param>
        /// <param name="progLanguageID">编程语言标识</param>
        /// <param name="isAccessible">只显示有权限的记录</param>
        public IRAPJsonResult sfn_AvailableSystems(
            int communityID,
            int sysLogID,
            int progLanguageID,
            bool isAccessible,
            out int errCode,
            out string errText)
        {
            string strProcedureName = string.Format("{0}.{1}",
                                                    className,
                                                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <SystemInfo> datas = new List <SystemInfo>();

                try
                {
                    #region 创建数据库调用参数组,并赋值
                    IList <IDataParameter> paramList = new List <IDataParameter>();
                    paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                    paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                    paramList.Add(new IRAPProcParameter("@ProgLanguageID", DbType.Int32, progLanguageID));
                    WriteLog.Instance.Write(string.Format("执行函数 IRAP..sfn_AvailableSystems,参数:" +
                                                          "CommunityID={0}|SysLogID={1}|ProgLanguageID={2}|IsAccessible={3}",
                                                          communityID, sysLogID, progLanguageID, isAccessible),
                                            strProcedureName);
                    #endregion

                    #region 执行数据库函数或存储过程
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAP..sfn_AvailableSystems(@CommunityID, " +
                                        "@SysLogID, @ProgLanguageID)";
                        if (isAccessible)
                        {
                            strSQL += " WHERE Accessible=1";
                        }
                        WriteLog.Instance.Write(strSQL, strProcedureName);

                        IList <SystemInfo> lstDatas = conn.CallTableFunc <SystemInfo>(strSQL, paramList);
                        datas = lstDatas.ToList();

                        errCode = 0;
                        errText = string.Format("调用成功,共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                    #endregion
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAP..sfn_AvailableSystems 时发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #24
0
        /// <summary>
        /// 获取当前工单执行的瞬时达成率
        /// </summary>
        /// <param name="communityID">社区标识</param>
        /// <param name="resourceTreeID">产线或工作中心(134/211)</param>
        /// <param name="resourceLeafID">产线或工作中心叶标识</param>
        /// <param name="nowTime">当前时间(传入空串表示当前时间)</param>
        /// <param name="sysLogID">系统登录标识</param>
        /// <returns>LineKPI_BTS</returns>
        public IRAPJsonResult ufn_GetInfo_LineKPI_BTS(
            int communityID,
            int resourceTreeID,
            int resourceLeafID,
            string nowTime,
            long sysLogID,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                LineKPI_BTS data = new LineKPI_BTS();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@ResourceTreeID", DbType.Int32, resourceTreeID));
                paramList.Add(new IRAPProcParameter("@ResourceLeafID", DbType.Int32, resourceLeafID));
                paramList.Add(new IRAPProcParameter("@NowTime", DbType.String, nowTime));
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAPFVS..ufn_GetInfo_LineKPI_BTS," +
                        "参数:CommunityID={0}|ResourceTreeID={1}|ResourceLeafID={2}|" +
                        "NowTime={3}|SysLogID={4}",
                        communityID, resourceTreeID, resourceTreeID, nowTime, sysLogID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAPFVS..ufn_GetInfo_LineKPI_BTS(" +
                                        "@CommunityID, @ResourceTreeID, @ResourceLeafID, " +
                                        "@NowTime, @SysLogID)";

                        IList <LineKPI_BTS> lstDatas =
                            conn.CallTableFunc <LineKPI_BTS>(strSQL, paramList);
                        if (lstDatas.Count > 0)
                        {
                            data    = lstDatas[0].Clone();
                            errCode = 0;
                            errText = "调用成功!";
                        }
                        else
                        {
                            errCode = -99001;
                            errText = "没有当前工单执行的瞬时达成率信息";
                        }
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAPFVS..ufn_GetInfo_LineKPI_BTS 函数发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(data));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #25
0
        /// <summary>
        /// 解析WIPIDCode在当前工位上生产是否OK:
        /// ⒈ 路由是否停滞在本工位;
        /// ⒉ 产品是否当前选中产品;
        /// ⒊ 是否合法的在制品标识或在制品容器标识。
        /// </summary>
        /// <param name="communityID">社区标识</param>
        /// <param name="wipIDCode">在制品标识</param>
        /// <param name="productLeaf">当前选中产品叶标识</param>
        /// <param name="workUnitLeaf">当前选中工位叶标识</param>
        /// <param name="isEnhanced">是否增强</param>
        /// <param name="sysLogID">系统登录标识</param>
        /// <returns>List[WIPIDCode]</returns>
        public IRAPJsonResult ufn_GetList_WIPIDCodes(
            int communityID,
            string wipIDCode,
            int productLeaf,
            int workUnitLeaf,
            bool isEnhanced,
            long sysLogID,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <WIPIDCode> datas = new List <WIPIDCode>();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@WIPIDCode", DbType.String, wipIDCode));
                paramList.Add(new IRAPProcParameter("@ProductLeaf", DbType.Int32, productLeaf));
                paramList.Add(new IRAPProcParameter("@WorkUnitLeaf", DbType.Int32, workUnitLeaf));
                paramList.Add(new IRAPProcParameter("@IsEnhanced", DbType.Boolean, isEnhanced));
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAPMES..ufn_GetList_WIPIDCodes,参数:CommunityID={0}|" +
                        "WIPIDCode={1}|ProductLeaf={2}|WorkUnitLeaf={3}|IsEnhanced={4}|" +
                        "SysLogID={5}",
                        communityID, wipIDCode, productLeaf, workUnitLeaf, isEnhanced,
                        sysLogID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAPMES..ufn_GetList_WIPIDCodes(" +
                                        "@CommunityID, @WIPIDCode, @ProductLeaf, " +
                                        "@WorkUnitLeaf, @IsEnhanced, @SysLogID)";
                        WriteLog.Instance.Write(strSQL, strProcedureName);

                        IList <WIPIDCode> lstDatas =
                            conn.CallTableFunc <WIPIDCode>(strSQL, paramList);
                        datas   = lstDatas.ToList();
                        errCode = 0;
                        errText = "调用成功!";
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText =
                        string.Format(
                            "调用 IRAPMES..ufn_GetList_WIPIDCodes 函数发生异常:{0}",
                            error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #26
0
        public IRAPJsonResult ufn_EWI_GetInfo_ShowPaper(
            int communityID,
            int processLeaf,
            int workUnitLeaf,
            long sysLogID,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                EWIShowPaperInfo data = new EWIShowPaperInfo();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@ProcessLeaf", DbType.Int32, processLeaf));
                paramList.Add(new IRAPProcParameter("@WorkUnitLeaf", DbType.Int32, workUnitLeaf));
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAPFVS..ufn_EWI_GetInfo_ShowPaper," +
                        "参数:CommunityID={0}|ProcessLeaf={1}|WorkUnitLeaf={2}|SysLogID={3}",
                        communityID, processLeaf, workUnitLeaf, sysLogID),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAPFVS..ufn_EWI_GetInfo_ShowPaper(" +
                                        "@CommunityID, @ProcessLeaf, @WorkUnitLeaf, @SysLogID)";

                        IList <EWIShowPaperInfo> lstDatas =
                            conn.CallTableFunc <EWIShowPaperInfo>(strSQL, paramList);
                        if (lstDatas.Count > 0)
                        {
                            data = lstDatas[0].Clone();
                        }
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", lstDatas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText = string.Format("调用 IRAPFVS..ufn_EWI_GetInfo_ShowPaper 函数发生异常:{0}", error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(data));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #27
0
        public IRAPJsonResult mfn_GetList_Users(
            int communityID,
            string userCode,
            string idCardNo,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <STB006> datas           = new List <STB006>();
                long          partitioningKey = communityID * 10000;

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@PartitioningKey", DbType.Int64, partitioningKey));
                paramList.Add(new IRAPProcParameter("@UserCode", DbType.String, userCode));
                paramList.Add(new IRAPProcParameter("@IDCardNo", DbType.String, idCardNo));
                WriteLog.Instance.Write(
                    string.Format(
                        "检索 IRAP..stb006 表," +
                        "参数:CommunityID={0}|UserCode={1}|IDCardNo={2}",
                        communityID,
                        userCode,
                        idCardNo),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAP..stb006 WHERE PartitioningKey=@PartitioningKey";

                        if (userCode != "")
                        {
                            strSQL += $" AND UserCode='{userCode}' OR CardNo='{userCode}'";
                        }
                        if (idCardNo != "")
                        {
                            strSQL += $" AND CardNo='{idCardNo}' OR UserCode='{idCardNo}'";
                        }

                        IList <STB006> lstDatas =
                            conn.CallTableFunc <STB006>(strSQL, paramList);
                        datas   = lstDatas.ToList();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText =
                        string.Format(
                            "检索 IRAP..stb006 表发生异常:{0}",
                            error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #28
0
        public IRAPJsonResult ufn_GetKanban_PackageTypes(
            int communityID,
            long sysLogID,
            int productLeaf,
            int workUnitLeaf,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <PackageType> datas = new List <PackageType>();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@ProductLeaf", DbType.Int32, productLeaf));
                paramList.Add(new IRAPProcParameter("@WorkUnitLeaf", DbType.Int32, workUnitLeaf));
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));
                WriteLog.Instance.Write(
                    string.Format(
                        "调用函数 IRAPMES..ufn_GetKanban_PackageTypes," +
                        "参数:CommunityID={0}|SysLogID={1}|ProductLeaf={2}|" +
                        "WorkUnitLeaf={3}",
                        communityID, sysLogID, productLeaf, workUnitLeaf),
                    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAPMES..ufn_GetKanban_PackageTypes(" +
                                        "@CommunityID, @SysLogID, @ProductLeaf, @WorkUnitLeaf) " +
                                        "ORDER BY Ordinal";

                        IList <PackageType> lstDatas =
                            conn.CallTableFunc <PackageType>(strSQL, paramList);
                        datas   = lstDatas.ToList();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText =
                        string.Format(
                            "调用 IRAPMES..ufn_GetKanban_PackageTypes 函数发生异常:{0}",
                            error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #29
0
        public IRAPJsonResult ufn_GetLabelFMTStr(
            int communityID,
            int correlationID,
            int labelID,
            string serialNo,
            string pHStr1,
            string pHStr2,
            string pHStr3,
            string pHStr4,
            string pHStr5,
            string pHStr6,
            string pHStr7,
            string pHStr8,
            string pHStr9,
            string pHStr10,
            string pHStr11,
            string pHStr12,
            string pHStr13,
            string pHStr14,
            string pHStr15,
            long sysLogID,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <LabelFMTStr> datas = new List <LabelFMTStr>();

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Clear();
                paramList.Add(new IRAPProcParameter("@CommunityID", DbType.Int32, communityID));
                paramList.Add(new IRAPProcParameter("@CorrelationID", DbType.Int32, correlationID));
                paramList.Add(new IRAPProcParameter("@LabelID", DbType.Int32, labelID));
                paramList.Add(new IRAPProcParameter("@SerialNo", DbType.String, serialNo));
                paramList.Add(new IRAPProcParameter("@PHStr1", DbType.String, pHStr1));
                paramList.Add(new IRAPProcParameter("@PHStr2", DbType.String, pHStr2));
                paramList.Add(new IRAPProcParameter("@PHStr3", DbType.String, pHStr3));
                paramList.Add(new IRAPProcParameter("@PHStr4", DbType.String, pHStr4));
                paramList.Add(new IRAPProcParameter("@PHStr5", DbType.String, pHStr5));
                paramList.Add(new IRAPProcParameter("@PHStr6", DbType.String, pHStr6));
                paramList.Add(new IRAPProcParameter("@PHStr7", DbType.String, pHStr7));
                paramList.Add(new IRAPProcParameter("@PHStr8", DbType.String, pHStr8));
                paramList.Add(new IRAPProcParameter("@PHStr9", DbType.String, pHStr9));
                paramList.Add(new IRAPProcParameter("@PHStr10", DbType.String, pHStr10));
                paramList.Add(new IRAPProcParameter("@PHStr11", DbType.String, pHStr11));
                paramList.Add(new IRAPProcParameter("@PHStr12", DbType.String, pHStr12));
                paramList.Add(new IRAPProcParameter("@PHStr13", DbType.String, pHStr13));
                paramList.Add(new IRAPProcParameter("@PHStr14", DbType.String, pHStr14));
                paramList.Add(new IRAPProcParameter("@PHStr15", DbType.String, pHStr15));
                paramList.Add(new IRAPProcParameter("@SysLogID", DbType.Int64, sysLogID));

                //WriteLog.Instance.Write(
                //    string.Format(
                //        "调用函数 IRAPMES..ufn_GetFactList_Packaging," +
                //        "参数:CommunityID={0}|TransactNo={1}|ProductLeaf={2}|" +
                //        "SysLogID={3}",
                //        communityID, transactNo, productLeaf, sysLogID),
                //    strProcedureName);
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAPMES..ufn_GetLabelFMTStr(" +
                                        "@CommunityID, @CorrelationID, @LabelID, @SerialNo,@PHStr1,@PHStr2,@PHStr3,@PHStr4,@PHStr5,@PHStr6,@PHStr7,@PHStr8,@PHStr9,@PHStr10,@PHStr11,@PHStr12,@PHStr13,@PHStr14,@PHStr15,@SysLogID)";

                        IList <LabelFMTStr> lstDatas =
                            conn.CallTableFunc <LabelFMTStr>(strSQL, paramList);
                        datas   = lstDatas.ToList();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText =
                        string.Format(
                            "调用 IRAPMES..ufn_GetFactList_Packaging 函数发生异常:{0}",
                            error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }
Beispiel #30
0
        public IRAPJsonResult mfn_GetList_DBF_MO(
            int communityID,
            long importID,
            long sysLogID,
            out int errCode,
            out string errText)
        {
            string strProcedureName =
                string.Format(
                    "{0}.{1}",
                    className,
                    MethodBase.GetCurrentMethod().Name);

            WriteLog.Instance.WriteBeginSplitter(strProcedureName);
            try
            {
                List <dpa_DBF_MO> datas = new List <dpa_DBF_MO>();
                long partitioningKey    = communityID * 10000;

                #region 创建数据库调用参数组,并赋值
                IList <IDataParameter> paramList = new List <IDataParameter>();
                paramList.Add(new IRAPProcParameter("@PartitioningKey", DbType.Int64, partitioningKey));
                paramList.Add(new IRAPProcParameter("@ImportID", DbType.Int64, importID));
                #endregion

                #region 执行数据库函数或存储过程
                try
                {
                    using (IRAPSQLConnection conn = new IRAPSQLConnection())
                    {
                        string strSQL = "SELECT * " +
                                        "FROM IRAPDPA..dpa_DBF_MO " +
                                        "WHERE PartitioningKey=@PartitioningKey AND ImportID=@ImportID";
                        WriteLog.Instance.Write(
                            string.Format(
                                "执行 SQL 语句:[{0}]," +
                                "参数:@PartitioningKey={1}|@ImportID={2}",
                                strSQL, partitioningKey, importID),
                            strProcedureName);

                        IList <dpa_DBF_MO> lstDatas =
                            conn.CallTableFunc <dpa_DBF_MO>(strSQL, paramList);
                        datas   = lstDatas.ToList();
                        errCode = 0;
                        errText = string.Format("调用成功!共获得 {0} 条记录", datas.Count);
                        WriteLog.Instance.Write(errText, strProcedureName);
                    }
                }
                catch (Exception error)
                {
                    errCode = 99000;
                    errText =
                        string.Format(
                            "执行 SQL 语句发生异常:{0}",
                            error.Message);
                    WriteLog.Instance.Write(errText, strProcedureName);
                    WriteLog.Instance.Write(error.StackTrace, strProcedureName);
                }
                #endregion

                return(Json(datas));
            }
            finally
            {
                WriteLog.Instance.WriteEndSplitter(strProcedureName);
            }
        }