CServiceImpl.cs
3.02 KB
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
using XingYe_ACS.BaseStruct;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace XingYe_ACS.WebApi
{
public class CServiceImpl
{
/// <summary>
/// ACS任务回传WMS
/// </summary>
/// <param name="fTask"></param>
/// <param name="flag"></param>
/// <returns></returns>
public static bool ToWebTaskRefresh(FTask task, int status)
{
try
{
//调用WMS方法;
WebApiTask webApiTask = new WebApiTask();
return true;
}
catch (Exception Ex)
{
throw new Exception("ToWebTaskRefresh:" + Ex.Message.Replace(Environment.NewLine, ""));
}
}
/// <summary>
/// 连接AGV是否成功回传
/// </summary>
/// <param name="agvNo"></param>
/// <param name="link"></param>
/// <returns></returns>
public static bool ToWebLinkAgvRefresh(string agvNo, bool link)
{
try
{
//调用WMS方法;
LinkAgv linkAgv = new LinkAgv();
linkAgv.agvNo = agvNo;
linkAgv.link = link;
ReMessage result = CService.LinkAgvRefresh(linkAgv);
if (result != null && result.status)
{
string web = string.Format(@"响应码:{0} 响应说明:{1} AGV编号:{2} 连接状态:{3}"
, result.status, result.message, agvNo, link);
App.ExFile.MessageLog("ToWebTaskRefresh", "WEB返回的数据(ToWebTaskRefresh)," + web + "\r");
return true;
}
return false;
}
catch (Exception Ex)
{
throw new Exception("ToWebTaskRefresh:" + Ex.Message.Replace(Environment.NewLine, ""));
}
}
/// <summary>
/// 界面返回任务完成
/// </summary>
/// <param name="fTask"></param>
/// <returns></returns>
public static bool ToWebTaskReturn(FTask fTask)
{
try
{
return true;
//调用WMS方法;
//WebApiTask task = new WebApiTask();
//ReMessage result = CService.TaskRefresh(task,2);
//if (result != null && result.status)
//{
// string web = string.Format(@"响应码:{0} 响应说明:{1}"
// , result.status, result.message);
// App.ExFile.MessageLog("ToWebTaskReturn", "WEB返回的数据(ToWebTaskReturn)," + web + "\r");
// return true;
//}
//return false;
}
catch (Exception Ex)
{
throw new Exception("ToWebTaskReturn:" + Ex.Message.Replace(Environment.NewLine, ""));
}
}
}
}