diff --git a/.vs/HighWayIot/FileContentIndex/17de28fa-015e-4810-8d58-e393b2c013e2.vsidx b/.vs/HighWayIot/FileContentIndex/17de28fa-015e-4810-8d58-e393b2c013e2.vsidx
new file mode 100644
index 00000000..9e58693d
Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/17de28fa-015e-4810-8d58-e393b2c013e2.vsidx differ
diff --git a/.vs/HighWayIot/FileContentIndex/26aa9716-b906-4888-806d-1aee0dca78ee.vsidx b/.vs/HighWayIot/FileContentIndex/26aa9716-b906-4888-806d-1aee0dca78ee.vsidx
new file mode 100644
index 00000000..8ef4456f
Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/26aa9716-b906-4888-806d-1aee0dca78ee.vsidx differ
diff --git a/.vs/HighWayIot/FileContentIndex/2caf5a08-aa74-4c8b-8551-ecd396f479c1.vsidx b/.vs/HighWayIot/FileContentIndex/2caf5a08-aa74-4c8b-8551-ecd396f479c1.vsidx
new file mode 100644
index 00000000..1627775a
Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/2caf5a08-aa74-4c8b-8551-ecd396f479c1.vsidx differ
diff --git a/.vs/HighWayIot/FileContentIndex/34c4c832-e753-4203-a19f-a62d8df06c14.vsidx b/.vs/HighWayIot/FileContentIndex/34c4c832-e753-4203-a19f-a62d8df06c14.vsidx
new file mode 100644
index 00000000..17bc5c4a
Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/34c4c832-e753-4203-a19f-a62d8df06c14.vsidx differ
diff --git a/.vs/HighWayIot/FileContentIndex/5d8a8ad9-3407-4939-b171-8987e8b0f5d1.vsidx b/.vs/HighWayIot/FileContentIndex/5d8a8ad9-3407-4939-b171-8987e8b0f5d1.vsidx
new file mode 100644
index 00000000..5955399f
Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/5d8a8ad9-3407-4939-b171-8987e8b0f5d1.vsidx differ
diff --git a/.vs/HighWayIot/FileContentIndex/a9888a2f-28f2-468b-9466-f325ce4fc38e.vsidx b/.vs/HighWayIot/FileContentIndex/a9888a2f-28f2-468b-9466-f325ce4fc38e.vsidx
new file mode 100644
index 00000000..62317e1f
Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/a9888a2f-28f2-468b-9466-f325ce4fc38e.vsidx differ
diff --git a/.vs/HighWayIot/v17/.suo b/.vs/HighWayIot/v17/.suo
index 6c1af1dc..d3c81287 100644
Binary files a/.vs/HighWayIot/v17/.suo and b/.vs/HighWayIot/v17/.suo differ
diff --git a/Aucma.Scada.Business/InStoreBusiness.cs b/Aucma.Scada.Business/InStoreBusiness.cs
index 1f99b6c5..4b531e6f 100644
--- a/Aucma.Scada.Business/InStoreBusiness.cs
+++ b/Aucma.Scada.Business/InStoreBusiness.cs
@@ -121,7 +121,10 @@ namespace Aucma.Scada.Business
{
PrintLogInfoMessage($"扫码成功,物料码:{materialCode}");
string materialType = SubStringMaterialCode(materialCode);
- var spaceInfo = _spaceInfoService.InStoreGetSpaceInfoByMaterialType(appConfig.foamStoreCode, materialType);
+ #region Delete By wenjy 2023-10-30 11:41:00 取消通过数据库获取货道数量、在途量,改为通过PLC获取货道信息
+ //var spaceInfo = _spaceInfoService.InStoreGetSpaceInfoByMaterialType(appConfig.foamStoreCode, materialType);
+ #endregion
+ var spaceInfo = GetSpaceInfoByMaterialType(appConfig.foamStoreCode, materialType);
if (spaceInfo != null)
{
PrintLogInfoMessage($"匹配货道:{spaceInfo.spaceName}");
@@ -129,7 +132,8 @@ namespace Aucma.Scada.Business
var result = CreateInStoreTask(spaceInfo, materialCode); //创建入库任务
if (result)
{
- spaceInfo.onRouteAmount += 1;
+ //spaceInfo.onRouteAmount += 1; //通过PLC获取货道信息(在库、在途数量)时不需要修改在途数量
+
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
}
}
@@ -308,11 +312,18 @@ namespace Aucma.Scada.Business
if (spaceInfo != null)
{
- //读取PLC获取货道信息:存放数量、在途数量
- //实际应用改为读取PLC库存信息
spaceInfo.materialType = taskInfo.materialType;
spaceInfo.spaceStock = spaceInfo.spaceStock + 1;
spaceInfo.onRouteAmount -= 1;
+
+ //读取PLC获取货道信息:存放数量、在途数量,
+ #region Add By wenjy 2023-10-30 13:44:00 通过PLC获取货道信息
+ var item = taskHandle.ReadSpaceInfoByPlc(spaceInfo);
+ spaceInfo.spaceStock = item.spaceStock;
+ spaceInfo.onRouteAmount = item.onRouteAmount;
+ spaceInfo.spaceStatus = item.spaceStatus;
+ #endregion
+
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
#region 添加货道明细
BaseSpaceDetail spaceDetail = new BaseSpaceDetail();
@@ -431,5 +442,43 @@ namespace Aucma.Scada.Business
return groups;
}
+
+ /// 通过PLC读取货道信息(在途数量、在库数量、货道状态)
+ ///
+ ///
+ ///
+ ///
+ private BaseSpaceInfo GetSpaceInfoByMaterialType(string storeCode, string materialType)
+ {
+ BaseSpaceInfo result = null;
+
+ try
+ {
+ List info = _spaceInfoService.GetBaseSpaceInfosByMaterialType(storeCode, materialType);
+
+ if (info != null)
+ {
+ if (info.Count > 0)
+ {
+ foreach (BaseSpaceInfo item in info)
+ {
+ var spaceInfo = taskHandle.ReadSpaceInfoByPlc(item);
+ item.spaceStock = spaceInfo.spaceStock;
+ item.onRouteAmount = spaceInfo.onRouteAmount;
+ item.spaceStatus = spaceInfo.spaceStatus;
+ }
+
+ result = info.Where(x => x.spaceStatus == 1 && x.spaceStock > 0 ? x.spaceCapacity > (x.spaceStock + x.onRouteAmount) : 1 == 1).OrderByDescending(x => x.spaceStock).OrderBy(x => x.spaceCode).First();
+
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ PrintLogErrorMessage("货道信息读取异常", ex);
+ }
+
+ return result;
+ }
}
}
diff --git a/Aucma.Scada.Business/InStoreTaskHandle.cs b/Aucma.Scada.Business/InStoreTaskHandle.cs
index 21325bea..ada84b6a 100644
--- a/Aucma.Scada.Business/InStoreTaskHandle.cs
+++ b/Aucma.Scada.Business/InStoreTaskHandle.cs
@@ -33,6 +33,8 @@ namespace Aucma.Scada.Business
private PlcConfig plcConfig = PlcConfig.Instance;
private PlcPool _pool = PlcPool.Instance;
+
+ private PlcSpaceConfig spaceConfig = PlcSpaceConfig.Instance;
#endregion
#region 私有变量
@@ -208,5 +210,28 @@ namespace Aucma.Scada.Business
}
}
#endregion
+
+ ///
+ /// 通过PLC获取货道信息
+ ///
+ ///
+ ///
+ public BaseSpaceInfo ReadSpaceInfoByPlc(BaseSpaceInfo spaceInfo)
+ {
+ var spaceAddress = spaceConfig.GetSpaceAddress(spaceInfo.storeCode, spaceInfo.spaceCode);
+ IPlc _plc = _plcDictionary[spaceInfo.storeCode];
+
+ if (_plc != null)
+ {
+ if (_plc.IsConnected)
+ {
+ spaceInfo.spaceStock = _plc.readInt32ByAddress(spaceAddress.onStore);
+ spaceInfo.onRouteAmount = _plc.readInt32ByAddress(spaceAddress.onRoute);
+ spaceInfo.spaceStatus = _plc.readInt32ByAddress(spaceAddress.spaceStatus);
+ }
+ }
+
+ return spaceInfo;
+ }
}
}
diff --git a/Aucma.Scada.Business/OutStoreBusiness.cs b/Aucma.Scada.Business/OutStoreBusiness.cs
index 81e1cc34..6c5786f1 100644
--- a/Aucma.Scada.Business/OutStoreBusiness.cs
+++ b/Aucma.Scada.Business/OutStoreBusiness.cs
@@ -151,7 +151,10 @@ namespace Aucma.Scada.Business
try
{
PrintLogInfoMessage($"收到出库计划,物料码:{bomInfo.materialCode}");
- BaseSpaceInfo spaceInfo = _spaceInfoService.OutStoreGetSpaceInfoByMaterialCode(storeCode, bomInfo.materialCode);
+ #region Delete By wenjy 2023-10-30 11:41:00 取消通过数据库获取货道数量、在途量,改为通过PLC获取货道信息
+ //BaseSpaceInfo spaceInfo = _spaceInfoService.OutStoreGetSpaceInfoByMaterialCode(storeCode, bomInfo.materialCode);
+ #endregion
+ BaseSpaceInfo spaceInfo = GetSpaceInfoByMaterialType(storeCode, bomInfo.materialCode);
if (spaceInfo != null)
{
PrintLogInfoMessage($"匹配货道:{spaceInfo.spaceName}");
@@ -446,9 +449,16 @@ namespace Aucma.Scada.Business
if (spaceInfo != null)
{
//读取PLC获取货道信息:存放数量、在途数量
- //spaceInfo.materialType = taskInfo.materialType;
spaceInfo.spaceStock -= 1;
spaceInfo.outRouteAmount -= 1;
+
+ #region Add By wenjy 2023-10-30 13:44:00 通过PLC获取货道信息
+ var item = taskHandleBusiness.ReadSpaceInfoByPlc(spaceInfo);
+ spaceInfo.spaceStock = item.spaceStock;
+ spaceInfo.onRouteAmount = item.onRouteAmount;
+ spaceInfo.spaceStatus = item.spaceStatus;
+ #endregion
+
if (spaceInfo.spaceStock == 0)
{
spaceInfo.materialType = string.Empty;
@@ -663,5 +673,43 @@ namespace Aucma.Scada.Business
return materialName;
}
+
+ /// 通过PLC读取货道信息(在库数量、货道状态)
+ ///
+ ///
+ ///
+ ///
+ private BaseSpaceInfo GetSpaceInfoByMaterialType(string storeCode, string materialType)
+ {
+ BaseSpaceInfo result = null;
+
+ try
+ {
+ List info = _spaceInfoService.GetBaseSpaceInfosByMaterialType(storeCode, materialType);
+
+ if (info != null)
+ {
+ if (info.Count > 0)
+ {
+ foreach (BaseSpaceInfo item in info)
+ {
+ var spaceInfo = taskHandleBusiness.ReadSpaceInfoByPlc(item);
+ item.spaceStock = spaceInfo.spaceStock;
+ item.onRouteAmount = spaceInfo.onRouteAmount;
+ item.spaceStatus = spaceInfo.spaceStatus;
+ }
+
+ result = info.Where(x => x.spaceStatus == 1 && x.spaceStock > 0).OrderBy(x => x.spaceStock).OrderBy(x => x.spaceCode).First();
+
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ PrintLogErrorMessage("货道信息读取异常", ex);
+ }
+
+ return result;
+ }
}
}
diff --git a/Aucma.Scada.Business/OutStoreTaskHandle.cs b/Aucma.Scada.Business/OutStoreTaskHandle.cs
index beb9d8c4..e2e46a50 100644
--- a/Aucma.Scada.Business/OutStoreTaskHandle.cs
+++ b/Aucma.Scada.Business/OutStoreTaskHandle.cs
@@ -34,6 +34,8 @@ namespace Aucma.Scada.Business
private PlcConfig plcConfig = PlcConfig.Instance;
private PlcPool _pool = PlcPool.Instance;
+
+ private PlcSpaceConfig spaceConfig = PlcSpaceConfig.Instance;
#endregion
#region 私有变量
@@ -227,5 +229,27 @@ namespace Aucma.Scada.Business
}
#endregion
+ ///
+ /// 通过PLC获取货道信息
+ ///
+ ///
+ ///
+ public BaseSpaceInfo ReadSpaceInfoByPlc(BaseSpaceInfo spaceInfo)
+ {
+ var spaceAddress = spaceConfig.GetSpaceAddress(spaceInfo.storeCode, spaceInfo.spaceCode);
+ IPlc _plc = _plcDictionary[spaceInfo.storeCode];
+
+ if (_plc != null)
+ {
+ if (_plc.IsConnected)
+ {
+ spaceInfo.spaceStock = _plc.readInt32ByAddress(spaceAddress.onStore);
+ spaceInfo.onRouteAmount = _plc.readInt32ByAddress(spaceAddress.onRoute);
+ spaceInfo.spaceStatus = _plc.readInt32ByAddress(spaceAddress.spaceStatus);
+ }
+ }
+
+ return spaceInfo;
+ }
}
}
diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll
index b920c6ad..cd8767e9 100644
Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll differ
diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb
index 338797c5..07b1f636 100644
Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb differ
diff --git a/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.dll b/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.dll
index 0be42e37..432dae39 100644
Binary files a/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.dll and b/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.dll differ
diff --git a/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.pdb b/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.pdb
index 37a565da..28925a36 100644
Binary files a/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.pdb and b/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.pdb differ
diff --git a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll
index 3ac60bb0..8c42f466 100644
Binary files a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll and b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll differ
diff --git a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb
index 16edfc0e..2b775bae 100644
Binary files a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb and b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb differ
diff --git a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache
index ecb74ffa..e2b37e8d 100644
Binary files a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache and b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache differ
diff --git a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll
index b920c6ad..cd8767e9 100644
Binary files a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll differ
diff --git a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb
index 338797c5..07b1f636 100644
Binary files a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb differ
diff --git a/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.dll b/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.dll
index 0be42e37..432dae39 100644
Binary files a/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.dll and b/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.dll differ
diff --git a/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.pdb b/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.pdb
index 37a565da..28925a36 100644
Binary files a/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.pdb and b/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.pdb differ
diff --git a/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache b/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache
index 36e61ffc..5d199770 100644
Binary files a/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache and b/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache differ
diff --git a/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.csproj.AssemblyReference.cache b/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.csproj.AssemblyReference.cache
index 75f86db8..93ef7053 100644
Binary files a/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.csproj.AssemblyReference.cache and b/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.csproj.AssemblyReference.cache differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll
index b920c6ad..cd8767e9 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb
index 338797c5..07b1f636 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe
index 1c4dc5cd..3499a398 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb
index 11d2cc60..88d7fb3e 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.dll b/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.dll
index 0be42e37..432dae39 100644
Binary files a/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.dll and b/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.dll differ
diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.pdb b/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.pdb
index 37a565da..28925a36 100644
Binary files a/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.pdb and b/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll
index 3ac60bb0..8c42f466 100644
Binary files a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll and b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll differ
diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb
index 16edfc0e..2b775bae 100644
Binary files a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb and b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/config/PlcSpace.Ini b/Aucma.Scada.UI/bin/Debug/config/PlcSpace.Ini
new file mode 100644
index 00000000..7b54d9a5
--- /dev/null
+++ b/Aucma.Scada.UI/bin/Debug/config/PlcSpace.Ini
@@ -0,0 +1,43 @@
+#ݺϢ
+[FPJCK-001_PH_001]
+ڿ=D7201
+;=D7211
+Ƿ=D7221
+״̬=D7231
+ֿ״̬=D7300 #豸״̬,0δ״̬,1Զ,2ά״̬,ֹ
+=D7240
+[FPJCK-001_PH_002]
+ڿ=D7202
+;=D7212
+Ƿ=D7222
+״̬=D7232
+ֿ״̬=D7300 #豸״̬,0δ״̬,1Զ,2ά״̬,ֹ
+=D7240
+[FPJCK-001_PH_003]
+ڿ=D7203
+;=D7213
+Ƿ=D7223
+״̬=D7233
+ֿ״̬=D7300 #豸״̬,0δ״̬,1Զ,2ά״̬,ֹ
+=D7240
+[FPJCK-001_PH_004]
+ڿ=D7204
+;=D7214
+Ƿ=D7224
+״̬=D7234
+ֿ״̬=D7300 #豸״̬,0δ״̬,1Զ,2ά״̬,ֹ
+=D7240
+[FPJCK-001_PH_005]
+ڿ=D7205
+;=D7215
+Ƿ=D7225
+״̬=D7235
+ֿ״̬=D7300 #豸״̬,0δ״̬,1Զ,2ά״̬,ֹ
+=D7240
+[FPJCK-001_PH_006]
+ڿ=D7206
+;=D7216
+Ƿ=D7226
+״̬=D7236
+ֿ״̬=D7300 #豸״̬,0δ״̬,1Զ,2ά״̬,ֹ
+=D7240
\ No newline at end of file
diff --git a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache
index ca75059e..c8bfaa0c 100644
Binary files a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache and b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache differ
diff --git a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe
index 1c4dc5cd..3499a398 100644
Binary files a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe and b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe differ
diff --git a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb
index 11d2cc60..88d7fb3e 100644
Binary files a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb and b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb differ
diff --git a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI_MarkupCompile.lref b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI_MarkupCompile.lref
index f3caf620..46f22ffa 100644
--- a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI_MarkupCompile.lref
+++ b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI_MarkupCompile.lref
@@ -1,4 +1,4 @@
-
+E:\桌面\澳柯玛MES项目\程序设计\Aucma.Scada\Aucma.Scada.UI\obj\Debug\GeneratedInternalTypeHelper.g.cs
FE:\桌面\澳柯玛MES项目\程序设计\Aucma.Scada\Aucma.Scada.UI\App.xaml;;
FE:\桌面\澳柯玛MES项目\程序设计\Aucma.Scada\Aucma.Scada.UI\Page\AssemblyPlan\AssemblyPlanControl.xaml;;
FE:\桌面\澳柯玛MES项目\程序设计\Aucma.Scada\Aucma.Scada.UI\Page\AssemblyPlan\PlanInfoEditWindow.xaml;;
diff --git a/Aucma.Scada.UI/obj/Debug/GeneratedInternalTypeHelper.g.cs b/Aucma.Scada.UI/obj/Debug/GeneratedInternalTypeHelper.g.cs
index ffa4e1ed..c65238fb 100644
--- a/Aucma.Scada.UI/obj/Debug/GeneratedInternalTypeHelper.g.cs
+++ b/Aucma.Scada.UI/obj/Debug/GeneratedInternalTypeHelper.g.cs
@@ -1,62 +1,2 @@
-//------------------------------------------------------------------------------
-//
-// 此代码由工具生成。
-// 运行时版本:4.0.30319.42000
-//
-// 对此文件的更改可能会导致不正确的行为,并且如果
-// 重新生成代码,这些更改将会丢失。
-//
-//------------------------------------------------------------------------------
-
-namespace XamlGeneratedNamespace {
-
-
- ///
- /// GeneratedInternalTypeHelper
- ///
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
-
- ///
- /// CreateInstance
- ///
- protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
- return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
- | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
- }
-
- ///
- /// GetPropertyValue
- ///
- protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
- return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
- }
-
- ///
- /// SetPropertyValue
- ///
- protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
- propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
- }
-
- ///
- /// CreateDelegate
- ///
- protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
- return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
- | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
- delegateType,
- handler}, null)));
- }
-
- ///
- /// AddEventHandler
- ///
- protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
- eventInfo.AddEventHandler(target, handler);
- }
- }
-}
+
diff --git a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache
index 204989f1..a31c7f82 100644
Binary files a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache and b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Config/HighWayIot.Config.csproj b/HighWayIot.Config/HighWayIot.Config.csproj
index 499c6aff..38cf5a9b 100644
--- a/HighWayIot.Config/HighWayIot.Config.csproj
+++ b/HighWayIot.Config/HighWayIot.Config.csproj
@@ -43,6 +43,7 @@
+
diff --git a/HighWayIot.Config/PlcSpaceConfig.cs b/HighWayIot.Config/PlcSpaceConfig.cs
new file mode 100644
index 00000000..e181e886
--- /dev/null
+++ b/HighWayIot.Config/PlcSpaceConfig.cs
@@ -0,0 +1,61 @@
+using HighWayIot.Common;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HighWayIot.Config
+{
+ public sealed class PlcSpaceConfig
+ {
+ private static IniHelper iniHelper = new IniHelper(System.Environment.CurrentDirectory + "/config/PlcSpace.Ini");
+
+
+ private static readonly Lazy lazy = new Lazy(() => new PlcSpaceConfig());
+ public static PlcSpaceConfig Instance
+ {
+ get
+ {
+ return lazy.Value;
+ }
+ }
+
+ private PlcSpaceConfig()
+ {
+
+ }
+
+
+ public SpaceAddress GetSpaceAddress(string storeCode,string spaceCode)
+ {
+ SpaceAddress spaceAddress = new SpaceAddress();
+ spaceAddress.onStore = iniHelper.IniReadValue($"{storeCode}_{spaceCode}", "在库数量");
+ spaceAddress.onRoute = iniHelper.IniReadValue($"{storeCode}_{spaceCode}", "在途数量");
+ spaceAddress.isFull = iniHelper.IniReadValue($"{storeCode}_{spaceCode}", "是否已满");
+ spaceAddress.spaceStatus = iniHelper.IniReadValue($"{storeCode}_{spaceCode}", "货道状态");
+ spaceAddress.storeStatus = iniHelper.IniReadValue($"{storeCode}_{spaceCode}", "仓库状态");
+ spaceAddress.alarmInfo = iniHelper.IniReadValue($"{storeCode}_{spaceCode}", "报警信息");
+ spaceAddress.outStoreFinish = iniHelper.IniReadValue($"{storeCode}_{spaceCode}", "出库完成");
+ return spaceAddress;
+ }
+ }
+
+ public class SpaceAddress
+ {
+ public string onStore { get; set; }
+
+ public string onRoute { get; set; }
+
+ public string isFull { get; set; }
+
+ public string spaceStatus { get; set; }
+
+ public string storeStatus { get; set; }
+
+ public string alarmInfo { get; set; }
+
+ public string outStoreFinish { get; set; }
+ }
+
+}
diff --git a/HighWayIot.Config/bin/Debug/HighWayIot.Config.dll b/HighWayIot.Config/bin/Debug/HighWayIot.Config.dll
index 0be42e37..432dae39 100644
Binary files a/HighWayIot.Config/bin/Debug/HighWayIot.Config.dll and b/HighWayIot.Config/bin/Debug/HighWayIot.Config.dll differ
diff --git a/HighWayIot.Config/bin/Debug/HighWayIot.Config.pdb b/HighWayIot.Config/bin/Debug/HighWayIot.Config.pdb
index 37a565da..28925a36 100644
Binary files a/HighWayIot.Config/bin/Debug/HighWayIot.Config.pdb and b/HighWayIot.Config/bin/Debug/HighWayIot.Config.pdb differ
diff --git a/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache b/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache
index 8d0c468b..298f556e 100644
Binary files a/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache and b/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.CoreCompileInputs.cache b/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.CoreCompileInputs.cache
index 7ec6a2df..60a1cb29 100644
--- a/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.CoreCompileInputs.cache
+++ b/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-498314701cc69a2bb9a908cd676c2b8fb46f08d1
+2e5578ef355ebd86a51e35872287d736e1b032e2
diff --git a/HighWayIot.Config/obj/Debug/HighWayIot.Config.dll b/HighWayIot.Config/obj/Debug/HighWayIot.Config.dll
index 0be42e37..432dae39 100644
Binary files a/HighWayIot.Config/obj/Debug/HighWayIot.Config.dll and b/HighWayIot.Config/obj/Debug/HighWayIot.Config.dll differ
diff --git a/HighWayIot.Config/obj/Debug/HighWayIot.Config.pdb b/HighWayIot.Config/obj/Debug/HighWayIot.Config.pdb
index 37a565da..28925a36 100644
Binary files a/HighWayIot.Config/obj/Debug/HighWayIot.Config.pdb and b/HighWayIot.Config/obj/Debug/HighWayIot.Config.pdb differ
diff --git a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache
index ff1da08c..1506125e 100644
Binary files a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache and b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Config.dll b/HighWayIot.Repository/bin/Debug/HighWayIot.Config.dll
index 0be42e37..432dae39 100644
Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Config.dll and b/HighWayIot.Repository/bin/Debug/HighWayIot.Config.dll differ
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Config.pdb b/HighWayIot.Repository/bin/Debug/HighWayIot.Config.pdb
index 37a565da..28925a36 100644
Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Config.pdb and b/HighWayIot.Repository/bin/Debug/HighWayIot.Config.pdb differ
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll
index 3ac60bb0..8c42f466 100644
Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll and b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll differ
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb
index 16edfc0e..2b775bae 100644
Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb and b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb differ
diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache
index 70de878a..444373f3 100644
Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll
index 3ac60bb0..8c42f466 100644
Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll differ
diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb
index 16edfc0e..2b775bae 100644
Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb differ
diff --git a/HighWayIot.Repository/service/IBaseSpaceInfoService.cs b/HighWayIot.Repository/service/IBaseSpaceInfoService.cs
index 07e634dd..98d2eaf3 100644
--- a/HighWayIot.Repository/service/IBaseSpaceInfoService.cs
+++ b/HighWayIot.Repository/service/IBaseSpaceInfoService.cs
@@ -39,6 +39,14 @@ namespace HighWayIot.Repository.service
///
List GetSpaceInfosByStoreCode(string storeCode);
+ ///
+ /// 通过物料类型获取货道信息,如果没有返回空白货道
+ ///
+ ///
+ ///
+ ///
+ List GetBaseSpaceInfosByMaterialType(string storeCode, string materialType);
+
///
/// 更新货道信息
///
diff --git a/HighWayIot.Repository/service/Impl/BaseSpaceInfoServiceImpl.cs b/HighWayIot.Repository/service/Impl/BaseSpaceInfoServiceImpl.cs
index 1b0a56c6..d7d2e8c3 100644
--- a/HighWayIot.Repository/service/Impl/BaseSpaceInfoServiceImpl.cs
+++ b/HighWayIot.Repository/service/Impl/BaseSpaceInfoServiceImpl.cs
@@ -202,5 +202,28 @@ namespace HighWayIot.Repository.service.Impl
}
return result;
}
+
+ public List GetBaseSpaceInfosByMaterialType(string storeCode, string materialType)
+ {
+ List spaceInfos = null;
+ try
+ {
+ Expression> exp = s1 => true;
+ exp = exp.And(x => x.storeCode == storeCode && x.materialType == materialType && x.spaceStatus == 1); //相同型号、启用状态的货道信息
+
+ spaceInfos = _mesRepository.GetList(exp);
+
+ if (spaceInfos.Count == 0) //没有指定该类型物料的货道信息,需获取空白货道信息进行分配
+ {
+ spaceInfos = GetEmptySpaceInfo(storeCode);
+ }
+ logHelper.Info($"根据仓库{storeCode};物料:{materialType};获取到的货道信息:{jsonChange.ModeToJson(spaceInfos)}");
+ }
+ catch (Exception ex)
+ {
+ logHelper.Error("获取货道信息异常", ex);
+ }
+ return spaceInfos;
+ }
}
}
\ No newline at end of file
diff --git a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache
index c6fd48d0..1d5c2f3d 100644
Binary files a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache and b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.AssemblyReference.cache b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.AssemblyReference.cache
index 65becccd..fcbe9182 100644
Binary files a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.AssemblyReference.cache and b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot/bin/Debug/Aucma.Scada.Model.dll b/HighWayIot/bin/Debug/Aucma.Scada.Model.dll
index 4f693d27..2f957627 100644
Binary files a/HighWayIot/bin/Debug/Aucma.Scada.Model.dll and b/HighWayIot/bin/Debug/Aucma.Scada.Model.dll differ
diff --git a/HighWayIot/bin/Debug/Aucma.Scada.Model.pdb b/HighWayIot/bin/Debug/Aucma.Scada.Model.pdb
index e09621d8..a78b0534 100644
Binary files a/HighWayIot/bin/Debug/Aucma.Scada.Model.pdb and b/HighWayIot/bin/Debug/Aucma.Scada.Model.pdb differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.Config.dll b/HighWayIot/bin/Debug/HighWayIot.Config.dll
index 0be42e37..432dae39 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.Config.dll and b/HighWayIot/bin/Debug/HighWayIot.Config.dll differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.Config.pdb b/HighWayIot/bin/Debug/HighWayIot.Config.pdb
index 37a565da..28925a36 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.Config.pdb and b/HighWayIot/bin/Debug/HighWayIot.Config.pdb differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.Repository.dll b/HighWayIot/bin/Debug/HighWayIot.Repository.dll
index 267dc612..8c42f466 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.Repository.dll and b/HighWayIot/bin/Debug/HighWayIot.Repository.dll differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.Repository.pdb b/HighWayIot/bin/Debug/HighWayIot.Repository.pdb
index 8ce7abc7..2b775bae 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.Repository.pdb and b/HighWayIot/bin/Debug/HighWayIot.Repository.pdb differ
diff --git a/HighWayIot/bin/Debug/config/Plc.Ini b/HighWayIot/bin/Debug/config/Plc.Ini
new file mode 100644
index 00000000..e5efac98
--- /dev/null
+++ b/HighWayIot/bin/Debug/config/Plc.Ini
@@ -0,0 +1,31 @@
+[plcSystem]
+PLCIP=127.0.0.1
+PLC˿=6000
+ڵPLCIP=127.0.0.1
+ڵPLC˿=6000
+#ַ
+[shell_inStore_address]
+=D101
+Ӧ=D103
+=D104
+=D105
+#ڵַ
+[liner_inStore_address]
+=D201
+Ӧ=D203
+=D204
+=D205
+#dzַ
+[shell_outStore_address]
+=M101
+=M102
+Ӧ=M103
+=M104
+=M105
+#ڵַ
+[liner_outStore_address]
+=M201
+=M202
+Ӧ=M203
+=M204
+=M205
diff --git a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache
index 835e29a1..f40804d0 100644
Binary files a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache and b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache differ