package com.zt.plat.module.erp.api;

import com.zt.plat.module.erp.api.dto.BillMainSubmitErpReqDTO;
import com.zt.plat.module.erp.api.dto.ErpBillMainSaveReqDTO;
import com.zt.plat.module.erp.enums.ApiConstants;
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)
@Tag(name = "RPC 服务 - ERP")
public interface ErpBillMainApi {
    String PREFIX = ApiConstants.PREFIX + "/erp-external";

    @PostMapping(PREFIX + "/submit-bill-main")
    @Operation(summary = "erp数据提交")
    String submitBillMainToErp(@Valid @RequestBody ErpBillMainSaveReqDTO reqDTO);

    @PostMapping(PREFIX + "/submit-bill-main-reverse")
    @Operation(summary = "冲销")
    String submitBillMainReverseToErp(@Valid @RequestBody ErpBillMainSaveReqDTO reqDTO);

    @PostMapping(PREFIX + "/submit/erp")
    @Operation(summary = "erp数据提交")
    String submitErp(@Valid @RequestBody BillMainSubmitErpReqDTO reqDTO);
}
