public IActionResult ActionResult([FromForm] string bean) { if (GetUserLoginState.LoginState(Request.Headers)) { MChangeRes changeRes = new MChangeRes(); List <string> reslist = changeRes.GetCanResList_Call(bean); if (reslist == null) { return(Ok(-2)); } else { if (reslist.Count < 1) { return(Ok(-2)); } else { return(Ok(reslist)); } } } else { return(Ok(-1)); } }
public IActionResult ActionResult([FromForm] string usersysid) { if (GetUserLoginState.LoginState(Request.Headers)) { MResList resList = new MResList(); return(Ok(resList.GetResList(usersysid))); } else { return(Ok(-1)); } }
public IActionResult Result([FromForm] string userinfo) { if (GetUserLoginState.LoginState(Request.Headers)) { User user = new User(); return(Ok(user.UpdateUserinfo(userinfo))); } else { return(Ok(-1)); } }
public IActionResult Result([FromForm] string bean) { if (GetUserLoginState.LoginState(Request.Headers)) { MOrderAjustment ajustment = new MOrderAjustment(); return(Ok(ajustment.OrderAjustmest_Call(bean))); } else { return(Ok(-1)); } }
public ActionResult <DataTable> ActionResult([FromForm] string empName) { if (GetUserLoginState.LoginState(Request.Headers)) { User user = new User(); return(user.Operate(empName)); } else { return(Ok(-1)); } }
public ActionResult <DataTable> ActionResult([FromForm] string empid, [FromForm] int logtype) { if (GetUserLoginState.LoginState(Request.Headers)) { User user = new User(); return(user.GetUserLog(empid, logtype)); } else { return(Ok(-1)); } }
public IActionResult ActionResult([FromForm] string resname, [FromForm] string usetype) { if (GetUserLoginState.LoginState(Request.Headers)) { MSetResUsed setResUsed = new MSetResUsed(); setResUsed.SetResUnused(resname, usetype); return(Ok(1)); } else { return(Ok(-1)); } }
public IActionResult ActionResult([FromForm] string resname, [FromForm] string usetype, [FromForm] string starttime, [FromForm] string endtime, [FromForm] string eventmessage) { if (GetUserLoginState.LoginState(Request.Headers)) { string empid = JsonConvert.DeserializeObject <JObject>(Request.Headers["token"].ToString()).GetValue("UserEmpID").ToString(); MSetResUsed setResUsed = new MSetResUsed(); setResUsed.SetResUsed(empid, resname, usetype, starttime, endtime, eventmessage); return(Ok(1)); } else { return(Ok(-1)); } }
public IActionResult Result([FromForm] string logmodel, [FromForm] string logmessage) { if (GetUserLoginState.LoginState(Request.Headers)) { string UserIP = Request.HttpContext.Connection.RemoteIpAddress.ToString(); string UserAgent = Request.Headers["User-Agent"].ToString(); string UserEmpID = JsonConvert.DeserializeObject <JObject>(Request.Headers["token"]).GetValue("UserEmpID").ToString(); PublicFunc.WriteUserLog(UserEmpID, UserIP, logmodel, logmessage, UserAgent); return(Ok(1)); } else { return(Ok(-1)); } }
public IActionResult Result([FromForm] string resName, [FromForm] string orderUID, [FromForm] string dayshift) { if (GetUserLoginState.LoginState(Request.Headers)) { string UserIP = Request.HttpContext.Connection.RemoteIpAddress.ToString(); string UserAgent = Request.Headers["User-Agent"].ToString(); string UserEmpID = JsonConvert.DeserializeObject <JObject>(Request.Headers["token"]).GetValue("UserEmpID").ToString(); PublicFunc.WriteUserLog(UserEmpID, UserIP, "拉取订单", "拉取订单:" + orderUID + ",到设备:" + resName, UserAgent); MCanDownThisRes downThisRes = new MCanDownThisRes(); return(Ok(downThisRes.BeginDown_Call(orderuid: orderUID, resName: resName, dayshift: dayshift))); } else { return(Ok(-1)); } }
public ActionResult Action([FromForm] string empid, [FromForm] string oldPass, [FromForm] string newPass) { if (GetUserLoginState.LoginState(Request.Headers)) { string UserIP = Request.HttpContext.Connection.RemoteIpAddress.ToString(); string UserAgent = Request.Headers["User-Agent"].ToString(); string UserEmpID = JsonConvert.DeserializeObject <JObject>(Request.Headers["token"]).GetValue("UserEmpID").ToString(); PublicFunc.WriteUserLog(UserEmpID, UserIP, "更改密码", "更改密码为:" + newPass, UserAgent); User user = new User(); return(Ok(user.ChangePass(empid, oldPass, newPass))); } else { return(Ok(-1)); } }
public IActionResult Result([FromForm] string bean) { if (GetUserLoginState.LoginState(Request.Headers)) { string UserIP = Request.HttpContext.Connection.RemoteIpAddress.ToString(); string UserAgent = Request.Headers["User-Agent"].ToString(); string UserEmpID = JsonConvert.DeserializeObject <JObject>(Request.Headers["token"]).GetValue("UserEmpID").ToString(); PublicFunc.WriteUserLog(UserEmpID, UserIP, "换班", "换班", UserAgent); MEndWork mEnd = new MEndWork(); bool result = mEnd.EndWork(bean); return(Ok(result)); } else { return(Ok(-1)); } }
public IActionResult Result([FromForm] string empid) { //退出登录 if (GetUserLoginState.LoginState(Request.Headers)) { string UserIP = Request.HttpContext.Connection.RemoteIpAddress.ToString(); string UserAgent = Request.Headers["User-Agent"].ToString(); string UserEmpID = JsonConvert.DeserializeObject <JObject>(Request.Headers["token"]).GetValue("UserEmpID").ToString(); PublicFunc.WriteUserLog(UserEmpID, UserIP, "退出登陆", "退出登陆", UserAgent); User user = new User(); return(Ok(user.SignOut(empid))); } else { return(Ok(-1)); } }
public IActionResult Result([FromForm] string bean) { if (GetUserLoginState.LoginState(Request.Headers)) { string UserIP = Request.HttpContext.Connection.RemoteIpAddress.ToString(); string UserAgent = Request.Headers["User-Agent"].ToString(); string UserEmpID = JsonConvert.DeserializeObject <JObject>(Request.Headers["token"]).GetValue("UserEmpID").ToString(); string OrderUID = JsonConvert.DeserializeObject <JObject>(bean).GetValue("orderUID").ToString(); string Opname = JsonConvert.DeserializeObject <JObject>(bean).GetValue("pmOpName").ToString(); PublicFunc.WriteUserLog(UserEmpID, UserIP, "订单暂停", "OrderUID:" + OrderUID + ",工序名称:" + Opname, UserAgent); MPauseOrder pauseOrder = new MPauseOrder(); return(Ok(pauseOrder.PauseOrder_Call(bean))); } else { return(Ok(-1)); } }
public IActionResult Result([FromForm] string resName) { if (GetUserLoginState.LoginState(Request.Headers)) { MFinishedList mUnStart = new MFinishedList(); if (mUnStart.GetFinishedOrderList(resName) != null) { return(Ok(mUnStart.GetFinishedOrderList(resName))); } else { return(Ok(-2)); } } else { return(Ok(-1)); } }
public IActionResult Result([FromForm] string resName, [FromForm] int dayshift) { if (GetUserLoginState.LoginState(Request.Headers)) { MCanDownThisRes downThisRes = new MCanDownThisRes(); List <COrderList> cOrder = downThisRes.CanDownThisRes_Call(resName, dayshift); if (cOrder != null) { return(Ok(cOrder)); } else { return(Ok(-2)); } } else { return(Ok(-1)); } }
public IActionResult ActionResult([FromForm] string bean) { if (GetUserLoginState.LoginState(Request.Headers)) { string UserIP = Request.HttpContext.Connection.RemoteIpAddress.ToString(); string UserAgent = Request.Headers["User-Agent"].ToString(); string UserEmpID = JsonConvert.DeserializeObject <JObject>(Request.Headers["token"]).GetValue("UserEmpID").ToString(); JObject obj = JsonConvert.DeserializeObject <JObject>(bean); string changeresname = obj.GetValue("changeResName").ToString(); string thisresname = obj.GetValue("mesResName").ToString(); string orderUID = obj.GetValue("orderUID").ToString(); PublicFunc.WriteUserLog(UserEmpID, UserIP, "订单推送", "orderUID: " + orderUID + ";订单推送:" + thisresname + "=>" + changeresname, UserAgent); MChangeRes changeRes = new MChangeRes(); return(Ok(changeRes.ChangeResource_Call(bean))); } else { return(Ok(-1)); } }
public ActionResult <List <COrderList> > Result([FromForm] string resName) { if (GetUserLoginState.LoginState(Request.Headers)) { MUnStartList mUnStart = new MUnStartList(); List <COrderList> cOrderLists = mUnStart.GetUnStartOrderList(resName); if (cOrderLists == null) { return(Ok(-2)); } else { return(Ok(cOrderLists)); } } else { return(Ok(-1)); } }
public IActionResult ActionResult() { if (GetUserLoginState.LoginState(Request.Headers)) { string empid = JsonConvert.DeserializeObject <JObject>(Request.Headers["token"]).GetValue("UserEmpID").ToString(); MResList resList = new MResList(); string defresname = resList.GetDefaultRes(empid); if (string.IsNullOrWhiteSpace(defresname)) { return(Ok(-1)); } else { return(Ok(defresname)); } } else { return(Ok(-1)); } }