lss
2025-06-26 011d17bc8df981ba31e895873ab0e4a17da8288f
HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/process/TaskProcess.cs
@@ -8,6 +8,7 @@
using HH.WCS.JiaTong.wms;
using Microsoft.Owin.BuilderProperties;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SqlSugar;
using System;
using System.Collections.Generic;
@@ -83,13 +84,10 @@
            }
            else
            {
                //起点终点解锁
                LocationHelper.UnLockLoc(mst.S_START_LOC);
                LocationHelper.UnLockLoc(mst.S_END_LOC);
            }
        }
        /// <summary>
@@ -214,13 +212,25 @@
                            if (Device != null)
                            {
                                //写入失败重新写入
                                while (!S7Helper.WriteDpj(Device.address, 1001, 1))
                                if (!S7Helper.WriteDpj(Device.address, 1001, 1))
                                {
                                    Thread.Sleep(1000);
                                    Task.Run(() =>
                                    {
                                        while (!S7Helper.WriteDpj(Device.address, 1001, 1))
                                        {
                                            Thread.Sleep(1000);
                                        }
                                    });
                                }
                                while (!S7Helper.WriteDpj(Device.address, 1002, 0))
                                if (!S7Helper.WriteDpj(Device.address, 1002, 0))
                                {
                                    Thread.Sleep(1000);
                                    Task.Run(() =>
                                    {
                                        while (!S7Helper.WriteDpj(Device.address, 1002, 0))
                                        {
                                            Thread.Sleep(1000);
                                        }
                                    });
                                }
                            }
                            else
@@ -476,12 +486,16 @@
                else if (mst.S_TYPE == "电梯2")
                {
                    var mst2 = mstbyEqno.Where(a => a.S_TYPE == "电梯1").First();
                    if (mst2.S_B_STATE == "卸货完成" || mst2.S_B_STATE == "完成")
                    {
                    if (mst2 == null)
                    {
                        return result;
                    }
                    else
                    {
                        if (mst2.S_B_STATE == "卸货完成" || mst2.S_B_STATE == "完成")
                        {
                            return result;
                        }
                        result = false;
                    }
                }