|
@@ -16,6 +16,7 @@ using System.Collections.Generic;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using Microsoft.VisualBasic;
|
|
using Microsoft.VisualBasic;
|
|
using OASystem.Domain.Entities.Groups;
|
|
using OASystem.Domain.Entities.Groups;
|
|
|
|
+using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
namespace OASystem.API.Controllers
|
|
namespace OASystem.API.Controllers
|
|
{
|
|
{
|
|
@@ -26,7 +27,7 @@ namespace OASystem.API.Controllers
|
|
[ApiController]
|
|
[ApiController]
|
|
public class StatisticsController : ControllerBase
|
|
public class StatisticsController : ControllerBase
|
|
{
|
|
{
|
|
-
|
|
|
|
|
|
+ private readonly int _decimalPlaces;
|
|
private readonly IMapper _mapper;
|
|
private readonly IMapper _mapper;
|
|
private readonly SqlSugarClient _sqlSugar;
|
|
private readonly SqlSugarClient _sqlSugar;
|
|
private readonly DelegationInfoRepository _groupRep;
|
|
private readonly DelegationInfoRepository _groupRep;
|
|
@@ -134,6 +135,7 @@ namespace OASystem.API.Controllers
|
|
/// <param name="_dto">团组列表请求dto</param>
|
|
/// <param name="_dto">团组列表请求dto</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpPost("PostGroupStatementDetails")]
|
|
[HttpPost("PostGroupStatementDetails")]
|
|
|
|
+ //[JsonConverter(typeof(DecimalConverter), 2)]
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
public async Task<IActionResult> PostGroupStatementDetails(GroupStatementDetailsDto _dto)
|
|
public async Task<IActionResult> PostGroupStatementDetails(GroupStatementDetailsDto _dto)
|
|
{
|
|
{
|
|
@@ -401,6 +403,9 @@ namespace OASystem.API.Controllers
|
|
{
|
|
{
|
|
HotelCNYTotalPrice += item.CNYPrice;
|
|
HotelCNYTotalPrice += item.CNYPrice;
|
|
|
|
|
|
|
|
+ item.PayMoney = item.PayMoney.ConvertToDecimal1();
|
|
|
|
+ item.CNYPrice = item.CNYPrice.ConvertToDecimal1();
|
|
|
|
+
|
|
string currencyRateStr = "";
|
|
string currencyRateStr = "";
|
|
List<string> currencys = new List<string>();
|
|
List<string> currencys = new List<string>();
|
|
if (!string.IsNullOrEmpty(item.BreakfastCurrency)) currencys.Add(item.BreakfastCurrency);
|
|
if (!string.IsNullOrEmpty(item.BreakfastCurrency)) currencys.Add(item.BreakfastCurrency);
|
|
@@ -414,7 +419,7 @@ namespace OASystem.API.Controllers
|
|
}
|
|
}
|
|
|
|
|
|
_geView.GroupHotelFeeViews = groupHotelFeeViews;
|
|
_geView.GroupHotelFeeViews = groupHotelFeeViews;
|
|
- _geView.GroupHotelFeeStr = string.Format(@"人名币总费用:{0} CNY", HotelCNYTotalPrice);
|
|
|
|
|
|
+ _geView.GroupHotelFeeStr = string.Format(@"人名币总费用:{0} CNY", HotelCNYTotalPrice.ToString("#0.00"));
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
@@ -592,6 +597,36 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
foreach (var item in groupVisaFeeViews)
|
|
foreach (var item in groupVisaFeeViews)
|
|
{
|
|
{
|
|
|
|
+ string itemClientName = "";
|
|
|
|
+ string visaClients = item.VisaClient;
|
|
|
|
+ if (!string.IsNullOrEmpty(visaClients))
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ string[] clientIds = new string[] { };
|
|
|
|
+ if (visaClients.Contains(','))
|
|
|
|
+ {
|
|
|
|
+ clientIds = visaClients.Split(',');
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ clientIds = new string[] { visaClients };
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (clientIds.Length > 0)
|
|
|
|
+ {
|
|
|
|
+ int[] output = Array.ConvertAll<string, int>(clientIds, delegate (string s) { return int.Parse(s); });
|
|
|
|
+ var clients = _clientDatas.Where(it => output.Contains(it.Id)).ToList();
|
|
|
|
+ foreach (var client in clients)
|
|
|
|
+ {
|
|
|
|
+ itemClientName += $"{client.LastName + client.FirstName},";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (itemClientName.Length > 0 )
|
|
|
|
+ {
|
|
|
|
+ itemClientName = itemClientName.Substring(0, itemClientName.Length - 1);
|
|
|
|
+ }
|
|
|
|
+ item.VisaClient = itemClientName;
|
|
VisaCNYTotalPirce += item.PayMoney;
|
|
VisaCNYTotalPirce += item.PayMoney;
|
|
if (!string.IsNullOrEmpty(item.AuditGMDate))
|
|
if (!string.IsNullOrEmpty(item.AuditGMDate))
|
|
{
|
|
{
|