提交代码

This commit is contained in:
hehaibing-1996
2024-04-29 08:39:09 +08:00
parent a1199028b3
commit 97888c6978
46 changed files with 2303 additions and 255 deletions

View File

@ -236,5 +236,43 @@ namespace WCS.BLL.Services.Service
return response;
}
}
Task<PageQueryResponse<ShelfInfo>> IStoreInfoService.GetShelves(GetShelvesRequest request)
{
throw new NotImplementedException();
}
Task<ResponseCommon<object>> IStoreInfoService.addOrUpdateShelfInfo(AddShelfInfoRequest<ShelfInfo> request)
{
throw new NotImplementedException();
}
async Task<ResponseCommon<object>> IStoreInfoService.GenerateStoreInfo()
{
var shelfInfo = await DbHelp.db.Queryable<ShelfInfo>().Where(t => t.ShelfCode == "C04-1").FirstAsync();
var ModuleInfos = await DbHelp.db.Queryable<ModuleInfo>().Where(t => t.ShelfId == shelfInfo.Id).ToListAsync();
ModuleInfos.ForEach(moduleInfo =>
{
for (int i = 1; i <= moduleInfo.LightCount; i++)
{
var storeInfo = new StoreInfo()
{
StoreCode = moduleInfo.ModuleCode + "-" + i.ToString(),
ModuleId = moduleInfo.Id,
ModuleCode = moduleInfo.ModuleCode,
ShelfId = shelfInfo.Id,
ShelfCode = shelfInfo.ShelfCode,
BoardId = moduleInfo.BoardId,
LightNumber = i,
Priority = 1,
CurrentMatSn = string.Empty,
};
DbHelp.db.Insertable(storeInfo).ExecuteCommand();
}
});
return new ResponseCommon<object>() { Message = "111"};
}
}
}