单灯区域增加看板接口
This commit is contained in:
@ -88,10 +88,10 @@ namespace WCS.BLL.Services.Service
|
||||
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();
|
||||
////对应模组信息
|
||||
//var moduleIds = stores.Select(t => t.ModuleId).Distinct().ToList();
|
||||
//var modules = DbHelp.db.Queryable<ModuleInfo>().Where(t => moduleIds.Contains(t.Id))
|
||||
// .ToList();
|
||||
|
||||
//合并:同一个货架的库位合并
|
||||
var shelfModels = new List<SingleLightShelfModel>();
|
||||
@ -165,6 +165,11 @@ namespace WCS.BLL.Services.Service
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logs.Write($"【单灯单独控制】{client}以下指令发送中遇到异常{ex.Message}" + BitConverter.ToString(sendData));
|
||||
return new ResponseCommon<object>()
|
||||
{
|
||||
Code = 201,
|
||||
Message = $"【单灯单独控制】{client}指令发送中遇到异常{ex.Message}",
|
||||
};
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -179,6 +184,16 @@ namespace WCS.BLL.Services.Service
|
||||
}
|
||||
}
|
||||
|
||||
//更新数据库灯的状态
|
||||
stores.ForEach(t =>
|
||||
{
|
||||
t.LightMode = request.ColorMode;
|
||||
t.ColorMode = request.LightMode;
|
||||
});
|
||||
DbHelp.db.Updateable(stores)
|
||||
.UpdateColumns(t => new { t.LightMode, t.ColorMode })
|
||||
.ExecuteCommand();
|
||||
|
||||
//返回成功
|
||||
return new ResponseCommon<object>()
|
||||
{
|
||||
@ -276,6 +291,7 @@ namespace WCS.BLL.Services.Service
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logs.Write($"【熄灯】{client}以下指令发送中遇到异常{ex.Message}" + BitConverter.ToString(sendData));
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -290,6 +306,17 @@ namespace WCS.BLL.Services.Service
|
||||
}
|
||||
}
|
||||
|
||||
//更新灯状态为熄灭
|
||||
//var stores = DbHelp.db.Queryable<StoreInfo>().Where(t => t.Area == request.Area).ToList();
|
||||
stores.ForEach(t =>
|
||||
{
|
||||
t.ColorMode = 0;
|
||||
t.LightMode = 0;
|
||||
});
|
||||
DbHelp.db.Updateable(stores)
|
||||
.UpdateColumns(t => new { t.LightMode, t.ColorMode })
|
||||
.ExecuteCommand();
|
||||
|
||||
//返回成功
|
||||
return new ResponseCommon<object>()
|
||||
{
|
||||
|
Reference in New Issue
Block a user