|
@@ -677,11 +677,24 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
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)
|
|
|
+ List<int> clientIds1 = new List<int>() { };
|
|
|
+ foreach (var clientIdStr in clientIds)
|
|
|
{
|
|
|
- itemClientName += $"{client.LastName + client.FirstName},";
|
|
|
+ if (clientIdStr.IsNumeric())
|
|
|
+ {
|
|
|
+ clientIds1.Add(int.Parse(clientIdStr));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (clientIds1.Count > 0)
|
|
|
+ {
|
|
|
+ var clients = _clientDatas.Where(it => clientIds1.Contains(it.Id)).ToList();
|
|
|
+ foreach (var client in clients)
|
|
|
+ {
|
|
|
+ itemClientName += $"{client.LastName + client.FirstName},";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ itemClientName = visaClients;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -841,18 +854,35 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
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)
|
|
|
+ List<int> output = new List<int>();
|
|
|
+ foreach (var clientId in clientIds)
|
|
|
+ {
|
|
|
+ if (clientId.IsNumeric())
|
|
|
+ {
|
|
|
+ output.Add(int.Parse(clientId));
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (output.Count > 0)
|
|
|
{
|
|
|
- itemClientName += $"{client.LastName + client.FirstName},";
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ itemClientName = insClients;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (itemClientName.Length > 0)
|
|
|
- {
|
|
|
- itemClientName = itemClientName.Substring(0, itemClientName.Length - 1);
|
|
|
- }
|
|
|
+
|
|
|
item.ClientName = itemClientName;
|
|
|
|
|
|
if (!string.IsNullOrEmpty(item.AuditGMDate))
|