From 171ee7068e480ffe07638d030223790fb81fae81 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周二, 10 12月 2024 15:31:51 +0800 Subject: [PATCH] 2 --- CC/iWareModel/iWareModel.csproj | 1 + CC/iWareCC_ASRS/Handler/DeviceWarningHandler.cs | 8 ++++++-- CC/iWareCC_ASRS/FormCC.cs | 2 +- SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs | 1 + CC/iWareModel/EnumType/WMS/DeviceWarningTypeEnum.cs | 44 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 3 deletions(-) diff --git a/CC/iWareCC_ASRS/FormCC.cs b/CC/iWareCC_ASRS/FormCC.cs index 4206456..7795b03 100644 --- a/CC/iWareCC_ASRS/FormCC.cs +++ b/CC/iWareCC_ASRS/FormCC.cs @@ -612,7 +612,7 @@ { while (true) { - Thread.Sleep(1000);//1绉掗挓璇诲彇涓�娆� + Thread.Sleep(2000);//1绉掗挓璇诲彇涓�娆� try { if (stationServiceClient == null) diff --git a/CC/iWareCC_ASRS/Handler/DeviceWarningHandler.cs b/CC/iWareCC_ASRS/Handler/DeviceWarningHandler.cs index b100a0d..774a7be 100644 --- a/CC/iWareCC_ASRS/Handler/DeviceWarningHandler.cs +++ b/CC/iWareCC_ASRS/Handler/DeviceWarningHandler.cs @@ -1,4 +1,5 @@ -锘縰sing iWareCommon.Common.Globle; +锘縰sing Admin.NET.Application; +using iWareCommon.Common.Globle; using iWareCommon.Utils; using iWareModel; using iWareSql.WmsDBModel; @@ -27,7 +28,10 @@ { using (WmsDBModel edm = new WmsDBModel()) { - dbList = edm.wms_config_device_warning.ToList(); + //娉ㄦ剰锛氬彧鏌ヨ 瀹夊叏鎶ヨ銆佺‖浠舵姤璀︿俊鎭� + var query1 = (int)DeviceWarningTypeEnum.瀹夊叏鎶ヨ; + var query2 = (int)DeviceWarningTypeEnum.纭欢鎶ヨ; + dbList = edm.wms_config_device_warning.Where(x => x.DeviceWarningType == query1 || x.DeviceWarningType == query2).ToList(); } foreach (var item in dbList) { diff --git a/CC/iWareModel/EnumType/WMS/DeviceWarningTypeEnum.cs b/CC/iWareModel/EnumType/WMS/DeviceWarningTypeEnum.cs new file mode 100644 index 0000000..b546e3d --- /dev/null +++ b/CC/iWareModel/EnumType/WMS/DeviceWarningTypeEnum.cs @@ -0,0 +1,44 @@ +锘� + +using System.ComponentModel; + +namespace Admin.NET.Application +{ + + /// <summary> + /// 璁惧鎶ヨ绫诲瀷鏋氫妇 + /// </summary> + [Description("璁惧鎶ヨ绫诲瀷鏋氫妇")] + public enum DeviceWarningTypeEnum + { + /// <summary> + /// 瀹夊叏鎶ヨ + /// </summary> + [Description("瀹夊叏鎶ヨ")] + 瀹夊叏鎶ヨ = 0, + + /// <summary> + /// 纭欢鎶ヨ + /// </summary> + [Description("纭欢鎶ヨ")] + 纭欢鎶ヨ = 2, + + /// <summary> + /// 瓒呮椂鎶ヨ + /// </summary> + [Description("瓒呮椂鎶ヨ")] + 瓒呮椂鎶ヨ = 3, + + /// <summary> + /// 璀﹀憡淇℃伅 + /// </summary> + [Description("璀﹀憡淇℃伅")] + 璀﹀憡淇℃伅 = 4, + + /// <summary> + /// 鎿嶄綔鎻愮ず + /// </summary> + [Description("鎿嶄綔鎻愮ず")] + 鎿嶄綔鎻愮ず = 5, + } +} \ No newline at end of file diff --git a/CC/iWareModel/iWareModel.csproj b/CC/iWareModel/iWareModel.csproj index c54b2dd..1965c43 100644 --- a/CC/iWareModel/iWareModel.csproj +++ b/CC/iWareModel/iWareModel.csproj @@ -113,6 +113,7 @@ <Compile Include="EnumType\TaskExcuteTypeEnum.cs" /> <Compile Include="EnumType\ThreadDirectionEnum.cs" /> <Compile Include="EnumType\WMS\AreaCodeEnum.cs" /> + <Compile Include="EnumType\WMS\DeviceWarningTypeEnum.cs" /> <Compile Include="EnumType\WMS\PrintClassifyEnum.cs" /> <Compile Include="EnumType\WMS\PrintTypeEnum.cs" /> <Compile Include="EnumType\WMS\PushStatusEnum.cs" /> diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs index 8b0141d..2518eb5 100644 --- a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs +++ b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs @@ -1274,6 +1274,7 @@ //Context = item.WarningContent.Trim(), }); } + Thread.Sleep(100); } } catch (Exception ex) -- Gitblit v1.9.3