PurchaseMaterial.java
3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package com.skua.modules.erp.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.skua.core.aspect.annotation.Dict;
import com.skua.core.util.ConvertUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
/**
* 采购物料清单
*/
@Data
@TableName("erp_purchase_material")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="erp_purchase_material对象", description="采购物料清单")
public class PurchaseMaterial {
/**主键*/
@TableId(type = IdType.UUID)
@ApiModelProperty(value = "主键")
private String id;
@ApiModelProperty(value = "所属机构")
@Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name")
private String departId;
/**采购计划编号*/
@Excel(name = "采购合同编号", width = 15)
@ApiModelProperty(value = "采购合同编号")
private String contractId;
/**物料类别编号*/
@Excel(name = "物料类别编号", width = 15)
@ApiModelProperty(value = "物料类别编号")
private String sparepartType;
/**物料编号*/
@Excel(name = "物料编号", width = 15)
@ApiModelProperty(value = "物料编号")
private String sparepartId;
/**物料编号*/
@Excel(name = "货号", width = 15)
@ApiModelProperty(value = "货号")
private String goodCode;
/**计划采购数量*/
@Excel(name = "计划采购数量", width = 15)
@ApiModelProperty(value = "计划采购数量")
private String purchaseNum;
/**单价*/
@Excel(name = "单价", width = 15)
@ApiModelProperty(value = "单价")
private String unitPrice;
@Excel(name = "总价", width = 15)
@ApiModelProperty(value = "总价")
private String totalPrice;
/**备注*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
private String remark;
@Excel(name = "品牌", width = 15)
@ApiModelProperty(value = "品牌")
private String goodOrigin;
@Excel(name = "产地", width = 15)
@ApiModelProperty(value = "产地")
private String goodBrand;
/**供应商编号*/
@Excel(name = "供应商编号", width = 15)
@ApiModelProperty(value = "供应商编号")
@Dict(dictTable = "ajh_supplier_manage", dicCode="id", dicText = "supp_name")
private String supplierId;
/**税额*/
@Excel(name = "税额", width = 15)
@ApiModelProperty(value = "税额")
private String taxAmount;
/**价税合计*/
@Excel(name = "价税合计", width = 15)
@ApiModelProperty(value = "价税合计")
private String totalPriceTax;
@TableField(exist=false)
@ApiModelProperty(value = "扩展:货号物料入库数量")
private String storeNum;
@TableField(exist=false)
@ApiModelProperty(value = "扩展:剩余数量")
private Double remainNum;
public String getPurchaseContractId() {
return this.getContractId();
}
public Double getRemainNum() {
remainNum = ConvertUtils.getDouble(this.getPurchaseNum() ,0d) - ConvertUtils.getDouble(this.getStoreNum() ,0d);// JSUtils.divide(this.getPurchaseNum() ,this.getStoreNum());
return remainNum;
}
}