陈勇
2026-03-10 fc9cba5f058089887aa7061d2e6b4006b9e04a9a
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_DTO;
 
namespace WIDESEA_StoragIntegrationServices
{
    public partial class WCSService
    {
        /// <summary>
        ///  请求焊-涂直通/入库
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public WebResponseContent GetPalletCodePosition(RequestTaskDto json)
        {
            WebResponseContent webResponseContent = new WebResponseContent();
            try
            {
                //todo: 新增配置信息判断: 涂装生产? 涂装水位? 
                
                var carInfo = _carBodyInfoRepository.QueryFirst(x => x.PVI == json.PVI);
                if (carInfo != null) throw new Exception($"无PVI{json.PVI}车身数据,无法过点");
 
                var stationInfo =  _stationManagerRepository.QueryFirst(x => x.stationChildCode == json.Position);
                if (stationInfo != null) throw new Exception($"未配置{json.Position}站点信息");
 
                webResponseContent = _mesService.bindWorkOrder(json.Position, json.Rfid);
                if(!webResponseContent.Status) throw new Exception($"焊涂流向失败:MES工单绑定失败,RFID:{json.Rfid}");
 
            }
            catch (Exception ex)
            {
                webResponseContent.Error($"请求焊-涂直通/入库失败:{ex.Message}");
            }
            return webResponseContent;
        }
    }
}