package com.foreverwin.mesnac.dataimport.service;

import java.util.HashMap;
import java.util.Map;


/**
 * 导入模板字段定义
 *
 */
public class MasterObjectDefine {

	 private static Map<String,String> cvsHeadsMapping = null;

	 public static Map<String,String> getHeadsMapping(String objectType){

	 	switch (objectType){
			//物料
			case "ITEM":
				cvsHeadsMapping = new HashMap<>();

				cvsHeadsMapping.put("seqNum","序号");
				cvsHeadsMapping.put("item", "物料编码");
				cvsHeadsMapping.put("itemDesc", "物料描述（中文）");
				cvsHeadsMapping.put("materialType", "物料类型(原始|半成品|已完成)");
				cvsHeadsMapping.put("itemType", "采购类型(采购|制造/采购|制造)");
				cvsHeadsMapping.put("lotSize","批次大小");
				cvsHeadsMapping.put("qtyRestriction","数量限制(仅1.0|任意数字|整数)");
				cvsHeadsMapping.put("unit","计量单位");

				break;

			//资源类型
			case "RESOURCE_TYPE":
				cvsHeadsMapping = new HashMap();

				cvsHeadsMapping.put("seqNum","序号");
				cvsHeadsMapping.put("resourceType","*设备(资源)类型命名（英文）");
				cvsHeadsMapping.put("description","描述");
				break;

			//资源主数据
			case "RESOURCE":
				cvsHeadsMapping = new HashMap();

				cvsHeadsMapping.put("seqNum", "序号");
				cvsHeadsMapping.put("resource", "*设备（资源）命名（英文）");
				cvsHeadsMapping.put("description", "设备（资源）描述");
				cvsHeadsMapping.put("defaultOperation", "默认操作");
				cvsHeadsMapping.put("status", "设备（资源）状态"	);
				cvsHeadsMapping.put("setupStatus", "设置状态");
				cvsHeadsMapping.put("processResource", "工艺资源");
				cvsHeadsMapping.put("resourceType", "设备(资源)类型");
				cvsHeadsMapping.put("validFrom", "资源有效期从");
				cvsHeadsMapping.put("validTo", "资源有效期到");
			 	cvsHeadsMapping.put("certificate", "证明编号");
			 	break;

			//工作中心主数据
			case "WORK_CENTER":
				cvsHeadsMapping = new HashMap();

				cvsHeadsMapping.put("seqNum", "序号");
				cvsHeadsMapping.put("workCenter", "*工作中心名称(英文)");
				cvsHeadsMapping.put("descriptionZH", "工作中心描述（中文）");
				cvsHeadsMapping.put("descriptionEN", "工作中心描述（英文）");
				cvsHeadsMapping.put("status", "状态");
				cvsHeadsMapping.put("releaseTo", "SFC下达到此工作中心");
				cvsHeadsMapping.put("wcCategory", "工作中心类别(线/区域)");
				cvsHeadsMapping.put("wcType", "工作中心类型(生产/转移)");
				cvsHeadsMapping.put("memberSeq", "序列号");
				cvsHeadsMapping.put("memberType", "子工作中心类型");
				cvsHeadsMapping.put("memberGBO", "工作中心或资源");
				cvsHeadsMapping.put("ERPWC", "ERP 工作中心");
				cvsHeadsMapping.put("isERPWC", "是 ERP 工作中心");
				break;

			//工序主数据
			case "OPERATION":
			    cvsHeadsMapping = new HashMap();

		    	cvsHeadsMapping.put("seqNum","序号");
		    	cvsHeadsMapping.put("operation", "*关键工序名称（英文）");
		    	cvsHeadsMapping.put("version", "*关键工序版本");
		    	cvsHeadsMapping.put("currentVersion", "当前版本(是/否)");
		    	cvsHeadsMapping.put("status", "*状态");
		    	cvsHeadsMapping.put("descriptionZH", "关键工序描述（中文）");
		    	cvsHeadsMapping.put("descriptionEN", "关键工序描述（英文）");
		    	cvsHeadsMapping.put("operationType", "*操作类型");
		    	cvsHeadsMapping.put("resourceType", "*设备（资源）类型");
		    	cvsHeadsMapping.put("defaultResource", "默认设备（资源）");
			 	break;

			//不合格代码组
	 		case "NC_GROUP":
			    cvsHeadsMapping = new HashMap<>();

			    cvsHeadsMapping.put("seqNum","序号");
			    cvsHeadsMapping.put("ncGroup","*不合格组名称（英文）");
			    cvsHeadsMapping.put("description","不合格组描述");
			    cvsHeadsMapping.put("applyAll","用于所有操作");
			    cvsHeadsMapping.put("applyOperation","不合格组分配的操作");
		     	break;

			//不合格代码
		 	case "NC_CODE":
			    cvsHeadsMapping = new HashMap<>();

			    cvsHeadsMapping.put("seqNum","序号");
			    cvsHeadsMapping.put("ncGroup","*不合格代码组名称（英文）");
			    cvsHeadsMapping.put("ncCode","*不合格代码（英文）");
			    cvsHeadsMapping.put("descZH","不合格代码描述（中文）");
			    cvsHeadsMapping.put("descEN","不合格代码描述（英文）");
			    cvsHeadsMapping.put("category","不合格类别");
			    cvsHeadsMapping.put("dataType","不合格数据类型");
			    cvsHeadsMapping.put("dispositionRouter","处置工艺路线");
			    cvsHeadsMapping.put("canBePrimaryCode","是否可以是主要代码");
			    cvsHeadsMapping.put("closureRequired","是否需要关闭");
			    cvsHeadsMapping.put("autoClosePrimary","自动关闭主NC");
			    cvsHeadsMapping.put("autoCloseIncident","自动关闭事故");
			    cvsHeadsMapping.put("secondaryRequireForClose","需要次级代码关闭");
			    cvsHeadsMapping.put("secondaryCode","次要不良项");
			    cvsHeadsMapping.put("maxNcLimit","NC限制最大值");
			    cvsHeadsMapping.put("dispositionOperation","有效操作");
			    cvsHeadsMapping.put("dispositionGroup","处置组");
			    cvsHeadsMapping.put("dispositionGroupStatus","处置组状态");

		     	break;

			//消息类型
			case "MESSAGE_TYPE":
				cvsHeadsMapping = new HashMap<>();

				cvsHeadsMapping.put("seqNum","序号");
				cvsHeadsMapping.put("seqNum","消息类型");
				cvsHeadsMapping.put("seqNum","消息正文");
				cvsHeadsMapping.put("seqNum","响应用户组");
				cvsHeadsMapping.put("seqNum","响应用户组");
				cvsHeadsMapping.put("seqNum","响应时间(H)");
				cvsHeadsMapping.put("seqNum","响应超期上报用户组");
				cvsHeadsMapping.put("seqNum","出具方案时间(H)");
				cvsHeadsMapping.put("seqNum","方案关闭时通知用户组");
				cvsHeadsMapping.put("seqNum","纠正预防措施用户组");
				cvsHeadsMapping.put("seqNum","纠正预防措施时间");
				break;

			case "INSPECTION_ITEM":
				cvsHeadsMapping = new HashMap<>();

				cvsHeadsMapping.put("seqNum","序号");
				cvsHeadsMapping.put("inspectionType","检验流程");
                cvsHeadsMapping.put("inspectionItemNo","检验项目编号");
                cvsHeadsMapping.put("description","检验项目描述");
                cvsHeadsMapping.put("revision","版本");
                cvsHeadsMapping.put("item","物料编码");
				cvsHeadsMapping.put("operation","工序");
				cvsHeadsMapping.put("resrceType","资源类型");
				cvsHeadsMapping.put("paramNo","参数名称");
				cvsHeadsMapping.put("paramDescription","参数描述");
				cvsHeadsMapping.put("inspectionMethod","检验方法");
				cvsHeadsMapping.put("paramType","数据类型");
                cvsHeadsMapping.put("decimalNum","小数位数");
                cvsHeadsMapping.put("paramUnit","单位");
                cvsHeadsMapping.put("maxValue","规格上限");
                cvsHeadsMapping.put("standardValue","目标规格");
                cvsHeadsMapping.put("minValue","规格下限");
                cvsHeadsMapping.put("falseValue","FALSE值");
                cvsHeadsMapping.put("trueValue","TRUE值");
                cvsHeadsMapping.put("isRequired","是否重要项目");
                cvsHeadsMapping.put("checkNum","收集次数");
                break;

			//刀具
			case "TOOL":
				cvsHeadsMapping = new HashMap<>();

				cvsHeadsMapping.put("tool","刀具");
				cvsHeadsMapping.put("description","描述");
				cvsHeadsMapping.put("specification","规格");
				cvsHeadsMapping.put("brand","品牌");
				cvsHeadsMapping.put("remark","备注");
				break;

			case "USER_RESOURCE":
				cvsHeadsMapping = new HashMap<>();
				cvsHeadsMapping.put("resrce","资源编码");
				cvsHeadsMapping.put("resrceDescription","资源描述");
				cvsHeadsMapping.put("userId","员工编号");
				cvsHeadsMapping.put("userDescription","员工姓名");
				cvsHeadsMapping.put("temporaryUser","是否临时员工");
				cvsHeadsMapping.put("status","是否有效");
				break;

		 	default:
			 	break;
		 }


		return cvsHeadsMapping;
	 }

}
