zrg
2025-04-08 1017c15c2a96e7529d43b58de0469526e502b647
WebAPI/Controllers/WebAPIController.cs
@@ -2219,6 +2219,103 @@
        }
        /// <summary>
        /// 获取环境检验方案列表
        /// <summary>
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Web/Gy_EnvironmentTestSchemeBillList_Json")]
        [HttpGet]
        public object Gy_EnvironmentTestSchemeBillList_Json(string sWhere)
        {
            DataSet ds;
            if (sWhere != "")
            {
                sWhere = " and ( 生产部门 like '%" + sWhere + "%' or 工作中心 like '%" + sWhere + "%' or 工序名称 like '%" + sWhere + "%' or 检测项目 like '%" + sWhere + "%' ) ";
            }
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn("select  * from h_v_Gy_EnvironmentTestSchemeBillList_PDA where 审核人 !='' and 关闭人=''  " + sWhere + " Order by 单据号 ", "h_v_Gy_EnvironmentTestSchemeBillList_PDA");
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败";
                    objjson.data = null;
                    return objjson;
                }
                else
                {
                    objjson.code = "0";
                    objjson.count = 1;
                    objjson.Message = "获取成功!";
                    objjson.data = ds.Tables[0];
                    return objjson;
                }
            }
            catch (Exception e)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败" + e.ToString();
                objjson.data = null;
                return objjson;
            }
        }
        /// <summary>
        /// 获取环境检测项目列表
        /// <summary>
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Web/Gy_EnvironmentTestItemList_Json")]
        [HttpGet]
        public object Gy_EnvironmentTestItemList_Json(string sWhere)
        {
            DataSet ds;
            if (sWhere != "")
            {
                sWhere = " and ( HNumber like '%" + sWhere + "%' or HName like '%" + sWhere + "%'  ) ";
            }
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn("select HItemID ,HName 环境检测项目,HNumber 环境检测代码 from Gy_EnvironmentTestItem where ISNULL(HCheckTime,'')!='' and HStopflag =0  " + sWhere + " Order by HNumber ", "Gy_EnvironmentTestItem");
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败";
                    objjson.data = null;
                    return objjson;
                }
                else
                {
                    objjson.code = "0";
                    objjson.count = 1;
                    objjson.Message = "获取成功!";
                    objjson.data = ds.Tables[0];
                    return objjson;
                }
            }
            catch (Exception e)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败" + e.ToString();
                objjson.data = null;
                return objjson;
            }
        }
        /// <summary>
        /// 获取银行列表
        /// <summary>
        ///参数:string sql。
@@ -20940,12 +21037,12 @@
            try
            {
                SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID  where a.HUserID = '" + HMakeName + "' and b.HType = '" + HType + "' Order by a.HItemID";
                string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID  where a.HUserID = '" + HMakeName + "' and b.HType = '" + HType + "' Order by a.HItemID";
                ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu");     //获取Xt_UserFastMenu中该用户设置的自定义菜单信息,用于在前端加载
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID  where a.HUserID = 'admin' and b.HType = '" + HType + "' Order by a.HItemID";
                    sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID  where a.HUserID = 'admin' and b.HType = '" + HType + "' Order by a.HItemID";
                    ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu");     //获取Xt_UserFastMenu中该用户设置的自定义菜单信息,用于在前端加载
                }