199 lines
8.5 KiB
Java
199 lines
8.5 KiB
Java
package com.kaidi.oa.domain;
|
||
|
||
import jakarta.persistence.Column;
|
||
import jakarta.persistence.Entity;
|
||
import jakarta.persistence.GeneratedValue;
|
||
import jakarta.persistence.GenerationType;
|
||
import jakarta.persistence.Id;
|
||
import jakarta.persistence.Table;
|
||
|
||
import java.time.Instant;
|
||
|
||
/**
|
||
* 生物质肥料制造中心·供应商准入档案(需求 §1,补深审计 PARTIAL[high])。
|
||
*
|
||
* 独立于采购计划的供应商准入台账,记录:
|
||
* <ul>
|
||
* <li>原料来源类型(养殖场/秸秆收储/菌渣厂)、供应品种、供应能力;</li>
|
||
* <li>准入所需资质:检测报告 / 无害化证明 / 营业执照(admitDocsJson 结构化存储);</li>
|
||
* <li>理化本底:有机质% / C/N 比 / 重金属本底(各元素独立字段,非布尔值);</li>
|
||
* <li>定期评估:杂质率/水分波动/有害物评分 → 综合评级(A/B/C/暂停);</li>
|
||
* <li>准入状态机:申请中 → 已准入 / 已拒绝 / 暂停(再评估后可恢复)。</li>
|
||
* </ul>
|
||
* 表名加 fert_ 前缀,零撞名。
|
||
*/
|
||
@Entity
|
||
@Table(name = "fert_supplier_profile")
|
||
public class FertSupplierProfile {
|
||
|
||
@Id
|
||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||
private Long id;
|
||
|
||
/** 供应商编号(空则自动生成 SUP-序号)。 */
|
||
private String supplierCode;
|
||
|
||
/** 供应商名称(养殖场/收储点/菌渣厂名)。 */
|
||
@Column(nullable = false)
|
||
private String supplierName;
|
||
|
||
/** 供应商类型:养殖场 / 秸秆收储点 / 菌渣厂 / 综合供应商 / 其他。 */
|
||
private String supplierType;
|
||
|
||
/** 联系人。 */
|
||
private String contactPerson;
|
||
|
||
/** 联系方式。 */
|
||
private String contactPhone;
|
||
|
||
/** 地址 / 场地位置。 */
|
||
private String address;
|
||
|
||
/** 主要供应原料(多种用";"分隔)。 */
|
||
private String supplyMaterials;
|
||
|
||
/** 年供应能力(吨)。 */
|
||
private Double supplyCapacityTon;
|
||
|
||
// -------- 准入资质文件(结构化) --------
|
||
|
||
/** 检测报告文件路径或描述。 */
|
||
private String testReportDoc;
|
||
|
||
/** 无害化证明文件路径或描述(粪污必须)。 */
|
||
private String harmlessDoc;
|
||
|
||
/** 营业执照或其他资质证明。 */
|
||
private String licenseDoc;
|
||
|
||
/** 补充资质 JSON(扩展字段 {"有机认证":"有","产品标准":"QB/T xxxx",...})。 */
|
||
@Column(columnDefinition = "text")
|
||
private String admitDocsJson;
|
||
|
||
// -------- 理化本底(原料特性档案) --------
|
||
|
||
/** 平均有机质含量 %。 */
|
||
private Double organicPct;
|
||
|
||
/** 平均 C/N 比。 */
|
||
private Double cnRatio;
|
||
|
||
/** 重金属本底 - 砷(As,mg/kg)。 */
|
||
private Double hmArsenicAs;
|
||
|
||
/** 重金属本底 - 汞(Hg,mg/kg)。 */
|
||
private Double hmMercuryHg;
|
||
|
||
/** 重金属本底 - 铅(Pb,mg/kg)。 */
|
||
private Double hmLeadPb;
|
||
|
||
/** 重金属本底 - 铬(Cr,mg/kg)。 */
|
||
private Double hmChromiumCr;
|
||
|
||
/** 重金属本底 - 镉(Cd,mg/kg)。 */
|
||
private Double hmCadmiumCd;
|
||
|
||
// -------- 定期评估 --------
|
||
|
||
/** 最近评估日期 YYYY-MM-DD。 */
|
||
private String lastEvalDate;
|
||
|
||
/** 平均杂质率 %(历次批次均值)。 */
|
||
private Double avgImpurityPct;
|
||
|
||
/** 平均水分波动分(历次批次)。 */
|
||
private Double avgMoistureDeviation;
|
||
|
||
/** 有害物评分(0~100,越低越好)。 */
|
||
private Integer hazardScore;
|
||
|
||
/** 综合评级:A(优质) / B(良好) / C(一般) / 暂停。 */
|
||
private String rating;
|
||
|
||
/** 评估备注。 */
|
||
private String evalRemark;
|
||
|
||
// -------- 准入状态 --------
|
||
|
||
/** 状态:申请中 / 已准入 / 已拒绝 / 暂停。 */
|
||
private String status;
|
||
|
||
/** 准入日期 YYYY-MM-DD(状态变为"已准入"时填入)。 */
|
||
private String admitDate;
|
||
|
||
/** 暂停/拒绝原因。 */
|
||
private String suspendReason;
|
||
|
||
/** 录入人。 */
|
||
private String owner;
|
||
|
||
private String remark;
|
||
|
||
private Instant createdAt;
|
||
|
||
public Long getId() { return id; }
|
||
public void setId(Long id) { this.id = id; }
|
||
public String getSupplierCode() { return supplierCode; }
|
||
public void setSupplierCode(String supplierCode) { this.supplierCode = supplierCode; }
|
||
public String getSupplierName() { return supplierName; }
|
||
public void setSupplierName(String supplierName) { this.supplierName = supplierName; }
|
||
public String getSupplierType() { return supplierType; }
|
||
public void setSupplierType(String supplierType) { this.supplierType = supplierType; }
|
||
public String getContactPerson() { return contactPerson; }
|
||
public void setContactPerson(String contactPerson) { this.contactPerson = contactPerson; }
|
||
public String getContactPhone() { return contactPhone; }
|
||
public void setContactPhone(String contactPhone) { this.contactPhone = contactPhone; }
|
||
public String getAddress() { return address; }
|
||
public void setAddress(String address) { this.address = address; }
|
||
public String getSupplyMaterials() { return supplyMaterials; }
|
||
public void setSupplyMaterials(String supplyMaterials) { this.supplyMaterials = supplyMaterials; }
|
||
public Double getSupplyCapacityTon() { return supplyCapacityTon; }
|
||
public void setSupplyCapacityTon(Double supplyCapacityTon) { this.supplyCapacityTon = supplyCapacityTon; }
|
||
public String getTestReportDoc() { return testReportDoc; }
|
||
public void setTestReportDoc(String testReportDoc) { this.testReportDoc = testReportDoc; }
|
||
public String getHarmlessDoc() { return harmlessDoc; }
|
||
public void setHarmlessDoc(String harmlessDoc) { this.harmlessDoc = harmlessDoc; }
|
||
public String getLicenseDoc() { return licenseDoc; }
|
||
public void setLicenseDoc(String licenseDoc) { this.licenseDoc = licenseDoc; }
|
||
public String getAdmitDocsJson() { return admitDocsJson; }
|
||
public void setAdmitDocsJson(String admitDocsJson) { this.admitDocsJson = admitDocsJson; }
|
||
public Double getOrganicPct() { return organicPct; }
|
||
public void setOrganicPct(Double organicPct) { this.organicPct = organicPct; }
|
||
public Double getCnRatio() { return cnRatio; }
|
||
public void setCnRatio(Double cnRatio) { this.cnRatio = cnRatio; }
|
||
public Double getHmArsenicAs() { return hmArsenicAs; }
|
||
public void setHmArsenicAs(Double hmArsenicAs) { this.hmArsenicAs = hmArsenicAs; }
|
||
public Double getHmMercuryHg() { return hmMercuryHg; }
|
||
public void setHmMercuryHg(Double hmMercuryHg) { this.hmMercuryHg = hmMercuryHg; }
|
||
public Double getHmLeadPb() { return hmLeadPb; }
|
||
public void setHmLeadPb(Double hmLeadPb) { this.hmLeadPb = hmLeadPb; }
|
||
public Double getHmChromiumCr() { return hmChromiumCr; }
|
||
public void setHmChromiumCr(Double hmChromiumCr) { this.hmChromiumCr = hmChromiumCr; }
|
||
public Double getHmCadmiumCd() { return hmCadmiumCd; }
|
||
public void setHmCadmiumCd(Double hmCadmiumCd) { this.hmCadmiumCd = hmCadmiumCd; }
|
||
public String getLastEvalDate() { return lastEvalDate; }
|
||
public void setLastEvalDate(String lastEvalDate) { this.lastEvalDate = lastEvalDate; }
|
||
public Double getAvgImpurityPct() { return avgImpurityPct; }
|
||
public void setAvgImpurityPct(Double avgImpurityPct) { this.avgImpurityPct = avgImpurityPct; }
|
||
public Double getAvgMoistureDeviation() { return avgMoistureDeviation; }
|
||
public void setAvgMoistureDeviation(Double avgMoistureDeviation) { this.avgMoistureDeviation = avgMoistureDeviation; }
|
||
public Integer getHazardScore() { return hazardScore; }
|
||
public void setHazardScore(Integer hazardScore) { this.hazardScore = hazardScore; }
|
||
public String getRating() { return rating; }
|
||
public void setRating(String rating) { this.rating = rating; }
|
||
public String getEvalRemark() { return evalRemark; }
|
||
public void setEvalRemark(String evalRemark) { this.evalRemark = evalRemark; }
|
||
public String getStatus() { return status; }
|
||
public void setStatus(String status) { this.status = status; }
|
||
public String getAdmitDate() { return admitDate; }
|
||
public void setAdmitDate(String admitDate) { this.admitDate = admitDate; }
|
||
public String getSuspendReason() { return suspendReason; }
|
||
public void setSuspendReason(String suspendReason) { this.suspendReason = suspendReason; }
|
||
public String getOwner() { return owner; }
|
||
public void setOwner(String owner) { this.owner = owner; }
|
||
public String getRemark() { return remark; }
|
||
public void setRemark(String remark) { this.remark = remark; }
|
||
public Instant getCreatedAt() { return createdAt; }
|
||
public void setCreatedAt(Instant createdAt) { this.createdAt = createdAt; }
|
||
}
|