package cn.net.test;

import java.io.IOException;
import java.net.BindException;
import java.net.ConnectException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;

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

public class Handset34 {

	/**
	 * <br/>
	 * 2015-7-14上午11:27:07
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		SocketCreate create = new SocketCreate("192.168.0.46", 8898, "2000000000001");
		try {
			create.createLoginCpzsHandset(358000052L);// 汽配
			System.out.println(create.getiCompanyId() + "---" + create.getiWorkStyle());
			
			Prot34LabelAddCarNo addCarNo = new Prot34LabelAddCarNo();
//			addCarNo.dealProt(create, 1000032357341936L, "京AFW999");
//			Prot32CarFanku carRuku = new Prot32CarFanku();
//			carRuku.dealProt(create, 1000032357341936L, 100001L);
//			System.out.println("carRuku.isSuccess()--->" + carRuku.isSuccess());
		} catch (BindException e) {
			e.printStackTrace();
		} catch (ConnectException e) {
			e.printStackTrace();
		} catch (SocketTimeoutException e) {
			e.printStackTrace();
		} catch (UnknownHostException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			new Prot02Logout().dealLogout(create);
		}

	}

}
