package com.casic.missiles.dto.cockpit;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Objects;

/**
 * @Description:
 * @Author: wangpeng
 * @Date: 2023/6/15 9:53
 */
@ApiModel
@Data
public class ManageTrendResponse {
    @ApiModelProperty(value = "月份", dataType = "String")
    private String dimension;
    @ApiModelProperty(value = "营收金额(分)", dataType = "Integer")
    private Integer amount;
    @ApiModelProperty(value = "营收金额(元)", dataType = "String")
    private String amountYuan;
    public String getAmountYuan() {
        if(Objects.nonNull(amount)){
            amountYuan = BigDecimal.valueOf(amount).divide(BigDecimal.valueOf(100), 2, BigDecimal.ROUND_HALF_UP).toPlainString();
        }
        return amountYuan;
    }

    //过渡计算使用
    @JSONField(serialize = false)
    @ApiModelProperty(hidden = true)
    private String orderId;
    @JSONField(serialize = false)
    @ApiModelProperty(hidden = true)
    private Integer suggestedDiscount;
    @JSONField(serialize = false)
    @ApiModelProperty(hidden = true)
    private Integer extraCharge;
    @JSONField(serialize = false)
    @ApiModelProperty(hidden = true)
    private Integer postPrice;

    //山海鲸使用参数
    @ApiModelProperty(value = "月份", dataType = "String")
    private String 月份;
    public String get月份() {
        return this.dimension;
    }

    @ApiModelProperty(value = "营收金额(元)", dataType = "String")
    private String 营收金额;
    public String get营收金额() {
        return this.amountYuan;
    }
}
