|
@@ -6,8 +6,10 @@ using FluentValidation;
|
|
using NPOI.SS.UserModel;
|
|
using NPOI.SS.UserModel;
|
|
using NPOI.XSSF.UserModel;
|
|
using NPOI.XSSF.UserModel;
|
|
using OASystem.API.OAMethodLib;
|
|
using OASystem.API.OAMethodLib;
|
|
|
|
+using OASystem.API.OAMethodLib.APNs;
|
|
using OASystem.API.OAMethodLib.File;
|
|
using OASystem.API.OAMethodLib.File;
|
|
using OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice;
|
|
using OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice;
|
|
|
|
+using OASystem.Domain.AesEncryption;
|
|
using OASystem.Domain.Dtos.Financial;
|
|
using OASystem.Domain.Dtos.Financial;
|
|
using OASystem.Domain.Dtos.Groups;
|
|
using OASystem.Domain.Dtos.Groups;
|
|
using OASystem.Domain.Entities.Customer;
|
|
using OASystem.Domain.Entities.Customer;
|
|
@@ -26,8 +28,6 @@ using System.Diagnostics;
|
|
using System.Globalization;
|
|
using System.Globalization;
|
|
using System.IO.Compression;
|
|
using System.IO.Compression;
|
|
using static OASystem.API.OAMethodLib.JWTHelper;
|
|
using static OASystem.API.OAMethodLib.JWTHelper;
|
|
-using OASystem.API.OAMethodLib.APNs;
|
|
|
|
-using OASystem.Domain.AesEncryption;
|
|
|
|
|
|
|
|
namespace OASystem.API.Controllers
|
|
namespace OASystem.API.Controllers
|
|
{
|
|
{
|
|
@@ -57,18 +57,18 @@ namespace OASystem.API.Controllers
|
|
/// 初始化
|
|
/// 初始化
|
|
/// </summary>
|
|
/// </summary>
|
|
public FinancialController(
|
|
public FinancialController(
|
|
- IMapper mapper,
|
|
|
|
|
|
+ IMapper mapper,
|
|
IConfiguration configuration,
|
|
IConfiguration configuration,
|
|
ILogger<FinancialController> logger,
|
|
ILogger<FinancialController> logger,
|
|
- DailyFeePaymentRepository daiRep,
|
|
|
|
- SqlSugarClient sqlSugar,
|
|
|
|
|
|
+ DailyFeePaymentRepository daiRep,
|
|
|
|
+ SqlSugarClient sqlSugar,
|
|
SetDataTypeRepository setDataTypeRep,
|
|
SetDataTypeRepository setDataTypeRep,
|
|
- TeamRateRepository teamRateRep,
|
|
|
|
- ForeignReceivablesRepository ForForeignReceivablesRep,
|
|
|
|
|
|
+ TeamRateRepository teamRateRep,
|
|
|
|
+ ForeignReceivablesRepository ForForeignReceivablesRep,
|
|
ProceedsReceivedRepository proceedsReceivedRep,
|
|
ProceedsReceivedRepository proceedsReceivedRep,
|
|
- PaymentRefundAndOtherMoneyRepository paymentRefundAndOtherMoneyRep,
|
|
|
|
- HttpClient httpClient,
|
|
|
|
- DelegationInfoRepository delegationInfoRep,
|
|
|
|
|
|
+ PaymentRefundAndOtherMoneyRepository paymentRefundAndOtherMoneyRep,
|
|
|
|
+ HttpClient httpClient,
|
|
|
|
+ DelegationInfoRepository delegationInfoRep,
|
|
SetDataRepository setDataRep,
|
|
SetDataRepository setDataRep,
|
|
ForeignReceivablesRepository foreignReceivablesRepository)
|
|
ForeignReceivablesRepository foreignReceivablesRepository)
|
|
{
|
|
{
|
|
@@ -102,7 +102,7 @@ namespace OASystem.API.Controllers
|
|
var currUserInfo = JwtHelper.SerializeJwt(HttpContext.Request.Headers.Authorization);
|
|
var currUserInfo = JwtHelper.SerializeJwt(HttpContext.Request.Headers.Authorization);
|
|
if (currUserInfo == null) return Ok(JsonView(false, "请传入token!"));
|
|
if (currUserInfo == null) return Ok(JsonView(false, "请传入token!"));
|
|
|
|
|
|
- var result = await _daiRep.GetPagePriceTypeData(dto,currUserInfo.UserId);
|
|
|
|
|
|
+ var result = await _daiRep.GetPagePriceTypeData(dto, currUserInfo.UserId);
|
|
|
|
|
|
if (result == null || result.Code != 0)
|
|
if (result == null || result.Code != 0)
|
|
{
|
|
{
|
|
@@ -911,7 +911,7 @@ namespace OASystem.API.Controllers
|
|
));
|
|
));
|
|
}
|
|
}
|
|
|
|
|
|
- private class EnterExitCostCurrency
|
|
|
|
|
|
+ private class EnterExitCostCurrency
|
|
{
|
|
{
|
|
public string Name { get; set; }
|
|
public string Name { get; set; }
|
|
public string Code { get; set; }
|
|
public string Code { get; set; }
|
|
@@ -1049,7 +1049,7 @@ namespace OASystem.API.Controllers
|
|
var _EnterExitCostCurrencys = new List<EnterExitCostCurrency>();
|
|
var _EnterExitCostCurrencys = new List<EnterExitCostCurrency>();
|
|
|
|
|
|
if (!string.IsNullOrEmpty(_EnterExitCosts.CurrencyRemark))
|
|
if (!string.IsNullOrEmpty(_EnterExitCosts.CurrencyRemark))
|
|
- {
|
|
|
|
|
|
+ {
|
|
var currency1 = _EnterExitCosts.CurrencyRemark.Split("|");
|
|
var currency1 = _EnterExitCosts.CurrencyRemark.Split("|");
|
|
foreach (var item in currency1)
|
|
foreach (var item in currency1)
|
|
{
|
|
{
|
|
@@ -1434,7 +1434,7 @@ namespace OASystem.API.Controllers
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//MemoryStream outSteam = new MemoryStream();
|
|
//MemoryStream outSteam = new MemoryStream();
|
|
- string filsPath = AppSettingsHelper.Get("WordBasePath") + $"ForeignReceivables/File/{ClientItem.Key.Replace("\n", "")}_{_DelegationInfo.VisitCountry.Replace("|","、")}.docx";
|
|
|
|
|
|
+ string filsPath = AppSettingsHelper.Get("WordBasePath") + $"ForeignReceivables/File/{ClientItem.Key.Replace("\n", "")}_{_DelegationInfo.VisitCountry.Replace("|", "、")}.docx";
|
|
//去水印
|
|
//去水印
|
|
new Aspose.Words.License().SetLicense(new MemoryStream(Convert.FromBase64String(AsposeHelper.asposeKey)));
|
|
new Aspose.Words.License().SetLicense(new MemoryStream(Convert.FromBase64String(AsposeHelper.asposeKey)));
|
|
doc.Save(filsPath);
|
|
doc.Save(filsPath);
|
|
@@ -1473,30 +1473,30 @@ namespace OASystem.API.Controllers
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
|
- /// decimal保留指定位数小数
|
|
|
|
- /// </summary>
|
|
|
|
- /// <param name="num">原始数量</param>
|
|
|
|
- /// <param name="scale">保留小数位数</param>
|
|
|
|
- /// <returns>截取指定小数位数后的数量字符串</returns>
|
|
|
|
- private static string DecimalToString(decimal num, int scale)
|
|
|
|
- {
|
|
|
|
- string numToString = num.ToString();
|
|
|
|
-
|
|
|
|
- int index = numToString.IndexOf(".");
|
|
|
|
- int length = numToString.Length;
|
|
|
|
-
|
|
|
|
- if (index != -1)
|
|
|
|
- {
|
|
|
|
- return string.Format("{0}.{1}",
|
|
|
|
- numToString.Substring(0, index),
|
|
|
|
- numToString.Substring(index + 1, Math.Min(length - index - 1, scale)));
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- return num.ToString();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// decimal保留指定位数小数
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="num">原始数量</param>
|
|
|
|
+ /// <param name="scale">保留小数位数</param>
|
|
|
|
+ /// <returns>截取指定小数位数后的数量字符串</returns>
|
|
|
|
+ private static string DecimalToString(decimal num, int scale)
|
|
|
|
+ {
|
|
|
|
+ string numToString = num.ToString();
|
|
|
|
+
|
|
|
|
+ int index = numToString.IndexOf(".");
|
|
|
|
+ int length = numToString.Length;
|
|
|
|
+
|
|
|
|
+ if (index != -1)
|
|
|
|
+ {
|
|
|
|
+ return string.Format("{0}.{1}",
|
|
|
|
+ numToString.Substring(0, index),
|
|
|
|
+ numToString.Substring(index + 1, Math.Min(length - index - 1, scale)));
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ return num.ToString();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 保留小数位数
|
|
/// 保留小数位数
|
|
@@ -1634,7 +1634,7 @@ namespace OASystem.API.Controllers
|
|
var Fin_ProceedsReceived_SumPrice = _sqlSugar
|
|
var Fin_ProceedsReceived_SumPrice = _sqlSugar
|
|
.Queryable<Fin_ProceedsReceived>()
|
|
.Queryable<Fin_ProceedsReceived>()
|
|
.Where(x => x.Diid == dto.DiId && x.IsDel == 0)
|
|
.Where(x => x.Diid == dto.DiId && x.IsDel == 0)
|
|
- .Sum(x=>x.Price);
|
|
|
|
|
|
+ .Sum(x => x.Price);
|
|
|
|
|
|
//收款账单金额 (应收)
|
|
//收款账单金额 (应收)
|
|
var Fin_ForeignReceivables_SumPrice = _sqlSugar
|
|
var Fin_ForeignReceivables_SumPrice = _sqlSugar
|
|
@@ -1744,7 +1744,8 @@ namespace OASystem.API.Controllers
|
|
//已收款项信息验证
|
|
//已收款项信息验证
|
|
var proceedInfos = await _sqlSugar.Queryable<Fin_ProceedsReceived>()
|
|
var proceedInfos = await _sqlSugar.Queryable<Fin_ProceedsReceived>()
|
|
.Where(x => x.Diid == dto.GroupId && x.IsDel == 0)
|
|
.Where(x => x.Diid == dto.GroupId && x.IsDel == 0)
|
|
- .Select(x => new GroupAccFeeExcelView() {
|
|
|
|
|
|
+ .Select(x => new GroupAccFeeExcelView()
|
|
|
|
+ {
|
|
OrgName = x.Client,
|
|
OrgName = x.Client,
|
|
VisitorNum = 1, //假设每条记录代表一个访客
|
|
VisitorNum = 1, //假设每条记录代表一个访客
|
|
ActualAR = 0.00M,
|
|
ActualAR = 0.00M,
|
|
@@ -1764,7 +1765,7 @@ namespace OASystem.API.Controllers
|
|
var hotelCostInfos = await _sqlSugar.Queryable<Grp_DayAndCost>()
|
|
var hotelCostInfos = await _sqlSugar.Queryable<Grp_DayAndCost>()
|
|
.LeftJoin<Sys_SetData>((x, y) => x.Currency == y.Id)
|
|
.LeftJoin<Sys_SetData>((x, y) => x.Currency == y.Id)
|
|
.Where((x, y) => x.DiId == dto.GroupId && x.Type == 1 && x.IsDel == 0)
|
|
.Where((x, y) => x.DiId == dto.GroupId && x.Type == 1 && x.IsDel == 0)
|
|
- .Select((x, y) => new { x.Place, x.Cost, x.Currency, y.Name,CurrencyName = y.Remark, Rate = x.SubTotal / x.Cost, x.SubTotal })
|
|
|
|
|
|
+ .Select((x, y) => new { x.Place, x.Cost, x.Currency, y.Name, CurrencyName = y.Remark, Rate = x.SubTotal / x.Cost, x.SubTotal })
|
|
.ToListAsync();
|
|
.ToListAsync();
|
|
|
|
|
|
decimal visaFee = costInfo?.Visa ?? 0.00M, //签证费
|
|
decimal visaFee = costInfo?.Visa ?? 0.00M, //签证费
|
|
@@ -1799,7 +1800,8 @@ namespace OASystem.API.Controllers
|
|
if (costInfosNew.Count > proceedInfos.Count) proceedInfos.AddRange(costInfosNew.Skip(proceedInfos.Count));
|
|
if (costInfosNew.Count > proceedInfos.Count) proceedInfos.AddRange(costInfosNew.Skip(proceedInfos.Count));
|
|
|
|
|
|
int index = 1;
|
|
int index = 1;
|
|
- proceedInfos.ForEach( x=> {
|
|
|
|
|
|
+ proceedInfos.ForEach(x =>
|
|
|
|
+ {
|
|
x.Index = index;
|
|
x.Index = index;
|
|
index++;
|
|
index++;
|
|
});
|
|
});
|
|
@@ -1829,7 +1831,7 @@ namespace OASystem.API.Controllers
|
|
designer.Workbook.Save(AppSettingsHelper.Get("ExcelBasePath") + fileName);
|
|
designer.Workbook.Save(AppSettingsHelper.Get("ExcelBasePath") + fileName);
|
|
url = AppSettingsHelper.Get("ExcelBaseUrl") + AppSettingsHelper.Get("ExcelFtpPath") + fileName;
|
|
url = AppSettingsHelper.Get("ExcelBaseUrl") + AppSettingsHelper.Get("ExcelFtpPath") + fileName;
|
|
#endregion
|
|
#endregion
|
|
- return Ok(JsonView(true,"操作成功!",url));
|
|
|
|
|
|
+ return Ok(JsonView(true, "操作成功!", url));
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
@@ -2078,10 +2080,11 @@ namespace OASystem.API.Controllers
|
|
var list_rst = await _sqlSugar.Queryable<Grp_DelegationInfo>()
|
|
var list_rst = await _sqlSugar.Queryable<Grp_DelegationInfo>()
|
|
.Where(x => x.IsDel == 0)
|
|
.Where(x => x.IsDel == 0)
|
|
.WhereIF(startTimeFlag && endTimeFlag, x => x.VisitDate >= begintime && x.VisitDate <= endtime)
|
|
.WhereIF(startTimeFlag && endTimeFlag, x => x.VisitDate >= begintime && x.VisitDate <= endtime)
|
|
- .WhereIF(!string.IsNullOrEmpty(groupName), x=> x.TeamName.Contains(groupName))
|
|
|
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(groupName), x => x.TeamName.Contains(groupName))
|
|
.WhereIF(marketStaffFlag, x => x.JietuanOperator == currUserId)
|
|
.WhereIF(marketStaffFlag, x => x.JietuanOperator == currUserId)
|
|
.OrderBy(x => x.VisitDate)
|
|
.OrderBy(x => x.VisitDate)
|
|
- .Select(x => new PostSyntheticalReceivableByDateRangeView() {
|
|
|
|
|
|
+ .Select(x => new PostSyntheticalReceivableByDateRangeView()
|
|
|
|
+ {
|
|
diid = x.Id,
|
|
diid = x.Id,
|
|
teamName = x.TeamName,
|
|
teamName = x.TeamName,
|
|
clientUnit = x.ClientUnit,
|
|
clientUnit = x.ClientUnit,
|
|
@@ -2226,7 +2229,7 @@ namespace OASystem.API.Controllers
|
|
#endregion
|
|
#endregion
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
result.total_fr = sumAll_fr.ToString("#0.00");
|
|
result.total_fr = sumAll_fr.ToString("#0.00");
|
|
result.total_pr = sumAll_pr.ToString("#0.00");
|
|
result.total_pr = sumAll_pr.ToString("#0.00");
|
|
result.total_balance = sumAll_balance.ToString("#0.00");
|
|
result.total_balance = sumAll_balance.ToString("#0.00");
|
|
@@ -2240,10 +2243,11 @@ namespace OASystem.API.Controllers
|
|
{
|
|
{
|
|
//----------------------------
|
|
//----------------------------
|
|
var list_Ex = new List<Excel_SyntheticalReceivableByDateRange>();
|
|
var list_Ex = new List<Excel_SyntheticalReceivableByDateRange>();
|
|
- var designer = new WorkbookDesigner() {
|
|
|
|
|
|
+ var designer = new WorkbookDesigner()
|
|
|
|
+ {
|
|
Workbook = new Workbook(AppSettingsHelper.Get("ExcelBasePath") + "Template/应收款项模板 - 副本.xls")
|
|
Workbook = new Workbook(AppSettingsHelper.Get("ExcelBasePath") + "Template/应收款项模板 - 副本.xls")
|
|
};
|
|
};
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
int excNo = 1;
|
|
int excNo = 1;
|
|
foreach (var item in list_rst)
|
|
foreach (var item in list_rst)
|
|
@@ -2561,7 +2565,7 @@ namespace OASystem.API.Controllers
|
|
if (success)
|
|
if (success)
|
|
{
|
|
{
|
|
SimplClientInfo tempInfo = arr.FirstOrDefault(s => s.Id == tempId);
|
|
SimplClientInfo tempInfo = arr.FirstOrDefault(s => s.Id == tempId);
|
|
-
|
|
|
|
|
|
+
|
|
if (tempInfo != null)
|
|
if (tempInfo != null)
|
|
{
|
|
{
|
|
EncryptionProcessor.DecryptProperties(tempInfo);
|
|
EncryptionProcessor.DecryptProperties(tempInfo);
|
|
@@ -3305,7 +3309,7 @@ namespace OASystem.API.Controllers
|
|
{
|
|
{
|
|
Id = it.Id,
|
|
Id = it.Id,
|
|
ConpamyName = it.CompanyName
|
|
ConpamyName = it.CompanyName
|
|
-
|
|
|
|
|
|
+
|
|
}).ToList();
|
|
}).ToList();
|
|
|
|
|
|
var conpanyIds = conpanyDatas.Select(x => x.Id).ToList();
|
|
var conpanyIds = conpanyDatas.Select(x => x.Id).ToList();
|
|
@@ -3592,7 +3596,7 @@ namespace OASystem.API.Controllers
|
|
DiId = dto.diId,
|
|
DiId = dto.diId,
|
|
});
|
|
});
|
|
|
|
|
|
- _daiRep.CommitTran();
|
|
|
|
|
|
+ _daiRep.CommitTran();
|
|
return Ok(JsonView(true, "操作成功"));
|
|
return Ok(JsonView(true, "操作成功"));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3921,7 +3925,7 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
var overspendAuditUser = AppSettingsHelper.Get<OverspendAuditUserView>("OverspendAuditUser");
|
|
var overspendAuditUser = AppSettingsHelper.Get<OverspendAuditUserView>("OverspendAuditUser");
|
|
|
|
|
|
- var result = new
|
|
|
|
|
|
+ var result = new
|
|
{
|
|
{
|
|
CurrPageIndex = dto.PageIndex,
|
|
CurrPageIndex = dto.PageIndex,
|
|
CurrPageSize = dto.PageSize,
|
|
CurrPageSize = dto.PageSize,
|
|
@@ -3929,7 +3933,7 @@ namespace OASystem.API.Controllers
|
|
DataList = dataList,
|
|
DataList = dataList,
|
|
overspendAuditUser = new
|
|
overspendAuditUser = new
|
|
{
|
|
{
|
|
- jinliExpand = overspendAuditUser.Find(x=>x.Job == "opJinLi").Users.Select(x=>x.Id),
|
|
|
|
|
|
+ jinliExpand = overspendAuditUser.Find(x => x.Job == "opJinLi").Users.Select(x => x.Id),
|
|
zhuguanExpand = overspendAuditUser.Find(x => x.Job == "opZhuGuan").Users.Select(x => x.Id),
|
|
zhuguanExpand = overspendAuditUser.Find(x => x.Job == "opZhuGuan").Users.Select(x => x.Id),
|
|
syzhuguanExpand = overspendAuditUser.Find(x => x.Job == "syZhuGuan").Users.Select(x => x.Id),
|
|
syzhuguanExpand = overspendAuditUser.Find(x => x.Job == "syZhuGuan").Users.Select(x => x.Id),
|
|
}
|
|
}
|
|
@@ -4312,7 +4316,8 @@ Group by PriceType ", dto.diId);
|
|
f.SYsupervisorConfirm,
|
|
f.SYsupervisorConfirm,
|
|
})
|
|
})
|
|
.ToList()
|
|
.ToList()
|
|
- .Where(x=> {
|
|
|
|
|
|
+ .Where(x =>
|
|
|
|
+ {
|
|
var count = 0;
|
|
var count = 0;
|
|
var stringArr = new string[] { "SYsupervisorConfirm", "SupervisorConfirm", "ManagerConfirm" };
|
|
var stringArr = new string[] { "SYsupervisorConfirm", "SupervisorConfirm", "ManagerConfirm" };
|
|
var max = 0;
|
|
var max = 0;
|
|
@@ -4343,7 +4348,7 @@ Group by PriceType ", dto.diId);
|
|
{
|
|
{
|
|
decimal cost = x.FoodCost;
|
|
decimal cost = x.FoodCost;
|
|
//decimal.TryParse(x.FoodCost, out decimal cost);
|
|
//decimal.TryParse(x.FoodCost, out decimal cost);
|
|
- cost /= 2;
|
|
|
|
|
|
+ cost /= 2;
|
|
|
|
|
|
decimal oldPrice = costPirce;
|
|
decimal oldPrice = costPirce;
|
|
costPirce *= x.Rate; //转换币种
|
|
costPirce *= x.Rate; //转换币种
|
|
@@ -4780,7 +4785,7 @@ Group by PriceType ", dto.diId);
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
public async Task<IActionResult> PostCreditCardBillInit()
|
|
public async Task<IActionResult> PostCreditCardBillInit()
|
|
{
|
|
{
|
|
- var data = await _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0 && x.STid == 15).Select(x => new { x.Id,x.Name}).ToListAsync();
|
|
|
|
|
|
+ var data = await _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0 && x.STid == 15).Select(x => new { x.Id, x.Name }).ToListAsync();
|
|
|
|
|
|
return Ok(JsonView(true, "操作成功!", data));
|
|
return Ok(JsonView(true, "操作成功!", data));
|
|
}
|
|
}
|
|
@@ -4795,7 +4800,7 @@ Group by PriceType ", dto.diId);
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HttpPost]
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
- public async Task<IActionResult> PostCreditCardBill(IFormFile file, int cardType, string beginDt, string endDt)
|
|
|
|
|
|
+ public async Task<IActionResult> PostCreditCardBill(IFormFile file, int cardType, string beginDt, string endDt)
|
|
{
|
|
{
|
|
if (file == null || file.Length < 1)
|
|
if (file == null || file.Length < 1)
|
|
{
|
|
{
|
|
@@ -4818,7 +4823,7 @@ Group by PriceType ", dto.diId);
|
|
|
|
|
|
//读取ExcelFile
|
|
//读取ExcelFile
|
|
DataTable dt = ExcelFileToDataTable(file);
|
|
DataTable dt = ExcelFileToDataTable(file);
|
|
-
|
|
|
|
|
|
+
|
|
if (dt == null)
|
|
if (dt == null)
|
|
{
|
|
{
|
|
return Ok(JsonView(false, $"您上传的Excel工作表没有内容,请检查!!!"));
|
|
return Ok(JsonView(false, $"您上传的Excel工作表没有内容,请检查!!!"));
|
|
@@ -5083,7 +5088,7 @@ Group by PriceType ", dto.diId);
|
|
|
|
|
|
string fileName1 = $"信用卡账单(欧元卡){DateTime.Now:yyyy.MM.dd}.xls";
|
|
string fileName1 = $"信用卡账单(欧元卡){DateTime.Now:yyyy.MM.dd}.xls";
|
|
var pairs = new Dictionary<string, object>();
|
|
var pairs = new Dictionary<string, object>();
|
|
- var datas = new List<DataTable>
|
|
|
|
|
|
+ var datas = new List<DataTable>
|
|
{
|
|
{
|
|
dt
|
|
dt
|
|
};
|
|
};
|
|
@@ -5149,7 +5154,7 @@ Group by PriceType ", dto.diId);
|
|
ConsumptionDate = item.FirstOrDefault()?.ConsumptionDate ?? ""
|
|
ConsumptionDate = item.FirstOrDefault()?.ConsumptionDate ?? ""
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
List_ccp.Add(hotelInfo);
|
|
List_ccp.Add(hotelInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -5351,7 +5356,7 @@ Group by PriceType ", dto.diId);
|
|
|
|
|
|
string fileName1 = $"信用卡账单(中信卡){DateTime.Now:yyyy.MM.dd}.xls";
|
|
string fileName1 = $"信用卡账单(中信卡){DateTime.Now:yyyy.MM.dd}.xls";
|
|
var pairs = new Dictionary<string, object>();
|
|
var pairs = new Dictionary<string, object>();
|
|
- var datas = new List<DataTable>
|
|
|
|
|
|
+ var datas = new List<DataTable>
|
|
{
|
|
{
|
|
dt
|
|
dt
|
|
};
|
|
};
|
|
@@ -5452,7 +5457,7 @@ Group by PriceType ", dto.diId);
|
|
/// <param name="pathName">带路径的Excel文件名</param>
|
|
/// <param name="pathName">带路径的Excel文件名</param>
|
|
/// <param name="sheetName">工作表名</param>
|
|
/// <param name="sheetName">工作表名</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public static DataTable ExcelToDataTable(string pathName, string sheetName="")
|
|
|
|
|
|
+ public static DataTable ExcelToDataTable(string pathName, string sheetName = "")
|
|
{
|
|
{
|
|
var tbContainer = new DataTable();
|
|
var tbContainer = new DataTable();
|
|
string strConn = string.Empty;
|
|
string strConn = string.Empty;
|
|
@@ -5545,7 +5550,7 @@ Group by PriceType ", dto.diId);
|
|
JoinType.Left, a.Id == x.DIId,
|
|
JoinType.Left, a.Id == x.DIId,
|
|
JoinType.Left, b.CTable == 85 && b.CId == x.Id)
|
|
JoinType.Left, b.CTable == 85 && b.CId == x.Id)
|
|
)
|
|
)
|
|
- .Where((x, a, b) => x.IsDel == 0 && x.CreateUserId == userId && a.IsDel == 0 && a.VisitDate >= StartDateTime
|
|
|
|
|
|
+ .Where((x, a, b) => x.IsDel == 0 && x.CreateUserId == userId && a.IsDel == 0 && a.VisitDate >= StartDateTime
|
|
&& a.VisitDate <= EndDateTime && b.IsDel == 0 && auditState.Contains(b.IsAuditGM)) // 取消团组确认状态 && a.IsSure == 1
|
|
&& a.VisitDate <= EndDateTime && b.IsDel == 0 && auditState.Contains(b.IsAuditGM)) // 取消团组确认状态 && a.IsSure == 1
|
|
.Select((x, a, b) => new
|
|
.Select((x, a, b) => new
|
|
{
|
|
{
|
|
@@ -5683,23 +5688,23 @@ Group by PriceType ", dto.diId);
|
|
JoinType.Left, x.DiId == a.Id,
|
|
JoinType.Left, x.DiId == a.Id,
|
|
JoinType.Left, b.CTable == 76 && b.CId == x.Id))
|
|
JoinType.Left, b.CTable == 76 && b.CId == x.Id))
|
|
.Where((x, a, b) => x.IsDel == 0 && x.CreateUserId == userId && a.VisitDate >= StartDateTime
|
|
.Where((x, a, b) => x.IsDel == 0 && x.CreateUserId == userId && a.VisitDate >= StartDateTime
|
|
- && a.VisitDate <= EndDateTime && a.IsDel == 0 && b.IsDel == 0 && x.CardPrice != 0 && auditState.Contains(b.IsAuditGM) && x.CheckType == 1001)
|
|
|
|
|
|
+ && a.VisitDate <= EndDateTime && a.IsDel == 0 && b.IsDel == 0 && x.CardPrice != 0 && auditState.Contains(b.IsAuditGM) && x.CheckType == 1001)
|
|
.Select((x, a, b) => new // && a.IsSure == 1
|
|
.Select((x, a, b) => new // && a.IsSure == 1
|
|
- {
|
|
|
|
- a.Id,
|
|
|
|
- a.TeamName,
|
|
|
|
- a.VisitDate,
|
|
|
|
- a.TeamLevSId,
|
|
|
|
- a.VisitPNumber,
|
|
|
|
- x.SingleRoomCount,
|
|
|
|
- x.SuiteRoomCount,
|
|
|
|
- x.DoubleRoomCount,
|
|
|
|
- x.OtherRoomCount,
|
|
|
|
- x.CheckInDate,
|
|
|
|
- x.CheckOutDate,
|
|
|
|
- x.HotelName,
|
|
|
|
- a.IsSure
|
|
|
|
- })
|
|
|
|
|
|
+ {
|
|
|
|
+ a.Id,
|
|
|
|
+ a.TeamName,
|
|
|
|
+ a.VisitDate,
|
|
|
|
+ a.TeamLevSId,
|
|
|
|
+ a.VisitPNumber,
|
|
|
|
+ x.SingleRoomCount,
|
|
|
|
+ x.SuiteRoomCount,
|
|
|
|
+ x.DoubleRoomCount,
|
|
|
|
+ x.OtherRoomCount,
|
|
|
|
+ x.CheckInDate,
|
|
|
|
+ x.CheckOutDate,
|
|
|
|
+ x.HotelName,
|
|
|
|
+ a.IsSure
|
|
|
|
+ })
|
|
.ToList();
|
|
.ToList();
|
|
|
|
|
|
var groupByid = listHotel.GroupBy(x => x.Id);
|
|
var groupByid = listHotel.GroupBy(x => x.Id);
|
|
@@ -5756,7 +5761,7 @@ Group by PriceType ", dto.diId);
|
|
else if (OP.Contains(userId))
|
|
else if (OP.Contains(userId))
|
|
{
|
|
{
|
|
var OPList = _sqlSugar.Queryable<Grp_DelegationInfo>()
|
|
var OPList = _sqlSugar.Queryable<Grp_DelegationInfo>()
|
|
- .Where((a) => a.IsDel == 0 && a.VisitDate >= StartDateTime && a.VisitDate <= EndDateTime )
|
|
|
|
|
|
+ .Where((a) => a.IsDel == 0 && a.VisitDate >= StartDateTime && a.VisitDate <= EndDateTime)
|
|
.ToList(); // && a.IsSure == 1
|
|
.ToList(); // && a.IsSure == 1
|
|
|
|
|
|
var LvArr = _sqlSugar.Queryable<Sys_SetData>().Where(x => x.STid == 70 && x.IsDel == 0).ToList();
|
|
var LvArr = _sqlSugar.Queryable<Sys_SetData>().Where(x => x.STid == 70 && x.IsDel == 0).ToList();
|
|
@@ -5867,7 +5872,7 @@ Group by PriceType ", dto.diId);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
- else if(item.Type == 2 || item.Type == 1084)
|
|
|
|
|
|
+ else if (item.Type == 2 || item.Type == 1084)
|
|
{
|
|
{
|
|
if (item.IsPay == 1) //付费公务
|
|
if (item.IsPay == 1) //付费公务
|
|
{
|
|
{
|
|
@@ -5882,7 +5887,7 @@ Group by PriceType ", dto.diId);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- temp = "本团人数" + groupinfo.VisitPNumber + ",该人员" + user.CnName + "共操作公务数" + group.Count() + $",付费公务提成金额为{payingOfficial}" + $",非付费公务提成金额为{notPayingOfficial},"+ user.CnName + "提成共" + money + "元"; ;
|
|
|
|
|
|
+ temp = "本团人数" + groupinfo.VisitPNumber + ",该人员" + user.CnName + "共操作公务数" + group.Count() + $",付费公务提成金额为{payingOfficial}" + $",非付费公务提成金额为{notPayingOfficial}," + user.CnName + "提成共" + money + "元"; ;
|
|
|
|
|
|
resultArr.Add(new ComputeRoyaltiesView
|
|
resultArr.Add(new ComputeRoyaltiesView
|
|
{
|
|
{
|
|
@@ -5906,7 +5911,7 @@ Group by PriceType ", dto.diId);
|
|
var whereExpression = Expressionable.Create<Grp_VisaInfo, Grp_DelegationInfo, Grp_CreditCardPayment>()
|
|
var whereExpression = Expressionable.Create<Grp_VisaInfo, Grp_DelegationInfo, Grp_CreditCardPayment>()
|
|
.And(
|
|
.And(
|
|
(x, a, b) => x.IsDel == 0 && x.CreateUserId == userId && (b.IsAuditGM == 1 || b.IsAuditGM == 3)
|
|
(x, a, b) => x.IsDel == 0 && x.CreateUserId == userId && (b.IsAuditGM == 1 || b.IsAuditGM == 3)
|
|
- && a.IsDel == 0 && a.VisitDate >= StartDateTime && a.VisitDate <= EndDateTime
|
|
|
|
|
|
+ && a.IsDel == 0 && a.VisitDate >= StartDateTime && a.VisitDate <= EndDateTime
|
|
&& b.IsDel == 0 && x.IsThird == 0 && x.PassengerType == 974
|
|
&& b.IsDel == 0 && x.IsThird == 0 && x.PassengerType == 974
|
|
&& auditState.Contains(b.IsAuditGM) // && a.IsSure == 1
|
|
&& auditState.Contains(b.IsAuditGM) // && a.IsSure == 1
|
|
);
|
|
);
|