|
|
@@ -4079,6 +4079,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
string[] OldSnList;
|
|
|
OldSnList = OldSn.Replace("\r", "").Split('\n');
|
|
|
string error = "";
|
|
|
+ List<string> opData = new List<string>();
|
|
|
for (int i = 0; i < OldSnList.Length; i++)
|
|
|
{
|
|
|
string OldSnNum = OldSnList[i];
|
|
|
@@ -4089,6 +4090,10 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
error += "以下操作失败" + OldSnNum + ',' + "该机具不在坏机仓或不存在" + '\n';
|
|
|
}
|
|
|
+ if(!opData.Contains(oldpos.BuyUserId + ":" + oldpos.BrandId))
|
|
|
+ {
|
|
|
+ opData.Add(oldpos.BuyUserId + ":" + oldpos.BrandId);
|
|
|
+ }
|
|
|
oldpos.Status = 1;
|
|
|
oldpos.QueryCount = 0;
|
|
|
oldpos.UpdateDate = null;
|
|
|
@@ -4136,6 +4141,11 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
return "Warning|" + error;
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
+ foreach(string sub in opData)
|
|
|
+ {
|
|
|
+ string[] datalist = sub.Split(":");
|
|
|
+ PublicFunction.SycnMachineCount(int.Parse(datalist[0]), int.Parse(datalist[1]));
|
|
|
+ }
|
|
|
return "success";
|
|
|
}
|
|
|
#endregion
|
|
|
@@ -4250,6 +4260,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
var endTime = time.AddDays(20 - time.Day).AddDays(-60);
|
|
|
StoreForCode storeForBack = new StoreForCode();
|
|
|
StoreHouse BackStore = new StoreHouse();
|
|
|
+ List<string> opData = new List<string>();
|
|
|
foreach (var item in PosSnList)
|
|
|
{
|
|
|
MachineForSnNo machineForSnNo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == item) ?? new MachineForSnNo();
|
|
|
@@ -4391,6 +4402,11 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
var userMachineDatas = db.UserMachineData.FirstOrDefault(m => m.IdBrand == fInfo) ?? new UserMachineData();
|
|
|
userMachineDatas.TotalMachineCount -= 1;
|
|
|
userMachineDatas.UnBindCount -= 1;
|
|
|
+
|
|
|
+ if(!opData.Contains(pos.BuyUserId + ":" + pos.BrandId))
|
|
|
+ {
|
|
|
+ opData.Add(pos.BuyUserId + ":" + pos.BrandId);
|
|
|
+ }
|
|
|
|
|
|
pos.StoreId = BackStore.Id;//变更机具所属仓库,重置为仓库机
|
|
|
pos.Status = 1;
|
|
|
@@ -4472,6 +4488,11 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
+ foreach(string sub in opData)
|
|
|
+ {
|
|
|
+ string[] datalist = sub.Split(":");
|
|
|
+ PublicFunction.SycnMachineCount(int.Parse(datalist[0]), int.Parse(datalist[1]));
|
|
|
+ }
|
|
|
return "success";
|
|
|
}
|
|
|
#endregion
|