Procházet zdrojové kódy

酒店预订
下拉框排序倒序;voucher里“guest name”要显示性别英文+客户名称拼音(问下宋夏雨规范)(已处理)

leiy před 11 měsíci
rodič
revize
35496a5d35

+ 7 - 2
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -1818,6 +1818,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> PostPayRequest_Center(PostPayRequestByDateRangeDto dto)
         {
+            Stopwatch stopwatch = Stopwatch.StartNew();
             #region 验证
             DateTime beginDt, endDt;
             string format = "yyyy-MM-dd";
@@ -1851,7 +1852,8 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                 tree_Fin_DailyFeePaymentResult dailyResult = PayRequest_DailyByDateRange(dto.Status, checkedView.DailyPaymentIds, dto.beginDt, dto.endDt);
                 tree_Group_DailyFeePaymentResult groupResult = PayRequest_GroupPaymentByDateRange(dto.Status, checkedView.GroupIds, dto.beginDt, dto.endDt);
 
-                return Ok(JsonView(true, "获取成功", new { daily = dailyResult, group = groupResult }));
+                stopwatch.Stop();
+                return Ok(JsonView(true, $"查询成功!耗时{stopwatch.ElapsedMilliseconds/1000}s", new { daily = dailyResult, group = groupResult }));
             }
             catch (Exception ex)
             {
@@ -2417,6 +2419,7 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> PostPayRequestFileDownload(PayRequestFileDownloadDto dto)
         {
+            Stopwatch stopwatch = Stopwatch.StartNew();
 
             #region 参数,权限 验证
             if (dto.PortType < 1)
@@ -2585,7 +2588,9 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                 string fileName = ("PayRequest/付款申请(" + dto.beginDt + "~" + dto.endDt + ").xlsx");
                 designer.Workbook.Save(AppSettingsHelper.Get("ExcelBasePath") + fileName);
                 string rst = AppSettingsHelper.Get("ExcelBaseUrl") + AppSettingsHelper.Get("ExcelFtpPath") + fileName;
-                return Ok(JsonView(true, "操作成功!", new { url = rst }));
+                stopwatch.Stop();
+
+                return Ok(JsonView(true, $"操作成功!{stopwatch.ElapsedMilliseconds/1000}s", new { url = rst }));
 
             }
             catch (Exception ex)

+ 39 - 3
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -7955,7 +7955,6 @@ namespace OASystem.API.Controllers
 
                 #endregion
 
-
                 Grp_HotelReservations hr = await _sqlSugar.Queryable<Grp_HotelReservations>().Where(it => it.IsDel == 0 && it.Id == _dto.Id).FirstAsync();
 
                 //判断数据是否完整
@@ -8042,7 +8041,6 @@ namespace OASystem.API.Controllers
                             {
                                 mark.Text = hr.HotelFax;
                             }
-
                         }
                         //入住时间
                         if (doc.Range.Bookmarks["CIn"] != null)
@@ -8061,8 +8059,46 @@ namespace OASystem.API.Controllers
                         //客户名称
                         if (doc.Range.Bookmarks["GName"] != null)
                         {
+                            string guestName = "";
+                            string[] clients = new string[] { };
+                            if (hr.GuestName.Contains(","))
+                            {
+                                clients = hr.GuestName.Split(",");
+                            }
+                            else
+                            {
+                                clients = new string[] { hr.GuestName };
+                            }
+
+                            List<int> clientIds_int = new List<int>();
+                            if (clients.Length > 0)
+                            {
+                                foreach (var item in clients)
+                                {
+                                    if (item.IsNumeric())
+                                    {
+                                        clientIds_int.Add(int.Parse(item));
+                                    }
+                                }
+                            }
+                            if (clientIds_int.Count > 0)
+                            {
+                                var _clientDatas =  _sqlSugar.Queryable<Crm_DeleClient>().Where(it => it.IsDel == 0 && clientIds_int.Contains(it.Id)).ToList();
+                                foreach (var client in _clientDatas)
+                                {
+                                    guestName += $"{client.Pinyin},";
+                                }
+                                if (guestName.Length > 0)
+                                {
+                                    guestName = guestName.Substring(0, guestName.Length - 1);
+                                }
+                            }
+                            else
+                            {
+                                guestName = hr.GuestName;
+                            }
                             Bookmark mark = doc.Range.Bookmarks["GName"];
-                            mark.Text = hr.GuestName;
+                            mark.Text = guestName;
                         }
 
                         //房间介绍