package com.sky.ioc.controller.operation;

/**
 * TODO
 *
 * @Description
 * @Author LunCe
 * @Date 2023/3/1 16:19
 **/

import com.sky.ioc.entity.params.IocParam;
import com.sky.ioc.service.assets.AssetService;
import com.sky.ioc.tool.ReturnMsg;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags ="智慧运营----资产管理")
@Slf4j
@RestController("operation_asset")
@RequestMapping("/operation_asset")
public class AssetController {


    @Resource
    private AssetService assetService;


    @ApiOperation("核心指标")
    @PostMapping("/getOperAssetCoreIndicators")
    public ReturnMsg getOperAssetCoreIndicators(@RequestBody IocParam iocParam){
        return assetService.getOperAssetCoreIndicators(iocParam);
    }


    @ApiOperation("投资分析")
    @PostMapping("/getAssetAnalysis")
    public ReturnMsg getAssetAnalysis(@RequestBody IocParam iocParam){
        return assetService.getAssetAnalysis(iocParam);
    }

    @ApiOperation("资产年限")
    @PostMapping("/getAssetAge")
    public ReturnMsg getAssetAge(@RequestBody IocParam iocParam){
        return assetService.getAssetAge(iocParam);
    }




    @ApiOperation("资产占比排名")
    @PostMapping("/getAssetShareRanking")
    public ReturnMsg getAssetShareRanking(@RequestBody IocParam iocParam){
        return assetService.getAssetShareRanking(iocParam);
    }


    @ApiOperation("报废与维修")
    @PostMapping("/getScrapAndMaintain")
    public ReturnMsg getScrapAndMaintain(@RequestBody IocParam iocParam){
        return assetService.getScrapAndMaintain(iocParam);
    }


}
