提交代码
This commit is contained in:
@ -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"};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user