diff --git a/EOM.TSHotelManager.Application/Business/Customer/CustoService.cs b/EOM.TSHotelManager.Application/Business/Customer/CustoService.cs index 70ae768817bb2d2f42f43b942734f75026077b5f..88a4ecb3a776f195a5e01f0f23d199099d67e0f4 100644 --- a/EOM.TSHotelManager.Application/Business/Customer/CustoService.cs +++ b/EOM.TSHotelManager.Application/Business/Customer/CustoService.cs @@ -30,6 +30,7 @@ using EOM.Encrypt; using EOM.TSHotelManager.Core; using EOM.TSHotelManager.EntityFramework; using Npgsql; +using SqlSugar; namespace EOM.TSHotelManager.Application { @@ -95,8 +96,8 @@ namespace EOM.TSHotelManager.Application /// public bool InsertCustomerInfo(Custo custo) { - string? NewID = encrypt.Encryption(custo.CustoID); - string? NewTel = encrypt.Encryption(custo.CustoTel); + string? NewID = encrypt.Encryption(custo.CustoID,EncryptionLevel.Enhanced); + string? NewTel = encrypt.Encryption(custo.CustoTel, EncryptionLevel.Enhanced); custo.CustoID = NewID; custo.CustoTel = NewTel; return custoRepository.Insert(custo); @@ -154,11 +155,11 @@ namespace EOM.TSHotelManager.Application var listDates = new List(); listSource.ForEach(source => { - var year = source.SpendTime.ToString("yyyy"); + var year = Convert.ToDateTime(source.SpendTime).ToString("yyyy"); if (!custoSpends.Select(a => a.Years).ToList().Contains(year)) { - var startDate = new DateTime(source.SpendTime.Year, 1, 1, 0, 0, 0); - var endDate = new DateTime(source.SpendTime.Year, 12, 31, 23, 59, 59); + var startDate = new DateTime(Convert.ToDateTime(source.SpendTime).Year, 1, 1, 0, 0, 0); + var endDate = new DateTime(Convert.ToDateTime(source.SpendTime).Year, 12, 31, 23, 59, 59); custoSpends.Add(new CustoSpend { Years = year, @@ -175,12 +176,10 @@ namespace EOM.TSHotelManager.Application /// 查询所有客户信息 /// /// - public OSelectCustoAllDto SelectCustoAll(int? pageIndex,int? pageSize) + public OSelectCustoAllDto SelectCustoAll(SelectCustoAll selectCustoAll) { OSelectCustoAllDto oSelectCustoAllDto = new OSelectCustoAllDto(); - var count = 0; - //查询出所有性别类型 List sexTypes = new List(); sexTypes = sexTypeRepository.GetList(); @@ -193,13 +192,34 @@ namespace EOM.TSHotelManager.Application //查询出所有客户信息 List custos = new List(); - if (!pageIndex.IsNullOrEmpty() && !pageSize.IsNullOrEmpty()) + var where = Expressionable.Create(); + + where = where.And(a => a.delete_mk != 1); + + if (!selectCustoAll.CustoNo.IsNullOrEmpty()) + { + where = where.And(a => a.CustoNo.Contains(selectCustoAll.CustoNo)); + } + if (!selectCustoAll.CustoName.IsNullOrEmpty()) { - custos = custoRepository.AsQueryable().ToPageList((int)pageIndex, (int)pageSize,ref count).OrderBy(a => a.CustoNo).ToList(); + where = where.And(a => a.CustoName.Contains(selectCustoAll.CustoName)); + } + if (!selectCustoAll.delete_mk.IsNullOrEmpty()) + { + where = where.And(a => a.delete_mk == selectCustoAll.delete_mk); + } + + var count = 0; + if (!selectCustoAll.pageIndex.IsNullOrEmpty() && !selectCustoAll.pageSize.IsNullOrEmpty()) + { + custos = custoRepository.GetPageList(where.ToExpression(), + new PageModel { TotalCount = count, PageIndex = (int)selectCustoAll.pageIndex - 1, PageSize = (int)selectCustoAll.pageSize }); + count = custoRepository.Count(where.ToExpression()); } else { - custos = custoRepository.AsQueryable().OrderBy(a => a.CustoNo).ToList(); + custos = custoRepository.GetList(where.ToExpression()).OrderByDescending(a => a.datains_date).ToList(); + count = custos.Count(); } custos.ForEach(source => @@ -221,8 +241,9 @@ namespace EOM.TSHotelManager.Application source.typeName = string.IsNullOrEmpty(custoType.TypeName) ? "" : custoType.TypeName; }); - oSelectCustoAllDto.custos = custos; + oSelectCustoAllDto.listSource = custos; oSelectCustoAllDto.total = count; + return oSelectCustoAllDto; } diff --git a/EOM.TSHotelManager.Application/Business/Customer/ICustoService.cs b/EOM.TSHotelManager.Application/Business/Customer/ICustoService.cs index d1f758ff81144b6a7842a5ab0b2026f84a0651b8..75b95ec271dcfbed31a56d22e8d7ff90ee08c5f1 100644 --- a/EOM.TSHotelManager.Application/Business/Customer/ICustoService.cs +++ b/EOM.TSHotelManager.Application/Business/Customer/ICustoService.cs @@ -63,7 +63,7 @@ namespace EOM.TSHotelManager.Application /// 查询所有客户信息 /// /// - OSelectCustoAllDto SelectCustoAll(int? pageIndex, int? pageSize); + OSelectCustoAllDto SelectCustoAll(SelectCustoAll selectCustoAll); /// /// 查询指定客户信息 diff --git a/EOM.TSHotelManager.Application/Business/Customer/OSelectCustoAllDto.cs b/EOM.TSHotelManager.Application/Business/Customer/OSelectCustoAllDto.cs index 4b7ae137c2988a14e61437edb666f0f73accc30b..d0242e25bbf3598e3d4218da306fbfef6bf0b9a0 100644 --- a/EOM.TSHotelManager.Application/Business/Customer/OSelectCustoAllDto.cs +++ b/EOM.TSHotelManager.Application/Business/Customer/OSelectCustoAllDto.cs @@ -34,7 +34,7 @@ namespace EOM.TSHotelManager.Application /// /// 数据源 /// - public List custos { get; set; } + public List listSource { get; set; } /// /// 总数 diff --git a/EOM.TSHotelManager.Application/Business/Customer/SelectCustoAll.cs b/EOM.TSHotelManager.Application/Business/Customer/SelectCustoAll.cs new file mode 100644 index 0000000000000000000000000000000000000000..35e3dee746429e04190324f1f6c3d71bba2ce742 --- /dev/null +++ b/EOM.TSHotelManager.Application/Business/Customer/SelectCustoAll.cs @@ -0,0 +1,53 @@ +/* + * MIT License + *Copyright (c) 2021 易开元(Easy-Open-Meta) + + *Permission is hereby granted, free of charge, to any person obtaining a copy + *of this software and associated documentation files (the "Software"), to deal + *in the Software without restriction, including without limitation the rights + *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + *copies of the Software, and to permit persons to whom the Software is + *furnished to do so, subject to the following conditions: + + *The above copyright notice and this permission notice shall be included in all + *copies or substantial portions of the Software. + + *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + *SOFTWARE. + * + */ +namespace EOM.TSHotelManager.Application +{ + /// + /// 查询所有客户信息 + /// 输入DTO + /// + public class SelectCustoAll + { + /// + /// 删除标记 + /// + public int? delete_mk { get; set; } + /// + /// 用户编号 + /// + public string? CustoNo { get; set; } + /// + /// 用户名字 + /// + public string? CustoName { get; set; } + /// + /// 当前页数 + /// + public int? pageIndex { get; set; } + /// + /// 当前页总数 + /// + public int? pageSize { get; set; } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManager.Application/Business/Reser/IReserService.cs b/EOM.TSHotelManager.Application/Business/Reser/IReserService.cs index 9152c52d18111418b62b074158f5fd491f478845..16293c34e9cf142c1ee7b9ff4ed9840d468781a1 100644 --- a/EOM.TSHotelManager.Application/Business/Reser/IReserService.cs +++ b/EOM.TSHotelManager.Application/Business/Reser/IReserService.cs @@ -48,9 +48,9 @@ namespace EOM.TSHotelManager.Application /// /// 删除预约信息 /// - /// + /// /// - bool DeleteReserInfo(string? rid); + bool DeleteReserInfo(Reser reser); /// /// 添加预约信息 diff --git a/EOM.TSHotelManager.Application/Business/Reser/ReserService.cs b/EOM.TSHotelManager.Application/Business/Reser/ReserService.cs index 1870d2d1601b630a6a182801484c5a3f80babe69..a005a6ac5032ee11ca8ef77b3b11c2b9990164b2 100644 --- a/EOM.TSHotelManager.Application/Business/Reser/ReserService.cs +++ b/EOM.TSHotelManager.Application/Business/Reser/ReserService.cs @@ -90,16 +90,16 @@ namespace EOM.TSHotelManager.Application /// /// 删除预约信息 /// - /// + /// /// - public bool DeleteReserInfo(string? rid) + public bool DeleteReserInfo(Reser reser) { return reserRepository.Update(a => new Reser() { delete_mk = 1, datachg_usr = string.Empty, datachg_date = DateTime.Now - },a => a.ReserId == rid); + },a => a.ReserId == reser.ReserId); } diff --git a/EOM.TSHotelManager.Application/Business/Spend/ISpendService.cs b/EOM.TSHotelManager.Application/Business/Spend/ISpendService.cs index 4bd0852015c4e87e03f27f88baa262e1e1fa8056..7152fc8e98c6d69f435ecdea5d3a83c8cc3c1342 100644 --- a/EOM.TSHotelManager.Application/Business/Spend/ISpendService.cs +++ b/EOM.TSHotelManager.Application/Business/Spend/ISpendService.cs @@ -22,6 +22,7 @@ * */ using EOM.TSHotelManager.Core; +using System; using System.Collections.Generic; namespace EOM.TSHotelManager.Application @@ -107,11 +108,9 @@ namespace EOM.TSHotelManager.Application /// /// 将转房前的未结算记录一同转移到新房间 /// - /// - /// - /// + /// /// - bool UpdateSpendInfoByRoomNo(List spends, string? newRoom, string? custoNo); + bool UpdateSpendInfoByRoomNo(Spend spend); #endregion /// diff --git a/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs b/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs index 87c8289381e8ddd60510340fe90ff0d275baf79d..fc92da3258e93fd8bee06725f9052bbf15866319 100644 --- a/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs +++ b/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs @@ -218,20 +218,20 @@ namespace EOM.TSHotelManager.Application /// /// 将转房前的未结算记录一同转移到新房间 /// - /// - /// - /// + /// /// - public bool UpdateSpendInfoByRoomNo(List spends, string? newRoom, string? custoNo) + public bool UpdateSpendInfoByRoomNo(Spend spend) { - var listSpendId = spends.Select(a => a.SpendName).Distinct().ToList(); + //查询当前用户未结算的数据 + var listSpendId = spendRepository.GetList(a => a.CustoNo.Equals(spend.CustoNo) && a.MoneyState.Equals(SpendConsts.UnSettle)) + .Select(a => a.SpendName).ToList(); /*spends.Select(a => a.SpendName).Distinct().ToList();*/ return spendRepository.Update(a => new Spend() { - RoomNo = newRoom, + RoomNo = spend.RoomNo, datachg_usr = string.Empty, datachg_date = DateTime.Now - }, a => listSpendId.Contains(a.RoomNo) && a.CustoNo == custoNo && a.MoneyState.Equals(SpendConsts.UnSettle) && a.SpendTime >= DateTime.Now + }, a => listSpendId.Contains(a.SpendName) && a.CustoNo.Equals(spend.CustoNo) && a.SpendTime >= DateTime.Now && a.SpendTime <= DateTime.Now); diff --git a/EOM.TSHotelManager.Application/Util/IUtilService.cs b/EOM.TSHotelManager.Application/Util/IUtilService.cs index d830e4db1d04a41590cdd4cd9a7aa31a1725ad46..1495c51880158ef3bca389eb9b8763f1685995e9 100644 --- a/EOM.TSHotelManager.Application/Util/IUtilService.cs +++ b/EOM.TSHotelManager.Application/Util/IUtilService.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManager.Application /// /// /// - bool InsertOperationLog(OperationLog opr); + bool AddLog(OperationLog opr); /// /// 查询所有操作日志 diff --git a/EOM.TSHotelManager.Application/Util/UtilService.cs b/EOM.TSHotelManager.Application/Util/UtilService.cs index 97be8dc153c8e8e9f1e85a6e8000c4591f619299..6c711d5a0843a4793e2b2966374c3e5035fd9984 100644 --- a/EOM.TSHotelManager.Application/Util/UtilService.cs +++ b/EOM.TSHotelManager.Application/Util/UtilService.cs @@ -69,7 +69,7 @@ namespace EOM.TSHotelManager.Application /// /// /// - public bool InsertOperationLog(OperationLog opr) + public bool AddLog(OperationLog opr) { return operationLogRepository.Insert(opr); } diff --git a/EOM.TSHotelManager.Application/Worker/Picture/WorkerPicService.cs b/EOM.TSHotelManager.Application/Worker/Picture/WorkerPicService.cs index 0d9d3ea228d502b78a9cd053c40114b094b68cc4..ae42b8b095aec90a87830371fe7f9fe5ac148d05 100644 --- a/EOM.TSHotelManager.Application/Worker/Picture/WorkerPicService.cs +++ b/EOM.TSHotelManager.Application/Worker/Picture/WorkerPicService.cs @@ -1,4 +1,5 @@ -using EOM.Encrypt; +using CK.Common; +using EOM.Encrypt; using EOM.TSHotelManager.Core; using EOM.TSHotelManager.EntityFramework; using System; @@ -47,11 +48,8 @@ namespace EOM.TSHotelManager.Application workerPicSource = workerPicRepository.GetSingle(a => a.WorkerId.Equals(workerPic.WorkerId)); - if (workerPicSource != null) - { - workerPicSource.Pic = workerPicSource == null || string.IsNullOrEmpty(workerPicSource.Pic) ? "" : workerPicSource.Pic; - } - + //workerPicSource.Pic = workerPicSource == null || string.IsNullOrEmpty(workerPicSource.Pic) ? "" : workerPicSource.Pic; + return workerPicSource; } /// diff --git a/EOM.TSHotelManager.Application/Zero/Base/BaseService.cs b/EOM.TSHotelManager.Application/Zero/Base/BaseService.cs index d80e129aa7ecedd1bda3e6e6d894f01144e0efab..b66e5baada8e821ae7623b50c7c640afbd09fa22 100644 --- a/EOM.TSHotelManager.Application/Zero/Base/BaseService.cs +++ b/EOM.TSHotelManager.Application/Zero/Base/BaseService.cs @@ -480,6 +480,10 @@ namespace EOM.TSHotelManager.Application /// public bool DelDept(Dept dept) { + if (dept.IsNullOrEmpty()) + { + return false; + } return deptRepository.Update(a => new Dept() { delete_mk = 1, diff --git a/EOM.TSHotelManager.Application/Zero/Notice/INoticeService.cs b/EOM.TSHotelManager.Application/Zero/Notice/INoticeService.cs index 4404560bf2cc5aa1ca94c2496f565ab59508c091..24a4cfdb49f2261150edadeb4ba211f3e6d1e380 100644 --- a/EOM.TSHotelManager.Application/Zero/Notice/INoticeService.cs +++ b/EOM.TSHotelManager.Application/Zero/Notice/INoticeService.cs @@ -39,6 +39,13 @@ namespace EOM.TSHotelManager.Application List SelectNoticeAll(); #endregion + /// + /// 查询公告 + /// + /// + /// + Notice SelectNoticeByNoticeNo(string noticeId); + #region 上传公告信息 /// /// 上传公告信息 diff --git a/EOM.TSHotelManager.Application/Zero/Notice/NoticeService.cs b/EOM.TSHotelManager.Application/Zero/Notice/NoticeService.cs index 159e2ef8db30d2671c12abd11dcd0977ca52a3ad..279c1af713eba846985fd6657f93687b12e59e6a 100644 --- a/EOM.TSHotelManager.Application/Zero/Notice/NoticeService.cs +++ b/EOM.TSHotelManager.Application/Zero/Notice/NoticeService.cs @@ -75,12 +75,12 @@ namespace EOM.TSHotelManager.Application /// /// 根据公告编号查找公告信息 /// - /// + /// /// - public Notice SelectNoticeByNoticeNo(string? NoticeNo) + public Notice SelectNoticeByNoticeNo(string? noticeId) { Notice notice = new Notice(); - notice = noticeRepository.GetSingle(a => a.NoticeNo == NoticeNo); + notice = noticeRepository.GetSingle(a => a.NoticeNo == noticeId); switch (notice.NoticeType) { case "PersonnelChanges": diff --git a/EOM.TSHotelManager.Core/Business/Cash/Cash.cs b/EOM.TSHotelManager.Core/Business/Cash/Cash.cs index e564b21f799f096ab7a4456ff5bafface9af2ec4..e1b9919013a663e1f98b40d7069ac7254d954a8c 100644 --- a/EOM.TSHotelManager.Core/Business/Cash/Cash.cs +++ b/EOM.TSHotelManager.Core/Business/Cash/Cash.cs @@ -60,7 +60,7 @@ namespace EOM.TSHotelManager.Core /// /// 入库时间 /// - public DateTime CashTime { get; set; } + public DateTime? CashTime { get; set; } /// /// 资产来源 /// diff --git a/EOM.TSHotelManager.Core/Business/Customer/Custo.cs b/EOM.TSHotelManager.Core/Business/Customer/Custo.cs index 91334f001d6e2901c7a6752173c0d277efb52c2c..f2105eb1be3dc66d7fe169278813536267357e9f 100644 --- a/EOM.TSHotelManager.Core/Business/Customer/Custo.cs +++ b/EOM.TSHotelManager.Core/Business/Customer/Custo.cs @@ -32,10 +32,15 @@ namespace EOM.TSHotelManager.Core [SqlSugar.SugarTable("customer")] public class Custo { + /// + /// 自增ID + /// + //[SqlSugar.SugarColumn(ColumnName = "id", IsPrimaryKey = true,IsIdentity = true)] + //public int Id { get; set; } /// /// 客户编号 /// - [SqlSugar.SugarColumn(ColumnName = "custo_no",IsPrimaryKey = true)] + [SqlSugar.SugarColumn(ColumnName = "custo_no", IsPrimaryKey = true)] public string? CustoNo { get; set; } /// /// 客户名称 @@ -71,7 +76,7 @@ namespace EOM.TSHotelManager.Core /// 出生日期 /// [SqlSugar.SugarColumn(ColumnName = "custo_birth", IsNullable = true)] - public DateTime CustoBirth { get; set; } + public DateTime? CustoBirth { get; set; } /// /// 客户类型 /// @@ -103,7 +108,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -111,7 +116,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Business/Customer/CustoType.cs b/EOM.TSHotelManager.Core/Business/Customer/CustoType.cs index b89c3b99f6c8fc47a04161a804584950a46e031e..d1b5de1db9c153ec28d52f3c1e266fa03264dbc3 100644 --- a/EOM.TSHotelManager.Core/Business/Customer/CustoType.cs +++ b/EOM.TSHotelManager.Core/Business/Customer/CustoType.cs @@ -51,7 +51,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -59,6 +59,6 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Business/Customer/PassPortType.cs b/EOM.TSHotelManager.Core/Business/Customer/PassPortType.cs index f05a9c410b5ec5e0d8bca55152420441e8148df1..f9760dc8a79b1e81898f30fdd9e056c3e8461c29 100644 --- a/EOM.TSHotelManager.Core/Business/Customer/PassPortType.cs +++ b/EOM.TSHotelManager.Core/Business/Customer/PassPortType.cs @@ -56,7 +56,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -64,6 +64,6 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Business/Customer/SexType.cs b/EOM.TSHotelManager.Core/Business/Customer/SexType.cs index 2e6eb95c387cc9214d629f625deef181d2e29114..69ae8d78104e759b450c08380023262a097a0936 100644 --- a/EOM.TSHotelManager.Core/Business/Customer/SexType.cs +++ b/EOM.TSHotelManager.Core/Business/Customer/SexType.cs @@ -57,7 +57,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -65,6 +65,6 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Business/Reser/Reser.cs b/EOM.TSHotelManager.Core/Business/Reser/Reser.cs index 35f111ec755716dd4781409b11b7ab0ce3554a7d..55ef39f8e9d3cdeb6a00c434f1a83c9de73b7dc3 100644 --- a/EOM.TSHotelManager.Core/Business/Reser/Reser.cs +++ b/EOM.TSHotelManager.Core/Business/Reser/Reser.cs @@ -55,11 +55,11 @@ namespace EOM.TSHotelManager.Core /// /// 预约起始 /// - public DateTime ReserDate { get; set; } + public DateTime? ReserDate { get; set; } /// /// 预约止日 /// - public DateTime ReserEndDay { get; set; } + public DateTime? ReserEndDay { get; set; } /// /// 删除标记 /// @@ -71,7 +71,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -79,7 +79,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Business/Room/Room.cs b/EOM.TSHotelManager.Core/Business/Room/Room.cs index 51cab35fc50c279bcbde048cf7d5901b5bdf2821..5d1d9611a9176b95477d12f2876d22eaeab4af2e 100644 --- a/EOM.TSHotelManager.Core/Business/Room/Room.cs +++ b/EOM.TSHotelManager.Core/Business/Room/Room.cs @@ -114,7 +114,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -122,7 +122,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Business/Room/RoomState.cs b/EOM.TSHotelManager.Core/Business/Room/RoomState.cs index 280159b92fbc87135bc1a6bb6b8264339784acc3..8b3d4152f8c1f13aa739e489b7bd2612b632b5a7 100644 --- a/EOM.TSHotelManager.Core/Business/Room/RoomState.cs +++ b/EOM.TSHotelManager.Core/Business/Room/RoomState.cs @@ -52,7 +52,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -60,6 +60,6 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Business/Room/RoomType.cs b/EOM.TSHotelManager.Core/Business/Room/RoomType.cs index bce36c80483eb3cd4879daf1fae4f719fd993818..eb33ef6fd0ff782f971665765d0f9e0dc52f389e 100644 --- a/EOM.TSHotelManager.Core/Business/Room/RoomType.cs +++ b/EOM.TSHotelManager.Core/Business/Room/RoomType.cs @@ -53,7 +53,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -61,6 +61,6 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Business/Sellthing/SellThing.cs b/EOM.TSHotelManager.Core/Business/Sellthing/SellThing.cs index ba30d73e2b1413134f08286661dbb094e63ffa12..8b2c542b3088367123a58387dee1794618006075 100644 --- a/EOM.TSHotelManager.Core/Business/Sellthing/SellThing.cs +++ b/EOM.TSHotelManager.Core/Business/Sellthing/SellThing.cs @@ -69,7 +69,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -77,6 +77,6 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Business/Spend/Spend.cs b/EOM.TSHotelManager.Core/Business/Spend/Spend.cs index d61e759cfbe9458c988a937859f7f10706b49f6a..32279b94bb3b6ee3e033e9355a88b00527f2ec74 100644 --- a/EOM.TSHotelManager.Core/Business/Spend/Spend.cs +++ b/EOM.TSHotelManager.Core/Business/Spend/Spend.cs @@ -69,7 +69,7 @@ namespace EOM.TSHotelManager.Core /// /// 消费时间 /// - public DateTime SpendTime { get; set; } + public DateTime? SpendTime { get; set; } /// /// 结算状态 /// @@ -85,7 +85,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -93,7 +93,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } /// /// 结算状态描述 diff --git a/EOM.TSHotelManager.Core/Business/Wti/Wti.cs b/EOM.TSHotelManager.Core/Business/Wti/Wti.cs index 8a1756042ccff93c15087d38933c3df9002b7747..c0754fcd33c3cffaaf9c296e8d32caf280a779bc 100644 --- a/EOM.TSHotelManager.Core/Business/Wti/Wti.cs +++ b/EOM.TSHotelManager.Core/Business/Wti/Wti.cs @@ -46,12 +46,12 @@ namespace EOM.TSHotelManager.Core /// 开始使用时间 /// [SqlSugar.SugarColumn(ColumnName = "UseDate")] - public DateTime UseDate { get; set; } + public DateTime? UseDate { get; set; } /// /// 结束使用时间 /// [SqlSugar.SugarColumn(ColumnName = "EndDate")] - public DateTime EndDate { get; set; } + public DateTime? EndDate { get; set; } /// /// 水费 /// @@ -84,7 +84,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -92,7 +92,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } diff --git a/EOM.TSHotelManager.Core/EOM.TSHotelManager.Core.csproj b/EOM.TSHotelManager.Core/EOM.TSHotelManager.Core.csproj index fe414e416bba1c718b381955546b547eb145308b..83fcd0668026fe3959a2369932d0da0dc6b42c43 100644 --- a/EOM.TSHotelManager.Core/EOM.TSHotelManager.Core.csproj +++ b/EOM.TSHotelManager.Core/EOM.TSHotelManager.Core.csproj @@ -8,7 +8,7 @@ - + diff --git a/EOM.TSHotelManager.Core/Sys/NavBar/NavBar.cs b/EOM.TSHotelManager.Core/Sys/NavBar/NavBar.cs index 36abd751ebfa64989ab09b178fe65989cb98d693..13f46f566701963d1a546c0d9615701c398a3a8d 100644 --- a/EOM.TSHotelManager.Core/Sys/NavBar/NavBar.cs +++ b/EOM.TSHotelManager.Core/Sys/NavBar/NavBar.cs @@ -48,7 +48,7 @@ namespace EOM.TSHotelManager.Core /// /// 新增时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 修改人 /// @@ -56,6 +56,6 @@ namespace EOM.TSHotelManager.Core /// /// 修改时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Util/OperationLog.cs b/EOM.TSHotelManager.Core/Util/OperationLog.cs index 911dc670464fbe3f9447d35022be901c76e6b1ce..1e360c45223533962ef95ddd2e1efea13a6ac1d3 100644 --- a/EOM.TSHotelManager.Core/Util/OperationLog.cs +++ b/EOM.TSHotelManager.Core/Util/OperationLog.cs @@ -57,7 +57,7 @@ namespace EOM.TSHotelManager.Core /// 操作时间 /// [SqlSugar.SugarColumn(ColumnName = "OperationTime")] - public DateTime OperationTime { get; set; } + public DateTime? OperationTime { get; set; } /// /// 操作信息 /// @@ -94,7 +94,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -102,7 +102,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } /// /// 日志等级 diff --git a/EOM.TSHotelManager.Core/Worker/Worker.cs b/EOM.TSHotelManager.Core/Worker/Worker.cs index e475ecdd0eb918e08a1b617adabb9cdccc9a4ede..e517ad313b88870203875dcd79c9176bb320ce32 100644 --- a/EOM.TSHotelManager.Core/Worker/Worker.cs +++ b/EOM.TSHotelManager.Core/Worker/Worker.cs @@ -46,7 +46,7 @@ namespace EOM.TSHotelManager.Core /// 出生日期 /// [SqlSugar.SugarColumn(ColumnName = "WorkerBirthday")] - public DateTime WorkerBirthday { get; set; } + public DateTime? WorkerBirthday { get; set; } /// /// 员工性别 /// @@ -110,7 +110,7 @@ namespace EOM.TSHotelManager.Core /// /// 员工入职时间 /// - public DateTime WorkerTime { get; set; } + public DateTime? WorkerTime { get; set; } /// /// 员工面貌 /// diff --git a/EOM.TSHotelManager.Core/Worker/WorkerCheck.cs b/EOM.TSHotelManager.Core/Worker/WorkerCheck.cs index 8e13365124f48317a05dd50e331715c741cef2f6..1606942b1f84acb7c5a336cbe5819e37503fffb6 100644 --- a/EOM.TSHotelManager.Core/Worker/WorkerCheck.cs +++ b/EOM.TSHotelManager.Core/Worker/WorkerCheck.cs @@ -70,7 +70,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -78,7 +78,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Worker/WorkerGoodBad.cs b/EOM.TSHotelManager.Core/Worker/WorkerGoodBad.cs index 7714c5cfeb208fb2372eb4e5f5fdda7f856e585f..8910dc543e8af697a0c3ac271276ac4f0a626eed 100644 --- a/EOM.TSHotelManager.Core/Worker/WorkerGoodBad.cs +++ b/EOM.TSHotelManager.Core/Worker/WorkerGoodBad.cs @@ -65,7 +65,7 @@ namespace EOM.TSHotelManager.Core /// /// 奖惩时间 /// - public DateTime GBTime { get; set; } + public DateTime? GBTime { get; set; } /// /// 类型名称 /// @@ -82,7 +82,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -90,6 +90,6 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Worker/WorkerHistory.cs b/EOM.TSHotelManager.Core/Worker/WorkerHistory.cs index 73fec9e0f182d7b33391b0f3561a2643520b8c7a..73abc23f362fabb52e599a1fad574b4756e60896 100644 --- a/EOM.TSHotelManager.Core/Worker/WorkerHistory.cs +++ b/EOM.TSHotelManager.Core/Worker/WorkerHistory.cs @@ -44,11 +44,11 @@ namespace EOM.TSHotelManager.Core /// /// 开始时间 /// - public DateTime StartDate { get; set; } + public DateTime? StartDate { get; set; } /// /// 结束时间 /// - public DateTime EndDate { get; set; } + public DateTime? EndDate { get; set; } /// /// 职位 /// @@ -68,7 +68,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -76,6 +76,6 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Zero/AdminType.cs b/EOM.TSHotelManager.Core/Zero/AdminType.cs index 9eb2e5da2f733da7fe3b6db461b34bf62c2f49f9..509f5c5345d0b78448d897ff9b33576e9c0f682e 100644 --- a/EOM.TSHotelManager.Core/Zero/AdminType.cs +++ b/EOM.TSHotelManager.Core/Zero/AdminType.cs @@ -63,7 +63,7 @@ namespace EOM.TSHotelManager.Core /// /// 新增时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 修改人 /// @@ -71,6 +71,6 @@ namespace EOM.TSHotelManager.Core /// /// 修改时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Zero/CheckInfo.cs b/EOM.TSHotelManager.Core/Zero/CheckInfo.cs index be947cf9fd6dcedd01425a001afc1a91c165b4df..a1e9022e22eee09add0a256ad1cdfe4b26b4baad 100644 --- a/EOM.TSHotelManager.Core/Zero/CheckInfo.cs +++ b/EOM.TSHotelManager.Core/Zero/CheckInfo.cs @@ -72,7 +72,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -80,6 +80,6 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Zero/Dept.cs b/EOM.TSHotelManager.Core/Zero/Dept.cs index e7145c9a908a30609483a5760649f4d5e3dabad1..60b6a61cf6956c2fb3c42ed0887064e4a98353c7 100644 --- a/EOM.TSHotelManager.Core/Zero/Dept.cs +++ b/EOM.TSHotelManager.Core/Zero/Dept.cs @@ -39,22 +39,27 @@ namespace EOM.TSHotelManager.Core /// /// 部门编号 /// + [SqlSugar.SugarColumn(ColumnName = "dept_no")] public string? dept_no { get; set; } /// /// 部门名称 /// + [SqlSugar.SugarColumn(ColumnName = "dept_name")] public string? dept_name { get; set; } /// /// 部门描述 /// + [SqlSugar.SugarColumn(ColumnName = "dept_desc")] public string? dept_desc { get; set; } /// /// 创建时间(部门) /// - public DateTime dept_date { get; set; } + [SqlSugar.SugarColumn(ColumnName = "dept_date")] + public DateTime? dept_date { get; set; } /// /// 部门主管 /// + [SqlSugar.SugarColumn(ColumnName = "dept_leader")] public string? dept_leader { get; set; } /// /// 部门主管 @@ -64,6 +69,7 @@ namespace EOM.TSHotelManager.Core /// /// 上级部门 /// + [SqlSugar.SugarColumn(ColumnName = "dept_parent")] public string? dept_parent { get; set; } /// /// 上级部门 @@ -73,23 +79,28 @@ namespace EOM.TSHotelManager.Core /// /// 删除标记 /// + [SqlSugar.SugarColumn(ColumnName = "delete_mk")] public int delete_mk { get; set; } /// /// 资料创建人 /// + [SqlSugar.SugarColumn(ColumnName = "datains_usr")] public string? datains_usr { get; set; } /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + [SqlSugar.SugarColumn(ColumnName = "datains_date")] + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// + [SqlSugar.SugarColumn(ColumnName = "datachg_usr")] public string? datachg_usr { get; set; } /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + [SqlSugar.SugarColumn(ColumnName = "datachg_date")] + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Zero/Education.cs b/EOM.TSHotelManager.Core/Zero/Education.cs index c7011eb743920c3dc216227408aae72587fd3873..c75d00387abd78346dfbca20e5b32dd285308c44 100644 --- a/EOM.TSHotelManager.Core/Zero/Education.cs +++ b/EOM.TSHotelManager.Core/Zero/Education.cs @@ -55,7 +55,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -63,7 +63,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Zero/Module.cs b/EOM.TSHotelManager.Core/Zero/Module.cs index 5e6b9e1981e3e6a4f84419c7ac33b3f67030c305..04779f77ae1125a46c0fc97b4b540e2402fb8a39 100644 --- a/EOM.TSHotelManager.Core/Zero/Module.cs +++ b/EOM.TSHotelManager.Core/Zero/Module.cs @@ -40,7 +40,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_time { get; set; } + public DateTime? datains_time { get; set; } /// /// 资料更新人 @@ -50,6 +50,6 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_time { get; set; } + public DateTime? datachg_time { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Zero/Notice.cs b/EOM.TSHotelManager.Core/Zero/Notice.cs index 69b8076f201c3bb9fc82d9778b19be3de6d0ca37..07ef6627fa67036dc977725c0fcd18728698770b 100644 --- a/EOM.TSHotelManager.Core/Zero/Notice.cs +++ b/EOM.TSHotelManager.Core/Zero/Notice.cs @@ -56,7 +56,7 @@ namespace EOM.TSHotelManager.Core /// 公告时间 /// [SqlSugar.SugarColumn(ColumnName = "NoticeTime")] - public DateTime NoticeTime { get; set; } + public DateTime? NoticeTime { get; set; } /// /// 公告正文 /// @@ -79,7 +79,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -87,7 +87,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Zero/VipRule.cs b/EOM.TSHotelManager.Core/Zero/VipRule.cs index b4d6d9bd7b9d34381eebdc19d08ac21ea4ff368b..ae7faaaaa462a40ea1d0d9eecc1199244abef2e7 100644 --- a/EOM.TSHotelManager.Core/Zero/VipRule.cs +++ b/EOM.TSHotelManager.Core/Zero/VipRule.cs @@ -73,7 +73,7 @@ namespace EOM.TSHotelManager.Core /// /// 新增时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 修改人 /// @@ -81,7 +81,7 @@ namespace EOM.TSHotelManager.Core /// /// 修改时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } /// /// 会员等级描述 diff --git a/EOM.TSHotelManager.Core/Zero/position.cs b/EOM.TSHotelManager.Core/Zero/position.cs index c8ac2dcf636b51e338c0fb2116bc038f5131920a..b1be022262b72f583387a4d87deace10593378d3 100644 --- a/EOM.TSHotelManager.Core/Zero/position.cs +++ b/EOM.TSHotelManager.Core/Zero/position.cs @@ -55,7 +55,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -63,7 +63,7 @@ namespace EOM.TSHotelManager.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj b/EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj index 168d52e766c27075398f57c856d9c877266f6995..a08a5317592515e8bba4d98a6df5426ad2292d2b 100644 --- a/EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj +++ b/EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Customer/CustoController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Customer/CustoController.cs index 9bc3e8ec7b220ff719f4fbbbc9adac33199408ab..bbb7ab255eae6f7ee74654717c7687b6f514470b 100644 --- a/EOM.TSHotelManager.WebApi/Controllers/Business/Customer/CustoController.cs +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Customer/CustoController.cs @@ -74,9 +74,9 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// [HttpGet] - public OSelectCustoAllDto SelectCustoAll([FromQuery]int? pageIndex, int? pageSize) + public OSelectCustoAllDto SelectCustoAll([FromQuery]SelectCustoAll selectCustoAll) { - return customerService.SelectCustoAll(pageIndex,pageSize); + return customerService.SelectCustoAll(selectCustoAll); } /// diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Reser/ReserController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Reser/ReserController.cs index fd0ae4da4a0f1874bc390ec809d989ed708dfbf5..d7bd0a52a67669378275d908ff2b48ade025e327 100644 --- a/EOM.TSHotelManager.WebApi/Controllers/Business/Reser/ReserController.cs +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Reser/ReserController.cs @@ -50,12 +50,12 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// 删除预约信息 /// - /// + /// /// [HttpPost] - public bool DeleteReserInfo([FromBody]string? rid) + public bool DeleteReserInfo([FromBody]Reser reser) { - return reserService.DeleteReserInfo(rid); + return reserService.DeleteReserInfo(reser); } /// diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomController.cs index 0736ddfca9f67d614f712d30818397c9e4851f6c..1f679d97da779038eee7025c372510f8a0d3b062 100644 --- a/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomController.cs +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomController.cs @@ -187,8 +187,8 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// /// - [HttpPost] - public bool UpdateRoomStateByRoomNo([FromBody]string? roomno, int stateid) + [HttpGet] + public bool UpdateRoomStateByRoomNo([FromQuery]string? roomno, int stateid) { return roomService.UpdateRoomStateByRoomNo(roomno,stateid); } diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Sellthing/SellthingController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Sellthing/SellthingController.cs index e93de8b43532309c20144f690b4465aef4c02584..52b94dbb72dde63ce22a528ed7de50501362f427 100644 --- a/EOM.TSHotelManager.WebApi/Controllers/Business/Sellthing/SellthingController.cs +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Sellthing/SellthingController.cs @@ -67,8 +67,8 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// /// - [HttpPost] - public bool DeleteSellThing([FromBody] string? roomNo, string? custoNo, string? sellName) + [HttpGet] + public bool DeleteSellThing([FromQuery] string? roomNo, string? custoNo, string? sellName) { return sellService.DeleteSellThing(roomNo, custoNo, sellName); } @@ -78,8 +78,8 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// /// - [HttpPost] - public bool DeleteSellThingBySellNo([FromBody]string? sellNo) + [HttpGet] + public bool DeleteSellThingBySellNo([FromQuery]string? sellNo) { return sellService.DeleteSellThingBySellNo(sellNo); } diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Spend/SpendController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Spend/SpendController.cs index 740988b8b6f1830c53dbc42b45b68065a3837276..aa8bb6c7e17144f8ccf7225a1dd70613af98d1dd 100644 --- a/EOM.TSHotelManager.WebApi/Controllers/Business/Spend/SpendController.cs +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Spend/SpendController.cs @@ -75,7 +75,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// [HttpGet] - List SelectSpendInfoAll() + public List SelectSpendInfoAll() { return spendService.SelectSpendInfoAll(); } @@ -108,8 +108,8 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// /// - [HttpPost] - public bool UpdateMoneyState([FromBody] string? roomno, string? checktime) + [HttpGet] + public bool UpdateMoneyState([FromQuery] string? roomno, string? checktime) { return spendService.UpdateMoneyState(roomno, checktime); } @@ -117,14 +117,12 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// 将转房前的未结算记录一同转移到新房间 /// - /// - /// - /// + /// /// [HttpPost] - public bool UpdateSpendInfoByRoomNo([FromBody]List spends, string? newRoom, string? custoNo) + public bool UpdateSpendInfoByRoomNo([FromQuery] Spend spend) { - return spendService.UpdateSpendInfoByRoomNo(spends, newRoom, custoNo); + return spendService.UpdateSpendInfoByRoomNo(spend); } /// diff --git a/EOM.TSHotelManager.WebApi/Controllers/Util/UtilController.cs b/EOM.TSHotelManager.WebApi/Controllers/Util/AppController.cs similarity index 87% rename from EOM.TSHotelManager.WebApi/Controllers/Util/UtilController.cs rename to EOM.TSHotelManager.WebApi/Controllers/Util/AppController.cs index 15ef88221acfd0a806b2f4c581358f34ab88278f..0ef88b55b904a38b6443297afd0d2a153c0b7b8b 100644 --- a/EOM.TSHotelManager.WebApi/Controllers/Util/UtilController.cs +++ b/EOM.TSHotelManager.WebApi/Controllers/Util/AppController.cs @@ -9,7 +9,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// 工具类控制器 /// - public class UtilController : ControllerBase + public class AppController : ControllerBase { /// /// 工具 @@ -20,7 +20,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// /// - public UtilController(IUtilService utilService) + public AppController(IUtilService utilService) { this.utilService = utilService; } @@ -52,9 +52,9 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// [HttpPost] - public bool InsertOperationLog([FromBody]OperationLog opr) + public bool AddLog([FromBody]OperationLog opr) { - return utilService.InsertOperationLog(opr); + return utilService.AddLog(opr); } /// diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/Admin/AdminController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/Admin/AdminController.cs index 11b8e75fe2fe8b3555e9a8c98ab925cd6979447b..181f163996bea8d17f4400c7f37a5d614b2428a5 100644 --- a/EOM.TSHotelManager.WebApi/Controllers/Zero/Admin/AdminController.cs +++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/Admin/AdminController.cs @@ -43,8 +43,8 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// /// - [HttpPost] - public Admin SelectAdminPwdByAccount([FromBody]string? account) + [HttpGet] + public Admin SelectAdminPwdByAccount([FromQuery]string? account) { return adminService.SelectAdminPwdByAccount(account); } diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/Module/ModuleController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/Module/ModuleController.cs index 6b6a74933982ae0c82707bbd85a791b1779a4507..7152a0c94f870b6376e8b700feeb401a0022dfb5 100644 --- a/EOM.TSHotelManager.WebApi/Controllers/Zero/Module/ModuleController.cs +++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/Module/ModuleController.cs @@ -40,8 +40,8 @@ namespace EOM.TSHotelManager.WebApi.Controllers /// /// /// - [HttpGet] - public List GetAllModuleByAdmin([FromQuery]Admin admin) + [HttpPost] + public List GetAllModuleByAdmin([FromBody]Admin admin) { return adminModuleZeroService.GetAllModuleByAdmin(admin); } diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/Notice/NoticeController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/Notice/NoticeController.cs index 6015dd3ec5b38f52bda1cc6c8f1b7616a8f9ac22..0928f1ceeebd14644b1fe5a978f817968c559da4 100644 --- a/EOM.TSHotelManager.WebApi/Controllers/Zero/Notice/NoticeController.cs +++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/Notice/NoticeController.cs @@ -37,6 +37,17 @@ namespace EOM.TSHotelManager.WebApi.Controllers } #endregion + /// + /// 查询公告 + /// + /// + /// + [HttpGet] + public Notice SelectNoticeByNoticeNo([FromQuery]string noticeId) + { + return noticeService.SelectNoticeByNoticeNo(noticeId); + } + #region 上传公告信息 /// /// 上传公告信息 diff --git a/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj b/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj index e831fc17cbce0b61d3c65e6882e03fec26cb7ab6..09cc55b167c34c5b9a420a95bd71cf6e6b9ed693 100644 --- a/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj +++ b/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj @@ -20,8 +20,10 @@ - + + + diff --git a/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.xml b/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.xml index 776d8d7968c58c8877f10bd69b6b8c9cf83d4454..18a0fb22a90a9e9449543c7c5f273815dd17b1b3 100644 --- a/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.xml +++ b/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.xml @@ -77,7 +77,7 @@ - + 查询所有客户信息 @@ -147,11 +147,11 @@ - + 删除预约信息 - + @@ -483,13 +483,11 @@ - + 将转房前的未结算记录一同转移到新房间 - - - + @@ -595,43 +593,43 @@ - + 工具类控制器 - + 工具 - + - + 查询身份证号码 - + 检测版本号 - + 添加操作日志 - + 查询所有操作日志 @@ -1332,6 +1330,13 @@ + + + 查询公告 + + + + 上传公告信息 diff --git a/EOM.TSHotelManager.WebApi/Startup.cs b/EOM.TSHotelManager.WebApi/Startup.cs index da3b6d03eee205a71150a5e62fc77dc98a349b99..6466977647d26056057d29c26e62c6a1701d9984 100644 --- a/EOM.TSHotelManager.WebApi/Startup.cs +++ b/EOM.TSHotelManager.WebApi/Startup.cs @@ -4,8 +4,11 @@ using System.IO; using System.Linq; using System.Reflection; using System.Text; +using System.Text.Encodings.Web; +using System.Text.Unicode; using System.Threading.Tasks; using Autofac; +using Autofac.Core; using EOM.Encrypt; using EOM.TSHotelManager.EntityFramework; using Microsoft.AspNetCore.Builder; @@ -17,7 +20,9 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; using Microsoft.OpenApi.Models; +using Newtonsoft.Json.Serialization; namespace EOM.TSHotelManager.WebApi { @@ -33,7 +38,17 @@ namespace EOM.TSHotelManager.WebApi // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddControllers(); + //services.AddControllers(); + services.AddControllers().AddJsonOptions(opts => + { + opts.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All); + opts.JsonSerializerOptions.PropertyNamingPolicy = null; + }).AddNewtonsoftJson(opt => + { + //ʱʽӦ + opt.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss"; + opt.SerializerSettings.ContractResolver = new DefaultContractResolver(); + }); #region ȫ· //ڸǰ׺ûض·ǰǰ׺ @@ -65,7 +80,6 @@ namespace EOM.TSHotelManager.WebApi Url = new Uri("https://www.oscode.top/") } }); - //ȡͬ¸ֲxmlעͣһȡҵ߼㡢ʵͽӿڲ㼴 s.IncludeXmlComments(AppContext.BaseDirectory+"EOM.TSHotelManager.Application.xml"); s.IncludeXmlComments(AppContext.BaseDirectory+"EOM.TSHotelManager.Core.xml"); @@ -79,7 +93,6 @@ namespace EOM.TSHotelManager.WebApi #endregion }); #endregion - } @@ -107,6 +120,7 @@ namespace EOM.TSHotelManager.WebApi s.SwaggerEndpoint("/swagger/v1/swagger.json", "EOM.TSHotelManagerӿĵ"); }); #endregion + } ///