package com.jwipc.finance.controller;

import com.jwipc.api.dto.ApiResult;
import com.jwipc.finance.dto.InvoicedApplyPostApiDTO;
import com.jwipc.finance.dto.ReceiptVoucherBaseApiDTO;
import com.jwipc.finance.logic.InvoicedApplyPostApiLogic;
import com.jwipc.log.annotation.ApiOperateLog;
import com.jwipc.log.constant.ApiDirection;
import com.jwipc.log.constant.ThirdSysType;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shenyang.ou
 * @date 2024/3/27 9:39
 * @desc
 */
@RestController
@RequestMapping( "/sap/api/invoiced/apply/post")
@RequiredArgsConstructor
public class InvoicedApplyPostApiController {
    private final InvoicedApplyPostApiLogic invoicedApplyPostApiLogic;

    /**
     * MIRO凭证过账状态反写
     * @param param 参数
     */
    @PostMapping("/sync")
    @ApiOperateLog(code = "invoicedApplyPostSync",name = "MIRO凭证过账状态反写", direction = ApiDirection.OTHER_TO_SRM, thirdSysType = ThirdSysType.SAP)
    public ApiResult sync(@RequestBody InvoicedApplyPostApiDTO param){
        return invoicedApplyPostApiLogic.sync(param);
    }
}
