陈勇
2026-04-06 9de6c7c6d835ba5161d64114d154bfc7676244a1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_DTO;
using WIDESEA_Model.Models;
 
namespace WIDESEA_StoragIntegrationServices
{
    public partial class WCSService
    {
        public WebResponseContent TCGetCarPass(RequestTaskDto json)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_MESLockInfo frist = null;
                if (json.Position == "TC05")
                {
                    frist = _mesLockInfoRepository.QueryData(x => Convert.ToInt32(x.TCLine) <= 4).OrderBy(X => X.sequenceNo).First();
                }
                else
                {
                    frist = _mesLockInfoRepository.QueryData(x => Convert.ToInt32(x.TCLine) >= 5).OrderBy(X => X.sequenceNo).First();
                }
                if (!frist.CarBodyInfo.PVI.Equals(json.PVI)) throw new Exception("非队列首车不允许取车");
 
                return content.OK();
            }
            catch (Exception ex)
            {
                return content.Error($"横移机获取队列首车失败:{ex.Message}");
            }
        }
    }
}