From ac79dfd8d661dbe166553ff80fbdbfee64e8134e Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期二, 28 四月 2026 16:02:20 +0800
Subject: [PATCH] feat(production): 添加工序ID字段支持
---
src/main/java/com/ruoyi/production/pojo/ProductionPrintOrder.java | 79 +++++++++++++++++++++++++++++++++++++--
1 files changed, 74 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/ruoyi/production/pojo/ProductionPrintOrder.java b/src/main/java/com/ruoyi/production/pojo/ProductionPrintOrder.java
index 25b0cfd..fdcb92f 100644
--- a/src/main/java/com/ruoyi/production/pojo/ProductionPrintOrder.java
+++ b/src/main/java/com/ruoyi/production/pojo/ProductionPrintOrder.java
@@ -1,17 +1,25 @@
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;
+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 +43,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;
/**
@@ -108,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<>();
/**
* 宸ヨ壓瑕佹眰
@@ -186,12 +198,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 +232,57 @@
@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;
+
+ /**
+ * 鍒囨枡鍥剧ず閫夋嫨 鍗曢��
+ */
+ @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;
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3