166 lines
3.8 KiB
Java
166 lines
3.8 KiB
Java
package org.dromara.crm.service;
|
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
import org.dromara.crm.domain.bo.CrmQuoteBo;
|
|
import org.dromara.crm.domain.vo.CrmQuoteVo;
|
|
|
|
import java.time.LocalDate;
|
|
import java.util.Collection;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 报价单Service接口
|
|
*
|
|
* @author 系统管理员
|
|
* @date 2025-01-03
|
|
*/
|
|
public interface ICrmQuoteService {
|
|
|
|
/**
|
|
* 查询报价单列表(分页)
|
|
*/
|
|
TableDataInfo<CrmQuoteVo> queryPageList(CrmQuoteBo bo, PageQuery pageQuery);
|
|
|
|
/**
|
|
* 查询报价单列表
|
|
*/
|
|
List<CrmQuoteVo> queryList(CrmQuoteBo bo);
|
|
|
|
/**
|
|
* 查询报价单详情
|
|
*/
|
|
CrmQuoteVo queryById(Long id);
|
|
|
|
/**
|
|
* 新增报价单
|
|
*/
|
|
Boolean insertByBo(CrmQuoteBo bo);
|
|
|
|
/**
|
|
* 修改报价单
|
|
*/
|
|
Boolean updateByBo(CrmQuoteBo bo);
|
|
|
|
/**
|
|
* 校验并批量删除报价单
|
|
*/
|
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
|
|
|
/**
|
|
* 提交报价单
|
|
*/
|
|
Boolean submitQuote(Long id, List<Long> approverIds, String remark);
|
|
|
|
/**
|
|
* 保存报价单模板内容
|
|
*
|
|
* @param id 报价单ID
|
|
* @param templateContent 模板内容(富文本HTML)
|
|
* @return 是否成功
|
|
*/
|
|
Boolean saveTemplate(Long id, String templateContent);
|
|
|
|
/**
|
|
* 获取报价单模板内容
|
|
*
|
|
* @param id 报价单ID
|
|
* @return 模板内容(富文本HTML)
|
|
*/
|
|
String getTemplate(Long id);
|
|
|
|
/**
|
|
* 生成PDF
|
|
*/
|
|
String generatePdf(Long id);
|
|
|
|
/**
|
|
* 生成分享链接
|
|
*
|
|
* @param id 报价单ID
|
|
* @param validityDays 有效期天数
|
|
* @param password 分享密码(可选)
|
|
* @return 分享链接
|
|
*/
|
|
String generateShare(Long id, Integer validityDays, String password);
|
|
|
|
/**
|
|
* 通过分享码查看报价单
|
|
*
|
|
* @param shareCode 分享码
|
|
* @param password 密码(如果有密码保护)
|
|
* @param ipAddress IP地址
|
|
* @param userAgent 用户代理
|
|
* @return 报价单信息
|
|
*/
|
|
CrmQuoteVo viewByShareCode(String shareCode, String password, String ipAddress, String userAgent);
|
|
|
|
/**
|
|
* 接受报价单
|
|
*/
|
|
Boolean acceptQuote(Long id, String remark);
|
|
|
|
/**
|
|
* 拒绝报价单
|
|
*/
|
|
Boolean rejectQuote(Long id, String rejectReason, String remark);
|
|
|
|
/**
|
|
* 转为合同
|
|
*
|
|
* @param id 报价单ID
|
|
* @param contractNo 合同编号
|
|
* @param contractTitle 合同标题
|
|
* @param signDate 签订日期(可选)
|
|
* @param startDate 开始日期(可选)
|
|
* @param endDate 结束日期(可选)
|
|
* @return 合同ID
|
|
*/
|
|
Long toContract(Long id, String contractNo, String contractTitle, LocalDate signDate, LocalDate startDate,
|
|
LocalDate endDate);
|
|
|
|
/**
|
|
* 创建新版本
|
|
*/
|
|
Long createNewVersion(Long id, String version, String remark);
|
|
|
|
/**
|
|
* 查询版本历史
|
|
*/
|
|
List<CrmQuoteVo> queryVersions(String quoteNo);
|
|
|
|
/**
|
|
* 报价单统计概览
|
|
*/
|
|
java.util.Map<String, Object> statisticsOverview(Long ownerUserId, String beginTime, String endTime);
|
|
|
|
/**
|
|
* 报价单状态分布
|
|
*/
|
|
List<java.util.Map<String, Object>> statisticsStatus();
|
|
|
|
/**
|
|
* 报价单趋势分析
|
|
*/
|
|
List<java.util.Map<String, Object>> statisticsTrend(String type, String beginTime, String endTime);
|
|
|
|
/**
|
|
* 撤回审批
|
|
*
|
|
* @param id 报价单ID
|
|
* @param remark 撤回原因
|
|
* @return 是否成功
|
|
*/
|
|
Boolean withdrawApproval(Long id, String remark);
|
|
|
|
/**
|
|
* 作废报价单
|
|
*
|
|
* @param id 报价单ID
|
|
* @param remark 作废原因
|
|
* @return 是否成功
|
|
*/
|
|
Boolean invalidQuote(Long id, String remark);
|
|
|
|
}
|