package com.zt.plat.module.erp.controller.admin.erp;

import com.zt.plat.module.erp.controller.admin.erp.vo.ErpBillMainSaveReqVO;
import com.zt.plat.module.erp.service.erp.ErpBillMainService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "管理后台 - ERP收货订单")
@RestController
@RequestMapping("/base/bill-main")
@Validated
public class ErpBillMainController {

    @Resource
    private ErpBillMainService erpBillMainService;

    @PostMapping("/submitBillMainToErp")
    @Operation(summary = "ERP收货订单推送")
    @PreAuthorize("@ss.hasPermission('sply:erp-bom:create')")
    public String submitBillMainToErp(ErpBillMainSaveReqVO createVo) {
        return erpBillMainService.submitBillMainToErp(createVo);
    }

}
