package com.ruoyi.report.vo;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import com.ruoyi.common.constant.IpcType;
import com.ruoyi.common.constant.PatentType;
import com.ruoyi.report.domain.RzlIpcStatisticsInfo;

public class IpcStatisticsInfoVo {
	
	
	private String type;
	private String typeName;
	

	
	//key:patentType
	private Map<String,IpcStatisticsInfo>datas;
	
	public IpcStatisticsInfoVo() {
		this.datas=new LinkedHashMap<String, IpcStatisticsInfo>();
		this.datas.put(PatentType.INVENTION_PATENT.getTypeCode(), getInitIpcStatisticsInfo(type,PatentType.INVENTION_PATENT.getTypeName()));
		this.datas.put(PatentType.MODEL_UTILITY.getTypeCode(), getInitIpcStatisticsInfo(type,PatentType.MODEL_UTILITY.getTypeName()));
		this.datas.put(PatentType.APPEARANCE_PATENT.getTypeCode(), getInitIpcStatisticsInfo(type,PatentType.APPEARANCE_PATENT.getTypeName()));
	}
	
	public IpcStatisticsInfoVo(String type) {
		this.type=type;
		IpcType ipcType=IpcType.valueOf(type);
		this.typeName=ipcType==null?type:ipcType.getTypeName();
		this.datas=new LinkedHashMap<String, IpcStatisticsInfo>();
		
		this.datas.put(PatentType.INVENTION_PATENT.getTypeCode(), getInitIpcStatisticsInfo(type,PatentType.INVENTION_PATENT.getTypeName()));
		this.datas.put(PatentType.MODEL_UTILITY.getTypeCode(), getInitIpcStatisticsInfo(type,PatentType.MODEL_UTILITY.getTypeName()));
		this.datas.put(PatentType.APPEARANCE_PATENT.getTypeCode(), getInitIpcStatisticsInfo(type,PatentType.APPEARANCE_PATENT.getTypeName()));
	}
	
	private IpcStatisticsInfo getInitIpcStatisticsInfo(String type,String patentTypeName) {
		IpcStatisticsInfo info=new IpcStatisticsInfo();
		info.setType(type);
		
		info.setPatentType(patentTypeName);
		info.setNumber(0L);
		info.setHigherSchool(0L);
		info.setResearchInstitute(0L);
		info.setEnterprise(0L);
		info.setInstitutions(0L);
		info.setIndividual(0L);
		
		return info;
	}
	


	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public Map<String, IpcStatisticsInfo> getDatas() {
		return datas;
	}

	public void setDatas(Map<String, IpcStatisticsInfo> datas) {
		this.datas = datas;
	}

	
	
	

}
