|
|
@ -0,0 +1,307 @@ |
|
|
|
package com.qs.serve.modules.bir.entity; |
|
|
|
|
|
|
|
import java.time.LocalDate; |
|
|
|
import java.io.Serializable; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.*; |
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat; |
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty; |
|
|
|
import lombok.Data; |
|
|
|
import org.hibernate.validator.constraints.Length; |
|
|
|
import org.springframework.format.annotation.DateTimeFormat; |
|
|
|
|
|
|
|
import javax.validation.constraints.NotNull; |
|
|
|
import javax.validation.constraints.NotBlank; |
|
|
|
|
|
|
|
/** |
|
|
|
* 实体类 |
|
|
|
* @author YenHex |
|
|
|
* @since 2023-07-06 |
|
|
|
*/ |
|
|
|
@Data |
|
|
|
@TableName("bir_activity_center_goods") |
|
|
|
public class BirActivityCenterGoods implements Serializable { |
|
|
|
|
|
|
|
private static final long serialVersionUID = 1L; |
|
|
|
|
|
|
|
/** id */ |
|
|
|
@TableId(type = IdType.AUTO) |
|
|
|
private Long id; |
|
|
|
|
|
|
|
/** 活动费用明细 */ |
|
|
|
@NotNull(message = "活动费用明细不能为空") |
|
|
|
private Long activityCenterGoodsId; |
|
|
|
|
|
|
|
/** 年月 */ |
|
|
|
@NotNull(message = "年月不能为空") |
|
|
|
private Integer yearMonth; |
|
|
|
|
|
|
|
/** 天数 */ |
|
|
|
@NotNull(message = "天数不能为空") |
|
|
|
private Integer days; |
|
|
|
|
|
|
|
/** 开始日期 */ |
|
|
|
@NotNull(message = "开始日期不能为空") |
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|
|
|
private LocalDate starDate; |
|
|
|
|
|
|
|
/** 结束日期 */ |
|
|
|
@NotNull(message = "结束日期不能为空") |
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|
|
|
private LocalDate endDate; |
|
|
|
|
|
|
|
/** 分配的预算金额 */ |
|
|
|
@NotNull(message = "分配的预算金额不能为空") |
|
|
|
private BigDecimal splitAmount; |
|
|
|
|
|
|
|
/** 分配的核销金额 */ |
|
|
|
@NotNull(message = "分配的核销金额不能为空") |
|
|
|
private BigDecimal splitUsedAmount; |
|
|
|
|
|
|
|
/** 成本明细编码 */ |
|
|
|
@Length(max = 30,message = "成本明细编码长度不能超过30字") |
|
|
|
private String centerGoodsCode; |
|
|
|
|
|
|
|
/** 费用申请id */ |
|
|
|
@NotNull(message = "费用申请id不能为空") |
|
|
|
private Long costApplyId; |
|
|
|
|
|
|
|
/** 活动id */ |
|
|
|
@NotNull(message = "活动id不能为空") |
|
|
|
private Long activityId; |
|
|
|
|
|
|
|
/** 活动编码 */ |
|
|
|
@NotBlank(message = "活动编码不能为空") |
|
|
|
@Length(max = 30,message = "活动编码长度不能超过30字") |
|
|
|
private String activityCode; |
|
|
|
|
|
|
|
/** 科目id */ |
|
|
|
@NotNull(message = "科目id不能为空") |
|
|
|
private Long subjectId; |
|
|
|
|
|
|
|
/** 科目编码 */ |
|
|
|
@NotBlank(message = "科目编码不能为空") |
|
|
|
@Length(max = 50,message = "科目编码长度不能超过50字") |
|
|
|
private String subjectCode; |
|
|
|
|
|
|
|
/** 科目名称 */ |
|
|
|
@NotBlank(message = "科目名称不能为空") |
|
|
|
@Length(max = 50,message = "科目名称长度不能超过50字") |
|
|
|
private String subjectName; |
|
|
|
|
|
|
|
/** 成本中心类型 */ |
|
|
|
@NotBlank(message = "成本中心类型不能为空") |
|
|
|
@Length(max = 50,message = "成本中心类型长度不能超过50字") |
|
|
|
private String centerType; |
|
|
|
|
|
|
|
/** 成本中心id */ |
|
|
|
@NotBlank(message = "成本中心id不能为空") |
|
|
|
@Length(max = 32,message = "成本中心id长度不能超过32字") |
|
|
|
private String centerId; |
|
|
|
|
|
|
|
/** 成本中心编码 */ |
|
|
|
@NotBlank(message = "成本中心编码不能为空") |
|
|
|
@Length(max = 50,message = "成本中心编码长度不能超过50字") |
|
|
|
private String centerCode; |
|
|
|
|
|
|
|
/** 成本中心名称 */ |
|
|
|
@NotBlank(message = "成本中心名称不能为空") |
|
|
|
@Length(max = 200,message = "成本中心名称长度不能超过200字") |
|
|
|
private String centerName; |
|
|
|
|
|
|
|
/** 成本中心金额 */ |
|
|
|
@NotNull(message = "成本中心金额不能为空") |
|
|
|
private BigDecimal centerAmount; |
|
|
|
|
|
|
|
/** 成本中心占比 */ |
|
|
|
@NotNull(message = "成本中心占比不能为空") |
|
|
|
private BigDecimal centerRate; |
|
|
|
|
|
|
|
/** 费用额度 */ |
|
|
|
@NotNull(message = "费用额度不能为空") |
|
|
|
private BigDecimal centerGoodsAmount; |
|
|
|
|
|
|
|
/** 费用占比 */ |
|
|
|
@NotNull(message = "费用占比不能为空") |
|
|
|
private BigDecimal centerGoodsRate; |
|
|
|
|
|
|
|
/** 已用费用 */ |
|
|
|
@NotNull(message = "已用费用不能为空") |
|
|
|
private BigDecimal usedAmount; |
|
|
|
|
|
|
|
/** 目标类型(brand、category、series、spu、sku) */ |
|
|
|
@NotBlank(message = "目标类型(brand、category、series、spu、sku)不能为空") |
|
|
|
@Length(max = 30,message = "目标类型(brand、category、series、spu、sku)长度不能超过30字") |
|
|
|
private String targetType; |
|
|
|
|
|
|
|
/** 目标id */ |
|
|
|
@NotNull(message = "目标id不能为空") |
|
|
|
private Long targetId; |
|
|
|
|
|
|
|
/** 目标编码 */ |
|
|
|
@NotBlank(message = "目标编码不能为空") |
|
|
|
@Length(max = 30,message = "目标编码长度不能超过30字") |
|
|
|
private String targetCode; |
|
|
|
|
|
|
|
/** 目标名称 */ |
|
|
|
@NotBlank(message = "目标名称不能为空") |
|
|
|
@Length(max = 200,message = "目标名称长度不能超过200字") |
|
|
|
private String targetName; |
|
|
|
|
|
|
|
/** 目标等级路径 */ |
|
|
|
@Length(max = 600,message = "目标等级路径长度不能超过600字") |
|
|
|
private String targetLevelPathIds; |
|
|
|
|
|
|
|
/** 目标等级路径 */ |
|
|
|
@Length(max = 800,message = "目标等级路径长度不能超过800字") |
|
|
|
private String targetLevelPathNames; |
|
|
|
|
|
|
|
/** 一级成本中心 */ |
|
|
|
@Length(max = 32,message = "一级成本中心长度不能超过32字") |
|
|
|
private String centerLv1Id; |
|
|
|
|
|
|
|
/** 一级成本中心 */ |
|
|
|
@Length(max = 50,message = "一级成本中心长度不能超过50字") |
|
|
|
private String centerLv1Code; |
|
|
|
|
|
|
|
/** 一级成本中心 */ |
|
|
|
@Length(max = 255,message = "一级成本中心长度不能超过255字") |
|
|
|
private String centerLv1Name; |
|
|
|
|
|
|
|
/** 二级成本中心 */ |
|
|
|
@Length(max = 32,message = "二级成本中心长度不能超过32字") |
|
|
|
private String centerLv2Id; |
|
|
|
|
|
|
|
/** 二级成本中心 */ |
|
|
|
@Length(max = 50,message = "二级成本中心长度不能超过50字") |
|
|
|
private String centerLv2Code; |
|
|
|
|
|
|
|
/** 二级成本中心 */ |
|
|
|
@Length(max = 255,message = "二级成本中心长度不能超过255字") |
|
|
|
private String centerLv2Name; |
|
|
|
|
|
|
|
/** 备注 */ |
|
|
|
@Length(max = 600,message = "备注长度不能超过600字") |
|
|
|
private String remark; |
|
|
|
|
|
|
|
/** 创建时间 */ |
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|
|
|
@TableField(fill = FieldFill.INSERT) |
|
|
|
private LocalDateTime createTime; |
|
|
|
|
|
|
|
/** 最后更新时间 */ |
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|
|
|
@TableField(fill = FieldFill.UPDATE) |
|
|
|
private LocalDateTime updateTime; |
|
|
|
|
|
|
|
/** 所属租户 */ |
|
|
|
@JsonIgnore |
|
|
|
@JsonProperty |
|
|
|
private String tenantId; |
|
|
|
|
|
|
|
/** 活动开始时间 */ |
|
|
|
@NotNull(message = "活动开始时间不能为空") |
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|
|
|
private LocalDate actStartDate; |
|
|
|
|
|
|
|
/** 活动结束时间 */ |
|
|
|
@NotNull(message = "活动结束时间不能为空") |
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|
|
|
private LocalDate actEndDate; |
|
|
|
|
|
|
|
/** 预算开始时间 */ |
|
|
|
@NotNull(message = "预算开始时间不能为空") |
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|
|
|
private LocalDate preStartDate; |
|
|
|
|
|
|
|
/** 预算结束时间 */ |
|
|
|
@NotNull(message = "预算结束时间不能为空") |
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|
|
|
private LocalDate preEndDate; |
|
|
|
|
|
|
|
/** 预计核销时间 */ |
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|
|
|
private LocalDate preCheckDate; |
|
|
|
|
|
|
|
/** 客户id */ |
|
|
|
@NotNull(message = "客户id不能为空") |
|
|
|
private Long supplierId; |
|
|
|
|
|
|
|
/** 客户编码 */ |
|
|
|
@NotBlank(message = "客户编码不能为空") |
|
|
|
@Length(max = 30,message = "客户编码长度不能超过30字") |
|
|
|
private String supplierCode; |
|
|
|
|
|
|
|
/** 客户名称 */ |
|
|
|
@NotBlank(message = "客户名称不能为空") |
|
|
|
@Length(max = 200,message = "客户名称长度不能超过200字") |
|
|
|
private String supplierName; |
|
|
|
|
|
|
|
|
|
|
|
public static BirActivityCenterGoods toNewObject(BirActivityCenterGoods source){ |
|
|
|
BirActivityCenterGoods activityCenterGoods = new BirActivityCenterGoods(); |
|
|
|
activityCenterGoods.setId(source.getId()); |
|
|
|
activityCenterGoods.setActivityCenterGoodsId(source.getActivityCenterGoodsId()); |
|
|
|
activityCenterGoods.setYearMonth(source.getYearMonth()); |
|
|
|
activityCenterGoods.setDays(source.getDays()); |
|
|
|
activityCenterGoods.setStarDate(source.getStarDate()); |
|
|
|
activityCenterGoods.setEndDate(source.getEndDate()); |
|
|
|
activityCenterGoods.setSplitAmount(source.getSplitAmount()); |
|
|
|
activityCenterGoods.setSplitUsedAmount(source.getSplitUsedAmount()); |
|
|
|
activityCenterGoods.setCenterGoodsCode(source.getCenterGoodsCode()); |
|
|
|
activityCenterGoods.setCostApplyId(source.getCostApplyId()); |
|
|
|
activityCenterGoods.setActivityId(source.getActivityId()); |
|
|
|
activityCenterGoods.setActivityCode(source.getActivityCode()); |
|
|
|
activityCenterGoods.setSubjectId(source.getSubjectId()); |
|
|
|
activityCenterGoods.setSubjectCode(source.getSubjectCode()); |
|
|
|
activityCenterGoods.setSubjectName(source.getSubjectName()); |
|
|
|
activityCenterGoods.setCenterType(source.getCenterType()); |
|
|
|
activityCenterGoods.setCenterId(source.getCenterId()); |
|
|
|
activityCenterGoods.setCenterCode(source.getCenterCode()); |
|
|
|
activityCenterGoods.setCenterName(source.getCenterName()); |
|
|
|
activityCenterGoods.setCenterAmount(source.getCenterAmount()); |
|
|
|
activityCenterGoods.setCenterRate(source.getCenterRate()); |
|
|
|
activityCenterGoods.setCenterGoodsAmount(source.getCenterGoodsAmount()); |
|
|
|
activityCenterGoods.setCenterGoodsRate(source.getCenterGoodsRate()); |
|
|
|
activityCenterGoods.setUsedAmount(source.getUsedAmount()); |
|
|
|
activityCenterGoods.setTargetType(source.getTargetType()); |
|
|
|
activityCenterGoods.setTargetId(source.getTargetId()); |
|
|
|
activityCenterGoods.setTargetCode(source.getTargetCode()); |
|
|
|
activityCenterGoods.setTargetName(source.getTargetName()); |
|
|
|
activityCenterGoods.setTargetLevelPathIds(source.getTargetLevelPathIds()); |
|
|
|
activityCenterGoods.setTargetLevelPathNames(source.getTargetLevelPathNames()); |
|
|
|
activityCenterGoods.setCenterLv1Id(source.getCenterLv1Id()); |
|
|
|
activityCenterGoods.setCenterLv1Code(source.getCenterLv1Code()); |
|
|
|
activityCenterGoods.setCenterLv1Name(source.getCenterLv1Name()); |
|
|
|
activityCenterGoods.setCenterLv2Id(source.getCenterLv2Id()); |
|
|
|
activityCenterGoods.setCenterLv2Code(source.getCenterLv2Code()); |
|
|
|
activityCenterGoods.setCenterLv2Name(source.getCenterLv2Name()); |
|
|
|
activityCenterGoods.setRemark(source.getRemark()); |
|
|
|
activityCenterGoods.setCreateTime(source.getCreateTime()); |
|
|
|
activityCenterGoods.setUpdateTime(source.getUpdateTime()); |
|
|
|
activityCenterGoods.setTenantId(source.getTenantId()); |
|
|
|
activityCenterGoods.setActStartDate(source.getActStartDate()); |
|
|
|
activityCenterGoods.setActEndDate(source.getActEndDate()); |
|
|
|
activityCenterGoods.setPreStartDate(source.getPreStartDate()); |
|
|
|
activityCenterGoods.setPreEndDate(source.getPreEndDate()); |
|
|
|
activityCenterGoods.setPreCheckDate(source.getPreCheckDate()); |
|
|
|
activityCenterGoods.setSupplierId(source.getSupplierId()); |
|
|
|
activityCenterGoods.setSupplierCode(source.getSupplierCode()); |
|
|
|
activityCenterGoods.setSupplierName(source.getSupplierName()); |
|
|
|
return activityCenterGoods; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|