package com.zfire.mall.manager.bean.k3.bill;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.zfire.mall.manager.constant.KingDeeCons;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

@ApiModel
@Data
@JsonIgnoreProperties(value = { "projectCode", "departmentId","walletId","incomeDept"})
public class OtherReceItemBean  {

    @JsonProperty("FEntryID")
    @ApiModelProperty(value = "实体主键", required = false)
    private String receivableOrderId;

    @ApiModelProperty(value = "费用项目编码", required = true)
    private String projectCode;
    @JsonProperty("FCOSTID")
    private Map<String, String> FCOSTID =  new HashMap<String, String>() {
        {
            this.put(KingDeeCons.NUMBER, "");
        }
    };

    @JsonProperty("FAMOUNTFOR_D")
    @ApiModelProperty(value = "总金额", required = false)
    private BigDecimal  totalAmount;

    @ApiModelProperty(value = "费用承担部门", required = true)
    private String  departmentId;
    @JsonProperty("FCOSTDEPARTMENTID")
    private Map<String, String> costdeptId = new HashMap<>();

    @JsonProperty("FINVOICETYPE")
    @ApiModelProperty(value = "发票类型", required = true)
    private String invoiceType ;


    @JsonProperty("FEntryTaxRate")
    @ApiModelProperty(value = "税率", required = false)
    private BigDecimal taxRate ;

    @JsonProperty("FTAXAMOUNTFOR")
    @ApiModelProperty(value = "税额", required = false)
    private BigDecimal tax ;


    @ApiModelProperty(value = "钱包", required = true)
    private String  walletId;
    @JsonProperty("F_kls_Assistant")
    private Map<String, String> assistant = new HashMap<>();

    @JsonProperty("FNOTAXAMOUNTFOR")
    @ApiModelProperty(value = "不含税金额")
    private BigDecimal afterTaxAmount;

    @JsonProperty("FCOMMENT")
    @ApiModelProperty(value = "备注")
    private String remark;

    @JsonProperty("F_KLS_AMOUNT")
    @ApiModelProperty(value = "总辅助金额")
    private BigDecimal lastAmount;

    @ApiModelProperty(value = "收入部门")
    private String incomeDept;
    @JsonProperty("F_kls_Base1")
    private Map<String, String> klsBase = new HashMap<String, String>();


    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
        this.FCOSTID.put(KingDeeCons.NUMBER, this.projectCode);
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
        this.costdeptId.put(KingDeeCons.NUMBER, this.departmentId);
    }

    public void setWalletId(String walletId) {
        this.walletId = walletId;
        this.assistant.put(KingDeeCons.NUMBER, this.walletId);
    }

    public void setIncomeDept(String incomeDept) {
        this.incomeDept = incomeDept;
        this.klsBase.put(KingDeeCons.NUMBER, this.incomeDept);
    }

}
