package com.by4cloud.platformx.business.entity.invoice;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
import com.by4cloud.platformx.common.data.mybatis.BaseModel;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
import jakarta.persistence.Table;
|
import lombok.Data;
|
import org.hibernate.annotations.Comment;
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
import javax.persistence.Column;
|
import javax.persistence.Entity;
|
import javax.persistence.Transient;
|
import java.util.Date;
|
|
/**
|
* @author wjli
|
* @description
|
* @date 2026/4/29 10:51
|
**/
|
@Data
|
@Entity
|
@org.hibernate.annotations.Table(appliesTo="bip_invoice",comment = "bip对应单据表")//bip对应单据表
|
@jakarta.persistence.Table(name = "bip对应单据表")//bip对应单据表
|
@Comment("bip对应单据表")
|
public class BipInvoice extends BaseModel<BipInvoice> {
|
|
@Schema(description = "传入单据信息")
|
@Column(columnDefinition = "text comment '传入单据信息'")
|
private String invoice;
|
|
@Schema(description = "对应BIP系统编号")
|
@Column(columnDefinition = "varchar(128) comment '对应BIP系统编号'")
|
private String bipNumber;
|
|
@Schema(description = "上传日期")
|
@Column(columnDefinition="date comment '上传日期'")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
private Date day;
|
|
@Schema(description = "暂估月份")
|
@Column(columnDefinition="date comment '暂估月份'")
|
@DateTimeFormat(pattern = "yyyy-MM")
|
@JsonFormat(pattern = "yyyy-MM")
|
private Date month;
|
|
@Schema(description = "商品ID")
|
@Column(columnDefinition = "int comment '商品ID'")
|
private Integer coalId;
|
|
@Schema(description = "结算客户ID")
|
@Column(columnDefinition = "int comment '结算客户ID'")
|
private Integer customerId;
|
|
@Schema(description = "收货客户ID")
|
@Column(columnDefinition = "int comment '收货客户ID'")
|
private Integer customerAddressId;
|
//
|
@Schema(description = "单价")
|
@Column(columnDefinition = "double comment '单价'")
|
private Double price;
|
|
@Schema(description = "无税单价")
|
@Column(columnDefinition = "double comment '无税单价'")
|
private Double noTaxPrice;
|
|
@Schema(description = "数量")
|
@Column(columnDefinition = "double comment '数量'")
|
private Double tonnage;
|
|
@Schema(description = "含税金额")
|
@Column(columnDefinition = "double comment '含税金额'")
|
private Double money;
|
//
|
//
|
|
@Schema(description = "传回单据信息")
|
@Column(columnDefinition = "text comment '传回单据信息'")
|
private String resInvoice;
|
|
@Schema(description = "修改发送单据信息")
|
@Column(columnDefinition = "text comment '修改发送单据信息'")
|
private String updInvoice;
|
|
@Schema(description = "失败信息")
|
@Column(columnDefinition = "VARCHAR(512) comment '失败信息'")
|
private String message;
|
|
@Schema(description = "合同编号")
|
@Column(columnDefinition = "VARCHAR(50) comment '合同编号'")
|
private String contractNum;
|
|
@Schema(description = "修改发送单据信息")
|
@Column(columnDefinition = "VARCHAR(512) comment '修改发送单据信息'")
|
private String updMessage;
|
|
@Schema(description = "bip编号")
|
@Column(columnDefinition = "VARCHAR(32) comment 'bip编号'")
|
private String code;
|
|
|
@Schema(description = "bip内部客商编号")
|
@Column(columnDefinition="VARCHAR(32) comment 'bip内部客商编号'")
|
private String bipCompNumber;
|
|
@Schema(description = "运输方式 1地销/2路运/3船运")
|
@Column(columnDefinition = "char(1) comment '运输方式 1地销/2路运/3船运'")
|
private Integer trainType;
|
|
@Schema(description = "bip返回状态信息")
|
@Column(columnDefinition = "int comment 'bip返回状态信息'")
|
private Integer returnCode;
|
|
@Schema(description = "单据类型 0结算单1暂估")
|
@Column(columnDefinition = "char(1) comment '单据类型 0结算单1暂估'")
|
private Integer type;
|
|
@Schema(description = "单据类型 0应收 1应付")
|
@Column(columnDefinition = "char(1) comment '单据类型 0应收 1应付'")
|
private Integer invoiceType;
|
|
@Schema(description = "单据方向 1蓝 -1红")
|
@Column(columnDefinition = "char(10) comment '单据方向 1蓝 -1红'")
|
private Integer direction;
|
|
@Schema(description = "红冲单据ID")
|
@Column(columnDefinition = "int comment '红冲单据ID'")
|
private Long redInvoiceId;
|
|
@Schema(description = "红冲掉的单据状态")
|
@Column(columnDefinition = "VARCHAR(20) comment '红冲掉的单据状态'")
|
private String redInvoiceStatus;
|
|
@Schema(description = "红冲掉的单据返回信息")
|
@Column(columnDefinition = "VARCHAR(500) comment '红冲掉的单据返回信息'")
|
private String redInvoiceMessage;
|
|
@Schema(description = "主结算单ID")
|
@Column(columnDefinition = "int comment '主结算单ID'")
|
private Long allId;
|
|
@Schema(description = "对应每个结算单ID")
|
@Column(columnDefinition = "int comment '对应每个结算单ID'")
|
private Long railwayEntrustId;
|
|
@Schema(description = "bip状态0:开立、1:审批中、2:已审批、3:终止、4:已驳回")
|
@Column(columnDefinition = "int comment 'bip状态0:开立、1:审批中、2:已审批、3:终止、4:已驳回'")
|
private Integer verifyState;
|
|
|
@Schema(description = "状态0:开立、1:审批中、2:已审批、3:终止、4:已驳回-1:已删除")
|
@Column(columnDefinition = "int comment 'bip状态0:开立、1:审批中、2:已审批、3:终止、4:已驳回-1:已删除'")
|
private Integer status;
|
|
@Schema(description = "bip返回状态码")
|
@Column(columnDefinition = "VARCHAR(20) comment 'bip返回状态码'")
|
private String resStatus;
|
|
@Schema(description = "删除返回信息")
|
@Column(columnDefinition = "VARCHAR(200) comment '删除返回信息'")
|
private String delMessage;
|
|
@Transient
|
@TableField(exist = false)
|
private Integer isTs;//0已推送1未推送
|
|
@Transient
|
@TableField(exist = false)
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
private Date startDate;
|
|
@Transient
|
@TableField(exist = false)
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
private Date endDate;
|
|
|
/**
|
* 客户名称
|
*/
|
@Transient
|
@TableField(exist = false)
|
private String customerName;
|
|
public String getCustomerName(){
|
/*if (customerId != null){
|
Customer customer = RedisCacheYunXiaoHelper.getInstance().getCustomerById(customerId);
|
if (customer != null){
|
this.customerName = customer.getCustomerName();
|
}
|
}*/
|
return this.customerName;
|
}
|
|
/**
|
* 客户名称
|
*/
|
@Transient
|
@TableField(exist = false)
|
private String coalName;
|
|
public String getCoalName() {
|
/*if (coalId != null) {
|
Coal c = RedisCacheYunXiaoHelper.getInstance().getCoalById(coalId);
|
coalName = c.getCoalName();
|
}*/
|
return coalName;
|
}
|
/**
|
* 收货客户名称
|
*/
|
@Transient
|
@TableField(exist = false)
|
private String customerAddressName;
|
|
public String getCustomerAddressName() {
|
/*if (customerAddressId != null) {
|
Customer customer = RedisCacheYunXiaoHelper.getInstance().getCustomerById(customerAddressId);
|
if (customer != null) {
|
this.customerAddressName = customer.getCustomerName();
|
}
|
}*/
|
return this.customerAddressName;
|
}
|
|
}
|