48 lines
1.5 KiB
C#
48 lines
1.5 KiB
C#
|
|
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);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|