zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
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
package com.changhong.epc.admin.controller.asset;
 
import com.changhong.epc.admin.service.asset.AssetDepreciationService;
import com.changhong.epc.bean.admin.AssetDepreciation;
import com.changhong.epc.constter.admin.AssetDepreciationUrlConst;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
import java.util.List;
 
import static com.iemsoft.framework.cloud.core.constant.BaseConst.VALID_DATA_FLGE;
 
@RestController
public class AssetDepreciationController implements AssetDepreciationUrlConst {
 
    @Resource
    private AssetDepreciationService assetDepreciationService;
 
    /**
     * 添加
     * @param assetDepreciation
     * @return
     */
    @PostMapping(ASSET_DEPRECIATION_INSERT)
    public int insert(@RequestBody AssetDepreciation assetDepreciation){
        return assetDepreciationService.insert(assetDepreciation);
    }
 
    /**
     * 修改
     * @param assetDepreciation
     * @return
     */
    @PostMapping(ASSET_DEPRECIATION_UPDATE)
    public int update(@RequestBody AssetDepreciation assetDepreciation){
        return assetDepreciationService.update(assetDepreciation);
    }
 
    /**
     * 查询列表
     * @param assetDepreciation
     * @return
     */
    @PostMapping(ASSET_DEPRECIATION_SELECT_LIST)
    public List<AssetDepreciation> select(@RequestBody AssetDepreciation assetDepreciation){
        assetDepreciation.setDataStart(VALID_DATA_FLGE.intValue());
        return assetDepreciationService.select(assetDepreciation);
    }
 
    @PostMapping(ASSET_LAST_ACCOUNT)
    public String selectLastAccountDate(@RequestBody AssetDepreciation assetDepreciation){
        return assetDepreciationService.selectLastAccountDate(assetDepreciation);
    }
 
}