陈勇
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.ConstrainedExecution;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.MES;
using WIDESEA_Core;
using WIDESEA_DTO;
 
namespace WIDESEA_StoragIntegrationServices
{
    public partial class WCSService
    {
        public WebResponseContent TZPassZZ(RequestTaskDto json)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                var carInfo = _carBodyInfoRepository.QueryFirst(x => x.RFID == json.PVI);  ///*x.PalletCode == json.PalletCode ||*/
                if (carInfo != null) throw new Exception($"涂装直通总装失败:PVI{json.Rfid}已存在。");
 
                WebResponseContent responseContent = _mesService.issuedCharacter(json.PVI, json.Position, json.PalletCode);
                if (!responseContent.Status) throw new Exception($"车身信息获取失败:{responseContent.msg}");
 
                var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == json.Position);
                if (station == null) throw new Exception("站台未找到");
 
                //过点信息 -BDC01
                //json.PVI = json.PVI.Substring(0, 9);
                json.Position = "RB001";
                WebResponseContent content1 = _mesService.PassPoint(json);
                if (!content1.Status) throw new Exception($"BDC02过点失败:{content1.msg}");
 
                WebResponseContent webResponse = _mesService.bindWorkOrder("EL01RB", json.PVI);
                if (!webResponse.Status) throw new Exception($"焊涂绑定失败:{webResponse.msg}");
 
                //过点信息 -BDC02
                json.Position = "EL01RB";
                WebResponseContent BDC02 = _mesService.PassPoint(json);
                if (!BDC02.Status) throw new Exception($"BDC02过点失败:{BDC02.msg}");
 
                ////过点信息 -BDC03
                json.Position = "EL01RB01";
                WebResponseContent BDC03 = _mesService.PassPoint(json);
                if (!BDC03.Status) throw new Exception($"BDC03过点失败:{BDC03.msg}");
 
                content.OK();
            }
            catch (Exception ex)
            {
                throw new Exception($"涂装提升机异常:{ex.Message}");
                //content.Error(ex.Message);
            }
            return content;
        }
    }
}