|
@@ -11725,6 +11725,67 @@ ORDER by gctggrc.id DESC
|
|
|
return Ok(_view);
|
|
|
}
|
|
|
|
|
|
+ #region 成本无酒店价格数据进入超支
|
|
|
+ _sqlSugar.BeginTran();
|
|
|
+ var start_Bool = DateTime.TryParse(_dto.CheckInDate, out DateTime start_Time);
|
|
|
+ var end_Bool = DateTime.TryParse(_dto.CheckOutDate, out DateTime end_Time);
|
|
|
+ var groupCost = _sqlSugar.Queryable<Grp_GroupCost>().Where(x => x.Diid == _dto.DiId && x.IsDel == 0).ToList();
|
|
|
+ for (int i = 0; i < groupCost.Count; i++)
|
|
|
+ {
|
|
|
+ if (groupCost[i].Date.IsNullOrWhiteSpace() && i != 0)
|
|
|
+ {
|
|
|
+ groupCost[i].Date = groupCost[i - 1].Date;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var groupCost_Grp = groupCost.GroupBy(x => x.Date).ToList();
|
|
|
+ List<Fin_GroupExtraCostDto_OP> extraCostList = new
|
|
|
+ List<Fin_GroupExtraCostDto_OP>();
|
|
|
+
|
|
|
+ if (start_Bool && end_Bool)
|
|
|
+ {
|
|
|
+ while (start_Time < end_Time)
|
|
|
+ {
|
|
|
+ foreach (var item in groupCost_Grp)
|
|
|
+ {
|
|
|
+ if (DateTime.TryParse(item.Key, out DateTime cost_Time))
|
|
|
+ {
|
|
|
+ if (DateTime.Compare(start_Time, cost_Time) == 0 && item.Sum(x => x.SGR + x.Suite + x.TBR + x.JS_ES) == 0)
|
|
|
+ {
|
|
|
+ extraCostList.Add(new
|
|
|
+ Fin_GroupExtraCostDto_OP
|
|
|
+ {
|
|
|
+ Area = 0,
|
|
|
+ coefficient = 1.5M,
|
|
|
+ createUser = _dto.UserId,
|
|
|
+ currency = _dto.CardPriceCurrency,
|
|
|
+ diId = _dto.DiId,
|
|
|
+ ManagerConfirm = 0,
|
|
|
+ SupervisorConfirm = 0,
|
|
|
+ SYsupervisorConfirm = 0,
|
|
|
+ editType = 1,
|
|
|
+ PortType = 1,
|
|
|
+ price = _dto.CardPrice,
|
|
|
+ PriceCount = 1,
|
|
|
+ priceType = 1027,
|
|
|
+ priceDetailType = 1044,
|
|
|
+ PriceDt = start_Time.ToString("yyyy-MM-dd"),
|
|
|
+ priceName = "酒店超支费用-酒店导入",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ start_Time = start_Time.AddDays(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (extraCostList.Any())
|
|
|
+ {
|
|
|
+ await _carTouristGuideGroundRep.GroupExtraCost_OperatorList(extraCostList);
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
#region 应用推送
|
|
|
|
|
|
try
|