gaoluyang
昨天 90b3ad820eea45d021835197eac5bc3ad55b12ed
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
package cn.iocoder.yudao.module.finance.service.asset;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.finance.controller.admin.asset.vo.FinFixedAssetDepreciateRespVO;
import cn.iocoder.yudao.module.finance.controller.admin.asset.vo.FinFixedAssetPageReqVO;
import cn.iocoder.yudao.module.finance.controller.admin.asset.vo.FinFixedAssetSaveReqVO;
import cn.iocoder.yudao.module.finance.dal.dataobject.asset.FinFixedAssetDO;
import jakarta.validation.Valid;
 
import java.util.Collection;
import java.util.List;
 
/**
 * 固定资产 Service 接口
 *
 * @author 超级管理员
 */
public interface FinFixedAssetService {
 
    /**
     * 创建固定资产
     *
     * @param createReqVO 创建信息
     * @return 资产编号
     */
    Long createFixedAsset(@Valid FinFixedAssetSaveReqVO createReqVO);
 
    /**
     * 更新固定资产
     *
     * 修改原值、使用年限、残值率时会按新参数重算累计折旧与净值
     *
     * @param updateReqVO 更新信息
     */
    void updateFixedAsset(@Valid FinFixedAssetSaveReqVO updateReqVO);
 
    /**
     * 删除固定资产
     *
     * @param id 资产编号
     */
    void deleteFixedAsset(Long id);
 
    /**
     * 批量删除固定资产
     *
     * @param ids 资产编号数组
     */
    void deleteFixedAssetList(List<Long> ids);
 
    /**
     * 计提折旧
     *
     * 每个资产计提一个月的折旧:月折旧额 = 原值 × (1 - 残值率 / 100) / (使用年限 × 12)。
     * 累计折旧以应计提总额封顶,最后一期按剩余可折旧额计提,净值不会被提成负数
     *
     * @param ids 资产编号数组;为空时对所有未报废的固定资产计提
     * @return 计提结果
     */
    FinFixedAssetDepreciateRespVO depreciateFixedAssetList(List<Long> ids);
 
    /**
     * 获得固定资产
     *
     * @param id 资产编号
     * @return 固定资产
     */
    FinFixedAssetDO getFixedAsset(Long id);
 
    /**
     * 获得固定资产分页
     *
     * @param pageReqVO 分页查询
     * @return 固定资产分页
     */
    PageResult<FinFixedAssetDO> getFixedAssetPage(FinFixedAssetPageReqVO pageReqVO);
 
    /**
     * 获得指定编号的固定资产列表
     *
     * @param ids 资产编号数组
     * @return 固定资产列表
     */
    List<FinFixedAssetDO> getFixedAssetList(Collection<Long> ids);
 
    /**
     * 获得全部固定资产列表
     *
     * @return 固定资产列表
     */
    List<FinFixedAssetDO> getFixedAssetList();
 
}