|
@@ -164,9 +164,16 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
else if (item.IsAuditGM == 1) item.IsAuditGMStr = "已通过";
|
|
|
else if (item.IsAuditGM == 2) item.IsAuditGMStr = "未通过";
|
|
|
else if (item.IsAuditGM == 3) item.IsAuditGMStr = "自动审核";
|
|
|
+ if (!string.IsNullOrWhiteSpace(item.CheckInDate))
|
|
|
+ {
|
|
|
+ item.CheckInDate = DateTime.Parse(item.CheckInDate).ToString("yyyy-MM-dd");
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrWhiteSpace(item.CheckOutDate))
|
|
|
+ {
|
|
|
+ item.CheckOutDate = DateTime.Parse(item.CheckOutDate).ToString("yyyy-MM-dd");
|
|
|
+ }
|
|
|
|
|
|
- item.CheckInDate=DateTime.Parse(item.CheckInDate).ToString("yyyy-MM-dd");
|
|
|
- item.CheckOutDate = DateTime.Parse(item.CheckOutDate).ToString("yyyy-MM-dd");
|
|
|
+
|
|
|
|
|
|
}
|
|
|
return result = new Result() { Code = 0, Msg = "查询成功!", Data = hotelDataList };
|
|
@@ -190,8 +197,14 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
else if (item.IsAuditGM == 1) item.IsAuditGMStr = "已通过";
|
|
|
else if (item.IsAuditGM == 2) item.IsAuditGMStr = "未通过";
|
|
|
else if (item.IsAuditGM == 3) item.IsAuditGMStr = "自动审核";
|
|
|
- item.CheckInDate = DateTime.Parse(item.CheckInDate).ToString("yyyy-MM-dd");
|
|
|
- item.CheckOutDate = DateTime.Parse(item.CheckOutDate).ToString("yyyy-MM-dd");
|
|
|
+ if (!string.IsNullOrWhiteSpace(item.CheckInDate))
|
|
|
+ {
|
|
|
+ item.CheckInDate = DateTime.Parse(item.CheckInDate).ToString("yyyy-MM-dd");
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrWhiteSpace(item.CheckOutDate))
|
|
|
+ {
|
|
|
+ item.CheckOutDate = DateTime.Parse(item.CheckOutDate).ToString("yyyy-MM-dd");
|
|
|
+ }
|
|
|
}
|
|
|
string CountSql = string.Format(@"Select COUNT(1) as Count From (
|
|
|
Select h.Id,s1.Name as GuestType,h.ReservationsNo,h.HotelName,h.CheckInDate,
|
|
@@ -244,9 +257,15 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
{
|
|
|
Sys_SetData GTId = _sqlSugar.Queryable<Sys_SetData>().First(a => a.IsDel == 0 && a.Id == hotelReservationsById.GTId);
|
|
|
if (GTId != null) _hotelReservations.GtIdStr = GTId.Name;
|
|
|
+ if (!string.IsNullOrWhiteSpace(_hotelReservations.CheckInDate))
|
|
|
+ {
|
|
|
+ _hotelReservations.CheckInDate = Convert.ToDateTime(hotelReservationsById.CheckInDate).ToString("yyyy-MM-dd");
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrWhiteSpace(_hotelReservations.CheckOutDate))
|
|
|
+ {
|
|
|
+ _hotelReservations.CheckOutDate = Convert.ToDateTime(hotelReservationsById.CheckOutDate).ToString("yyyy-MM-dd");
|
|
|
+ }
|
|
|
|
|
|
- _hotelReservations.CheckInDate=Convert.ToDateTime(hotelReservationsById.CheckInDate).ToString("yyyy-MM-dd");
|
|
|
- _hotelReservations.CheckOutDate = Convert.ToDateTime(hotelReservationsById.CheckOutDate).ToString("yyyy-MM-dd");
|
|
|
|
|
|
Sys_SetData GovernmentRentCurrencyStr = _sqlSugar.Queryable<Sys_SetData>().First(a => a.IsDel == 0 && a.Id == hotelReservationsById.GovernmentRentCurrency);
|
|
|
if (GovernmentRentCurrencyStr != null) _hotelReservations.GovernmentRentCurrencyStr = GovernmentRentCurrencyStr.Name;
|