liyong
2026-04-25 0d9b0dab20eae44c817944e98c967dfd8832f580
src/main/java/com/ruoyi/production/pojo/ProductionPrintOrder.java
@@ -1,9 +1,12 @@
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;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
@@ -11,9 +14,12 @@
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;
/**
 * 印刷定印单
@@ -114,19 +120,19 @@
     * 制版
     */
    @TableField(value = "plate_making",typeHandler = JacksonTypeHandler.class)
    private List<PlateMakingDto> plateMaking;
    private List<PlateMakingDto> plateMaking = new ArrayList<>();
    /**
     * 工序加工内容
     */
    @TableField(value = "process_content",typeHandler = JacksonTypeHandler.class)
    private List<ProcessContentDto> processContent;
    private List<ProcessContentDto> processContent = new ArrayList<>();
    /**
     * 材料信息
     */
    @TableField(value = "material_info",typeHandler = JacksonTypeHandler.class)
    private List<MaterialInfoDto> materialInfo;
    private List<MaterialInfoDto> materialInfo = new ArrayList<>();
    /**
     * 工艺要求
@@ -256,4 +262,27 @@
     */
    @TableField(value = "client_name")
    private String clientName;
    /**
     * 切料图示选择 单选
     */
    @TableField(value = "cutting_diagram_checkout")
    private String cuttingDiagramCheckout;
    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;
    }
}