change-入库出库禁用按钮实现,明细按照库存数展示最新

collection-v1.0
liuwf 10 months ago
parent 0b16c056e0
commit 933bc22ea7

@ -219,7 +219,7 @@ namespace Aucma.Scada.Business
} }
else else
{ {
//报警停线 //报警
PrintLogInfoMessage($"物料码:{materialCode};未匹配到可用货道"); PrintLogInfoMessage($"物料码:{materialCode};未匹配到可用货道");
BareBoardInStore(storeCode, false); BareBoardInStore(storeCode, false);
} }
@ -774,5 +774,14 @@ namespace Aucma.Scada.Business
} }
#endregion #endregion
/// <summary>
/// 通过货道号查找货道
/// </summary>
/// <returns></returns>
public BaseSpaceInfo getSpaceBySpaceCode(string storeCode,string spaceCode)
{
return _spaceInfoService.GetSpaceInfoBySpaceCode(storeCode,spaceCode);
}
} }
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -0,0 +1,113 @@
<-------------->
日志时间2024-04-11 10:10:19,739 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 10:10:21,779 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 10:10:21,781 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 10:10:23,783 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 10:32:13,942 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 10:32:15,961 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 10:32:15,963 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 10:32:17,970 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 10:59:54,604 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 10:59:56,626 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 10:59:56,627 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 10:59:58,634 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 11:01:16,615 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 11:01:18,644 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 11:01:18,645 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 11:01:20,646 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 11:08:52,066 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 11:08:54,084 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 11:08:54,086 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 11:08:56,090 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 11:11:15,341 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 11:11:17,373 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 11:11:17,376 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 11:11:19,383 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 11:12:16,271 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 11:12:18,307 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败
<-------------->
日志时间2024-04-11 11:12:18,310 [1]
日志级别INFO
日志内容三菱Q系列PLC连接开始
<-------------->
日志时间2024-04-11 11:12:20,314 [1]
日志级别INFO
日志内容三菱Q系列PLC建立连接失败

File diff suppressed because one or more lines are too long

@ -1,35 +0,0 @@
[plcSystem]
箱壳PLCIP=10.10.92.22
箱壳PLC端口=2015
内胆PLCIP=10.10.92.29
内胆PLC端口=2015
#箱壳空板处理按钮
[shell_null_address]
空板开关=L90
空板数量=D7005
#箱壳入库地址
[shell_inStore_address]
入库货道号=D7000
入库应答字=D7010
空板到位=D7007
#内胆入库地址
[liner_inStore_address]
入库货道号=D7000
入库应答字=D7010
空板到位=D7007
#箱壳出库地址
[shell_outStore_address]
出库货道号=D7100
出库完成=D7120
出库应答字=D7130
#内胆出库地址
[liner_outStore_address]
出库货道号=D7100
出库完成=D7120
出库应答字=D7130

@ -8,11 +8,13 @@
[shell_inStore_address] [shell_inStore_address]
⻌踱億耋瘍=D7000 ⻌踱億耋瘍=D7000
⻌踱茼湘趼=D7010 ⻌踱茼湘趼=D7010
空板到位=D7007
#囀筐⻌踱華硊 #囀筐⻌踱華硊
[liner_inStore_address] [liner_inStore_address]
⻌踱億耋瘍=D7000 ⻌踱億耋瘍=D7000
⻌踱茼湘趼=D7010 ⻌踱茼湘趼=D7010
空板到位=D7007
#眊褲堤踱華硊 #眊褲堤踱華硊
[shell_outStore_address] [shell_outStore_address]

@ -7,6 +7,7 @@ using HighWayIot.Config;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
@ -269,6 +270,11 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
string info = obj as string; string info = obj as string;
var list = inventoryInfoBusiness.GetBaseSpaceDetails(appConfig.linerStoreCode, info); var list = inventoryInfoBusiness.GetBaseSpaceDetails(appConfig.linerStoreCode, info);
BaseSpaceInfo spaceInfo = inStoreBusiness.getSpaceBySpaceCode(appConfig.linerStoreCode, info);
if (spaceInfo == null) return;
list = list.OrderByDescending(x => x.createTime).Take(spaceInfo.spaceStock).ToList();
RefreshSpaceDetails(list); RefreshSpaceDetails(list);
} }

@ -8,6 +8,7 @@ using HighWayIot.Log4net;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
@ -284,6 +285,7 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
/// <param name="obj"></param> /// <param name="obj"></param>
private void SpaceDetail(object obj) private void SpaceDetail(object obj)
{ {
string info = obj as string; string info = obj as string;
//SpaceDetailWindow spaceDetailWindow = new SpaceDetailWindow(appConfig.shellStoreCode, info); //SpaceDetailWindow spaceDetailWindow = new SpaceDetailWindow(appConfig.shellStoreCode, info);
//spaceDetailWindow.Show(); //spaceDetailWindow.Show();
@ -291,7 +293,10 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
//inventoryInfoBusiness.RefreshBaseSpaceDetails(appConfig.shellStoreCode, info); //inventoryInfoBusiness.RefreshBaseSpaceDetails(appConfig.shellStoreCode, info);
var list = inventoryInfoBusiness.GetBaseSpaceDetails(appConfig.shellStoreCode, info); var list = inventoryInfoBusiness.GetBaseSpaceDetails(appConfig.shellStoreCode, info);
BaseSpaceInfo spaceInfo = inStoreBusiness.getSpaceBySpaceCode(appConfig.shellStoreCode, info);
if (spaceInfo == null) return;
list = list.OrderByDescending(x=>x.createTime).Take(spaceInfo.spaceStock).ToList();
RefreshSpaceDetails(list); RefreshSpaceDetails(list);
} }
@ -319,7 +324,7 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
/// <returns></returns> /// <returns></returns>
public static string GetStringAfterFirstComma(string input) public static string GetStringAfterFirstComma(string input)
{ {
if (input == null) return "";
int commaIndex = input.IndexOf(','); int commaIndex = input.IndexOf(',');
if (commaIndex == -1) if (commaIndex == -1)

@ -91,7 +91,7 @@ namespace HighWayIot.Repository.service.Impl
try try
{ {
Expression<Func<BaseSpaceInfo, bool>> exp = s1 => true; Expression<Func<BaseSpaceInfo, bool>> exp = s1 => true;
exp = exp.And(x => x.spaceStatus == 1 && x.materialType == null && x.storeCode == store && x.spaceCapacity != x.spaceStock); exp = exp.And(x => x.spaceStatus == 1 && x.materialType == null && x.storeCode == store && x.spaceCapacity != x.spaceStock && x.inStoreFlag==1);
spaceInfos = _mesRepository.GetList(exp); spaceInfos = _mesRepository.GetList(exp);
} }
catch (Exception ex) catch (Exception ex)
@ -113,7 +113,7 @@ namespace HighWayIot.Repository.service.Impl
try try
{ {
Expression<Func<BaseSpaceInfo, bool>> exp = s1 => true; Expression<Func<BaseSpaceInfo, bool>> exp = s1 => true;
exp = exp.And(x => x.storeCode == store && x.materialType == materialType && x.spaceStatus == 1); //相同型号、启用状态、库存不为空的货道信息 exp = exp.And(x => x.storeCode == store && x.materialType == materialType && x.spaceStatus == 1 && x.outStoreFlag == 1); //相同型号、启用状态、库存不为空的货道信息
spaceInfos = _mesRepository.GetList(exp); spaceInfos = _mesRepository.GetList(exp);
@ -312,7 +312,7 @@ namespace HighWayIot.Repository.service.Impl
try try
{ {
Expression<Func<BaseSpaceInfo, bool>> exp = s1 => true; Expression<Func<BaseSpaceInfo, bool>> exp = s1 => true;
exp = exp.And(x => x.storeCode == storeCode && x.materialType == materialType && x.spaceStatus == 1); //相同型号、启用状态的货道信息 exp = exp.And(x => x.storeCode == storeCode && x.materialType == materialType && x.spaceStatus == 1 && x.inStoreFlag==1); //相同型号、启用状态的货道信息
spaceInfos = _mesRepository.GetList(exp); spaceInfos = _mesRepository.GetList(exp);

Loading…
Cancel
Save