7 天以前 e2729587d4a8b9c2e3e2c4dd50a25adedb337e98
yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/service/quotation/CrmSaleQuotationServiceImpl.java
@@ -26,6 +26,7 @@
import cn.iocoder.yudao.module.system.api.storage.StorageAttachmentApi;
import cn.iocoder.yudao.module.mdm.api.item.MdmItemApi;
import cn.iocoder.yudao.module.mdm.api.item.dto.MdmItemRespDTO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -42,7 +43,7 @@
/**
 * CRM 销售报价单 Service 实现类
 *
 * @author 芋道源码
 * @author 超级管理员
 */
@Service
@Validated
@@ -128,11 +129,7 @@
        saleQuotationMapper.updateById(updateObj);
        // 2.2 更新报价明细
        updateQuotationProductList(updateReqVO.getId(), quotationProducts);
        if (updateReqVO.getBlobIds() != null) {
            storageAttachmentApi.deleteAttachmentsByRecord("crm_sale_quotation", updateReqVO.getId());
            storageAttachmentApi.bindAttachments("file", "crm_sale_quotation",
                    updateReqVO.getId(), updateReqVO.getBlobIds());
        }
        storageAttachmentApi.updateAttachments("file", "crm_sale_quotation", updateReqVO.getId(), updateReqVO.getBlobIds());
    }
    @Override
@@ -322,4 +319,14 @@
        return contractId;
    }
    @Override
    public CrmSaleQuotationDO getByContractId(Long id) {
        return saleQuotationMapper.selectOne(new LambdaQueryWrapper<CrmSaleQuotationDO>().eq(CrmSaleQuotationDO::getContractId,id));
    }
    @Override
    public void clearContractReference(Long quotationId) {
        saleQuotationMapper.clearContractReference(quotationId);
    }
}