Commit 9cde2969 by zxw

调整updatetime判断

parent 6170f098
...@@ -7403,16 +7403,17 @@ namespace JunmpPoliceStation.Controllers ...@@ -7403,16 +7403,17 @@ namespace JunmpPoliceStation.Controllers
} }
var newInvList = _unitOfWork.DbContext.ChangeTracker.Entries()
.Where(x => x.Entity is CommonJpEquipmentInventory) foreach (var inventory in InsertEpc)
.Select(x => x.Entity as CommonJpEquipmentInventory) {
.ToList(); //更新时间
foreach (var inventory in newInvList) inventory.UpdateTime = DateTime.Now;
}
foreach (var inventory in UpdateEpc)
{ {
//更新时间 //更新时间
inventory.UpdateTime = DateTime.Now; inventory.UpdateTime = DateTime.Now;
} }
bool errorResult = false; bool errorResult = false;
if (ErrorState.Count > 0) if (ErrorState.Count > 0)
......
...@@ -951,6 +951,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -951,6 +951,7 @@ namespace JunmpPoliceStation.Controllers
x.CabinetId = null; x.CabinetId = null;
x.PoliceCode = null; x.PoliceCode = null;
x.WarehouseCode = warehouseId; x.WarehouseCode = warehouseId;
x.UpdateTime=DateTime.Now;
_unitOfWork.EquipmentInventoryRepository.Update(x, false); _unitOfWork.EquipmentInventoryRepository.Update(x, false);
}); });
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论