diff --git a/MaterialTraceability.Business/Impl/ABSignalReadBusiness.cs b/MaterialTraceability.Business/Impl/ABSignalReadBusiness.cs index 3a97e7d..feed191 100644 --- a/MaterialTraceability.Business/Impl/ABSignalReadBusiness.cs +++ b/MaterialTraceability.Business/Impl/ABSignalReadBusiness.cs @@ -429,7 +429,7 @@ namespace MaterialTraceability.Business.Impl } downRecord.eaValue = (int)float.Parse(upMaterialEaValue); LogRefreshEvent?.Invoke(LogType.RfidLog, "收卷位物料EA:" + upMaterialEaValue); - if (!SpiltAccount(position, shaftInfo, downRecord.eaValue, shaftInfo.bindSfc, new ProUpRecord(), downRecord).Result) + if (!SpiltAccount(position, shaftInfo, upMaterialEaValue, shaftInfo.bindSfc, new ProUpRecord(), downRecord).Result) { LogHelper.Info(logStr + "完工MES账目数量异常"); @@ -599,7 +599,7 @@ namespace MaterialTraceability.Business.Impl /// /// /// - private async Task SpiltAccount(int position, ProShaftInfo shaftInfos, int eaValue, string upMaterialSfc, ProUpRecord upRecord, ProDownRecord downRecord) + private async Task SpiltAccount(int position, ProShaftInfo shaftInfos, string eaValue, string upMaterialSfc, ProUpRecord upRecord, ProDownRecord downRecord) { LogHelper.Info("自动完工MES账目数量"); LogRefreshEvent?.Invoke(LogType.MesLog, "自动完工MES账目数量:" + eaValue); diff --git a/MaterialTraceability.Business/PlcBusiness.cs b/MaterialTraceability.Business/PlcBusiness.cs index 0c9ce68..2b00fe0 100644 --- a/MaterialTraceability.Business/PlcBusiness.cs +++ b/MaterialTraceability.Business/PlcBusiness.cs @@ -215,13 +215,10 @@ namespace MaterialTraceability.Business //收卷结束信号-1A气胀轴 if (plcInstance.readInt32ByAddress(appConfig.AbAddress.收卷结束) == 1) { - lock (string.Empty) + if (isReadFlag(ref AB_lastReadTime_SJEndSinal)) { - if (isReadFlag(ref AB_lastReadTime_SJEndSinal)) - { - plcInstance.writeInt32ByAddress(appConfig.AbAddress.收卷结束, 0); - SignalRefreshEvent?.Invoke(4, 1); - } + plcInstance.writeInt32ByAddress(appConfig.AbAddress.收卷结束, 0); + SignalRefreshEvent?.Invoke(4, 1); } }