package cn.net.test;

import cn.net.cpzslibs.prot.Prot02Logout;
import cn.net.cpzslibs.prot.SocketCreate;
import cn.net.cpzslibs.prot.handset.Port10047GetProducts;
import cn.net.cpzslibs.prot.handset.bean.Port10047SendBean;

public class Handset10047 {
	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, "458000280");
		try {

			create.createLoginCpzsHandset(458000280L);
			
			Port10047GetProducts p46 = new Port10047GetProducts();
			/*p46.dealMachList(create, getBean2());
			p46.dealBreedList(create, getBean());
			
			p46.dealPutStuffList(create, getBean3());
			
			p46.dealEventList(create, getBean4());
			p46.dealPlantBreed(create, getBean5());*/
			p46.dealPlantMach(create, getBean6());

		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			new Prot02Logout().dealLogout(create);
		}

	}

	public static Port10047SendBean getBean() {

		Port10047SendBean bean = new Port10047SendBean();
		bean.setType(1);
		bean.setDate_start("");
		bean.setDate_end("");
		return bean;

	}

	public static Port10047SendBean getBean2() {

		Port10047SendBean bean = new Port10047SendBean();
		bean.setType(2);
		bean.setDate_start("");
		bean.setDate_end("");
		return bean;
	}

	public static Port10047SendBean getBean3() {
		Port10047SendBean bean = new Port10047SendBean();
		bean.setType(3);
		bean.setDate_start("");
		bean.setDate_end("");
		return bean;
	}

	public static Port10047SendBean getBean4() {

		Port10047SendBean bean = new Port10047SendBean();
		bean.setType(4);
		bean.setDate_start("");
		bean.setDate_end("");
		return bean;
	}
	public static Port10047SendBean getBean5() {
		
		Port10047SendBean bean = new Port10047SendBean();
		bean.setType(5);
		bean.setDate_start("");
		bean.setDate_end("");
		return bean;
	}
	public static Port10047SendBean getBean6() {
		
		Port10047SendBean bean = new Port10047SendBean();
		bean.setType(6);
		bean.setDate_start("");
		bean.setDate_end("");
		return bean;
	}
}
