1.增加盟讯公司业务逻辑相关适配 前后端增加配置参数“ISMX”进行控制
2.前端websocket取消心跳机制(原有心跳和断线重连当服务端网线断开后需要等tcp保活期到期后才能发现重连),自己实现心跳和重连 3.前端关闭后任占用后台线程问题修复
This commit is contained in:
@ -5,7 +5,9 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using TouchSocket.Core;
|
||||
using WCS.BLL.Config;
|
||||
using WCS.BLL.DbModels;
|
||||
using WCS.BLL.Manager;
|
||||
using WCS.BLL.Services.IService;
|
||||
using WCS.DAL;
|
||||
using WCS.DAL.Db;
|
||||
@ -107,7 +109,7 @@ namespace WCS.BLL.Services.Service
|
||||
shelfnfo.ClientIp = request.ShelfInfo.ClientIp;
|
||||
shelfnfo.GroupName = request.ShelfInfo.GroupName;
|
||||
shelfnfo.IsBind = request.ShelfInfo.IsBind;
|
||||
shelfnfo.BindShelfCode = request.ShelfInfo.BindShelfCode;
|
||||
shelfnfo.BigShelfCode = request.ShelfInfo.BigShelfCode;
|
||||
|
||||
var rowNum = await DbHelp.db.Updateable(shelfnfo).ExecuteCommandAsync();
|
||||
if (rowNum == 0)
|
||||
@ -154,7 +156,7 @@ namespace WCS.BLL.Services.Service
|
||||
ClientIp = request.ShelfInfo.ClientIp,
|
||||
GroupName = request.ShelfInfo.GroupName,
|
||||
IsBind = request.ShelfInfo.IsBind,
|
||||
BindShelfCode = request.ShelfInfo.BindShelfCode,
|
||||
BigShelfCode = request.ShelfInfo.BigShelfCode,
|
||||
};
|
||||
var rowNum = await DbHelp.db.Insertable(newShelfInfo).ExecuteCommandAsync();
|
||||
if (rowNum == 0)
|
||||
@ -243,29 +245,36 @@ namespace WCS.BLL.Services.Service
|
||||
/// <returns></returns>
|
||||
public async Task<ResponseCommon<object>> 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 =>
|
||||
var shelfInfos = DbHelp.db.Queryable<ShelfInfo>().ToList();
|
||||
foreach (var shelfInfo in shelfInfos)
|
||||
{
|
||||
for (int i = 1; i <= moduleInfo.LightCount; i++)
|
||||
var ModuleInfos = await DbHelp.db.Queryable<ModuleInfo>().Where(t => t.ShelfId == shelfInfo.Id).ToListAsync();
|
||||
ModuleInfos.ForEach(moduleInfo =>
|
||||
{
|
||||
var storeInfo = new StoreInfo()
|
||||
for (int i = 1; i <= moduleInfo.LightCount; i++)
|
||||
{
|
||||
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();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
var storeInfo = new StoreInfo()
|
||||
{
|
||||
StoreCode = moduleInfo.ModuleCode + "-" + i.ToString(),
|
||||
ShelfTypeId = 1,
|
||||
ModuleId = moduleInfo.Id,
|
||||
ModuleCode = moduleInfo.ModuleCode,
|
||||
ShelfId = shelfInfo.Id,
|
||||
ShelfCode = shelfInfo.ShelfCode,
|
||||
BoardId = moduleInfo.BoardId,
|
||||
LightNumber = i,
|
||||
Priority = 1,
|
||||
CurrentMatSn = string.Empty,
|
||||
BigShelfCode = moduleInfo.Bigshelfcode,
|
||||
R = moduleInfo.R,
|
||||
C = moduleInfo.C,
|
||||
Wei = i.ToString(),
|
||||
GroupName = moduleInfo.GroupName,
|
||||
};
|
||||
DbHelp.db.Insertable(storeInfo).ExecuteCommand();
|
||||
}
|
||||
});
|
||||
}
|
||||
return new ResponseCommon<object>() { Message = "111" };
|
||||
}
|
||||
|
||||
@ -333,11 +342,16 @@ namespace WCS.BLL.Services.Service
|
||||
try
|
||||
{
|
||||
DbHelp.db.BeginTran();
|
||||
//禁用需要删除当前库存数据
|
||||
//禁用
|
||||
if (request.DisableOrEnable == DisableOrEnableEnum.Disable)
|
||||
{
|
||||
moduleInfo.IsEnable = false;
|
||||
|
||||
//盟讯公司发送钉钉消息
|
||||
if (LocalFile.Config.IsMx)
|
||||
{
|
||||
var DingDing = string.Empty;
|
||||
MXBackgroundThread.SendDingDingMsg($"【智能货架】模组{moduleInfo.ModuleCode}被屏蔽", new List<string> { "104379", "103595" }, ref DingDing);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -444,6 +458,12 @@ namespace WCS.BLL.Services.Service
|
||||
StoreId = storeInfo.Id,
|
||||
StoreInfo = storeInfo,
|
||||
|
||||
R = storeInfo.R,
|
||||
C = storeInfo.C,
|
||||
Wei = storeInfo.Wei,
|
||||
BigShelfCode = storeInfo.BigShelfCode,
|
||||
GroupName = storeInfo.GroupName,
|
||||
|
||||
MatSN = inventory.MatSN,
|
||||
MatCode = inventory.MatCode,
|
||||
MatName = inventory.MatName,
|
||||
|
Reference in New Issue
Block a user