/**
 * 
 */
package com.huatek.busi.vo.routinetest.transformer;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.JSONObject;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @ClassName: WindingBushingDCLeakageCurrent
 * @FullClassPath: com.huatek.busi.vo.routinetest.transformer.
 *                 WindingBushingDCLeakageCurrent
 * @Description: 测量绕组连同套管的直流泄露电流
 * @author: Arno
 * @date: Aug 22, 2019 3:23:20 PM
 * @version: 1.0
 */

@Data
@EqualsAndHashCode(callSuper = false)
public class WindingBushingDCLeakageCurrent extends TestBase implements Serializable {

	/** @Fields serialVersionUID : */
	private static final long serialVersionUID = -4930440792826961702L;

	private List<TestItem> items;

	@Data
	class TestItem implements Serializable {

		/** @Fields serialVersionUID : */ 
		private static final long serialVersionUID = 3496381753220803263L;


		/** @Fields item : 试验项目*/
		private String item;

		/** @Fields voltage : 试验电压（kV） */
		private String voltage;

		/** @Fields leakageCurrent : 泄漏电流（μA） */
		private String leakageCurrent;

		/** @Fields standard : 标准（μA） */
		private String standard;

	}

	public static void main(String[] args) {
		WindingBushingDCLeakageCurrent entity = new WindingBushingDCLeakageCurrent  ();	
		entity.setTestContent("测量绕组连同套管的直流泄露电流");
		entity.setTestEquipment("zgs-c240/3型直流高压发生器，No。C2551510");
		entity.setChecker("王科");
		entity.setTester("刘天天");
		entity.setSignature("林冲");
		entity.setRemarks("合格");
		entity.setTestTime(LocalDateTime.of(2018,11,13,12,24,56));
		
		TestItem item1 = entity.new TestItem(); 
		item1.setItem("HV-LV-E");
		item1.setVoltage("60");
		item1.setLeakageCurrent("24");
		item1.setStandard("---");
		
		TestItem item2 = entity.new TestItem(); 
		item2.setItem("LV-hv-E");
		item2.setVoltage("60");
		item2.setLeakageCurrent("24");
		item2.setStandard("---");
		
	
		
		List<TestItem> list = new ArrayList<>();
		list.add(item1);
		list.add(item2);
		entity.setItems(list);
		
		String json = JSONObject.toJSONString(entity);
		System.out.println(json);
		WindingBushingDCLeakageCurrent parseObject = JSONObject.parseObject(json,WindingBushingDCLeakageCurrent.class);
		System.out.println(parseObject);
	
	}
}
