package com.engine.kq.wfset.attendance.domain;


/**
 * 考勤字段对应基础信息
 * @author wcd
 * @version 1.0 2015-04-24
 */
public class HrmAttProcFields {

	private Long id;
	private Long mfid;
	private String labelName;
	private Integer languageid;
	private Integer field001;
	private String field002;
	private String field003;
	private String field004;
	private Integer field005;
	private Integer field006;
	private Integer field007;
	private String field008;
	private Double field009;
	private Integer field010;
	
	public HrmAttProcFields() {
		this(true);
	}

	public HrmAttProcFields(boolean arg) {
		if(arg) init();
	}

	public void init() {
		this.id = 0L;
		this.mfid = 0L;
		this.labelName = "";
		this.languageid = 7;
		this.field001 = 0;
		this.field002 = "";
		this.field003 = "";
		this.field004 = "";
		this.field005 = 0;
		this.field006 = 0;
		this.field007 = 0;
		this.field008 = "";
		this.field009 = 0.00;
		this.field010 = 0;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return id;
	}

	public void setMfid(Long mfid) {
		this.mfid = mfid;
	}

	public Long getMfid() {
		return mfid;
	}

	public void setField001(Integer field001) {
		this.field001 = field001;
	}

	public Integer getField001() {
		return field001;
	}

	public void setField002(String field002) {
		this.field002 = field002;
	}

	public String getField002() {
		return field002;
	}

	public void setField003(String field003) {
		this.field003 = field003;
	}

	public String getField003() {
		return field003;
	}

	public void setField004(String field004) {
		this.field004 = field004;
	}

	public String getField004() {
		return field004;
	}

	public void setField005(Integer field005) {
		this.field005 = field005;
	}

	public Integer getField005() {
		return field005;
	}

	public void setField006(Integer field006) {
		this.field006 = field006;
	}

	public Integer getField006() {
		return field006;
	}

	public void setField007(Integer field007) {
		this.field007 = field007;
	}

	public Integer getField007() {
		return field007;
	}

	public void setField008(String field008) {
		this.field008 = field008;
	}

	public String getField008() {
		return field008;
	}

	public void setField009(Double field009) {
		this.field009 = field009;
	}

	public Double getField009() {
		return field009;
	}

	public void setField010(Integer field010) {
		this.field010 = field010;
	}

	public Integer getField010() {
		return field010;
	}
	
	public String getField005Title(){
		String title = "";
		switch (field005) {
		case 1:
			switch (field006) {
			case 2:
				title = "696";
				break;
			case 3:
				title = "697";
				break;
			default :
				title = "688";
				break;
			}
			break;
		case 2:
			title = "689";
			break;
		case 3:
			title = getField006Description();
			break;
		case 4:
			title = "691";
			break;
		case 5:
			if(this.field002.equals("otype")) {
			  title = "83955,690,81913,125804,125163,125805,81914";
      }else if(this.field002.equals("detail_signtype")){
        title = "83955,690,81913,21974,125163,21975,81914";
      }else if(this.field002.equals("changetype")){
        title = "83955,690,81913,19899,125163,16210,81914";
      }else if("overtime_type".equalsIgnoreCase(this.field002) || "detail_overtime_type".equalsIgnoreCase(this.field002)) {
        title = "530091";
      }else {
			  title = "690";
      }
			break;
		case 6:
			title = "21691";
			break;
		case 7:
			title = "156";
			break;
		}
		return title;
	}
	
	public String getField006Description() {
		String result = "";
		String[] desc = {"","23189","97","779","23188","711","515","136","101","58",
				"754","762","406","704","777","778","648","839","840","277",
				"842","843","854","535","357","831","920","1932","2103","6099",
				"818","804","6156","6159","1881","6160","6083","6163","6166","",
				"","","","","","","","","","",
				"","","","","","","","17006","",""};
		if(this.field001 == 5 && this.field002.equals("newShift") && this.field005 == 3) result = "125829";
		else if(this.field006 < desc.length && this.field006 >= 0) result = desc[this.field006];
		return result + (result.length() != 0 ? "," : "") + "695";
	}

	public String getLabelName() {
		return labelName;
	}

	public void setLabelName(String labelName) {
		this.labelName = labelName;
	}

	public Integer getLanguageid() {
		return languageid;
	}

	public void setLanguageid(Integer languageid) {
		this.languageid = languageid;
	}

}
