|
|
@@ -3789,7 +3789,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
return "划拨创客" + ToMakerCode + "不存在";
|
|
|
}
|
|
|
- var SnIds = "";
|
|
|
+ List<int> SnIds = new List<int>();
|
|
|
string[] PosSnList = PosSn.Replace("\r", "").Replace("\n", ",").Split(',');
|
|
|
string error = "";
|
|
|
foreach (string Sn in PosSnList)
|
|
|
@@ -3801,7 +3801,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- SnIds += posInfo.Id + ",";
|
|
|
+ SnIds.Add(posInfo.Id);
|
|
|
}
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(error))
|
|
|
@@ -3810,10 +3810,9 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- var posList = db.PosMachinesTwo.Where(m => SnIds.Contains("," + m.Id + ",")).ToList();
|
|
|
- foreach (var Sn in posList)
|
|
|
+ foreach (int SnId in SnIds)
|
|
|
{
|
|
|
- var posInfo = posList.FirstOrDefault(m => m.Id == Sn.Id) ?? new PosMachinesTwo();
|
|
|
+ var posInfo = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnId) ?? new PosMachinesTwo();
|
|
|
if (posInfo.UserId == 0 || posInfo.BuyUserId == posInfo.UserId)
|
|
|
{
|
|
|
posInfo.BuyUserId = tUserId.Id;
|