@@ -0,0 +1,61 @@
|
||||
package pc.exam.pp.module.erp.controller.admin.sale.vo.out;
|
||||
|
||||
import pc.exam.pp.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static pc.exam.pp.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 销售出库分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ErpSaleOutPageReqVO extends PageParam {
|
||||
|
||||
public static final Integer RECEIPT_STATUS_NONE = 0;
|
||||
public static final Integer RECEIPT_STATUS_PART = 1;
|
||||
public static final Integer RECEIPT_STATUS_ALL = 2;
|
||||
|
||||
@Schema(description = "销售单编号", example = "XS001")
|
||||
private String no;
|
||||
|
||||
@Schema(description = "客户编号", example = "1724")
|
||||
private Long customerId;
|
||||
|
||||
@Schema(description = "出库时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] outTime;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "出库状态", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "产品编号", example = "1")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "仓库编号", example = "1")
|
||||
private Long warehouseId;
|
||||
|
||||
@Schema(description = "结算账号编号", example = "1")
|
||||
private Long accountId;
|
||||
|
||||
@Schema(description = "收款状态", example = "1")
|
||||
private Integer receiptStatus;
|
||||
|
||||
@Schema(description = "是否可收款", example = "true")
|
||||
private Boolean receiptEnable; // 对应 receiptStatus = [0, 1]
|
||||
|
||||
@Schema(description = "销售单号", example = "1")
|
||||
private String orderNo;
|
||||
|
||||
}
|
@@ -0,0 +1,148 @@
|
||||
package pc.exam.pp.module.erp.controller.admin.sale.vo.out;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 销售出库 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpSaleOutRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17386")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "出库单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "XS001")
|
||||
@ExcelProperty("出库单编号")
|
||||
private String no;
|
||||
|
||||
@Schema(description = "出库状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("出库状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1724")
|
||||
private Long customerId;
|
||||
@Schema(description = "客户名称", example = "芋道")
|
||||
@ExcelProperty("客户名称")
|
||||
private String customerName;
|
||||
|
||||
@Schema(description = "结算账户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "311.89")
|
||||
@ExcelProperty("结算账户编号")
|
||||
private Long accountId;
|
||||
|
||||
@Schema(description = "出库员编号", example = "1888")
|
||||
private Long saleUserId;
|
||||
|
||||
@Schema(description = "出库时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("出库时间")
|
||||
private LocalDateTime outTime;
|
||||
|
||||
@Schema(description = "销售订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17386")
|
||||
private Long orderId;
|
||||
@Schema(description = "销售订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "XS001")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "合计数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "15663")
|
||||
@ExcelProperty("合计数量")
|
||||
private BigDecimal totalCount;
|
||||
@Schema(description = "最终合计价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "24906")
|
||||
@ExcelProperty("最终合计价格")
|
||||
private BigDecimal totalPrice;
|
||||
@Schema(description = "已收款金额,单位:元", requiredMode = Schema.RequiredMode.REQUIRED, example = "7127")
|
||||
private BigDecimal receiptPrice;
|
||||
|
||||
@Schema(description = "合计产品价格,单位:元", requiredMode = Schema.RequiredMode.REQUIRED, example = "7127")
|
||||
private BigDecimal totalProductPrice;
|
||||
|
||||
@Schema(description = "合计税额,单位:元", requiredMode = Schema.RequiredMode.REQUIRED, example = "7127")
|
||||
private BigDecimal totalTaxPrice;
|
||||
|
||||
@Schema(description = "优惠率,百分比", requiredMode = Schema.RequiredMode.REQUIRED, example = "99.88")
|
||||
private BigDecimal discountPercent;
|
||||
|
||||
@Schema(description = "优惠金额,单位:元", requiredMode = Schema.RequiredMode.REQUIRED, example = "7127")
|
||||
private BigDecimal discountPrice;
|
||||
|
||||
@Schema(description = "其它金额,单位:元", requiredMode = Schema.RequiredMode.REQUIRED, example = "7127")
|
||||
private BigDecimal otherPrice;
|
||||
|
||||
@Schema(description = "附件地址", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("附件地址")
|
||||
private String fileUrl;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建人", example = "芋道")
|
||||
private String creator;
|
||||
@Schema(description = "创建人名称", example = "芋道")
|
||||
private String creatorName;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "出库项列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Item> items;
|
||||
|
||||
@Schema(description = "产品信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("产品信息")
|
||||
private String productNames;
|
||||
|
||||
@Data
|
||||
public static class Item {
|
||||
|
||||
@Schema(description = "出库项编号", example = "11756")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "销售订单项编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11756")
|
||||
private Long orderItemId;
|
||||
|
||||
@Schema(description = "仓库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
|
||||
private Long warehouseId;
|
||||
|
||||
@Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "产品单位单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
|
||||
private Long productUnitId;
|
||||
|
||||
@Schema(description = "产品单价", example = "100.00")
|
||||
private BigDecimal productPrice;
|
||||
|
||||
@Schema(description = "产品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
|
||||
@NotNull(message = "产品数量不能为空")
|
||||
private BigDecimal count;
|
||||
|
||||
@Schema(description = "税率,百分比", example = "99.88")
|
||||
private BigDecimal taxPercent;
|
||||
|
||||
@Schema(description = "税额,单位:元", example = "100.00")
|
||||
private BigDecimal taxPrice;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
// ========== 关联字段 ==========
|
||||
|
||||
@Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "巧克力")
|
||||
private String productName;
|
||||
@Schema(description = "产品条码", requiredMode = Schema.RequiredMode.REQUIRED, example = "A9985")
|
||||
private String productBarCode;
|
||||
@Schema(description = "产品单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "盒")
|
||||
private String productUnitName;
|
||||
|
||||
@Schema(description = "库存数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
|
||||
private BigDecimal stockCount; // 该字段仅仅在“详情”和“编辑”时使用
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,84 @@
|
||||
package pc.exam.pp.module.erp.controller.admin.sale.vo.out;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 销售出库新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpSaleOutSaveReqVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17386")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "结算账户编号", example = "31189")
|
||||
private Long accountId;
|
||||
|
||||
@Schema(description = "销售员编号", example = "1888")
|
||||
private Long saleUserId;
|
||||
|
||||
@Schema(description = "出库时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "出库时间不能为空")
|
||||
private LocalDateTime outTime;
|
||||
|
||||
@Schema(description = "销售订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17386")
|
||||
@NotNull(message = "销售订单编号不能为空")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "优惠率,百分比", requiredMode = Schema.RequiredMode.REQUIRED, example = "99.88")
|
||||
private BigDecimal discountPercent;
|
||||
|
||||
@Schema(description = "其它金额,单位:元", example = "7127")
|
||||
private BigDecimal otherPrice;
|
||||
|
||||
@Schema(description = "附件地址", example = "https://www.iocoder.cn")
|
||||
private String fileUrl;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "出库清单列表")
|
||||
private List<Item> items;
|
||||
|
||||
@Data
|
||||
public static class Item {
|
||||
|
||||
@Schema(description = "出库项编号", example = "11756")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "销售订单项编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11756")
|
||||
@NotNull(message = "销售订单项编号不能为空")
|
||||
private Long orderItemId;
|
||||
|
||||
@Schema(description = "仓库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
|
||||
@NotNull(message = "仓库编号不能为空")
|
||||
private Long warehouseId;
|
||||
|
||||
@Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
|
||||
@NotNull(message = "产品编号不能为空")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "产品单位单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
|
||||
@NotNull(message = "产品单位单位不能为空")
|
||||
private Long productUnitId;
|
||||
|
||||
@Schema(description = "产品单价", example = "100.00")
|
||||
private BigDecimal productPrice;
|
||||
|
||||
@Schema(description = "产品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
|
||||
@NotNull(message = "产品数量不能为空")
|
||||
private BigDecimal count;
|
||||
|
||||
@Schema(description = "税率,百分比", example = "99.88")
|
||||
private BigDecimal taxPercent;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,48 @@
|
||||
package pc.exam.pp.module.erp.controller.admin.stock.vo.out;
|
||||
|
||||
import pc.exam.pp.framework.common.pojo.PageParam;
|
||||
import pc.exam.pp.framework.common.validation.InEnum;
|
||||
import pc.exam.pp.module.erp.enums.ErpAuditStatus;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static pc.exam.pp.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 其它出库单分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ErpStockOutPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "出库单号", example = "S123")
|
||||
private String no;
|
||||
|
||||
@Schema(description = "客户编号", example = "3113")
|
||||
private Long customerId;
|
||||
|
||||
@Schema(description = "出库时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] outTime;
|
||||
|
||||
@Schema(description = "状态", example = "10")
|
||||
@InEnum(ErpAuditStatus.class)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "产品编号", example = "1")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "仓库编号", example = "1")
|
||||
private Long warehouseId;
|
||||
|
||||
}
|
@@ -0,0 +1,110 @@
|
||||
package pc.exam.pp.module.erp.controller.admin.stock.vo.out;
|
||||
|
||||
import pc.exam.pp.framework.excel.core.annotations.DictFormat;
|
||||
import pc.exam.pp.framework.excel.core.convert.DictConvert;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static pc.exam.pp.module.erp.enums.DictTypeConstants.AUDIT_STATUS;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 其它出库单 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpStockOutRespVO {
|
||||
|
||||
@Schema(description = "出库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11756")
|
||||
@ExcelProperty("出库编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "出库单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "S123")
|
||||
@ExcelProperty("出库单号")
|
||||
private String no;
|
||||
|
||||
@Schema(description = "客户编号", example = "3113")
|
||||
private Long customerId;
|
||||
@Schema(description = "客户名称", example = "芋道")
|
||||
@ExcelProperty("客户名称")
|
||||
private String customerName;
|
||||
|
||||
@Schema(description = "出库时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("出库时间")
|
||||
private LocalDateTime outTime;
|
||||
|
||||
@Schema(description = "合计数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "15663")
|
||||
@ExcelProperty("合计数量")
|
||||
private BigDecimal totalCount;
|
||||
|
||||
@Schema(description = "合计金额,单位:元", requiredMode = Schema.RequiredMode.REQUIRED, example = "24906")
|
||||
@ExcelProperty("合计金额")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@ExcelProperty(value = "状态", converter = DictConvert.class)
|
||||
@DictFormat(AUDIT_STATUS)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "附件 URL", example = "https://www.iocoder.cn/1.doc")
|
||||
private String fileUrl;
|
||||
|
||||
@Schema(description = "创建人", example = "芋道")
|
||||
private String creator;
|
||||
@Schema(description = "创建人名称", example = "芋道")
|
||||
private String creatorName;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "出库项列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Item> items;
|
||||
|
||||
@Schema(description = "产品信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("产品信息")
|
||||
private String productNames;
|
||||
|
||||
@Data
|
||||
public static class Item {
|
||||
|
||||
@Schema(description = "出库项编号", example = "11756")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "仓库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
|
||||
private Long warehouseId;
|
||||
|
||||
@Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "产品单价", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
|
||||
private BigDecimal productPrice;
|
||||
|
||||
@Schema(description = "产品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
|
||||
private BigDecimal count;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
// ========== 关联字段 ==========
|
||||
|
||||
@Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "巧克力")
|
||||
private String productName;
|
||||
@Schema(description = "产品条码", requiredMode = Schema.RequiredMode.REQUIRED, example = "A9985")
|
||||
private String productBarCode;
|
||||
@Schema(description = "产品单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "盒")
|
||||
private String productUnitName;
|
||||
|
||||
@Schema(description = "库存数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
|
||||
private BigDecimal stockCount; // 该字段仅仅在“详情”和“编辑”时使用
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,64 @@
|
||||
package pc.exam.pp.module.erp.controller.admin.stock.vo.out;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 其它出库单新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpStockOutSaveReqVO {
|
||||
|
||||
@Schema(description = "出库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11756")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "客户编号", example = "3113")
|
||||
private Long customerId;
|
||||
|
||||
@Schema(description = "出库时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "出库时间不能为空")
|
||||
private LocalDateTime outTime;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "附件 URL", example = "https://www.iocoder.cn/1.doc")
|
||||
private String fileUrl;
|
||||
|
||||
@Schema(description = "出库项列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "出库项列表不能为空")
|
||||
@Valid
|
||||
private List<Item> items;
|
||||
|
||||
@Data
|
||||
public static class Item {
|
||||
|
||||
@Schema(description = "出库项编号", example = "11756")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "仓库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
|
||||
@NotNull(message = "仓库编号不能为空")
|
||||
private Long warehouseId;
|
||||
|
||||
@Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
|
||||
@NotNull(message = "产品编号不能为空")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "产品单价", example = "100.00")
|
||||
private BigDecimal productPrice;
|
||||
|
||||
@Schema(description = "产品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
|
||||
@NotNull(message = "产品数量不能为空")
|
||||
private BigDecimal count;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user