1.禁用库位时钉钉消息通知、更新缓存中对应模组的启用/禁用状态

2.修复异常 模组管理中无法通过模组编码进行搜索
This commit is contained in:
hehaibing-1996
2024-05-28 08:42:56 +08:00
parent a73bb8e6b1
commit 5e179997c3
9 changed files with 48 additions and 14 deletions

View File

@ -39,6 +39,7 @@ namespace WCS.BLL.HardWare
public int LightId { get; set; }
public List<int> ModuleIds { get; set; }
public List<SmartShelfModule> Modules { get; set; }
public string ClientIp { get; set; }
/// <summary>
/// 货架当前模式

View File

@ -26,6 +26,7 @@ namespace WCS.BLL.HardWare
public List<string> ExceptionMessages { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public bool IsWarning { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public string WebSocketIpAddress { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public List<SmartShelfModule> Modules { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public bool ConfirmStocktakingSingle(int BoardId, int LightNumber)
{

View File

@ -1370,6 +1370,7 @@ namespace WCS.BLL.HardWare
MatSpec = inventoryDetail.MatSpec,
MatCustomer = inventoryDetail.MatCustomer,
MatSupplier = inventoryDetail.MatSupplier,
OrderNumber = orderMatDetails.OrderNumber,
Direction = DirectionEnum.,
};

View File

@ -88,7 +88,6 @@ namespace WCS.BLL.Manager
//货架是否还存在报警信息
shelfIsWarning = Warnings.Where(t => t.ShelfId == warning.ShelfId)
.Any();
//对应货架如果不存在报警信息了 指示灯回到对应的状态
if (!shelfIsWarning)
{

View File

@ -955,6 +955,7 @@ namespace WCS.BLL.Services.Service
MatSpec = inventoryDetail.MatSpec,
MatCustomer = inventoryDetail.MatCustomer,
MatSupplier = inventoryDetail.MatSupplier,
OrderNumber = stockTakingOrderMatDetail.StocktakingOrderNumber,
Direction = DirectionEnum.,
OperateUser = request.UserName

View File

@ -7,6 +7,7 @@ using System.Threading.Tasks;
using TouchSocket.Core;
using WCS.BLL.Config;
using WCS.BLL.DbModels;
using WCS.BLL.HardWare;
using WCS.BLL.Manager;
using WCS.BLL.Services.IService;
using WCS.DAL;
@ -359,6 +360,27 @@ namespace WCS.BLL.Services.Service
}
DbHelp.db.Updateable(moduleInfo).ExecuteCommand();
DbHelp.db.CommitTran();
#region /
try
{
var shelf = ShelfManager.Shelves.Where(t => t.ShelfId == moduleInfo.ShelfId)
.FirstOrDefault();
if (shelf != null)
{
var moduleInPc = shelf.Modules.Where(t => t.ModuleId == moduleInfo.Id)
.First();
if (moduleInPc != null)
moduleInPc.IsEnable = request.DisableOrEnable == DisableOrEnableEnum.Enable;
}
}
catch
{
}
#endregion
return new ResponseCommon()
{
Code = 200,
@ -441,6 +463,14 @@ namespace WCS.BLL.Services.Service
//禁用需要删除当前库存数据
if (request.DisableOrEnable == DisableOrEnableEnum.Disable)
{
//盟讯公司发送钉钉消息
if (LocalFile.Config.IsMx)
{
var DingDing = string.Empty;
MXBackgroundThread.SendDingDingMsg($"【智能货架】库位{storeInfo.StoreCode}被屏蔽", new List<string> { "104379", "103595" }, ref DingDing);
}
//库位
storeInfo.CurrentMatSn = "禁用";
//库存数据处理