gaoluyang
4 天以前 d39e4f7d839167c16425086dfa2f8747bccfdff9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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<Long> createRedFlushPayment(ErpFinancePaymentRedFlushCreateReqDTO reqDTO) {
        return success(financePaymentService.createRedFlushPayment(reqDTO));
    }
 
    @Override
    public CommonResult<ErpFinancePaymentRespDTO> getFinancePayment(Long id) {
        ErpFinancePaymentDO payment = financePaymentService.getFinancePayment(id);
        return success(BeanUtils.toBean(payment, ErpFinancePaymentRespDTO.class));
    }
 
}