| | |
| | | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.wm.batch.vo.MesWmBatchGenerateReqVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.wm.batch.vo.MesWmBatchPageReqVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.wm.batch.vo.MesWmBatchProcessTraceRespVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.wm.batch.vo.MesWmBatchPurchaseSourceRespVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.wm.batch.vo.MesWmBatchSalesTargetRespVO; |
| | | import cn.iocoder.yudao.module.mes.dal.dataobject.wm.batch.MesWmBatchDO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Collection; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 批次管理 Service 接口 |
| | |
| | | */ |
| | | MesWmBatchDO getBatch(Long id); |
| | | |
| | | List<MesWmBatchDO> getBatchList(Collection<Long> ids); |
| | | |
| | | default Map<Long, MesWmBatchDO> getBatchMap(Collection<Long> ids) { |
| | | return getBatchList(ids).stream().collect(Collectors.toMap(MesWmBatchDO::getId, batch -> batch)); |
| | | } |
| | | |
| | | /** |
| | | * 根据批次号获得批次 |
| | | * |
| | |
| | | * 根据物料批次配置,查询或生成批次记录 |
| | | * |
| | | * @param reqVO 批次参数(包含 itemId 及其他可选属性) |
| | | * @return 批次记录(如果物料未启用批次管理则返回 null) |
| | | * @return 批次记录(未启用批次管理且未传盘号时返回 null) |
| | | */ |
| | | MesWmBatchDO getOrGenerateBatchCode(MesWmBatchGenerateReqVO reqVO); |
| | | |
| | |
| | | */ |
| | | Long getBatchCountByToolId(Long toolId); |
| | | |
| | | /** |
| | | * 获得批次采购来源(采购入库单 + IQC) |
| | | * |
| | | * @param code 批次号 |
| | | * @return 采购来源列表 |
| | | */ |
| | | List<MesWmBatchPurchaseSourceRespVO> getPurchaseSourceList(String code); |
| | | |
| | | /** |
| | | * 获得批次销售去向(销售出库单 + OQC) |
| | | * |
| | | * @param code 批次号 |
| | | * @return 销售去向列表 |
| | | */ |
| | | List<MesWmBatchSalesTargetRespVO> getSalesTargetList(String code); |
| | | |
| | | /** |
| | | * 获得批次工序流转(产出/投入事件) |
| | | * |
| | | * @param code 批次号 |
| | | * @return 工序流转列表 |
| | | */ |
| | | List<MesWmBatchProcessTraceRespVO> getProcessTraceList(String code); |
| | | |
| | | /** |
| | | * 根据 SN 码获得批次 |
| | | * |
| | | * @param sn SN 码 |
| | | * @return 批次记录(未命中返回 null) |
| | | */ |
| | | MesWmBatchDO getBatchBySn(String sn); |
| | | |
| | | } |