刘磊
2026-01-15 c1dbe3bb1724236f4c283cf5315e555df2026c6d
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using AngleSharp.Common;
using Masuit.Tools;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common;
using WIDESEA_Common.MES;
using WIDESEA_Common.MES.Request;
using WIDESEA_Core;
using WIDESEA_Core.Const;
using WIDESEA_Core.Helper;
using WIDESEAWCS_BasicInfoService;
using WIDESEAWCS_Model.Models;
 
namespace WIDESEA_StoragIntegrationServices
{
    /// <summary>
    /// 车身绑定工单(焊装直通涂装)
    /// </summary>
    public partial class MESService
    {
        public WebResponseContent pullLock(object jsondata)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                if (string.IsNullOrEmpty(jsondata.ToString())) throw new Exception("请求参数为空");
 
                var result = JsonConvert.DeserializeObject<pullLockInfo>(jsondata.ToString());
 
                foreach (var item in result.data)
                {
                    var carInfo = _palletStockInfoRepository.QueryFirst(x => x.PVI == item.pvi);
                    if (carInfo == null)
                    {
                        throw new Exception("未知车身");
                    }
 
                    content.lockpvi = carInfo.PVI;
                }
 
                LogFactory.GetLog("MES拉动锁车").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("MES拉动锁车").Info(true, jsondata.ToJsonString());
 
                return content;
            }
            catch (Exception ex)
            {
                return content.Error(ex.Message);
            }
        }
    }
}