package cn.net.test;

import cn.net.cpzslibs.prot.Prot02Logout;
import cn.net.cpzslibs.prot.SocketCreate;
import cn.net.cpzslibs.prot.handset.Prot10053NewWineLogin;
import cn.net.cpzslibs.prot.handset.Prot10058QueryNewWine;
import cn.net.cpzslibs.prot.handset.bean.Prot10053SendBeanNewWine;
import cn.net.cpzslibs.prot.handset.bean.Prot10058SendBean;

/*
 * 酒类经销商 所有协议
 */
public class Handset10054 {
	public static void main(String[] args) {
			//for(int i = 0 ;i<100;i++){
			String ip = "218.245.0.109";// 218.245.0.109 192.168.0.46
			int port = 8898;
			SocketCreate create = new SocketCreate(ip, port, "");
			try {
				 create.createJustCreateSocket();
					// 测试53号登录
					Prot10053NewWineLogin login = new Prot10053NewWineLogin();

					//login.dealCpzsNewWine(create, new Prot10053SendBeanNewWine("358000091", "355128005922687", ""));
					
					login.dealCpzsNewWine(create, new Prot10053SendBeanNewWine("358000091", "866622020589697", ""));

					System.out.println(login.getLoginResult()); 
					//下载二级经销商
					/*Prot10054GetDealer   p54  = new Prot10054GetDealer();
					p54.dealGetDealer(create, new Prot10054SendDealerBean(1));
					System.out.println(p54.getRes().getList().size());*///e10adc3949ba59abbe56e057f20f883e
					//修改密码
					//Prot10055ChangePassWord  p55 =  new Prot10055ChangePassWord();
					//p55.dealChangePassWord(create, new Prot10055SendBeanPassWord("358000091", "355128005804331", "e10adc3949ba59abbe56e057f20f883e", "96e79218965eb72c92a549dd5a330112"));
					//入库
					/*Prot10056RuKuNewWine  p56 = new Prot10056RuKuNewWine();
					
					Prot10056SendBeanNewWine   bean = 	new Prot10056SendBeanNewWine("110", "1000010024949048", "测试1111");
					System.out.println(bean.getIemi_id());
					
					p56.dealRuKuNewWine(create, bean);*/
					
					
					/*Prot10057ChuKuNewWine  p57  = new Prot10057ChuKuNewWine();
					p57.dealChuKuNewWine(create, new Prot10057SendBeanNewWine("866622020589697","1000010024695496","31","2016-10-18 13:30:51" ,"测试出库"));
					System.out.println(p57.getRes().getiResult());*/
					Prot10058QueryNewWine p58 = new Prot10058QueryNewWine();
					p58.dealQueryNewWine(create, new Prot10058SendBean("866622020589697", "1000010024695496"));
					System.out.println(p58.getRes().getiResult());
					
					
				
			} catch (Exception e) {
				// TODO: handle exception
				e.printStackTrace();
			} finally {
				System.out.println("退出");
				new Prot02Logout().dealLogout(create);
			}
			//}
		}

	
	
	
}
