package com.yunfeiyun.agmp.fms.domain;

import com.yunfeiyun.agmp.common.annotation.Excel;
import com.yunfeiyun.agmp.common.core.domain.BaseEntity;
import com.yunfeiyun.agmp.common.utils.DictUtils;
import com.yunfeiyun.agmp.common.utils.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 地块对象 FmsBlock
 * 
 * @author 杨晓辉
 * @date 2023-05-15
 */
public class FmsBlock extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 地块标识 */
    private String blockId;

    /** 基地标识 */
    @NotBlank(message = "基地标识不能为空")
    @Excel(name = "基地标识")
    private String landId;

    /** 地块名称 */
    @NotBlank(message = "地块名称不能为空")
    @Excel(name = "地块名称")
    private String blockName;

    /** 地块类型 */
    @NotBlank(message = "地块类型不能为空")
    @Excel(name = "地块类型")
    private String blockType;

    /** 地块负责人 */
    @NotBlank(message = "地块负责人不能为空")
    @Excel(name = "地块负责人")
    private String blockManager;

    /** 地块负责人名称 */
    @Excel(name = "地块负责人名称")
    private String blockManagername;

    /** 地块面积 */
    @NotNull(message = "地块面积不能为空")
    @Excel(name = "地块面积")
    private BigDecimal blockArea;

    /** 地块种植面积 */
    @Excel(name = "地块种植面积")
    private BigDecimal blockAreaplant;

    /** 地块坐标范围 */
    @Excel(name = "地块坐标范围")
    private String blockLngrange;

    /** 地块颜色 */
    @Excel(name = "地块颜色")
    private String blockColor;

    /** 地块预览图 */
    @Excel(name = "地块预览图")
    private String blockPreview;

    /** 地块介绍 */
    private String blockRemark;

    @Excel(name = "地块预览图标识")
    private String resIds;

    /** 地块类型名称 */
    @Excel(name = "地块类型名称")
    private String blockTypeContent;



    /**序号*/
    private Integer blockSeq;

    /** 地块名称,用于查询时等于 */
    private String blockNameEq;

    public String getBlockTypeContent() {
        if (!StringUtils.isEmpty(this.blockType)) {
            return DictUtils.getDictLabel("fms_block_type", this.blockType);
        } else {
            return "";
        }
    }

    public void setBlockTypeContent(String blockTypeContent) {
        this.blockTypeContent = blockTypeContent;
    }

    public String getResIds() {
        return resIds;
    }

    public void setResIds(String resIds) {
        this.resIds = resIds;
    }

    public String getBlockRemark() {
        return blockRemark;
    }

    public void setBlockRemark(String blockRemark) {
        this.blockRemark = blockRemark;
    }

    public String getBlockPreview() {
        return blockPreview;
    }

    public void setBlockPreview(String blockPreview) {
        this.blockPreview = blockPreview;
    }

    public void setBlockId(String blockId)
    {
        this.blockId = blockId;
    }

    public String getBlockId()
    {
        return blockId;
    }
    public void setLandId(String landId)
    {
        this.landId = landId;
    }

    public String getLandId()
    {
        return landId;
    }
    public void setBlockName(String blockName)
    {
        this.blockName = blockName;
    }

    public String getBlockName()
    {
        return blockName;
    }
    public void setBlockType(String blockType)
    {
        this.blockType = blockType;
    }

    public String getBlockType()
    {
        return blockType;
    }
    public void setBlockManager(String blockManager)
    {
        this.blockManager = blockManager;
    }

    public String getBlockManager()
    {
        return blockManager;
    }
    public void setBlockManagername(String blockManagername)
    {
        this.blockManagername = blockManagername;
    }

    public String getBlockManagername()
    {
        return blockManagername;
    }
    public void setBlockArea(BigDecimal blockArea)
    {
        this.blockArea = blockArea;
    }

    public BigDecimal getBlockArea()
    {
        return blockArea;
    }
    public void setBlockAreaplant(BigDecimal blockAreaplant)
    {
        this.blockAreaplant = blockAreaplant;
    }

    public BigDecimal getBlockAreaplant()
    {
        return blockAreaplant;
    }
    public void setBlockLngrange(String blockLngrange)
    {
        this.blockLngrange = blockLngrange;
    }

    public String getBlockLngrange()
    {
        return blockLngrange;
    }
    public void setBlockColor(String blockColor)
    {
        this.blockColor = blockColor;
    }

    public String getBlockColor()
    {
        return blockColor;
    }

    public String getBlockNameEq() {
        return blockNameEq;
    }

    public void setBlockNameEq(String blockNameEq) {
        this.blockNameEq = blockNameEq;
    }

    public Integer getBlockSeq() {
        return blockSeq;
    }

    public void setBlockSeq(Integer blockSeq) {
        this.blockSeq = blockSeq;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("blockId", getBlockId())
            .append("landId", getLandId())
            .append("blockName", getBlockName())
            .append("blockType", getBlockType())
            .append("blockManager", getBlockManager())
            .append("blockManagername", getBlockManagername())
            .append("blockArea", getBlockArea())
            .append("blockAreaplant", getBlockAreaplant())
            .append("blockLngrange", getBlockLngrange())
            .append("blockColor", getBlockColor())
            .append("blockPreview", getBlockPreview())
            .append("blockRemark", getBlockRemark())
            .append("resIds", getResIds())
            .append("blockNameEq", getBlockNameEq())
            .toString();
    }
}
