feat(qc): 实现质检模板物料防重复选择功能
- 后端物料分页查询新增 excludeIds 参数以支持排除指定物料
- 前端物料选择组件及弹窗新增 excludeIds 属性并透传至查询接口
- 质检模板物料表单替换为自定义物料选择组件并传入排除列表
- 获取已绑定物料ID并作为排除项以防止重复选择
- 存储记录类型枚举新增巡检业务类型以支持相关记录
| | |
| | | import lombok.ToString; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Schema(description = "管理后台 - MDM 物料分页 Request VO") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ToString(callSuper = true) |
| | | public class MdmItemPageReqVO extends PageParam { |
| | | |
| | | @Schema(description = "排除的物料编号") |
| | | private List<Long> excludeIds; |
| | | |
| | | @Schema(description = "物料编码", example = "ITEM001") |
| | | private String code; |
| | |
| | | @Schema(description = "创建时间") |
| | | private LocalDateTime[] createTime; |
| | | |
| | | } |
| | | } |
| | |
| | | .eqIfPresent(MdmItemDO::getStatus, reqVO.getStatus()) |
| | | .betweenIfPresent(MdmItemDO::getCreateTime, reqVO.getCreateTime()) |
| | | .orderByAsc(MdmItemDO::getSort) |
| | | .orderByDesc(MdmItemDO::getId)); |
| | | .orderByDesc(MdmItemDO::getId) |
| | | .notIn(reqVO.getExcludeIds() != null && !reqVO.getExcludeIds().isEmpty(), MdmItemDO::getId, reqVO.getExcludeIds())); |
| | | } |
| | | |
| | | default List<MdmItemDO> selectList(MdmItemPageReqVO reqVO, Collection<Long> categoryIds) { |
| | |
| | | */ |
| | | List<Map<String, Object>> selectItemReferenceCount(@Param("itemId") Long itemId); |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | // ===== 质检 ===== |
| | | QUALITY_INSPECT("quality_inspect", "质检"), |
| | | MES_QC_PATROL("mes_qc_patrol", "巡检"), |
| | | |
| | | // ===== 设备 ===== |
| | | DEVICE_MAINTENANCE("device_maintenance", "设备维护"), |