Project

General

Profile

Specification » History » Revision 7

Revision 6 (Soh Keong, 05/04/2021 08:40 AM) → Revision 7/8 (Soh Keong, 05/04/2021 02:33 PM)

{{toc}} 

 h1. Specification 

 h2. Programming Guide 

 h3. Jar version  

 |_. version |_. Description                      | 
 | 1.0         | Init                               | 

 h3. Jar File Download 

 "Jar":/redmine/attachments/download/551/orderTrackingService-1.0.jar 
 "Lib":/redmine/attachments/download/548/lib.rar 
 "Properties":/redmine/attachments/download/550/service.properties 

 h3. properties file 

 * *service.properties* 

 # *json.url*                  - provided by DotNet team 
 # *connection.timeout*        - set connection timeout 
 # *connection.read.timeout* - set connection read timeout 


 h1. Methods 

 <pre> 
 cosway.eCos2WebApi.service.TrackService service = new cosway.eCos2WebApi.service.TrackService(); 
 </pre> 

 h2. getTrackingOrderDetail (GetTrackingOrderDetail) 

 <pre> 
 cosway.eCos2WebApi.model.ResponseTrack responseBean = service.getTrackingOrderDetail(String orderId) 
 </pre> 

 * *cosway.eCos2WebApi.model.ResponseTrack* 
 > * *errorCode*        - String 
 > * *errorMessage*     - String 
 > * *detail*           - TrackOrderDetail 
 >> * *companyName*       - String 
 >> * *trackingNo*        - String 
 >> * *updateDatetime*    - Date 

 h2. Live tracking.my 

 h3. third party Javascript 
 <pre> 
 <script src="//www.tracking.my/track-button.js"></script> 
 <script> 
	 function inputTrack(num) { 
		 TrackButton.track({ 
				 tracking_no: num 
			 }); 
	 } 
 </script> 

 <input type="button" value="Detail" onclick="inputTrack('<%=trackNo %>')"> 
 </pre> 

 h3. Pop up new windows 

 <pre> 
 <script> 
	 function viewDetail(num) { 
		 window.open("https://www.tracking.my/externalcall?tracking_no="+num,"_blank", getSpecs()).focus(); 
	 } 

	 function getSpecs() { 
		 return "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=50,left=100,width=500,height=600"; 
	 } 
 </script> 

 <input type="button" value="Detail" onclick="viewDetail('<%=trackNo %>')"> 
 </pre>