EquipmentAllotAddDTO.java 2.0 KB
package com.skua.modules.supplies.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.util.Date;
import java.util.List;

/**
 * 物料调拨 add
 * @author 邓学龙
 * @date 2022/12/8 23:18
 */
@Data
@ApiModel("EquipmentAllotAddDTO")
public class EquipmentAllotAddDTO {

    /**所属机构*/
    //@NotBlank(message = "所属机构不能为空")
    @ApiModelProperty(value = "所属机构")
    private String departId;
    /**调拨单号*/
    @ApiModelProperty(value = "调拨单号")
    private String allotOrder;
    /**出库仓库id*/
    @NotBlank(message = "出库仓库不能为空")
    @ApiModelProperty(value = "出库仓库id")
    private String outSuppliesWarehouseId;
    /**入库仓库id*/
    @NotBlank(message = "入库仓库不能为空")
    @ApiModelProperty(value = "入库仓库id")
    private String inSuppliesWarehouseId;
    /**经办人id*/
    @NotBlank(message = "经办人不能为空")
    @ApiModelProperty(value = "经办人id")
    private String transactBy;
    /**调拨时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "调拨时间")
    private Date allotTime;
    /**备注*/
    @ApiModelProperty(value = "备注")
    private String allotRemark;

    @Valid
    @NotNull
    @Size(min = 1)
    @ApiModelProperty(value = "调拨详情")
    private List<EquipmentAllotChildAddDTO> allotChildList;

    @Data
    public static class EquipmentAllotChildAddDTO{
        @NotBlank
        @ApiModelProperty(value = "物资id")
        private String suppliesId;

        @NotNull
        @DecimalMin(value = "0")
        @ApiModelProperty(value = "物资调拨数量")
        private java.math.BigDecimal allotNum;
    }

}