Browse Source

修改op费用名称,酒店基本信息接口编写

wangh 1 year ago
parent
commit
0d54657782

+ 5 - 3
OASystem/EntitySync/Program.cs

@@ -95,7 +95,7 @@ db.CodeFirst.SetStringDefaultLength(50).BackupTable().InitTables(new Type[]
     //typeof(Fin_DailyFeePaymentContent),// 财务 - 日付申请详细类
     //typeof(Grp_GroupsTaskAssignment),
     //typeof(Grp_AirTicketReservations),
-    typeof(Grp_GroupCostParameter),
+    //typeof(Grp_GroupCostParameter),
     //typeof(Grp_TeamRate),              // 团组汇率
     //typeof(Fin_ForeignReceivables),    // 对外收款账单
     //typeof(Fin_ProceedsReceived),      // 已收款项
@@ -114,7 +114,9 @@ db.CodeFirst.SetStringDefaultLength(50).BackupTable().InitTables(new Type[]
     //typeof(Grp_GroupCost) //成本数据信息
     //typeof(Grp_CostTypeHotelNumber)//分段房间数量
     //typeof(Grp_VisaInfo)
-    typeof(Grp_CarTouristGuideGroundReservations),
-    typeof(Grp_CarTouristGuideGroundReservationsContent)
+    //typeof(Grp_CarTouristGuideGroundReservations),
+    //typeof(Grp_CarTouristGuideGroundReservationsContent)
+    //typeof(Grp_Customers),
+    typeof(Grp_HotelReservations)
 });
 Console.WriteLine("数据库结构同步完成!");

+ 105 - 9
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -51,6 +51,7 @@ namespace OASystem.API.Controllers
         private readonly DelegationVisaRepository _delegationVisaRep;
         private readonly VisaPriceRepository _visaPriceRep;
         private readonly CarTouristGuideGroundRepository _carTouristGuideGroundRep;
+        private readonly HotelPriceRepository _hotelPriceRep;
         private readonly MessageRepository _message;
         private readonly SqlSugarClient _sqlSugar;
         #region 成本相关
@@ -68,7 +69,7 @@ namespace OASystem.API.Controllers
             TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
             InvitationOfficialActivitiesRepository InvitationOfficialActivitiesRep, DelegationEnDataRepository delegationEnDataRep, EnterExitCostRepository enterExitCostRep
             , DelegationVisaRepository delegationVisaRep, MessageRepository message,VisaPriceRepository visaPriceRep,CarTouristGuideGroundRepository carTouristGuideGroundRep,CheckBoxsRepository checkBoxs, GroupCostRepository GroupCostRepository, CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
-            GroupCostParameterRepository GroupCostParameterRepository)
+            GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep)
         {
             _mapper = mapper;
             _grpScheduleRep = grpScheduleRep;
@@ -94,6 +95,7 @@ namespace OASystem.API.Controllers
             _GroupCostRepository = GroupCostRepository;
             _CostTypeHotelNumberRepository = CostTypeHotelNumberRepository;
             _GroupCostParameterRepository = GroupCostParameterRepository;
+            _hotelPriceRep = hotelPriceRep;
         }
 
         
@@ -3138,11 +3140,11 @@ namespace OASystem.API.Controllers
         /// <returns></returns>
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> CarTouristGuideGroundContenInitialize(CarTouristGuideGroundContenDto dto)
+        public async Task<IActionResult> CarTouristGuideGroundContentInitialize(CarTouristGuideGroundContentDto dto)
         {
             try
             {
-                Result groupData = await _carTouristGuideGroundRep.CarTouristGuideGroundConten(dto);
+                Result groupData = await _carTouristGuideGroundRep.CarTouristGuideGroundContent(dto);
                 if (groupData.Code != 0)
                 {
                     return Ok(JsonView(false, groupData.Msg));
@@ -3161,11 +3163,11 @@ namespace OASystem.API.Controllers
         /// <returns></returns>
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> OpCarTouristGuideGroundContenById(CarTouristGuideGroundIdDto dto)
+        public async Task<IActionResult> OpCarTouristGuideGroundContentById(CarTouristGuideGroundIdDto dto)
         {
             try
             {
-                Result groupData = await _carTouristGuideGroundRep.OpCarTouristGuideGroundContenById(dto);
+                Result groupData = await _carTouristGuideGroundRep.OpCarTouristGuideGroundContentById(dto);
                 if (groupData.Code != 0)
                 {
                     return Ok(JsonView(false, groupData.Msg));
@@ -3184,11 +3186,11 @@ namespace OASystem.API.Controllers
         /// <returns></returns>
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> OpCarTouristGuideGroundConten(OpCarTouristGuideGroundContenDto dto)
+        public async Task<IActionResult> OpCarTouristGuideGroundContent(OpCarTouristGuideGroundContentDto dto)
         {
             try
             {
-                Result groupData = await _carTouristGuideGroundRep.OpCarTouristGuideGroundConten(dto);
+                Result groupData = await _carTouristGuideGroundRep.OpCarTouristGuideGroundContent(dto);
                 if (groupData.Code != 0)
                 {
                     return Ok(JsonView(false, groupData.Msg));
@@ -3279,8 +3281,102 @@ namespace OASystem.API.Controllers
 
         #endregion
 
-      
+        #region 酒店预定
+        /// <summary>
+        /// 酒店预订页面初始化绑定
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> HotelReservationsInitialize(HotelReservationsDto dto)
+        {
+            try
+            {
+                Result groupData = await _hotelPriceRep.HotelReservationsInitialize(dto);
+                if (groupData.Code != 0)
+                {
+                    return Ok(JsonView(false, groupData.Msg));
+                }
+                return Ok(JsonView(true, groupData.Msg, groupData.Data));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, ex.Message));
+            }
+        }
+        /// <summary>
+        /// 根基团组Id查询酒店费用列表
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> HotelReservationsByDiId(HotelReservationsByDiIdDto dto)
+        {
+            try
+            {
+                Result groupData = await _hotelPriceRep.HotelReservationsByDiId(dto);
+                if (groupData.Code != 0)
+                {
+                    return Ok(JsonView(false, groupData.Msg));
+                }
+                return Ok(JsonView(true, groupData.Msg, groupData.Data));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, ex.Message));
+            }
+        }
+        /// <summary>
+        /// 根基酒店费用Id查询酒店费用详细
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> HotelReservationsById(HotelReservationsByIdDto dto)
+        {
+            try
+            {
+                Result groupData = await _hotelPriceRep.HotelReservationsById(dto);
+                if (groupData.Code != 0)
+                {
+                    return Ok(JsonView(false, groupData.Msg));
+                }
+                return Ok(JsonView(true, groupData.Msg, groupData.Data));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, ex.Message));
+            }
+        }
+        /// <summary>
+        /// 根基酒店费用操作(Status:1.新增,2.修改)
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> OpHotelReservations(OpHotelReservationsData dto)
+        {
+            try
+            {
+                Result groupData = await _hotelPriceRep.OpHotelReservations(dto);
+                if (groupData.Code != 0)
+                {
+                    return Ok(JsonView(false, groupData.Msg));
+                }
+                return Ok(JsonView(true, groupData.Msg, groupData.Data));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, ex.Message));
+            }
+        }
+        #endregion
+
+
 
-       
     }
 }

+ 6 - 0
OASystem/OASystem.Domain/AutoMappers/_baseMappingProfile.cs

@@ -84,6 +84,8 @@ namespace OASystem.Domain.AutoMappers
             CreateMap<Grp_ScheduleDetailInsertDto, Grp_ScheduleDetailInfo>();
             CreateMap<TaskAssignmenDto, Grp_GroupsTaskAssignment>();
 
+            CreateMap<Grp_DelegationInfo, ShareGroupInfoIIView>();
+
             #region 机票费用录入
             CreateMap<AirTicketResOp, Grp_AirTicketReservations>();
             CreateMap<CardPayment, Grp_CreditCardPayment>();
@@ -136,6 +138,10 @@ namespace OASystem.Domain.AutoMappers
             CreateMap<Grp_GroupCostParameter, Grp_GroupCostParameterDto>();
             #endregion
 
+            #region 酒店预订
+            CreateMap<Grp_HotelReservations, HotelReservationsByIdView>();
+            #endregion
+
             #endregion
             #region Resource
 

+ 8 - 8
OASystem/OASystem.Domain/Dtos/Groups/CarTouristGuideGroundDto.cs

@@ -98,12 +98,12 @@ namespace OASystem.Domain.Dtos.Groups
         public string Remark { get; set; }
     }
 
-    public class CarTouristGuideGroundContenDto
+    public class CarTouristGuideGroundContentDto
     {
         public int UserId { get; set; }
     }
 
-    public class OpCarTouristGuideGroundContenDto
+    public class OpCarTouristGuideGroundContentDto
     {
         /// <summary>
         /// 团组Id
@@ -136,13 +136,13 @@ namespace OASystem.Domain.Dtos.Groups
         /// <summary>
         /// 详情数据
         /// </summary>
-        public List<OPContenList> OPContenList { get; set; }
+        public List<OPContentList> OPContentList { get; set; }
         /// <summary>
         /// 创建人Id
         /// </summary>
         public int CreateUserId { get; set; }
     }
-    public class OPContenList
+    public class OPContentList
     {
         
         /// <summary>
@@ -161,9 +161,9 @@ namespace OASystem.Domain.Dtos.Groups
         /// 费用描述
         /// </summary>
         public string priceContent { get; set; }
-        /// <summary>
-        /// 备注
-        /// </summary>
-        public string Remark { get; set; }
+        ///// <summary>
+        ///// 备注
+        ///// </summary>
+        //public string Remark { get; set; }
     }
 }

+ 244 - 0
OASystem/OASystem.Domain/Dtos/Groups/HotelReservationsDto.cs

@@ -0,0 +1,244 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Dtos.Groups
+{
+    public class HotelReservationsDto
+    {
+        public int UserId { get; set; }
+    }
+    /// <summary>
+    /// 根据团组查询酒店预订列表数据
+    /// </summary>
+    public class HotelReservationsByDiIdDto: DtoBase
+    {
+        public int DiId { get; set; }
+    }
+    public class HotelReservationsByIdDto
+    {
+        public int Id { get; set; }
+    }
+    public class OpHotelReservationsData
+    {
+        /// <summary>
+        /// 操作状态
+        /// 1 添加 
+        /// 2 修改 
+        /// </summary>
+        public int Status { get; set; }
+        public int Id { get; set; }
+        /// <summary>
+        /// 团组Id
+        /// </summary>
+        public int DiId { get; set; }
+        /// <summary>
+        /// 客人类型(设置数据外键编号)
+        /// </summary>
+        public int GTId { get; set; }
+        /// <summary>
+        /// 入住卷号码
+        /// </summary>
+        public string CheckNumber { get; set; }
+        /// <summary>
+        /// 预订网站(设置数据外键编号)
+        /// </summary>
+        public int ReservationsWebsite { get; set; }
+        /// <summary>
+        /// 预订号码
+        /// </summary>
+        public string ReservationsNo { get; set; }
+        /// <summary>
+        /// 酒店确定编号
+        /// </summary>
+        public string DetermineNo { get; set; }
+        /// <summary>
+        /// 所在城市
+        /// </summary>
+        public string City { get; set; }
+        /// <summary>
+        /// 酒店名称
+        /// </summary>
+        public string HotelName { get; set; }
+        /// <summary>
+        /// 酒店地址
+        /// </summary>
+        public string HotelAddress { get; set; }
+        /// <summary>
+        /// 酒店电话
+        /// </summary>
+        public string HotelTel { get; set; }
+        /// <summary>
+        /// 客人姓名
+        /// </summary>
+        public string GuestName { get; set; }
+        /// <summary>
+        /// 入住日期
+        /// </summary>
+        public string CheckInDate { get; set; }
+        /// <summary>
+        /// 退房日期
+        /// </summary>
+        public string CheckOutDate { get; set; }
+        /// <summary>
+        /// 预算金额
+        /// </summary>
+        public decimal Budget { get; set; }
+        /// <summary>
+        /// 预算币种(设置数据外键编号)
+        /// </summary>
+        public int BudgetCurrency { get; set; }
+        /// <summary>
+        /// 单间数量
+        /// </summary>
+        public int SingleRoomCount { get; set; }
+        /// <summary>
+        /// 单间单价
+        /// </summary>
+        public decimal SingleRoomPrice { get; set; }
+        /// <summary>
+        /// 双间数量
+        /// </summary>
+        public int DoubleRoomCount { get; set; }
+        /// <summary>
+        /// 双间单价
+        /// </summary>
+        public decimal DoubleRoomPrice { get; set; }
+        /// <summary>
+        /// 套房数量
+        /// </summary>
+        public int SuiteRoomCount { get; set; }
+        /// <summary>
+        /// 套房单价
+        /// </summary>
+        public decimal SuiteRoomPrice { get; set; }
+        /// <summary>
+        /// 其他房型数量
+        /// </summary>
+        public int OtherRoomCount { get; set; }
+        /// <summary>
+        /// 其他房型单价
+        /// </summary>
+        public decimal OtherRoomPrice { get; set; }
+        /// <summary>
+        /// 房间说明
+        /// </summary>
+        public string RoomExplanation { get; set; }
+        /// <summary>
+        /// 附件地址
+        /// </summary>
+        public string Attachment { get; set; }
+        /// <summary>
+        /// 信用卡金额
+        /// </summary>
+        public decimal CardPrice { get; set; }
+        /// <summary>
+        /// 确认标识   信用卡金额
+        /// 0:未刷(红色)  1:已刷(绿色)
+        /// </summary>
+        public int IsCardPrice { get; set; }
+        /// <summary>
+        /// 预计单间数量
+        /// </summary>
+        public int PredictSingleRoom { get; set; }
+        /// <summary>
+        /// 预计双人间数量
+        /// </summary>
+        public int PredictDoubleRoom { get; set; }
+        /// <summary>
+        /// 预计套房数量
+        /// </summary>
+        public int PredictSuiteRoom { get; set; }
+        /// <summary>
+        /// 预计其他间数量
+        /// </summary>
+        public int PredictOtherRoom { get; set; }
+        /// <summary>
+        /// 地税
+        /// </summary>
+        public decimal GovernmentRent { get; set; }
+        /// <summary>
+        /// 地税币种
+        /// </summary>
+        public int GovernmentRentCurrency { get; set; }
+        /// <summary>
+        /// 城市税
+        /// </summary>
+        public decimal CityTax { get; set; }
+        /// <summary>
+        /// 城市税币种
+        /// </summary>
+        public int CityTaxCurrency { get; set; }
+        /// <summary>
+        /// 房间入住人类型
+        /// </summary>
+        public string CheckType { get; set; }
+        public int MyProperty { get; set; }
+        /// <summary>
+        /// 创建者Id
+        /// </summary>
+        public int CreateUserId { get; set; }
+        /// <summary>
+        /// 表备注
+        /// </summary>
+        public string Remark { get; set; }
+        //C表参数
+        /// <summary>
+        /// 支付方式
+        /// </summary>
+        public int PayDId { get; set; }
+        /// <summary>
+        /// 消费方式
+        /// </summary>
+        public string ConsumptionPatterns { get; set; }
+        /// <summary>
+        /// 消费日期
+        /// </summary>
+        public String ConsumptionDate { get; set; }
+        /// <summary>
+        /// 卡类型
+        /// </summary>
+        public int CTDId { get; set; }
+
+        /// <summary>
+        /// 公司银行卡号
+        /// </summary>
+        public string CompanyBankNo { get; set; }
+        /// <summary>
+        /// 对方开户行
+        /// </summary>
+        public string OtherBankName { get; set; }
+        /// <summary>
+        /// 对方银行账号
+        /// </summary>
+        public string OtherSideNo { get; set; }
+        /// <summary>
+        /// 对方姓名
+        /// </summary>
+        public string OtherSideName { get; set; }
+
+        /// <summary>
+        /// 银行卡号
+        /// </summary>
+        public string BankNo { get; set; }
+        /// <summary>
+        /// 持卡人姓名
+        /// </summary>
+        public string CardholderName { get; set; }
+        /// <summary>
+        /// 收款方
+        /// </summary>
+        public string Payee { get; set; }
+        /// <summary>
+        /// 费用标识
+        /// </summary>
+        public int OrbitalPrivateTransfer { get; set; }
+
+        /// <summary>
+        /// C表备注
+        /// </summary>
+        public string CRemark { get; set; }
+    }
+}

+ 51 - 0
OASystem/OASystem.Domain/Entities/Groups/Grp_Customers.cs

@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Entities.Groups
+{
+    /// <summary>
+    /// 团组保险费用录入申请
+    /// </summary>
+    [SugarTable("Grp_Customers")]
+    public class Grp_Customers:EntityBase
+    {
+        /// <summary>
+        /// 团组外键编号
+        /// </summary>
+        [SugarColumn(IsNullable =true, ColumnDataType="int")]
+        public int DiId{get; set;}
+
+        /// <summary>
+        /// 客户名称
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
+        public string ClientName { get; set; }
+
+        /// <summary>
+        /// 保险费用
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
+        public decimal InsuranceCosts { get; set; }
+
+        /// <summary>
+        /// 币种
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int Currency { get; set; }
+
+        /// <summary>
+        /// 保险附件
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
+        public string Attachment { get; set; }
+        /// <summary>
+        /// 保险名称
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int Iid { get; set; }
+
+    }
+}

+ 88 - 43
OASystem/OASystem.Domain/Entities/Groups/Grp_HotelReservations.cs

@@ -15,10 +15,10 @@ namespace OASystem.Domain.Entities.Groups
         /// <summary>
         /// 团组Id
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
-        public int DIId { get; set; }
+        [SugarColumn(IsNullable =true,ColumnDataType ="int")]
+        public int DiId { get; set; }
         /// <summary>
-        /// 客人类型 数据类型字表Id
+        /// 客人类型(设置数据外键编号)
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int GTId { get; set; }
@@ -28,7 +28,7 @@ namespace OASystem.Domain.Entities.Groups
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
         public string CheckNumber { get; set; }
         /// <summary>
-        /// 预订网站数据类型字表Id
+        /// 预订网站(设置数据外键编号)
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int ReservationsWebsite { get; set; }
@@ -50,7 +50,7 @@ namespace OASystem.Domain.Entities.Groups
         /// <summary>
         /// 酒店名称
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
         public string HotelName { get; set; }
         /// <summary>
         /// 酒店地址
@@ -60,91 +60,90 @@ namespace OASystem.Domain.Entities.Groups
         /// <summary>
         /// 酒店电话
         /// </summary>
-
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
         public string HotelTel { get; set; }
         /// <summary>
         /// 酒店传真
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(100)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
         public string HotelFax { get; set; }
         /// <summary>
         /// 客人姓名
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
         public string GuestName { get; set; }
         /// <summary>
         /// 入住日期
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "DateTime")]
-        public DateTime CheckInDate { get; set; }
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(80)")]
+        public string CheckInDate { get; set; }
         /// <summary>
         /// 退房日期
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "DateTime")]
-        public DateTime CheckOutDate { get; set; }
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(80)")]
+        public string CheckOutDate { get; set; }
         /// <summary>
-        /// 实际金额
+        /// 预算金额
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10, 2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public decimal Budget { get; set; }
         /// <summary>
-        /// 预算币种 数据类型字表Id
+        /// 预算币种(设置数据外键编号)
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int BudgetCurrency { get; set; }
         /// <summary>
         /// 单间数量
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public int SingleRoomCount { get; set; }
         /// <summary>
         /// 单间单价
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10, 2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public decimal SingleRoomPrice { get; set; }
         /// <summary>
         /// 双间数量
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public int DoubleRoomCount { get; set; }
         /// <summary>
         /// 双间单价
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10, 2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public decimal DoubleRoomPrice { get; set; }
         /// <summary>
         /// 套房数量
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public int SuiteRoomCount { get; set; }
         /// <summary>
         /// 套房单价
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10, 2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public decimal SuiteRoomPrice { get; set; }
         /// <summary>
         /// 其他房型数量
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public int OtherRoomCount { get; set; }
         /// <summary>
         /// 其他房型单价
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10, 2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public decimal OtherRoomPrice { get; set; }
         /// <summary>
         /// 佣金
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10, 2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public decimal Commission { get; set; }
         /// <summary>
-        /// 佣金币种
+        /// 佣金币种(设置数据外键编号)
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "int")] 
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int CommissionCurrency { get; set; }
         /// <summary>
-        /// 佣金标识0否 1是
+        /// 佣金标识
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int CommissionMark { get; set; }
@@ -154,49 +153,95 @@ namespace OASystem.Domain.Entities.Groups
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
         public string RoomExplanation { get; set; }
         /// <summary>
-        /// 附件
+        /// 附件地址
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
         public string Attachment { get; set; }
         /// <summary>
         /// 信用卡金额
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10, 2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public decimal CardPrice { get; set; }
         /// <summary>
-        /// 确认标识信用卡金额 0:未刷(红色)  1:已刷(绿色)
+        /// 确认标识   信用卡金额
+        /// 0:未刷(红色)  1:已刷(绿色)
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int IsCardPrice { get; set; }
         /// <summary>
-        /// 早餐费
+        /// 早饭费
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
+        public decimal BreakfastPrice { get; set; }
+        /// <summary>
+        /// 由地接支付
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int Isoppay { get; set; }
+        /// <summary>
+        /// 是否有单间
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int CboOne { get; set; }
+        /// <summary>
+        /// 是否有双间
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int CboTwo { get; set; }
+        /// <summary>
+        /// 是否有酒店套房
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int CboThree { get; set; }
+        /// <summary>
+        /// 是否有其他房型
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int CboFour { get; set; }
+        /// <summary>
+        /// 预计单间数量
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10, 2)")]
-        public decimal breakfastPrice { get; set; }
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int PredictSingleRoom { get; set; }
         /// <summary>
-        /// 是否由地接支付0否1是
+        /// 预计双人间数量
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
-        public int IsOppay { get; set; }
+        public int PredictDoubleRoom { get; set; }
         /// <summary>
-        /// 是否住了单间0否1是
+        /// 预计套房数量
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
-        public int IsCboOne { get; set; }
+        public int PredictSuiteRoom { get; set; }
         /// <summary>
-        /// 是否住了双间0否1是
+        /// 预计其他间数量
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
-        public int IsCboTwo { get; set; }
+        public int PredictOtherRoom { get; set; }
         /// <summary>
-        /// 是否住了酒店套房0否1是
+        /// 地税
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
+        public decimal GovernmentRent { get; set; }
+        /// <summary>
+        /// 地税币种
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
-        public int IsCboThree { get; set; }
+        public int GovernmentRentCurrency { get; set; }
         /// <summary>
-        /// 是否住了其他房型0否1是
+        /// 城市税
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
+        public decimal CityTax { get; set; }
+        /// <summary>
+        /// 城市税币种
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
-        public int IsCboFour { get; set; }
+        public int CityTaxCurrency { get; set; }
+        /// <summary>
+        /// 房间入住人类型
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        public string CheckType { get; set; }
     }
 }

+ 46 - 0
OASystem/OASystem.Domain/ViewModels/Groups/DelegationInfoView.cs

@@ -64,6 +64,52 @@ namespace OASystem.Domain.ViewModels.Groups
 
     }
 
+    /// <summary>
+    /// 接团信息详情 共享
+    /// 返回视图
+    /// </summary>
+    public class ShareGroupInfoIIView
+    {
+        /// <summary>
+        /// 主键Id
+        /// </summary>
+        public int Id { get; set; }
+        /// <summary>
+        /// 团组名称
+        /// </summary>
+        public string? teamName { get; set; }
+        /// <summary>
+        /// 团号
+        /// </summary>
+        public string? TourCode { get; set; }
+
+        /// <summary>
+        /// 客户名称
+        /// </summary>
+        public string? ClientName { get; set; }
+
+        /// <summary>
+        /// 出访国家
+        /// </summary>
+        public string? VisitCountry { get; set; }
+
+        /// <summary>
+        /// 出团起止日期
+        /// </summary>
+        public string? VisitDate { get; set; }
+
+        /// <summary>
+        /// 出行天数
+        /// </summary>
+        public int VisitDays { get; set; }
+
+        /// <summary>
+        /// 出行人数
+        /// </summary>
+        public int VisitPNumber { get; set; }
+
+    }
+
     /// <summary>
     /// 接团信息详情
     /// 返回视图

+ 225 - 0
OASystem/OASystem.Domain/ViewModels/Groups/HotelReservationsByDiIdView.cs

@@ -0,0 +1,225 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.ViewModels.Groups
+{
+    /// <summary>
+    /// 根据diid查询酒店费用列表
+    /// </summary>
+    public class HotelReservationsByDiIdView
+    {
+        /// <summary>
+        /// 酒店主键Id
+        /// </summary>
+        public int Id { get; set; }
+        /// <summary>
+        /// 客人类型
+        /// </summary>
+        public string GuestType {  get; set; }
+        /// <summary>
+        /// 预订编号
+        /// </summary>
+        public string ReservationsNo { get; set; }
+        /// <summary>
+        /// 酒店名称
+        /// </summary>
+        public string HotelName { get; set; }
+        /// <summary>
+        /// 入住日期
+        /// </summary>
+        public string CheckInDate { get; set; }
+        /// <summary>
+        /// 离店日期
+        /// </summary>
+        public string CheckOutDate { get; set; }
+        /// <summary>
+        /// 付款金额
+        /// </summary>
+        public decimal PayMoney { get; set; }
+        /// <summary>
+        /// 付款币种
+        /// </summary>
+        public string PaymentCurrency { get; set; }
+        /// <summary>
+        /// 创建人Id
+        /// </summary>
+        public string CreateUserName { get; set; }
+        /// <summary>
+        /// 操作时间
+        /// </summary>
+        public DateTime CreateTime { get; set; }
+        /// <summary>
+        /// 总经理是否审核
+        /// </summary>
+        public int IsAuditGM { get; set; }
+
+        /// <summary>
+        /// 总经理是否审核
+        /// </summary>
+        public string IsAuditGMStr { get; set; }
+        /// <summary>
+        /// 附件地址
+        /// </summary>
+        public string Attachment { get; set; }
+    }
+    /// <summary>
+    /// 根据id查询酒店费用详情返回view
+    /// </summary>
+
+    public class HotelReservationsByIdView
+    {
+        public int Id { get; set; }
+        /// <summary>
+        /// 团组Id
+        /// </summary>
+        public int DiId { get; set; }
+        /// <summary>
+        /// 客人类型(设置数据外键编号)
+        /// </summary>
+        public int GTId { get; set; }
+        /// <summary>
+        /// 入住卷号码
+        /// </summary>
+        public string CheckNumber { get; set; }
+        /// <summary>
+        /// 预订网站(设置数据外键编号)
+        /// </summary>
+        public int ReservationsWebsite { get; set; }
+        /// <summary>
+        /// 预订号码
+        /// </summary>
+        public string ReservationsNo { get; set; }
+        /// <summary>
+        /// 酒店确定编号
+        /// </summary>
+        public string DetermineNo { get; set; }
+        /// <summary>
+        /// 所在城市
+        /// </summary>
+        public string City { get; set; }
+        /// <summary>
+        /// 酒店名称
+        /// </summary>
+        public string HotelName { get; set; }
+        /// <summary>
+        /// 酒店地址
+        /// </summary>
+        public string HotelAddress { get; set; }
+        /// <summary>
+        /// 酒店电话
+        /// </summary>
+        public string HotelTel { get; set; }
+        /// <summary>
+        /// 客人姓名
+        /// </summary>
+        public string GuestName { get; set; }
+        /// <summary>
+        /// 入住日期
+        /// </summary>
+        public string CheckInDate { get; set; }
+        /// <summary>
+        /// 退房日期
+        /// </summary>
+        public string CheckOutDate { get; set; }
+        /// <summary>
+        /// 预算金额
+        /// </summary>
+        public decimal Budget { get; set; }
+        /// <summary>
+        /// 预算币种(设置数据外键编号)
+        /// </summary>
+        public int BudgetCurrency { get; set; }
+        /// <summary>
+        /// 单间数量
+        /// </summary>
+        public int SingleRoomCount { get; set; }
+        /// <summary>
+        /// 单间单价
+        /// </summary>
+        public decimal SingleRoomPrice { get; set; }
+        /// <summary>
+        /// 双间数量
+        /// </summary>
+        public int DoubleRoomCount { get; set; }
+        /// <summary>
+        /// 双间单价
+        /// </summary>
+        public decimal DoubleRoomPrice { get; set; }
+        /// <summary>
+        /// 套房数量
+        /// </summary>
+        public int SuiteRoomCount { get; set; }
+        /// <summary>
+        /// 套房单价
+        /// </summary>
+        public decimal SuiteRoomPrice { get; set; }
+        /// <summary>
+        /// 其他房型数量
+        /// </summary>
+        public int OtherRoomCount { get; set; }
+        /// <summary>
+        /// 其他房型单价
+        /// </summary>
+        public decimal OtherRoomPrice { get; set; }
+        /// <summary>
+        /// 房间说明
+        /// </summary>
+        public string RoomExplanation { get; set; }
+        /// <summary>
+        /// 附件地址
+        /// </summary>
+        public string Attachment { get; set; }
+        /// <summary>
+        /// 信用卡金额
+        /// </summary>
+        public decimal CardPrice { get; set; }
+        /// <summary>
+        /// 确认标识   信用卡金额
+        /// 0:未刷(红色)  1:已刷(绿色)
+        /// </summary>
+        public int IsCardPrice { get; set; }
+        /// <summary>
+        /// 预计单间数量
+        /// </summary>
+        public int PredictSingleRoom { get; set; }
+        /// <summary>
+        /// 预计双人间数量
+        /// </summary>
+        public int PredictDoubleRoom { get; set; }
+        /// <summary>
+        /// 预计套房数量
+        /// </summary>
+        public int PredictSuiteRoom { get; set; }
+        /// <summary>
+        /// 预计其他间数量
+        /// </summary>
+        public int PredictOtherRoom { get; set; }
+        /// <summary>
+        /// 地税
+        /// </summary>
+        public decimal GovernmentRent { get; set; }
+        /// <summary>
+        /// 地税币种
+        /// </summary>
+        public int GovernmentRentCurrency { get; set; }
+        /// <summary>
+        /// 城市税
+        /// </summary>
+        public decimal CityTax { get; set; }
+        /// <summary>
+        /// 城市税币种
+        /// </summary>
+        public int CityTaxCurrency { get; set; }
+        /// <summary>
+        /// 房间入住人类型
+        /// </summary>
+        public string CheckType { get; set; }
+        /// <summary>
+        /// 备注
+        /// </summary>
+        public string Remark { get; set; }
+    }
+}

+ 7 - 13
OASystem/OASystem.Infrastructure/Repositories/Groups/CarTouristGuideGroundRepository.cs

@@ -1,5 +1,4 @@
 using AutoMapper;
-using NPOI.OpenXmlFormats.Shared;
 using OASystem.Domain;
 using OASystem.Domain.Dtos.Groups;
 using OASystem.Domain.Entities.Financial;
@@ -7,11 +6,6 @@ using OASystem.Domain.Entities.Groups;
 using OASystem.Domain.Entities.Resource;
 using OASystem.Domain.ViewModels.Groups;
 using OASystem.Infrastructure.Tools;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 
 namespace OASystem.Infrastructure.Repositories.Groups
 {
@@ -119,7 +113,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
             return result;
         }
 
-        public async Task<Result> CarTouristGuideGroundConten(CarTouristGuideGroundContenDto dto)
+        public async Task<Result> CarTouristGuideGroundContent(CarTouristGuideGroundContentDto dto)
         {
             Result result = new Result() { Code = -2, Msg = "未知错误" };
             try
@@ -169,18 +163,18 @@ namespace OASystem.Infrastructure.Repositories.Groups
             }
         }
 
-        public async Task<Result> OpCarTouristGuideGroundContenById(CarTouristGuideGroundIdDto dto)
+        public async Task<Result> OpCarTouristGuideGroundContentById(CarTouristGuideGroundIdDto dto)
         {
             Result result = new Result() { Code = -2, Msg = "未知错误" };
             try
             {
                
-                List<Grp_CarTouristGuideGroundReservationsContent> grp_CarTouristsConten = _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservationsContent>().Where(a=>a.IsDel==0 && a.CTGGRId==dto.Id).ToList();
+                List<Grp_CarTouristGuideGroundReservationsContent> grp_CarTouristsContent = _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservationsContent>().Where(a=>a.IsDel==0 && a.CTGGRId==dto.Id).ToList();
                 Grp_CreditCardPayment _CreditCardPayment = _sqlSugar.Queryable<Grp_CreditCardPayment>().First(a => a.CId == dto.Id && a.IsDel == 0 && a.CTable == 79);
                 Grp_CarTouristGuideGroundReservations grp_CarTouristGuideGround= _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservations>().First(a => a.Id == dto.Id && a.IsDel == 0);
                 var data = new
                 {
-                    CarTouristsConten = grp_CarTouristsConten,
+                    CarTouristsContent = grp_CarTouristsContent,
                     CarTourists = grp_CarTouristGuideGround,
                     CreditCardPayment = _CreditCardPayment,
                 };
@@ -303,14 +297,14 @@ namespace OASystem.Infrastructure.Repositories.Groups
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
-        public async  Task<Result> OpCarTouristGuideGroundConten(OpCarTouristGuideGroundContenDto dto)
+        public async  Task<Result> OpCarTouristGuideGroundContent(OpCarTouristGuideGroundContentDto dto)
         {
             Result result = new Result() { Code = -2, Msg = "未知错误" };
             try
             {
                 BeginTran();
                 List<Grp_CarTouristGuideGroundReservationsContent> carTouristList = new List<Grp_CarTouristGuideGroundReservationsContent>();
-                foreach (var item in dto.OPContenList)
+                foreach (var item in dto.OPContentList)
                 {
                     Grp_CarTouristGuideGroundReservationsContent s = new Grp_CarTouristGuideGroundReservationsContent();
                     s.Id= item.Id;
@@ -320,7 +314,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     s.Price=item.Price;
                     s.PriceContent = item.priceContent;
                     s.Currency = dto.Currency;
-                    s.Remark=item.Remark;
+                    //s.Remark=item.Remark;
                     s.CreateUserId = dto.CreateUserId;
                     carTouristList.Add(s);
                 }

+ 1 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/DecreasePaymentsRepository.cs

@@ -88,6 +88,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 }
                 string sql = string.Format(@"select * from Grp_DelegationInfo where Id in({0}) and IsDel={1}", DiId, 0);
                 List<Grp_DelegationInfo> grp_Delegations = _sqlSugar.SqlQueryable<Grp_DelegationInfo>(sql).ToList();
+                
                 if (grp_Delegations.Count == 0)
                 {
                     return result = new Result() { Code = -1, Msg = "查询失败!" };

+ 212 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/HotelPriceRepository.cs

@@ -0,0 +1,212 @@
+using AutoMapper;
+using OASystem.Domain;
+using OASystem.Domain.Dtos.Groups;
+using OASystem.Domain.Entities.Groups;
+using OASystem.Domain.ViewModels.Groups;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Infrastructure.Repositories.Groups
+{
+    public class HotelPriceRepository : BaseRepository<Grp_HotelReservations, Grp_HotelReservations>
+    {
+        private readonly IMapper _mapper;
+        public HotelPriceRepository(SqlSugarClient sqlSugar, IMapper mapper) :
+            base(sqlSugar)
+        {
+            this._mapper = mapper;
+        }
+
+        public async Task<Result> HotelReservationsByDiId(HotelReservationsByDiIdDto dto)
+        {
+            Result result = new Result() { Code = -2, Msg = "未知错误" };
+            try
+            {
+                string UserId = "";
+                List<Grp_GroupsTaskAssignment> gtaUIdList = _sqlSugar.Queryable<Grp_GroupsTaskAssignment>().Where(a => a.DIId == dto.DiId && a.IsDel == 0 && a.CTId == 76).ToList();
+                foreach (Grp_GroupsTaskAssignment gta in gtaUIdList)
+                    UserId += gta.UId + ",";
+
+                if (!string.IsNullOrWhiteSpace(UserId))
+                {
+                    UserId = UserId.Substring(0, UserId.Length - 1);
+                }
+                else
+                {
+                    UserId = "0";
+                }
+                string sqlWhere = string.Format(@"Where h.DiId={0} and h.IsDel={1} And h.CreateUserId in ({2})", dto.DiId, 0,UserId);
+                
+                int startIndex = (dto.PageIndex - 1) * dto.PageSize + 1;
+                int endIndex = startIndex + dto.PageSize - 1;
+                if (dto.PortType == 1)
+                {
+                    string sql = string.Format(@"select h.Id,s1.Name as GuestType,h.ReservationsNo,h.HotelName,h.CheckInDate,
+                                                h.CheckOutDate,c.PayMoney,s.Name as PaymentCurrency,u.CnName as CreateUserName,c.IsAuditGM,h.CreateTime,h.Attachment
+                                                From Grp_HotelReservations h 
+                                                Join Grp_CreditCardPayment c on h.Id=c.CId and c.CTable=76 and c.IsDel=0
+                                                left Join Sys_SetData s on  c.PaymentCurrency=s.Id and s.IsDel=0
+                                                left Join Sys_SetData s1 on h.GTId=s1.Id and s1.IsDel=0
+                                                left Join Sys_Users u on u.Id=h.CreateUserId and u.isdel=0 {0}", sqlWhere);
+                    List<HotelReservationsByDiIdView> hotelDataList = _sqlSugar.SqlQueryable<HotelReservationsByDiIdView>(sql).ToList();
+                    foreach (var item in hotelDataList)
+                    {
+                        if (item.IsAuditGM == 0) item.IsAuditGMStr = "未审核";
+                        else if (item.IsAuditGM == 1) item.IsAuditGMStr = "已通过";
+                        else if (item.IsAuditGM == 2) item.IsAuditGMStr = "未通过";
+                        else if (item.IsAuditGM == 3) item.IsAuditGMStr = "自动审核";
+
+                    }
+                    return result = new Result() { Code = 0, Msg = "查询成功!", Data = hotelDataList };
+                }
+                else if (dto.PortType == 2 || dto.PortType == 3)
+                {
+                    string sql = string.Format(@"Select * From (	
+                                                Select row_number() over (order by h.Id Desc) as RowNumber,h.Id,s1.Name as GuestType,h.ReservationsNo,h.HotelName,h.CheckInDate,
+                                                h.CheckOutDate,c.PayMoney,s.Name as PaymentCurrency,u.CnName as CreateUserName,c.IsAuditGM,h.CreateTime,h.Attachment
+                                                 From Grp_HotelReservations h 
+                                                Join Grp_CreditCardPayment c on h.Id=c.CId and c.CTable=76 and c.IsDel=0
+                                                left Join Sys_SetData s on  c.PaymentCurrency=s.Id and s.IsDel=0
+                                                left Join Sys_SetData s1 on h.GTId=s1.Id and s1.IsDel=0
+                                                left Join Sys_Users u on u.Id=h.CreateUserId and u.isdel=0  {0}
+                                                ) temp Where RowNumber Between {1} and {2}", sqlWhere, startIndex, endIndex);
+
+                    List<HotelReservationsByDiIdView> hotelDataList = _sqlSugar.SqlQueryable<HotelReservationsByDiIdView>(sql).ToList();
+                    foreach (var item in hotelDataList)
+                    {
+                        if (item.IsAuditGM == 0) item.IsAuditGMStr = "未审核";
+                        else if (item.IsAuditGM == 1) item.IsAuditGMStr = "已通过";
+                        else if (item.IsAuditGM == 2) item.IsAuditGMStr = "未通过";
+                        else if (item.IsAuditGM == 3) item.IsAuditGMStr = "自动审核";
+
+                    }
+                    string CountSql = string.Format(@"Select COUNT(1) as Count From (	
+                                                        Select h.Id,s1.Name as GuestType,h.ReservationsNo,h.HotelName,h.CheckInDate,
+                                                        h.CheckOutDate,c.PayMoney,s.Name as PaymentCurrency,u.CnName as CreateUserName,c.IsAuditGM,h.CreateTime,h.Attachment
+                                                        From Grp_HotelReservations h 
+                                                        Join Grp_CreditCardPayment c on h.Id=c.CId and c.CTable=76 and c.IsDel=0
+                                                        left Join Sys_SetData s on  c.PaymentCurrency=s.Id and s.IsDel=0
+                                                        left Join Sys_SetData s1 on h.GTId=s1.Id and s1.IsDel=0
+                                                        left Join Sys_Users u on u.Id=h.CreateUserId and u.isdel=0  {0}
+                                                        ) temp", sqlWhere);
+                    DataCount dataCount = _sqlSugar.SqlQueryable<DataCount>(CountSql).First();
+                   
+                    int count = dataCount.Count;
+                    float totalPage = (float)count / dto.PageSize;//总页数
+                    if (totalPage == 0) totalPage = 1;
+                    else totalPage = (int)Math.Ceiling((double)totalPage);
+
+                    ListViewBase<HotelReservationsByDiIdView> rst = new ListViewBase<HotelReservationsByDiIdView>();
+                    rst.DataList = hotelDataList;
+                    rst.DataCount = count;
+                    rst.CurrPageIndex = dto.PageIndex;
+                    rst.CurrPageSize = dto.PageSize;
+                    return result = new Result() { Code = 0, Msg = "查询成功!", Data = rst };
+                   
+                }
+                else
+                {
+                    return result = new Result() { Code = -2, Msg = "请传入PortType参数,1 Web 2 Android 3 IOS" };
+                }
+            }
+            catch (Exception ex)
+            {
+                return result = new Result() { Code = -2, Msg = "未知错误" };
+                throw;
+            }
+        }
+
+        public async Task<Result> HotelReservationsById(HotelReservationsByIdDto dto)
+        {
+            Result result = new Result() { Code = -2, Msg = "未知错误" };
+            try
+            {
+                Grp_HotelReservations hotelReservationsById = _sqlSugar.Queryable<Grp_HotelReservations>().First(a => a.IsDel == 0 && a.Id == dto.Id);
+                HotelReservationsByIdView _hotelReservations = _mapper.Map<HotelReservationsByIdView>(hotelReservationsById);
+                Grp_CreditCardPayment _CreditCardPayment = _sqlSugar.Queryable<Grp_CreditCardPayment>().First(a => a.CId == dto.Id && a.IsDel == 0 && a.CTable == 76);
+                var data = new
+                {
+                    hotelReservations = _hotelReservations,
+                    creditCardPayment = _CreditCardPayment,
+                };
+                return result = new Result() { Code = 0, Msg = "查询成功",Data= data };
+            }
+            catch (Exception ex)
+            {
+                return result = new Result() { Code = -2, Msg = "未知错误" };
+                throw;
+            }
+        }
+
+        public async Task<Result> HotelReservationsInitialize(HotelReservationsDto dto)
+        {
+            Result result = new Result() { Code = -2, Msg = "未知错误" };
+            try
+            {
+                List<Grp_GroupsTaskAssignment> grp_GroupsTaskAssignment = Query<Grp_GroupsTaskAssignment>(a => a.IsDel == 0 && a.UId == dto.UserId && a.CTId == 76).ToList();
+
+                string DiId = "0";
+                foreach (var item in grp_GroupsTaskAssignment)
+                {
+                    DiId += item.DIId + ",";
+                }
+                if (DiId != "0")
+                {
+                    DiId = DiId.Substring(0, DiId.Length - 1);
+                }
+                string sql = string.Format(@"select * from Grp_DelegationInfo where Id in({0}) and IsDel={1}", DiId, 0);
+                //团组下拉框
+                List<Grp_DelegationInfo> Delegations = _sqlSugar.SqlQueryable<Grp_DelegationInfo>(sql).ToList();
+                List<ShareGroupInfoIIView> grp_Delegations = _mapper.Map<List<ShareGroupInfoIIView>>(Delegations);
+                for (int i = 0;i< grp_Delegations.Count; i++)
+                {
+                    grp_Delegations[i].VisitDate = Delegations[i].VisitStartDate.ToString("yyyy-MM-dd")+"至"+ Delegations[i].VisitEndDate.ToString("yyyy-MM-dd");
+                }
+                //客人类型
+                List<Sys_SetData> GuestType = _sqlSugar.Queryable<Sys_SetData>().Where(a=>a.IsDel==0 && a.STid==11).ToList();
+                List<SetDataInfoView> _GuestType = _mapper.Map<List<SetDataInfoView>>(GuestType);
+
+                //支付方式
+                List<Sys_SetData> Payment = _sqlSugar.Queryable<Sys_SetData>().Where(a => a.STid == 14 && a.IsDel == 0).ToList();
+                List<SetDataInfoView> _Payment = _mapper.Map<List<SetDataInfoView>>(Payment);
+
+                //币种
+                List<Sys_SetData> CurrencyList = _sqlSugar.Queryable<Sys_SetData>().Where(a => a.STid == 66 && a.IsDel == 0).ToList();
+                List<SetDataInfoView> _CurrencyList = _mapper.Map<List<SetDataInfoView>>(CurrencyList);
+
+                //卡类型
+                List<Sys_SetData> BankCard = _sqlSugar.Queryable<Sys_SetData>().Where(a => a.STid == 15 && a.IsDel == 0).ToList();
+                List<SetDataInfoView> _BankCard = _mapper.Map<List<SetDataInfoView>>(BankCard);
+
+                //预订网站
+                List<Sys_SetData> BookingWebsite = _sqlSugar.Queryable<Sys_SetData>().Where(a => a.STid == 12 && a.IsDel == 0).ToList();
+                List<SetDataInfoView> _BookingWebsite = _mapper.Map<List<SetDataInfoView>>(BookingWebsite);
+
+                var data = new
+                {
+                    Delegations = grp_Delegations,
+                    GuestType = _GuestType,
+                    Payment = _Payment,
+                    CurrencyList = _CurrencyList,
+                    BankCard = _BankCard,
+                    BookingWebsite = _BookingWebsite,
+                };
+                return result = new Result() { Code = 0, Msg = "查询成功",Data=data };
+            }
+            catch (Exception ex)
+            {
+               return result = new Result() { Code = -2, Msg = "未知错误" };
+                throw;
+            }
+        }
+
+        public Task<Result> OpHotelReservations(OpHotelReservationsData dto)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 1 - 1
OASystem/OASystem.Infrastructure/Repositories/Resource/HotelDataRepository.cs

@@ -1,5 +1,6 @@
 using AutoMapper;
 using OASystem.Domain;
+using OASystem.Domain.Dtos.Groups;
 using OASystem.Domain.Dtos.Resource;
 using OASystem.Domain.Entities.Resource;
 using OASystem.Domain.ViewModels.Resource;
@@ -18,7 +19,6 @@ namespace OASystem.Infrastructure.Repositories.Resource
         {
             _mapper= mapper;
         }
-
         public async Task<Result> OperationHotelData(OperationHotelDto dto)
         {
             Result result = new Result() { Code = -2, Msg = "未知错误" };