package com.docus.server.api;

import com.docus.infrastructure.web.api.CommonResult;
import com.docus.server.api.dto.HospitalSubmitNodeLogAddDTO;
import com.docus.server.api.dto.HospitalSubmitNodeLogQrDTO;
import com.docus.server.api.vo.HospitalSubmitNodeLogVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * 医院提交节点服务api
 *
 * @author 文永斌
 * @date 2023/9/5
 */
@Api(tags = "医院提交节点服务API")
@FeignClient(name = "submitNode", url = "${docus.url.medicalrecord}")
public interface HospitalSubmitNodeServiceApi {
    String PREFIX = "/basic/submitNode";

    /**
     * 提交节点，添加日志
     * @param submitNodeLogAddDTO  提交参数对象
     * @return 操作结果
     */
    @ApiOperation("提交节点，添加日志")
    @RequestMapping(value = PREFIX + "/log/add", method = RequestMethod.POST)
    CommonResult<String> addLog(@RequestBody HospitalSubmitNodeLogAddDTO submitNodeLogAddDTO);

    /**
     * 提交节点日志列表查询
     * @param submitNodeLogQrDTO 查询参数
     * @return 日志列表
     */
    @ApiOperation("提交节点日志列表查询")
    @RequestMapping(value = PREFIX + "/log/list", method = RequestMethod.POST)
    CommonResult<List<HospitalSubmitNodeLogVO>> listLogs(@RequestBody HospitalSubmitNodeLogQrDTO submitNodeLogQrDTO);

}
