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

import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.erp.api.dto.*;
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;

import java.util.HashMap;
import java.util.Map;

@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - ERP")
public interface InvoiceticketApi {

    String PREFIX = ApiConstants.PREFIX + "/invoiceticket";

    @PostMapping(PREFIX + "/submit")
    @Operation(summary = "erp数据提交")
    CommonResult<ErpInvoiceticketSubmitRespDTO> submitDataToErp(@Valid @RequestBody ErpInvoiceticketSubmitReqDTO reqDTO);
    @PostMapping(PREFIX + "/submit098")
    @Operation(summary = "erp数据提交,参数需要billdoc和action,id")
    CommonResult<Map<String, String>> submitDataToErp098(@Valid @RequestBody Map<String,Object> reqDTO);
    @PostMapping(PREFIX + "/submit096")
    @Operation(summary = "erp数据提交,参数需要billdoc和action,id")
    CommonResult<Map<String, String>> submitDataToErp096(@Valid @RequestBody ErpElectronicInvoiceSubmitReqDTO reqDTO);
    @PostMapping(PREFIX + "/submit097")
    @Operation(summary = "erp数据提交")
    CommonResult<Map<String, String>> submitDataToErp097(@Valid @RequestBody ErpElectronicInvoiceReversalReqDTO reqDTO);
}
