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); [WebInvoke( Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "lightJob?jobNo={jobNo}&isValid={isValid}&userId={userId}" )] string lightJobNo(int userId,string jobNo, bool isValid); [OperationContract] [WebInvoke( Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "printOutTaskCode?userId={userId}&partion={partion}&lineId={lineId}&orderType={orderType}" )] int printOutTaskCode(int userId, int partion, int lineId, int orderType); [OperationContract] [WebInvoke( Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "printStockIn?userId={userId}&preinNo={preinNo}" //printStockIn?userId=%s&preinNo=%s )] string printStockIn(int userId, string preinNo); [OperationContract] [WebInvoke( Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "printOutTrans?plateId={plateId}" //printStockIn?userId=%s&preinNo=%s )] string printOutTrans(string plateId); } [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; } } }