复位无法清理状态!!!

This commit is contained in:
hehaibing-1996
2024-11-01 10:10:58 +08:00
parent 0386f95bc2
commit e197c32f52
2 changed files with 10 additions and 6 deletions

View File

@ -42,12 +42,13 @@ namespace WCS.BLL.Services.Service
Message = "操作失败:没有需要控制的库位",
};
}
//对应库位
//库位编码去重
var storeCodes = request.StoreList.Select(t => t.StoreCode)
.Distinct()
.ToList();
var stores = DbHelp.db.Queryable<StoreInfo>().Where(t => storeCodes.Contains(t.StoreCode))
.ToList();
var stores = DbHelp.db.Queryable<StoreInfo>()
.Where(t => storeCodes.Contains(t.StoreCode))
.ToList();
if (stores == null || stores.Count == 0)
{
return new ResponseCommon<object>
@ -61,10 +62,11 @@ namespace WCS.BLL.Services.Service
var shelfIds = stores.Select(t => t.ShelfId).Distinct().ToList();
var shelfs = DbHelp.db.Queryable<ShelfInfo>().Where(t => shelfIds.Contains(t.Id))
.ToList();
//对应模组信息
var moduleIds = stores.Select(t => t.ModuleId).Distinct().ToList();
var modules = DbHelp.db.Queryable<ModuleInfo>().Where(t => moduleIds.Contains(t.Id))
.ToList();
.ToList();
//加载请求参数中的库位灯 板子ID和货架ID
foreach (var store in request.StoreList)