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);
|
}
|
|
}
|