| | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.persistence.Column; |
| | | import jakarta.persistence.Entity; |
| | | import jakarta.persistence.Table; |
| | | import jakarta.persistence.Transient; |
| | | import lombok.Data; |
| | | import org.hibernate.annotations.Table; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.ToString; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 合同标的物明细实体类 |
| | |
| | | */ |
| | | @Data |
| | | @Entity |
| | | @Table(appliesTo = "contract_subject_matter", comment = "合同标的物明细表") |
| | | @Table(name = "contract_subject_matter") |
| | | @ToString(callSuper = true) |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class ContractSubjectMatter extends BaseModel<ContractSubjectMatter> { |
| | | |
| | | @Schema(description = "排产计划ID") |
| | | @Column(columnDefinition = "bigint comment '排产计划ID'") |
| | | private Long productionPlanId; |
| | | |
| | | @Schema(description = "排产计划名称") |
| | | @Column(columnDefinition = "VARCHAR(200) comment '排产计划名称'") |
| | | private String productionPlanName; |
| | | |
| | | @Schema(description = "关联合同ID") |
| | | @Column(columnDefinition = "bigint comment '关联合同ID'") |
| | |
| | | private Integer category; |
| | | |
| | | @Schema(description = "数量") |
| | | @Column(columnDefinition = "double comment '数量'") |
| | | private Double quantity; |
| | | @Column(columnDefinition = "decimal(10,2) comment '数量'") |
| | | private BigDecimal quantity; |
| | | |
| | | @Schema(description = "计量单位(个/台/吨/项/套等)") |
| | | @Column(columnDefinition = "VARCHAR(20) comment '计量单位'") |
| | | private String unit; |
| | | |
| | | @Schema(description = "单价") |
| | | @Column(columnDefinition = "double comment '单价'") |
| | | private Double unitPrice; |
| | | @Column(columnDefinition = "decimal(10,2) comment '单价'") |
| | | private BigDecimal unitPrice; |
| | | |
| | | @Schema(description = "税率(百分比,如13表示13%)") |
| | | @Column(columnDefinition = "double default 0.00 comment '税率'") |
| | | private Double taxRate; |
| | | @Column(columnDefinition = "decimal(10,2) comment '税率'") |
| | | private BigDecimal taxRate; |
| | | |
| | | @Schema(description = "税额") |
| | | @Column(columnDefinition = "double default 0.00 comment '税额'") |
| | | private Double taxAmount; |
| | | @Column(columnDefinition = "decimal(10,2) comment '税额'") |
| | | private BigDecimal taxAmount; |
| | | |
| | | @Schema(description = "含税总价") |
| | | @Column(columnDefinition = "double comment '含税总价'") |
| | | private Double totalAmount; |
| | | @Column(columnDefinition = "decimal(10,2) comment '含税总价'") |
| | | private BigDecimal totalAmount; |
| | | |
| | | @Schema(description = "不含税总价") |
| | | @Column(columnDefinition = "double comment '不含税总价'") |
| | | private Double totalAmountExcludingTax; |
| | | @Column(columnDefinition = "decimal(10,2) comment '不含税总价'") |
| | | private BigDecimal totalAmountExcludingTax; |
| | | |
| | | @Schema(description = "交货/交付地点") |
| | | @Column(columnDefinition = "VARCHAR(500) comment '交货/交付地点'") |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @Schema(description = "计划交付日期") |
| | | @Column(columnDefinition = "datetime comment '计划交付日期'") |
| | | private Date plannedDeliveryDate; |
| | | @Column(columnDefinition = "VARCHAR(64) comment '计划交付日期'") |
| | | private String plannedDeliveryDate; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @Schema(description = "实际交付日期") |
| | | @Column(columnDefinition = "datetime comment '实际交付日期'") |
| | | private Date actualDeliveryDate; |
| | | @Column(columnDefinition = "VARCHAR(64) comment '实际交付日期'") |
| | | private String actualDeliveryDate; |
| | | |
| | | @Schema(description = "交付状态(0-未交付 1-部分交付 2-已交付 3-逾期)") |
| | | @Schema(description = "交付状态(0-未交付 1-部分交付 2-已交付)") |
| | | @Column(columnDefinition = "tinyint(2) default 0 comment '交付状态'") |
| | | private Integer deliveryStatus; |
| | | |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @Schema(description = "验收时间") |
| | | @Column(columnDefinition = "datetime comment '验收时间'") |
| | | private Date acceptTime; |
| | | @Column(columnDefinition = "VARCHAR(64) comment '验收时间'") |
| | | private String acceptTime; |
| | | |
| | | @Schema(description = "已交付数量") |
| | | @Column(columnDefinition = "decimal(10,2) comment '已交付数量'") |
| | | private BigDecimal deliveredQuantity; |
| | | |
| | | /** |
| | | * 临时字段 - 已交付数量(用于交付进度统计) |
| | | */ |
| | | @Transient |
| | | @TableField(exist = false) |
| | | @Schema(description = "已交付数量(临时字段)") |
| | | private BigDecimal deliveredQuantity; |
| | | @Schema(description = "未交付数量") |
| | | @Column(columnDefinition = "decimal(10,2) comment '未交付数量'") |
| | | private BigDecimal remainingQuantity; |
| | | |
| | | @Schema(description = "折扣率") |
| | | @Column(columnDefinition = "decimal(10,2) comment '折扣率'") |
| | | private BigDecimal discountRate; |
| | | |
| | | @Schema(description = "最近一次交付数量") |
| | | @Column(columnDefinition = "decimal(10,2) comment '最近一次交付数量'") |
| | | private BigDecimal lastDeliveredQuantity; |
| | | } |