fix:物料入库、物料库存相关接口

This commit is contained in:
shusir
2026-02-06 18:02:00 +08:00
parent a7e82da877
commit 0b2d10e662
30 changed files with 287 additions and 540 deletions

View File

@@ -0,0 +1,9 @@
package com.zt.plat.module.qms.resource.material.constant;
/**
* 物料常量
*/
public class MaterialConstants {
// 字典 类型
public static final String DICT_MATERIAL_FLOW_TYPE = "jy_material_lifecycle_bsn_type";
}

View File

@@ -88,10 +88,10 @@ public class MaterialInfomationController implements BusinessControllerMarker {
@GetMapping("/page")
@Operation(summary = "获得物料实例分页")
@PreAuthorize("@ss.hasPermission('qms:material-infomation:query')")
// @PreAuthorize("@ss.hasPermission('qms:material-infomation:query')")
public CommonResult<PageResult<MaterialInfomationRespVO>> getMaterialInfomationPage(@Valid MaterialInfomationPageReqVO pageReqVO) {
PageResult<MaterialInfomationDO> pageResult = materialInfomationService.getMaterialInfomationPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, MaterialInfomationRespVO.class));
PageResult<MaterialInfomationRespVO> pageResult = materialInfomationService.getMaterialInfomationPageWithPdtInfo(pageReqVO);
return success(pageResult);
}
@GetMapping("/export-excel")

View File

@@ -29,7 +29,7 @@ import java.util.List;
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - 入库明细,验收入库、盘盈入库等")
@Tag(name = "管理后台 - 物料入库明细,验收入库、盘盈入库等")
@RestController
@RequestMapping("/qms/resource/material-inventory-inbound-detail")
@Validated
@@ -85,8 +85,17 @@ public class MaterialInventoryInboundDetailController implements BusinessControl
@Operation(summary = "获得入库明细,验收入库、盘盈入库等分页")
// @PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:query')")
public CommonResult<PageResult<MaterialInventoryInboundDetailRespVO>> getMaterialInventoryInboundDetailPage(@Valid MaterialInventoryInboundDetailPageReqVO pageReqVO) {
PageResult<MaterialInventoryInboundDetailDO> pageResult = materialInventoryInboundDetailService.getMaterialInventoryInboundDetailPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, MaterialInventoryInboundDetailRespVO.class));
PageResult<MaterialInventoryInboundDetailRespVO> pageResult = materialInventoryInboundDetailService.getInventoryInboundDetailPageWithMaterialInfo(pageReqVO);
return success(pageResult);
}
@GetMapping("/list")
@Operation(summary = "根据入库单id获取物料列表")
@Parameter(name = "inboundId", description = "入库单id", required = true)
// @PreAuthorize("@ss.hasPermission('qms:material-inventory-inbound-detail:query')")
public CommonResult<List<MaterialInventoryInboundDetailRespVO>> getMaterialInfoListByInboundId(@RequestParam("inboundId") Long inboundId) {
List<MaterialInventoryInboundDetailRespVO> materialInfoList = materialInventoryInboundDetailService.getMaterialInfoListByInboundId(inboundId);
return success(materialInfoList);
}
@GetMapping("/export-excel")

View File

@@ -52,8 +52,6 @@ public class MaterialLifecycleController extends AbstractFileUploadController im
@Resource
private MaterialLifecycleService materialLifecycleService;
// QMS_RESOURCE_MATERIAL_COMMON
@PostMapping("/create")
@Operation(summary = "新建物料流程")
// @PreAuthorize("@ss.hasPermission('qms:material-lifecycle:create')")

View File

@@ -38,10 +38,30 @@ public class MaterialInfomationRespVO {
@ExcelProperty("名称")
private String name;
@Schema(description = "型号")
@ExcelProperty("型号")
private String modelNo;
@Schema(description = "规格")
@ExcelProperty("规格")
private String specification;
@Schema(description = "技术参数")
@ExcelProperty("技术参数")
private String parameter;
@Schema(description = "制造商")
@ExcelProperty("制造商")
private String manufacturer;
@Schema(description = "单位")
@ExcelProperty("单位")
private String unit;
@Schema(description = "保质期(天)")
@ExcelProperty("保质期(天)")
private Integer due;
@Schema(description = "上架状态,0-未上架1-已上架", example = "2")
@ExcelProperty("上架状态,0-未上架1-已上架")
private Integer publishStatus;

View File

@@ -24,10 +24,6 @@ public class MaterialInventoryInboundDetailRespVO {
@ExcelProperty("批次id")
private Long batchId;
// 物料名称
// 批次编号
@Schema(description = "批次工段id", example = "1454")
@ExcelProperty("批次工段id")
private Long batchGongduanId;
@@ -38,6 +34,26 @@ public class MaterialInventoryInboundDetailRespVO {
@ExcelProperty("物料实例ID")
private Long materialInfomationId;
@Schema(description = "物料编码")
@ExcelProperty("物料编码")
private String infomationCode;
@Schema(description = "物料名称")
@ExcelProperty("物料名称")
private String infomationName;
@Schema(description = "业务类型,验收入库、盘盈入库等")
@ExcelProperty("业务类型,验收入库、盘盈入库等")
private String businessType;
@Schema(description = "存放位置名称")
@ExcelProperty("存放位置名称")
private String locationName;
@Schema(description = "存放位置编码")
@ExcelProperty("存放位置编码")
private String locationCode;
@Schema(description = "入库人", example = "赵六")
@ExcelProperty("入库人")
private String inboundUserName;

View File

@@ -1,41 +0,0 @@
package com.zt.plat.module.qms.resource.material.controller.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.zt.plat.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 存放位置分页 Request VO")
@Data
public class MaterialLocationPageReqVO extends PageParam {
@Schema(description = "上级id", example = "9092")
private Long parentId;
@Schema(description = "名称", example = "赵六")
private String name;
@Schema(description = "编码")
private String code;
@Schema(description = "容量")
private String capacity;
@Schema(description = "位置")
private String location;
@Schema(description = "所属部门")
private String systemDepartmentCode;
@Schema(description = "备注")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@@ -1,51 +0,0 @@
package com.zt.plat.module.qms.resource.material.controller.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 存放位置 Response VO")
@Data
@ExcelIgnoreUnannotated
public class MaterialLocationRespVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "32724")
@ExcelProperty("主键")
private Long id;
@Schema(description = "上级id", example = "9092")
@ExcelProperty("上级id")
private Long parentId;
@Schema(description = "名称", example = "赵六")
@ExcelProperty("名称")
private String name;
@Schema(description = "编码")
@ExcelProperty("编码")
private String code;
@Schema(description = "容量")
@ExcelProperty("容量")
private String capacity;
@Schema(description = "位置")
@ExcelProperty("位置")
private String location;
@Schema(description = "所属部门")
@ExcelProperty("所属部门")
private String systemDepartmentCode;
@Schema(description = "备注")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

View File

@@ -1,36 +0,0 @@
package com.zt.plat.module.qms.resource.material.controller.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
@Schema(description = "管理后台 - 存放位置新增/修改 Request VO")
@Data
public class MaterialLocationSaveReqVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "32724")
private Long id;
@Schema(description = "上级id", example = "9092")
private Long parentId;
@Schema(description = "名称", example = "赵六")
private String name;
@Schema(description = "编码")
private String code;
@Schema(description = "容量")
private String capacity;
@Schema(description = "位置")
private String location;
@Schema(description = "所属部门")
private String systemDepartmentCode;
@Schema(description = "备注")
private String remark;
}

Some files were not shown because too many files have changed in this diff Show More