提交代码

This commit is contained in:
hehaibing-1996
2024-07-22 17:33:52 +08:00
parent 7b8a885669
commit 6933a10119
49 changed files with 847 additions and 403 deletions

View File

@ -140,7 +140,7 @@ namespace WCS.BLL.DbModels
/// 货架的组别、区域(区分单个软件管哪些货架的,前端的配置文件配置一个组别,查询时只显示当前组别的货架)
/// </summary>
[SugarColumn(ColumnName = "group_name", Length = 50, IsNullable = false, DefaultValue = "0", ColumnDescription = "货架的组别、区域(区分单个软件管哪些货架的,前端的配置文件配置一个组别,查询时只显示当前组别的货架)")]
public string GroupName { get; set; }
public string GroupName { get; set; } = string.Empty;
/// <summary>
/// 序号

View File

@ -56,6 +56,12 @@ namespace WCS.BLL.DbModels
[SugarColumn(ColumnName = "update_time", IsNullable = false, ColumnDescription = "更新时间")]
public DateTime UpdateTime { get; set; } = DateTime.Now;
/// <summary>
/// 货架的组别、区域(区分单个软件管哪些货架的,前端的配置文件配置一个组别,查询时只显示当前组别的货架)
/// </summary>
[SugarColumn(ColumnName = "group_name", Length = 50, IsNullable = true, DefaultValue = "0", ColumnDescription = "货架的组别、区域(区分单个软件管哪些货架的,前端的配置文件配置一个组别,查询时只显示当前组别的货架)")]
public string GroupName { get; set; } = string.Empty;
/// <summary>
/// 序号
/// </summary>

View File

@ -23,7 +23,6 @@ namespace WCS.BLL.HardWare
ShelfCode = shelfInfo.ShelfCode;
RowCounts = shelfInfo.Rowcounts;
ColumnCounts = shelfInfo.Columncounts;
//CurrentMode = shelfInfo.CurrentMode;
SetCurrentMode(Mode.);
ClientIp = shelfInfo.ClientIp;
LightId = shelfInfo.LightId;
@ -326,6 +325,7 @@ namespace WCS.BLL.HardWare
{
try
{
Logs.Write("GoInOutstoreByWebSocket", LogsType.Outstore);
//找到对应的模组
var module = Modules.Where(t => t.ModuleId == moduleId).First();
if (module == null)
@ -341,16 +341,12 @@ namespace WCS.BLL.HardWare
module.Reset(TcpCleint);
//判断此货架是否还有出库模式的模块
var isExistOuting = Modules.Where(t => t.CurrentMode == Mode.).Any();
if (isExistOuting)
#region 退
var isExsistOut = CurrentOutStoreMatSNs.Any();
//本次亮灯的物料已全部取出
if (!isExsistOut)
{
//还有继续出的就不管
}
//这里的处理逻辑应与出库出了最后一盘料相同
else
{
#region
Logs.Write($"GoInOutstoreByModule货架【{ShelfCode}】,丢失删除的料刚好为货架需要出库的最后一盘料", LogsType.Outstore);
Logs.Write($"货架【{ShelfCode}】,本次亮灯的物料已全部取出", LogsType.Outstore);
CurrentOutOrder = null;
//退出出库模式
@ -373,9 +369,10 @@ namespace WCS.BLL.HardWare
.Any();
if (!isLastShelf)
{
Logs.Write($"GoInOutstoreByModule发料单{OrderNumber},最后一个出库货架,触发精准发料机制!查询是否还存在待出库物料", LogsType.Outstore);
Logs.Write($"发料单{OrderNumber},最后一个出库货架,触发精准发料机制!查询是否还存在待出库物料", LogsType.Outstore);
var outOrder = DbHelp.db.Queryable<OutOrder>()
.Where(t => t.OrderNumber == OrderNumber)
.WhereIF(!string.IsNullOrEmpty(LocalFile.Config.GroupName), t => t.GroupName == LocalFile.Config.GroupName)
.First();
if (outOrder != null)
{
@ -391,7 +388,7 @@ namespace WCS.BLL.HardWare
LocalStatic.CurrentOutStoreColor = LocalStatic.CurrentOutStoreColor == (byte)0x02 ? (byte)0x04 : (byte)0x02;
//存在待出库 然后之前又没亮灯的情况 => 继续分批次亮灯
Logs.Write($"GoInOutstoreByModule发料单{OrderNumber},还有物料未出!", LogsType.Outstore);
Logs.Write($"发料单{OrderNumber},还有物料未出!", LogsType.Outstore);
var outOrderDetailCount = outOrderMatDetails.GroupBy(t => t.MatCode)
.Select(o => new { count = o.Count(), bb = o })
.Where(o => o.count >= 2)
@ -403,13 +400,13 @@ namespace WCS.BLL.HardWare
var matCode = outOrderDetailCount.First().bb.Key;
outOrderMatDetails = outOrderMatDetails.Where(t => t.MatCode == matCode)
.ToList();
Logs.Write($"GoInOutstoreByModule发料单{OrderNumber},本次亮灯物料{matCode}", LogsType.Outstore);
Logs.Write($"发料单{OrderNumber},本次亮灯物料{matCode}", LogsType.Outstore);
}
//相同物料不存在盘数超过n的情况剩余物料全部亮灯
else
{
//剩余物料全出
Logs.Write($"GoInOutstoreByModule发料单{OrderNumber},剩余所有物料灯全亮(发送命令)!", LogsType.Outstore);
Logs.Write($"发料单{OrderNumber},剩余所有物料灯全亮(发送命令)!", LogsType.Outstore);
}
var shelfIds = outOrderMatDetails.Select(t => t.StoreInfo.ShelfId)
@ -430,7 +427,6 @@ namespace WCS.BLL.HardWare
shelfs.ForEach(shelf =>
{
var matDetails = outOrderMatDetails.Where(t => t.StoreInfo.ShelfCode == shelf.ShelfCode)
.Distinct()
.ToList();
shelf.GoInOutstore(matDetails, outOrder, OutOperateUser);
@ -439,17 +435,45 @@ namespace WCS.BLL.HardWare
}
else
{
Logs.Write($"GoInOutstoreByModule发料单{OrderNumber},当前物料已发完!", LogsType.Outstore);
#region
Logs.Write($"发料单{OrderNumber},当前物料已发完!", LogsType.Outstore);
//清空发料单缓存
var outingShelfs = ShelfManager.Shelves.Where(t => t.OrderNumber == OrderNumber).ToList();
outingShelfs.ForEach(t =>
{
t.OrderNumber = string.Empty;
});
Task.Run(() =>
{
//判断是否是当前订单最后一个出库货架
var isOuting = ShelfManager.Shelves.Where(t => t.CurrentMode == Mode. && t.OrderNumber == OrderNumber)
.Any();
//WebSocket通知前台以更新左侧出库单列表的状态
if (!isOuting)
{
#region WebSocket
var messageMode = new WebSocketMessageModel()
{
IsWarning = false,
ClientIp = WebSocketIpAddress,
WarningType = WarningTypeEnum.,
};
WarningManager.SendWarning(messageMode);
#endregion
}
});
#endregion
}
}
else
{
Logs.Write($"GoInOutstoreByModule发料单{OrderNumber}OutOrder为null肯定是有问题", LogsType.Outstore);
Logs.Write($"发料单{OrderNumber}OutOrder为null肯定是有问题", LogsType.Outstore);
}
}
else
{
Logs.Write($"GoInOutstoreByModule发料单{OrderNumber},非最后一个出库货架!", LogsType.Outstore);
Logs.Write($"发料单{OrderNumber},非最后一个出库货架!", LogsType.Outstore);
var otherShelfs = ShelfManager.Shelves
.Where(t => t.OrderNumber == OrderNumber)
.Where(t => t.CurrentMode == Mode.)
@ -462,7 +486,7 @@ namespace WCS.BLL.HardWare
if (shelf is SmartShelf)
{
var smartShelf = (SmartShelf)shelf;
Logs.Write($"GoInOutstoreByModule货架【{smartShelf.ShelfCode}】待取物料{string.Join(",", smartShelf.CurrentOutStoreMatSNs)}", LogsType.Outstore);
Logs.Write($"货架【{smartShelf.ShelfCode}】待取物料{string.Join(",", smartShelf.CurrentOutStoreMatSNs)}", LogsType.Outstore);
}
}
catch
@ -471,17 +495,50 @@ namespace WCS.BLL.HardWare
}
#endregion
}
});
#endregion
}
}
else
{
#region
Logs.Write($"发料单{OrderNumber},当前物料已发完!", LogsType.Outstore);
//清空发料单缓存
var outingShelfs = ShelfManager.Shelves.Where(t => t.OrderNumber == OrderNumber).ToList();
outingShelfs.ForEach(t =>
{
t.OrderNumber = string.Empty;
});
Task.Run(() =>
{
//判断是否是当前订单最后一个出库货架
var isOuting = ShelfManager.Shelves.Where(t => t.CurrentMode == Mode. && t.OrderNumber == OrderNumber)
.Any();
//WebSocket通知前台以更新左侧出库单列表的状态
if (!isOuting)
{
#region WebSocket
var messageMode = new WebSocketMessageModel()
{
IsWarning = false,
ClientIp = WebSocketIpAddress,
WarningType = WarningTypeEnum.,
};
WarningManager.SendWarning(messageMode);
#endregion
}
});
#endregion
}
});
}
#endregion
}
else
{
//继续亮灯
Logs.Write($"GoInOutstoreByModule货架【{ShelfCode}】,模组【{module.ModuleCode}】,存在需要继续出的物料,继续亮灯。", LogsType.Outstore);
module.GoInOutStoreMode(TcpCleint, module.CurrentOutSns);
Thread.Sleep(20);
WarningLight.GreenLight(TcpCleint);
Logs.Write("GoInOutstoreByWebSocket", LogsType.Outstore);
}
}
catch (Exception e)
@ -528,6 +585,7 @@ namespace WCS.BLL.HardWare
.Select(mat => mat.MatSN)
.ToList();
t.GoInOutStoreMode(TcpCleint, outMatSns);
Thread.Sleep(20);//出库每块板子之间增加15ms的间隔
});
//所有板子亮灯后 亮警示灯
WarningLight.GreenLight(TcpCleint);
@ -637,25 +695,25 @@ namespace WCS.BLL.HardWare
SetCurrentMode(Mode.);
Logs.Write($"货架【{ShelfCode}】,结束退出出库", LogsType.Outstore);
Task.Run(() =>
{
//判断是否是当前订单最后一个出库货架
var isOuting = ShelfManager.Shelves.Where(t => t.CurrentMode == Mode. && t.OrderNumber == OrderNumber)
.Any();
//WebSocket通知前台以更新左侧出库单列表的状态
if (!isOuting)
{
#region WebSocket
var messageMode = new WebSocketMessageModel()
{
IsWarning = false,
ClientIp = WebSocketIpAddress,
WarningType = WarningTypeEnum.,
};
WarningManager.SendWarning(messageMode);
#endregion
}
});
//Task.Run(() =>
//{
// //判断是否是当前订单最后一个出库货架
// var isOuting = ShelfManager.Shelves.Where(t => t.CurrentMode == Mode.出库模式 && t.OrderNumber == OrderNumber)
// .Any();
// //WebSocket通知前台以更新左侧出库单列表的状态
// if (!isOuting)
// {
// #region WebSocket
// var messageMode = new WebSocketMessageModel()
// {
// IsWarning = false,
// ClientIp = WebSocketIpAddress,
// WarningType = WarningTypeEnum.通知刷新出库单列表,
// };
// WarningManager.SendWarning(messageMode);
// #endregion
// }
//});
}
catch (Exception ex)
{
@ -773,17 +831,7 @@ namespace WCS.BLL.HardWare
//报警灯闪一下
WarningLight.SuccessLightGreenEnd(TcpCleint);
//通知前台刷新
Task.Run(() =>
{
var messageMode = new WebSocketMessageModel()
{
IsWarning = false,
ClientIp = WebSocketIpAddress,
WarningType = WarningTypeEnum.
};
WarningManager.SendWarning(messageMode);
});
return true;
}
@ -1133,48 +1181,6 @@ namespace WCS.BLL.HardWare
ExceptionMessages.Add($"{storeInfo.StoreCode}物料{storeInfo.CurrentMatSn}丢失,库存数据已删除,请重新扫码后入库");
#endregion
//#region 【后台】丢失的数据处理
//Task.Run(() =>
//{
// try
// {
// DbHelp.db.BeginTran();
// //库位表字段清空
// storeInfo.CurrentMatSn = string.Empty;
// DbHelp.db.Updateable(storeInfo).ExecuteCommand();
// //库存表记录删除、插入出入记录
// var inventoryDetail = DbHelp.db.Queryable<InventoryDetail>().Where(t => t.StoreId == storeInfo.Id).First();
// if (inventoryDetail != null)
// {
// var inOutRecord = new MatInventoryDetailService()
// {
// StoreCode = storeInfo.StoreCode,
// StoreId = storeInfo.Id,
// StoreInfo = storeInfo,
// MatSN = inventoryDetail.MatSN,
// MatCode = inventoryDetail.MatCode,
// MatName = inventoryDetail.MatName,
// MatBatch = inventoryDetail.MatBatch,
// MatQty = inventoryDetail.MatQty,
// MatSpec = inventoryDetail.MatSpec,
// MatCustomer = inventoryDetail.MatCustomer,
// MatSupplier = inventoryDetail.MatSupplier,
// Direction = DirectionEnum.丢失,
// };
// DbHelp.db.Insertable(inOutRecord).ExecuteCommand();
// DbHelp.db.Deleteable(inventoryDetail).ExecuteCommand();
// }
// DbHelp.db.CommitTran();
// }
// catch (Exception e)
// {
// DbHelp.db.RollbackTran();
// }
//});
//#endregion
#region WebSocket通知前台
var exceptionMessage = storeInfo.StoreCode + $"进入入库自检发现物料{storeInfo.CurrentMatSn}丢失,请确认是否删除?";
var warningModel = new WebSocketMessageModel()
@ -1728,11 +1734,11 @@ namespace WCS.BLL.HardWare
return;
}
#region
//当前库位的SN
var matSN = storeInfo.CurrentMatSn;
try
{
#region
DbHelp.db.BeginTran();
//库存明细表 删除
;
@ -1759,6 +1765,7 @@ namespace WCS.BLL.HardWare
MatSupplier = inventoryDetail.MatSupplier,
OrderNumber = orderMatDetails.OrderNumber,
OperateUser = OutOperateUser,
Direction = orderMatDetails.IsMXPD == false ? DirectionEnum. : DirectionEnum.,
};
//库位表 修改
@ -1793,7 +1800,7 @@ namespace WCS.BLL.HardWare
//确认本次出库
module.ComfirmOutstore(TcpCleint, data[TcpCleint.PreFixLength + 3]);
//更新时间 避免被自动退出
//更新时间 避免超时被自动退出
Task.Run(() =>
{
var shelves = ShelfManager.Shelves.Where(t => t.CurrentMode == Mode. && t.OrderNumber == OrderNumber).ToList();
@ -1803,14 +1810,13 @@ namespace WCS.BLL.HardWare
}
});
//当前柜子是否还存在未出库的
Logs.Write($"货架【{ShelfCode}】,用户取出物料{matSN}", LogsType.Outstore);
CurrentOutStoreMatSNs.RemoveAll(t => t == matSN);//删除本次已出的物料SN
Logs.Write($"货架【{ShelfCode}】,当前货架剩余物料{string.Join(",", CurrentOutStoreMatSNs)}", LogsType.Outstore);
#endregion
var isExsistOut = CurrentOutStoreMatSNs.Any();
#region
var tempOrder = CurrentOutOrder;
var isMXPD = orderMatDetails.IsMXPD == true;
//通知前台刷新
@ -1818,7 +1824,6 @@ namespace WCS.BLL.HardWare
{
//更新订单状态
UpdateOutOrderStatus(tempOrder);
var messageMode = new WebSocketMessageModel()
{
IsWarning = false,
@ -1827,7 +1832,10 @@ namespace WCS.BLL.HardWare
};
WarningManager.SendWarning(messageMode);
});
#endregion
#region 退
var isExsistOut = CurrentOutStoreMatSNs.Any();
//本次亮灯的物料已全部取出
if (!isExsistOut)
{
@ -1857,6 +1865,7 @@ namespace WCS.BLL.HardWare
Logs.Write($"发料单{OrderNumber},最后一个出库货架,触发精准发料机制!查询是否还存在待出库物料", LogsType.Outstore);
var outOrder = DbHelp.db.Queryable<OutOrder>()
.Where(t => t.OrderNumber == OrderNumber)
.WhereIF(!string.IsNullOrEmpty(LocalFile.Config.GroupName), t => t.GroupName == LocalFile.Config.GroupName)
.First();
if (outOrder != null)
{
@ -1911,7 +1920,6 @@ namespace WCS.BLL.HardWare
shelfs.ForEach(shelf =>
{
var matDetails = outOrderMatDetails.Where(t => t.StoreInfo.ShelfCode == shelf.ShelfCode)
.Distinct()
.ToList();
shelf.GoInOutstore(matDetails, outOrder, OutOperateUser);
@ -1921,6 +1929,32 @@ namespace WCS.BLL.HardWare
else
{
Logs.Write($"发料单{OrderNumber},当前物料已发完!", LogsType.Outstore);
//清空发料单缓存
var outingShelfs = ShelfManager.Shelves.Where(t => t.OrderNumber == OrderNumber).ToList();
outingShelfs.ForEach(t =>
{
t.OrderNumber = string.Empty;
});
Task.Run(() =>
{
//判断是否是当前订单最后一个出库货架
var isOuting = ShelfManager.Shelves.Where(t => t.CurrentMode == Mode. && t.OrderNumber == OrderNumber)
.Any();
//WebSocket通知前台以更新左侧出库单列表的状态
if (!isOuting)
{
#region WebSocket
var messageMode = new WebSocketMessageModel()
{
IsWarning = false,
ClientIp = WebSocketIpAddress,
WarningType = WarningTypeEnum.,
};
WarningManager.SendWarning(messageMode);
#endregion
}
});
}
}
else
@ -1952,9 +1986,38 @@ namespace WCS.BLL.HardWare
}
#endregion
}
else
{
//清空发料单缓存
var outingShelfs = ShelfManager.Shelves.Where(t => t.OrderNumber == OrderNumber).ToList();
outingShelfs.ForEach(t =>
{
t.OrderNumber = string.Empty;
});
Task.Run(() =>
{
//判断是否是当前订单最后一个出库货架
var isOuting = ShelfManager.Shelves.Where(t => t.CurrentMode == Mode. && t.OrderNumber == OrderNumber)
.Any();
//WebSocket通知前台以更新左侧出库单列表的状态
if (!isOuting)
{
#region WebSocket
var messageMode = new WebSocketMessageModel()
{
IsWarning = false,
ClientIp = WebSocketIpAddress,
WarningType = WarningTypeEnum.,
};
WarningManager.SendWarning(messageMode);
#endregion
}
});
}
});
}
#endregion
}
catch (Exception ex)
@ -1963,7 +2026,6 @@ namespace WCS.BLL.HardWare
//报警灯报警
WarningLight.WaringLightAlwaysRed(TcpCleint);
}
#endregion
}
public void UpdateOutOrderStatus(OutOrder order)
@ -2047,7 +2109,7 @@ namespace WCS.BLL.HardWare
.First();
if (storeInfo == null)
{
//TO DO 库位未找到
Logs.Write($"[OutstoreExceptionReturnProcess]boardId{boardId};lightNumber{lightNumber}库位未找到!", LogsType.Outstore);
return;
}
//已放物料丢失了 物料多放了 储位恢复正常
@ -2077,6 +2139,7 @@ namespace WCS.BLL.HardWare
//自动消除本地缓存的报警
warnings.ForEach(warning =>
{
Logs.Write($"ClearWarning,{warning.Guid}", LogsType.Outstore);
WarningManager.ClearWarning(warning, SolveTypeEnum.);
});
ProcessingExceptions.RemoveAll(t => t.BoardId == boardId);
@ -2090,8 +2153,6 @@ namespace WCS.BLL.HardWare
WarningType = WarningTypeEnum.,
StoreId = storeInfo.Id,
StoreCode = storeInfo.StoreCode,
//ModuleId = module.ModuleId,
//ModuleCode = module.ModuleCode,
ShelfCode = ShelfCode,
ShelfId = ShelfId,
WarningMessage = exceptionMessage,
@ -2305,7 +2366,6 @@ namespace WCS.BLL.HardWare
var storeInfo = storeInfos.Where(t => t.LightNumber == index + 1).First();
if (storeInfo != null)
{
#region WebSocket通知前台
var exceptionMessage = storeInfo.StoreCode + $"自检发现物料{storeInfo.CurrentMatSn}丢失,请确认是否删除?";
var warningModel = new WebSocketMessageModel()
@ -2323,58 +2383,10 @@ namespace WCS.BLL.HardWare
WarningManager.SendWarning(warningModel);
#endregion
//#region 【后台】丢失的数据处理
//Task.Run(() =>
//{
// try
// {
// DbHelp.db.BeginTran();
// //库位表字段清空
// storeInfo.CurrentMatSN = string.Empty;
// DbHelp.db.Updateable(storeInfo).ExecuteCommand();
// //库存表记录删除、插入出入记录
// var inventoryDetail = DbHelp.db.Queryable<InventoryDetail>().Where(t => t.StoreCode == storeInfo.StoreCode).First();
// if (inventoryDetail != null)
// {
// var inOutRecord = new InOutRecord()
// {
// StoreCode = storeInfo.StoreCode,
// StoreId = storeInfo.Id,
// StoreInfo = storeInfo,
// R = storeInfo.R,
// C = storeInfo.C,
// Wei = storeInfo.Wei,
// WarehouseCode = inventoryDetail.WarehouseCode,
// MatSN = inventoryDetail.MatSN,
// MatCode = inventoryDetail.MatCode,
// MatName = inventoryDetail.MatName,
// MatBatch = inventoryDetail.MatBatch,
// MatQty = inventoryDetail.MatQty,
// MatSpec = inventoryDetail.MatSpec,
// OrderNumber = inventoryDetail.OrderNumber,
// OrderProdNumber = inventoryDetail.OrderProdNumber,
// OrderMaterialCode = inventoryDetail.OrderMaterialCode,
// OrderMaterialName = inventoryDetail.OrderMaterialName,
// OrderMaterialSpec = inventoryDetail.OrderMaterialSpec,
// GroupName = LocalFile.Config.GroupName,
// Direction = DirectionEnum.丢失,
// };
// DbHelp.db.Insertable(inOutRecord).ExecuteCommand();
// DbHelp.db.Deleteable(inventoryDetail).ExecuteCommand();
// }
// DbHelp.db.CommitTran();
// }
// catch (Exception e)
// {
// DbHelp.db.RollbackTran();
// }
//});
//#endregion
IsWarning = true;
Logs.Write($"货架自检【{ShelfCode},库位{storeInfo.StoreCode}发现物料丢失,开始发送红灯】", LogsType.Instore);
WarningLight.WaringLightAlwaysRed(TcpCleint);
Logs.Write($"货架自检【{ShelfCode},库位{storeInfo.StoreCode}发现物料丢失,发送红灯完成】", LogsType.Instore);
}
//库位未配置、返回数据异常
else
@ -2403,11 +2415,11 @@ namespace WCS.BLL.HardWare
};
WarningManager.SendWarning(warningModel);
#endregion
//#region 【记录缓存异常信息】
//var shelfStatus = LocalStatic.ShelfStatuses.Where(t => t.ShelfCode == storeInfo.ShelfCode).First();
//LocalStatic.CheckErr.Add($"库位{storeInfo.StoreCode}:存在物料未扫描上架,请取出后重新扫描上架!");
//#endregion
//WaringLightAlwaysRed(shelfStatus.ClientIp, shelfStatus.LightId);
IsWarning = true;
Logs.Write($"货架自检【{ShelfCode},库位{storeInfo.StoreCode}存在物料未扫描上架,开始发送红灯】", LogsType.Instore);
WarningLight.WaringLightAlwaysRed(TcpCleint);
Logs.Write($"货架自检【{ShelfCode},库位{storeInfo.StoreCode}存在物料未扫描上架,发送红灯完成】", LogsType.Instore);
}
else
{

View File

@ -282,8 +282,11 @@ namespace WCS.BLL.Manager
if (shelf is SmartShelf)
{
var smartShelf = (SmartShelf)shelf;
smartShelf?.WarningLight.CloseLight(smartShelf.TcpCleint);
Logs.Write($"【定时任务】:监测警示灯关灯机制,关【{shelf.ShelfCode}】灯发送指令成功!");
if(smartShelf.IsWarning == false)
{
smartShelf?.WarningLight.CloseLight(smartShelf.TcpCleint);
Logs.Write($"【定时任务】:监测警示灯关灯机制,关【{shelf.ShelfCode}】灯发送指令成功!");
}
}
}
catch (Exception ex)

View File

@ -53,23 +53,28 @@ namespace WCS.BLL.Manager
}
var data = e.ByteBlock.Buffer.Take((int)e.ByteBlock.Length).ToArray();
Logs.Write($"【接收】{BitConverter.ToString(data)}", LogsType.Instructions);
Task.Run(() =>
{
Logs.Write($"【接收{clientIpHost}】{BitConverter.ToString(data)}", LogsType.Instructions);
});
e.ByteBlock.Clear();
var len = data.Length;
if (tcpCleint.ShelfTypeName == "信息化货架")
{
Logs.Write($"【信息化货架开始处理接收数据】{BitConverter.ToString(data)}", LogsType.Instructions);
Logs.Write($"【信息化货架开始处理接收数据】{BitConverter.ToString(data)}", LogsType.InstructionsProcess);
Helper.ReturnDataProcess(TcpCleint, data);
Logs.Write($"【信息化货架完成处理接收数据】{BitConverter.ToString(data)}", LogsType.Instructions);
Logs.Write($"【信息化货架完成处理接收数据】{BitConverter.ToString(data)}", LogsType.InstructionsProcess);
return EasyTask.CompletedTask;
}
if (tcpCleint.ShelfTypeName == "液晶货架")
{
Logs.Write($"【液晶货架开始处理接收数据】{BitConverter.ToString(data)}", LogsType.Instructions);
Logs.Write($"【液晶货架开始处理接收数据】{BitConverter.ToString(data)}", LogsType.InstructionsProcess);
//Helper.ReturnDataProcess(TcpCleint, data);
Logs.Write($"【液晶货架完成处理接收数据】{BitConverter.ToString(data)}", LogsType.Instructions);
Logs.Write($"【液晶货架完成处理接收数据】{BitConverter.ToString(data)}", LogsType.InstructionsProcess);
return EasyTask.CompletedTask;
}
@ -85,7 +90,7 @@ namespace WCS.BLL.Manager
{
continue;
}
Logs.Write($"【处理单条指令 开始】{BitConverter.ToString(dataTemp)}", LogsType.Instructions);
Logs.Write($"【处理单条指令 开始】{BitConverter.ToString(dataTemp)}", LogsType.InstructionsProcess);
index += (TcpCleint.PreFixLength + TcpCleint.DataLength - 1);//每次循环index会+1 所以这里-1
//获取板子ID
var boardId = (dataTemp[TcpCleint.PreFixLength + 0] << 8) + dataTemp[TcpCleint.PreFixLength + 1];
@ -109,7 +114,7 @@ namespace WCS.BLL.Manager
var smartShelf = shelf as SmartShelf;
smartShelf?.ProtocolProcess(dataTemp, boardId, lightNumber);
}
Logs.Write($"【处理单条指令 结束】{BitConverter.ToString(dataTemp)}", LogsType.Instructions);
Logs.Write($"【处理单条指令 结束】{BitConverter.ToString(dataTemp)}", LogsType.InstructionsProcess);
}
}
return EasyTask.CompletedTask;

View File

@ -51,7 +51,7 @@ namespace WCS.BLL.Manager
{
Warnings.Add(warning);
//发送WebSocket记录
Logs.Write(JsonConvert.SerializeObject(warning),LogsType.WebSocket);
Logs.Write(JsonConvert.SerializeObject(warning), LogsType.WebSocket);
WebSoceketManager.TrySendMessage(warning.ClientIp, JsonConvert.SerializeObject(warning));
warning.LastSendTime = DateTime.Now;
@ -95,16 +95,20 @@ namespace WCS.BLL.Manager
//货架是否还存在报警信息
shelfIsWarning = Warnings.Where(t => t.ShelfId == warning.ShelfId)
.Where(t => t.IsWarning)
.Any();
//对应货架如果不存在报警信息了 指示灯回到对应的状态
Logs.Write($"shelfIsWarning{shelfIsWarning}", LogsType.WebSocket);
if (!shelfIsWarning)
{
Logs.Write("货架不存在报警信息", LogsType.WebSocket);
var shelf = ShelfManager.Shelves.Where(t => t.ShelfId == warning.ShelfId)
.FirstOrDefault();
if (shelf != null)
{
try
{
Logs.Write("smartShelf?.ClearWarning();", LogsType.WebSocket);
var smartShelf = shelf as SmartShelf;
smartShelf?.ClearWarning();
smartShelf.IsWarning = false;
@ -117,6 +121,7 @@ namespace WCS.BLL.Manager
}
#region
Logs.Write($"GoInRightMode", LogsType.WebSocket);
GoInRightMode(warning);
#endregion
@ -194,7 +199,7 @@ namespace WCS.BLL.Manager
#region
if (warning.WarningType == WarningTypeEnum.)
{
Logs.Write($"【出库自检】发现物料{inventoryDetail.MatSN}丢失,用户点击【处理】,删除数据",LogsType.Outstore);
Logs.Write($"【出库自检】发现物料{inventoryDetail.MatSN}丢失,用户点击【处理】,删除数据", LogsType.Outstore);
//清掉需要出库的缓存
var shelf = ShelfManager.Shelves
.Where(t => t.ShelfId == warning.ShelfId)
@ -210,7 +215,8 @@ namespace WCS.BLL.Manager
//删除模组上缓存的那一条数据
var module = smartShelf.Modules.Where(t => t.ModuleId == warning.ModuleId).FirstOrDefault();
if (module != null) {
if (module != null)
{
module.CurrentOutSns.RemoveAll(t => t == inventoryDetail.MatSN);
Logs.Write($"【出库自检】发现物料{inventoryDetail.MatSN}丢失,已删除模组缓存,剩余物料为{string.Join(",", module.CurrentOutSns)}", LogsType.Outstore);
}
@ -246,6 +252,8 @@ namespace WCS.BLL.Manager
var moduleOtherError = WarningManager.Warnings.Where(t => t.ShelfId == warning.ShelfId && t.ModuleId == warning.ModuleId).Any();
if (moduleOtherError)
{
var guids = WarningManager.Warnings.Where(t => t.ShelfId == warning.ShelfId && t.ModuleId == warning.ModuleId).Select(t => t.Guid.ToString()).ToList();
Logs.Write($"模组还存在其他异常 暂时不进入对应模式.{string.Join("''", guids)}", LogsType.WebSocket);
return;
}
@ -253,6 +261,7 @@ namespace WCS.BLL.Manager
.FirstOrDefault();
if (shelf != null)
{
Logs.Write($"shelf != null", LogsType.WebSocket);
var smartShelf = shelf as SmartShelf;
if (smartShelf != null)
{
@ -266,8 +275,7 @@ namespace WCS.BLL.Manager
smartShelf.WarningLight.BlueLight(smartShelf.TcpCleint);
break;
case Mode.:
//module.GoInOutStoreMode(smartShelf.TcpCleint, module.CurrentOutSns);
//smartShelf.WarningLight.GreenLight(smartShelf.TcpCleint);
Logs.Write("smartShelf.GoInOutstoreByWebSocket", LogsType.WebSocket);
smartShelf.GoInOutstoreByWebSocket(module.ModuleId);
break;
case Mode.:
@ -278,6 +286,14 @@ namespace WCS.BLL.Manager
}
}
}
else
{
Logs.Write($"smartShelf != null", LogsType.WebSocket);
}
}
else
{
Logs.Write($"shelf == null", LogsType.WebSocket);
}
}
catch (Exception e)

View File

@ -40,7 +40,7 @@ namespace WCS.BLL.Services.Service
}
var totalCount = await recordsQueryable.CountAsync();
var records = await recordsQueryable
.OrderByDescending(t => t.Id)
//.OrderByDescending(t => t.Id)
.Skip((request.PageNumber - 1) * request.PageSize).Take(request.PageSize)
.ToListAsync();
//生成序号
@ -48,10 +48,6 @@ namespace WCS.BLL.Services.Service
{
records[i].RowNumber = (request.PageNumber - 1) * request.PageSize + i + 1;
}
//Task.WaitAll(new Task[] { recordsTask, totalCountTask });
//var records = recordsTask.Result;
//var totalCount = totalCountTask.Result;
return new PageQueryResponse<SystemApiLogRecord>()
{

View File

@ -41,6 +41,7 @@ namespace WCS.BLL.Services.Service
;
var totalCount = await recordsQueryable.CountAsync();
var totalQty = await recordsQueryable.SumAsync((id, si) => id.MatQty);
var records = await recordsQueryable
.OrderByDescending((id, si) => id.Id)
.Skip((request.PageNumber - 1) * request.PageSize).Take(request.PageSize)
@ -55,7 +56,7 @@ namespace WCS.BLL.Services.Service
return new PageQueryResponse<InventoryDetail>()
{
Code = 200,
Message = $"success",
Message = $"{totalQty}",
Data = new PageQueryResponseData<InventoryDetail>()
{
TotalCount = totalCount,

View File

@ -487,7 +487,8 @@ namespace WCS.BLL.Services.Service
//获取后台当前正在进行出库的订单 将出库状态反馈给前端
var outingOrderNumbers = ShelfManager.Shelves
.Where(t => t.CurrentMode == HardWare.Mode.).Select(t => t.OrderNumber)
.Where(t => t.CurrentMode == HardWare.Mode.)
.Select(t => t.OrderNumber)
.ToList();
foreach (var record in records)
{

View File

@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.BLL.Config;
using WCS.BLL.DbModels;
using WCS.BLL.Manager;
using WCS.BLL.Services.IService;
@ -12,6 +13,7 @@ using WCS.DAL.DbModels;
using WCS.Model;
using WCS.Model.ApiModel.InOutRecord;
using WCS.Model.ApiModel.Stocktaking;
using WCS.Model.WebSocketModel;
namespace WCS.BLL.Services.Service
{
@ -100,7 +102,8 @@ namespace WCS.BLL.Services.Service
{
StocktakingOrderNumber = request.StocktakingOrderNumber,
StocktakingOrderSource = request.StocktakingOrderSource,
CreateUser = request.UserName
CreateUser = request.UserName,
GroupName = LocalFile.Config.GroupName,
};
var stockTakingOrderId = await DbHelp.db.Insertable(stockTakingOrder).ExecuteReturnIdentityAsync();
stockTakingOrder.Id = stockTakingOrderId;
@ -180,6 +183,7 @@ namespace WCS.BLL.Services.Service
{
StocktakingOrderNumber = request.StocktakingOrderNumber,
StocktakingOrderSource = request.StocktakingOrderSource,
GroupName = LocalFile.Config.GroupName,
CreateUser = request.UserName
};
var stockTakingOrderId = await DbHelp.db.Insertable(stockTakingOrder).ExecuteReturnIdentityAsync();
@ -242,6 +246,7 @@ namespace WCS.BLL.Services.Service
//获取库存数据 生成盘点单据
var inventoryDetails = await DbHelp.db.Queryable<InventoryDetail>()
.Where(t => request.List.Contains(t.MatSN))
.WhereIF(!string.IsNullOrEmpty(LocalFile.Config.GroupName), t => t.GroupName == LocalFile.Config.GroupName)
.ToListAsync();
if (inventoryDetails == null || inventoryDetails.Count == 0)
{
@ -260,6 +265,7 @@ namespace WCS.BLL.Services.Service
{
StocktakingOrderNumber = request.StocktakingOrderNumber,
StocktakingOrderSource = request.StocktakingOrderSource,
GroupName = LocalFile.Config.GroupName,
CreateUser = request.UserName
};
var stockTakingOrderId = await DbHelp.db.Insertable(stockTakingOrder).ExecuteReturnIdentityAsync();
@ -317,7 +323,8 @@ namespace WCS.BLL.Services.Service
var recordsQueryable = DbHelp.db.Queryable<StockTakingOrder>()
.WhereIF(!string.IsNullOrEmpty(request.StocktakingOrderNumber), t => t.StocktakingOrderNumber.Contains(request.StocktakingOrderNumber))
.WhereIF(!string.IsNullOrEmpty(request.StocktakingOrderSource), t => t.StocktakingOrderSource != null && t.StocktakingOrderSource.Contains(request.StocktakingOrderSource));
.WhereIF(!string.IsNullOrEmpty(request.StocktakingOrderSource), t => t.StocktakingOrderSource != null && t.StocktakingOrderSource.Contains(request.StocktakingOrderSource))
.WhereIF(!string.IsNullOrEmpty(LocalFile.Config.GroupName), t => t.GroupName == LocalFile.Config.GroupName);
switch (request.StocktakingOrderStatus)
{
@ -396,6 +403,7 @@ namespace WCS.BLL.Services.Service
var records = await recordsQueryable
.Where(t => t.StocktakingOrderStatus != StocktakingOrderStatus.)
.WhereIF(!string.IsNullOrEmpty(LocalFile.Config.GroupName), t => t.GroupName == LocalFile.Config.GroupName)
.OrderByDescending(t => t.UpdateTime)
.Take(40)
.ToListAsync();
@ -493,6 +501,14 @@ namespace WCS.BLL.Services.Service
Message = $"操作失败不存在Id为{request.StockTakingOrderId}的盘点单!",
};
}
if (order.StocktakingOrderStatus == StocktakingOrderStatus.)
{
return new ResponseCommon()
{
Code = 201,
Message = $"操作失败:盘点单据:{request.StockTakingOrderNumber}已提交!",
};
}
}
else if (!string.IsNullOrEmpty(request.StockTakingOrderNumber))
{
@ -794,6 +810,19 @@ namespace WCS.BLL.Services.Service
#endregion
DbHelp.db.CommitTran();
//通知前台刷新
Task.Run(() =>
{
var messageMode = new WebSocketMessageModel()
{
IsWarning = false,
ClientIp = shelf.WebSocketIpAddress,
WarningType = WarningTypeEnum.
};
WarningManager.SendWarning(messageMode);
});
//更新时间 避免被自动退出
Task.Run(() =>
{

View File

@ -46,6 +46,10 @@ namespace WCS.BLL
/// </summary>
Instore,
WebSocket,
/// <summary>
/// 指令发送接收
/// </summary>
InstructionsProcess,
}
/// <summary>

View File

@ -252,10 +252,11 @@ namespace WCS.BLL
tcpClient.Send(message);
Task.Run(() =>
{
Logs.Write($"【发送】{BitConverter.ToString(message)}", LogsType.Instructions);
var clientIpHost = tcpClient.IP + ":" + tcpClient.Port;
Logs.Write($"【发送{clientIpHost}】{BitConverter.ToString(message)}", LogsType.Instructions);
});
//发送自带15ms间隔
Thread.Sleep(15);
Thread.Sleep(18);
}
}
catch (Exception ex)

View File

@ -25,7 +25,7 @@ namespace 货架标准上位机
}
else
{
MainWindow = new MainWindow1();
MainWindow = new MainWindow2();
}
MainWindow.ShowDialog();

View File

@ -95,6 +95,8 @@ namespace 货架标准上位机
/// 登录历史
/// </summary>
public List<string> SaveLogin { get; set; }
public string LastSaveLoginPassword { get; set; }
/// <summary>
/// 登录历史数量
/// </summary>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

View File

@ -381,7 +381,11 @@ namespace 货架标准上位机.ViewModel
public int PageSize
{
get => pageSize;
set { SetProperty(ref pageSize, value); }
set
{
SetProperty(ref pageSize, value);
BtnSearch(true);
}
}

View File

@ -255,7 +255,11 @@ namespace 货架标准上位机.ViewModel
public int PageSize
{
get => pageSize;
set { SetProperty(ref pageSize, value); }
set
{
SetProperty(ref pageSize, value);
BtnSearch(true);
}
}

View File

@ -185,7 +185,7 @@ namespace 货架标准上位机.ViewModel
var Result = ApiHelp.GetDataFromHttp<ResponseCommon>(LocalFile.Config.ApiIpHost + "outStore/goInOutstore", body, "POST");
if (Result != null && Result.Code == 200)
{
Growl.Warning("已成功开始出库");
Growl.Warning("已成功开始盘点");
RefreshDataGridItemSource();
}
else if (Result != null)

View File

@ -439,7 +439,11 @@ namespace 货架标准上位机.ViewModel
public int PageSize
{
get => pageSize;
set { SetProperty(ref pageSize, value); }
set
{
SetProperty(ref pageSize, value);
BtnSearch(true);
}
}

View File

@ -372,7 +372,11 @@ namespace 货架标准上位机.ViewModel
public int PageSize
{
get => pageSize;
set { SetProperty(ref pageSize, value); }
set
{
SetProperty(ref pageSize, value);
BtnSearch(true);
}
}

View File

@ -78,6 +78,10 @@ namespace 货架标准上位机.ViewModel
set { SetProperty(ref shelfCode, value); }
}
private string totalQtyStr;
public string TotalQtyStr { get => totalQtyStr; set { SetProperty(ref totalQtyStr, value); } }
/// <summary>
/// 物料编码
@ -220,6 +224,8 @@ namespace 货架标准上位机.ViewModel
MatName = string.Empty;
MatSN = string.Empty;
StoreCode = string.Empty;
ShelfCode = string.Empty;
MatBatch = string.Empty;
}
public ICommand BtnSearchCommand { get => new DelegateCommand(BtnSearchReset); }
@ -261,6 +267,11 @@ namespace 货架标准上位机.ViewModel
DataGridItemSource = Result.Data.Lists;
MaxPage = Result.Data.MaxPage;
TotalCount = Result.Data.TotalCount;
TotalQtyStr = "物料总数量" + Result.Message;
}
else
{
TotalQtyStr = string.Empty;
}
}
catch (Exception ex)
@ -331,6 +342,9 @@ namespace 货架标准上位机.ViewModel
MatCode = MatCode,
StoreCode = StoreCode,
ShelfTypeId = SelectedShelfTypeItem == null ? 0 : SelectedShelfTypeItem.Id,
ShelfCode = ShelfCode,
UserName = LocalStatic.CurrentUser,
DeviceType = LocalFile.Config.DeviceType,
PageNumber = 1,
@ -429,6 +443,9 @@ namespace 货架标准上位机.ViewModel
MatCode = MatCode,
StoreCode = StoreCode,
ShelfTypeId = SelectedShelfTypeItem == null ? 0 : SelectedShelfTypeItem.Id,
ShelfCode = ShelfCode,
UserName = LocalStatic.CurrentUser,
DeviceType = LocalFile.Config.DeviceType,
PageNumber = CurrentPage,
@ -543,7 +560,11 @@ namespace 货架标准上位机.ViewModel
public int PageSize
{
get => pageSize;
set { SetProperty(ref pageSize, value); }
set
{
SetProperty(ref pageSize, value);
BtnSearch(true);
}
}

View File

@ -279,7 +279,11 @@ namespace 货架标准上位机.ViewModel
public int PageSize
{
get => pageSize;
set { SetProperty(ref pageSize, value); }
set
{
SetProperty(ref pageSize, value);
BtnSearch(true);
}
}

View File

@ -468,7 +468,11 @@ namespace 货架标准上位机.ViewModels
public int PageSize
{
get => pageSize;
set { SetProperty(ref pageSize, value); }
set
{
SetProperty(ref pageSize, value);
BtnSearch(true);
}
}

View File

@ -277,7 +277,8 @@ namespace 货架标准上位机.ViewModel
{
if (Result.Data.Count > 0)
{
DataGridItemSource = new ObservableCollection<OutOrderMatDetailModel>(Result.Data);
var list = Result.Data.OrderBy(t => t.IsSended).ToList();
DataGridItemSource = new ObservableCollection<OutOrderMatDetailModel>(list);
OrderStatus = Result.Message;
}
else

View File

@ -254,7 +254,11 @@ namespace 货架标准上位机.ViewModel
public int PageSize
{
get => pageSize;
set { SetProperty(ref pageSize, value); }
set
{
SetProperty(ref pageSize, value);
BtnSearch(true);
}
}

View File

@ -292,6 +292,7 @@ namespace 货架标准上位机.ViewModels
{
//成功后直接跳转
MainWindow1.viewModel.GoToStockTakingView = true;
MainWindow2.viewModel.SelectedValue = "物料盘点";
Growl.Success("已跳转到物料盘点页面!");
}
else if (Result != null)
@ -452,7 +453,11 @@ namespace 货架标准上位机.ViewModels
public int PageSize
{
get => pageSize;
set { SetProperty(ref pageSize, value); }
set
{
SetProperty(ref pageSize, value);
BtnSearch(true);
}
}

View File

@ -254,6 +254,7 @@ namespace 货架标准上位机.ViewModel
if (SelectedOutOrder == null)
{
//选择的单据为空无法进行查询
Logs.Write("选择的单据为空无法进行查询!");
return;
}
#region
@ -261,21 +262,26 @@ namespace 货架标准上位机.ViewModel
{
var body = new GetStockTakingOrderMatDetailRequest()
{
StockTakingOrderId = selectedOutOrder.Id,
StockTakingOrderNumber = selectedOutOrder.StocktakingOrderNumber,
StockTakingOrderId = SelectedOutOrder.Id,
StockTakingOrderNumber = SelectedOutOrder.StocktakingOrderNumber,
UserName = LocalStatic.CurrentUser,
DeviceType = LocalFile.Config.DeviceType,
};
Logs.Write("[刷新盘点明细1]!");
var Result = ApiHelp.GetDataFromHttp<ResponseCommon<List<StockTakingOrderMatDetailModel>>>(LocalFile.Config.ApiIpHost + "stockTaking/getStockTakingOrderMatDetail", body, "POST");
if (Result != null && Result.Code == 200)
{
Logs.Write("[刷新盘点明细]Result != null && Result.Code == 200!");
if (Result.Data.Count > 0)
{
DataGridItemSource = new ObservableCollection<StockTakingOrderMatDetailModel>(Result.Data);
Logs.Write("[刷新盘点明细2]Result.Data.Count>0");
var list = Result.Data.OrderBy(t => t.IsStocktaking).ToList();
DataGridItemSource = new ObservableCollection<StockTakingOrderMatDetailModel>(list);
}
else
{
Logs.Write("[刷新盘点明细2]Result.Data.Count<=0,该单据未查询到盘点明细");
App.Current.Dispatcher.Invoke(() =>
{
DataGridItemSource?.Clear();
@ -286,10 +292,12 @@ namespace 货架标准上位机.ViewModel
}
else if (Result != null)
{
Logs.Write("[刷新盘点明细2]Result != null");
Growl.Warning(Result.Message);
}
else
{
Logs.Write("[刷新盘点明细2]调用接口失败");
Growl.Warning("调用接口失败!");
}
});

View File

@ -263,7 +263,11 @@ namespace 货架标准上位机.ViewModel
public int PageSize
{
get => pageSize;
set { SetProperty(ref pageSize, value); }
set
{
SetProperty(ref pageSize, value);
BtnSearch(true);
}
}

View File

@ -10,10 +10,10 @@
xmlns:pi="https://github.com/ping9719/wpfex"
d:DesignHeight="737" d:DesignWidth="1192" LoadedVisibleFirst="loadFir" IsVisibleChanged="vis">
<Border Margin="0" Background="AliceBlue" CornerRadius="3" Padding="0">
<Grid Height="737" VerticalAlignment="Top">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="7*"/>
<RowDefinition Height="4*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--内容区-->
@ -27,12 +27,12 @@
</Border>
<!--</Grid>-->
<!--消息区-->
<Border Grid.Row="1" Margin="5,5,5,5" BorderThickness="1" Background="White" BorderBrush="DodgerBlue" CornerRadius="3">
<Grid>
<Border Grid.Row="1" Margin="5" Height="auto" BorderThickness="1" Background="White" BorderBrush="DodgerBlue" CornerRadius="3">
<!--<Grid>
<Grid.ColumnDefinitions>
<!--<ColumnDefinition Width="4*"/>-->
--><!--<ColumnDefinition Width="4*"/>--><!--
<ColumnDefinition Width="6*"/>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>-->
<!--报警--><!--
<GroupBox Grid.Column="0" Background="White" Padding="0" Style="{StaticResource GroupBoxTab}" Margin="5,5,5,5">
<GroupBox.Header>
@ -54,7 +54,7 @@
</GroupBox.Header>
<pi:TextBoxLog Token="selfCheck" Style="{StaticResource TextBoxExtend.Multi}" Margin="-1" hc:InfoElement.Placeholder="没有日志信息" Foreground="CornflowerBlue"></pi:TextBoxLog>
</GroupBox>
</Grid>
<!--</Grid>-->
</Border>
</Grid>

View File

@ -112,11 +112,9 @@
<Setter Property="Background" Value="CadetBlue"/>
</MultiTrigger>
<DataTrigger Binding="{Binding IsOuting}" Value="True">
<!--<Setter Property="Background" Value="Green"/>-->
<Setter Property="Foreground" Value="Red" />
</DataTrigger>
<DataTrigger Binding="{Binding IsOuting}" Value="False">
<!--<Setter Property="Background" Value="White"/>-->
<Setter Property="Foreground" Value="Black" />
</DataTrigger>
</Style.Triggers>

View File

@ -97,107 +97,260 @@
</ResourceDictionary>
</hc:SideMenu.Resources>
<!--列表-->
<hc:SideMenuItem Header="&#xe603;主页" Tag="主页" IsSelected="True" MinWidth="140">
<!--<hc:SideMenuItem.Icon>
<Image Source="/Resources/主页.png"/>
</hc:SideMenuItem.Icon>-->
</hc:SideMenuItem>
<hc:SideMenuItem Header="设备" Tag="设备" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem Header="主页" IsSelected="True" MinWidth="140">
<hc:SideMenuItem.Icon>
<Image Source="/Resources/模式.png"/>
<Image Source="/Resources/主页.png"/>
</hc:SideMenuItem.Icon>
<hc:SideMenuItem Header="PLC手动" Tag="PLC">
<hc:SideMenuItem Header="主页" Tag="主页">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe729;"/>
<TextBlock Text="&#xe603;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
<hc:SideMenuItem Header="扫码枪" Tag="扫码枪">
</hc:SideMenuItem>
<hc:SideMenuItem Header="入库" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<Image Source="/Resources/入库.png"/>
</hc:SideMenuItem.Icon>
<hc:SideMenuItem Header="物料入库" Tag="物料入库">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe681;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
</hc:SideMenuItem>
<hc:SideMenuItem Header="出库" >
<hc:SideMenuItem.Icon>
<Image Source="/Resources/出库.png"/>
</hc:SideMenuItem.Icon>
<hc:SideMenuItem Header="出库单据" Tag="出库单据">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe6e2;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
<hc:SideMenuItem Header="物料出库" Tag="物料出库">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe67d;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
</hc:SideMenuItem>
<hc:SideMenuItem Header="盘点" >
<hc:SideMenuItem.Icon>
<Image Source="/Resources/盘点.png"/>
</hc:SideMenuItem.Icon>
<hc:SideMenuItem Header="盘点单据" Tag="盘点单据">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe65f;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
<hc:SideMenuItem Header="物料盘点" Tag="物料盘点">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe65e;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
</hc:SideMenuItem>
<hc:SideMenuItem Header="查询" Tag="查询" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.权限},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<Image Source="/Resources/查询.png"/>
</hc:SideMenuItem.Icon>
<hc:SideMenuItem Header="库存查询" Tag="库存查询" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe609;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
<hc:SideMenuItem Header="出入记录" Tag="出入记录" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe60b;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
</hc:SideMenuItem>
<hc:SideMenuItem Header="库位" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.权限},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<Image Source="/Resources/货架.png"/>
</hc:SideMenuItem.Icon>
<hc:SideMenuItem Header="货架管理" Tag="货架管理" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe608;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
<hc:SideMenuItem Header="模组管理" Tag="模组管理" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe6f1;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
<hc:SideMenuItem Header="库位管理" Tag="库位管理" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe6d5;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
</hc:SideMenuItem>
<hc:SideMenuItem Header="物料" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.权限},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<Image Source="/Resources/物料.png"/>
</hc:SideMenuItem.Icon>
<hc:SideMenuItem Header="物料维护" Tag="物料维护" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe605;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
<hc:SideMenuItem Header="物料明细" Tag="物料明细" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe60e;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
</hc:SideMenuItem>
<hc:SideMenuItem Header="数据" Tag="数据" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<Image Source="/Resources/数据.png"/>
</hc:SideMenuItem.Icon>
<hc:SideMenuItem Header="统计信息" Tag="统计">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xec66;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
<hc:SideMenuItem Header="详情信息" Tag="详情">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe61d;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
</hc:SideMenuItem>
<hc:SideMenuItem Header="权限" Tag="权限" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.权限},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem Header="权限" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.权限},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<Image Source="/Resources/权限.png"/>
</hc:SideMenuItem.Icon>
<hc:SideMenuItem Header="用户" Tag="用户" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem Header="角色管理" Tag="角色管理" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe649;"/>
<TextBlock Text="&#xe60c;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
<hc:SideMenuItem Header="角色" Tag="角色" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem Header="用户管理" Tag="用户管理" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe612;"/>
<TextBlock Text="&#xe61c;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
</hc:SideMenuItem>
<hc:SideMenuItem Header="设置" Tag="设置" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.设置},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem Header="调试" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.权限},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<Image Source="/Resources/设置.png"/>
<Image Source="/Resources/调试.png"/>
</hc:SideMenuItem.Icon>
<hc:SideMenuItem Header="调试" Tag="调试" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe61e;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
<hc:SideMenuItem Header="设置" Tag="设置" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe601;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
<hc:SideMenuItem Header="接口记录" Tag="接口记录" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
<hc:SideMenuItem.Icon>
<TextBlock Text="&#xe61f;"/>
</hc:SideMenuItem.Icon>
</hc:SideMenuItem>
</hc:SideMenuItem>
</hc:SideMenu>
</hc:TransitioningContentControl>
</Border>
<!--内容-->
<Border Margin="0,3,5,3" Grid.Column="1" Style="{StaticResource BorderRegion}" Padding="0" BorderThickness="1">
<TabControl Style="{x:Null}" Margin="1,-3,1,1" BorderThickness="0" SelectedValue="{Binding SelectedValue}" SelectedValuePath="Header" PreviewKeyDown="tabControl_PreviewKeyDown">
<TabItem Header="主页" IsSelected="True" Height="{Binding TabItemHeight}">
<TabItem Header="主页" IsSelected="True" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:HomeView />
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="PLC" Height="{Binding TabItemHeight}">
<TabItem Header="物料入库" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:DeviceView />
<View:InInventoryView />
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="扫码枪" Height="{Binding TabItemHeight}">
<TabItem Header="出库单据" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<pi:TextBoxScanner Style="{StaticResource TextBoxExtend}" hc:InfoElement.Placeholder="鼠标点击此处激活" hc:InfoElement.Title="码信息" hc:InfoElement.TitlePlacement="Top" AutoClear="NextClear" IsAutoFocus="True" VerticalAlignment="Top"></pi:TextBoxScanner>
<View:OutInventoryDocumentView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="统计" Height="{Binding TabItemHeight}">
<TabItem Header="物料出库" IsSelected="{Binding GoToOutVentoryView}" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:DataChartView/>
<View:OutVentoryView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="详情" Height="{Binding TabItemHeight}">
<TabItem Header="盘点单据" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:DataListView/>
<View:StocktakingDocumentView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="用户" Height="{Binding TabItemHeight}">
<TabItem Header="物料盘点" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:UserView/>
<View:StockTakingView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="角色" Height="{Binding TabItemHeight}">
<TabItem Header="库存查询" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:MatInventoryDetailView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="出入记录" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:InOutRecordView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="货架管理" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:ShelfInfoView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="模组管理" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:ModuleInfoView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="库位管理" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:StoreInfoView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="物料维护" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:MatBaseInfoView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="物料明细" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:MatInfoView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="角色管理" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:RoleView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="设置" Height="{Binding TabItemHeight}">
<TabItem Header="用户管理" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:SetView />
<View:UserView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="接口记录" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:InterfaceRecordView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="调试" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:DeviceView/>
</hc:TransitioningContentControl>
</TabItem>
<TabItem Header="设置" Height="{Binding TabItemHeight}">
<hc:TransitioningContentControl TransitionMode="Fade">
<View:SetView/>
</hc:TransitioningContentControl>
</TabItem>
</TabControl>
</Border>
</Grid>
@ -206,11 +359,6 @@
<hc:TransitioningContentControl TransitionMode="Top2Bottom">
<Grid>
<StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Left">
<pi:IotState Content="PLC" IsOk="False" Height="auto" Width="auto" InteriorHeight="13" Foreground="Gray" Background="Transparent"></pi:IotState>
<pi:IotState Content="机器人" IsOk="False" Height="auto" Width="auto" InteriorHeight="13" Foreground="Gray" Background="Transparent"></pi:IotState>
<pi:IotState Content="数据库" IsOk="False" Height="auto" Width="auto" InteriorHeight="13" Foreground="Gray" Background="Transparent"></pi:IotState>
<pi:IotState Content="错误" IsOk="False" Height="auto" Width="auto" InteriorHeight="13" Foreground="Gray" OkBrush="PaleVioletRed" Background="Transparent"></pi:IotState>
<pi:SyncProgressBar SyncState="OkVisible" Margin="4,0,0,0" Width="130"></pi:SyncProgressBar>
</StackPanel>
<StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Margin="0,0" Text="{Binding Time,StringFormat=yyyy-MM-dd HH:mm:ss,FallbackValue=2000-01-01 00:00:00}" Foreground="#FF3A90C1" VerticalAlignment="Center"></TextBlock>

View File

@ -210,6 +210,9 @@
</Grid>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Column="2">
<TextBlock FontSize="14" VerticalAlignment="Center" Text="{Binding TotalQtyStr}"></TextBlock>
</StackPanel>
</Grid>
</Border>
</Grid>

View File

@ -126,7 +126,7 @@
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<Ellipse Width="20" Height="20" Fill="LightGreen" Visibility="{Binding IsStocktaking,Converter={StaticResource Boolean2VisibilityConverter}}"></Ellipse>
<Ellipse Width="20" Height="20" Fill="Green" Visibility="{Binding IsStocktaking,Converter={StaticResource Boolean2VisibilityConverter}}"></Ellipse>
<Ellipse Width="20" Height="20" Fill="Gray" Visibility="{Binding IsStocktaking,Converter={StaticResource Boolean2VisibilityReConverter}}"></Ellipse>
</StackPanel>
</DataTemplate>

View File

@ -42,6 +42,8 @@ namespace 货架标准上位机
{
ComboBoxId.ItemsSource = LocalFile.Config.Sys.SaveLogin;
ComboBoxId.SelectedIndex = 0;
PasswordBoxPass.Password = LocalFile.Config.Sys.LastSaveLoginPassword;
}
}
@ -74,8 +76,8 @@ namespace 货架标准上位机
PassWord = pass,
IsNoLogin = false,
};
if (LocalFile.Config.IsMx)
body.IsNoLogin = true;
//if (LocalFile.Config.IsMx)
// body.IsNoLogin = true;
var Result = ApiHelp.GetDataFromHttp<ResponseBase<UserModel>>(LocalFile.Config.ApiIpHost + "user/userLogin",
body, "POST");
if (Result != null && Result.Code != 200)
@ -99,6 +101,7 @@ namespace 货架标准上位机
{
LocalFile.Config.Sys.SaveLogin.RemoveAll(t => t == loginName);
LocalFile.Config.Sys.SaveLogin.Insert(0, loginName);
LocalFile.Config.Sys.LastSaveLoginPassword = pass;
LocalFile.Config.Sys.SaveLogin = LocalFile.Config.Sys.SaveLogin.Take(LocalFile.Config.Sys.SaveLoginCount).ToList();
LocalFile.SaveConfig();
}

View File

@ -2,9 +2,9 @@
//连接不上加SslMode=none;
"MySql": "server=localhost;Database=db1;Uid=root;Pwd=123456;Convert Zero Datetime=True",
//货架服务器的IP和端口号
"ApiIpHost": "http://192.168.9.21:8888/",
"ApiIpHost": "http://127.0.0.1:8888/",
//WebSocket的地址
"WebSocketUrl": "ws://192.168.9.21:7789/ws",
"WebSocketUrl": "ws://127.0.0.1:7789/ws",
//货架分区
"GroupName": [ "A0-2" ],
//设备类型 可以配置为每个电脑不一样

View File

@ -0,0 +1,141 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net472</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<LangVersion>latest</LangVersion>
<Company>重庆盟讯电子科技有限公司</Company>
<Copyright>Copyright © 2024</Copyright>
<AssemblyVersion>1.0.0</AssemblyVersion>
<FileVersion>1.0.0</FileVersion>
<ApplicationIcon>Resources\Logo.ico</ApplicationIcon>
<Authors>重庆盟讯电子科技有限公司</Authors>
<Product>货架标准上位机</Product>
<AssemblyName>货架标准上位机</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;8601;8618;8625</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Fonts\demo\**" />
<EmbeddedResource Remove="Fonts\demo\**" />
<None Remove="Fonts\demo\**" />
<Page Remove="Fonts\demo\**" />
</ItemGroup>
<ItemGroup>
<None Remove="Fonts\iconfont.ttf" />
<None Remove="Resources\cloud.png" />
<None Remove="Resources\goOutInstore.png" />
<None Remove="Resources\Logo.ico" />
<None Remove="Resources\Logo.png" />
<None Remove="Resources\LogoAll.zip" />
<None Remove="Resources\LogoJd.ico" />
<None Remove="Resources\LogoJd.png" />
<None Remove="Resources\LogoJd2.ico" />
<None Remove="Resources\LogoJd2.png" />
<None Remove="Resources\主页.png" />
<None Remove="Resources\入库.png" />
<None Remove="Resources\权限.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="HandyControl" Version="3.5.1" />
<PackageReference Include="LiveCharts.Wpf.Core" Version="0.9.8" />
<PackageReference Include="MiniExcel" Version="1.31.3" />
<PackageReference Include="MySqlConnector" Version="2.3.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Ping9719.WpfEx" Version="0.8.0" />
<PackageReference Include="QRCoder" Version="1.5.1" />
<PackageReference Include="SqlSugar" Version="5.1.4.149" />
<PackageReference Include="SqlSugar.MySqlConnector" Version="5.1.3.42" />
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.118" />
<PackageReference Include="TouchSocket.Http" Version="2.0.3" />
<PackageReference Include="TouchSocket.SerialPorts" Version="2.0.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="Interop.BarTender">
<HintPath>..\..\..\..\..\Windows\assembly\GAC_MSIL\Interop.BarTender\10.1.4.1__109ff779a1b4cbc7\Interop.BarTender.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Printing" />
</ItemGroup>
<ItemGroup>
<Resource Include="Fonts\iconfont.ttf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\cloud.png" />
<Resource Include="Resources\goOutInstore.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Logo.ico" />
<Resource Include="Resources\Logo.png" />
<Resource Include="Resources\主页.png" />
<Resource Include="Resources\入库.png" />
<Resource Include="Resources\权限.png" />
</ItemGroup>
<ItemGroup>
<None Update="data\jsconfig.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="data\操作说明书.docx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Excel\出库单据导入模板.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Excel\物料管理导入模板.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Interop.BarTender.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\入库.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\物料条码.btw">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="Excel\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WCS.Model\WCS.Model.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="Models\JsConfig.cs">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Compile>
<Compile Update="Views\Controls\ScannerDisplayControl.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Controls\ProcessDialog.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Controls\ImageDialog.xaml.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Page Update="Views\MatBaseInoScanGenarateMatInfoView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\ShelfInfoAddOrUpdateView.xaml">
<SubType>Designer</SubType>
</Page>
</ItemGroup>
</Project>

View File

@ -1,142 +1,150 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net472</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<LangVersion>latest</LangVersion>
<Company>重庆盟讯电子科技有限公司</Company>
<Copyright>Copyright © 2024</Copyright>
<AssemblyVersion>1.0.0</AssemblyVersion>
<FileVersion>1.0.0</FileVersion>
<ApplicationIcon>Resources\Logo.ico</ApplicationIcon>
<Authors>重庆盟讯电子科技有限公司</Authors>
<Product>货架标准上位机</Product>
<AssemblyName>货架标准上位机</AssemblyName>
</PropertyGroup>
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net472</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<LangVersion>latest</LangVersion>
<Company>重庆盟讯电子科技有限公司</Company>
<Copyright>Copyright © 2024</Copyright>
<AssemblyVersion>1.0.0</AssemblyVersion>
<FileVersion>1.0.0</FileVersion>
<ApplicationIcon>Resources\Logo.ico</ApplicationIcon>
<Authors>重庆盟讯电子科技有限公司</Authors>
<Product>货架标准上位机</Product>
<AssemblyName>货架标准上位机</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;8601;8618;8625</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;8601;8618;8625</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Fonts\demo\**" />
<EmbeddedResource Remove="Fonts\demo\**" />
<None Remove="Fonts\demo\**" />
<Page Remove="Fonts\demo\**" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Fonts\demo\**" />
<EmbeddedResource Remove="Fonts\demo\**" />
<None Remove="Fonts\demo\**" />
<Page Remove="Fonts\demo\**" />
</ItemGroup>
<ItemGroup>
<None Remove="Fonts\iconfont.ttf" />
<None Remove="Resources\cloud.png" />
<None Remove="Resources\goOutInstore.png" />
<None Remove="Resources\Logo.ico" />
<None Remove="Resources\Logo.png" />
<None Remove="Resources\LogoAll.zip" />
<None Remove="Resources\LogoJd.ico" />
<None Remove="Resources\LogoJd.png" />
<None Remove="Resources\LogoJd2.ico" />
<None Remove="Resources\LogoJd2.png" />
<None Remove="Resources\主页.png" />
<None Remove="Resources\数据.png" />
<None Remove="Resources\权限.png" />
<None Remove="Resources\模式.png" />
<None Remove="Resources\设置.png" />
</ItemGroup>
<ItemGroup>
<None Remove="Fonts\iconfont.ttf" />
<None Remove="Resources\cloud.png" />
<None Remove="Resources\goOutInstore.png" />
<None Remove="Resources\Logo.ico" />
<None Remove="Resources\Logo.png" />
<None Remove="Resources\LogoAll.zip" />
<None Remove="Resources\LogoJd.ico" />
<None Remove="Resources\LogoJd.png" />
<None Remove="Resources\LogoJd2.ico" />
<None Remove="Resources\LogoJd2.png" />
<None Remove="Resources\主页.png" />
<None Remove="Resources\入库.png" />
<None Remove="Resources\出库.png" />
<None Remove="Resources\盘点.png" />
<None Remove="Resources\查询.png" />
<None Remove="Resources\货架.png" />
<None Remove="Resources\物料.png" />
<None Remove="Resources\权限.png" />
<None Remove="Resources\调试.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="HandyControl" Version="3.5.1" />
<PackageReference Include="LiveCharts.Wpf.Core" Version="0.9.8" />
<PackageReference Include="MiniExcel" Version="1.31.3" />
<PackageReference Include="MySqlConnector" Version="2.3.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Ping9719.WpfEx" Version="0.8.0" />
<PackageReference Include="QRCoder" Version="1.5.1" />
<PackageReference Include="SqlSugar" Version="5.1.4.149" />
<PackageReference Include="SqlSugar.MySqlConnector" Version="5.1.3.42" />
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.118" />
<PackageReference Include="TouchSocket.Http" Version="2.0.3" />
<PackageReference Include="TouchSocket.SerialPorts" Version="2.0.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="HandyControl" Version="3.5.1" />
<PackageReference Include="LiveCharts.Wpf.Core" Version="0.9.8" />
<PackageReference Include="MiniExcel" Version="1.31.3" />
<PackageReference Include="MySqlConnector" Version="2.3.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Ping9719.WpfEx" Version="0.8.0" />
<PackageReference Include="QRCoder" Version="1.5.1" />
<PackageReference Include="SqlSugar" Version="5.1.4.149" />
<PackageReference Include="SqlSugar.MySqlConnector" Version="5.1.3.42" />
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.118" />
<PackageReference Include="TouchSocket.Http" Version="2.0.3" />
<PackageReference Include="TouchSocket.SerialPorts" Version="2.0.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="Interop.BarTender">
<HintPath>..\..\..\..\..\Windows\assembly\GAC_MSIL\Interop.BarTender\10.1.4.1__109ff779a1b4cbc7\Interop.BarTender.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Printing" />
</ItemGroup>
<ItemGroup>
<Reference Include="Interop.BarTender">
<HintPath>..\..\..\..\..\Windows\assembly\GAC_MSIL\Interop.BarTender\10.1.4.1__109ff779a1b4cbc7\Interop.BarTender.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Printing" />
</ItemGroup>
<ItemGroup>
<Resource Include="Fonts\iconfont.ttf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\cloud.png" />
<Resource Include="Resources\goOutInstore.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Logo.ico" />
<Resource Include="Resources\Logo.png" />
<Resource Include="Resources\主页.png" />
<Resource Include="Resources\数据.png" />
<Resource Include="Resources\权限.png" />
<Resource Include="Resources\模式.png" />
<Resource Include="Resources\设置.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Fonts\iconfont.ttf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\cloud.png" />
<Resource Include="Resources\goOutInstore.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Logo.ico" />
<Resource Include="Resources\Logo.png" />
<Resource Include="Resources\主页.png" />
<Resource Include="Resources\入库.png"/>
<Resource Include="Resources\出库.png"/>
<Resource Include="Resources\盘点.png"/>
<Resource Include="Resources\查询.png"/>
<Resource Include="Resources\货架.png"/>
<Resource Include="Resources\物料.png"/>
<Resource Include="Resources\权限.png" />
<Resource Include="Resources\调试.png" />
</ItemGroup>
<ItemGroup>
<None Update="data\jsconfig.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="data\操作说明书.docx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Excel\出库单据导入模板.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Excel\物料管理导入模板.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Interop.BarTender.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\物料条码.btw">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="data\jsconfig.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="data\操作说明书.docx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Excel\出库单据导入模板.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Excel\物料管理导入模板.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Interop.BarTender.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\物料条码.btw">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="Excel\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Excel\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WCS.Model\WCS.Model.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WCS.Model\WCS.Model.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="Models\JsConfig.cs">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Compile>
<Compile Update="Views\Controls\ScannerDisplayControl.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Controls\ProcessDialog.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Controls\ImageDialog.xaml.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Update="Models\JsConfig.cs">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Compile>
<Compile Update="Views\Controls\ScannerDisplayControl.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Controls\ProcessDialog.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Controls\ImageDialog.xaml.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Page Update="Views\MatBaseInoScanGenarateMatInfoView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\ShelfInfoAddOrUpdateView.xaml">
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\MatBaseInoScanGenarateMatInfoView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\ShelfInfoAddOrUpdateView.xaml">
<SubType>Designer</SubType>
</Page>
</ItemGroup>
</Project>