package cn.net.test;

import cn.net.cpzslibs.prot.Prot02Logout;
import cn.net.cpzslibs.prot.SocketCreate;
import cn.net.cpzslibs.prot.handset.Prot18Bind;

public class Handset1805 {
	public static void main(String[] args) {
		String ip = "218.245.0.109";//218.245.0.109    192.168.0.46
		int port = 8898;
		SocketCreate create = new SocketCreate(ip, port,"120000001");
		try {
		create.createLoginCpzsHandset(120000001L);	
		Prot18Bind p18 = new Prot18Bind();
		long iProductId = (long) 10006;
		long iStartLabelId  = (Long)1000010044999804L;
		long iEndLabelId  =  (Long) 1000010046999833L;
		int iProduceDate  = 20130424; 
		int iBatchNumber = 123456;
		String scz="测试生产者";
		/*p18.dealProt1802(create, iProductId, iStartLabelId, iEndLabelId, iProduceDate, iBatchNumber, new Prot18Bind.CallBack() {
			
			@Override
			public void updateData(boolean bool, long[] labels, String errRet,
					int iErrCode, int iFailedNum) {
				// TODO Auto-generated method stub
				System.out.println("bool--"+bool+"-labels-"+labels+"-errRet-"+errRet+"-iErrCode-"+iErrCode+"-iFailedNum-"+iFailedNum);
			}
		});*/
		p18.dealProt1805(create, iProductId, iStartLabelId, iEndLabelId, iProduceDate, iBatchNumber, scz,new Prot18Bind.CallBack() {
			
			@Override
			public void updateData(boolean bool, long[] labels, String errRet,
					int iErrCode, int iFailedNum) {
				System.out.println("bool--"+bool+"-labels-"+labels+"-errRet-"+errRet+"-iErrCode-"+iErrCode+"-iFailedNum-"+iFailedNum);
				
			}
		});
		
		
		
		} catch (Exception e) {
			
			
			e.printStackTrace();
		}finally{
			new Prot02Logout().dealLogout(create);
		}
		
	}
}
