| | |
| | | package cn.iocoder.yudao.module.mes.service.wm.itemreceipt; |
| | | |
| | | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.wm.itemreceipt.vo.MesWmItemReceiptImportExcelVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.wm.itemreceipt.vo.MesWmItemReceiptImportRespVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.wm.itemreceipt.vo.MesWmItemReceiptPageReqVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.wm.itemreceipt.vo.MesWmItemReceiptSaveReqVO; |
| | | import cn.iocoder.yudao.module.mes.dal.dataobject.wm.itemreceipt.MesWmItemReceiptDO; |
| | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; |
| | | |
| | |
| | | PageResult<MesWmItemReceiptDO> getItemReceiptPage(MesWmItemReceiptPageReqVO pageReqVO); |
| | | |
| | | /** |
| | | * 提交采购入库单(草稿 → 待上架) |
| | | * 提交采购入库单审批(草稿 → 待上架) |
| | | * |
| | | * 审核人由「系统管理 - 审批配置」按业务类型统一配置(业务编码 item_receipt_approve), |
| | | * 提交时无需指定;未启用审批或未配置有效审核人时抛出业务异常。 |
| | | * |
| | | * @param id 编号 |
| | | */ |
| | | void submitItemReceipt(Long id); |
| | | |
| | | /** |
| | | * 执行上架(待上架 → 待入库) |
| | | * 执行上架校验(仅校验已审批单据的明细数量一致性,不修改单据状态) |
| | | * |
| | | * 单据状态只能由审核(APPROVING → APPROVED)与入库(APPROVED → FINISHED)推进, |
| | | * 本方法不得把单据直接置为已审批。 |
| | | * |
| | | * @param id 编号 |
| | | */ |
| | |
| | | void cancelItemReceipt(Long id); |
| | | |
| | | /** |
| | | * 校验采购入库单存在且处于可编辑状态(草稿或待上架) |
| | | * 校验采购入库单存在且处于可编辑状态(仅草稿) |
| | | * |
| | | * @param id 编号 |
| | | * @return 采购入库单 |
| | |
| | | Long generateItemReceiptFromArrivalNotice(Long arrivalNoticeId); |
| | | |
| | | /** |
| | | * 提交采购入库单审批 |
| | | * 获得采购入库单审批的审核人编号集合 |
| | | * |
| | | * @param id 入库单编号 |
| | | * @param processDefinitionKey 流程定义 Key |
| | | * 供前端判断当前登录用户是否应展示「审核」按钮;未配置时返回空集合。 |
| | | * |
| | | * @return 审核人用户编号集合 |
| | | */ |
| | | void submitItemReceiptApproval(Long id, String processDefinitionKey); |
| | | Set<Long> getItemReceiptApproverUserIds(); |
| | | |
| | | /** |
| | | * 更新采购入库单审批状态(由 BPM Listener 回调) |
| | | * 审核采购入库单(待上架 → 待执行入库 / 草稿) |
| | | * |
| | | * @param id 入库单编号 |
| | | * @param bpmResult BPM 审批结果 |
| | | * 仅业务编码 item_receipt_approve 配置的审核人可操作(多人时或签),且仅在待上架状态下允许。 |
| | | * 审核通过置为待执行入库;审核不通过必须填写原因,退回草稿可修改后重新提交。 |
| | | * |
| | | * @param id 入库单编号 |
| | | * @param pass 是否通过,true=通过 / false=不通过 |
| | | * @param reviewRemark 审核意见,审核不通过时必填 |
| | | */ |
| | | void updateItemReceiptAuditStatus(Long id, Integer bpmResult); |
| | | void auditItemReceipt(Long id, Boolean pass, String reviewRemark); |
| | | |
| | | /** |
| | | * 导入采购入库单 |
| | | * |
| | | * @param importList 导入数据 |
| | | * @param updateSupport 是否支持更新 |
| | | * @return 导入结果 |
| | | */ |
| | | MesWmItemReceiptImportRespVO importItemReceiptList(List<MesWmItemReceiptImportExcelVO> importList, boolean updateSupport); |
| | | |
| | | } |