Browse Source

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

wangh 1 year ago
parent
commit
40209f92b4
34 changed files with 3153 additions and 381 deletions
  1. 158 13
      OASystem/OASystem.Api/Controllers/BusinessController.cs
  2. 1 1
      OASystem/OASystem.Api/Controllers/FinancialController.cs
  3. 807 197
      OASystem/OASystem.Api/Controllers/GroupsController.cs
  4. 307 0
      OASystem/OASystem.Api/Controllers/StatisticsController.cs
  5. 43 9
      OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs
  6. 129 6
      OASystem/OASystem.Api/OAMethodLib/PayrollComputation.cs
  7. 8 1
      OASystem/OASystem.Api/appsettings.json
  8. 6 0
      OASystem/OASystem.Domain/AutoMappers/_baseMappingProfile.cs
  9. 1 1
      OASystem/OASystem.Domain/Dtos/Financial/TeamRateDto.cs
  10. 5 0
      OASystem/OASystem.Domain/Dtos/Groups/GroupCostSavaDto.cs
  11. 24 1
      OASystem/OASystem.Domain/Dtos/Groups/GroupListDto.cs
  12. 27 4
      OASystem/OASystem.Domain/Dtos/Groups/GrpCreditCardPaymentDto.cs
  13. 268 0
      OASystem/OASystem.Domain/Dtos/Groups/HotelReservationsDto.cs
  14. 44 0
      OASystem/OASystem.Domain/Dtos/Statistics/GroupStatementDto.cs
  15. 1 1
      OASystem/OASystem.Domain/Entities/Financial/Fin_ForeignReceivables.cs
  16. 1 1
      OASystem/OASystem.Domain/Entities/Financial/Fin_PaymentRefundAndOtherMoney.cs
  17. 1 0
      OASystem/OASystem.Domain/Entities/Groups/Grp_DecreasePayments.cs
  18. 26 4
      OASystem/OASystem.Domain/Entities/Groups/Grp_HotelReservations.cs
  19. 1 1
      OASystem/OASystem.Domain/Entities/System/Sys_SystemMenuAndFunction.cs
  20. 5 20
      OASystem/OASystem.Domain/ViewModels/Financial/Fin_PaymentRefundAndOtherMoneyView.cs
  21. 0 1
      OASystem/OASystem.Domain/ViewModels/Financial/Fin_ProceedsReceivedView.cs
  22. 124 13
      OASystem/OASystem.Domain/ViewModels/Groups/DelegationInfoView.cs
  23. 34 35
      OASystem/OASystem.Domain/ViewModels/Groups/Grp_CreditCardPaymentView.cs
  24. 324 0
      OASystem/OASystem.Domain/ViewModels/Groups/HotelReservationsByDiIdView.cs
  25. 400 0
      OASystem/OASystem.Domain/ViewModels/Statistics/GroupStatementView.cs
  26. 7 7
      OASystem/OASystem.Domain/ViewModels/ViewBase.cs
  27. 17 15
      OASystem/OASystem.Infrastructure/Repositories/Financial/PaymentRefundAndOtherMoneyRepository.cs
  28. 19 0
      OASystem/OASystem.Infrastructure/Repositories/Financial/ProceedsReceivedRepository.cs
  29. 9 5
      OASystem/OASystem.Infrastructure/Repositories/Groups/CustomersRepository.cs
  30. 34 10
      OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationInfoRepository.cs
  31. 10 0
      OASystem/OASystem.Infrastructure/Repositories/Groups/GroupCostParameterRepository.cs
  32. 249 5
      OASystem/OASystem.Infrastructure/Repositories/Groups/HotelPriceRepository.cs
  33. 61 28
      OASystem/OASystem.Infrastructure/Repositories/Groups/TeamRateRepository.cs
  34. 2 2
      OASystem/OASystem.Infrastructure/Repositories/Login/LoginRepository.cs

+ 158 - 13
OASystem/OASystem.Api/Controllers/BusinessController.cs

@@ -17,6 +17,7 @@ using OASystem.Infrastructure.Repositories.Business;
 using OASystem.Infrastructure.Repositories.Groups;
 using OASystem.Infrastructure.Repositories.System;
 using Org.BouncyCastle.Asn1.Mozilla;
+using StackExchange.Redis;
 
 namespace OASystem.API.Controllers
 {
@@ -41,9 +42,10 @@ namespace OASystem.API.Controllers
             _teamRateRep = teamRateRep;
         }
 
-        #region 团组信息 团组详情
+        #region 团组信息 
         /// <summary>
-        ///  团组信息 团组详情
+        ///  团组信息 
+        ///  团组简略详情 
         /// </summary>
         /// <param name="dto">团组info请求dto</param>
         /// <returns></returns>
@@ -51,13 +53,22 @@ namespace OASystem.API.Controllers
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> PostShareGroupInfo(ShareGroupInfoDto dto)
         {
-            var groupData = await _groupRep.PostShareGroupInfo(dto);
-            if (groupData.Code != 0)
+            try
             {
-                return Ok(JsonView(false, groupData.Msg));
+                var groupData = await _groupRep.PostShareGroupInfo(dto);
+                if (groupData.Code != 0)
+                {
+                    return Ok(JsonView(false, groupData.Msg));
+                }
+
+                return Ok(JsonView(groupData.Data));
             }
+            catch (Exception ex)
+            {
 
-            return Ok(JsonView(groupData.Data));
+                return Ok(JsonView(false, ex.Message));
+            }
+            
         }
 
         /// <summary>
@@ -78,6 +89,118 @@ namespace OASystem.API.Controllers
             return Ok(JsonView(groupData.Data, groupData.Data.Count));
         }
 
+        /// <summary>
+        /// 获取团组指向分类
+        /// </summary>
+        /// <param name="_dto">参数Json字符串</param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> PostGroupDirectionalClassificationInit()
+        {
+            Result result = new Result();
+            result = await _setDataRep.GetSetDataBySTId(_setDataRep, 16); //团组指向分类
+            if (result.Code != 0)
+            {
+                return Ok(JsonView(false, "获取失败!"));
+            }
+
+            List<SetDataInfoView> _view1 = JsonConvert.DeserializeObject<List<SetDataInfoView>>(JsonConvert.SerializeObject(result.Data));
+
+            SetDataInfoView xc_view = new SetDataInfoView();//77	行程 //移除行程
+            xc_view = _view1.Where(it => it.Id == 77).FirstOrDefault();
+            if (xc_view != null) {  _view1.Remove(xc_view); };
+
+
+            List<SetDataInfoView> _view = new List<SetDataInfoView>();
+            //_view.Insert(0, new SetDataInfoView { Id = -1, Name = "所有模块" });
+
+            SetDataInfoView qz_view = new SetDataInfoView();//80	签证
+            qz_view = _view1.Where(it => it.Id == 80).FirstOrDefault();
+            if (qz_view != null) { _view.Insert(0, qz_view); _view1.Remove(qz_view); };
+
+            SetDataInfoView jpyd_view = new SetDataInfoView();//85	机票预订
+            jpyd_view = _view1.Where(it => it.Id == 85).FirstOrDefault();
+            if (jpyd_view != null) { _view.Insert(1, jpyd_view); _view1.Remove(jpyd_view); };
+
+            SetDataInfoView jdyd_view = new SetDataInfoView();//76	酒店预订
+            jdyd_view = _view1.Where(it => it.Id == 76).FirstOrDefault();
+            if (jdyd_view != null) { _view.Insert(2, jdyd_view); _view1.Remove(jdyd_view); };
+
+            SetDataInfoView jdzc_view = new SetDataInfoView();//751	酒店早餐
+            jdzc_view = _view1.Where(it => it.Id == 751).FirstOrDefault();
+            if (jdzc_view != null) { _view.Insert(3, jdzc_view); _view1.Remove(jdzc_view); };
+
+            SetDataInfoView cdy_view = new SetDataInfoView();//79	车/导游地接
+            cdy_view = _view1.Where(it => it.Id == 79).FirstOrDefault();
+            if (cdy_view != null) { _view.Insert(4, cdy_view); _view1.Remove(cdy_view); };
+
+            SetDataInfoView yqgw_view = new SetDataInfoView();//81	邀请/公务活动
+            yqgw_view = _view1.Where(it => it.Id == 81).FirstOrDefault();
+            if (yqgw_view != null) { _view.Insert(5, yqgw_view); _view1.Remove(yqgw_view); };
+
+            SetDataInfoView bx_view = new SetDataInfoView();//82	团组客户保险
+            bx_view = _view1.Where(it => it.Id == 82).FirstOrDefault();
+            if (bx_view != null) { _view.Insert(6, bx_view); _view1.Remove(bx_view); };
+
+            SetDataInfoView qtkx_view = new SetDataInfoView();//98	其他款项
+            qtkx_view = _view1.Where(it => it.Id == 98).FirstOrDefault();
+            if (qtkx_view != null) { _view.Insert(7, qtkx_view); _view1.Remove(qtkx_view); };
+
+            SetDataInfoView skth_view = new SetDataInfoView();//285	收款退还与其他款项
+            skth_view = _view1.Where(it => it.Id == 285).FirstOrDefault();
+            if (skth_view != null) { _view.Insert(8, skth_view); _view1.Remove(skth_view); };
+
+            if (_view1.Count > 0)
+            {
+                _view.AddRange(_view1);
+            }
+
+            return Ok(JsonView(_view));
+        }
+
+
+        /// <summary>
+        /// 查询团组简略详情列表
+        /// Page 根据Ctable And User 返回可操作的团
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> PostGroupListByCTableAndUserId(GroupListByCTableAndUserIdDto dto)
+        {
+            if (dto.CTable < 1) Ok(JsonView(false, @"请输入正确的员工给Id!"));
+
+            if (dto.CTable < 1) 
+                return Ok(JsonView(false, @"请输入正确的CTable Id !76 酒店预订  77 行程  79 车/导游地接<br/>80 签证    81 邀请/公务活动  82 团组客户保险<br\>85 机票预订   98 其他款项 751 酒店早餐"));
+
+            if (dto.PortType == 1 || dto.PortType == 2 || dto.PortType == 3)
+            {
+                string sql = string.Format(@"Select row_number() over(order by di.VisitStartDate Desc) as Row_Number, 
+									         di.Id,di.TeamName,di.TourCode,di.ClientName,di.VisitCountry,di.VisitStartDate,
+									         di.VisitEndDate,di.VisitDays,di.VisitPNumber
+									         From Grp_GroupsTaskAssignment gta
+									         Inner Join Grp_DelegationInfo di On gta.DIId = di.Id
+									         Where gta.IsDel = 0 And di.IsDel = 0 And gta.IsEnable = 1
+									         And gta.CTId = {0} And gta.UId = {1}", dto.CTable, dto.UserId);
+
+                RefAsync<int> total = 0;//REF和OUT不支持异步,想要真的异步这是最优解
+                var data = await _groupRep._sqlSugar.SqlQueryable<GroupListByCTableAndUserIdView>(sql).ToPageListAsync(dto.PageIndex, dto.PageSize, total); //ToPageAsync
+                foreach (var item in data)
+                {
+                    item.VisitStartDate = item.VisitStartDate == "" ? "" : Convert.ToDateTime(item.VisitStartDate).ToString("yyyy-MM-dd");
+                    item.VisitEndDate = item.VisitEndDate == "" ? "" : Convert.ToDateTime(item.VisitEndDate).ToString("yyyy-MM-dd");
+                }
+
+                return Ok(JsonView(true, "操作成功!", data, total));
+            }
+            else
+            {
+                return Ok(JsonView(false, @"请输入正确的PortType 1 Web 2 Android 3 IOS "));
+            }
+        }
+
         #endregion
 
         #region 币种 List
@@ -108,14 +231,12 @@ namespace OASystem.API.Controllers
             }
         }
 
-
         /// <summary>
         /// 团组汇率 币种 Item (来源:团组汇率)
         /// 根据 团组Id And 业务类型(CTable)Id
+        /// api处理CTable = 285,默认返回CNY
         /// </summary>
-        /// <param name="portType"> 1 Web 2 Android 3 Ios; </param>
-        /// <param name="diId"> 团组Id </param>
-        /// <param name="CTbale"> CTableType Id  </param>
+        /// <param name="dto"> 请求参数Dto </param>
         /// <returns></returns>
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
@@ -132,7 +253,7 @@ namespace OASystem.API.Controllers
                 {
                     return Ok(JsonView(false, "请输入正确的团组Id!"));
                 }
-                if (dto.CTbale == 0)
+                if (dto.CTable == 0)
                 {
                     return Ok(JsonView(false, "请输入正确的业务类型(CTable)Id!"));
                 }
@@ -142,7 +263,7 @@ namespace OASystem.API.Controllers
                 {
                     string teamRateInfoSql = string.Format(@"Select sd.Name,tr.* From Grp_TeamRate tr 
                                                      Left Join Sys_SetData  sd On sd.IsDel=0 And sd.STid=16  And tr.CTable = sd.Id 
-                                                     Where tr.IsDel = 0 And tr.DiId = {0} And tr.CTable = {1}", dto.DiId,dto.CTbale);
+                                                     Where tr.IsDel = 0 And tr.DiId = {0} And tr.CTable = {1}", dto.DiId,dto.CTable);
 
                     var teamRateInfo = await _teamRateRep._sqlSugar.SqlQueryable<TeamRateInfoView>(teamRateInfoSql).ToListAsync();
 
@@ -151,6 +272,31 @@ namespace OASystem.API.Controllers
                     TeamRateModelGeneralView teamRateModels = new TeamRateModelGeneralView();
 
 
+                    #region 单独处理Ctable 币种汇率 默认 为CNY
+                    if (dto.CTable == 285)
+                    {
+                        teamRateModels = new TeamRateModelGeneralView()
+                        {
+                            Id = 0,
+                            CTableId = 285,
+                            CTableName = "其他款项与收款退还",
+                            TeamRates = new List<TeamRateDescAddCurrencyIdView>() {
+                                new TeamRateDescAddCurrencyIdView()
+                                {
+                                    CurrencyId = 836,
+                                    CurrencyCode = "CNY",
+                                    CurrencyName = "人民币",
+                                    Rate = 1.0000M,
+                                }
+                            }
+                        };
+                        return Ok(JsonView(true, "操作成功!", teamRateModels));
+                    }
+
+
+                    #endregion
+
+
                     List<SetDataInfoView> currencyDatas = new List<SetDataInfoView>();    
                     #region 获取所有币种
 
@@ -321,7 +467,6 @@ namespace OASystem.API.Controllers
         }
         #endregion
 
-
         #region 会务物料单
 
         /// <summary>

+ 1 - 1
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -912,7 +912,7 @@ namespace OASystem.API.Controllers
 
                 #endregion
 
-                Result _result = await _paymentRefundAndOtherMoneyRep.PostItemByDiId(dto.DiId);
+                Result _result = await _paymentRefundAndOtherMoneyRep._ItemByDiId(dto.DiId);
 
                 if (dto.PortType == 1 || dto.PortType == 2 || dto.PortType == 3)  //1 Web 2 Android 3 Ios
                 {

File diff suppressed because it is too large
+ 807 - 197
OASystem/OASystem.Api/Controllers/GroupsController.cs


+ 307 - 0
OASystem/OASystem.Api/Controllers/StatisticsController.cs

@@ -0,0 +1,307 @@
+using Microsoft.AspNetCore.Mvc;
+using NPOI.POIFS.Properties;
+using NPOI.SS.Formula.Functions;
+using OASystem.API.OAMethodLib;
+using OASystem.Domain.Dtos.Groups;
+using OASystem.Domain.Dtos.Statistics;
+using OASystem.Domain.Entities.Financial;
+using OASystem.Domain.ViewModels.Financial;
+using OASystem.Domain.ViewModels.Groups;
+using OASystem.Domain.ViewModels.Statistics;
+using OASystem.Infrastructure.Repositories.Groups;
+using static OpenAI.GPT3.ObjectModels.SharedModels.IOpenAiModels;
+using System;
+
+namespace OASystem.API.Controllers
+{
+    /// <summary>
+    /// 统计模块
+    /// </summary>
+    [Route("api/[controller]")]
+    [ApiController]
+    public class StatisticsController : ControllerBase
+    {
+
+        private readonly IMapper _mapper;
+        private readonly SqlSugarClient _sqlSugar;
+        private readonly DelegationInfoRepository _groupRep;
+        private readonly SetDataRepository _setDataRep;
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="mapper"></param>
+        /// <param name="sqlSugar"></param>
+        /// <param name="groupRep"></param>
+        /// <param name="setDataRep"></param>
+        public StatisticsController(IMapper mapper, SqlSugarClient sqlSugar, DelegationInfoRepository groupRep, SetDataRepository setDataRep)
+        {
+            _mapper = mapper;
+            _groupRep = groupRep;
+            _setDataRep = setDataRep;
+            _sqlSugar = sqlSugar;
+        }
+
+
+        #region 团组报表
+
+        /// <summary>
+        ///  团组报表
+        ///  Items 
+        /// </summary>
+        /// <param name="_dto">团组列表请求dto</param>
+        /// <returns></returns>
+        [HttpPost("PostGroupStatementItems")]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> PostGroupStatementItems(GroupStatementItemsDto _dto)
+        {
+            #region  参数验证
+            if (_dto.UserId < 1) return Ok(JsonView(false, "员工Id为空"));
+            if (_dto.PageId < 1) return Ok(JsonView(false, "页面Id为空"));
+
+            PageFunAuthViewBase pageFunAuthView = new PageFunAuthViewBase();
+            #region 页面操作权限验证
+            pageFunAuthView = await GeneralMethod.PostUserPageFuncDatas(_dto.UserId, _dto.PageId);
+
+            if (pageFunAuthView.CheckAuth == 0) return Ok(JsonView(false, "您没有查看权限"));
+            #endregion
+
+            #endregion
+            if (_dto.PortType == 1 || _dto.PortType == 2 || _dto.PortType == 3) // web/Android/IOS
+            {
+                string sqlWhere = string.Empty;
+                if (_dto.IsSure == 0) //未完成
+                {
+                    sqlWhere += string.Format(@" And IsSure = 0");
+                }
+                else if (_dto.IsSure == 1) //已完成
+                {
+                    sqlWhere += string.Format(@" And IsSure = 1");
+                }
+
+                if (!string.IsNullOrEmpty(_dto.SearchCriteria))
+                {
+                    string tj = _dto.SearchCriteria;
+                    sqlWhere += string.Format(@"And (ssd.Name Like '%{0}%' Or TeamName Like '%{1}%' Or ClientName Like '%{2}%' Or  ClientName Like '%{3}%' Or su.CnName  Like '%{4}%')",
+                       tj, tj, tj, tj, tj);
+                }
+
+                string sql = string.Format(@"Select row_number() over(order by gdi.VisitDate Desc) as Row_Number, 
+											    gdi.Id,TourCode,ssd1.Id TeamLevId,ssd1.Name TeamLev,TeamName,
+											    ClientName,ClientUnit,VisitDate,ssd.Id TeamTypeId, ssd.Name TeamType,
+											    VisitDays,VisitPNumber,su.CnName JietuanOperator,IsSure,gdi.CreateTime,
+											    pr.LastCollectionTime
+											    From  Grp_DelegationInfo gdi
+											    Left Join Sys_SetData ssd On gdi.TeamDid = ssd.Id 
+											    Left Join Sys_SetData ssd1 On gdi.TeamLevSId = ssd1.Id
+											    Left Join Sys_Users su On gdi.JietuanOperator = su.Id
+											    Left Join (
+												    SELECT Diid, MAX(CreateTime) LastCollectionTime
+												    FROM Fin_ProceedsReceived
+												    Where IsDel = 0
+												    GROUP BY Diid
+											    ) pr On gdi.Id = pr.Diid
+										    Where gdi.IsDel = 0 {0} ", sqlWhere);
+
+                RefAsync<int> total = 0;//REF和OUT不支持异步,想要真的异步这是最优解
+                var _DelegationList = await _sqlSugar.SqlQueryable<GroupStatementItemView>(sql).ToPageListAsync(_dto.PageIndex, _dto.PageSize, total);//ToPageAsync
+
+                var _view = new
+                {
+                    PageFuncAuth = pageFunAuthView,
+                    Data = _DelegationList
+                };
+                return Ok(JsonView(true, "查询成功!", _view, total));
+
+            }
+            else
+            {
+                return Ok(JsonView(false, "查询失败"));
+            }
+        }
+
+        /// <summary>
+        ///  团组报表
+        ///  Details 
+        /// </summary>
+        /// <param name="_dto">团组列表请求dto</param>
+        /// <returns></returns>
+        [HttpPost("PostGroupStatementDetails")]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> PostGroupStatementDetails(GroupStatementDetailsDto _dto)
+        {
+            #region  参数验证
+            if (_dto.UserId < 1) return Ok(JsonView(false, "员工Id为空"));
+            if (_dto.PageId < 1) return Ok(JsonView(false, "页面Id为空"));
+            if (_dto.DiId < 1) return Ok(JsonView(false, "团组Id为空"));
+
+            PageFunAuthViewBase pageFunAuthView = new PageFunAuthViewBase();
+            #region 页面操作权限验证
+            pageFunAuthView = await GeneralMethod.PostUserPageFuncDatas(_dto.UserId, _dto.PageId);
+
+            if (pageFunAuthView.CheckAuth == 0) return Ok(JsonView(false, "您没有查看权限"));
+            #endregion
+
+            #endregion
+            if (_dto.PortType == 1 || _dto.PortType == 2 || _dto.PortType == 3) // web/Android/IOS
+            {
+                GroupStatementDetailsView _view = new GroupStatementDetailsView();
+
+                #region 费用类型 币种,转账
+
+                List<Sys_SetData> _setDatas = await _sqlSugar.Queryable<Sys_SetData>().Where(it => it.IsDel == 0).ToListAsync();
+
+                #endregion
+
+                #region 团组收入
+
+                GroupIncomeView _giView = new GroupIncomeView();
+
+                /*
+                 * 应收报表
+                 */
+                decimal frTotalAmount = 0.00M;//应收总金额
+                string _frSql = string.Format(@"Select fr.Id,fr.Diid,fr.PriceName,fr.Price,fr.Count,fr.Unit,fr.Currency,
+										        sd.Name As CurrencyCode,sd.Remark As CurrencyName,fr.Rate,fr.ItemSumPrice
+										        From Fin_ForeignReceivables fr
+										        Left Join Sys_SetData sd On fr.Currency = sd.Id
+										        Where fr.IsDel = 0 And fr.Diid = {0}",_dto.DiId);
+                List<Gsd_ForeignReceivablesView> _frViews = await _sqlSugar.SqlQueryable<Gsd_ForeignReceivablesView>(_frSql).ToListAsync();
+                frTotalAmount = _frViews.Sum(it => it.ItemSumPrice);
+                _giView.Receivables = _frViews;
+                _giView.ReceivableStr = string.Format(@"应收款合计:{0} CNY(人名币)", frTotalAmount.ConvertToDecimal1().ToString("#0.00"));
+
+                /*
+                 * 已收报表
+                 */
+                decimal prTotalAmount = 0.00M;//已收总金额
+                string _prSql = string.Format(@"Select pr.Id,pr.Diid,pr.SectionTime,pr.Price,pr.Currency,
+										        sd1.Name As CurrencyCode,sd1.Remark As CurrencyName,pr.Client,
+										        pr.ReceivablesType,sd2.Name As ReceivablesTypeName,pr.Remark
+										        From Fin_ProceedsReceived  pr
+										        Left Join Sys_SetData sd1 On pr.Currency = sd1.Id
+										        Left Join Sys_SetData sd2 On pr.ReceivablesType = sd2.Id
+										        Where pr.IsDel = 0 and pr.Diid = {0}", _dto.DiId);
+                List<Gsd_ProceedsReceivedView> _prViews = await _sqlSugar.SqlQueryable<Gsd_ProceedsReceivedView>(_prSql).ToListAsync();
+                prTotalAmount = _prViews.Sum(it => it.Price);
+                _giView.ProceedsReceiveds = _prViews;
+                _giView.ProceedsReceivedStr = string.Format(@"已收款合计:{0} CNY(人名币)", prTotalAmount.ConvertToDecimal1().ToString("#0.00"));
+
+
+                /*
+                 * 超支费用 
+                 * 未挪表
+                 */
+
+                /*
+                 * 收款退还
+                 */
+                decimal promTotalAmount = 0.00M;// 收款退还总金额
+                List<Gsd_PaymentRefundAndOtherMoneyView> _promView = new List<Gsd_PaymentRefundAndOtherMoneyView>();
+
+                string _ropSql = string.Format(@"Select u.CnName As Appliction,prom.Id As PrId,prom.DiId As PrDiId,prom.Price As PrPrice,
+										         prom.PriceName AS PrPriceName,prom.CurrencyId As PrCurrencyId,
+										         prom.PayType As PrPayType,prom.PriceType As PrPriceType,ccp.*
+										         From Fin_PaymentRefundAndOtherMoney prom
+										         Left Join Grp_CreditCardPayment ccp On prom.DiId = ccp.DIId And prom.Id = ccp.CId
+										         Left Join Sys_Users u On ccp.CreateUserId = u.Id
+										         Where prom.IsDel = 0  And prom.PayType = 1 And prom.PriceType = 1 And ccp.CTable = 285
+										         And ccp.IsAuditGM = 1 And ccp.IsPay = 1
+										         And prom.DiId =   {0}", _dto.DiId);
+                var _promDatas = await _sqlSugar.SqlQueryable<Gsd_PaymentRefundAndOtherMoneyDataSource1View>(_ropSql).ToListAsync();
+
+                
+
+                foreach (var ropItem in _promDatas)
+                {
+                    string thisCueencyCode = "Unknown";
+                    string thisCueencyName = "Unknown";
+                    var currency = _setDatas.Where(it => it.Id == ropItem.PaymentCurrency).FirstOrDefault();
+                    if (currency != null)
+                    {
+                        thisCueencyCode = currency.Name;
+                        thisCueencyName = currency.Remark;
+                    }
+
+                    string orbitalPrivateTransferStr = "Unknown";
+                    var orbitalPrivateTransfer = _setDatas.Where(it => it.Id == ropItem.OrbitalPrivateTransfer).FirstOrDefault();
+                    if (orbitalPrivateTransfer != null)
+                    {
+                        orbitalPrivateTransferStr = orbitalPrivateTransfer.Name;
+                    }
+
+                    string payStr = "Unknown";
+                    var pay = _setDatas.Where(it => it.Id == ropItem.PayDId).FirstOrDefault();
+                    if (pay != null)
+                    {
+                        payStr = pay.Name;
+                    }
+
+                    Gsd_PaymentRefundAndOtherMoneyView gsd_PaymentRefund = new Gsd_PaymentRefundAndOtherMoneyView()
+                    {
+                        Id = ropItem.Id,
+                        DiId = ropItem.DIId,
+                        PriceName = ropItem.PrPriceName,
+                        PayCurrencyCode = thisCueencyCode,
+                        PayCurrencyName = thisCueencyName,
+                        Price = ropItem.PrPrice,
+                        CNYPrice = ropItem.RMBPrice,
+                        ThisRate = ropItem.DayRate,
+                        Payee = ropItem.Payee,
+                        PayTime = ropItem.AuditGMDate,
+                        FeeType = orbitalPrivateTransferStr,
+                        PayType = payStr,
+                        PayStatus = ropItem.IsPay == 0 ? "未付款" : "已付款",
+                        Applicant = ropItem.Appliction
+
+                    };
+
+                    _promView.Add(gsd_PaymentRefund);
+                }
+
+                promTotalAmount = _promView.Sum(it => it.CNYPrice);
+                _giView.PaymentRefundAndOtherMoneys = _promView;
+                _giView.PaymentRefundAndOtherMoneyStr = string.Format(@"人名币总费用:{0} CNY", promTotalAmount.ConvertToDecimal1().ToString("#0.00"));
+
+                decimal BalancePayment = frTotalAmount - prTotalAmount + promTotalAmount;
+                _view.GroupIncome = _giView;
+                _view.GroupIncomeStr = string.Format(@"剩余尾款:{0} (包含了收款退还费用数据)", BalancePayment.ConvertToDecimal1().ToString("#0.00"));
+                #endregion
+
+                #region 团组支出
+                GroupExpenditureView _geView = new GroupExpenditureView();
+
+                #region 酒店预定费用
+
+                #endregion
+          //      Select hr.Id As HrId,hr.DiId As HrDiId,hr.City,hr.HotelName,hr.CheckInDate,hr.CheckOutDate,
+										//ccp.PaymentCurrency,sd1.Name As PaymentCurrencyName,hr.SingleRoomPrice,hr.SingleRoomCount,
+										//hr.DoubleRoomPrice,hr.DoubleRoomCount,hr.SuiteRoomPrice,hr.SuiteRoomCount,hr.OtherRoomPrice,
+										//hr.OtherRoomCount,hr.GovernmentRent,hr.CityTax,hr.Commission,ccp.PayMoney,ccp.RMBPrice As CNYPrice,
+										//ccp.DayRate,ccp.Payee,
+										//From Grp_HotelReservations  hr
+          //                              Inner Join Grp_CreditCardPayment ccp On hr.Id = ccp.CId
+
+          //                              Left Join Sys_SetData sd1 On ccp.PaymentCurrency = sd1.Id
+
+          //                              Where hr.IsDel = 0 And ccp.IsDel = 0 And ccp.CTable = 76 And ccp.IsAuditGM = 1 And ccp.IsPay = 1
+
+          //                              And hr.DiId = 2337
+
+
+                _view.GroupExpenditure = _geView;
+                #endregion
+
+
+                return Ok(JsonView(true, "查询成功!", _view));
+            }
+            else
+            {
+                return Ok(JsonView(false, "查询成功"));
+            }
+        }
+
+        #endregion
+
+    }
+}

+ 43 - 9
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

@@ -1,4 +1,6 @@
-using OASystem.Domain.Entities.PersonnelModule;
+using OASystem.Domain;
+using OASystem.Domain.Entities.Groups;
+using OASystem.Domain.Entities.PersonnelModule;
 using OASystem.Domain.Entities.System;
 using OASystem.Domain.ViewModels.PersonnelModule;
 using OASystem.Infrastructure.Repositories.Groups;
@@ -11,9 +13,6 @@ namespace OASystem.API.OAMethodLib
     public static class GeneralMethod
     {
 
-       
-
-
         #region 消息
 
 
@@ -131,8 +130,7 @@ namespace OASystem.API.OAMethodLib
 
         #endregion
 
-
-        #region 用户页面操作功能
+        #region 用户页面操作功能 权限
         //团组信息
         private readonly static DelegationInfoRepository _dirRep = AutofacIocManager.Instance.GetService<DelegationInfoRepository>();
 
@@ -147,7 +145,7 @@ namespace OASystem.API.OAMethodLib
             PageFunAuthViewBase pageFunAuth = new PageFunAuthViewBase();
 
             List<UserPageFuncView> userPageFuncDatas = new List<UserPageFuncView>();
-            string sql = string.Format(@"Select Distinct ua.UId As UserId, u.CnName As UserName, pa.ModuleId,pa.ModuleName,pa.PageId,pa.PageName,pa.PageIsEnable,
+            string sql = string.Format(@"Select ua.UId As UserId, u.CnName As UserName, pa.ModuleId,pa.ModuleName,pa.PageId,pa.PageName,pa.PageIsEnable,
 					                     pa.PagePhoneIsEnable,pa.FuncId,pa.FuncName,pa.FuncIsEnable
 					                     From Sys_UserAuthority ua
 					                     Left Join Sys_Users u On ua.UId = u.Id
@@ -158,8 +156,8 @@ namespace OASystem.API.OAMethodLib
 						                     Left Join Sys_SystemMenuPermission smp On smaf.SmId = smp.Id
 						                     Left Join Sys_SetData sd On sd.STid = 5 And smp.Mid = sd.Id
 						                     Left Join Sys_PageFunctionPermission pfp On smaf.FId = pfp.Id
-						                     Where smaf.IsDel = 0 And smp.IsDel = 0 And pfp.IsDel = 0 And sd.IsDel = 0
-					                     ) As pa On ua.SmId = pa.PageId
+						                     Where smaf.IsDel = 0 And smp.IsDel = 0 And pfp.IsDel = 0 And sd.IsDel = 0 And smp.IsEnable = 1
+					                     ) As pa On ua.SmId = pa.PageId And ua.FId = pa.FuncId
 					                     Where ua.IsDel = 0 And ua.UId = {0} And pa.PageId = {1}
 					                     Order By ModuleId,PageId,FuncId Asc", userId, PageId);
 
@@ -197,6 +195,42 @@ namespace OASystem.API.OAMethodLib
             return pageFunAuth;
         }
 
+        #endregion
+
+        #region 业务模块 团组权限
+
+        /// <summary>
+        /// 业务模块 团组操作权限
+        /// 验证
+        /// </summary>
+        /// <param name="diId">团组Id</param>
+        /// <param name="userId">用户Id</param>
+        /// <param name="CTable">业务模块Id</param>
+        /// <returns></returns>
+        public static async Task<Result> PostGroupOperationAuth(int diId, int userId, int CTable )
+        {
+            Result _result = new Result { Code = -1,Msg = "No Operation Authorty!" };
+            if (CTable < 1)
+            {
+                _result.Msg = "请填写正确的用户Id!";
+                return _result;
+            }
+
+            var data = await _dirRep._sqlSugar.Queryable<Grp_GroupsTaskAssignment>().Where(it => it.DIId == diId && it.UId == userId && it.CTId == CTable && it.IsDel == 0).FirstAsync();
+
+            if (data == null) 
+            {
+                _result.Msg = "你没有本团下的该业务模块操作,请联系主管分配操作权限!";
+            }
+            else
+            {
+                _result.Code = 0;
+            }
+
+            return _result;
+        }
+
+
         #endregion
     }
 }

+ 129 - 6
OASystem/OASystem.Api/OAMethodLib/PayrollComputation.cs

@@ -607,6 +607,31 @@ namespace OASystem.API.OAMethodLib
                                 }
                             }
 
+                            #region 年假测试数据
+                            leaveDetails.Add(new LeaveDetails() { 
+                                TypeId = 1,
+                                TypeName = "年假",
+                                StartDt = Convert.ToDateTime("2023-11-21 09:00:00"),
+                                EndDt = Convert.ToDateTime("2023-11-21 12:00:00"),
+                                DtType = "halfday",
+                                Unit = "天",
+                                New_Duration = 0.50M
+                            });
+
+                            leaveDetails.Add(new LeaveDetails()
+                            {
+                                TypeId = 1,
+                                TypeName = "年假",
+                                StartDt = Convert.ToDateTime("2023-11-21 12:00:00"),
+                                EndDt = Convert.ToDateTime("2023-11-23 18:00:00"),
+                                DtType = "halfday",
+                                Unit = "天",
+                                New_Duration = 2.50M
+                            });
+
+
+                            #endregion
+
                             if (leaveDetails.Count > 0)
                             {
                                 foreach (LeaveDetails leave_item in leaveDetails)
@@ -658,7 +683,6 @@ namespace OASystem.API.OAMethodLib
                                 ex_Items_jq.Ex_ItemInfo = ex_ItemInfos.OrderBy(it => it.StartTimeDt).ThenBy(it => it.Apply_time_dt).ToList();
                                 ex_Items.Add(ex_Items_jq);
                             }
-
                         }
 
                         //打卡补卡
@@ -892,13 +916,34 @@ namespace OASystem.API.OAMethodLib
                                         //出差扣款
                                         decimal cckk = 0.00M;
 
-                                        int days = (int)(date_Range.new_end_dt - date_Range.new_begin_dt).TotalDays;
+                                        int days = (int)(Convert.ToDateTime( date_Range.new_end_dt.ToString("yyyy-MM-dd")) -
+                                                         Convert.ToDateTime(date_Range.new_begin_dt.ToString("yyyy-MM-dd"))).TotalDays;
+
+                                        
+
                                         for (int i = 0; i <= days; i++)
                                         {
                                             DateTime thisDt = date_Range.new_begin_dt.AddDays(i);
-                                            if (thisDt > date_Range.new_end_dt)
+                                            
+                                            //处理开始时间 是否在当天工作时间内
+                                            if (i == 0) //开始时间
                                             {
-                                                continue;
+                                                string ccStartTime = thisDt.ToString("HH:mm:ss");
+                                                if (!IsWorkTime(ccStartTime))
+                                                {
+                                                    continue;
+                                                } 
+                                            }
+
+                                            //处理结束时间 是否在当天工作时间内
+
+                                            if (i == days - 1)
+                                            {
+                                                string ccStartTime = date_Range.new_end_dt.ToString("HH:mm:ss");
+                                                if (!IsWorkTime(ccStartTime))
+                                                {
+                                                    continue;
+                                                }
                                             }
 
                                             Sys_Calendar sys_Calendar = new Sys_Calendar();
@@ -911,7 +956,7 @@ namespace OASystem.API.OAMethodLib
                                             }
                                         }
 
-
+ 
                                         meal_deduction += cckk;
 
 
@@ -1040,6 +1085,28 @@ namespace OASystem.API.OAMethodLib
             return _result;
         }
 
+        /// <summary>
+        /// 是否在工作时间内
+        /// </summary>
+        /// <param name="timeStr"></param>
+        /// <returns></returns>
+        public static bool IsWorkTime(string timeStr) 
+        {
+            string thisDayWorkStartTime = "09:00:00";
+            string thisDayWorkEndTime = "18:00:00";
+
+            TimeSpan dspWorkingDayAM = DateTime.Parse(thisDayWorkStartTime).TimeOfDay;
+            TimeSpan dspWorkingDayPM = DateTime.Parse(thisDayWorkEndTime).TimeOfDay;
+
+            DateTime dt = Convert.ToDateTime(timeStr);
+            TimeSpan dspNow = dt.TimeOfDay;
+            if (dspNow >= dspWorkingDayAM && dspNow <= dspWorkingDayPM)
+            {
+                return true;
+            }
+            return false;
+        }
+
         /// <summary>
         /// decimal 保留两位小数 不四舍五入
         /// </summary>
@@ -1051,6 +1118,30 @@ namespace OASystem.API.OAMethodLib
             return subDecimal;
         }
 
+        /// <summary>
+        /// decimal 保留两位小数 不四舍五入
+        /// </summary>
+        /// <param name="number"></param>
+        /// <returns></returns>
+        public static decimal ConvertToDecimal1(this decimal myDecimal)
+        {
+            var subDecimal = Math.Floor(myDecimal * 100) / 100;//保留两位小数,直接截取
+            return subDecimal;
+        }
+
+        /// <summary>
+        /// 列表的成员移动到列表的前面
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="list"></param>
+        /// <param name="index"></param>
+        public static void MoveItemAtIndexToFront<T>(this List<T> list, int index)
+        {
+            T item = list[index];
+            list.RemoveAt(index);
+            list.Insert(0, item);
+        }
+
         /// <summary>
         /// 获取请假类型
         /// </summary>
@@ -1120,7 +1211,39 @@ namespace OASystem.API.OAMethodLib
             switch (leaveType)
             {
                 case 1: //年假
-                    CalculateTypeFeeSub(leaveDetails, date_Range_type, startTime, endTime, duration, out mealDeduction);
+
+                    if (date_Range_type == "halfday")
+                    {
+                        if (duration >= 0.5M && duration <= 1M) //一天
+                        {
+                            var njItem = leaveDetails.Where(it => it.StartDt.ToString("yyyy-MM-dd") == startTime.ToString("yyyy-MM-dd") &&
+                                                      it.EndDt.ToString("yyyy-MM-dd") == endTime.ToString("yyyy-MM-dd")).ToList();
+                            if (njItem.Count > 1)
+                            {
+                                if (njItem[0].StartDt == startTime)
+                                {
+                                    mealDeduction = 10; //餐补扣款
+                                }
+                            }
+                            else
+                            {
+                                mealDeduction = 10; //餐补扣款 
+                            }
+                        } 
+                        else // 多天
+                        {
+                            var njManyDaysItem = leaveDetails.Where(it => it.StartDt.ToString("yyyy-MM-dd") == startTime.ToString("yyyy-MM-dd")).ToList();
+                            if (njManyDaysItem.Count > 1)
+                            {
+                                mealDeduction = 10 * Math.Floor(duration);
+                            }
+                            else
+                            {
+                                mealDeduction = 10 * Math.Ceiling(duration);
+                            }
+                        }
+                    }
+
                     break;
                 case 2: //2事假
                     // 事假日薪 *计算方式:日平均工资 = 当月应发工资 /当月应出勤天数。 

+ 8 - 1
OASystem/OASystem.Api/appsettings.json

@@ -134,7 +134,8 @@
   "CTableCorrelationPageDatas": [
     {
       "CTableId": 76, //CtableId 酒店预订
-      "PageIdDatas": [ //页面Id
+      "PageIdDatas": [ //页面Ids
+        28
       ]
 
     },
@@ -171,6 +172,12 @@
     },
     {
       "CTableId": 98, //CtableId 其他款项
+      "PageIdDatas": [ //页面Id
+        
+      ]
+    },
+    {
+      "CTableId": 285, //CtableId 其他款项与收款退还
       "PageIdDatas": [ //页面Id
         69
       ]

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

@@ -146,6 +146,12 @@ namespace OASystem.Domain.AutoMappers
             CreateMap<OpHotelReservationsData, Grp_HotelReservations>();
             CreateMap<OpHotelReservationsData, Grp_CreditCardPayment>();
             #endregion
+
+            #region 酒店预订-New 2024-01-02 09:32
+            CreateMap<HotelReservationsAddOrEditDto, Grp_HotelReservations>();
+            CreateMap<HotelReservationsAddOrEditDto, Grp_CreditCardPayment>();
+            #endregion
+
             CreateMap<Grp_Customers, CustomersByIdView>();
             CreateMap<Grp_CreditCardPayment, CreditCardView>();
             CreateMap<OpCustomersDto, Grp_Customers>();

+ 1 - 1
OASystem/OASystem.Domain/Dtos/Financial/TeamRateDto.cs

@@ -86,6 +86,6 @@ namespace OASystem.Domain.Dtos.Financial
         /// 80	签证     81	邀请/公务活动  82  团组客户保险
         /// 85	机票预订 98	其他款项       751 酒店早餐
         /// </summary>
-        public int CTbale { get; set; }
+        public int CTable { get; set; }
     }
 }

+ 5 - 0
OASystem/OASystem.Domain/Dtos/Groups/GroupCostSavaDto.cs

@@ -32,6 +32,11 @@ namespace OASystem.Domain.Dtos.Groups
      
     }
 
+    public class GroupIsShareDto
+    {
+        public int Diid { get; set; }
+    }
+
     public class Grp_CheckBoxsDto
     {
         public int Diid { get; set; }

+ 24 - 1
OASystem/OASystem.Domain/Dtos/Groups/GroupListDto.cs

@@ -18,8 +18,11 @@ namespace OASystem.Domain.Dtos.Groups
     /// <summary>
     /// 获取团组列表 Page 请求实体类
     /// </summary>
-    public class GroupPageListDto : DtoBase
+    public class GroupPageListDto : UserPageFuncDtoBase
     {
+        public int PageIndex { get; set; } = 1;
+        public int PageSize { get; set; } = 10;
+
         /// <summary>
         /// 是否操作完成 
         /// -1 全部 0否 1是
@@ -236,6 +239,26 @@ namespace OASystem.Domain.Dtos.Groups
 
     }
 
+    /// <summary>
+    /// 
+    /// </summary>
+    public class GroupListByCTableAndUserIdDto : DtoBase
+    {
+        /// <summary>
+        /// 业务类型Id
+        /// 酒店预定,机票预定,等等
+        /// 76	酒店预订 77	行程           79  车/导游地接
+        /// 80	签证     81	邀请/公务活动  82  团组客户保险
+        /// 85	机票预订 98	其他款项       751 酒店早餐
+        /// </summary>
+        public int CTable { get; set; }
+
+        /// <summary>
+        /// 用户Id
+        /// </summary>
+        public int UserId { get; set; }
+    }
+
 
     /// <summary>
     /// 确认出团dto

+ 27 - 4
OASystem/OASystem.Domain/Dtos/Groups/GrpCreditCardPaymentDto.cs

@@ -6,7 +6,30 @@ using System.Threading.Tasks;
 
 namespace OASystem.Domain.Dtos.Groups
 {
-    public class Search_GrpCreditCardPaymentDto
+    /// <summary>
+    /// 费用审核 团组Item
+    /// </summary>
+    public class ExpenseAuditGroupPageItemsDto: UserPageFuncDtoBase
+    {
+        public int PageIndex { get; set; }
+
+        public int PageSize { get; set; }
+
+        /// <summary>
+        /// 是否操作完成 
+        /// -1 全部 0 否 1 是
+        /// </summary>
+        public int IsSure { get; set; }
+
+        /// <summary>
+        /// 搜索条件
+        /// 团组类型/团队名称/客户名称/客户单位/接团操作人
+        /// </summary>
+        public string? SearchCriteria { get; set; }
+    }
+
+
+    public class Search_GrpCreditCardPaymentDto:UserPageFuncDtoBase
     {
         /// <summary>
         /// 团组Id
@@ -14,7 +37,7 @@ namespace OASystem.Domain.Dtos.Groups
         public int DiId { get; set; }
 
         /// <summary>
-        /// 费用类型 -1 -所有, 76-酒店预订,79-车导地接,80-签证,81-邀请公务,85-机票预订,98-团组增减款项
+        /// 费用类型  
         /// </summary>
         public int Label { get; set; } = 0;
 
@@ -24,10 +47,10 @@ namespace OASystem.Domain.Dtos.Groups
         public int AuditStatus { get; set; }
     }
 
-    public class Edit_GrpCreditCardPaymentDto
+    public class Edit_GrpCreditCardPaymentDto:UserPageFuncDtoBase
     {
         public string CreditIdStr { get; set; }
         public int AuditCode { get; set; }
-        public int User { get; set; }
+       
     }
 }

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

@@ -6,6 +6,273 @@ using System.Threading.Tasks;
 
 namespace OASystem.Domain.Dtos.Groups
 {
+    /// <summary>
+    /// 酒店预定
+    /// item Dto
+    /// </summary>
+    public class HotelReservationItemDto : UserPageFuncDtoBase
+    {
+        public int DiId { get; set; }
+    }
+
+    /// <summary>
+    /// 酒店预定
+    /// BasicsData Dto
+    /// </summary>
+    public class HotelReservationBasicsDataInitDto : UserPageFuncDtoBase
+    {
+        public int DiId { get; set; }
+    }
+
+    /// <summary>
+    /// 酒店预定
+    /// Details Dto
+    /// </summary>
+    public class HotelReservationsDetailsDto : UserPageFuncDtoBase
+    {
+       public  int DiId { get; set; }
+        public int Id { get; set; }
+    }
+
+    /// <summary>
+    /// 酒店预定
+    /// Add Or Edit
+    /// </summary>
+    public class HotelReservationsAddOrEditDto : UserPageFuncDtoBase
+    {
+        /// <summary>
+        /// Id
+        /// Id == 0 Add  Or Id > 0 Edit
+        /// </summary>
+        public int Id { get; set; }
+        
+        /// <summary>
+        /// 团组Id
+        /// </summary>
+        public int DiId { get; set; }
+
+        /// <summary>
+        /// 客人类型 Id (设置数据外键编号)
+        /// </summary>
+        public int GTId { get; set; }
+
+        /// <summary>
+        /// 信用卡类型 (设置数据外键编号)
+        /// </summary>
+        public int CardPriceCurrency { 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? City { get; set; }
+
+        /// <summary>
+        /// 酒店名称
+        /// </summary>
+        public string? HotelName { get; set; }
+
+        /// <summary>
+        /// 酒店名称
+        /// </summary>
+        public string? HotelTel { get; set; }
+
+        /// <summary>
+        /// 酒店地址
+        /// </summary>
+        public string? HotelAddress { 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 int CheckType { get; set; }
+
+        /// <summary>
+        /// 房间说明
+        /// </summary>
+        public string? RoomExplanation { get; set; }
+
+        /// <summary>
+        /// 酒店备注
+        /// </summary>
+        public string? HotelRemark { get; set; }
+
+        /// <summary>
+        /// 单间价格
+        /// </summary>
+        public decimal SingleRoomPrice { get; set; }
+
+        /// <summary>
+        /// 单间数量
+        /// </summary>
+        public int SingleRoomCount { get; set; }
+
+        /// <summary>
+        /// 双间价格
+        /// </summary>
+        public decimal DoubleRoomPrice { get; set; }
+
+        /// <summary>
+        /// 双间数量
+        /// </summary>
+        public int DoubleRoomCount { get; set; }
+
+        /// <summary>
+        /// 套房价格
+        /// </summary>
+        public decimal SuiteRoomPrice { get; set; }
+
+        /// <summary>
+        /// 套房数量
+        /// </summary>
+        public int SuiteRoomCount { get; set; }
+
+        /// <summary>
+        /// 其他房间价格
+        /// </summary>
+        public decimal OtherRoomPrice { get; set; }
+
+        /// <summary>
+        /// 其他房间数量
+        /// </summary>
+        public int OtherRoomCount { get; set; }
+
+        /// <summary>
+        /// 信用卡金额
+        /// </summary>
+        public decimal CardPrice { get; set; }
+
+        /// <summary>
+        /// 是否由地接支付
+        /// 0 否 1 是
+        /// </summary>
+        public int Isoppay { get; set; }
+
+        /// <summary>
+        /// 早餐价格
+        /// </summary>
+        public decimal BreakfastPrice { get; set; }
+
+        /// <summary>
+        /// 早餐币种 (设置数据外键编号)
+        /// </summary>
+        public int BreakfastCurrency { 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 int PayDId { get; set; }
+
+        /// <summary>
+        /// 消费方式
+        /// </summary>
+        public string? ConsumptionPatterns { get; set; }
+
+        /// <summary>
+        /// 消费日期
+        /// </summary>
+        public string? ConsumptionDate { get; set; }
+
+        /// <summary>
+        /// 付款金额
+        /// </summary>
+        public decimal PayMoney { get; set; }
+
+        /// <summary>
+        /// 付款币种 (设置数据外键编号)
+        /// </summary>
+        public int PaymentCurrency { 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? Payee { get; set; }
+
+        /// <summary>
+        /// 费用标识 (设置数据外键编号)
+        /// </summary>
+        public int OrbitalPrivateTransfer { get; set; }
+
+        /// <summary>
+        /// C表付款信息 备注
+        /// </summary>
+        public string? CcpRemark { get; set; }
+    }
+
+
+
+
+
+
+
+
+
+    #region 保留
+
     public class HotelReservationsDto
     {
         /// <summary>
@@ -290,4 +557,5 @@ namespace OASystem.Domain.Dtos.Groups
         /// </summary>
         public int CityTaxCurrency { get; set; }
     }
+    #endregion
 }

+ 44 - 0
OASystem/OASystem.Domain/Dtos/Statistics/GroupStatementDto.cs

@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Dtos.Statistics
+{
+    /// <summary>
+    /// 团组报表
+    /// Items Dto
+    /// </summary>
+    public class GroupStatementItemsDto : UserPageFuncDtoBase
+    {
+        public int PageIndex { get; set; }
+
+        public int PageSize { get; set; }
+
+        /// <summary>
+        /// 是否操作完成 
+        /// -1 全部 0 否 1 是
+        /// </summary>
+        public int IsSure { get; set; }
+
+        /// <summary>
+        /// 搜索条件
+        /// 团组类型/团队名称/客户名称/客户单位/接团操作人
+        /// </summary>
+        public string? SearchCriteria { get; set; }
+    }
+
+    /// <summary>
+    /// 团组报表
+    /// Details Dto
+    /// </summary>
+    public class GroupStatementDetailsDto : UserPageFuncDtoBase
+    {
+        /// <summary>
+        /// 团组Id
+        /// </summary>
+        public int DiId { get; set; }
+    }
+
+}

+ 1 - 1
OASystem/OASystem.Domain/Entities/Financial/Fin_ForeignReceivables.cs

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
 namespace OASystem.Domain.Entities.Financial
 {
     /// <summary>
-    /// 财务 - 对外收款账单
+    /// 财务 - 对外收款账单  应收
     /// 雷怡 2023-08-14 16:20
     /// </summary>
     [SugarTable("Fin_ForeignReceivables")]

+ 1 - 1
OASystem/OASystem.Domain/Entities/Financial/Fin_PaymentRefundAndOtherMoney.cs

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
 namespace OASystem.Domain.Entities.Financial
 {
     /// <summary>
-    /// 收款退还与其他款项
+    /// 收款退还
     /// </summary>
     [SugarTable("Fin_PaymentRefundAndOtherMoney")]
     public class Fin_PaymentRefundAndOtherMoney : EntityBase

+ 1 - 0
OASystem/OASystem.Domain/Entities/Groups/Grp_DecreasePayments.cs

@@ -8,6 +8,7 @@ namespace OASystem.Domain.Entities.Groups
 {
     /// <summary>
     /// 团组增减款项表
+    /// --其他款项
     /// </summary>
     [SugarTable("Grp_DecreasePayments")]
     public class Grp_DecreasePayments: EntityBase

+ 26 - 4
OASystem/OASystem.Domain/Entities/Groups/Grp_HotelReservations.cs

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
 namespace OASystem.Domain.Entities.Groups
 {
     /// <summary>
-    /// 酒店表
+    /// 酒店预定费用
     /// </summary>
     [SugarTable("Grp_HotelReservations")]
     public class Grp_HotelReservations:EntityBase
@@ -64,6 +64,7 @@ namespace OASystem.Domain.Entities.Groups
         public string HotelTel { get; set; }
         /// <summary>
         /// 酒店传真
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
         public string HotelFax { get; set; }
@@ -84,11 +85,13 @@ namespace OASystem.Domain.Entities.Groups
         public string CheckOutDate { get; set; }
         /// <summary>
         /// 预算金额
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public decimal Budget { get; set; }
         /// <summary>
         /// 预算币种(设置数据外键编号)
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int BudgetCurrency { get; set; }
@@ -134,16 +137,19 @@ namespace OASystem.Domain.Entities.Groups
         public decimal OtherRoomPrice { get; set; }
         /// <summary>
         /// 佣金
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
         public decimal Commission { get; set; }
         /// <summary>
         /// 佣金币种(设置数据外键编号)
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int CommissionCurrency { get; set; }
         /// <summary>
         /// 佣金标识
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int CommissionMark { get; set; }
@@ -154,6 +160,7 @@ namespace OASystem.Domain.Entities.Groups
         public string RoomExplanation { get; set; }
         /// <summary>
         /// 附件地址
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
         public string Attachment { get; set; }
@@ -170,14 +177,21 @@ namespace OASystem.Domain.Entities.Groups
         /// <summary>
         /// 确认标识   信用卡金额
         /// 0:未刷(红色)  1:已刷(绿色)
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </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 decimal BreakfastCurrency { get; set; }
+
         /// <summary>
         /// 由地接支付
         /// </summary>
@@ -185,41 +199,49 @@ namespace OASystem.Domain.Entities.Groups
         public int Isoppay { get; set; }
         /// <summary>
         /// 是否有单间
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int CboOne { get; set; }
         /// <summary>
         /// 是否有双间
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int CboTwo { get; set; }
         /// <summary>
         /// 是否有酒店套房
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int CboThree { get; set; }
         /// <summary>
         /// 是否有其他房型
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int CboFour { get; set; }
         /// <summary>
         /// 预计单间数量
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int PredictSingleRoom { get; set; }
         /// <summary>
         /// 预计双人间数量
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int PredictDoubleRoom { get; set; }
         /// <summary>
         /// 预计套房数量
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int PredictSuiteRoom { get; set; }
         /// <summary>
         /// 预计其他间数量
+        /// 弃用 弃用时间 2023-12-28 17:30
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int PredictOtherRoom { get; set; }
@@ -246,7 +268,7 @@ namespace OASystem.Domain.Entities.Groups
         /// <summary>
         /// 房间入住人类型
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
-        public string CheckType { get; set; }
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int CheckType { get; set; }
     }
 }

+ 1 - 1
OASystem/OASystem.Domain/Entities/System/Sys_SystemMenuAndFunction.cs

@@ -7,7 +7,7 @@
     public class Sys_SystemMenuAndFunction:EntityBase
     {
         /// <summary>
-        /// 页面权限Id
+        /// 页面Id
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int SmId { get; set; }

+ 5 - 20
OASystem/OASystem.Domain/ViewModels/Financial/Fin_PaymentRefundAndOtherMoneyView.cs

@@ -48,34 +48,19 @@ namespace OASystem.Domain.ViewModels.Financial
         /// <summary>
         /// 总经理是否审核 
         /// 0 未审核 1已通过 2 未通过
+        /// 1 已通过 不可 删除 And 修改
         /// </summary>
         public int IsAuditGM { get; set; }
 
         /// <summary>
-        /// 编辑权限
-        /// 0 不可编辑 1 可编辑
+        /// 审核人
         /// </summary>
-        public int EditAuth
-        {
-            get
-            {
-                if (IsAuditGM == 1) return 0;
-                else return 1;
-            }
-        }
+        public string? AuditGMName { get; set; }
 
         /// <summary>
-        /// 删除权限
-        /// 0 不可删除 1 可删除
+        /// 审核时间
         /// </summary>
-        public int DelAuth
-        {
-            get
-            {
-                if (IsAuditGM == 1) return 0;
-                else return 1;
-            }
-        }
+        public string? AuditGMDate { get; set; }
 
         /// <summary>
         /// 创建人

+ 0 - 1
OASystem/OASystem.Domain/ViewModels/Financial/Fin_ProceedsReceivedView.cs

@@ -73,7 +73,6 @@ namespace OASystem.Domain.ViewModels.Financial
     }
 
 
-
     /// <summary>
     /// 团组已收款项-1Info View
     /// </summary>

+ 124 - 13
OASystem/OASystem.Domain/ViewModels/Groups/DelegationInfoView.cs

@@ -1,6 +1,10 @@
-using Newtonsoft.Json;
+using Google.Protobuf;
+using Google.Protobuf.WellKnownTypes;
+using Microsoft.Extensions.Primitives;
+using Newtonsoft.Json;
 using OASystem.Domain.Dtos;
 using OASystem.Domain.Entities.Groups;
+using OASystem.Domain.ViewModels.QiYeWeChat;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -17,16 +21,21 @@ namespace OASystem.Domain.ViewModels.Groups
     public class DelegationInfoView : Grp_DelegationInfo { }
 
     /// <summary>
-    /// 接团信息详情 共享
+    /// 接团信息详情 共享 Web
     /// 返回视图
     /// </summary>
-    public class ShareGroupInfoView
+    public class Web_ShareGroupInfoView
     {
         /// <summary>
         /// 主键Id
         /// </summary>
         public int Id { get; set; }
 
+        /// <summary>
+        /// 团名
+        /// </summary>
+        public string? TeamName { get; set; }
+
         /// <summary>
         /// 团号
         /// </summary>
@@ -64,6 +73,108 @@ namespace OASystem.Domain.ViewModels.Groups
 
     }
 
+    /// <summary>
+    /// 查询团组简略详情列表
+    /// Page 根据Ctable And User 返回可操作的团 View
+    /// </summary>
+    public class GroupListByCTableAndUserIdView 
+    {
+        public int Row_Number { get; set; }
+        public int Id { get; set; }
+        
+        /// <summary>
+        /// 团组名
+        /// </summary>
+        public string? TeamName { get; set; }
+        /// <summary>
+        /// 团组Code 
+        /// </summary>
+        public string? TourCode { get; set; }
+
+        /// <summary>
+        /// 客户名称
+        /// </summary>
+        public string? ClientName { get; set; }
+
+        /// <summary>
+        /// 出访时间
+        /// </summary>
+        public string? VisitCountry { get; set; }
+
+
+        /// <summary>
+        /// 出访开始日期
+        /// </summary>
+        public string? VisitStartDate { get; set; }
+
+        /// <summary>
+        /// 出访结束日期
+        /// </summary>
+        public string? VisitEndDate { get; set; }
+        
+
+        /// <summary>
+        /// 出访天数
+        /// </summary>
+        public int VisitDays { get; set; }
+
+        /// <summary>
+        /// 出访人数
+        /// </summary>
+        public int VisitPNumber { get; set; }
+
+    }
+
+
+
+    /// <summary>
+    /// 接团信息详情 共享 Web
+    /// 返回视图
+    /// </summary>
+    public class IOSOrAndroid_ShareGroupInfoView
+    {
+        /// <summary>
+        /// 主键Id
+        /// </summary>
+        public int Id { 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 DateTime VisitStartDate { get; set; }
+
+        /// <summary>
+        /// 出团结束日期 
+        /// </summary>
+        public DateTime VisitEndDate { get; set; }
+
+        /// <summary>
+        /// 出行天数
+        /// </summary>
+        public int VisitDays { get; set; }
+
+        /// <summary>
+        /// 出行人数
+        /// </summary>
+        public int VisitPNumber { get; set; }
+
+    }
+
     /// <summary>
     /// 接团信息详情 共享
     /// 返回视图
@@ -284,16 +395,6 @@ namespace OASystem.Domain.ViewModels.Groups
         /// </summary>
         public string? TeamLev { get; set; }
 
-        /// <summary>
-        /// 团组类型Id
-        /// </summary>
-        public int TeamTypeId { get; set; }
-
-        /// <summary>
-        /// 团组类型
-        /// </summary>
-        public string? TeamType { get; set; }
-
         /// <summary>
         /// 团组名称
         /// </summary>
@@ -309,6 +410,16 @@ namespace OASystem.Domain.ViewModels.Groups
         /// </summary>
         public string? ClientUnit { get; set; }
 
+        /// <summary>
+        /// 团组类型Id
+        /// </summary>
+        public int TeamTypeId { get; set; }
+
+        /// <summary>
+        /// 团组类型
+        /// </summary>
+        public string? TeamType { get; set; }
+
         /// <summary>
         /// 出团日期
         /// </summary>

+ 34 - 35
OASystem/OASystem.Domain/ViewModels/Groups/Grp_CreditCardPaymentView.cs

@@ -92,41 +92,6 @@ namespace OASystem.Domain.ViewModels.Groups
 
     public class Grp_CreditCardPaymentView
     {
-        /// <summary>
-        /// 团组编号
-        /// </summary>
-        public int DiId { get; set; }
-
-        /// <summary>
-        /// 团组名称
-        /// </summary>
-        public string TeamName { 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>
         /// 审核列表
         /// </summary>
@@ -203,4 +168,38 @@ namespace OASystem.Domain.ViewModels.Groups
 
         
     }
+
+    public class CreditCardPaymentCurrencyPriceItem
+    {
+        /// <summary>
+        /// 币种Id
+        /// </summary>
+        public int CurrencyId { get; set; }
+
+        /// <summary>
+        /// 币种Name
+        /// </summary>
+        public string CurrencyName { get; set; }
+
+        /// <summary>
+        /// 应付金额
+        /// </summary>
+        public decimal AmountPayable { get; set; }
+
+        /// <summary>
+        /// 此次付款
+        /// 基本为CNY
+        /// </summary>
+        public decimal ThisPayment { get; set; }
+
+        /// <summary>
+        /// 剩余尾款
+        /// </summary>
+        public decimal BalancePayment { get; set; }
+
+        /// <summary>
+        /// 已审款项
+        /// </summary>
+        public decimal AuditedFunds { get; set; }
+    }
 }

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

@@ -6,6 +6,328 @@ using System.Threading.Tasks;
 
 namespace OASystem.Domain.ViewModels.Groups
 {
+    #region 酒店预定 新 View
+
+    /// <summary>
+    /// 酒店预定
+    /// Items  View
+    /// </summary>
+    public class HotelReservationsItemsView
+    {
+        /// <summary>
+        /// Number
+        /// </summary>
+        public int Row_Number { get; set; }
+
+        public int Id { get; set; }
+
+        //public int DiId { 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>
+        ///// 付款币种 Id
+        ///// </summary>
+        //public int PaymentCurrency { get; set; }
+
+        /// <summary>
+        /// 付款币种Code 
+        /// </summary>
+        public string? PayCurrency { get; set; }
+
+        ///// <summary>
+        ///// 创建人Id 
+        ///// </summary>
+        //public int CreateUserId { get; set; }
+
+        /// <summary>
+        /// 创建人姓名
+        /// </summary>
+        public string? CreateUserName { get; set; }
+
+        /// <summary>
+        /// 创建时间
+        /// </summary>
+        public DateTime CreateTime { get; set; }
+
+        /// <summary>
+        /// 总经理审核状态
+        /// 0 未审核 1 已审核 2 未通过 4自动审核
+        /// </summary>
+        public int IsAuditGM { get; set; }
+
+
+        /// <summary>
+        /// 总经理审核状态
+        /// 0 未审核 1 已审核 2 未通过 4 自动审核
+        /// </summary>
+        public string IsAuditGMStr { get {
+            
+                string? auditStatus = " - ";
+                if (IsAuditGM == 1) auditStatus = "未审核";
+                else if (IsAuditGM == 1) auditStatus = "已审核";
+                else if(IsAuditGM == 2) auditStatus = "未通过";
+                else if (IsAuditGM == 4) auditStatus = "自动审核";
+
+                return auditStatus;
+            } }
+
+    }
+
+    /// <summary>
+    /// 酒店预定
+    /// Details  View
+    /// </summary>
+    public class HotelReservationsDetailsView 
+    {
+        public int Id { get; set; }
+
+        /// <summary>
+        /// 客人类型 Id (设置数据外键编号)
+        /// </summary>
+        public int GTId { get; set; }
+
+        /// <summary>
+        /// 信用卡类型 (设置数据外键编号)
+        /// </summary>
+        public int CardPriceCurrency { 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? City { get; set; }
+
+        /// <summary>
+        /// 酒店名称
+        /// </summary>
+        public string? HotelName { get; set; }
+
+        /// <summary>
+        /// 酒店名称
+        /// </summary>
+        public string? HotelTel { get; set; }
+
+        /// <summary>
+        /// 酒店地址
+        /// </summary>
+        public string? HotelAddress { 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 int CheckType { get; set; }
+
+        /// <summary>
+        /// 房间说明
+        /// </summary>
+        public string? RoomExplanation { get; set; }
+
+        /// <summary>
+        /// 酒店备注
+        /// </summary>
+        public string? HotelRemark { get; set; }
+
+        /// <summary>
+        /// 单间价格
+        /// </summary>
+        public decimal SingleRoomPrice { get; set; }
+
+        /// <summary>
+        /// 单间数量
+        /// </summary>
+        public int SingleRoomCount { get; set; }
+        
+        /// <summary>
+        /// 双间价格
+        /// </summary>
+        public decimal DoubleRoomPrice { get; set; }
+
+        /// <summary>
+        /// 双间数量
+        /// </summary>
+        public int DoubleRoomCount { get; set; }
+
+        /// <summary>
+        /// 套房价格
+        /// </summary>
+        public decimal SuiteRoomPrice { get; set; }
+
+        /// <summary>
+        /// 套房数量
+        /// </summary>
+        public int SuiteRoomCount { get; set; }
+
+        /// <summary>
+        /// 其他房间价格
+        /// </summary>
+        public decimal OtherRoomPrice { get; set; }
+
+        /// <summary>
+        /// 其他房间数量
+        /// </summary>
+        public int OtherRoomCount { get; set; }
+
+        /// <summary>
+        /// 信用卡金额
+        /// </summary>
+        public decimal CardPrice { get; set; }
+
+        /// <summary>
+        /// 是否由地接支付
+        /// 0 否 1 是
+        /// </summary>
+        public int Isoppay { get; set; }
+
+        /// <summary>
+        /// 早餐价格
+        /// </summary>
+        public decimal BreakfastPrice { get; set; }
+
+        /// <summary>
+        /// 早餐币种 (设置数据外键编号)
+        /// </summary>
+        public int BreakfastCurrency { 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 int PayDId { get; set; }
+
+        /// <summary>
+        /// 消费方式
+        /// </summary>
+        public string? ConsumptionPatterns { get; set; }
+
+        /// <summary>
+        /// 消费日期
+        /// </summary>
+        public string? ConsumptionDate { get; set; }
+
+        /// <summary>
+        /// 付款金额
+        /// </summary>
+        public decimal PayMoney { get; set; }
+
+        /// <summary>
+        /// 付款币种 (设置数据外键编号)
+        /// </summary>
+        public int PaymentCurrency { 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? Payee { get; set; }
+
+        /// <summary>
+        /// 费用标识 (设置数据外键编号)
+        /// </summary>
+        public int OrbitalPrivateTransfer { get; set; }
+
+        /// <summary>
+        /// C表付款信息 备注
+        /// </summary>
+        public string? CcpRemark { get; set; }
+    }
+
+    #endregion
+
+
+    #region 保留
+
+
     /// <summary>
     /// 根据diid查询酒店费用列表
     /// </summary>
@@ -349,4 +671,6 @@ namespace OASystem.Domain.ViewModels.Groups
         public int CurrencyId { get; set; }
         public string CurrencyName { get; set; }
     }
+    
+    #endregion
 }

+ 400 - 0
OASystem/OASystem.Domain/ViewModels/Statistics/GroupStatementView.cs

@@ -0,0 +1,400 @@
+using OASystem.Domain.Entities.Financial;
+using OASystem.Domain.Entities.Groups;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.ViewModels.Statistics
+{
+    /// <summary>
+    /// 团组报表
+    /// </summary>
+    public class GroupStatementView
+    {
+    }
+
+    /// <summary>
+    /// 团组报表
+    /// Items View
+    /// </summary>
+    public class GroupStatementItemView
+    {
+        /// <summary>
+        /// 序号
+        /// </summary>
+        public int Row_Number { get; set; }
+
+        /// <summary>
+        /// 是否操作完成 
+        /// 0否1是
+        /// </summary>
+        public int IsSure { get; set; }
+
+        /// <summary>
+        /// 主键Id
+        /// 团组Id
+        /// </summary>
+        public int Id { get; set; }
+
+        /// <summary>
+        /// 团号
+        /// </summary>
+        public string? TourCode { get; set; }
+
+        /// <summary>
+        /// 接团操作人
+        /// </summary>
+        public string? JietuanOperator { get; set; }
+
+        /// <summary>
+        /// 团组等级Id
+        /// </summary>
+        public int TeamLevId { get; set; }
+
+        /// <summary>
+        /// 团组等级 
+        /// </summary>
+        public string? TeamLev { get; set; }
+
+        /// <summary>
+        /// 团组名称
+        /// </summary>
+        public string? TeamName { get; set; }
+
+        /// <summary>
+        /// 客户名称
+        /// </summary>
+        public string? ClientName { get; set; }
+
+        /// <summary>
+        /// 客户所属公司
+        /// </summary>
+        public string? ClientUnit { get; set; }
+
+        /// <summary>
+        /// 团组类型Id
+        /// </summary>
+        public int TeamTypeId { get; set; }
+
+        /// <summary>
+        /// 团组类型
+        /// </summary>
+        public string? TeamType { get; set; }
+
+        /// <summary>
+        /// 出团日期
+        /// </summary>
+        public DateTime VisitDate { get; set; }
+
+        /// <summary>
+        /// 出行天数
+        /// </summary>
+        public int VisitDays { get; set; }
+
+        /// <summary>
+        /// 出行人数
+        /// </summary>
+        public int VisitPNumber { get; set; }
+
+        /// <summary>
+        /// 最后收款时间
+        /// </summary>
+        public DateTime? LastCollectionTime { get; set; }
+
+    }
+
+    /// <summary>
+    /// 团组报表
+    /// Details View
+    /// </summary>
+    public class GroupStatementDetailsView
+    {
+        /// <summary>
+        /// 费用总计 描述
+        /// </summary>
+        public string? TotalStr { get; set; }
+
+        /// <summary>
+        /// 团组收入
+        /// Data View 
+        /// </summary>
+        public GroupIncomeView? GroupIncome { get; set; }
+
+        /// <summary>
+        /// 团组收入
+        /// 描述
+        /// </summary>
+        public string? GroupIncomeStr { get; set; }
+
+        /// <summary>
+        /// 团组支出
+        /// </summary>
+        public GroupExpenditureView? GroupExpenditure { get; set; }
+    }
+
+    #region 团组收入
+
+    /// <summary>
+    /// 团组收入 
+    /// Data View
+    /// </summary>
+    public class GroupIncomeView
+    {
+        /// <summary>
+        /// 应收 Items
+        /// </summary>
+        public List<Gsd_ForeignReceivablesView>? Receivables { get; set; }
+
+        /// <summary>
+        /// 应收 Str
+        /// </summary>
+        public string? ReceivableStr { get; set; }
+
+        /// <summary>
+        /// 已收 Items
+        /// </summary>
+        public List<Gsd_ProceedsReceivedView>? ProceedsReceiveds { get; set; }
+
+        /// <summary>
+        /// 已收 Str
+        /// </summary>
+        public string? ProceedsReceivedStr { get; set; }
+
+        /// <summary>
+        /// 支出费用 Items
+        /// </summary>
+        public List<dynamic>? IncurExpenses { get; set; } = new List<dynamic>();
+
+        /// <summary>
+        /// 支出费用 Str
+        /// </summary>
+        public string? IncurExpenseStr{ get; set; } = string.Empty;
+
+        /// <summary>
+        /// 收款退还 Items
+        /// </summary>
+        public List<Gsd_PaymentRefundAndOtherMoneyView>? PaymentRefundAndOtherMoneys { get; set; }
+
+        /// <summary>
+        /// 收款退还 Str
+        /// </summary>
+        public string? PaymentRefundAndOtherMoneyStr { get; set; }
+    }
+
+    /// <summary>
+    /// 应收报表
+    /// </summary>
+    public class Gsd_ForeignReceivablesView
+    {
+        public int Id { get; set; }
+
+        public int diid { get; set; }
+
+        /// <summary>
+        /// 费用名称
+        /// </summary>
+        public string? PriceName { get; set; }
+
+        /// <summary>
+        /// 单价
+        /// </summary>
+        public decimal Price { get; set; }
+
+        /// <summary>
+        /// 数量
+        /// </summary>
+        public int Count { get; set; }
+
+        /// <summary>
+        /// 单位
+        /// </summary>
+        public string? Unit { get; set; }
+
+        /// <summary>
+        /// 币种
+        /// </summary>
+        public int Currency { get; set; }
+
+        /// <summary>
+        /// 币种 Code
+        /// </summary>
+        public string CurrencyCode { get; set; }
+
+        /// <summary>
+        /// 币种 Name
+        /// </summary>
+        public string CurrencyName { get; set; }
+
+        /// <summary>
+        /// 汇率
+        /// </summary>
+        public decimal Rate { get; set; }
+
+        /// <summary>
+        /// 应收金额
+        /// </summary>
+        public decimal ItemSumPrice { get; set; }
+    }
+
+    /// <summary>
+    /// 已收报表
+    /// </summary>
+    public class Gsd_ProceedsReceivedView
+    {
+        public int Id { get; set; }
+
+        public int Diid { get; set; }
+
+        /// <summary>
+        /// 到款时间
+        /// </summary>
+        public string? SectionTime { get; set; }
+
+        /// <summary>
+        /// 费用金额
+        /// </summary>
+        public decimal Price { get; set; }
+
+        /// <summary>
+        /// 币种
+        /// </summary>
+        public int Currency { get; set; }
+
+        /// <summary>
+        /// 币种 Code
+        /// </summary>
+        public string CurrencyCode { get; set; }
+
+        /// <summary>
+        /// 币种 Name
+        /// </summary>
+        public string CurrencyName { get; set; }
+
+        /// <summary>
+        /// 支出单位
+        /// </summary>
+        public string? Client { get; set; }
+
+        /// <summary>
+        /// 转账标识Id
+        /// </summary>
+        public int ReceivablesType { get; set; }
+
+        /// <summary>
+        /// 转账类型名称
+        /// </summary>
+        public string ReceivablesTypeName { get; set; }
+
+        /// <summary>
+        /// 备注
+        /// </summary>
+        public string? Remark { get; set; }
+    }
+
+    /// <summary>
+    /// 收款退还
+    /// </summary>
+    public class Gsd_PaymentRefundAndOtherMoneyView
+    {
+        public int Id { get; set; }
+
+        public int DiId { get; set; }
+
+        /// <summary>
+        /// 费用名称
+        /// </summary>
+        public string? PriceName { get; set; }
+
+        /// <summary>
+        /// 币种code
+        /// </summary>
+        public string? PayCurrencyCode { get; set; }
+
+        /// <summary>
+        /// 币种名称
+        /// </summary>
+        public string? PayCurrencyName { get; set; }
+
+        /// <summary>
+        /// 费用
+        /// </summary>
+        public decimal Price { get; set; }
+
+        /// <summary>
+        /// 人名币金额
+        /// </summary>
+        public decimal CNYPrice { get; set; }
+
+        /// <summary>
+        /// 当时汇率
+        /// </summary>
+        public decimal ThisRate { get; set; }
+
+        /// <summary>
+        /// 收款方
+        /// </summary>
+        public string? Payee { get; set; }
+
+        /// <summary>
+        /// 付款时间
+        /// </summary>
+        public string? PayTime { get; set; }
+
+        /// <summary>
+        /// 费用标识
+        /// </summary>
+        public string? FeeType { get; set; }
+
+        /// <summary>
+        /// 支付方式
+        /// </summary>
+        public string? PayType { get; set; }
+
+        /// <summary>
+        /// 付款状态
+        /// </summary>
+        public string? PayStatus { get; set; }
+
+        /// <summary>
+        /// 申请人
+        /// </summary>
+        public string? Applicant { get; set; }
+    }
+
+    #region 收款退还 View
+
+    public class Gsd_PaymentRefundAndOtherMoneyDataSource1View : Grp_CreditCardPayment 
+    {
+        /// <summary>
+        /// 申请人
+        /// </summary>
+        public string Appliction { get; set; }
+        public int PrId { get; set; }
+
+        public int PrDiId { get; set; }
+        public string PrPriceName { get; set; }
+        public decimal PrPrice { get; set; }
+        public int PrCurrencyId { get; set; }
+        public int PrPayType { get; set; }
+        public int PrPriceType { get; set; }
+    };
+
+    #endregion
+
+    #endregion
+
+    #region 团组支出
+    /// <summary>
+    /// 团组支出 View
+    /// </summary>
+    public class GroupExpenditureView
+    { 
+        
+    }
+
+
+    #endregion
+
+}

+ 7 - 7
OASystem/OASystem.Domain/ViewModels/ViewBase.cs

@@ -52,43 +52,43 @@
     {
         /// <summary>
         /// 查看权限
-        /// 0 不可操作 1 可操作
+        /// 0 否 1 是
         /// </summary>
         public int CheckAuth { get; set; } = 0;
 
         /// <summary>
         /// 删除权限
-        /// 0 不可操作 1 可操作
+        /// 0 否 1 是
         /// </summary>
         public int DeleteAuth { get; set; } = 0;
 
         /// <summary>
         /// 编辑权限
-        /// 0 不可操作 1 可操作
+        /// 0 否 1 是
         /// </summary>
         public int EditAuth { get; set; } = 0;
 
         /// <summary>
         /// 文件下载权限
-        /// 0 不可操作 1 可操作
+        /// 0 否 1 是
         /// </summary>
         public int FilesDownloadAuth { get; set; } = 0;
 
         /// <summary>
         /// 文件上传权限
-        /// 0 不可操作 1 可操作
+        /// 0 否 1 是
         /// </summary>
         public int FilesUploadAuth { get; set; } = 0;
 
         /// <summary>
         /// 添加权限
-        /// 0 不可操作 1 可操作
+        /// 0 否 1 是
         /// </summary>
         public int AddAuth { get; set; } = 0;
 
         /// <summary>
         /// 审核权限
-        /// 0 不可操作 1 可操作
+        /// 0 否 1 是
         /// </summary>
         public int AuditAuth { get; set; } = 0;
 

+ 17 - 15
OASystem/OASystem.Infrastructure/Repositories/Financial/PaymentRefundAndOtherMoneyRepository.cs

@@ -47,19 +47,18 @@ namespace OASystem.Infrastructure.Repositories.Financial
         /// </summary>
         /// <param name="diId"></param>
         /// <returns></returns>
-        public async Task<Result> PostItemByDiId(int diId)
+        public async Task<Result> _ItemByDiId(int diId)
         {
-
-
             string sql = string.Format(@"Select prom.Id,prom.PriceName,prom.Price,sd.Name As CurrencyCode,
-					                     prom.Remark,ccp.IsAuditGM,u.CnName As CreateUserName,prom.CreateTime 
+					                     prom.Remark,u.CnName As CreateUserName,prom.CreateTime,ccp.IsAuditGM,
+										 u1.CnName As AuditGMName,ccp.AuditGMDate
 				                         From Fin_PaymentRefundAndOtherMoney prom
-				                         Left Join Sys_Users u On u.Id = prom.CreateUserId 
+					                     Left Join Grp_CreditCardPayment ccp On ccp.CTable = 285 And 
+										           ccp.CId = prom.Id And ccp.DIId = prom.DiId
 				                         Left Join Sys_SetData sd On prom.CurrencyId = sd.Id
-					                     Left Join Grp_CreditCardPayment ccp 
-                                         On ccp.CTable = 98 And ccp.CId = prom.Id And ccp.DIId = prom.DiId
-				                         Where prom.IsDel = 0 And u.IsDel = 0 And sd.IsDel = 0 And  ccp.IsDel = 0
-					                     And prom.DiId = {0}", diId);
+				                         Left Join Sys_Users u On u.Id = prom.CreateUserId 
+				                         Left Join Sys_Users u1 On u1.Id = ccp.AuditGMOperate 
+				                         Where prom.IsDel = 0 And ccp.IsDel = 0 And prom.DiId = {0}", diId);
 
             var data = await _sqlSugar.SqlQueryable<Fin_PaymentRefundAndOtherMoneyItemView>(sql).ToListAsync();
 
@@ -98,7 +97,8 @@ namespace OASystem.Infrastructure.Repositories.Financial
             if (_PaymentRefundAndOtherMoneyInfo != null)
             {
                 Grp_CreditCardPayment _CreditCardPayment = new Grp_CreditCardPayment() {
-                    Id = _PaymentRefundAndOtherMoneyInfo.Id,
+                    CId = _PaymentRefundAndOtherMoneyInfo.Id,
+                    DIId = _PaymentRefundAndOtherMoneyInfo.DiId,
                     DeleteUserId = dto.UserId,
                     DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                     IsDel = 1
@@ -107,7 +107,7 @@ namespace OASystem.Infrastructure.Repositories.Financial
 
                 var ccp_del = await _sqlSugar.Updateable(_CreditCardPayment)
                                      .UpdateColumns(it => new { it.DeleteUserId, it.DeleteTime, it.IsDel })
-                                     .WhereColumns(it => new { it.Id })
+                                     .WhereColumns(it => new { it.CId,it.DIId })
                                      .ExecuteCommandAsync();
             }
 
@@ -195,7 +195,7 @@ namespace OASystem.Infrastructure.Repositories.Financial
                 string sql = string.Format(@"Select prom.Id,ccp.Id CcpId,prom.DiId,prom.PriceName,prom.Price,prom.CurrencyId,ccp.Payee,ccp.PayDId,
 										 ccp.OrbitalPrivateTransfer,ccp.ConsumptionPatterns,prom.PayType,prom.Remark
 										 From Fin_PaymentRefundAndOtherMoney prom 
-										 Left Join Grp_CreditCardPayment ccp On ccp.CId = prom.id And ccp.CTable = 98 And ccp.IsDel = 0
+										 Left Join Grp_CreditCardPayment ccp On ccp.CId = prom.id And ccp.CTable = 285 And ccp.IsDel = 0
 										 Where prom.IsDel = 0 And ccp.DIId = prom.DiId And prom.Id = {0}", dto.Id);
                 var data = await _sqlSugar.SqlQueryable<Fin_PaymentRefundAndOtherMoneyInfoView>(sql).FirstAsync();
 
@@ -263,7 +263,7 @@ namespace OASystem.Infrastructure.Repositories.Financial
                         return _result;
                     }
 
-                    var teamReteData1 = teamReteDatas.Where(it => it.CTableId == 98).FirstOrDefault();
+                    var teamReteData1 = teamReteDatas.Where(it => it.CTableId == 285).FirstOrDefault();
                     if (teamReteData1 == null)
                     {
                         _result.Msg = "该团下的“其他款项”未设置团组汇率,请先设置!";
@@ -287,7 +287,7 @@ namespace OASystem.Infrastructure.Repositories.Financial
                     //Id = dto.CcpId,
                     //CId = dto.CcpId,
                     DIId = dto.DiId,
-                    CTable = 98,
+                    CTable = 285,
                     PayDId = dto.PayDId,
                     ConsumptionPatterns = dto.ConsumptionPatterns,
                     ConsumptionDate = string.Empty,
@@ -338,7 +338,7 @@ namespace OASystem.Infrastructure.Repositories.Financial
                     string sql = string.Format(@"Select prom.Id,ccp.Id CcpId,prom.DiId,prom.PriceName,prom.Price,prom.CurrencyId,ccp.Payee,ccp.PayDId,
 										 ccp.OrbitalPrivateTransfer,ccp.ConsumptionPatterns,prom.PayType,prom.Remark
 										 From Fin_PaymentRefundAndOtherMoney prom 
-										 Left Join Grp_CreditCardPayment ccp On ccp.CId = prom.id And ccp.CTable = 98 
+										 Left Join Grp_CreditCardPayment ccp On ccp.CId = prom.id And ccp.CTable = 285 
 										 Where prom.IsDel = 0 And ccp.IsDel = 0 And ccp.DIId = prom.DiId And prom.PriceName = '{0}'",
                                          _PaymentRefundAndOtherMoney.PriceName);
                     var data = await _sqlSugar.SqlQueryable<Fin_PaymentRefundAndOtherMoneyInfoView>(sql).FirstAsync();
@@ -377,6 +377,7 @@ namespace OASystem.Infrastructure.Repositories.Financial
                 }
                 else if (dto.Status == 2) //修改
                 {
+                    _PaymentRefundAndOtherMoney.Id = dto.Id;
                     _CreditCardPayment.Id = dto.CcpId;
                     _CreditCardPayment.CId = dto.Id;
 
@@ -402,6 +403,7 @@ namespace OASystem.Infrastructure.Repositories.Financial
                                                        it.PaymentCurrency,
                                                        it.DayRate,
                                                        it.PayThenMoney,
+                                                       it.Payee,
                                                        it.OrbitalPrivateTransfer
                                                    })
                                                    .WhereColumns(it => new { it.Id })

+ 19 - 0
OASystem/OASystem.Infrastructure/Repositories/Financial/ProceedsReceivedRepository.cs

@@ -198,7 +198,26 @@ namespace OASystem.Infrastructure.Repositories.Financial
         }
 
 
+        /// <summary>
+        /// 根据diid查询团组已收款项
+        /// 全字段
+        /// </summary>
+        /// <param name="diid"></param>
+        /// <returns></returns>
+        public async Task<Result> PostAmountReceivedByDiId(int diId)
+        {
+            Result result = new() { Code = -2 };
+
+            string sql = string.Format(@"Select * From Fin_ProceedsReceived Where IsDel=0 And Diid={0}", diId);
 
+            var groupReceivablesList = await _sqlSugar.SqlQueryable<Fin_ProceedsReceivedView>(sql).ToListAsync();
+
+            result.Code = 0;
+            result.Msg = "查询成功!";
+            result.Data = groupReceivablesList;
+
+            return result;
+        }
 
         /// <summary>
         /// 根据diid查询团组已收款项

+ 9 - 5
OASystem/OASystem.Infrastructure/Repositories/Groups/CustomersRepository.cs

@@ -153,12 +153,16 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     Grp_CreditCardPayment creditCardPayment = _sqlSugar.Queryable<Grp_CreditCardPayment>().First(a => a.CId == dto.Id && a.IsDel == 0 && a.CTable == 82);
                     CreditCardView creditCardView = _mapper.Map<CreditCardView>(creditCardPayment);
                     Grp_InsuranceCost Iid = _sqlSugar.Queryable<Grp_InsuranceCost>().First(a => a.IsDel == 0 && a.Id == customersById.Iid);
-                    if (Iid != null) customersById.IidStr = Iid.GName;
+                    if (Iid != null)
+                    {
+                        customersById.IidStr = Iid.GName;
+
+                        string CountSql = string.Format(@"select sum(InsuranceCosts) as CountCost from Grp_Customers where isdel=0 and Iid=" + customersById.Iid);
+                        DataCountCost dataCount = _sqlSugar.SqlQueryable<DataCountCost>(CountSql).First();
+                        customersById.InsuranceBalance = Math.Round(Iid.RechargeCost - dataCount.CountCost, 2);
+                    }
 
                     
-                    string CountSql = string.Format(@"select sum(InsuranceCosts) as CountCost from Grp_Customers where isdel=0 and Iid=" + customersById.Iid);
-                    DataCountCost dataCount = _sqlSugar.SqlQueryable<DataCountCost>(CountSql).First();
-                    customersById.InsuranceBalance = Math.Round(Iid.RechargeCost - dataCount.CountCost, 2);
 
                     Sys_SetData Currency = _sqlSugar.Queryable<Sys_SetData>().First(a => a.IsDel == 0 && a.Id == customersById.Currency);
                     if (Currency != null) customersById.CurrencyStr = Currency.Name;
@@ -228,7 +232,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 //币种
                 GeneralTeamRateInfoDto PostGroupTeamRatedto = new GeneralTeamRateInfoDto();
                 PostGroupTeamRatedto.DiId = dto.DiId;
-                PostGroupTeamRatedto.CTbale = 82;
+                PostGroupTeamRatedto.CTable = 82;
                 PostGroupTeamRatedto.PortType = dto.PortType;
                 Result teamRateDescAddCurrencyIdViews = _hotel.PostGroupTeamRateByDiIdAndCTableId(PostGroupTeamRatedto);
                 List<TeamRateDescAddCurrencyIdView> Currency = new List<TeamRateDescAddCurrencyIdView>();

+ 34 - 10
OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationInfoRepository.cs

@@ -43,7 +43,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
         #region 团组信息 团组详情共享Api
 
         /// <summary>
-        /// 团组信息 团组详情共享Api
+        /// 团组信息 团组预览详情共享Api
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
@@ -51,28 +51,52 @@ namespace OASystem.Infrastructure.Repositories.Groups
         {
             Result result = new Result() { Code = -2, Msg = "未知错误" };
 
-            if (dto.PortType == 1 || dto.PortType == 2) //Web Or Android
-            {
-                string sql = string.Format(@"Select Id,TourCode,ClientName,VisitCountry,VisitStartDate,VisitEndDate,VisitDays,VisitPNumber 
+            string sql = string.Format(@"Select Id,TeamName,TourCode,ClientName,VisitCountry,VisitStartDate,VisitEndDate,VisitDays,VisitPNumber 
                                              From Grp_DelegationInfo Where Id = {0} And IsDel = 0", dto.Id);
 
-                var _DelegationInfo = await _sqlSugar.SqlQueryable<ShareGroupInfoView>(sql).FirstAsync();
+            if (dto.PortType == 1) //Web
+            {
+                var _DelegationInfo = await _sqlSugar.SqlQueryable<Web_ShareGroupInfoView>(sql).FirstAsync();
                 if (_DelegationInfo != null)
                 {
-                    if (_DelegationInfo.VisitCountry.Contains("|"))
+                    if (!string.IsNullOrEmpty(_DelegationInfo.VisitCountry))
                     {
-                        _DelegationInfo.VisitCountry = _DelegationInfo.VisitCountry.Replace("|", "、");
+                        if (_DelegationInfo.VisitCountry.Contains("|"))
+                        {
+                            _DelegationInfo.VisitCountry = _DelegationInfo.VisitCountry.Replace("|", "、");
+                        }
                     }
+                    else _DelegationInfo.VisitCountry = " - ";
+
+                    result.Data = _DelegationInfo;
+                }
+                else result.Msg = "暂无该团组信息";
+            }
+            else if (dto.PortType == 2 || dto.PortType == 3) //IOS Or Android
+            {
+                var _DelegationInfo = await _sqlSugar.SqlQueryable<IOSOrAndroid_ShareGroupInfoView>(sql).FirstAsync();
+                if (_DelegationInfo != null)
+                {
+                    if (!string.IsNullOrEmpty(_DelegationInfo.VisitCountry))
+                    {
+                        if (_DelegationInfo.VisitCountry.Contains("|"))
+                        {
+                            _DelegationInfo.VisitCountry = _DelegationInfo.VisitCountry.Replace("|", "、");
+                        }
+                    }
+                    else _DelegationInfo.VisitCountry = " - ";
 
-                    result.Code = 0;
-                    result.Msg = "成功!";
                     result.Data = _DelegationInfo;
                 }
                 else result.Msg = "暂无该团组信息";
+
             }
+            else result.Msg = "请输入正确的端口号。1 Web 2 Android 3 IOS";
 
-            return result;
+            result.Code = 0;
+            result.Msg = "成功!";
 
+            return result;
         }
 
         #endregion

+ 10 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/GroupCostParameterRepository.cs

@@ -20,6 +20,16 @@ namespace OASystem.Infrastructure.Repositories.Groups
            return Query(x=>x.DiId == diid).ToList();
         }
 
+        public Grp_GroupCostParameter GetGroupCostParameterMainByDiid(int diid)
+        {
+            return Query(x => x.DiId == diid).First(x => x.CostType == "A");
+        }
+
+        public async Task<bool> UpdateIsShareById(int id,int IsShare)
+        {
+            return await UpdateAsync(x => x.Id == id, x=>new Grp_GroupCostParameter { IsShare = IsShare });
+        }
+
         public async Task<bool> DeleteGroupCostParameterListByDiid(int diid) 
         {
             return await SoftDeleteAsync(x=>x.DiId == diid);

+ 249 - 5
OASystem/OASystem.Infrastructure/Repositories/Groups/HotelPriceRepository.cs

@@ -10,6 +10,7 @@ using OASystem.Domain.ViewModels.Financial;
 using OASystem.Domain.ViewModels.Groups;
 using OASystem.Infrastructure.Tools;
 using SqlSugar;
+using StackExchange.Redis;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -22,11 +23,18 @@ namespace OASystem.Infrastructure.Repositories.Groups
     public class HotelPriceRepository : BaseRepository<Grp_HotelReservations, Grp_HotelReservations>
     {
         private readonly IMapper _mapper;
+        private readonly Result _result;
         public HotelPriceRepository(SqlSugarClient sqlSugar, IMapper mapper) :
             base(sqlSugar)
         {
             this._mapper = mapper;
+            _result = new Result() { Code = -1, Msg = "操作失败!" };
         }
+
+        #region 保留
+
+        
+
         /// <summary>
         /// 付款金额计算
         /// </summary>
@@ -246,6 +254,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 throw;
             }
         }
+        
         /// <summary>
         /// 根据酒店费用Id查询详细数据
         /// </summary>
@@ -366,7 +375,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 {
                     GeneralTeamRateInfoDto PostGroupTeamRatedto = new GeneralTeamRateInfoDto();
                     PostGroupTeamRatedto.DiId= dto.DiId;
-                    PostGroupTeamRatedto.CTbale = 76;
+                    PostGroupTeamRatedto.CTable = 76;
                     PostGroupTeamRatedto.PortType= dto.PortType;
                     Result teamRateDescAddCurrencyIdViews = PostGroupTeamRateByDiIdAndCTableId(PostGroupTeamRatedto);
                     List<TeamRateDescAddCurrencyIdView> Currency=new List<TeamRateDescAddCurrencyIdView>();
@@ -407,8 +416,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
             }
         }
 
-        
-
         /// <summary>
         /// 酒店操作
         /// </summary>
@@ -601,7 +608,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 {
                     return result = new Result() { Code = -2, Msg = "请输入正确的团组Id!" };
                 }
-                if (dto.CTbale == 0)
+                if (dto.CTable == 0)
                 {
                     return result = new Result() { Code = -2, Msg = "请输入正确的业务类型(CTable)Id!" };
                 }
@@ -611,7 +618,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 {
                     string teamRateInfoSql = string.Format(@"Select sd.Name,tr.* From Grp_TeamRate tr 
                                                      Left Join Sys_SetData  sd On sd.IsDel=0 And sd.STid=16  And tr.CTable = sd.Id 
-                                                     Where tr.IsDel = 0 And tr.DiId = {0} And tr.CTable = {1}", dto.DiId, dto.CTbale);
+                                                     Where tr.IsDel = 0 And tr.DiId = {0} And tr.CTable = {1}", dto.DiId, dto.CTable);
 
                     var teamRateInfo =  _sqlSugar.SqlQueryable<TeamRateInfoView>(teamRateInfoSql).ToList();
 
@@ -692,5 +699,242 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 return result = new Result() { Code = -2, Msg = "未知错误" };
             }
         }
+
+        #endregion
+
+        /// <summary>
+        /// 酒店预定费用
+        /// Items By DiId
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        public async Task<Result> _ItemsByDiId(int portType,int diId)
+        {
+
+            string sql = string.Format(@"Select row_number() over(order by hr.CreateTime Desc) as Row_Number,
+										 hr.Id,hr.DiId,sd1.Name As GuestType,hr.ReservationsNo,hr.HotelName,hr.CheckInDate,hr.CheckOutDate,
+										 ccp.PayMoney, ccp.PaymentCurrency,sd2.Name PayCurrency,hr.CreateUserId,u.CnName As CreateUserName,
+										 hr.CreateTime,ccp.IsAuditGM
+										 From Grp_HotelReservations  hr
+										 Inner Join Grp_CreditCardPayment ccp On hr.DiId = ccp.DIId And hr.Id = ccp.CId 
+										 And ccp.CTable = 76
+										 Left Join Sys_SetData sd1 On hr.GTId = sd1.Id
+										 Left Join Sys_SetData sd2 On ccp.PaymentCurrency = sd2.Id
+										 Left Join Sys_Users u On hr.CreateUserId = u.Id
+										 Where hr.IsDel = 0 And ccp.IsDel = 0 And hr.DiId = {0} ", diId);
+
+            if (portType == 1 || portType == 2 || portType == 3)
+            {
+                var hotelFeeData = await _sqlSugar.SqlQueryable<HotelReservationsItemsView>(sql).ToListAsync();
+
+                _result.Code = 0;
+                _result.Data = hotelFeeData;
+                _result.Msg = "操作成功!";
+            }
+            else
+            {
+                _result.Msg = "请传入正确的PortType参数,1 Web 2 Android 3 IOS";
+            }
+
+            return _result;
+        }
+
+        /// <summary>
+        /// 酒店预定
+        /// basicsData Init
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        public async Task<Result> _BasicsDataInit(int portType, int diId)
+        {
+            List<Sys_SetData> _dataSouruce = await _sqlSugar.Queryable<Sys_SetData>().Where(a => a.IsDel == 0).ToListAsync();
+
+            if (portType == 1 || portType == 2 || portType == 3)
+            {
+                //客人类型
+                List<Sys_SetData> GuestType = _dataSouruce.Where(a => a.STid == 11).ToList();
+                List<SetDataInfoView> _GuestType = _mapper.Map<List<SetDataInfoView>>(GuestType);
+
+                //预订网站
+                List<Sys_SetData> BookingWebsite = _dataSouruce.Where(a => a.STid == 12).ToList();
+                List<SetDataInfoView> _BookingWebsite = _mapper.Map<List<SetDataInfoView>>(BookingWebsite);
+
+                //支付方式
+                List<Sys_SetData> Payment = _dataSouruce.Where(a => a.STid == 14).ToList();
+                List<SetDataInfoView> _Payment = _mapper.Map<List<SetDataInfoView>>(Payment);
+
+                //卡类型
+                List<Sys_SetData> BankCard = _dataSouruce.Where(a => a.STid == 15).ToList();
+                List<SetDataInfoView> _BankCard = _mapper.Map<List<SetDataInfoView>>(BankCard);
+
+                //房间入住人类型 
+                List<Sys_SetData> CheckPerson = _dataSouruce.Where(a => a.STid == 71).ToList();
+                List<SetDataInfoView> _CheckPerson = _mapper.Map<List<SetDataInfoView>>(CheckPerson);
+
+                GeneralTeamRateInfoDto postGroupTeamRatedto = new GeneralTeamRateInfoDto()
+                {
+                    DiId = diId,
+                    CTable = 76, //酒店预定
+                    PortType = portType
+                };
+                Result teamRateDescAddCurrencyIdViews = PostGroupTeamRateByDiIdAndCTableId(postGroupTeamRatedto);
+                List<TeamRateDescAddCurrencyIdView> TeamCurrencyRate = new List<TeamRateDescAddCurrencyIdView>();
+                if (teamRateDescAddCurrencyIdViews.Code == 0)
+                {
+                    TeamCurrencyRate = teamRateDescAddCurrencyIdViews.Data;
+                }
+                var data = new
+                {
+                    GuestType = _GuestType, //客人分类
+                    Payment = _Payment,
+                    CurrencyList = TeamCurrencyRate,
+                    BankCard = _BankCard,
+                    BookingWebsite = _BookingWebsite,
+                    CheckPerson = _CheckPerson
+                };
+
+                _result.Code = 0;
+                _result.Data = data;
+                _result.Msg = "操作成功!";
+
+            }
+            else
+            {
+                _result.Msg = "请传入正确的PortType参数,1 Web 2 Android 3 IOS!";
+
+            }
+            return _result;
+        }
+
+        /// <summary>
+        /// 酒店预定
+        /// details
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        public async Task<Result> _Details(int portType, int id)
+        {
+
+            if (id < 0 )
+            {
+                _result.Msg = string.Format(@"请输入正确的Id!");
+                return _result;
+            }
+
+            string sql = string.Format(@"Select hr.Id,hr.DiId,hr.GTId,hr.CardPriceCurrency,hr.CheckNumber,hr.ReservationsWebsite,hr.ReservationsNo,
+										 hr.City,hr.HotelName,hr.HotelTel,hr.HotelAddress,hr.GuestName,hr.CheckInDate,hr.CheckOutDate,hr.CheckType,
+										 hr.RoomExplanation,hr.Remark As HotelRemark,hr.SingleRoomPrice,hr.SingleRoomCount,hr.DoubleRoomPrice,
+										 hr.DoubleRoomCount,hr.SuiteRoomPrice,hr.SuiteRoomCount,hr.OtherRoomPrice,hr.OtherRoomCount,hr.CardPrice,
+										 hr.Isoppay,hr.BreakfastPrice,hr.BreakfastCurrency,hr.GovernmentRent,hr.GovernmentRentCurrency,hr.CityTax,
+										 hr.CityTaxCurrency,ccp.PayDId,ccp.ConsumptionPatterns,ccp.ConsumptionDate,ccp.PayMoney,ccp.PaymentCurrency,
+										 ccp.OtherBankName,ccp.OtherSideNo,ccp.OtherSideName,ccp.Payee,ccp.OrbitalPrivateTransfer,ccp.Remark As CcpRemark
+										 From Grp_HotelReservations  hr
+										 Inner Join Grp_CreditCardPayment ccp On hr.DiId = ccp.DIId And hr.Id = ccp.CId 
+										 And ccp.CTable = 76
+										 Where hr.IsDel = 0 And ccp.IsDel = 0 And  hr.Id = {0}", id);
+
+            if (portType == 1 || portType == 2 || portType == 3)
+            {
+                var info = await _sqlSugar.SqlQueryable<HotelReservationsDetailsView>(sql).FirstAsync();
+                if (info != null) _result.Msg = "操作成功!"; 
+                else _result.Msg = "暂无数据"; 
+
+                _result.Code = 0;
+                _result.Data = info;
+                return _result;
+            }
+            else
+            {
+                _result.Msg = "请传入正确的PortType参数,1 Web 2 Android 3 IOS";
+                return _result;
+            }
+        }
+
+        /// <summary>
+        /// 酒店预定
+        /// Add Or Edit
+        /// </summary>
+        /// <returns></returns>
+        public async Task<Result> _AddOrEdit(HotelReservationsAddOrEditDto _dto)
+        {
+            int portType = _dto.PortType;
+            if (portType == 1 || portType == 2 || portType == 3)
+            {
+                Grp_HotelReservations _HotelReservations = new Grp_HotelReservations();
+                Grp_CreditCardPayment _CreditCardPayment = new Grp_CreditCardPayment();
+
+                #region 参数处理
+                _HotelReservations = _mapper.Map<Grp_HotelReservations>(_dto);
+                _CreditCardPayment = _mapper.Map<Grp_CreditCardPayment>(_dto);
+                #endregion
+
+                if (_dto.Id == 0) // Add
+                {
+                    _sqlSugar.BeginTran();
+
+                    int hotelId = await _sqlSugar.Insertable<Grp_HotelReservations>(_HotelReservations).ExecuteReturnIdentityAsync();
+                    if (hotelId < 0)
+                    {
+                        _result.Msg = "酒店预定信息添加失败!";
+                        _sqlSugar.RollbackTran(); //回滚
+                        return _result;
+                    }
+                    _CreditCardPayment.CId = hotelId;
+                    _CreditCardPayment.CTable = 76; //酒店预定模块
+
+                    int ccpId = await _sqlSugar.Insertable<Grp_CreditCardPayment>(_CreditCardPayment).ExecuteReturnIdentityAsync();
+                    if (ccpId < 0)
+                    {
+                        _result.Msg = "付款信息添加失败!";
+                        _sqlSugar.RollbackTran(); //回滚
+                        return _result;
+                    }
+                    _result.Msg = "操作成功!";
+                    _sqlSugar.CommitTran(); // 提交
+                }
+                else if (_dto.Id > 0) //Edit
+                {
+                    _sqlSugar.BeginTran();
+
+                    int hotelStatus = await _sqlSugar.Updateable<Grp_HotelReservations>(_HotelReservations)
+                                                     .UpdateColumns(it => new
+                                                     {
+                                                         it.GTId,
+                                                         it.CheckNumber,
+                                                         it.ReservationsWebsite,
+                                                         it.ReservationsNo,
+                                                         it.City,
+                                                         it.HotelName,
+                                                         it.HotelTel,
+                                                         it.HotelAddress,
+                                                         it.GuestName,
+                                                         it.CheckInDate,
+                                                         it.CheckOutDate,
+
+                                                     })
+                                                     .WhereColumns(it => it.Id)
+                                                     .ExecuteCommandAsync();
+
+                    var hotelInfo = await _sqlSugar.Queryable<Grp_HotelReservations>().FirstAsync();
+
+
+
+                    _sqlSugar.CommitTran();
+                    _sqlSugar.RollbackTran();
+                }
+                else if (_dto.Id < 0) //不正确的Id
+                {
+                    _result.Msg = "请输入正确的数据Id!";
+                }
+
+
+            }
+            else
+            {
+                _result.Msg = "请传入正确的PortType参数,1 Web 2 Android 3 IOS";
+            }
+
+            return _result;
+        }
     }
 }

+ 61 - 28
OASystem/OASystem.Infrastructure/Repositories/Groups/TeamRateRepository.cs

@@ -370,39 +370,72 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
             Result result = new() { Code = -2 };
 
-            
-            List<Grp_TeamRate> teamRates = new List<Grp_TeamRate>();
-            foreach (TeamRateUpdateInfo item in dto.teamRateUpdateInfos)
-            {
-                Grp_TeamRate teamRateInfo = new Grp_TeamRate();
-                string currencyStr = string.Empty;
-                foreach (TeamRateDescView currency in item.teamRates)
-                {
-                    currencyStr += string.Format(@"{0}({1}):{2}|", currency.CurrencyName, currency.CurrencyCode, currency.Rate);
-                }
-                if (currencyStr.Length > 0)
-                {
-                    currencyStr = currencyStr.Substring(0, currencyStr.Length - 1);
-                }
-
-                teamRateInfo.DiId = dto.DiId;
-                teamRateInfo.CreateUserId = dto.CreateUserId;
-                teamRateInfo.Id = item.Id;
-                teamRateInfo.CreateTime = DateTime.Now;
-                teamRateInfo.CTable = item.CTable;
-                teamRateInfo.Remark = currencyStr;
-                teamRates.Add(teamRateInfo);
-            }
-
-
             int addCount = 0, updateCount = 0;
             if (dto.PortType == 1)
             {
                 try
                 {
-                    var x = _sqlSugar.Storageable(teamRates).ToStorage();
-                    addCount= x.AsInsertable.ExecuteCommand();        //不存在插入
-                    updateCount = x.AsUpdateable.ExecuteCommand();    //存在更新
+
+                    _sqlSugar.BeginTran();
+                    int res = -1;
+                    foreach (TeamRateUpdateInfo item in dto.teamRateUpdateInfos)
+                    {
+                        Grp_TeamRate teamRateInfo = new Grp_TeamRate();
+                        string currencyStr = string.Empty;
+                        foreach (TeamRateDescView currency in item.teamRates)
+                        {
+                            currencyStr += string.Format(@"{0}({1}):{2}|", currency.CurrencyName, currency.CurrencyCode, currency.Rate);
+                        }
+                        if (currencyStr.Length > 0)
+                        {
+                            currencyStr = currencyStr.Substring(0, currencyStr.Length - 1);
+                        }
+
+                        teamRateInfo.DiId = dto.DiId;
+                        teamRateInfo.CreateUserId = dto.CreateUserId;
+                        teamRateInfo.Id = item.Id;
+                        teamRateInfo.CreateTime = DateTime.Now;
+                        teamRateInfo.CTable = item.CTable;
+                        teamRateInfo.Remark = currencyStr;
+
+                        var teamRateDetails = _sqlSugar.Queryable<Grp_TeamRate>().Where(it => it.DiId == dto.DiId && it.CTable == item.CTable).First();
+                        if (teamRateDetails == null) //添加
+                        {
+                            res = await _sqlSugar.Insertable(teamRateInfo).ExecuteCommandAsync();
+                            if (res > 0)
+                            {
+                                addCount++;
+                            }
+                            
+                        }
+                        else //修改
+                        {
+                            teamRateInfo.Id = teamRateDetails.Id;
+                            res = await _sqlSugar.Updateable(teamRateInfo)
+                                        .UpdateColumns(it => it.Remark)
+                                        .WhereColumns(it => new { it.Id,it.DiId,it.CTable })
+                                        .ExecuteCommandAsync();
+                            if (res > 0)
+                            {
+                                updateCount++;
+                            }
+                        }
+                        if (res < 1)
+                        {
+                            _sqlSugar.RollbackTran();
+                            result.Msg = "操作失败!";
+                            break;
+                        }
+
+                    }
+
+                    if (res > 0)
+                    {
+                        _sqlSugar.CommitTran();
+                        result.Code = 0;
+                        result.Msg = "操作成功";
+                    }
+
                 }
                 catch (Exception ex)
                 {

+ 2 - 2
OASystem/OASystem.Infrastructure/Repositories/Login/LoginRepository.cs

@@ -102,8 +102,8 @@ namespace OASystem.Infrastructure.Repositories.Login
             string IdCrad = registerDto.IdCrad;
             string birthDay = IdCrad.Substring(6, 4) + "-" + IdCrad.Substring(10, 2) + "-" + IdCrad.Substring(12, 2);
 
-            string number = await CreateNumber(registerDto.DepId);
-
+            //string number = await CreateNumber(registerDto.DepId);
+            string number = "10001";
             if (string.IsNullOrEmpty(number))
             {
                 result.Code = -2;