using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using WebAPI.Models; namespace WebAPI.Controllers.基础资料.基础资料 { public class Gy_WorkStationBillController : ApiController { private json objJsonResult = new json(); public DataSet ds = new DataSet(); public SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); #region 工位列表 [Route("Gy_WorkStationBill/Gy_WorkStationList")] [HttpGet] public object Gy_WorkStationList(string sWhere, string user) { try { //编辑权限 if (!DBUtility.ClsPub.Security_Log_second("Gy_WorkStation_Query", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查看权限!"; objJsonResult.data = null; return objJsonResult; } string sql1 = string.Format(@"select * from h_v_Gy_WorkStationList where 1=1 "); ds = oCN.RunProcReturn(sql1 + sWhere + " order by 工位代码 ", "h_v_Gy_WorkStationList"); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion } }