MercMiniDeviceDto.java 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. package com.xy.dto;
  2. import cn.hutool.core.date.DateTime;
  3. import com.fasterxml.jackson.annotation.JsonFormat;
  4. import com.xy.utils.Emptys;
  5. import io.swagger.annotations.ApiModelProperty;
  6. import lombok.Data;
  7. import lombok.experimental.Accessors;
  8. import javax.validation.Valid;
  9. import javax.validation.constraints.NotEmpty;
  10. import javax.validation.constraints.NotNull;
  11. import java.math.BigDecimal;
  12. import java.util.List;
  13. public class MercMiniDeviceDto {
  14. @Data
  15. @Accessors(chain = true)
  16. public static class ListOfIdNameVo {
  17. @ApiModelProperty("设备id")
  18. private Long deviceId;
  19. @ApiModelProperty("设备名称")
  20. private String deviceName;
  21. public String getDeviceName() {
  22. return Emptys.check(deviceName) ? deviceName : String.valueOf(deviceId);
  23. }
  24. }
  25. @Data
  26. @Accessors(chain = true)
  27. public static class UpdateInfo {
  28. @NotNull(message = "deviceId不能为空")
  29. @ApiModelProperty("设备id")
  30. private Long deviceId;
  31. @ApiModelProperty("设备名称")
  32. private String deviceName;
  33. @ApiModelProperty("点位id")
  34. private Long placeId;
  35. @ApiModelProperty("线路id")
  36. private Long placeLineId;
  37. @ApiModelProperty("区域id")
  38. private Long districtId;
  39. @ApiModelProperty("经度")
  40. private String lon;
  41. @ApiModelProperty("纬度")
  42. private String lat;
  43. }
  44. @Data
  45. @Accessors(chain = true)
  46. public static class Active {
  47. @NotNull(message = "deviceId不能为空")
  48. @ApiModelProperty("设备id")
  49. private Long deviceId;
  50. }
  51. @Data
  52. @Accessors(chain = true)
  53. public static class Active2 {
  54. @NotEmpty(message = "deviceId不能为空")
  55. @ApiModelProperty("设备id")
  56. private List<Long> deviceId;
  57. @ApiModelProperty(value = "验证管理费", hidden = true)
  58. private Boolean isDeviceCharging = true;
  59. @ApiModelProperty(value = "验证算法费", hidden = true)
  60. private Boolean isDeviceAlgorithmCharging = true;
  61. }
  62. @Data
  63. @Accessors(chain = true)
  64. public static class RestActive {
  65. @NotNull(message = "deviceId不能为空")
  66. @ApiModelProperty("设备id")
  67. private Long deviceId;
  68. @ApiModelProperty("nfcSN")
  69. private String nfcSn;
  70. }
  71. @Data
  72. @Accessors(chain = true)
  73. public static class ActiveVo {
  74. @ApiModelProperty("设备id")
  75. private Long deviceId;
  76. @ApiModelProperty("状态码")
  77. private Integer code;
  78. @ApiModelProperty("状态说明")
  79. private String msg;
  80. }
  81. @Data
  82. @Accessors(chain = true)
  83. public static class BusySate {
  84. @NotNull(message = "设备运营状态不能为空")
  85. @ApiModelProperty("设备运营状态 1 运营中 2 已停运")
  86. private Integer busyState;
  87. @NotNull(message = "deviceId不能为空")
  88. @ApiModelProperty("设备id")
  89. private Long deviceId;
  90. @ApiModelProperty(value = "商户id", hidden = true)
  91. private Long mercId;
  92. }
  93. @Data
  94. @Accessors(chain = true)
  95. public static class HomePageVO {
  96. @Valid
  97. @ApiModelProperty(value = "今日数据")
  98. private DayCountVO day;
  99. @Valid
  100. @ApiModelProperty(value = "本月数据")
  101. private MonthCountVO month;
  102. }
  103. @Data
  104. @Accessors(chain = true)
  105. public static class HomePageMonthDTO {
  106. @ApiModelProperty(value = "日期", required = false)
  107. @JsonFormat(pattern = "yyyy-MM")
  108. private DateTime date;
  109. }
  110. @Data
  111. @Accessors(chain = true)
  112. public static class HomePageDayDTO {
  113. @JsonFormat(pattern = "yyyy-MM-dd")
  114. private DateTime date;
  115. }
  116. @Data
  117. @Accessors(chain = true)
  118. public static class HomePageMonthVO {
  119. @ApiModelProperty(value = "本月收款")
  120. private Integer monthReceivedMoney;
  121. @ApiModelProperty(value = "本月销售-订单金额")
  122. private Integer monthOrderTotalMoney;
  123. @ApiModelProperty(value = "本月销售-到账金额")
  124. private Integer monthOrderRealMoney;
  125. @ApiModelProperty(value = "本月销售-数量")
  126. private Integer monthOrderNum;
  127. @ApiModelProperty(value = "本月订单-未收款金额")
  128. private Integer noPaymentMoney;
  129. @ApiModelProperty(value = "历史订单-未收款金额")
  130. private Integer hisNoPaymentMoney;
  131. }
  132. @Data
  133. @Accessors(chain = true)
  134. public static class HomePageDayVO {
  135. @ApiModelProperty(value = "今日收款")
  136. private Integer todayReceivedMoney;
  137. @ApiModelProperty(value = "今日补收-金额")
  138. private Integer todayFillMoney;
  139. @ApiModelProperty(value = "今日补收-数量")
  140. private Integer todayFillOrderNum;
  141. @ApiModelProperty(value = "今日补退-金额")
  142. private Integer todayHisRefundMoney;
  143. @ApiModelProperty(value = "今日补退-数量")
  144. private Integer todayHisOrderRefundNum;
  145. @ApiModelProperty(value = "今日退款-金额")
  146. private Integer todayOrderRefundMoney;
  147. @ApiModelProperty(value = "今日退款-数量")
  148. private Integer todayOrderRefundNum;
  149. @ApiModelProperty(value = "今日销售-订单金额")
  150. private Integer todayOrderTotalMoney;
  151. @ApiModelProperty(value = "今日销售-到账金额")
  152. private Integer todayOrderRealMoney;
  153. @ApiModelProperty(value = "今日销售-数量")
  154. private Integer todayOrderNum;
  155. @ApiModelProperty(value = "风险单-待处理数量")
  156. private Integer toDoRiskOrderCount;
  157. @ApiModelProperty(value = "风险单-今日处理数量")
  158. private Integer toDayHandleRiskOrderCount;
  159. @ApiModelProperty(value = "风险单-今日新增数量")
  160. private Integer toDayNewRiskOrderCount;
  161. }
  162. @Data
  163. @Accessors(chain = true)
  164. public static class DayCountVO {
  165. @ApiModelProperty(name = "订单总成本价")
  166. private Integer orderTotalPriceCost;
  167. @ApiModelProperty("订单数")
  168. private Integer orderNum;
  169. @ApiModelProperty("销售额")
  170. private Integer salesPrice;
  171. @ApiModelProperty("退款金额")
  172. private Integer refundMoney;
  173. @ApiModelProperty("订单金额")
  174. private Integer orderTotalMoney;
  175. @ApiModelProperty(name = "退款订单数")
  176. private Integer refundOrdersSize;
  177. @ApiModelProperty(name = "补收金额")
  178. private Integer cutPayMoney;
  179. @ApiModelProperty(name = "补收订单数")
  180. private Integer cutOrdersSize;
  181. @ApiModelProperty(name = "补退金额")
  182. private Integer cutRefundMoney;
  183. @ApiModelProperty(name = "补退订单数")
  184. private Integer cutRefundOrdersSize;
  185. @ApiModelProperty(value = "到账金额=付款金额-退款金额")
  186. private Integer dayOrderRealMoney;
  187. @ApiModelProperty(value = "今日毛利率 (销售额-成本)/销售额")
  188. private BigDecimal grossProfitMargin;
  189. @ApiModelProperty(value = "昨日毛利率 (销售额-成本)/销售额")
  190. private BigDecimal hisGrossProfitMargin;
  191. }
  192. @Data
  193. @Accessors(chain = true)
  194. public static class MonthCountVO {
  195. @ApiModelProperty("订单数")
  196. private Integer orderNum;
  197. @ApiModelProperty("销售额")
  198. private Integer salesPrice;
  199. @ApiModelProperty("退款金额")
  200. private Integer refundMoney;
  201. }
  202. }