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.newProt.Prot20073GetDealer;

public class YouZhiText {


	public static void main(String[] args) {
		String ip = "218.245.0.109";// 218.245.0.109 192.168.0.46
		int port = 8890;
		SocketCreate create = new SocketCreate(ip, port, "");
		try {
			create.createLoginCpzsHandset(658000091L);
			Prot20073GetDealer dealer = new Prot20073GetDealer();
			dealer.dealDealerList(create);
			
			System.out.println(dealer.getResBean());
			
		/*	Prot20074YouZhiChuKu p74 = new Prot20074YouZhiChuKu();
			List<String> list = new ArrayList<>();
			list.add("1000010037974787");
			p74.submitLabelOptionInfo(create, new Prot20074ReqBean(list ,1,"测试出库",0,59));
			System.out.println(p74.getResBean());*/
			/*//做盘库操作  
			Prot33CarPanku carPanku = new Prot33CarPanku();
			carPanku.dealProt(create, 1000010027811324L);
			System.out.println(carPanku.getJsonData());
			System.out.println(carPanku.getPankuBean());
			System.out.println(carPanku.getErrMsg());*/
			
		} 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);
		}
	}



}
