package cn.net.test;

import com.google.gson.Gson;

import cn.net.cpzslibs.prot.Prot02Logout;
import cn.net.cpzslibs.prot.SocketCreate;
import cn.net.cpzslibs.prot.handset.Prot10048BreedAndMach;
import cn.net.cpzslibs.prot.handset.bean.Prot10048SendPutStuffBean;
import cn.net.cpzslibs.prot.handset.bean.Prot10048SendPutStuffData;

public class Handset10048 {
	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 {
			Gson gson = new Gson();
			create.createLoginCpzsHandset(458000280L);
			Prot10048BreedAndMach p48 = new Prot10048BreedAndMach();
			p48.dealPutStuffList(create, new Prot10048SendPutStuffBean(5, new Prot10048SendPutStuffData("10", "大师兄你太帅了我已经爱上你了", "", "", "", 2)));
			
			/*
			 * Prot10048SendBreedBean ben = new Prot10048SendBreedBean(1, new
			 * Prot10048SendBreedData("1", "1", "nihao", "2010-10-10",
			 * "2010-10-11", "1", "ada"));
			 */

			/*Prot10048SendPlantBreedBean ben = new Prot10048SendPlantBreedBean(
					3, new Prot10048SendPlantBreedData("1", "1", "nihao",
							"2010-10-10", "2010-10-11", "1", "ada"));*/

			/*Prot10048SendPlantMachBean ben2 = new Prot10048SendPlantMachBean(4,
					new Prot10048SendPlantMachData("14", "1", "nihao3",
							"2010-10-01", "2010-10-03", "阿斯达十大dsd"));

			Prot10048BreedAndMach p48 = new Prot10048BreedAndMach();

			p48.dealPlantMachManagerList(create, ben2);

			System.out.println("返回的图片id为" + p48.getResPlantMach().getId());*/

			// String jsonData = gson.toJson(ben);
			// System.out.println(jsonData);

			/*
			 * p48.dealMachManagerList(create, new Prot10048SendMachBean(2, new
			 * Prot10048SendMachData("1", "1", "jiji12", "2011-11-11",
			 * "2010-10-11", "ada")));
			 * System.out.println(p48.getResMachBean().getId());
			 */

			/*
			 * “breed_plan_id”:”123” “event_id”:”123” “operator”:”zhang san”
			 * “start_time”:”2010-10-10 10:10:10” “end_time”:”2010-10-10
			 * 10:10:10” “put_stuff_id”:”123” “descripition”:”miao shu”
			 */

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

	}
}
