| | |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "密码错误!"; |
| | | objjson.Message = "[0000-1-072]密码错误!"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "登录成功!"; |
| | | objjson.Message = "[0000-1-073]登录成功!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | |
| | |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "登录异常!" + e.Message; |
| | | objjson.Message = "[0000-1-074]登录异常!" + e.Message; |
| | | objjson.data = null; |
| | | return objjson; ; |
| | | } |
| | |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <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> |
| | | /// 获取银行列表 |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from xt_BaseInfo", "xt_BaseInfo"); |
| | | ds = oCN.RunProcReturn("select HItemID,HNumber,HCusName,HLogoLabel,HMenuLabel,HUserQty,ISNULL(HLogoTranslationText_English,HLogoLabel) HLogoTranslationText_English,ISNULL(HLogoTranslationText_Spain,HLogoLabel) HLogoTranslationText_Spain , ISNULL(HMenuTranslationText_English, HLogoLabel) HMenuTranslationText_English, ISNULL(HMenuTranslationText_Spain, HLogoLabel) HMenuTranslationText_Spain from xt_BaseInfo", "xt_BaseInfo"); |
| | | if (ds is null) |
| | | { |
| | | objjson.code = "0"; |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无权限查询!"; |
| | | objJsonResult.Message = "[0000-1-068]无权限查询!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | |
| | | res.code = CodeConstant.SUCCEED; |
| | | res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | res.Message = "Sucess!"; |
| | | res.Message = "[0000-1-037]Sucess!"; |
| | | res.list = columnNameList; |
| | | res.data = ds.Tables[0]; |
| | | return res; |
| | |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "Exception!" + e.ToString(); |
| | | res.Message = "[0000-1-038]Exception!" + e.ToString(); |
| | | res.data = null; |
| | | return res; |
| | | } |
| | |
| | | public string Hurl { get; set; } |
| | | public string HPicNum { get; set; } |
| | | public string HShowMode { get; set; } |
| | | public string HTranslationText_English { get; set; } |
| | | public string HTranslationText_Spain { get; set; } |
| | | public List<MenuLoad> childMenus { get; set; } |
| | | } |
| | | |
| | |
| | | ds = oCn.RunProcReturn(sql1, "Gy_MenuDefineSet"); //查询用户绑定的角色 是否设置菜单信息 取角色名称最短的一个 |
| | | if ((ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0)) |
| | | { |
| | | sql = "Select * from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID "; |
| | | sql = "Select HitemID,HNumber,HName,HPartentID,HLevel,Hurl,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain,HPicNum from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID "; |
| | | ds = oCn.RunProcReturn(sql, "Gy_Menu_1"); |
| | | } |
| | | } |
| | |
| | | tbj.HLevel = int.Parse(ds.Tables[0].Rows[i]["HLevel"].ToString()); |
| | | tbj.Hurl = ds.Tables[0].Rows[i]["Hurl"].ToString(); |
| | | tbj.HShowMode = ds.Tables[0].Rows[i]["HShowMode"].ToString(); |
| | | tbj.HTranslationText_English = ds.Tables[0].Rows[i]["HTranslationText_English"].ToString(); |
| | | tbj.HTranslationText_Spain = ds.Tables[0].Rows[i]["HTranslationText_Spain"].ToString(); |
| | | if (ds.Tables[0].Rows[i]["HPicNum"] != null) |
| | | { |
| | | tbj.HPicNum = ds.Tables[0].Rows[i]["HPicNum"].ToString(); |
| | |
| | | tbjson.HLevel = tree[m].HLevel; |
| | | tbjson.Hurl = dt.Rows[i]["Hurl"].ToString(); |
| | | tbjson.HShowMode = dt.Rows[i]["HShowMode"].ToString(); |
| | | tbjson.HTranslationText_English = dt.Rows[i]["HTranslationText_English"].ToString(); |
| | | tbjson.HTranslationText_Spain = dt.Rows[i]["HTranslationText_Spain"].ToString(); |
| | | if (dt.Rows[i]["HPicNum"] != null) |
| | | { |
| | | tbjson.HPicNum = dt.Rows[i]["HPicNum"].ToString(); |
| | |
| | | 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中该用户设置的自定义菜单信息,用于在前端加载 |
| | | } |
| | | |