package com.ydtech.modules.admin.model.dto; import com.ydtech.modules.order.entity.BasePageResult; import com.ydtech.utils.BigDecimalUtils; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; /** * @version * @author: hxl * @Date: 2024/6/19 10:04 * @Description: 预收明细列表对象 */ @Data @ApiModel("预收明细(收入明细)列表对象") public class MyCollectInAdvanceAllDto { /*** * 收入金额 */ @ApiModelProperty(value = "收入金额") private BigDecimal sumAmountSR; /*** * 支出金额 */ @ApiModelProperty(value = "支出金额") private BigDecimal sumAmountZC; /*** * 预收金额 */ @ApiModelProperty(value = "预收金额") private BigDecimal sumAmountYS; @ApiModelProperty("掌柜币显示 /10") private Boolean feeView; @ApiModelProperty(value = "分页数据") BasePageResult data =new BasePageResult<>(); public MyCollectInAdvanceAllDto() { } public MyCollectInAdvanceAllDto(BigDecimal sumAmountSR,BigDecimal sumAmountZC, BasePageResult data, boolean b) { if (b) { this.sumAmountSR = BigDecimalUtils.nullToZero(sumAmountSR).divide(new BigDecimal(10)); this.sumAmountZC = BigDecimalUtils.nullToZero(sumAmountZC).divide(new BigDecimal(10)); }else { this.sumAmountSR = sumAmountSR; this.sumAmountZC = sumAmountZC; } this.data = data; this.feeView = b; } public MyCollectInAdvanceAllDto(BigDecimal sumAmountYS, BasePageResult data, boolean b) { if (b) { this.sumAmountYS = BigDecimalUtils.nullToZero(sumAmountYS).divide(new BigDecimal(10)); }else { this.sumAmountYS = sumAmountYS; } this.data = data; this.feeView = b; } }