【需求】出库明细查询接口完善

dev
zengchenxi 6 months ago
parent 39d39f9955
commit e7412d7916

@ -1,13 +1,12 @@
package com.chanko.yunxi.mes.module.biz.controller.admin.storagemat.vo; package com.chanko.yunxi.mes.module.biz.controller.admin.storagemat.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.Data;
import java.util.*;
import java.util.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 入/出库物料 Response VO") @Schema(description = "管理后台 - 入/出库物料 Response VO")
@Data @Data
@ -65,4 +64,12 @@ public class StorageMatRespVO {
@Schema(description = "工序id") @Schema(description = "工序id")
private Long procedureId; private Long procedureId;
private String projectSubCode;
private String materialType;
private String spec;
private String unit;
} }

@ -22,16 +22,13 @@ public class StorageMatSaveReqVO {
@NotNull(message = "物料 Id,对应 base_material表中的 Id 列不能为空") @NotNull(message = "物料 Id,对应 base_material表中的 Id 列不能为空")
private Long matId; private Long matId;
@Schema(description = "仓库 Id对应 wms_wh 表中的Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31860") @Schema(description = "仓库 Id对应 wms_wh 表中的Id", example = "31860")
@NotNull(message = "仓库 Id对应 wms_wh 表中的Id不能为空")
private Long whId; private Long whId;
@Schema(description = "库区 Id对应 wms_rg 表中的Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "13060") @Schema(description = "库区 Id对应 wms_rg 表中的Id", example = "13060")
@NotNull(message = "库区 Id对应 wms_rg 表中的Id不能为空")
private Long rgId; private Long rgId;
@Schema(description = "库区 Id对应 wms_rg 表中的Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "25544") @Schema(description = "库区 Id对应 wms_rg 表中的Id", example = "25544")
@NotNull(message = "库区 Id对应 wms_rg 表中的Id不能为空")
private Long pnId; private Long pnId;
@Schema(description = "库存良品数量") @Schema(description = "库存良品数量")

@ -75,4 +75,13 @@ public class StorageMatDO extends BaseDO {
@TableField(exist = false) @TableField(exist = false)
private String projectSubCode; private String projectSubCode;
@TableField(exist = false)
private String materialType;
@TableField(exist = false)
private String spec;
@TableField(exist = false)
private String unit;
} }

@ -39,10 +39,9 @@ public interface StorageMatMapper extends BaseMapperX<StorageMatDO> {
} }
default List<StorageMatDO> selectMatByStorckID(Long stockId) { default List<StorageMatDO> selectMatByStorckID(Long stockId) {
MPJLambdaWrapper<StorageMatDO> query = new MPJLambdaWrapper<>(); MPJLambdaWrapper<StorageMatDO> query = new MPJLambdaWrapper<>();
query.selectAll(StorageMatDO.class) query.selectAll(StorageMatDO.class)
.select("a.name as projectSubName", "a.code as projectSubCode") .select("a.name as projectSubName", "a.code as projectSubCode", "a.material_type, a.spec, a.unit")
.leftJoin(MaterialDO.class, "a", MaterialDO::getId, StorageMatDO::getMatId) .leftJoin(MaterialDO.class, "a", MaterialDO::getId, StorageMatDO::getMatId)
.disableSubLogicDel() .disableSubLogicDel()
.eq(stockId!= null && stockId!= 0,StorageMatDO::getStockId, stockId); .eq(stockId!= null && stockId!= 0,StorageMatDO::getStockId, stockId);

Loading…
Cancel
Save