Browse Source

1.团组成本提示-->机票提示模块-->新增 日期,行程描述 列表

leiy 9 months ago
parent
commit
c97df0cd34

+ 6 - 1
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -8945,8 +8945,13 @@ namespace OASystem.API.Controllers
                                     AirZCB = (item.GWCRS * item.GWCCB)
                                 }
                             );
+                            var groupCosts = _usersRep._sqlSugar.Queryable<Grp_GroupCost>().Where(it => it.IsDel == 0 && it.Diid == dto.DiId).ToList();
+                            var initDatas = groupCosts.Select(it => new { date = it.Date, week = it.Date.GetWeek() == "" ? "-" : it.Date.GetWeek(), itinerary = it.ITIN }).ToList();
 
-                            modulePromptInfo.Data = datas;
+                            modulePromptInfo.Data = new { 
+                                airFeeData = datas,
+                                airInitData = initDatas
+                            };
                             _ModulePromptInfos.Add(modulePromptInfo);
 
                             break;

+ 17 - 0
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

@@ -2685,6 +2685,23 @@ namespace OASystem.API.OAMethodLib
 
             return new Result() { Code = 0, Msg = "获取成功!", Data = NewListTravel };
         }
+
+        /// <summary>
+        /// 根据日期获取星期
+        /// </summary>
+        /// <param name="dt"></param>
+        /// <returns></returns>
+        public static string GetWeek(this string dtStr)
+        {
+            string week = "";
+            bool isDt = DateTime.TryParse(dtStr,out DateTime dt);
+            if (isDt)
+            {
+                week = weekdays[(int)dt.DayOfWeek];
+            }
+
+            return week;
+        }
         #endregion