|
@@ -13,6 +13,9 @@ using static OpenAI.GPT3.ObjectModels.SharedModels.IOpenAiModels;
|
|
|
using System;
|
|
|
using OASystem.Domain.Entities.Customer;
|
|
|
using System.Collections.Generic;
|
|
|
+using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
+using Microsoft.VisualBasic;
|
|
|
+using OASystem.Domain.Entities.Groups;
|
|
|
|
|
|
namespace OASystem.API.Controllers
|
|
|
{
|
|
@@ -146,6 +149,7 @@ namespace OASystem.API.Controllers
|
|
|
if (pageFunAuthView.CheckAuth == 0) return Ok(JsonView(false, "您没有查看权限"));
|
|
|
#endregion
|
|
|
|
|
|
+
|
|
|
#endregion
|
|
|
if (_dto.PortType == 1 || _dto.PortType == 2 || _dto.PortType == 3) // web/Android/IOS
|
|
|
{
|
|
@@ -209,6 +213,44 @@ namespace OASystem.API.Controllers
|
|
|
Where gec.IsDel = 0 And ccp.IsAuditGM = 1 And ccp.IsPay = 1 And gec.DiId = {0}",_dto.DiId);
|
|
|
|
|
|
List<Gsd_ExtraCostsView> _ExtraCostsViews = await _sqlSugar.SqlQueryable<Gsd_ExtraCostsView>(_ecSql).ToListAsync();
|
|
|
+
|
|
|
+ //模拟数据
|
|
|
+ if (_ExtraCostsViews.Count < 1)
|
|
|
+ {
|
|
|
+ _ExtraCostsViews.Add(new Gsd_ExtraCostsView()
|
|
|
+ {
|
|
|
+ GECId = 0,
|
|
|
+ GECDiId = 2334,
|
|
|
+ PriceName = "模拟数据-超支费用名称",
|
|
|
+ PayMoney = 1000.00M,
|
|
|
+ PaymentCurrency = "CNY",
|
|
|
+ DayRate = 1.0000M,
|
|
|
+ CNYPrice = 1000.00M,
|
|
|
+ Payee = "模拟数据-超支费用收款方",
|
|
|
+ OrbitalPrivateTransfer = 1,
|
|
|
+ PayWay = "刷卡",
|
|
|
+ CardType = "招行卡",
|
|
|
+ IsPay = 1,
|
|
|
+ Applicant = "刘华举"
|
|
|
+ });
|
|
|
+ _ExtraCostsViews.Add(new Gsd_ExtraCostsView()
|
|
|
+ {
|
|
|
+ GECId = 0,
|
|
|
+ GECDiId = 2334,
|
|
|
+ PriceName = "模拟数据-超支费用名称",
|
|
|
+ PayMoney = 1000.00M,
|
|
|
+ PaymentCurrency = "CNY",
|
|
|
+ DayRate = 1.0000M,
|
|
|
+ CNYPrice = 1000.00M,
|
|
|
+ Payee = "模拟数据-超支费用收款方",
|
|
|
+ OrbitalPrivateTransfer = 1,
|
|
|
+ PayWay = "刷卡",
|
|
|
+ CardType = "招行卡",
|
|
|
+ IsPay = 1,
|
|
|
+ Applicant = "刘华举"
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
exTotalAmount = _ExtraCostsViews.Sum(it => it.CNYPrice);
|
|
|
|
|
|
_giView.ExtraCostsViews = _ExtraCostsViews;
|
|
@@ -229,7 +271,7 @@ namespace OASystem.API.Controllers
|
|
|
And ccp.IsAuditGM = 1 And ccp.IsPay = 1
|
|
|
And prom.DiId = {0}", _dto.DiId);
|
|
|
var _promDatas = await _sqlSugar.SqlQueryable<Gsd_PaymentRefundAndOtherMoneyDataSource1View>(_ropSql).ToListAsync();
|
|
|
-
|
|
|
+
|
|
|
foreach (var ropItem in _promDatas)
|
|
|
{
|
|
|
string thisCueencyCode = "Unknown";
|
|
@@ -267,9 +309,9 @@ namespace OASystem.API.Controllers
|
|
|
ThisRate = ropItem.DayRate,
|
|
|
Payee = ropItem.Payee,
|
|
|
PayTime = ropItem.AuditGMDate,
|
|
|
- FeeType = orbitalPrivateTransferStr,
|
|
|
+ OrbitalPrivateTransfer = ropItem.OrbitalPrivateTransfer,
|
|
|
PayType = payStr,
|
|
|
- PayStatus = ropItem.IsPay == 0 ? "未付款" : "已付款",
|
|
|
+ IsPay = ropItem.IsPay,
|
|
|
Applicant = ropItem.Appliction
|
|
|
|
|
|
};
|
|
@@ -277,6 +319,44 @@ namespace OASystem.API.Controllers
|
|
|
_promView.Add(gsd_PaymentRefund);
|
|
|
}
|
|
|
|
|
|
+ //模拟数据
|
|
|
+ if (_promView.Count < 1)
|
|
|
+ {
|
|
|
+ _promView.Add(new Gsd_PaymentRefundAndOtherMoneyView() {
|
|
|
+ Id = 0,
|
|
|
+ DiId = 2334,
|
|
|
+ PriceName = "模拟数据-费用名称",
|
|
|
+ PayCurrencyCode ="CNY",
|
|
|
+ PayCurrencyName = "人名币",
|
|
|
+ Price = 1000.00M,
|
|
|
+ CNYPrice = 1000.00M,
|
|
|
+ ThisRate = 1.00M,
|
|
|
+ Payee="模拟数据-收款方",
|
|
|
+ PayTime = "2023-01-01 15:20:01",
|
|
|
+ OrbitalPrivateTransfer = 1,
|
|
|
+ PayType = "刷卡",
|
|
|
+ IsPay = 1,
|
|
|
+ Applicant = "刘华举"
|
|
|
+ });
|
|
|
+ _promView.Add(new Gsd_PaymentRefundAndOtherMoneyView()
|
|
|
+ {
|
|
|
+ Id = 0,
|
|
|
+ DiId = 2334,
|
|
|
+ PriceName = "模拟数据-费用名称",
|
|
|
+ PayCurrencyCode = "CNY",
|
|
|
+ PayCurrencyName = "人名币",
|
|
|
+ Price = 1000.00M,
|
|
|
+ CNYPrice = 1000.00M,
|
|
|
+ ThisRate = 1.00M,
|
|
|
+ Payee = "模拟数据-收款方",
|
|
|
+ PayTime = "2023-01-01 15:20:01",
|
|
|
+ OrbitalPrivateTransfer = 1,
|
|
|
+ PayType = "刷卡",
|
|
|
+ IsPay = 1,
|
|
|
+ Applicant = "刘华举"
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
promTotalAmount = _promView.Sum(it => it.CNYPrice);
|
|
|
_giView.PaymentRefundAndOtherMoneyViews = _promView;
|
|
|
_giView.PaymentRefundAndOtherMoneyStr = string.Format(@"人名币总费用:{0} CNY", promTotalAmount.ConvertToDecimal1().ToString("#0.00"));
|
|
@@ -415,37 +495,66 @@ namespace OASystem.API.Controllers
|
|
|
int Index = 0;
|
|
|
foreach (var item in groupAirFeeViews)
|
|
|
{
|
|
|
- string itemClientName = "";
|
|
|
- if (!string.IsNullOrEmpty(item.ClientName))
|
|
|
+
|
|
|
+ if (item.AirId > 2924)
|
|
|
{
|
|
|
- string[] clientIds = new string[] { };
|
|
|
- if (item.ClientName.Contains(','))
|
|
|
- {
|
|
|
- clientIds = item.ClientName.Split(',');
|
|
|
- }
|
|
|
- else
|
|
|
+ string itemClientName = "";
|
|
|
+ if (!string.IsNullOrEmpty(item.ClientName))
|
|
|
{
|
|
|
- clientIds = new string[] { item.ClientName };
|
|
|
+ string[] clientIds = new string[] { };
|
|
|
+ if (item.ClientName.Contains(','))
|
|
|
+ {
|
|
|
+ clientIds = item.ClientName.Split(',');
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ clientIds = new string[] { item.ClientName };
|
|
|
+ }
|
|
|
+ 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();
|
|
|
+ string clientPinYinName = "";
|
|
|
+ decimal unitCost = 0.00M;
|
|
|
+ unitCost = (item.PayMoney / item.ClientNum).ConvertToDecimal1();
|
|
|
+ foreach (var client in clients)
|
|
|
+ {
|
|
|
+ Index += 1;
|
|
|
+ int clienIndex = 1;
|
|
|
+ itemClientName += string.Format(@"{0}.{1} ;", clienIndex, client);
|
|
|
+ clientPinYinName += string.Format(@"{0}.{1}出票价为:{2} CNY;", Index, client.Pinyin, unitCost);
|
|
|
+ clienIndex++;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- if (clientIds.Length > 0)
|
|
|
- {
|
|
|
+ item.ClientName = itemClientName;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ string clientPinYinName = "";
|
|
|
+ decimal unitCost = 0.00M;
|
|
|
+ unitCost = (item.PayMoney / item.ClientNum).ConvertToDecimal1();
|
|
|
|
|
|
- int[] output = Array.ConvertAll<string, int>(clientIds, delegate (string s) { return int.Parse(s); });
|
|
|
- var clients = _clientDatas.Where(it => output.Contains(it.Id)).ToList();
|
|
|
- string clientPinYinName = "";
|
|
|
- decimal unitCost = 0.00M;
|
|
|
- unitCost = (item.PayMoney / item.ClientNum).ConvertToDecimal1();
|
|
|
- foreach (var client in clients)
|
|
|
+ string[] clientNames = item.ClientName.Split('.');
|
|
|
+ for (int i = 0; i < item.ClientNum; i++)
|
|
|
+ {
|
|
|
+ string name = "";
|
|
|
+ if (clientNames.Length > 0)
|
|
|
{
|
|
|
- Index += 1;
|
|
|
- int clienIndex = 1;
|
|
|
- itemClientName += string.Format(@"{0}.{1} ;", clienIndex, client);
|
|
|
- clientPinYinName += string.Format(@"{0}.{1}出票价为:{2} CNY;", Index,client.Pinyin, unitCost);
|
|
|
- clienIndex++;
|
|
|
+ int index = i + 1;
|
|
|
+ if (index < clientNames.Length)
|
|
|
+ {
|
|
|
+ name = clientNames[index].Replace("MR","").Replace("MS","");
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ clientPinYinName += string.Format(@"{0}.{1}出票价为:{2} CNY;", Index, name, unitCost);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
- item.ClientName = itemClientName;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
if (!string.IsNullOrEmpty(item.AuditGMDate))
|
|
|
{
|
|
@@ -515,6 +624,61 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
groupInvitationalFeeViews = await _sqlSugar.SqlQueryable<GroupInvitationalFeeView>(groupInvitationalFeeSql).ToListAsync();
|
|
|
|
|
|
+ //模拟数据
|
|
|
+ if (groupInvitationalFeeViews.Count < 1)
|
|
|
+ {
|
|
|
+ groupInvitationalFeeViews.Add(new GroupInvitationalFeeView()
|
|
|
+ {
|
|
|
+ IOAId = 0,
|
|
|
+ IOADiId = 2334,
|
|
|
+ InviterArea = "模拟数据-邀请方地区",
|
|
|
+ Inviter = "模拟数据-邀请方",
|
|
|
+ InviteTime = "2023-10-10",
|
|
|
+ InviteCost = 100.00M,
|
|
|
+ InviteCurrency = "EUR",
|
|
|
+ SendCost = 100.00M,
|
|
|
+ SendCurrency = "EUR",
|
|
|
+ EventsCost = 10000.00M,
|
|
|
+ EventsCurrency = "EUR",
|
|
|
+ TranslateCost = 300.00M,
|
|
|
+ TranslateCurrency = "EUR",
|
|
|
+ PayMoney = 10500.00M,
|
|
|
+ PaymentCurrency = "EUR",
|
|
|
+ CNYPrice = 76765.50M,
|
|
|
+ Payee = "模拟数据-收款方",
|
|
|
+ AuditGMDate = "2023-12-05",
|
|
|
+ OrbitalPrivateTransfer = 1,
|
|
|
+ PayWay = "刷卡",
|
|
|
+ IsPay = 1,
|
|
|
+ Applicant = "刘华举"
|
|
|
+ });
|
|
|
+ groupInvitationalFeeViews.Add(new GroupInvitationalFeeView()
|
|
|
+ {
|
|
|
+ IOAId = 0,
|
|
|
+ IOADiId = 2334,
|
|
|
+ InviterArea = "模拟数据-邀请方地区",
|
|
|
+ Inviter = "模拟数据-邀请方",
|
|
|
+ InviteTime = "2023-10-10",
|
|
|
+ InviteCost = 100.00M,
|
|
|
+ InviteCurrency = "EUR",
|
|
|
+ SendCost = 100.00M,
|
|
|
+ SendCurrency = "EUR",
|
|
|
+ EventsCost = 10000.00M,
|
|
|
+ EventsCurrency = "EUR",
|
|
|
+ TranslateCost = 300.00M,
|
|
|
+ TranslateCurrency = "EUR",
|
|
|
+ PayMoney = 10500.00M,
|
|
|
+ PaymentCurrency = "EUR",
|
|
|
+ CNYPrice = 76765.50M,
|
|
|
+ Payee = "模拟数据-收款方",
|
|
|
+ AuditGMDate = "2023-12-05",
|
|
|
+ OrbitalPrivateTransfer = 1,
|
|
|
+ PayWay = "刷卡",
|
|
|
+ IsPay = 1,
|
|
|
+ Applicant = "刘华举"
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
decimal InvitationalCNYTotalPrice = 0.00M;
|
|
|
|
|
|
foreach (var item in groupInvitationalFeeViews)
|