45 lines
1.6 KiB
C#
45 lines
1.6 KiB
C#
|
|
using Face.Domain.Application;
|
|||
|
|
using Face.Domain.Entities;
|
|||
|
|
using Face.Web.Areas.App.Models;
|
|||
|
|
using SqlSugar;
|
|||
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Web;
|
|||
|
|
using System.Web.Mvc;
|
|||
|
|
using static Face.Web.Areas.App.Models.Roominfo;
|
|||
|
|
|
|||
|
|
namespace Face.Web.Areas.App.Controllers
|
|||
|
|
{
|
|||
|
|
public class FaceRoomController : Controller
|
|||
|
|
{
|
|||
|
|
[HttpPost]
|
|||
|
|
public ActionResult RoomIdbyRoom(string RoomNum, int HotelId)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
var HotelsList = db.Queryable<DeviceManage>().Where(x => x.HotelCode.Equals(HotelId)).ToList();
|
|||
|
|
|
|||
|
|
var tbl_room_basic_info = SqlSugarBase.Gesmartblv_rcu_db().Queryable<tbl_room_basic_info>().Where(A=>A.ROOM_NUMBER.Equals(RoomNum)).ToList();
|
|||
|
|
var FaceResult = from s in tbl_room_basic_info
|
|||
|
|
join d in HotelsList on s.ROOM_OLD_ID equals d.RoomId
|
|||
|
|
select new
|
|||
|
|
{
|
|||
|
|
d.Facelid,
|
|||
|
|
d.SerialNo,
|
|||
|
|
d.CreatedDate,
|
|||
|
|
d.RoomId,
|
|||
|
|
d.Status,
|
|||
|
|
d.bindingStatus,
|
|||
|
|
//d.maintainStatus,
|
|||
|
|
maintainStatus = 0,
|
|||
|
|
s.ROOM_NUMBER
|
|||
|
|
};
|
|||
|
|
return Json(FaceResult);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|