云
2026-09-29 f87ce86307056f63f79312178037cc8714eb2b13
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package cn.iocoder.yudao.module.archive.service.borrow;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.archive.controller.admin.borrow.vo.ArchiveBorrowPageReqVO;
import cn.iocoder.yudao.module.archive.controller.admin.borrow.vo.ArchiveBorrowReturnReqVO;
import cn.iocoder.yudao.module.archive.controller.admin.borrow.vo.ArchiveBorrowSaveReqVO;
import cn.iocoder.yudao.module.archive.dal.dataobject.borrow.ArchiveBorrowDO;
 
import java.util.List;
import java.util.Map;
 
/**
 * 档案借阅单 Service 接口
 *
 * @author 超级管理员
 */
public interface ArchiveBorrowService {
 
    /**
     * 创建借阅单(草稿)
     *
     * @param createReqVO 创建信息
     * @return 借阅单编号
     */
    Long createBorrow(ArchiveBorrowSaveReqVO createReqVO);
 
    /**
     * 更新借阅单(仅草稿或已驳回可修改)
     *
     * @param updateReqVO 更新信息
     */
    void updateBorrow(ArchiveBorrowSaveReqVO updateReqVO);
 
    /**
     * 删除借阅单(仅草稿可删除)
     *
     * @param id 借阅单编号
     */
    void deleteBorrow(Long id);
 
    /**
     * 获得借阅单
     *
     * @param id 借阅单编号
     * @return 借阅单
     */
    ArchiveBorrowDO getBorrow(Long id);
 
    /**
     * 获得借阅单分页
     *
     * @param reqVO 查询条件
     * @return 借阅单分页
     */
    PageResult<ArchiveBorrowDO> getBorrowPage(ArchiveBorrowPageReqVO reqVO);
 
    /**
     * 获得逾期借阅单分页(借出中 且 归还期限已过)
     *
     * @param reqVO 查询条件
     * @return 借阅单分页
     */
    PageResult<ArchiveBorrowDO> getOverdueBorrowPage(ArchiveBorrowPageReqVO reqVO);
 
    /**
     * 提交借阅审批
     *
     * @param id                   借阅单编号
     * @param processDefinitionKey 流程定义 key,为空时自动取档案借阅审批分类下最新的已发布流程
     */
    void submitBorrow(Long id, String processDefinitionKey);
 
    /**
     * 获得档案借阅审批可用的流程定义列表
     *
     * @return 流程定义列表(key / name)
     */
    List<Map<String, Object>> getApproveProcessDefinitionList();
 
    /**
     * 归还登记(仅借出中可登记)
     *
     * @param returnReqVO 归还信息
     */
    void returnBorrow(ArchiveBorrowReturnReqVO returnReqVO);
 
    /**
     * 回写借阅单审批结果(BPM 监听器调用)
     *
     * @param id        借阅单编号
     * @param bpmResult BPM 审批结果
     * @param reason    驳回原因
     */
    void updateBorrowAuditStatus(Long id, Integer bpmResult, String reason);
 
}