package com.yuchen.saas.park.api.feign.imspect;

import com.yuchen.saas.park.api.dto.fire.inspect.FireInspectTypeReqDTO;
import com.yuchen.saas.park.api.dto.fire.inspect.client.FireInspectLogReqDTO;
import com.yuchen.saas.park.api.dto.fire.inspect.client.OperateTaskReqDTO;
import com.yuchen.saas.park.api.dto.fire.inspect.client.ProcessTaskReqDTO;
import com.yuchen.saas.park.api.dto.fire.inspect.client.SubmitTaskReqDTO;
import com.yuchen.saas.park.api.dto.fire.inspect.plan.FireInspectPlanReqDTO;
import com.yuchen.saas.park.api.dto.fire.inspect.plan.FireInspectPlanTaskReqDTO;
import com.yuchen.saas.park.api.vo.fire.inspect.FireInspectTypeVO;
import com.yuchen.saas.park.api.vo.fire.inspect.plan.*;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.mp.support.NestPage;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author zhouhanwei
 * @create 2024/4/9 16:16
 */
@FeignClient(
        value = AppNameConstant.SAAS_PARK,
        fallbackFactory = ClientPlanTaskFallback.class
)
public interface ClientPlanTaskFeign {

    @PostMapping("/client/planTask/getClientInspectTypeList")
    R<List<FireInspectTypeVO>> getClientInspectTypeList(@RequestBody FireInspectTypeReqDTO reqDTO);

    @PostMapping("/client/planTask/findClientPlanPage")
    R<NestPage<FireInspectPlanVO>> findClientPlanPage(@RequestBody FireInspectPlanReqDTO reqDTO);


    @PostMapping("/client/planTask/findClientPlanTaskPage")
    R<NestPage<FireInspectPlanTaskVO>> findClientPlanTaskPage(@RequestBody FireInspectPlanTaskReqDTO reqDTO);

    @PostMapping("/client/planTask/findClientPlanTaskLogList")
    R<List<SaasParkFireInspectLogVO>> findClientPlanTaskLogList(@Validated @RequestBody FireInspectLogReqDTO reqDTO);

    @GetMapping("/client/planTask/getAdminPlanDetail/{planId}")
    R<FireInspectPlanDetailVO> getAdminPlanDetail(@PathVariable Long planId);

    @GetMapping("/client/planTask/getClientPlanTaskDetail/{planTaskId}")
    R<FireInspectPlanTaskDetailVO> getClientPlanTaskDetail(@PathVariable Long planTaskId);

    @GetMapping("/client/planTask/getClientPlanConfigDetail/{planConfigId}")
    R<FireInspectPlanConfigDetailVO> getClientPlanConfigDetail(@PathVariable Long planConfigId);

    @PostMapping("/client/planTask/operateTask")
    R operateTask(@Validated @RequestBody OperateTaskReqDTO reqDTO);

    @PostMapping("/client/planTask/startProcessTask")
    R startProcessTask(@Validated @RequestBody ProcessTaskReqDTO reqDTO);

    @PostMapping("/client/planTask/submitTask")
    R submitTask(@Validated @RequestBody SubmitTaskReqDTO reqDTO);

    @PostMapping("/client/planTask/editConfigTask")
    R editConfigTask(@Validated @RequestBody SubmitTaskReqDTO reqDTO);

    @PostMapping("/client/planTask/completeProcessTask")
    R completeProcessTask(@Validated @RequestBody ProcessTaskReqDTO reqDTO);

}
