刘磊
2025-06-25 2de09bec5cc05bf875543fa8956167ca7db73021
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
 
using Masuit.Tools;
using Newtonsoft.Json;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using System.Reflection.Emit;
using System.Security.Policy;
using System;
using WIDESEA.Common;
using WIDESEA_Common;
using WIDESEA_Common.ZY;
using WIDESEA_Core;
using WIDESEA_Core.Helper;
using WIDESEA_Model.Models;
 
namespace WIDESEA_StoragIntegrationServices
{
    public partial class ToZYService
    {
        /// <summary>
        /// 获取制动盘信息接口
        /// </summary>
        /// <param name="">车轮</param>
        /// <returns></returns>
        public WebResponseContent getZDPInfo(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                string ZPH = saveModel.MainData["ZPH"].ToString();
                //cltm = "L E1700844 0037";
 
                if (string.IsNullOrEmpty(ZPH)) throw new Exception("请求制动盘号不能为空");
 
                string ipaddress = ZY_Interface + "/getzdpInfo";
 
                ZDPInfo Info = new ZDPInfo { zdptm = ZPH };
 
                var dic = Info.ToDictionary();
 
                var responStr = HttpsClient.PostXml(ipaddress, dic);
 
                //CLInfo_ZY info = JsonConvert.DeserializeObject<CLInfo_ZY>(responStr);
 
                ZDPInfo_ZY inf2o = XMLSerializationTool.DeserializeXmlToObject<ZDPInfo_ZY>(responStr);
 
                if (inf2o.FLAG != "S") 
                    throw new Exception($"获取信息失败:接口返回失败:{inf2o.ERROR}");
                //string info2 = XMLSerializationTool.SerializeObjectToXml<string>(responStr);
 
                //CLInfo_ZY info_ZY = new CLInfo_ZY()  //测试数据
                //{
                //    //level = "1",
                //    //InboundDate = "2020-04-10",
                //    //gkzjjz = "520.11",
                //    //gkjmz = "421.1",
                //    //czh = "100",
                //    //clh = "L E123-52 4A",
                //    //cartype = "CRH1A",
                //    //Ltype = "SDA",
                //    //lx = "DA",
                //    //mttype = "crh",
                //    //NewOrOld = "NEW",
                //    //psj = "动车组",
                //    //sx = "da",
                //    //xlh = "1",
                //    //ygljz = "121"
                //};
 
                
 
                inf2o.ZPH = "20231021-0019/25103295 0011";
                inf2o.CHEXING = "CRH1A";
                inf2o.NEWOLD = "旧";
                inf2o.POS = "中间";
                inf2o.LSXH = "XKDS";
                inf2o.MAT = "钢";
                inf2o.SITE = "国产";
                inf2o.GKA1 = "0.53";
                inf2o.GKA2 = "0.23";
                inf2o.GKA3 = "0.133";
                inf2o.GKA = "0.535";
                inf2o.GKB1 = "0.533";
                inf2o.GKB2 = "0.431";
                inf2o.GKB3 = "0.532";
                inf2o.GKB = "0.623";
                inf2o.GKC1 = "0.123";
                inf2o.GKC2 = "0.533";
                inf2o.GKC3 = "0.222";
                inf2o.GKC = "0.543";
                inf2o.GKJZ = "0.22";
                inf2o.LSCSYMH = "0.42";
                inf2o.LMCSYMH = "0.031";
                inf2o.RKSJ = DateTime.Now.ToString();
              
 
 
 
 
                //CLInfo_ZY info_ZY = XmlToJson(responStr);
 
                content.OK(data: inf2o);
            }
            catch (Exception ex)
            {
                content.Error("获取制动盘信息失败.异常:" + ex.Message);
            }
            finally
            {
                //LogRecord.WriteLog((int)LogEnum.Mes, $"组盘查询轴承信息结果:{resultString}");
            }
            return content;
        }
    }
}