package com.zt.plat.module.qms.api.task;

import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.qms.api.task.dto.QmsBpmDTO;
import com.zt.plat.module.qms.enums.ApiConstants;
import com.alibaba.fastjson.JSONObject;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = ApiConstants.NAME, fallbackFactory = QmsApiFallback.class)
@Tag(name = "RPC 服务 - 检验检测")
public interface QmsApi {

    String PREFIX = ApiConstants.PREFIX + "/process-instance";

    @PostMapping(PREFIX + "/updateQmdDataByWf")
    @Operation(summary = "流程节点触发业务数据改变")
    CommonResult<JSONObject> bpmCallback(@Valid @RequestBody QmsBpmDTO reqDTO);

}
