ldj/winform/service/ILightService.cs

106 lines
2.9 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Web;
namespace DNLightSvr
{
[ServiceContract]
public interface ILightService
{
[OperationContract]
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json,
UriTemplate = "lightLabels")]
string lightLabels(ELabel[] labels);
[OperationContract]
[WebInvoke(
Method = "POST",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "testpost"
)]
string testPost(ELabel label);
[OperationContract]
[WebInvoke(
Method = "POST",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "clearOrder"
)]
string clearOrder(ClearOrder clearOrder);
[OperationContract]
[WebInvoke(
Method = "GET",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "test"
)]
string test();
//-------------------light by order
[OperationContract]
[WebInvoke(
Method = "GET",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "lightByPickOrderNo?orderNo={orderNo}&partion={partion}"
)]
int lightByPickOrder(string orderNo,int partion);
[OperationContract]
[WebInvoke(
Method = "GET",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "lightBySaleOrderNo?orderNo={orderNo}&partion={partion}"
)]
int lightBySaleOrder(string orderNo, int partion);
[OperationContract]
[WebInvoke(
Method = "GET",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "lightByPlate?plateId={plateId}&partion={partion}"
)]
string lightByPlate(string plateId, int partion);
}
[DataContract]
public class ELabel
{
[DataMember]
public int labelId { get; set; }
[DataMember]
public int address { get; set; }
[DataMember]
public int count { get; set; }
[DataMember]
public int color { get; set; }
[DataMember]
public int port { get; set; }
[DataMember]
public int orderNo { get; set; }
}
[DataContract]
public class ClearOrder
{
[DataMember]
public int orderNo { get; set; }
[DataMember]
public int[] ports { get; set; }
}
}