package com.base.biz.controller;


import com.base.biz.model.dto.request.QueryTargetDemandDTO;
import com.base.biz.model.dto.request.SatelliteTaskReqDTO;
import com.base.biz.service.TargetDemandService;
import com.base.orbit.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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 = "任务监视相关")
@RestController
@RequestMapping("/api/target/demand/v1")
public class TargetDemandController {

    @Resource
    private TargetDemandService targetDemandService;

    @ApiOperation(value = "目标列表查询")
    @PostMapping("/selAllTargetList")
    public AjaxResult selAllTargetList(@RequestBody QueryTargetDemandDTO queryTargetDemandDTO) {
        return targetDemandService.selAllTargetList(queryTargetDemandDTO);
    }

    @ApiOperation(value = "卫星观测信息")
    @PostMapping("/selStripByParentId")
    public AjaxResult selStripByParentId(@RequestBody QueryTargetDemandDTO queryTargetDemandDTO) {
        return targetDemandService.selStripByParentId(queryTargetDemandDTO);
    }

    @ApiOperation(value = "根据载荷类型卫星分组")
    @PostMapping("/selSatellieByPayload")
    public AjaxResult selSatellieByPayload() {
        return targetDemandService.selSatellieByPayload();
    }

    @ApiOperation(value = "卫星运行状态中任务信息")
    @PostMapping("/selSatellieTaskInfo")
    public AjaxResult selSatellieTaskInfo(@RequestBody SatelliteTaskReqDTO satelliteTaskReqDTO) {
        return targetDemandService.selSatellieTaskInfo(satelliteTaskReqDTO);
    }

    @ApiOperation(value = "地面站资源信息")
    @PostMapping("/selStationTaskInfo")
    public AjaxResult selStationTaskInfo() {
        return targetDemandService.selStationTaskInfo();
    }



}
