zs
2024-11-12 d70ef129ae0ada5dce8da885b6b32b613dbb99ee
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
using DataCapture_MA.HttpHelper;
using DataCapture_MA.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace DataCapture_MA.Mes
{
    public class MesApiRequest
    {
 
        /// <summary>
        /// AGV根路由
        /// </summary>
        private static string mesHost = ConfigHelper.GetConfigString("mesHost");
        private static string warningApi = ConfigHelper.GetConfigString("warningApi");
        private static string equipmentStatusApi = ConfigHelper.GetConfigString("equipmentStatusApi");
        private static string equipmentInfoApi = ConfigHelper.GetConfigString("equipmentInfoApi");
 
        public static MesResult PushEquipmentWarning<T>(T input)
        {
            var agvResult = HttpRequesHelper.PostHttpRequest<T, MesResult>(mesHost, warningApi, input, null, false);
            return agvResult;
        }
 
        public static MesResult PushEquipmentStatus<T>(T input)
        {
            var agvResult = HttpRequesHelper.PostHttpRequest<T, MesResult>(mesHost, equipmentStatusApi, input, null, false);
            return agvResult;
        }
 
 
        public static MesResult PushEquipmentInfo<T>(T input)
        {
            var agvResult = HttpRequesHelper.PostHttpRequest<T, MesResult>(mesHost, equipmentInfoApi, input, null, false);
            return agvResult;
        }
    }
}