gaoluyang
2 天以前 8c65f898ed6e5b0c7a94c792c4562f6ec831dccd
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
package cn.iocoder.yudao.module.crm.service.quotation;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.crm.controller.admin.quotation.vo.CrmSaleQuotationPageReqVO;
import cn.iocoder.yudao.module.crm.controller.admin.quotation.vo.CrmSaleQuotationSaveReqVO;
import cn.iocoder.yudao.module.crm.dal.dataobject.quotation.CrmSaleQuotationDO;
import cn.iocoder.yudao.module.crm.dal.dataobject.quotation.CrmSaleQuotationProductDO;
 
import java.util.Collection;
import java.util.List;
 
/**
 * CRM 销售报价单 Service 接口
 *
 * @author 超级管理员
 */
public interface CrmSaleQuotationService {
 
    /**
     * 创建销售报价单
     *
     * @param createReqVO 创建信息
     * @param userId      用户编号
     * @return 编号
     */
    Long createSaleQuotation(CrmSaleQuotationSaveReqVO createReqVO, Long userId);
 
    /**
     * 更新销售报价单
     *
     * @param updateReqVO 更新信息
     */
    void updateSaleQuotation(CrmSaleQuotationSaveReqVO updateReqVO);
 
    /**
     * 删除销售报价单
     *
     * @param ids 编号列表
     */
    void deleteSaleQuotation(List<Long> ids);
 
    /**
     * 获得销售报价单
     *
     * @param id 编号
     * @return 销售报价单
     */
    CrmSaleQuotationDO getSaleQuotation(Long id);
 
    /**
     * 提交销售报价单审批
     *
     * @param id                   编号
     * @param processDefinitionKey 流程定义 Key
     * @param userId               用户编号
     */
    void submitSaleQuotation(Long id, String processDefinitionKey, Long userId);
 
    /**
     * 更新销售报价单审批结果
     *
     * @param id        编号
     * @param bpmResult BPM 审批结果
     */
    void updateSaleQuotationAuditStatus(Long id, Integer bpmResult);
 
    /**
     * 获取销售报价审批可用的流程定义列表
     *
     * @return 流程定义列表
     */
    java.util.List<java.util.Map<String, Object>> getSaleQuotationApproveProcessDefinitionList();
 
    /**
     * 获得销售报价单分页
     *
     * @param pageReqVO 分页查询
     * @param userId    用户编号
     * @return 销售报价单分页
     */
    PageResult<CrmSaleQuotationDO> getSaleQuotationPage(CrmSaleQuotationPageReqVO pageReqVO, Long userId);
 
    /**
     * 获得销售报价单分页(基于客户)
     *
     * @param pageReqVO 分页查询
     * @return 销售报价单分页
     */
    PageResult<CrmSaleQuotationDO> getSaleQuotationPageByCustomerId(CrmSaleQuotationPageReqVO pageReqVO);
 
    /**
     * 获得销售报价单分页(基于商机)
     *
     * @param pageReqVO 分页查询
     * @return 销售报价单分页
     */
    PageResult<CrmSaleQuotationDO> getSaleQuotationPageByBusinessId(CrmSaleQuotationPageReqVO pageReqVO);
 
    /**
     * 获得销售报价单产品明细列表
     *
     * @param quotationId 报价单编号
     * @return 产品明细列表
     */
    List<CrmSaleQuotationProductDO> getSaleQuotationProductListByQuotationId(Long quotationId);
 
    /**
     * 获得销售报价单产品明细列表
     *
     * @param quotationIds 报价单编号列表
     * @return 产品明细列表
     */
    List<CrmSaleQuotationProductDO> getSaleQuotationProductListByQuotationIds(Collection<Long> quotationIds);
 
    /**
     * 转为合同
     *
     * @param id     报价单编号
     * @param userId 用户编号
     * @return 合同编号
     */
    Long convertToContract(Long id, Long userId);
 
    CrmSaleQuotationDO getByContractId(Long id);
 
    /**
     * 清除报价单的合同关联(删除合同时调用)
     *
     * @param quotationId 报价单编号
     */
    void clearContractReference(Long quotationId);
}