126 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			126 lines
		
	
	
		
			4.1 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 DeiNiu.wms.win.epick | |||
|  | { | |||
|  |     // 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码和配置文件中的接口名“IServiceLight”。 | |||
|  |     [ServiceContract] | |||
|  |     public interface IServiceLight | |||
|  |     { | |||
|  |         [OperationContract] | |||
|  |         [WebInvoke( | |||
|  |             Method = "GET", | |||
|  |             RequestFormat = WebMessageFormat.Json, | |||
|  |             ResponseFormat = WebMessageFormat.Json, | |||
|  |             UriTemplate = "getLabel/Id={Id}" | |||
|  |             )] | |||
|  |         SeedsLabel getLabel(string Id); | |||
|  | 
 | |||
|  |         [OperationContract] | |||
|  |         [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, | |||
|  |             UriTemplate = "lightLabels")] | |||
|  |         string lightLabels(List<SeedsLabel> labels); | |||
|  |         [OperationContract] | |||
|  |         [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, | |||
|  |             UriTemplate = "lightLabels2")] | |||
|  |         string lightLabels2(String s); | |||
|  | 
 | |||
|  | 
 | |||
|  |         [OperationContract] | |||
|  |         [WebInvoke( | |||
|  |            Method = "GET", | |||
|  |            RequestFormat = WebMessageFormat.Json, | |||
|  |            ResponseFormat = WebMessageFormat.Json, | |||
|  |            UriTemplate = "lightLabel/Id={Id}" | |||
|  |            )] | |||
|  |         string lightLabel(string Id); | |||
|  | 
 | |||
|  | 
 | |||
|  |         [OperationContract] | |||
|  |         [WebInvoke( | |||
|  |            Method = "GET", | |||
|  |            RequestFormat = WebMessageFormat.Json, | |||
|  |            ResponseFormat = WebMessageFormat.Json, | |||
|  |            UriTemplate = "startSeeds?deskId={deskId}&seedsNo={seedsNo}" | |||
|  |            )] | |||
|  |         string startSeeds(int deskId,string seedsNo); | |||
|  | 
 | |||
|  | 
 | |||
|  |         [OperationContract] | |||
|  |         [WebInvoke( | |||
|  |            Method = "GET", | |||
|  |            RequestFormat = WebMessageFormat.Json, | |||
|  |            ResponseFormat = WebMessageFormat.Json, | |||
|  |            UriTemplate = "lightSeed?deskId={deskId}&flowNo={flowNo}&barcode={barcode}&pcs={pcs}&userId={userId}&isValid={isValid}" | |||
|  |              | |||
|  |            )] | |||
|  |         FormatedResult lightSeed(int deskId,string flowNo, string barcode,int pcs, int userId, bool isValid); | |||
|  | 
 | |||
|  |         [OperationContract] | |||
|  |         [WebInvoke( | |||
|  |            Method = "GET", | |||
|  |            RequestFormat = WebMessageFormat.Json, | |||
|  |            ResponseFormat = WebMessageFormat.Json, | |||
|  |            UriTemplate = "lightDeskSeed?seedsNo={seedsNo}&barcode={barcode}&userId={userId}&isValid={isValid}" | |||
|  |            )] | |||
|  |         FormatedResult lightDeskSeed(string seedsNo, string barcode, int userId, bool isValid); | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  |         [OperationContract] | |||
|  |         [WebInvoke( | |||
|  |            Method = "POST", | |||
|  |            RequestFormat = WebMessageFormat.Json, | |||
|  |            ResponseFormat = WebMessageFormat.Json, | |||
|  |            UriTemplate = "uploadSeeds" | |||
|  |            )] | |||
|  |         string uploadSeeds(List<SeedsItem> seeds); | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  |         [OperationContract] | |||
|  |         [WebInvoke( | |||
|  |            Method = "GET", | |||
|  |            RequestFormat = WebMessageFormat.Json, | |||
|  |            ResponseFormat = WebMessageFormat.Json, | |||
|  |            UriTemplate = "turnOnLight?id={id}&which={which}&port={port}" | |||
|  |            )] | |||
|  |         string turnOnLight(int id, byte which, int port); | |||
|  |         /* | |||
|  |         [OperationContract] | |||
|  |         [WebInvoke( | |||
|  |            Method = "GET", | |||
|  |            RequestFormat = WebMessageFormat.Json, | |||
|  |            ResponseFormat = WebMessageFormat.Json, | |||
|  |            UriTemplate = "turnOffLight?id={id}&port={port}" | |||
|  |            )] | |||
|  |         string turnOffLight(int id, int port); | |||
|  |         */ | |||
|  | 
 | |||
|  |         [OperationContract] | |||
|  |         [WebInvoke( | |||
|  |            Method = "GET", | |||
|  |            RequestFormat = WebMessageFormat.Json, | |||
|  |            ResponseFormat = WebMessageFormat.Json, | |||
|  |            UriTemplate = "turnOffLight?id={id}&which={which}&port={port}" | |||
|  |            )] | |||
|  |         string turnOffLight(int id, byte which, int port); | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  |         [OperationContract] | |||
|  |         [WebInvoke( | |||
|  |            Method = "GET", | |||
|  |            RequestFormat = WebMessageFormat.Json, | |||
|  |            ResponseFormat = WebMessageFormat.Json, | |||
|  |            UriTemplate = "turnOnLightByScan?deskId={deskId}&barcode={barcode}" | |||
|  |            )] | |||
|  |         string turnOnLightByScan(int deskId, string barcode); | |||
|  | 
 | |||
|  |     } | |||
|  | } |