pulg
2025-06-10 b3d20305722ae41ca0093ea034b12373dfdd2b3b
HH.WCS.QingXiNongfu/process/TaskProcess.cs
@@ -1,26 +1,14 @@
using HH.WCS.QingXigongchang.api;
using HH.WCS.QingXigongchang.core;
using HH.WCS.QingXigongchang.device;
using HH.WCS.QingXigongchang.device;
using HH.WCS.QingXigongchang.dispatch;
using HH.WCS.QingXigongchang.util;
using HH.WCS.QingXigongchang.wms;
using Newtonsoft.Json;
using NLog.Fluent;
using SqlSugar;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Security.Policy;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http.Results;
using static HH.WCS.QingXigongchang.api.ApiModel;
using static HH.WCS.QingXigongchang.device.OITcpHelper;
using Monitor = HH.WCS.QingXigongchang.core.Monitor;
namespace HH.WCS.QingXigongchang.process
@@ -321,6 +309,7 @@
            return result;
        }
        /// <summary>
        /// 任务状态更新处理
        /// </summary>
@@ -397,11 +386,26 @@
                    //}
                }
                //终点货位为 YWLT1TSJCD  或者 YWLT2TSJCD 的 要取货完成解锁起点,解绑起点,绑定终点,卸货完成,解锁终点  2025年6月10日  Plg
                if (mst.S_END_LOC?.Trim() == "YWLT1TSJCD" || mst.S_END_LOC?.Trim() == "YWLT2TSJCD")
                {
                    //解绑起点
                    CacheBitUpdate(mst, load: true);
                    //绑定终点
                    CacheBitUpdate(mst, load: false);
                }
                LocationHelper.UnLockLoc(mst.S_START_LOC.Trim());
            }
            //new List<string> { "成品满框-入库", "" }
            if (state == 6 || state == 5)
            {
                ///只需要释放货位就行了
                if (mst.S_END_LOC?.Trim() == "YWLT1TSJCD" || mst.S_END_LOC?.Trim() == "YWLT2TSJCD")
                {
                    LocationHelper.UnLockLoc(mst.S_END_LOC.Trim());
                    return r;
                }
                LogHelper.Info($"任务类型:{mst.S_TYPE}- 动作:{state}. 是否5算6?{mst.S_TYPE.Contains("成品满框") || mst.S_TYPE.Contains("备货")} ");
                if (mst.S_TYPE.Contains("备货"))
                {
@@ -426,7 +430,10 @@
                    && mst.S_TYPE.Trim() != "瓶盖空筐转运-J2"
                    && mst.S_TYPE.Trim() != "青溪纸箱搬运物料"
                    && !mst.S_TYPE.Trim().Contains("自由点对点"))
                {
                    CacheBitUpdate(mst, load: false, mst.S_NOTE);
                }
                if (mst.S_TYPE.Trim().Contains("成品-空托上线"))
                {