/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.workitem.entity;

import javax.validation.constraints.NotNull;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeeplus.common.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.workcatalogueitem.entity.WorkCatalogueItem;

/**
 * 物品一览表Entity
 * @author chenyuping
 * @version 2018-07-13
 */
public class WorkItem extends DataEntity<WorkItem> {
	
	private static final long serialVersionUID = 1L;
	private String officeId;		// 所属部门
	private String companyId;		// 所属公司
	private WorkCatalogueItem workCatalogueItem;		// 物品目录Id
	private String isAssets;		// 是否是固定资产（0否1是）
	private Integer itemCount;		// 物品数量
	private String state;		// 固定资产状态（1正常2借用3领用4报废）
	private String number;		// 固定资产编号
	private String endUser;		// 使用人
	private Date userDate;		// 使用时间
	private String userOfficeId;		// 使用部门
	private String userOfficeName;
	private String endUserName;
	private String catalogueItemId;
	private Date endDate;
	private Date beginDate;
	private String branchOffice ;

	public String getBranchOffice() {
		return branchOffice;
	}

	public void setBranchOffice(String branchOffice) {
		this.branchOffice = branchOffice;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public String getCatalogueItemId() {
		return catalogueItemId;
	}

	public void setCatalogueItemId(String catalogueItemId) {
		this.catalogueItemId = catalogueItemId;
	}

	private String itemName;

	public String getItemName() {
		return itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}

	public String getUserOfficeName() {
		return userOfficeName;
	}

	public void setUserOfficeName(String userOfficeName) {
		this.userOfficeName = userOfficeName;
	}

	public String getEndUserName() {
		return endUserName;
	}

	public void setEndUserName(String endUserName) {
		this.endUserName = endUserName;
	}


	public WorkItem() {
		super();
	}

	public WorkItem(String id){
		super(id);
	}

	@ExcelField(title="所属部门", align=2, sort=7)
	public String getOfficeId() {
		return officeId;
	}

	public void setOfficeId(String officeId) {
		this.officeId = officeId;
	}
	
	@ExcelField(title="所属公司", align=2, sort=8)
	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	public WorkCatalogueItem getWorkCatalogueItem() {
		return workCatalogueItem;
	}

	public void setWorkCatalogueItem(WorkCatalogueItem workCatalogueItem) {
		this.workCatalogueItem = workCatalogueItem;
	}

	@ExcelField(title="是否是固定资产（0否1是）", align=2, sort=10)
	public String getIsAssets() {
		return isAssets;
	}

	public void setIsAssets(String isAssets) {
		this.isAssets = isAssets;
	}
	
	@NotNull(message="物品数量不能为空")
	@ExcelField(title="物品数量", align=2, sort=11)
	public Integer getItemCount() {
		return itemCount;
	}

	public void setItemCount(Integer itemCount) {
		this.itemCount = itemCount;
	}
	
	@ExcelField(title="固定资产状态（1正常2借用3领用4报废）", align=2, sort=12)
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
	@ExcelField(title="固定资产编号", align=2, sort=13)
	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}
	
	@ExcelField(title="使用人", align=2, sort=14)
	public String getEndUser() {
		return endUser;
	}

	public void setEndUser(String endUser) {
		this.endUser = endUser;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="使用时间不能为空")
	@ExcelField(title="使用时间", align=2, sort=15)
	public Date getUserDate() {
		return userDate;
	}

	public void setUserDate(Date userDate) {
		this.userDate = userDate;
	}
	
	@ExcelField(title="使用部门", align=2, sort=16)
	public String getUserOfficeId() {
		return userOfficeId;
	}

	public void setUserOfficeId(String userOfficeId) {
		this.userOfficeId = userOfficeId;
	}
	
}