27 分钟以前 4ba8f509c44a58d1ea1324b817518fe90ae2c1b4
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
133
134
135
136
137
138
139
140
141
142
package com.ruoyi.basic.service;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.basic.dto.CustomerDto;
import com.ruoyi.basic.pojo.Customer;
import com.ruoyi.basic.vo.CustomerVo;
import com.ruoyi.framework.web.domain.R;
import com.ruoyi.sales.vo.CustomerTransactionsDetailsVo;
import com.ruoyi.sales.vo.CustomerTransactionsVo;
import com.ruoyi.sales.vo.CustomerTransactionsProductVo;
import com.ruoyi.sales.vo.CustomerTransactionsShipmentVo;
import com.ruoyi.sales.vo.CustomerTransactionsSummaryVo;
import org.springframework.web.multipart.MultipartFile;
 
import java.util.List;
import java.util.Map;
 
/**
 * 客户档案Service接口
 *
 * @author ruoyi
 * @date 2025-05-07
 */
public interface ICustomerService extends IService<Customer> {
    /**
     * 查询客户档案
     *
     * @param id 客户档案主键
     * @return 客户档案
     */
    Customer selectCustomerById(Long id);
 
    /**
     * 查询客户详情(含跟进记录和附件)
     *
     * @param id 客户档案主键
     * @return 客户详情DTO
     */
    CustomerVo selectCustomerDetailById(Long id);
 
    /**
     * 查询客户档案列表
     *
     * @param customer 客户档案
     * @return 客户档案集合
     */
 
    /**
     * 新增客户档案
     *
     * @param customer 客户档案
     * @return 结果
     */
    int insertCustomer(Customer customer);
 
    /**
     * 修改客户档案
     *
     * @param customer 客户档案
     * @return 结果
     */
    int updateCustomer(Customer customer);
 
    /**
     * 批量删除客户档案
     *
     * @param ids 需要删除的客户档案主键集合
     * @return 结果
     */
    int deleteCustomerByIds(Long[] ids);
 
    List<Customer> selectCustomerListByIds(Long[] ids);
 
    /**
     * 查询客户信息
     *
     * @return 结果
     */
    List<Map<String, Object>> customerList(Customer customer);
 
    List<CustomerVo> selectCustomerLists(CustomerDto customer);
 
    R importData(MultipartFile file, Integer type);
 
    IPage<CustomerVo> selectCustomerList(Page<CustomerDto> page, CustomerDto customer);
 
    void assignCustomer(CustomerDto customer);
 
    void recycleCustomer(CustomerDto customer);
 
    /**
     * 共享客户给其他用户
     *
     * @param customerDto 客户DTO(包含客户ID和共享用户ID列表)
     */
    void together(CustomerDto customerDto);
 
    Boolean back(Long id);
 
    /**
     * 查询客户往来列表
     * @param page
     * @param customerName
     * @return
     */
    IPage<CustomerTransactionsVo> customewTransactions(Page page, String customerName);
 
    /**
     * 查询客户往来明细列表
     * @param page
     * @param customerId
     * @return
     */
    IPage<CustomerTransactionsDetailsVo> customewTransactionsDetails(Page page, Long customerId);
 
    /**
     * 查询客户往来统计汇总(优化版)
     * @param customerId 客户ID
     * @return 统计汇总数据
     */
    CustomerTransactionsSummaryVo getCustomerTransactionsSummary(Long customerId);
 
    /**
     * 查询客户往来产品明细
     * @param page 分页参数
     * @param customerId 客户ID
     * @param salesLedgerId 销售台账ID(可选)
     * @return 产品明细分页数据
     */
    IPage<CustomerTransactionsProductVo> getCustomerTransactionsProducts(Page page, Long customerId, Long salesLedgerId);
 
    /**
     * 查询客户往来发货明细
     * @param page 分页参数
     * @param customerId 客户ID
     * @param salesLedgerId 销售台账ID(可选)
     * @return 发货明细分页数据
     */
    IPage<CustomerTransactionsShipmentVo> getCustomerTransactionsShipments(Page page, Long customerId, Long salesLedgerId);
}