package com.jwipc.sys.service.impl;

import com.jwipc.sys.entity.DigitalSealBusinessDetail;
import com.jwipc.sys.mapper.DigitalSealBusinessDetailMapper;
import com.jwipc.sys.model.po.BusinessAttachmentPO;
import com.jwipc.sys.service.IDigitalSealBusinessDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 电子印章业务明细表 服务实现类
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-05-10
 */
@Service
public class DigitalSealBusinessDetailServiceImpl extends ServiceImpl<DigitalSealBusinessDetailMapper, DigitalSealBusinessDetail> implements IDigitalSealBusinessDetailService {

    /**
     * 获取采购订单最新的签署附件
     *
     * @param businessCode 采购订单号
     * @return 签署附件
     */
    @Override
    public DigitalSealBusinessDetail getLastPurchaseOrderByBusinessCode(String businessCode) {
        return baseMapper.getLastPurchaseOrderByBusinessCode(businessCode);
    }

    @Override
    public BusinessAttachmentPO getLastPurchaseOrderAttachmentByBusinessCode(String businessCode) {
        return baseMapper.getLastPurchaseOrderAttachmentByBusinessCode(businessCode);
    }

    @Override
    public DigitalSealBusinessDetail getLastDeliveryOrderByBusinessCode(String businessCode) {
        return baseMapper.getLastDeliveryOrderByBusinessCode(businessCode);
    }
}
