package cn.iocoder.yudao.module.mes.service.dv.borrow;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.module.mes.controller.admin.dv.borrow.vo.MesDvBorrowPageReqVO;
|
import cn.iocoder.yudao.module.mes.controller.admin.dv.borrow.vo.MesDvBorrowSaveReqVO;
|
import cn.iocoder.yudao.module.mes.dal.dataobject.dv.borrow.MesDvBorrowDO;
|
import jakarta.validation.Valid;
|
|
import java.util.Collection;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* MES 设备借用归还 Service 接口
|
*
|
* @author 超级管理员
|
*/
|
public interface MesDvBorrowService {
|
|
/**
|
* 创建设备借用记录
|
*
|
* @param createReqVO 创建信息
|
* @return 编号
|
*/
|
Long createBorrow(@Valid MesDvBorrowSaveReqVO createReqVO);
|
|
/**
|
* 更新设备借用记录
|
*
|
* @param updateReqVO 更新信息
|
*/
|
void updateBorrow(@Valid MesDvBorrowSaveReqVO updateReqVO);
|
|
/**
|
* 删除设备借用记录
|
*
|
* @param id 编号
|
*/
|
void deleteBorrow(Long id);
|
|
/**
|
* 设备归还
|
*
|
* @param id 借用记录编号
|
* @param returnCondition 归还状况
|
*/
|
void returnBorrow(Long id, String returnCondition);
|
|
/**
|
* 获得设备借用记录
|
*
|
* @param id 编号
|
* @return 借用记录
|
*/
|
MesDvBorrowDO getBorrow(Long id);
|
|
/**
|
* 获得设备借用记录分页
|
*
|
* @param pageReqVO 分页查询
|
* @return 分页结果
|
*/
|
PageResult<MesDvBorrowDO> getBorrowPage(MesDvBorrowPageReqVO pageReqVO);
|
|
/**
|
* 获得设备借用记录 Map
|
*
|
* @param ids 编号集合
|
* @return 借用记录 Map
|
*/
|
Map<Long, MesDvBorrowDO> getBorrowMap(Collection<Long> ids);
|
|
/**
|
* 按设备查询未归还的借用记录
|
*
|
* @param machineryId 设备编号
|
* @return 借用记录列表
|
*/
|
List<MesDvBorrowDO> getBorrowedListByMachineryId(Long machineryId);
|
|
}
|