package com.jwipc.sys.controller.pc;

import com.jwipc.sys.dto.CreateFinancialShareContractDTO;
import com.jwipc.sys.logic.FinancialShareLogic;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import static com.jwipc.sys.constant.ModuleConst.MODULE_ROOT;

/**
 * <p>
 *  财务共享-控制层
 * </p>
 *
 * @author Chen Tianshi
 * @since 2025/12/10 14:06
 */
@RestController
@RequestMapping(MODULE_ROOT + "/financialShare/rest")
@RequiredArgsConstructor
@CrossOrigin(origins = "*")
public class FinancialShareController {
    private final FinancialShareLogic financialShareLogic;
    /**
     * 在财务共享创建合同审批申请单
     */
    @PostMapping("/createCostContract")
    public ResponseEntity<Boolean> createCostContract(@RequestBody CreateFinancialShareContractDTO dto) {
        financialShareLogic.createCostContract(dto);
        return ResponseEntity.ok().build();
    }
}
