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

import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.erp.api.dto.ErpInvoiceticketSubmitReqDTO;
import com.zt.plat.module.erp.api.dto.ErpInvoiceticketSubmitRespDTO;
import com.zt.plat.module.erp.service.erp.ErpInvoiceticketService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import static com.zt.plat.framework.common.pojo.CommonResult.success;

@RestController
@Validated
@Slf4j
public class InvoiceticketImpl implements InvoiceticketApi {
    @Resource
    private ErpInvoiceticketService erpInvoiceticketService;

    @Override
    public CommonResult<ErpInvoiceticketSubmitRespDTO> submitDataToErp(ErpInvoiceticketSubmitReqDTO reqDTO) {
        return success(erpInvoiceticketService.sbumitToErp020(reqDTO));
    }
}
