/**
 * 
 */
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: WindingIronCoreIsulationResistance
  * @FullClassPath: com.huatek.busi.vo.routinetest.transformer.WindingIronCoreIsulationResistance
  * @Description: 测量绕组及铁芯的绝缘电阻
  * @author: Arno
  * @date: Aug 22, 2019 3:28:35 PM
  * @version: 1.0
  */
@Data
@EqualsAndHashCode(callSuper = false)
public class WindingIronCoreIsulationResistance extends TestBase implements Serializable{

	/** @Fields serialVersionUID : */ 
	private static final long serialVersionUID = 5261897136808866091L;
	
	public List<TestItem> items ;

	@Data
	class TestItem  implements Serializable{
		
		/** @Fields serialVersionUID : */ 
		private static final long serialVersionUID = -6464536458067550240L;

		/** @Fields testObject : 被试对象*/ 
		private String item ;
		
		/** @Fields r15 : R15（MΩ）*/ 
		private String r15 = "--" ;
		
		/** @Fields r60 : R60（MΩ）*/ 
		private String r60 = "--";
		
		/** @Fields r600 : R600（MΩ）*/ 
		private String r600 = "--" ;
		
		/** @Fields r60_r15 : R60/R15*/ 
		private String r60_r15 = "--" ;
		
		/** @Fields r600_r60 : R600/R60*/ 
		private String r600_r60 = "--" ;
	}
	
	public static void main(String[] args) {
		WindingIronCoreIsulationResistance core = new WindingIronCoreIsulationResistance  ();	
		core.setTestContent("测量绕组及铁芯的绝缘电阻");
		core.setTestEquipment("数字式绝缘兆欧表，No。200002237");
		core.setChecker("王科");
		core.setTester("刘天天");
		core.setSignature("林冲");
		core.setRemarks("合格");
		core.setTestTime(LocalDateTime.of(2019,11,13,12,24,56));
	
		
		List<TestItem> list =new ArrayList<>();
	
		TestItem item1 = core.new TestItem();
		item1.setItem(TestContant.IronCoreEnum.HV_LV_E.getValue());
		item1.setR15("4000");
		item1.setR60("20000");
		item1.setR600("--");
		item1.setR600_r60("5");
		item1.setR60_r15("--");
		
		TestItem item2 = core.new TestItem();
		item2.setItem(TestContant.IronCoreEnum.LV_HV_E.getValue());
		item2.setR15("3000");
		item2.setR60("10000");
		item2.setR600("--");
		item2.setR600_r60("3,3");
		item2.setR60_r15("--");
		
		TestItem item3 = core.new TestItem();
		item3.setItem(TestContant.IronCoreEnum.TX_HV_LV_E.getValue());
		item3.setR15("--");
		item3.setR60("2000");
		item3.setR600("--");
		item3.setR600_r60("--");
		item3.setR60_r15("--");
		
		TestItem item4 = core.new TestItem();
		item4.setItem(TestContant.IronCoreEnum.JJ_HV_LV_E.getValue());
		item4.setR15("--");
		item4.setR60("2500");
		item4.setR600("--");
		item4.setR600_r60("--");
		item4.setR60_r15("--");
		
		list.add(item1);
		list.add(item2);
		list.add(item3);
		list.add(item4);
		
		core.setItems(list);
		String jsonString = JSONObject.toJSONString(core);
		System.out.println(jsonString);
		WindingIronCoreIsulationResistance parseObject = JSONObject.parseObject(jsonString,WindingIronCoreIsulationResistance.class);
		System.out.println(parseObject);
	}
	
}