Files
Web_Faces_Prod/Face.Web/Areas/App/Controllers/QueryFaceStatusController.cs
2025-11-25 17:41:57 +08:00

48 lines
1.5 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Face.Domain.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Face.Web.Areas.App.Controllers
{
public class QueryFaceStatusController : Controller
{
// GET: App/QueryFaceStatus
[HttpPost]
public ActionResult QueryStatus(string HotelCode,string roomid,string key,string appid)
{
pmsLog list = new pmsLog();
pmsLog listn = new pmsLog();
//pmsLog pms= SqlSugarBase.Db.Insertable(log).ExecuteCommand();
if (key== "blw_888")
{
list = SqlSugarBase.Db.Queryable<pmsLog>().OrderByDescending(x => x.Creationtime).First(x => x.HotelCode == HotelCode && x.roomid == roomid);
if (list == null)
{
var json = new
{
Status = 100,
message = "提供的酒店code和roomid没有查询到信息请查看传递的信息是否有误"
};
return Json(json);
}
listn = SqlSugarBase.Db.Queryable<pmsLog>().OrderByDescending(x => x.Creationtime).First(x => x.pmsid == list.pmsid);
}
else
{
var json = new
{
Status = 200,
message = "提供的Key值有误"
};
return Json(json);
}
return Json(listn);
}
}
}