4 天以前 741918a903e17b2ec7522556d2c043b8d35dd8a1
src/main/java/com/ruoyi/production/bean/dto/ProductionProductMainDto.java
@@ -1,67 +1,103 @@
package com.ruoyi.production.bean.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.production.pojo.ProductionOrderRoutingOperationParam;
import com.ruoyi.production.pojo.ProductionProductMain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
@EqualsAndHashCode(callSuper = true)
@Data
public class ProductionProductMainDto {
    @Schema(description = "主键ID")
    private Long id;
    @Schema(description = "产品编号")
    private String productNo;
    @Schema(description = "用户ID")
    private Long userId;
    @Schema(description = "用户名称")
    private String userName;
    @Schema(description = "产品工艺路线明细ID")
@Schema(name = "ProductionProductMainDto", description = "生产报工查询参数")
public class ProductionProductMainDto extends ProductionProductMain {
    @Schema(description = "产品工艺路线工序ID")
    private Long productProcessRouteItemId;
    @Schema(description = "工单ID")
    private Long workOrderId;
    @Schema(description = "生产工序任务ID")
    private Long productionOperationTaskId;
    @Schema(description = "状态")
    private Integer status;
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
    @Schema(description = "报工ID")
    private Long productMainId;
    @Schema(description = "租户ID")
    private Long tenantId;
    @Schema(description = "创建人")
    private Integer createUser;
    @Schema(description = "更新人")
    private Integer updateUser;
    @Schema(description = "部门ID")
    private Long deptId;
    @Schema(description = "工单编号")
    private String workOrderNo;
    @Schema(description = "工单状态")
    private String workOrderStatus;
    @Schema(description = "昵称")
    private String nickName;
    @Schema(description = "数量")
    private BigDecimal quantity;
    @Schema(description = "报废数量")
    private BigDecimal scrapQty;
    @Schema(description = "产品名称")
    private String productName;
    @Schema(description = "产品型号名称")
    @Schema(description = "产品规格型号")
    private String productModelName;
    @Schema(description = "单位")
    private String unit;
    @Schema(description = "销售合同编号")
    @Schema(description = "销售合同号")
    private String salesContractNo;
    @Schema(description = "排产日期")
    private LocalDate schedulingDate;
    @Schema(description = "排产人员名称")
    private String schedulingUserName;
    @Schema(description = "客户名称")
    private String customerName;
    @Schema(description = "工序")
    private String process;
    @Schema(description = "工资定额")
    private BigDecimal workHours;
    @Schema(description = "工资")
    private BigDecimal wages;
    @Schema(description = "工序参数列表")
    private List<ProductionOrderRoutingOperationParam> productionOperationParamList;
    @Schema(description = "当前用户ID,用于权限过滤")
    private Long currentUserId;
    @Override
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    public void setId(Long id) {
        super.setId(id);
    }
    @Override
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    public Long getId() {
        return super.getId();
    }
    @Schema(description = "开始报工记录ID(结束报工时传入)")
    private Long startRecordId;
    /**
     * 获取结束报工所需的开始记录ID,优先取 startRecordId,其次取继承的 id
     */
    public Long resolveStartRecordId() {
        if (startRecordId != null) {
            return startRecordId;
        }
        return super.getId();
    }
}