tuqin
2026-11-03 9494075e6d9d2a4b2b884b4ed740dee0c434734c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package cn.iocoder.yudao.module.trade.controller.admin.domestic.vo;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
 
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
 
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
 
@Schema(description = "管理后台 - 内贸订单创建/更新 Request VO")
@Data
public class TradeDomesticOrderSaveReqVO {
 
    @Schema(description = "编号", example = "1024")
    private Long id;
 
    @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "18336")
    @NotNull(message = "客户不能为空")
    private Long customerId;
 
    @Schema(description = "业务员用户编号", example = "17144")
    private Long saleUserId;
 
    @Schema(description = "订单日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime orderTime;
 
    @Schema(description = "交货地址", example = "新疆乌鲁木齐市...")
    private String deliveryAddress;
 
    @Schema(description = "备注", example = "备注信息")
    private String remark;
 
    @Schema(description = "附件 blobId 列表", example = "[1,2,3]")
    private List<Long> blobIds;
 
    @Schema(description = "明细列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "明细不能为空")
    private List<Item> items;
 
    @Schema(description = "内贸订单明细")
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Item {
 
        @Schema(description = "编号", example = "888")
        private Long id;
 
        @Schema(description = "MDM 物料编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20529")
        @NotNull(message = "物料编号不能为空")
        private Long itemId;
 
        @Schema(description = "单价(元)", requiredMode = Schema.RequiredMode.REQUIRED, example = "123.00")
        @NotNull(message = "单价不能为空")
        private BigDecimal itemPrice;
 
        @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
        @NotNull(message = "数量不能为空")
        private BigDecimal count;
 
        @Schema(description = "税率(%)", example = "13.00")
        private BigDecimal taxPercent;
 
        @Schema(description = "上游原料车次批次(预留)", example = "PC20260916000001")
        private String batchCode;
 
        @Schema(description = "备注", example = "备注")
        private String remark;
 
    }
 
}