package cn.iocoder.yudao.module.erp.api.finance; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.erp.api.finance.dto.ErpFinancePaymentRedFlushCreateReqDTO; import cn.iocoder.yudao.module.erp.api.finance.dto.ErpFinancePaymentRespDTO; import cn.iocoder.yudao.module.erp.dal.dataobject.finance.ErpFinancePaymentDO; import cn.iocoder.yudao.module.erp.service.finance.ErpFinancePaymentService; import jakarta.annotation.Resource; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** * ERP 付款单 API 实现类 * * @author 超级管理员 */ @RestController @RequestMapping(ErpFinancePaymentApi.PREFIX) @Validated public class ErpFinancePaymentApiImpl implements ErpFinancePaymentApi { @Resource private ErpFinancePaymentService financePaymentService; @Override public CommonResult createRedFlushPayment(ErpFinancePaymentRedFlushCreateReqDTO reqDTO) { return success(financePaymentService.createRedFlushPayment(reqDTO)); } @Override public CommonResult getFinancePayment(Long id) { ErpFinancePaymentDO payment = financePaymentService.getFinancePayment(id); return success(BeanUtils.toBean(payment, ErpFinancePaymentRespDTO.class)); } }