package com.qianwen.smartman.modules.coproduction.entity; import com.baomidou.mybatisplus.annotation.FieldStrategy; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.Date; import java.util.Objects; import com.qianwen.core.mp.base.BaseEntity; import com.qianwen.core.tool.utils.Func; @ApiModel(value = "Plan对象", description = "blade_plan") @TableName("blade_plan") /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/coproduction/entity/Plan.class */ public class Plan extends BaseEntity { private static final long serialVersionUID = 1; @ApiModelProperty("计划类型名称") private String name; @ApiModelProperty("描述") private String description; @ApiModelProperty("所属计划类型") private Long typeId; @ApiModelProperty("计划编号") private String code; @ApiModelProperty("订单编号") private String indentCode; @ApiModelProperty("计划类别:1 产品计划 2 来料计划") private Integer category; @ApiModelProperty("所属产品id") private Long productId; @ApiModelProperty("所属产品编码") private String productCode; @ApiModelProperty("所属产品名称") private String productName; @ApiModelProperty("计划数量") private Integer planNum; @ApiModelProperty("待派发数量") private Integer unassignedNum; @ApiModelProperty("报工数量") private Integer reportNum; @ApiModelProperty("合格数量") private Integer qualifyNum; @ApiModelProperty("报废数量") private Integer scrappedNum; @ApiModelProperty("所属产品工艺id") private Long craftId; @ApiModelProperty("所属产品工艺名称") private String craftName; @ApiModelProperty("所属工艺版本id") private Long craftVersion; @ApiModelProperty("所属工艺版本名称") private String craftVersionName; @ApiModelProperty("计划开始时间") private Date planStartTime; @ApiModelProperty("计划结束时间") private Date planEndTime; @TableField(value = "start_time", updateStrategy = FieldStrategy.IGNORED) @ApiModelProperty("实际开始时间") private Date startTime; @TableField(value = "end_time", updateStrategy = FieldStrategy.IGNORED) @ApiModelProperty("实际结束时间") private Date endTime; @ApiModelProperty("规格型号") private String standardModel; @ApiModelProperty("暂停前的状态") private Integer planStatusBefore; @ApiModelProperty("计划状态(1:待派发 2.待加工 3.加工中 4.暂停 5.关闭 6.完工)") private Integer planStatus; @ApiModelProperty("产品bom主键(bom版本id)") private Long bomId; @ApiModelProperty("所属bom版本名称") private String bomVersion; @ApiModelProperty("客户id") private Long customerId; @ApiModelProperty("客户名称") private String customerName; @ApiModelProperty("源计划") private Long sourcePlanId; @ApiModelProperty("扩展字段") private String extendField; @TableField(exist = false) @ApiModelProperty("计划进度") private String planProgress; @TableField(exist = false) @ApiModelProperty("报工情况") private String reportSituation; @TableField(exist = false) @ApiModelProperty("是否有工单") private Boolean havePlanOrder; @TableField(exist = false) @ApiModelProperty("所属产品类型名称") private String productTypeLabel; public Plan setName(final String name) { this.name = name; return this; } public Plan setDescription(final String description) { this.description = description; return this; } public Plan setTypeId(final Long typeId) { this.typeId = typeId; return this; } public Plan setCode(final String code) { this.code = code; return this; } public Plan setIndentCode(final String indentCode) { this.indentCode = indentCode; return this; } public Plan setCategory(final Integer category) { this.category = category; return this; } public Plan setProductId(final Long productId) { this.productId = productId; return this; } public Plan setProductCode(final String productCode) { this.productCode = productCode; return this; } public Plan setProductName(final String productName) { this.productName = productName; return this; } public Plan setPlanNum(final Integer planNum) { this.planNum = planNum; return this; } public Plan setUnassignedNum(final Integer unassignedNum) { this.unassignedNum = unassignedNum; return this; } public Plan setReportNum(final Integer reportNum) { this.reportNum = reportNum; return this; } public Plan setQualifyNum(final Integer qualifyNum) { this.qualifyNum = qualifyNum; return this; } public Plan setScrappedNum(final Integer scrappedNum) { this.scrappedNum = scrappedNum; return this; } public Plan setCraftId(final Long craftId) { this.craftId = craftId; return this; } public Plan setCraftName(final String craftName) { this.craftName = craftName; return this; } public Plan setCraftVersion(final Long craftVersion) { this.craftVersion = craftVersion; return this; } public Plan setCraftVersionName(final String craftVersionName) { this.craftVersionName = craftVersionName; return this; } public Plan setPlanStartTime(final Date planStartTime) { this.planStartTime = planStartTime; return this; } public Plan setPlanEndTime(final Date planEndTime) { this.planEndTime = planEndTime; return this; } public Plan setStartTime(final Date startTime) { this.startTime = startTime; return this; } public Plan setEndTime(final Date endTime) { this.endTime = endTime; return this; } public Plan setStandardModel(final String standardModel) { this.standardModel = standardModel; return this; } public Plan setPlanStatusBefore(final Integer planStatusBefore) { this.planStatusBefore = planStatusBefore; return this; } public Plan setPlanStatus(final Integer planStatus) { this.planStatus = planStatus; return this; } public Plan setBomId(final Long bomId) { this.bomId = bomId; return this; } public Plan setBomVersion(final String bomVersion) { this.bomVersion = bomVersion; return this; } public Plan setCustomerId(final Long customerId) { this.customerId = customerId; return this; } public Plan setCustomerName(final String customerName) { this.customerName = customerName; return this; } public Plan setSourcePlanId(final Long sourcePlanId) { this.sourcePlanId = sourcePlanId; return this; } public Plan setExtendField(final String extendField) { this.extendField = extendField; return this; } public Plan setPlanProgress(final String planProgress) { this.planProgress = planProgress; return this; } public Plan setReportSituation(final String reportSituation) { this.reportSituation = reportSituation; return this; } public Plan setHavePlanOrder(final Boolean havePlanOrder) { this.havePlanOrder = havePlanOrder; return this; } public Plan setProductTypeLabel(final String productTypeLabel) { this.productTypeLabel = productTypeLabel; return this; } public String toString() { return "Plan(name=" + getName() + ", description=" + getDescription() + ", typeId=" + getTypeId() + ", code=" + getCode() + ", indentCode=" + getIndentCode() + ", category=" + getCategory() + ", productId=" + getProductId() + ", productCode=" + getProductCode() + ", productName=" + getProductName() + ", planNum=" + getPlanNum() + ", unassignedNum=" + getUnassignedNum() + ", reportNum=" + getReportNum() + ", qualifyNum=" + getQualifyNum() + ", scrappedNum=" + getScrappedNum() + ", craftId=" + getCraftId() + ", craftName=" + getCraftName() + ", craftVersion=" + getCraftVersion() + ", craftVersionName=" + getCraftVersionName() + ", planStartTime=" + getPlanStartTime() + ", planEndTime=" + getPlanEndTime() + ", startTime=" + getStartTime() + ", endTime=" + getEndTime() + ", standardModel=" + getStandardModel() + ", planStatusBefore=" + getPlanStatusBefore() + ", planStatus=" + getPlanStatus() + ", bomId=" + getBomId() + ", bomVersion=" + getBomVersion() + ", customerId=" + getCustomerId() + ", customerName=" + getCustomerName() + ", sourcePlanId=" + getSourcePlanId() + ", extendField=" + getExtendField() + ", planProgress=" + getPlanProgress() + ", reportSituation=" + getReportSituation() + ", havePlanOrder=" + getHavePlanOrder() + ", productTypeLabel=" + getProductTypeLabel() + ")"; } public boolean equals(final Object o) { if (o == this) { return true; } if (o instanceof Plan) { Plan other = (Plan) o; if (other.canEqual(this) && super.equals(o)) { Object this$typeId = getTypeId(); Object other$typeId = other.getTypeId(); if (this$typeId == null) { if (other$typeId != null) { return false; } } else if (!this$typeId.equals(other$typeId)) { return false; } Object this$category = getCategory(); Object other$category = other.getCategory(); if (this$category == null) { if (other$category != null) { return false; } } else if (!this$category.equals(other$category)) { return false; } Object this$productId = getProductId(); Object other$productId = other.getProductId(); if (this$productId == null) { if (other$productId != null) { return false; } } else if (!this$productId.equals(other$productId)) { return false; } Object this$planNum = getPlanNum(); Object other$planNum = other.getPlanNum(); if (this$planNum == null) { if (other$planNum != null) { return false; } } else if (!this$planNum.equals(other$planNum)) { return false; } Object this$unassignedNum = getUnassignedNum(); Object other$unassignedNum = other.getUnassignedNum(); if (this$unassignedNum == null) { if (other$unassignedNum != null) { return false; } } else if (!this$unassignedNum.equals(other$unassignedNum)) { return false; } Object this$reportNum = getReportNum(); Object other$reportNum = other.getReportNum(); if (this$reportNum == null) { if (other$reportNum != null) { return false; } } else if (!this$reportNum.equals(other$reportNum)) { return false; } Object this$qualifyNum = getQualifyNum(); Object other$qualifyNum = other.getQualifyNum(); if (this$qualifyNum == null) { if (other$qualifyNum != null) { return false; } } else if (!this$qualifyNum.equals(other$qualifyNum)) { return false; } Object this$scrappedNum = getScrappedNum(); Object other$scrappedNum = other.getScrappedNum(); if (this$scrappedNum == null) { if (other$scrappedNum != null) { return false; } } else if (!this$scrappedNum.equals(other$scrappedNum)) { return false; } Object this$craftId = getCraftId(); Object other$craftId = other.getCraftId(); if (this$craftId == null) { if (other$craftId != null) { return false; } } else if (!this$craftId.equals(other$craftId)) { return false; } Object this$craftVersion = getCraftVersion(); Object other$craftVersion = other.getCraftVersion(); if (this$craftVersion == null) { if (other$craftVersion != null) { return false; } } else if (!this$craftVersion.equals(other$craftVersion)) { return false; } Object this$planStatusBefore = getPlanStatusBefore(); Object other$planStatusBefore = other.getPlanStatusBefore(); if (this$planStatusBefore == null) { if (other$planStatusBefore != null) { return false; } } else if (!this$planStatusBefore.equals(other$planStatusBefore)) { return false; } Object this$planStatus = getPlanStatus(); Object other$planStatus = other.getPlanStatus(); if (this$planStatus == null) { if (other$planStatus != null) { return false; } } else if (!this$planStatus.equals(other$planStatus)) { return false; } Object this$bomId = getBomId(); Object other$bomId = other.getBomId(); if (this$bomId == null) { if (other$bomId != null) { return false; } } else if (!this$bomId.equals(other$bomId)) { return false; } Object this$customerId = getCustomerId(); Object other$customerId = other.getCustomerId(); if (this$customerId == null) { if (other$customerId != null) { return false; } } else if (!this$customerId.equals(other$customerId)) { return false; } Object this$sourcePlanId = getSourcePlanId(); Object other$sourcePlanId = other.getSourcePlanId(); if (this$sourcePlanId == null) { if (other$sourcePlanId != null) { return false; } } else if (!this$sourcePlanId.equals(other$sourcePlanId)) { return false; } Object this$havePlanOrder = getHavePlanOrder(); Object other$havePlanOrder = other.getHavePlanOrder(); if (this$havePlanOrder == null) { if (other$havePlanOrder != null) { return false; } } else if (!this$havePlanOrder.equals(other$havePlanOrder)) { return false; } Object this$name = getName(); Object other$name = other.getName(); if (this$name == null) { if (other$name != null) { return false; } } else if (!this$name.equals(other$name)) { return false; } Object this$description = getDescription(); Object other$description = other.getDescription(); if (this$description == null) { if (other$description != null) { return false; } } else if (!this$description.equals(other$description)) { return false; } Object this$code = getCode(); Object other$code = other.getCode(); if (this$code == null) { if (other$code != null) { return false; } } else if (!this$code.equals(other$code)) { return false; } Object this$indentCode = getIndentCode(); Object other$indentCode = other.getIndentCode(); if (this$indentCode == null) { if (other$indentCode != null) { return false; } } else if (!this$indentCode.equals(other$indentCode)) { return false; } Object this$productCode = getProductCode(); Object other$productCode = other.getProductCode(); if (this$productCode == null) { if (other$productCode != null) { return false; } } else if (!this$productCode.equals(other$productCode)) { return false; } Object this$productName = getProductName(); Object other$productName = other.getProductName(); if (this$productName == null) { if (other$productName != null) { return false; } } else if (!this$productName.equals(other$productName)) { return false; } Object this$craftName = getCraftName(); Object other$craftName = other.getCraftName(); if (this$craftName == null) { if (other$craftName != null) { return false; } } else if (!this$craftName.equals(other$craftName)) { return false; } Object this$craftVersionName = getCraftVersionName(); Object other$craftVersionName = other.getCraftVersionName(); if (this$craftVersionName == null) { if (other$craftVersionName != null) { return false; } } else if (!this$craftVersionName.equals(other$craftVersionName)) { return false; } Object this$planStartTime = getPlanStartTime(); Object other$planStartTime = other.getPlanStartTime(); if (this$planStartTime == null) { if (other$planStartTime != null) { return false; } } else if (!this$planStartTime.equals(other$planStartTime)) { return false; } Object this$planEndTime = getPlanEndTime(); Object other$planEndTime = other.getPlanEndTime(); if (this$planEndTime == null) { if (other$planEndTime != null) { return false; } } else if (!this$planEndTime.equals(other$planEndTime)) { return false; } Object this$startTime = getStartTime(); Object other$startTime = other.getStartTime(); if (this$startTime == null) { if (other$startTime != null) { return false; } } else if (!this$startTime.equals(other$startTime)) { return false; } Object this$endTime = getEndTime(); Object other$endTime = other.getEndTime(); if (this$endTime == null) { if (other$endTime != null) { return false; } } else if (!this$endTime.equals(other$endTime)) { return false; } Object this$standardModel = getStandardModel(); Object other$standardModel = other.getStandardModel(); if (this$standardModel == null) { if (other$standardModel != null) { return false; } } else if (!this$standardModel.equals(other$standardModel)) { return false; } Object this$bomVersion = getBomVersion(); Object other$bomVersion = other.getBomVersion(); if (this$bomVersion == null) { if (other$bomVersion != null) { return false; } } else if (!this$bomVersion.equals(other$bomVersion)) { return false; } Object this$customerName = getCustomerName(); Object other$customerName = other.getCustomerName(); if (this$customerName == null) { if (other$customerName != null) { return false; } } else if (!this$customerName.equals(other$customerName)) { return false; } Object this$extendField = getExtendField(); Object other$extendField = other.getExtendField(); if (this$extendField == null) { if (other$extendField != null) { return false; } } else if (!this$extendField.equals(other$extendField)) { return false; } Object this$planProgress = getPlanProgress(); Object other$planProgress = other.getPlanProgress(); if (this$planProgress == null) { if (other$planProgress != null) { return false; } } else if (!this$planProgress.equals(other$planProgress)) { return false; } Object this$reportSituation = getReportSituation(); Object other$reportSituation = other.getReportSituation(); if (this$reportSituation == null) { if (other$reportSituation != null) { return false; } } else if (!this$reportSituation.equals(other$reportSituation)) { return false; } Object this$productTypeLabel = getProductTypeLabel(); Object other$productTypeLabel = other.getProductTypeLabel(); return this$productTypeLabel == null ? other$productTypeLabel == null : this$productTypeLabel.equals(other$productTypeLabel); } return false; } return false; } protected boolean canEqual(final Object other) { return other instanceof Plan; } public int hashCode() { int result = super.hashCode(); Object $typeId = getTypeId(); int result2 = (result * 59) + ($typeId == null ? 43 : $typeId.hashCode()); Object $category = getCategory(); int result3 = (result2 * 59) + ($category == null ? 43 : $category.hashCode()); Object $productId = getProductId(); int result4 = (result3 * 59) + ($productId == null ? 43 : $productId.hashCode()); Object $planNum = getPlanNum(); int result5 = (result4 * 59) + ($planNum == null ? 43 : $planNum.hashCode()); Object $unassignedNum = getUnassignedNum(); int result6 = (result5 * 59) + ($unassignedNum == null ? 43 : $unassignedNum.hashCode()); Object $reportNum = getReportNum(); int result7 = (result6 * 59) + ($reportNum == null ? 43 : $reportNum.hashCode()); Object $qualifyNum = getQualifyNum(); int result8 = (result7 * 59) + ($qualifyNum == null ? 43 : $qualifyNum.hashCode()); Object $scrappedNum = getScrappedNum(); int result9 = (result8 * 59) + ($scrappedNum == null ? 43 : $scrappedNum.hashCode()); Object $craftId = getCraftId(); int result10 = (result9 * 59) + ($craftId == null ? 43 : $craftId.hashCode()); Object $craftVersion = getCraftVersion(); int result11 = (result10 * 59) + ($craftVersion == null ? 43 : $craftVersion.hashCode()); Object $planStatusBefore = getPlanStatusBefore(); int result12 = (result11 * 59) + ($planStatusBefore == null ? 43 : $planStatusBefore.hashCode()); Object $planStatus = getPlanStatus(); int result13 = (result12 * 59) + ($planStatus == null ? 43 : $planStatus.hashCode()); Object $bomId = getBomId(); int result14 = (result13 * 59) + ($bomId == null ? 43 : $bomId.hashCode()); Object $customerId = getCustomerId(); int result15 = (result14 * 59) + ($customerId == null ? 43 : $customerId.hashCode()); Object $sourcePlanId = getSourcePlanId(); int result16 = (result15 * 59) + ($sourcePlanId == null ? 43 : $sourcePlanId.hashCode()); Object $havePlanOrder = getHavePlanOrder(); int result17 = (result16 * 59) + ($havePlanOrder == null ? 43 : $havePlanOrder.hashCode()); Object $name = getName(); int result18 = (result17 * 59) + ($name == null ? 43 : $name.hashCode()); Object $description = getDescription(); int result19 = (result18 * 59) + ($description == null ? 43 : $description.hashCode()); Object $code = getCode(); int result20 = (result19 * 59) + ($code == null ? 43 : $code.hashCode()); Object $indentCode = getIndentCode(); int result21 = (result20 * 59) + ($indentCode == null ? 43 : $indentCode.hashCode()); Object $productCode = getProductCode(); int result22 = (result21 * 59) + ($productCode == null ? 43 : $productCode.hashCode()); Object $productName = getProductName(); int result23 = (result22 * 59) + ($productName == null ? 43 : $productName.hashCode()); Object $craftName = getCraftName(); int result24 = (result23 * 59) + ($craftName == null ? 43 : $craftName.hashCode()); Object $craftVersionName = getCraftVersionName(); int result25 = (result24 * 59) + ($craftVersionName == null ? 43 : $craftVersionName.hashCode()); Object $planStartTime = getPlanStartTime(); int result26 = (result25 * 59) + ($planStartTime == null ? 43 : $planStartTime.hashCode()); Object $planEndTime = getPlanEndTime(); int result27 = (result26 * 59) + ($planEndTime == null ? 43 : $planEndTime.hashCode()); Object $startTime = getStartTime(); int result28 = (result27 * 59) + ($startTime == null ? 43 : $startTime.hashCode()); Object $endTime = getEndTime(); int result29 = (result28 * 59) + ($endTime == null ? 43 : $endTime.hashCode()); Object $standardModel = getStandardModel(); int result30 = (result29 * 59) + ($standardModel == null ? 43 : $standardModel.hashCode()); Object $bomVersion = getBomVersion(); int result31 = (result30 * 59) + ($bomVersion == null ? 43 : $bomVersion.hashCode()); Object $customerName = getCustomerName(); int result32 = (result31 * 59) + ($customerName == null ? 43 : $customerName.hashCode()); Object $extendField = getExtendField(); int result33 = (result32 * 59) + ($extendField == null ? 43 : $extendField.hashCode()); Object $planProgress = getPlanProgress(); int result34 = (result33 * 59) + ($planProgress == null ? 43 : $planProgress.hashCode()); Object $reportSituation = getReportSituation(); int result35 = (result34 * 59) + ($reportSituation == null ? 43 : $reportSituation.hashCode()); Object $productTypeLabel = getProductTypeLabel(); return (result35 * 59) + ($productTypeLabel == null ? 43 : $productTypeLabel.hashCode()); } public String getName() { return this.name; } public String getDescription() { return this.description; } public Long getTypeId() { return this.typeId; } public String getCode() { return this.code; } public String getIndentCode() { return this.indentCode; } public Integer getCategory() { return this.category; } public Long getProductId() { return this.productId; } public String getProductCode() { return this.productCode; } public String getProductName() { return this.productName; } public Integer getPlanNum() { return this.planNum; } public Integer getUnassignedNum() { return this.unassignedNum; } public Integer getReportNum() { return this.reportNum; } public Integer getQualifyNum() { return this.qualifyNum; } public Integer getScrappedNum() { return this.scrappedNum; } public Long getCraftId() { return this.craftId; } public String getCraftName() { return this.craftName; } public Long getCraftVersion() { return this.craftVersion; } public String getCraftVersionName() { return this.craftVersionName; } public Date getPlanStartTime() { return this.planStartTime; } public Date getPlanEndTime() { return this.planEndTime; } public Date getStartTime() { return this.startTime; } public Date getEndTime() { return this.endTime; } public String getStandardModel() { return this.standardModel; } public Integer getPlanStatusBefore() { return this.planStatusBefore; } public Integer getPlanStatus() { return this.planStatus; } public Long getBomId() { return this.bomId; } public String getBomVersion() { return this.bomVersion; } public Long getCustomerId() { return this.customerId; } public String getCustomerName() { return this.customerName; } public Long getSourcePlanId() { return this.sourcePlanId; } public String getExtendField() { return this.extendField; } public String getReportSituation() { return this.reportSituation; } public Boolean getHavePlanOrder() { return this.havePlanOrder; } public String getProductTypeLabel() { return this.productTypeLabel; } private String handlerProgress() { double res = 0.0d; if (!Objects.isNull(this.reportNum) && !Objects.isNull(this.planNum)) { double res2 = (this.reportNum.intValue() / this.planNum.intValue()) * 100.0d; res = res2 > 100.0d ? 100.0d : res2; } return String.format("%.2f", Double.valueOf(res)); } public String getPlanProgress() { return handlerProgress(); } public Integer getAssignedNum() { if (Func.isEmpty(this.planNum) || Func.isEmpty(this.unassignedNum)) { return 0; } return Integer.valueOf(this.planNum.intValue() - this.unassignedNum.intValue()); } }