|
@@ -1,5 +1,6 @@
|
|
|
using Aspose.Words.Tables;
|
|
|
using AutoMapper;
|
|
|
+using NPOI.SS.Formula.Functions;
|
|
|
using NPOI.SS.UserModel;
|
|
|
using NPOI.Util;
|
|
|
using OASystem.Domain;
|
|
@@ -8,6 +9,7 @@ using OASystem.Domain.Entities.Financial;
|
|
|
using OASystem.Domain.Entities.Groups;
|
|
|
using OASystem.Domain.Entities.Resource;
|
|
|
using OASystem.Domain.ViewModels.Groups;
|
|
|
+using OASystem.Infrastructure.Repositories.System;
|
|
|
using OASystem.Infrastructure.Tools;
|
|
|
using SqlSugar.Extensions;
|
|
|
using System.Collections.Generic;
|
|
@@ -19,12 +21,14 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
{
|
|
|
private readonly IMapper _mapper;
|
|
|
private readonly CheckBoxsRepository _checkRep;
|
|
|
+ private readonly SetDataRepository _setDataRep;
|
|
|
|
|
|
- public CarTouristGuideGroundRepository(SqlSugarClient sqlSugar, IMapper mapper , CheckBoxsRepository checkRep)
|
|
|
+ public CarTouristGuideGroundRepository(SqlSugarClient sqlSugar, IMapper mapper , CheckBoxsRepository checkRep, SetDataRepository setDataRep)
|
|
|
: base(sqlSugar)
|
|
|
{
|
|
|
_mapper = mapper;
|
|
|
_checkRep = checkRep;
|
|
|
+ _setDataRep = setDataRep;
|
|
|
}
|
|
|
|
|
|
public async Task<Result> OpCarTouristGuideGround(OpCarTouristGuideGroundDto dto)
|
|
@@ -600,32 +604,122 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
Count = item.Count,
|
|
|
}).ToList();
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- DataTable tb = new DataTable();
|
|
|
- tb.Columns.Add("日期", typeof(DateTime));
|
|
|
- tb.Columns.Add("费用", typeof(decimal));
|
|
|
- var addsTourClientList = new List<Grp_TourClientList>();
|
|
|
- var carExtraList = carTouristList.Where(x => x.SId == 982).ToList();
|
|
|
- var mealPriceList = carTouristList.Where(x => x.SId == 93 || x.SId == 988 || x.SId == 989).GroupBy(x => x.DatePrice).ToList();
|
|
|
- mealPriceList.ForEach(x =>
|
|
|
+ if (carTouristList.Count > 0)
|
|
|
{
|
|
|
- var row = tb.NewRow();
|
|
|
- row["日期"] = x.Key;
|
|
|
- row["费用"] = x.Sum(x => x.Price);
|
|
|
- });
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
- var cityPrice = _sqlSugar.Queryable<Grp_NationalTravelFee>().Where(x =>
|
|
|
- !string.IsNullOrEmpty(x.City) && x.City.Contains("")
|
|
|
- ).ToList();
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
foreach (var item in carTouristList)
|