package cn.net.test;
import java.util.ArrayList;

import cn.net.cpzslibs.prot.Prot02Logout;
import cn.net.cpzslibs.prot.SocketCreate;
import cn.net.cpzslibs.prot.handset.Prot10074WineDaBao;
import cn.net.cpzslibs.prot.handset.bean.Prot10074LabelBean;
import cn.net.cpzslibs.prot.handset.bean.Prot10074WineSendBean;

public class Handset10018 {
	public static void main(String[] args) {
		String ip = "218.245.0.109"; //218.245.0.109 192.168.0.46 2015-12-23
									 //12:00:00   
		int port = 8898;
		//while(true){
		SocketCreate create = new SocketCreate(ip, port, "458000631");
		try {
			
			create.createLoginCpzsHandset(458000631L);
			Prot10074WineDaBao p74 = new Prot10074WineDaBao();
			ArrayList<Prot10074LabelBean> list  = new ArrayList<Prot10074LabelBean>();
			list.add(new Prot10074LabelBean("1002189000018122"));
			list.add(new Prot10074LabelBean("1002189000021657"));
			/*System.out.println("--"+list.get(0));
			System.out.println("--"+list.get(1));*/
			
			p74.dealDaBao(create, new Prot10074WineSendBean("1002189000005940", list));
			
			System.out.println(p74.getResMsgBean());
			
			//create.createJustCreateSocket();
			/*Prot10073MHQFirstDrvice  p73 = new Prot10073MHQFirstDrvice();
			p73.dealFirstDriviceMHQ(create, new Prot10073MHQSendBean("358000052", "c8d5fef1b412"));
			System.out.println(p73.getResMsgBean());*/
			
			
			/*Prot10072MHQCheckID   p72 = new Prot10072MHQCheckID(); //
			p72.dealCheckIDMHQ(create, new Prot10072MHQSendBean("558000002", "558000002"));	
			System.out.println(p72.getResMsgBean());*/
			
			/*Prot10070MHQLogin   p70  = new Prot10070MHQLogin();
			System.out.println(MD5.GetMD5Code("9999"));
			p70.dealLoginMHQ(create, new Prot10070MHQSendBean("1000003","c8d5fef1b412", MD5.GetMD5Code("1111")));*/
			
			/*Prot10071MHQUpdate   p71 = new Prot10071MHQUpdate() ;
			p71.dealLoginMHQ(create, new Prot10071MHQSendBean("1000003","c8d5fef1b412",MD5.GetMD5Code("1111"),MD5.GetMD5Code("0000")));
			
			System.out.println(p71.getResMsgBean());*/
			
			/*Prot10069MHQGetProduct  p69 = new Prot10069MHQGetProduct();
			System.out.println(create.getsInspectorId());

			p69.dealGetMHQProduct(create, new Prot10069SeedMHQBean(create.getsInspectorId()));
			System.out.println(p69.getRes().getList());*/
			
			/*Prot17GetProducts products = new Prot17GetProducts();
			products.dealProductList_V2(create ,new Prot17GetProducts.CallBack_V2() {

				@Override
				public void okData(List<Product> products, int iTotalCount,
						int iCurrentRecCount) {
					// TODO Auto-generated method stub
					System.out.println(products.get(0).getName());
				}

				@Override
				public void errData(String err, int iRecErrCode) {
					// TODO Auto-generated method stub
					
				}
				
				
			});*/
									
		  /*  System.out.println(create.getiCompanyId());			
			Prot10067MHQJiHuo  p67 = new Prot10067MHQJiHuo();
			String com  = String.valueOf(create.getiCompanyId());
			String product_id = "100001";
			String start_label_id = "1002189000005940";
			String end_label_id = "1002189000005940";
			String check_date = "2016-12-25";
			String address = "瑞普大夏";
			String area_id = "1050118";
			String check_user = "李扬";
			String check_user_tel = "15726673655";
			
			p67.dealActiveMHQ(create, new Prot10067SendMHQBean(com, product_id, start_label_id, end_label_id, check_date, address, area_id, check_user, check_user_tel));
		
			System.out.println(p67.getResMsgBean().getResult()+"--"+p67.getResMsgBean().getErrcode());*/
			
			
			/*Prot10065SeedsGetLand  p65 = new Prot10065SeedsGetLand();
			p65.dealGetDealer(create);
			
			System.out.println(p65.getRes());*/

			/*Prot10063SeedsJiHuo p63 = new Prot10063SeedsJiHuo();
			
			p63.dealActiveSeeds(create, new Prot10063SeedSendBean("10007",
					"2015-12-23 12:00:00", "0254", "", "12","13","11110",
					"1002185616173760", "1002185666160458"));
			
			System.out.println(p63.getResMsgBean());*/
			
			/*1002185643771657
			 * Prot10064SeedsGetZhengShu p64 = new Prot10064SeedsGetZhengShu();
			 * p64.dealGetDealer(create); List<Prot10064ZhengShuBean> res =
			 * p64.getRes().getList(); //System.out.println();// 让齐向辉吧null去掉
			 * 变成[]
			 * 
			 * if (res.size() != 1 && res.get(0) != null) {
			 * System.out.println(res); }
			 */

			// 10059云天化激活
			// Prot10059JiHuoYTH p59 = new Prot10059JiHuoYTH();
			// p59.dealRuKuNewWine(create, new Prot10059SendBeanYTH("100001",
			// "", "2016-10-11 00:00:00", "999888", "654321",
			// "1000010026833575", "1000010026854595"));
			// p59.dealJiHuo(create, new Prot10059SendBeanYTH("100001",
			// "1000010026912520", "2016-10-12 00:00:00", "999888", "654321",
			// "", ""));

			// System.out.println(p59.getRes().getResult());

			/*
			 * Prot10018activate p18 = new Prot10018activate();
			 * p18.dealLabelList( create, new Prot10018SendBean(
			 * String.valueOf(create.getiCompanyId()), "1", "liyang",
			 * "20111112", "110", "", "1000010037814000", "1000010037814000",
			 * new Prot10018SendBeanPlan(1, " ", " ")));
			 * 
			 * Prot10018ActivateBean a = p18.getResBean();
			 * System.out.println(a.getErrcode() + a.getErrmsg() + a.getResult()
			 * + a.getFail_num() +a.getNong_chan_pin());
			 */

			/*
			 * Prot10016ProlistHandset p16 = new Prot10016ProlistHandset();
			 * Prot10016ProductBean bean = new Prot10016ProductBean();
			 * bean.setAll_wine(false); bean.setCompany_id("");
			 * bean.setDevice_id("458000280"); bean.setMode(1);
			 * 
			 * p16.dealProductList(create, bean);
			 */
		
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			new Prot02Logout().dealLogout(create);
		}
	}
//	}
}
