diff --git a/EOM.TSHotelManager.Application/Business/Wti/WtiService.cs b/EOM.TSHotelManager.Application/Business/HydroelectricPower/HydroelectricPowerService.cs
similarity index 82%
rename from EOM.TSHotelManager.Application/Business/Wti/WtiService.cs
rename to EOM.TSHotelManager.Application/Business/HydroelectricPower/HydroelectricPowerService.cs
index b2398936ec36bec2b1ebfd69b774aca486624121..5e5670cfb8ab2e3f8d44c66aa06527c49d83e1e5 100644
--- a/EOM.TSHotelManager.Application/Business/Wti/WtiService.cs
+++ b/EOM.TSHotelManager.Application/Business/HydroelectricPower/HydroelectricPowerService.cs
@@ -29,18 +29,18 @@ namespace EOM.TSHotelManager.Application
///
/// 水电信息接口实现类
///
- public class WtiService : IWtiService
+ public class HydroelectricPowerService : IHydroelectricPowerService
{
///
/// 水电信息
///
- private readonly PgRepository wtiRepository;
+ private readonly PgRepository wtiRepository;
///
///
///
///
- public WtiService(PgRepository wtiRepository)
+ public HydroelectricPowerService(PgRepository wtiRepository)
{
this.wtiRepository = wtiRepository;
}
@@ -51,9 +51,9 @@ namespace EOM.TSHotelManager.Application
///
///
///
- public Wti SelectWtiInfoByRoomNo(string roomNo)
+ public HydroelectricPower SelectWtiInfoByRoomNo(string roomNo)
{
- Wti w = new Wti();
+ HydroelectricPower w = new HydroelectricPower();
w = wtiRepository.GetSingle(a => a.RoomNo.Contains(roomNo) && a.delete_mk != 1);
return w;
}
@@ -67,9 +67,9 @@ namespace EOM.TSHotelManager.Application
///
///
///
- public Wti SelectWtiInfoByRoomNoAndTime(string roomno, string usedate, string enddate)
+ public HydroelectricPower SelectWtiInfoByRoomNoAndTime(string roomno, string usedate, string enddate)
{
- Wti w = null;
+ HydroelectricPower w = null;
w = wtiRepository.GetSingle(a => a.RoomNo == roomno && a.UseDate >= Convert.ToDateTime(usedate) && a.EndDate >= Convert.ToDateTime(enddate));
return w;
}
@@ -80,9 +80,9 @@ namespace EOM.TSHotelManager.Application
/// 获取所有水电费信息
///
///
- public List SelectWtiInfoAll()
+ public List SelectWtiInfoAll()
{
- List wti = new List();
+ List wti = new List();
wti = wtiRepository.GetList(a => a.delete_mk != 1);
return wti;
}
@@ -93,9 +93,9 @@ namespace EOM.TSHotelManager.Application
/// 获取所有水电费信息
///
///
- public List ListWtiInfoByRoomNo(string roomno)
+ public List ListWtiInfoByRoomNo(string roomno)
{
- List wti = new List();
+ List wti = new List();
wti = wtiRepository.GetList(a => a.delete_mk != 1 && a.RoomNo.Equals(roomno));
return wti;
}
@@ -107,7 +107,7 @@ namespace EOM.TSHotelManager.Application
///
///
///
- public bool InsertWtiInfo(Wti w)
+ public bool InsertWtiInfo(HydroelectricPower w)
{
return wtiRepository.Insert(w);
}
@@ -119,9 +119,9 @@ namespace EOM.TSHotelManager.Application
///
///
///
- public bool UpdateWtiInfo(Wti w)
+ public bool UpdateWtiInfo(HydroelectricPower w)
{
- return wtiRepository.Update(a => new Wti()
+ return wtiRepository.Update(a => new HydroelectricPower()
{
UseDate = w.UseDate,
EndDate = w.EndDate,
@@ -142,9 +142,9 @@ namespace EOM.TSHotelManager.Application
///
///
///
- public bool UpdateWtiInfoByRoomNoAndDateTime(Wti w)
+ public bool UpdateWtiInfoByRoomNoAndDateTime(HydroelectricPower w)
{
- return wtiRepository.Update(a => new Wti()
+ return wtiRepository.Update(a => new HydroelectricPower()
{
WaterUse = w.WaterUse,
PowerUse = w.PowerUse,
@@ -165,7 +165,7 @@ namespace EOM.TSHotelManager.Application
// {
// delete_mk = 1,
// datachg_usr = string.Empty,
- // datachg_date = DateTime.Now
+ // datachg_date = Convert.ToDateTime(DateTime.Now)
// }, a => a.WtiNo == roomno);
//}
#endregion
@@ -182,7 +182,7 @@ namespace EOM.TSHotelManager.Application
{
//string sql = "delete from WTINFO where RoomNo='{0}' and UseDate='{1}' and EndDate='{2}'";
//sql = string.Format(sql, roomno, usedate, enddate);
- return wtiRepository.Update(a => new Wti()
+ return wtiRepository.Update(a => new HydroelectricPower()
{
delete_mk = 1
}, a => a.RoomNo == roomno && a.UseDate >= Convert.ToDateTime(usedate) && a.EndDate >= Convert.ToDateTime(enddate));
diff --git a/EOM.TSHotelManager.Application/Business/Wti/IWtiService.cs b/EOM.TSHotelManager.Application/Business/HydroelectricPower/IHydroelectricPowerService.cs
similarity index 88%
rename from EOM.TSHotelManager.Application/Business/Wti/IWtiService.cs
rename to EOM.TSHotelManager.Application/Business/HydroelectricPower/IHydroelectricPowerService.cs
index 90633cd08b45d6c40a8b5992915688682a26eae5..82b74073134af9402efec1bdc1cf230baa200898 100644
--- a/EOM.TSHotelManager.Application/Business/Wti/IWtiService.cs
+++ b/EOM.TSHotelManager.Application/Business/HydroelectricPower/IHydroelectricPowerService.cs
@@ -28,7 +28,7 @@ namespace EOM.TSHotelManager.Application
///
/// 水电信息接口
///
- public interface IWtiService
+ public interface IHydroelectricPowerService
{
#region 根据房间编号查询水电费信息
///
@@ -36,7 +36,7 @@ namespace EOM.TSHotelManager.Application
///
///
///
- Wti SelectWtiInfoByRoomNo(string roomNo);
+ HydroelectricPower SelectWtiInfoByRoomNo(string roomNo);
#endregion
#region 根据房间编号、使用时间查询水电费信息
@@ -47,7 +47,7 @@ namespace EOM.TSHotelManager.Application
///
///
///
- Wti SelectWtiInfoByRoomNoAndTime(string roomno, string usedate, string enddate);
+ HydroelectricPower SelectWtiInfoByRoomNoAndTime(string roomno, string usedate, string enddate);
#endregion
#region 获取所有水电费信息
@@ -55,7 +55,7 @@ namespace EOM.TSHotelManager.Application
/// 获取所有水电费信息
///
///
- List SelectWtiInfoAll();
+ List SelectWtiInfoAll();
#endregion
#region 添加水电费信息
@@ -64,7 +64,7 @@ namespace EOM.TSHotelManager.Application
///
///
///
- bool InsertWtiInfo(Wti w);
+ bool InsertWtiInfo(HydroelectricPower w);
#endregion
#region 修改水电费信息(根据房间编号)
@@ -73,7 +73,7 @@ namespace EOM.TSHotelManager.Application
///
///
///
- bool UpdateWtiInfo(Wti w);
+ bool UpdateWtiInfo(HydroelectricPower w);
#endregion
#region 根据房间信息、使用时间修改水电费
@@ -82,7 +82,7 @@ namespace EOM.TSHotelManager.Application
///
///
///
- bool UpdateWtiInfoByRoomNoAndDateTime(Wti w);
+ bool UpdateWtiInfoByRoomNoAndDateTime(HydroelectricPower w);
#endregion
#region 删除水电费信息:根据房间编号
@@ -110,7 +110,7 @@ namespace EOM.TSHotelManager.Application
/// 获取所有水电费信息
///
///
- List ListWtiInfoByRoomNo(string roomno);
+ List ListWtiInfoByRoomNo(string roomno);
#endregion
}
}
\ No newline at end of file
diff --git a/EOM.TSHotelManager.Application/Business/Room/RoomService.cs b/EOM.TSHotelManager.Application/Business/Room/RoomService.cs
index a400f390e72b32960c433e74f080664fcd434e86..4c7207b6fe2426493e0cab0fb3efe56bebb85c6f 100644
--- a/EOM.TSHotelManager.Application/Business/Room/RoomService.cs
+++ b/EOM.TSHotelManager.Application/Business/Room/RoomService.cs
@@ -23,6 +23,7 @@
*/
using CK.Common;
using EOM.TSHotelManager.Common.Core;
+using EOM.TSHotelManager.Common.Util;
using EOM.TSHotelManager.EntityFramework;
namespace EOM.TSHotelManager.Application
diff --git a/EOM.TSHotelManager.Application/Business/Room/RoomTypeService.cs b/EOM.TSHotelManager.Application/Business/Room/RoomTypeService.cs
index 2112e37d4fc2345612fca1055a240cf7b589c125..cb1d9127b9fda4fe6b7e735a76568081072d922e 100644
--- a/EOM.TSHotelManager.Application/Business/Room/RoomTypeService.cs
+++ b/EOM.TSHotelManager.Application/Business/Room/RoomTypeService.cs
@@ -23,6 +23,7 @@
*/
using CK.Common;
using EOM.TSHotelManager.Common.Core;
+using EOM.TSHotelManager.Common.Util;
using EOM.TSHotelManager.EntityFramework;
namespace EOM.TSHotelManager.Application
@@ -125,8 +126,7 @@ namespace EOM.TSHotelManager.Application
RoomRent = roomType.RoomRent,
RoomDeposit = roomType.RoomDeposit,
delete_mk = roomType.delete_mk,
- datachg_usr = roomType.datachg_usr,
- datachg_date = DateTime.Now
+ datachg_usr = roomType.datachg_usr
}, a => a.Roomtype == roomType.Roomtype) ;
}
diff --git a/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs b/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs
index 6c77c20ad67bbd741dbe51c2cd1b71a507ede0ea..1c4b65f4231378966b39c19fc6b98a064ae5088a 100644
--- a/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs
+++ b/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs
@@ -205,7 +205,7 @@ namespace EOM.TSHotelManager.Application
return spendRepository.Update(a => new Spend()
{
MoneyState = SpendConsts.Settled
- }, a => a.RoomNo == roomno && a.SpendTime >= Convert.ToDateTime(checktime) && a.SpendTime <= DateTime.Now);
+ }, a => a.RoomNo == roomno && a.SpendTime >= Convert.ToDateTime(checktime) && a.SpendTime <= Convert.ToDateTime(DateTime.Now));
}
#endregion
@@ -225,8 +225,8 @@ namespace EOM.TSHotelManager.Application
{
RoomNo = spend.RoomNo,
datachg_usr = spend.datachg_usr
- }, a => listSpendId.Contains(a.SpendName) && a.CustoNo.Equals(spend.CustoNo) && a.SpendTime >= DateTime.Now
- && a.SpendTime <= DateTime.Now);
+ }, a => listSpendId.Contains(a.SpendName) && a.CustoNo.Equals(spend.CustoNo) && a.SpendTime >= Convert.ToDateTime(DateTime.Now)
+ && a.SpendTime <= Convert.ToDateTime(DateTime.Now));
}
diff --git a/EOM.TSHotelManager.Application/EOM.TSHotelManager.Application.csproj b/EOM.TSHotelManager.Application/EOM.TSHotelManager.Application.csproj
index 044ad9c25b27ca3ce1151ab1190d11f2d7128097..bd07851d69b2d5d3d913ba04962675aaf4f4370b 100644
--- a/EOM.TSHotelManager.Application/EOM.TSHotelManager.Application.csproj
+++ b/EOM.TSHotelManager.Application/EOM.TSHotelManager.Application.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
enable
disable
True
diff --git a/EOM.TSHotelManager.Application/Worker/Check/WorkerCheckService.cs b/EOM.TSHotelManager.Application/Worker/Check/WorkerCheckService.cs
index 6d4eda1612c1de76a6f9a971576bdc046bd327d3..858aabfc5e243842030cec10469c7e13c62c0a40 100644
--- a/EOM.TSHotelManager.Application/Worker/Check/WorkerCheckService.cs
+++ b/EOM.TSHotelManager.Application/Worker/Check/WorkerCheckService.cs
@@ -82,7 +82,7 @@ namespace EOM.TSHotelManager.Application
{
//string sql = "select Count(*) from WORKERCHECK where WorkerNo = '"+wkn+ "' and DATEDIFF(CURRENT_DATE(),workercheck.CheckTime)";
var listCheckInfo = workerCheckRepository.GetList(a => a.WorkerNo == wkn && a.delete_mk != 1);
- var count = listCheckInfo.Where(a => a.CheckTime.ToShortDateString() == DateTime.Now.ToShortDateString()).Count() > 0 ? 1 : 0;
+ var count = listCheckInfo.Where(a => a.CheckTime.ToShortDateString() == Convert.ToDateTime(DateTime.Now).ToShortDateString()).Count() > 0 ? 1 : 0;
return count;
}
diff --git a/EOM.TSHotelManager.Application/Worker/WorkerService.cs b/EOM.TSHotelManager.Application/Worker/WorkerService.cs
index 4720319ef07dd45ccd92447d2d01d3ad47c8f914..eefbdcc870dc4fee717416e08816e912c4462270 100644
--- a/EOM.TSHotelManager.Application/Worker/WorkerService.cs
+++ b/EOM.TSHotelManager.Application/Worker/WorkerService.cs
@@ -341,7 +341,7 @@ namespace EOM.TSHotelManager.Application
{
new Claim(ClaimTypes.Name, w.WorkerId)
}),
- Expires = DateTime.Now.AddMinutes(20), // 设置Token过期时间
+ Expires = Convert.ToDateTime(DateTime.Now).AddMinutes(20), // 设置Token过期时间
SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature),
Audience = configuration["Jwt:Audience"],
Issuer = configuration["Jwt:Issuer"]
diff --git a/EOM.TSHotelManager.Application/Zero/Admin/AdminService.cs b/EOM.TSHotelManager.Application/Zero/Admin/AdminService.cs
index 0f686b9f1bb7b8ab7adc13c42d99ace1448ee61b..ce281ad91c99b0ffcdcd94c5929394169ecb883a 100644
--- a/EOM.TSHotelManager.Application/Zero/Admin/AdminService.cs
+++ b/EOM.TSHotelManager.Application/Zero/Admin/AdminService.cs
@@ -111,7 +111,7 @@ namespace EOM.TSHotelManager.Application
{
new Claim(ClaimTypes.Name, admins.AdminAccount)
}),
- Expires = DateTime.Now.AddMinutes(20), // 设置Token过期时间
+ Expires = Convert.ToDateTime(DateTime.Now).AddMinutes(20), // 设置Token过期时间
SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature),
Audience = configuration["Jwt:Audience"],
Issuer = configuration["Jwt:Issuer"]
diff --git a/EOM.TSHotelManager.Common.Core/BaseDTO.cs b/EOM.TSHotelManager.Common.Core/BaseDTO.cs
index b9692b7c82debfb4752ee3ae71c4bb8426f433fa..a27de00552d03a3193e1dd091ac39bff91ae353a 100644
--- a/EOM.TSHotelManager.Common.Core/BaseDTO.cs
+++ b/EOM.TSHotelManager.Common.Core/BaseDTO.cs
@@ -1,4 +1,5 @@
-using System;
+using EOM.TSHotelManager.Common.Util;
+using System;
namespace EOM.TSHotelManager.Common.Core
{
@@ -12,8 +13,8 @@ namespace EOM.TSHotelManager.Common.Core
///
/// 资料创建时间
///
- [SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true)]
- public DateTime? datains_date { get; set; } = DateTime.Now;
+ [SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true,InsertServerTime = true)]
+ public DateTime? datains_date { get; set; }
///
/// 资料更新人
///
@@ -22,8 +23,8 @@ namespace EOM.TSHotelManager.Common.Core
///
/// 资料更新时间
///
- [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true)]
- public DateTime? datachg_date { get; set; } = DateTime.Now;
+ [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true, InsertServerTime = true)]
+ public DateTime? datachg_date { get; set; }
///
/// Token
///
diff --git a/EOM.TSHotelManager.Common.Core/Business/Wti/Wti.cs b/EOM.TSHotelManager.Common.Core/Business/HydroelectricPower/HydroelectricPower.cs
similarity index 98%
rename from EOM.TSHotelManager.Common.Core/Business/Wti/Wti.cs
rename to EOM.TSHotelManager.Common.Core/Business/HydroelectricPower/HydroelectricPower.cs
index b9608cdefca4c99f393a3ba1429d629728a68b3c..cf56246a68a0e12a4d184c79690d606f3e2610ca 100644
--- a/EOM.TSHotelManager.Common.Core/Business/Wti/Wti.cs
+++ b/EOM.TSHotelManager.Common.Core/Business/HydroelectricPower/HydroelectricPower.cs
@@ -30,7 +30,7 @@ namespace EOM.TSHotelManager.Common.Core
/// 水电信息
///
[SqlSugar.SugarTable("wtinfo")]
- public class Wti : BaseDTO
+ public class HydroelectricPower : BaseDTO
{
///
/// 信息编号
diff --git a/EOM.TSHotelManager.Common.Core/EOM.TSHotelManager.Common.Core.csproj b/EOM.TSHotelManager.Common.Core/EOM.TSHotelManager.Common.Core.csproj
index 227c02999b35e475cdfbe265142ebada4b69c3e8..92a390b95294885ca957759f2a21e23403707bfe 100644
--- a/EOM.TSHotelManager.Common.Core/EOM.TSHotelManager.Common.Core.csproj
+++ b/EOM.TSHotelManager.Common.Core/EOM.TSHotelManager.Common.Core.csproj
@@ -1,12 +1,12 @@
- netstandard2.0
+ net8.0
True
-
+
diff --git a/EOM.TSHotelManager.Common.Util/EOM.TSHotelManager.Common.Util.csproj b/EOM.TSHotelManager.Common.Util/EOM.TSHotelManager.Common.Util.csproj
index dbdcea46b6e2047549bb86fc8f27032d25c0611f..ae2821edbb520b6fc56afc7a6e4bae1f7d5aa1ed 100644
--- a/EOM.TSHotelManager.Common.Util/EOM.TSHotelManager.Common.Util.csproj
+++ b/EOM.TSHotelManager.Common.Util/EOM.TSHotelManager.Common.Util.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ net8.0
diff --git a/EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj b/EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj
index e5fbd4a5e0958ecdcee390824bd9aa1b99a64f07..8e101075188e4482d11f1018d59eedff39f440e4 100644
--- a/EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj
+++ b/EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj
@@ -1,15 +1,15 @@
- net6.0
+ net8.0
enable
disable
-
-
-
+
+
+
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Wti/WtiController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/HydroelectricPower/HydroelectricPowerController.cs
similarity index 60%
rename from EOM.TSHotelManager.WebApi/Controllers/Business/Wti/WtiController.cs
rename to EOM.TSHotelManager.WebApi/Controllers/Business/HydroelectricPower/HydroelectricPowerController.cs
index d83cc81c909d8e451dcc5fab79ebdcaf87c53fea..68d2e9da4dd4a610f85e57a4605d93f33e024f21 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Business/Wti/WtiController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Business/HydroelectricPower/HydroelectricPowerController.cs
@@ -8,20 +8,20 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
/// 水电信息控制器
///
- public class WtiController : ControllerBase
+ public class HydroelectricPowerController : ControllerBase
{
///
/// 水电信息
///
- private readonly IWtiService wtiService;
+ private readonly IHydroelectricPowerService hydroelectricPowerService;
///
///
///
- ///
- public WtiController(IWtiService wtiService)
+ ///
+ public HydroelectricPowerController(IHydroelectricPowerService hydroelectricPowerService)
{
- this.wtiService = wtiService;
+ this.hydroelectricPowerService = hydroelectricPowerService;
}
///
@@ -30,9 +30,9 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Wti SelectWtiInfoByRoomNo([FromQuery] string roomNo)
+ public HydroelectricPower SelectWtiInfoByRoomNo([FromQuery] string roomNo)
{
- return this.wtiService.SelectWtiInfoByRoomNo(roomNo);
+ return this.hydroelectricPowerService.SelectWtiInfoByRoomNo(roomNo);
}
///
@@ -43,9 +43,9 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Wti SelectWtiInfoByRoomNoAndTime([FromQuery] string roomno, string usedate, string enddate)
+ public HydroelectricPower SelectWtiInfoByRoomNoAndTime([FromQuery] string roomno, string usedate, string enddate)
{
- return this.wtiService.SelectWtiInfoByRoomNoAndTime(roomno, usedate, enddate);
+ return this.hydroelectricPowerService.SelectWtiInfoByRoomNoAndTime(roomno, usedate, enddate);
}
///
@@ -53,9 +53,9 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectWtiInfoAll()
+ public List SelectWtiInfoAll()
{
- return this.wtiService.SelectWtiInfoAll();
+ return this.hydroelectricPowerService.SelectWtiInfoAll();
}
///
@@ -64,9 +64,9 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool InsertWtiInfo([FromBody] Wti w)
+ public bool InsertWtiInfo([FromBody] HydroelectricPower w)
{
- return this.wtiService.InsertWtiInfo(w);
+ return this.hydroelectricPowerService.InsertWtiInfo(w);
}
///
@@ -75,9 +75,9 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdateWtiInfo([FromBody] Wti w)
+ public bool UpdateWtiInfo([FromBody] HydroelectricPower w)
{
- return this.wtiService.UpdateWtiInfo(w);
+ return this.hydroelectricPowerService.UpdateWtiInfo(w);
}
///
@@ -86,18 +86,11 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdateWtiInfoByRoomNoAndDateTime([FromBody] Wti w)
+ public bool UpdateWtiInfoByRoomNoAndDateTime([FromBody] HydroelectricPower w)
{
- return this.wtiService.UpdateWtiInfoByRoomNoAndDateTime(w);
+ return this.hydroelectricPowerService.UpdateWtiInfoByRoomNoAndDateTime(w);
}
- ///
- /// 删除水电费信息:根据房间编号
- ///
- ///
- ///
- //bool DeleteWtiInfo(string roomno);
-
///
/// 根据房间编号、使用时间删除水电费信息
///
@@ -108,7 +101,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
[HttpPost]
public bool DeleteWtiInfoByRoomNoAndDateTime([FromBody] string roomno, string usedate, string enddate)
{
- return this.wtiService.DeleteWtiInfoByRoomNoAndDateTime(roomno, usedate, enddate);
+ return this.hydroelectricPowerService.DeleteWtiInfoByRoomNoAndDateTime(roomno, usedate, enddate);
}
///
@@ -116,9 +109,9 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List ListWtiInfoByRoomNo([FromQuery] string roomno)
+ public List ListWtiInfoByRoomNo([FromQuery] string roomno)
{
- return this.wtiService.ListWtiInfoByRoomNo(roomno);
+ return this.hydroelectricPowerService.ListWtiInfoByRoomNo(roomno);
}
}
diff --git a/EOM.TSHotelManager.WebApi/Dockerfile b/EOM.TSHotelManager.WebApi/Dockerfile
new file mode 100644
index 0000000000000000000000000000000000000000..be8936f5ef2309097f754fcd3770a580a652d6d5
--- /dev/null
+++ b/EOM.TSHotelManager.WebApi/Dockerfile
@@ -0,0 +1,28 @@
+#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
+
+FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
+USER app
+WORKDIR /app
+EXPOSE 8080
+
+FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
+ARG BUILD_CONFIGURATION=Release
+WORKDIR /src
+COPY ["topsky-hotel-manager-system-web-api/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj", "topsky-hotel-manager-system-web-api/EOM.TSHotelManager.WebApi/"]
+COPY ["topsky-hotel-manager-system-web-api/EOM.TSHotelManager.Application/EOM.TSHotelManager.Application.csproj", "topsky-hotel-manager-system-web-api/EOM.TSHotelManager.Application/"]
+COPY ["topsky-hotel-manager-system-web-api/EOM.TSHotelManager.Common.Core/EOM.TSHotelManager.Common.Core.csproj", "topsky-hotel-manager-system-web-api/EOM.TSHotelManager.Common.Core/"]
+COPY ["topsky-hotel-manager-system-web-api/EOM.TSHotelManager.Common.Util/EOM.TSHotelManager.Common.Util.csproj", "topsky-hotel-manager-system-web-api/EOM.TSHotelManager.Common.Util/"]
+COPY ["topsky-hotel-manager-system-web-api/EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj", "topsky-hotel-manager-system-web-api/EOM.TSHotelManager.EntityFramework/"]
+RUN dotnet restore "./topsky-hotel-manager-system-web-api/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj"
+COPY . .
+WORKDIR "/src/topsky-hotel-manager-system-web-api/EOM.TSHotelManager.WebApi"
+RUN dotnet build "./EOM.TSHotelManager.WebApi.csproj" -c $BUILD_CONFIGURATION -o /app/build
+
+FROM build AS publish
+ARG BUILD_CONFIGURATION=Release
+RUN dotnet publish "./EOM.TSHotelManager.WebApi.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
+
+FROM base AS final
+WORKDIR /app
+COPY --from=publish /app/publish .
+ENTRYPOINT ["dotnet", "EOM.TSHotelManager.WebApi.dll"]
\ No newline at end of file
diff --git a/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj b/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj
index 76e1b89170b601205e1647fe5d32e110227aa2bd..5788c18e34a846e9e0304570b4154eaf4622a079 100644
--- a/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj
+++ b/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
EOM.TSHotelManager.WebApi.Program
True
Linux
@@ -25,18 +25,12 @@
-
-
-
-
-
-
diff --git a/EOM.TSHotelManager.WebApi/Startup.cs b/EOM.TSHotelManager.WebApi/Startup.cs
index cceb591bea9a51f00b744661d3d7c16abe4a5b78..7e775f8153ac3dceddbe1a052a0de607a2df5813 100644
--- a/EOM.TSHotelManager.WebApi/Startup.cs
+++ b/EOM.TSHotelManager.WebApi/Startup.cs
@@ -65,6 +65,7 @@ namespace EOM.TSHotelManager.WebApi
services.AddControllers(options =>
{
options.Conventions.Add(new AuthorizeAllControllersConvention());
+ options.RespectBrowserAcceptHeader = true; // ѭAcceptͷ
}).AddNewtonsoftJson(opt =>
{
//ʱʽӦ
@@ -88,7 +89,7 @@ namespace EOM.TSHotelManager.WebApi
{
Title = "EOM.TSHotelManager.Web", //Swaggerĵ
Version = "version-1.0.0", //Swaggerĵİ汾
- Description = "ӿĵ", //Swaggerĵ
+ Description = "Api Document", //Swaggerĵ
License = new OpenApiLicense()
{
Name = "MIT",
@@ -97,7 +98,7 @@ namespace EOM.TSHotelManager.WebApi
TermsOfService = new Uri("https://www.oscode.top/"), //Swaggerĵķ֧ҳ
Contact = new OpenApiContact
{
- Name = "Ԫ(Easy-Open-Meta)",
+ Name = "Easy-Open-Meta",
Email = "eom-official@oscode.top",
Url = new Uri("https://www.oscode.top/")
}
@@ -143,7 +144,7 @@ namespace EOM.TSHotelManager.WebApi
app.UseSwagger();
app.UseSwaggerUI(s =>
{
- s.SwaggerEndpoint("/swagger/v1/swagger.json", "EOM.TSHotelManagerӿĵ");
+ s.SwaggerEndpoint("/swagger/v1/swagger.json", "EOM.TSHotelManager Api Document");
});
#endregion
diff --git a/EOM.TSHotelManager.WebApi/appsettings.json b/EOM.TSHotelManager.WebApi/appsettings.json
index 87bf62242f6631dece8fcd1969d456369532c1fb..8f157e643cac2b1ea842a28d5939b99017b5246a 100644
--- a/EOM.TSHotelManager.WebApi/appsettings.json
+++ b/EOM.TSHotelManager.WebApi/appsettings.json
@@ -6,13 +6,13 @@
"Microsoft.Hosting.Lifetime": "Information"
}
},
- "ConnectionStrings": {
- "PgSqlConnectStr": "Host=.;Port=5432;Username=postgres;Password=.;Database=tshoteldb;"
- },
+ "ConnectionStrings": {
+ "PgSqlConnectStr": "Host=.;Port=5432;Username=postgres;Password=.;Database=tshoteldb;"
+ },
"AllowedHosts": "*",
- "Jwt": {
- "Key": ".",
- "Issuer": ".",
- "Audience": "."
- }
+ "Jwt": {
+ "Key": "",
+ "Issuer": "",
+ "Audience": ""
+ }
}
diff --git a/Library/Library.csproj b/Library/Library.csproj
index 38587f2876fc062b3e9d82e3fcce26024b7a620f..15ac1028dd1559520530184822cf6ae574217326 100644
--- a/Library/Library.csproj
+++ b/Library/Library.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
enable
disable
diff --git a/README.en.md b/README.en.md
index 347c4191d4fc9a9a17e2962844749c6c83013846..2bd05a3f8af93521154e134c923c601650f0785a 100644
--- a/README.en.md
+++ b/README.en.md
@@ -20,10 +20,11 @@
### :exclamation: About this project:
+**Note: The Net8-breaking branch is currently in an unstable phase. If you wish to experience the program, please do not pull this branch as it has many issues at the moment.**
+
This project is a TS hotel management system backend API project built on .Net6, mainly for the 2.0 upgrade, welcome to Star & Fork.
1. All development should comply with the MIT open source license.
-
2. If you find bugs, feel free to raise an issue!
### :thought_balloon: Development purpose:
diff --git a/README.md b/README.md
index 8ec8c087f6596badf0e73d30e0df61fb68892ee8..b084330eff8bd6f74e9aced56dd14a57a5c45a94 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,8 @@
### :exclamation: 本项目介绍:
+**注意:目前Net8-breaking分支处于不稳定阶段,如果你是想体验程序,请不要拉取此分支,因为目前该分支运行存在诸多问题**
+
本项目是基于.Net6构建的TS酒店管理系统后端API项目,主要用于2.0升级所用,欢迎Start&Fork
1、一切开发请遵照MIT开源协议进行。
diff --git a/topsky-hotel-manager-system-web-api.tar b/topsky-hotel-manager-system-web-api.tar
new file mode 100644
index 0000000000000000000000000000000000000000..9c9208a4f0f80039301cdda7b75376b0d51cb6db
Binary files /dev/null and b/topsky-hotel-manager-system-web-api.tar differ