123
cjs
2025-06-12 b7cf29b366aa2afb5fada4b340bac268c1bb1534
ams/Hanhe.iWCS.TaizhouGEMTwoProtocol/ProcessHelper.cs
@@ -135,8 +135,8 @@
                var trayInfo = MongoDBSingleton.Instance.FindOne<trayTypeTable>(Query.EQ("locCode", mst.CN_S_START_BIT), "trayTypeTable");
                if (trayInfo != null && trayInfo.trayType == "2")
                {
                    start.CN_N_AGV_LOCATION = MongoDBSingleton.Instance.FindOne<STOCK_LOCATION_Two>(Query.EQ("CN_S_LOCATION_CODE", mst.CN_S_START_BIT), "STOCK_LOCATION_Two").CN_N_AGV_LOCATION;
                    end.CN_N_AGV_LOCATION = MongoDBSingleton.Instance.FindOne<STOCK_LOCATION_Two>(Query.EQ("CN_S_LOCATION_CODE", mst.CN_S_END_BIT), "STOCK_LOCATION_Two").CN_N_AGV_LOCATION;
                    start.CN_N_AGV_LOCATION = start.CN_N_AGV_LOCATION + 400;
                    end.CN_N_AGV_LOCATION = end.CN_N_AGV_LOCATION + 400;
                    CMMLog.Info($"任务推送:田字托起点终点 站点更改,起点:{start.CN_N_AGV_LOCATION},终点:{end.CN_N_AGV_LOCATION}");
                }
@@ -254,6 +254,7 @@
                    if (mst.CN_S_BUSS_TYPE == "包装线补空") PLCControl.PackingLineComplete(plc.ip);
                    if (mst.CN_S_BUSS_TYPE == "电梯取货") PLCControl.LiftAction(plc, mst.CN_S_TASK_NO,false);
                    if (mst.CN_S_BUSS_TYPE == "四钴成品出库" || mst.CN_S_BUSS_TYPE == "四钴辅材出库") PLCControl.productOutWare(mst.CN_S_END_BIT, mst.CN_S_TASK_NO, false);
                    if (mst.CN_S_BUSS_TYPE == "3楼缓存架入叠托") PLCControl.CacheStackingMouth6(plc);
                }
            }
        }
@@ -471,7 +472,7 @@
                {
                    #region 判断输送线模式 变更注释
                    bool action = true;
                    plc.ForEach(a =>
                    foreach(var a in plc)
                    {
                        var modeResult = OITcpHelper.RegisterReadOutPut(new OITcpHelper.RegisterReadOutPutModel
                        {
@@ -487,6 +488,7 @@
                            {
                                action = false;
                                CMMLog.Debug($"OutWareTask:输送线为 入库模式,输送线点位:{a.location}");
                                break;
                            }
                            else
                            {
@@ -498,6 +500,18 @@
                                    {
                                        action = false;
                                        CMMLog.Debug($"OutWareTask:中间表 ModeList为 入库模式");
                                    }
                                    else
                                    {
                                        int[] num = new int[1] { 1 };
                                        var writeRes = OITcpHelper.RegisterWriteOutPutMulti(new OITcpHelper.RegisterWriteOutPutModelMulti
                                        {
                                            host = a.ip,
                                            addr = a.writeAddr,
                                            data = num,
                                            port = a.port
                                        });
                                    }
                                }
                                else
@@ -507,7 +521,7 @@
                                }
                            }
                        }
                    });
                    };
                    if (!action)
                    {
                        return false;
@@ -631,6 +645,14 @@
                                }
                                else
                                {
                                    int[] num = new int[1] { 2 };
                                    var writeRes = OITcpHelper.RegisterWriteOutPutMulti(new OITcpHelper.RegisterWriteOutPutModelMulti
                                    {
                                        host = plc.ip,
                                        addr = plc.writeAddr,
                                        data = num,
                                        port = plc.port
                                    });
                                    return true;
                                }
                            }