|
@@ -566,7 +566,94 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+ int Index = 0;
|
|
|
+ foreach (var item in groupAirFeeViews)
|
|
|
+ {
|
|
|
+ if (item.AirId > 2924)
|
|
|
+ {
|
|
|
+ string itemClientName = "";
|
|
|
+ if (!string.IsNullOrEmpty(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); });
|
|
|
+
|
|
|
+ if (output.Contains(-1))
|
|
|
+ {
|
|
|
+ itemClientName += $@"行程单";
|
|
|
+ output = output.Where(val => val != -1).ToArray();
|
|
|
+ }
|
|
|
+
|
|
|
+ var clients = _clientDatas.Where(it => output.Contains(it.Id)).ToList();
|
|
|
+ decimal unitCost = 0.00M;
|
|
|
+ unitCost = (item.PayMoney / item.ClientNum).ConvertToDecimal1();
|
|
|
+
|
|
|
+ int clienIndex = 1;
|
|
|
+ foreach (var client in clients)
|
|
|
+ {
|
|
|
+ airClientPris.Add(new {
|
|
|
+ CnName = client.LastName+client.FirstName,
|
|
|
+ EnName = client.Pinyin,
|
|
|
+ Price = unitCost,
|
|
|
+ AirType = item.AirTypeName
|
|
|
+ });
|
|
|
+
|
|
|
+ string six = "";
|
|
|
+ if (client.Sex == 0) six = "Mr";
|
|
|
+ else if (client.Sex == 1) six = "Ms";
|
|
|
+
|
|
|
+ itemClientName += string.Format(@"{0}.{1} {2};", clienIndex, client.LastName + client.FirstName, six);
|
|
|
+ clienIndex++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ item.ClientName = itemClientName;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ string clientPinYinName = "";
|
|
|
+ decimal unitCost = 0.00M;
|
|
|
+ unitCost = (item.PayMoney / item.ClientNum).ConvertToDecimal1();
|
|
|
+
|
|
|
+ string[] clientNames = item.ClientName.Split('.');
|
|
|
+ for (int i = 0; i < item.ClientNum; i++)
|
|
|
+ {
|
|
|
+ string name = "";
|
|
|
+ if (clientNames.Length > 0)
|
|
|
+ {
|
|
|
+ int index = i + 1;
|
|
|
+ if (index < clientNames.Length)
|
|
|
+ {
|
|
|
+ name = clientNames[index].Replace("MR","").Replace("MS","");
|
|
|
+ if (name.Length > 0)
|
|
|
+ {
|
|
|
+ string nameLastStr = name[name.Length - 1].ToString();
|
|
|
+ if (nameLastStr.IsNumeric())
|
|
|
+ {
|
|
|
+ name = name.Substring(0, name.Length - 1).Trim();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ clientPinYinName += string.Format(@"{0}.{1}出票价为:{2} CNY;", Index+1, name, unitCost);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(item.AuditGMDate))
|
|
|
+ {
|
|
|
+ item.AuditGMDate = Convert.ToDateTime(item.AuditGMDate).ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
+ }
|
|
|
+ AirCNYTotalPrice += item.CNYPrice;
|
|
|
+ }
|
|
|
|
|
|
_geView.GroupAirFeeViews = groupAirFeeViews;
|
|
|
if (airClientPris.Count > 0)
|
|
@@ -625,46 +712,7 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
-
|
|
|
|
|
|
_geView.GroupAirFeeStr = $@"人民币总费用:{AirCNYTotalPrice.ToString("#0.00")} CNY\r\n{str}\r\n经济舱均价为:{JJCAveragePrice.ToString("#0.00")}CNY/人;公务舱均价为:{GWCAveragePrice.ToString("#0.00")}CNY/人;";
|
|
|
#endregion
|