MyCollectInAdvanceAllDto.java 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package com.ydtech.modules.admin.model.dto;
  2. import com.ydtech.modules.order.entity.BasePageResult;
  3. import com.ydtech.utils.BigDecimalUtils;
  4. import io.swagger.annotations.ApiModel;
  5. import io.swagger.annotations.ApiModelProperty;
  6. import lombok.Data;
  7. import java.math.BigDecimal;
  8. /**
  9. * @version
  10. * @author: hxl
  11. * @Date: 2024/6/19 10:04
  12. * @Description: 预收明细列表对象
  13. */
  14. @Data
  15. @ApiModel("预收明细(收入明细)列表对象")
  16. public class MyCollectInAdvanceAllDto {
  17. /***
  18. * 收入金额
  19. */
  20. @ApiModelProperty(value = "收入金额")
  21. private BigDecimal sumAmountSR;
  22. /***
  23. * 支出金额
  24. */
  25. @ApiModelProperty(value = "支出金额")
  26. private BigDecimal sumAmountZC;
  27. /***
  28. * 预收金额
  29. */
  30. @ApiModelProperty(value = "预收金额")
  31. private BigDecimal sumAmountYS;
  32. @ApiModelProperty("掌柜币显示 /10")
  33. private Boolean feeView;
  34. @ApiModelProperty(value = "分页数据")
  35. BasePageResult<MyCollectInAdvanceDto> data =new BasePageResult<>();
  36. public MyCollectInAdvanceAllDto() {
  37. }
  38. public MyCollectInAdvanceAllDto(BigDecimal sumAmountSR,BigDecimal sumAmountZC, BasePageResult<MyCollectInAdvanceDto> data, boolean b) {
  39. if (b) {
  40. this.sumAmountSR = BigDecimalUtils.nullToZero(sumAmountSR).divide(new BigDecimal(10));
  41. this.sumAmountZC = BigDecimalUtils.nullToZero(sumAmountZC).divide(new BigDecimal(10));
  42. }else {
  43. this.sumAmountSR = sumAmountSR;
  44. this.sumAmountZC = sumAmountZC;
  45. }
  46. this.data = data;
  47. this.feeView = b;
  48. }
  49. public MyCollectInAdvanceAllDto(BigDecimal sumAmountYS, BasePageResult<MyCollectInAdvanceDto> data, boolean b) {
  50. if (b) {
  51. this.sumAmountYS = BigDecimalUtils.nullToZero(sumAmountYS).divide(new BigDecimal(10));
  52. }else {
  53. this.sumAmountYS = sumAmountYS;
  54. }
  55. this.data = data;
  56. this.feeView = b;
  57. }
  58. }