gaoluyang
8 天以前 7bd10d34e8a8dc2437ec8551eb511e37634d7306
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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);
 
}