liyong
2026-04-25 20d3e1da6517ed5e55ae3613ccbbb01f1b9eda2e
src/main/java/com/ruoyi/production/pojo/ProductionPrintOrder.java
@@ -1,5 +1,7 @@
package com.ruoyi.production.pojo;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
@@ -7,11 +9,16 @@
import java.util.List;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.production.dto.MaterialInfoDto;
import com.ruoyi.production.dto.PlateMakingDto;
import com.ruoyi.production.dto.ProcessContentDto;
import com.ruoyi.production.dto.ProductOrderDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull;
/**
 * 印刷定印单
@@ -35,19 +42,23 @@
    /**
     * 对应的生产工单
     */
    @TableField(value = "product_order")
    private Long productOrder;
    @TableField(value = "product_order_id")
    private Long productOrderId;
    /**
     * 制单日期
     */
    @TableField(value = "print_order_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime printOrderTime;
    /**
     * 完成日期
     */
    @TableField(value = "finish_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime finishTime;
    /**
@@ -186,12 +197,16 @@
     * 
     */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * 
     */
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    @TableField(exist = false)
@@ -216,4 +231,51 @@
    @TableField(value = "update_user_name", fill = FieldFill.INSERT_UPDATE)
    private String updateUserName;
    /**
     * 小盒数量
     */
    @TableField(value = "small_box_qty")
    private String smallBoxQty;
    /**
     * 中盒数量
     */
    @TableField(value = "medium_box_qty")
    private String mediumBoxQty;
    /**
     * 成品id
     */
    @TableField(value = "product_model_id")
    private Long productModelId;
    /**
     * 切料图示文件id
     */
    @TableField(value = "cutting_file_id")
    private Long cuttingFileId;
    /**
     * 客户单位
     */
    @TableField(value = "client_name")
    private String clientName;
    public ProductOrderDto convertProductOrderDto(@NotNull ProductOrderDto dto) {
        dto.setCutSize(this.getCutSize());
        dto.setSmallBoxQty(this.getSmallBoxQty());
        dto.setMediumBoxQty(this.getMediumBoxQty());
        // 色数 为工序开数第一个
        if(CollUtil.isNotEmpty(this.processContent)){
            ProcessContentDto processContentDto = BeanUtil.toBean(
                    processContent.get(0),
                    ProcessContentDto.class
            );
            dto.setPrintColorCount(processContentDto.getOpenCount());
        }
        // 备注已经填充到了 ProductOrderDto中无需关心
        return dto;
    }
}