分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-05-31 53d6a24cb335b0c9b4449e1211ce8ea644d68d67
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs
@@ -164,10 +164,10 @@
                        {
                            Station.location_state = LocationStateEnum.Abnormal.ToString();
                            Station.remark = "车轮数量与SN号数量不一致";
                            stationinfoRepository.Update(Station, true);
                            stationinfoRepository.Update(Station, x => new { x.location_state, x.remark }, true);
                            Gantry_client.WriteByOrder("W_RequestUnload", false, number);//信号为false桁架停止进入
                            #region æ—¥å¿—记录
                            WriteDBLog.Error("上料区", $"写入桁架信息:\nW_RequestUnload:false\n\n{Station.stationCode}车轮数量与SN号数量不一致", "PCS");
                            //WriteDBLog.Error("上料区", $"写入桁架信息:\nW_RequestUnload:false\n\n{Station.stationCode}车轮数量与SN号数量不一致", "PCS");
                            #endregion
                            return;
                        }
@@ -178,7 +178,15 @@
                        if (PalletSignal == 1 && MaterialSignal == 1)
                        {
                            Gantry_client.WriteByOrder("W_Wheel_Type", (Int16)Convert.ToInt16(QueryMateriel(Station.stationType) == null ? QueryMateriel1(Station.stationType).TypeId : QueryMateriel(Station.stationType).TypeId), number);//车轮类型
                            var geometry = QueryMateriel(Station.stationType);
                            if (geometry == null)
                            {
                                Station.remark = "未找到车轮信息";
                                stationinfoRepository.Update(Station, x => new { x.remark }, true);
                                Gantry_client.WriteByOrder("W_RequestUnload", false, number);//信号为false桁架停止进入
                                return;
                            }
                            Gantry_client.WriteByOrder("W_Wheel_Type", (Int16)Convert.ToInt16(geometry.TypeId), number);//车轮类型
                            var area = Convert.ToInt16(Station.stationCode.Substring(Station.stationCode.Length - 1, 1));
                            Gantry_client.WriteByOrder("W_AreaNr", (Int16)area, number);//区域货位号
                            Gantry_client.WriteByOrder("W_IndexNr", (Int16)SNS.Length, number);//托盘上的第几个车轮
@@ -187,7 +195,7 @@
                            Gantry_client.WriteByOrder("W_RequestUnload", true, number);
                            #region æ—¥å¿—记录
                            WriteDBLog.Success("上料区申请", $"读取托盘光电信号:{PalletSignal}\n读取第一个车轮光电信号:{MaterialSignal}\n\n" +
                                $"写入桁架信息:\n区域货位号:{area}\n托盘上的第几个车轮:{SNS.Length}\n托盘类型:{1}\n车轮类型:{(QueryMateriel(Station.stationType) == null ? QueryMateriel1(Station.stationType).TypeId : QueryMateriel(Station.stationType).TypeId)}" +
                                $"写入桁架信息:\n区域货位号:{area}\n托盘上的第几个车轮:{SNS.Length}\n托盘类型:{1}\n车轮类型:{geometry.TypeId}" +
                                $"\n车轮SN号:{SNS[SNS.Length - 1]}\nW_RequestUnload:true", "PCS");
                            #endregion
                        }