1
czw
2025-07-02 cce7e880813a457cfcdca3f3fc8cad3c99ebfb69
HH.WCS.QingXiNongfu/process/DeviceProcess.cs
@@ -312,7 +312,7 @@
                    si = "0";
                }
                else if (data.Contains("11"))// && (ods.Find(x => x.SQL_PLineNo.Contains("纸箱")) != null || plc.deviceName.Contains("T1"))
                if (data.Contains("11"))// && (ods.Find(x => x.SQL_PLineNo.Contains("纸箱")) != null || plc.deviceName.Contains("T1"))
                {
                    //if (!ods.Any())
                    //    return;
@@ -320,13 +320,22 @@
                    if (_cl.N_CURRENT_NUM > 0 || _clrel.Any())
                    {
                        LogHelper.Info($" time:{_clrel0?.T_CREATE} = s_type:{_clrel0.S_TYPE}");
                        //if (DateTime.Now.Subtract(_clrel0.T_CREATE).TotalSeconds < 10 || !string.IsNullOrEmpty(_clrel0.S_TYPE))
                        //    goto ballll;
                        //plg 2025年6月23日  去除10秒时间限制
                        if (_clrel.Any())
                            //if (DateTime.Now.Subtract(_clrel0.T_CREATE).TotalSeconds < 10 || !string.IsNullOrEmpty(_clrel0.S_TYPE))
                            //    goto ballll;
                            //plg 2025年6月23日  去除10秒时间限制
                            if (DateTime.Now.Subtract(_clrel0.T_CREATE).TotalSeconds < 3 || !string.IsNullOrEmpty(_clrel0.S_TYPE))
                                goto ballll;
                        {
                            if (od?.SQL_PLineNo == "T1提升机")
                            {
                                if (!string.IsNullOrEmpty(_clrel0.S_TYPE))
                                    goto ballll;
                            }
                            else
                            {
                                if (DateTime.Now.Subtract(_clrel0.T_CREATE).TotalSeconds < 3 || !string.IsNullOrEmpty(_clrel0.S_TYPE))
                                    goto ballll;
                            }
                        }
                        LocationHelper.DoAction(db =>
                            {
                                db.Deleteable(_clrel).ExecuteCommand();
@@ -2711,7 +2720,6 @@
            //就查看有没有空的排了。 
            //if (endBit != null) ///  寻找未满排, 直接返回结果。 
            return endBit;
        //LogHelper.Info(" _tempList over!");
        //这里开始 寻找空排
        Empty:
@@ -3482,7 +3490,7 @@
                                        }
                                    if (endBit == null && _tempList.Any())
                                    {
                                        LogHelper.Info(" ar_RplaceRow over!");
                                        LogHelper.Info(" ar_RplaceRow over!" + JsonConvert.SerializeObject(_tempList.Select(x => x.N_ROW).Distinct()));
                                        var ar_RplaceRows = LocationHelper.GetLocList(x => x.S_AREA_CODE != area1 && x.S_AREA_CODE.Contains(are) && x.S_LOCK_STATE != "报废");//.Select(x => x.N_ROW).Distinct();
                                                                                                                                                                            //var ar_RplaceRow1 = ar_RplaceRows.FindAll(x => x.S_LOCK_STATE != "无").Select(x => x.N_ROW).Distinct();
                                        IEnumerable<int> ar_RplaceRow1 = ar_RplaceRows.FindAll(x => "入库锁;出库锁".Contains(x.S_LOCK_STATE?.Trim())).Select(x => x.N_ROW).Distinct();