杨前锦
2025-05-15 91443c26b77da527c0dfc4d6c3e45e349e581ecf
HH.WCS.Mobox3/HH.WCS.Mobox3.YNJT_BZP/api/ApiHelper.cs
@@ -506,7 +506,7 @@
            ReturnResult result = new ReturnResult();
            try
            {
                Location startLoc = WMSHelper.GetoutStockStartLoc(model.itemCode , model.endLoc);
                Location startLoc = WMSHelper.GetoutStockStartLoc(model.itemCode,model.trayCode , model.endLoc);
                Location endLoc = LocationHelper.GetLoc(model.endLoc);
                if (startLoc != null)
@@ -777,27 +777,9 @@
            ReturnResult result = new ReturnResult();
            try
            {
                Location startLoc = LocationHelper.GetLoc(Settings.baseTrayInBufferLoc);
                Location startLoc = WMSHelper.GetEmptyTrayStartLoc(0, 1);
                Location endLoc = LocationHelper.GetLoc(loc);
                var agvJBLoc = Settings.getAgvJBLoc(loc);
                if (startLoc != null && startLoc.N_CURRENT_NUM == 1 && agvJBLoc.type == 1)
                {
                   var locCntrRels = LocationHelper.GetLocCntrRel(startLoc.S_CODE);
                    if (locCntrRels.Count > 0)
                    {
                        var container = ContainerHelper.GetCntr(locCntrRels[0].S_CNTR_CODE);
                        if (container.N_TYPE != 0)
                        {
                            startLoc = null;
                        }
                    }
                }
                if(startLoc == null || startLoc.N_CURRENT_NUM != 1)
                {
                    startLoc = WMSHelper.GetEmptyTrayStartLoc(0);
                }
                if (startLoc != null)
                {
@@ -885,7 +867,7 @@
                var mst = WMSHelper.GetWmsTask(wmsTaskNo);
                if (mst != null && mst.N_B_STATE < 2) 
                {
                    Location startLoc = WMSHelper.GetEmptyTrayStartLoc(0);
                    Location startLoc = WMSHelper.GetEmptyTrayStartLoc(0,0);
                    Location endLoc = LocationHelper.GetLoc(loc);
                    if (startLoc != null)
@@ -1004,7 +986,7 @@
                                if(mst.N_B_STATE != 2)
                                {
                                    // 创建下个任务
                                    if (cst.S_TYPE.Contains("出库") && !cst.S_TYPE.Contains("母拖"))
                                    if (cst.S_TYPE.Contains("出库") && !cst.S_TYPE.Contains("母拖") && !cst.S_TYPE.Contains("人工"))
                                    {
                                        WCSCore.createLastTask(cst.S_END_LOC, mst, 2);
                                    }
@@ -1290,6 +1272,7 @@
        public class CreateOutOrderModel
        {
            public string taskNo { get; set; } // 任务号
            public string trayCode { get; set; } // 任务号
            public string itemCode { get; set; } // 物料编码
            public string endLoc { get; set; } // 终点货位
            public int priority { get; set; } = 0; // 优先级 默认0