Browse Source

团组报表 详情
机票预订修改

leiy 1 year ago
parent
commit
795f19b874

+ 190 - 26
OASystem/OASystem.Api/Controllers/StatisticsController.cs

@@ -13,6 +13,9 @@ using static OpenAI.GPT3.ObjectModels.SharedModels.IOpenAiModels;
 using System;
 using OASystem.Domain.Entities.Customer;
 using System.Collections.Generic;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using Microsoft.VisualBasic;
+using OASystem.Domain.Entities.Groups;
 
 namespace OASystem.API.Controllers
 {
@@ -146,6 +149,7 @@ namespace OASystem.API.Controllers
             if (pageFunAuthView.CheckAuth == 0) return Ok(JsonView(false, "您没有查看权限"));
             #endregion
 
+
             #endregion
             if (_dto.PortType == 1 || _dto.PortType == 2 || _dto.PortType == 3) // web/Android/IOS
             {
@@ -209,6 +213,44 @@ namespace OASystem.API.Controllers
                                                 Where gec.IsDel = 0 And ccp.IsAuditGM = 1 And ccp.IsPay = 1 And  gec.DiId = {0}",_dto.DiId);
 
                 List<Gsd_ExtraCostsView> _ExtraCostsViews = await _sqlSugar.SqlQueryable<Gsd_ExtraCostsView>(_ecSql).ToListAsync();
+
+                //模拟数据
+                if (_ExtraCostsViews.Count < 1)
+                {
+                    _ExtraCostsViews.Add(new Gsd_ExtraCostsView()
+                    {
+                        GECId = 0,
+                        GECDiId = 2334,
+                        PriceName = "模拟数据-超支费用名称",
+                        PayMoney = 1000.00M,
+                        PaymentCurrency = "CNY",
+                        DayRate = 1.0000M,
+                        CNYPrice = 1000.00M,
+                        Payee = "模拟数据-超支费用收款方",
+                        OrbitalPrivateTransfer = 1,
+                        PayWay = "刷卡",
+                        CardType = "招行卡",
+                        IsPay = 1,
+                        Applicant = "刘华举"
+                    });
+                    _ExtraCostsViews.Add(new Gsd_ExtraCostsView()
+                    {
+                        GECId = 0,
+                        GECDiId = 2334,
+                        PriceName = "模拟数据-超支费用名称",
+                        PayMoney = 1000.00M,
+                        PaymentCurrency = "CNY",
+                        DayRate = 1.0000M,
+                        CNYPrice = 1000.00M,
+                        Payee = "模拟数据-超支费用收款方",
+                        OrbitalPrivateTransfer = 1,
+                        PayWay = "刷卡",
+                        CardType = "招行卡",
+                        IsPay = 1,
+                        Applicant = "刘华举"
+                    });
+                }
+
                 exTotalAmount = _ExtraCostsViews.Sum(it => it.CNYPrice);
 
                 _giView.ExtraCostsViews = _ExtraCostsViews;
@@ -229,7 +271,7 @@ namespace OASystem.API.Controllers
 										         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";
@@ -267,9 +309,9 @@ namespace OASystem.API.Controllers
                         ThisRate = ropItem.DayRate,
                         Payee = ropItem.Payee,
                         PayTime = ropItem.AuditGMDate,
-                        FeeType = orbitalPrivateTransferStr,
+                        OrbitalPrivateTransfer = ropItem.OrbitalPrivateTransfer,
                         PayType = payStr,
-                        PayStatus = ropItem.IsPay == 0 ? "未付款" : "已付款",
+                        IsPay = ropItem.IsPay,
                         Applicant = ropItem.Appliction
 
                     };
@@ -277,6 +319,44 @@ namespace OASystem.API.Controllers
                     _promView.Add(gsd_PaymentRefund);
                 }
 
+                //模拟数据
+                if (_promView.Count < 1)
+                {
+                    _promView.Add(new Gsd_PaymentRefundAndOtherMoneyView() {
+                        Id = 0,
+                        DiId = 2334,
+                        PriceName = "模拟数据-费用名称",
+                        PayCurrencyCode ="CNY",
+                        PayCurrencyName = "人名币",
+                        Price = 1000.00M,
+                        CNYPrice = 1000.00M,
+                        ThisRate = 1.00M,
+                        Payee="模拟数据-收款方",
+                        PayTime = "2023-01-01 15:20:01",
+                        OrbitalPrivateTransfer = 1,
+                        PayType = "刷卡",
+                        IsPay = 1,
+                        Applicant = "刘华举"
+                    });
+                    _promView.Add(new Gsd_PaymentRefundAndOtherMoneyView()
+                    {
+                        Id = 0,
+                        DiId = 2334,
+                        PriceName = "模拟数据-费用名称",
+                        PayCurrencyCode = "CNY",
+                        PayCurrencyName = "人名币",
+                        Price = 1000.00M,
+                        CNYPrice = 1000.00M,
+                        ThisRate = 1.00M,
+                        Payee = "模拟数据-收款方",
+                        PayTime = "2023-01-01 15:20:01",
+                        OrbitalPrivateTransfer = 1,
+                        PayType = "刷卡",
+                        IsPay = 1,
+                        Applicant = "刘华举"
+                    });
+                }
+
                 promTotalAmount = _promView.Sum(it => it.CNYPrice);
                 _giView.PaymentRefundAndOtherMoneyViews = _promView;
                 _giView.PaymentRefundAndOtherMoneyStr = string.Format(@"人名币总费用:{0} CNY", promTotalAmount.ConvertToDecimal1().ToString("#0.00"));
@@ -415,37 +495,66 @@ namespace OASystem.API.Controllers
                 int Index = 0;
                 foreach (var item in groupAirFeeViews)
                 {
-                    string itemClientName = "";
-                    if (!string.IsNullOrEmpty(item.ClientName))
+
+                    if (item.AirId > 2924)
                     {
-                        string[] clientIds = new string[] { };
-                        if (item.ClientName.Contains(','))
-                        {
-                            clientIds = item.ClientName.Split(',');
-                        }
-                        else
+                        string itemClientName = "";
+                        if (!string.IsNullOrEmpty(item.ClientName))
                         {
-                            clientIds = new string[] { item.ClientName };
+                            string[] clientIds = new string[] { };
+                            if (item.ClientName.Contains(','))
+                            {
+                                clientIds = item.ClientName.Split(',');
+                            }
+                            else
+                            {
+                                clientIds = new string[] { item.ClientName };
+                            }
+                            if (clientIds.Length > 0)
+                            {
+                                int[] output = Array.ConvertAll<string, int>(clientIds, delegate (string s) { return int.Parse(s); });
+                                var clients = _clientDatas.Where(it => output.Contains(it.Id)).ToList();
+                                string clientPinYinName = "";
+                                decimal unitCost = 0.00M;
+                                unitCost = (item.PayMoney / item.ClientNum).ConvertToDecimal1();
+                                foreach (var client in clients)
+                                {
+                                    Index += 1;
+                                    int clienIndex = 1;
+                                    itemClientName += string.Format(@"{0}.{1} ;", clienIndex, client);
+                                    clientPinYinName += string.Format(@"{0}.{1}出票价为:{2} CNY;", Index, client.Pinyin, unitCost);
+                                    clienIndex++;
+                                }
+                            }
                         }
-                        if (clientIds.Length > 0)
-                        {
+                        item.ClientName = itemClientName;
+                    }
+                    else
+                    {
+                        string clientPinYinName = "";
+                        decimal unitCost = 0.00M;
+                        unitCost = (item.PayMoney / item.ClientNum).ConvertToDecimal1();
 
-                            int[] output = Array.ConvertAll<string, int>(clientIds, delegate (string s) { return int.Parse(s); });
-                            var clients = _clientDatas.Where(it => output.Contains(it.Id)).ToList();
-                            string clientPinYinName = "";
-                            decimal unitCost = 0.00M;
-                            unitCost = (item.PayMoney / item.ClientNum).ConvertToDecimal1();
-                            foreach (var client in clients)
+                        string[] clientNames = item.ClientName.Split('.');
+                        for (int i = 0; i < item.ClientNum; i++)
+                        {
+                            string name = "";
+                            if (clientNames.Length > 0)
                             {
-                                Index += 1;
-                                int clienIndex = 1;
-                                itemClientName += string.Format(@"{0}.{1} ;", clienIndex, client);
-                                clientPinYinName += string.Format(@"{0}.{1}出票价为:{2} CNY;", Index,client.Pinyin, unitCost);
-                                clienIndex++;
+                                int index = i + 1;
+                                if (index < clientNames.Length)
+                                {
+                                    name = clientNames[index].Replace("MR","").Replace("MS","");
+                                }
                             }
+                            
+                            clientPinYinName += string.Format(@"{0}.{1}出票价为:{2} CNY;", Index, name, unitCost);
                         }
+                        
                     }
-                    item.ClientName = itemClientName;
+
+
+                    
 
                     if (!string.IsNullOrEmpty(item.AuditGMDate))
                     {
@@ -515,6 +624,61 @@ namespace OASystem.API.Controllers
 
                 groupInvitationalFeeViews = await _sqlSugar.SqlQueryable<GroupInvitationalFeeView>(groupInvitationalFeeSql).ToListAsync();
 
+                //模拟数据
+                if (groupInvitationalFeeViews.Count < 1)
+                {
+                    groupInvitationalFeeViews.Add(new GroupInvitationalFeeView()
+                    {
+                        IOAId = 0,
+                        IOADiId = 2334,
+                        InviterArea = "模拟数据-邀请方地区",
+                        Inviter = "模拟数据-邀请方",
+                        InviteTime = "2023-10-10",
+                        InviteCost = 100.00M,
+                        InviteCurrency = "EUR",
+                        SendCost = 100.00M,
+                        SendCurrency = "EUR",
+                        EventsCost = 10000.00M,
+                        EventsCurrency = "EUR",
+                        TranslateCost = 300.00M,
+                        TranslateCurrency = "EUR",
+                        PayMoney = 10500.00M,
+                        PaymentCurrency = "EUR",
+                        CNYPrice = 76765.50M,
+                        Payee = "模拟数据-收款方",
+                        AuditGMDate = "2023-12-05",
+                        OrbitalPrivateTransfer = 1,
+                        PayWay = "刷卡",
+                        IsPay = 1,
+                        Applicant = "刘华举"
+                    });
+                    groupInvitationalFeeViews.Add(new GroupInvitationalFeeView()
+                    {
+                        IOAId = 0,
+                        IOADiId = 2334,
+                        InviterArea = "模拟数据-邀请方地区",
+                        Inviter = "模拟数据-邀请方",
+                        InviteTime = "2023-10-10",
+                        InviteCost = 100.00M,
+                        InviteCurrency = "EUR",
+                        SendCost = 100.00M,
+                        SendCurrency = "EUR",
+                        EventsCost = 10000.00M,
+                        EventsCurrency = "EUR",
+                        TranslateCost = 300.00M,
+                        TranslateCurrency = "EUR",
+                        PayMoney = 10500.00M,
+                        PaymentCurrency = "EUR",
+                        CNYPrice = 76765.50M,
+                        Payee = "模拟数据-收款方",
+                        AuditGMDate = "2023-12-05",
+                        OrbitalPrivateTransfer = 1,
+                        PayWay = "刷卡",
+                        IsPay = 1,
+                        Applicant = "刘华举"
+                    });
+                }
+
                 decimal InvitationalCNYTotalPrice = 0.00M;
 
                 foreach (var item in groupInvitationalFeeViews)

+ 20 - 2
OASystem/OASystem.Domain/Entities/Groups/Grp_AirTicketReservations.cs

@@ -42,27 +42,32 @@ namespace OASystem.Domain.Entities.Groups
         public string ArrivedTime { get; set; }
         /// <summary>
         /// 是否值机
+        /// 0 否 1 是
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int IsCheckIn { get; set; }
         /// <summary>
         /// 是否选座
+        /// 0 否 1 是
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int IsSetSeat { get; set; }
 
         /// <summary>
         /// 是否购买行李服务
+        /// 0 否 1 是
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int IsPackage { get; set; }
         /// <summary>
         /// 是否行李直挂
+        /// 0 否 1 是
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int IsBagHandle { get; set; }
         /// <summary>
         /// 是否火车票出票选座
+        /// 0 否 1 是
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int IsTrain { get; set; }
@@ -133,11 +138,24 @@ namespace OASystem.Domain.Entities.Groups
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(1000)")]
         public string PriceDescription { get; set; }
-        
+
         /// <summary>
-        /// 舱类型
+        /// 舱类型(数据类型外键)
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "int")]
         public int CType { get; set; }
+
+        /// <summary>
+        /// 客人类型(数据类型外键)
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
+        public int PassengerType { get; set; }
+
+        /// <summary>
+        /// 报价说明
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(30)")]
+        public string CreateTime1 { get; set; }
+
     }
 }

+ 6 - 4
OASystem/OASystem.Domain/ViewModels/Statistics/GroupStatementView.cs

@@ -335,7 +335,7 @@ namespace OASystem.Domain.ViewModels.Statistics
         /// 费用标识
         /// -1 未选择 0 公转 1 私转
         /// </summary>
-        public string? OrbitalPrivateTransfer { get; set; }
+        public int OrbitalPrivateTransfer { get; set; }
 
         /// <summary>
         /// 支付方式
@@ -350,7 +350,7 @@ namespace OASystem.Domain.ViewModels.Statistics
         /// <summary>
         /// 付款状态
         /// </summary>
-        public string? IsPay { get; set; }
+        public int IsPay { get; set; }
 
         /// <summary>
         /// 申请人
@@ -409,8 +409,9 @@ namespace OASystem.Domain.ViewModels.Statistics
 
         /// <summary>
         /// 费用标识
+        /// -1 未选择 0 公转 1 私转
         /// </summary>
-        public string? FeeType { get; set; }
+        public int? OrbitalPrivateTransfer { get; set; }
 
         /// <summary>
         /// 支付方式
@@ -419,8 +420,9 @@ namespace OASystem.Domain.ViewModels.Statistics
 
         /// <summary>
         /// 付款状态
+        /// 0 未付款 1 已付款
         /// </summary>
-        public string? PayStatus { get; set; }
+        public int IsPay { get; set; }
 
         /// <summary>
         /// 申请人