单灯交互修改为与液晶一致

This commit is contained in:
hehaibing-1996
2025-04-15 13:38:20 +08:00
parent c7513bf09f
commit aeb58bd0b1
3 changed files with 425 additions and 17 deletions

View File

@ -113,7 +113,9 @@ namespace WCS.WebApi.Controllers
.OrderBy(t => t.ShelfCode)
.ToList();
var storesToSave = new List<StoreInfo>();
foreach (var shelf in shelfInfo)
var modulesToSave = new List<ModuleInfo>();
foreach (var shelf in shelfInfo)
{
if (shelf.ShelfCode == "C07-4")
;
@ -126,6 +128,8 @@ namespace WCS.WebApi.Controllers
//奇数行 灯Id是最后一个灯
for (int i = shelf.Columncounts; i > 0; i--)
{
var storeInfo = new StoreInfo()
{
StoreCode = shelf.ShelfCode + "-" + i.ToString(),
@ -144,9 +148,27 @@ namespace WCS.WebApi.Controllers
LightMode = 0,
ColorMode = 0,
GroupName = shelf.GroupName,
Area = shelf.ShelfCode.Substring(0,1),
Area = shelf.ShelfCode.Substring(0, 1),
};
storesToSave.Add(storeInfo);
var moduleInfo = new ModuleInfo()
{
ModuleCode = shelf.ShelfCode + "-" + i.ToString(),
ShelfTypeId = shelf.ShelfTypeId,
ShelfId = shelf.Id,
ShelfCode = shelf.ShelfCode,
BoardId = storeInfo.BoardId,
LightCount = 1,
CleintIp = shelf.ClientIp,
GroupName = shelf.GroupName,
R = storeInfo.R,
C = storeInfo.C,
Bigshelfcode = "",
IsEnable = true,
CurrentMode = BLL.DbModels.Task.TaskModeEnum.,
};
modulesToSave.Add(moduleInfo);
}
shelf.LightId = ++id;
@ -184,12 +206,31 @@ namespace WCS.WebApi.Controllers
Area = shelf.ShelfCode.Substring(0, 1),
};
storesToSave.Add(storeInfo);
var moduleInfo = new ModuleInfo()
{
ModuleCode = shelf.ShelfCode + "-" + i.ToString(),
ShelfTypeId = shelf.ShelfTypeId,
ShelfId = shelf.Id,
ShelfCode = shelf.ShelfCode,
BoardId = storeInfo.BoardId,
LightCount = 1,
CleintIp = shelf.ClientIp,
GroupName = shelf.GroupName,
R = storeInfo.R,
C = storeInfo.C,
Bigshelfcode = "",
IsEnable = true,
CurrentMode = BLL.DbModels.Task.TaskModeEnum.,
};
modulesToSave.Add(moduleInfo);
}
}
}
DbHelp.db.Insertable(storesToSave).ExecuteCommand();
DbHelp.db.Insertable(modulesToSave).ExecuteCommand();
DbHelp.db.Updateable(shelfInfo).ExecuteCommand();
return new ResponseCommon()