| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.CustomerPrivateDto; |
| | | import com.ruoyi.basic.dto.CustomerPrivatePoolDto; |
| | | import com.ruoyi.basic.mapper.CustomerMapper; |
| | | import com.ruoyi.basic.mapper.CustomerPrivatePoolMapper; |
| | | import com.ruoyi.basic.pojo.*; |
| | | import com.ruoyi.basic.mapper.CustomerPrivateMapper; |
| | | import com.ruoyi.basic.mapper.CustomerPrivatePoolMapper; |
| | | import com.ruoyi.basic.pojo.CustomerFollowUp; |
| | | import com.ruoyi.basic.pojo.CustomerPrivate; |
| | | import com.ruoyi.basic.pojo.CustomerPrivatePool; |
| | | import com.ruoyi.basic.pojo.CustomerReturnVisit; |
| | | import com.ruoyi.basic.service.CustomerFollowUpService; |
| | | import com.ruoyi.basic.service.CustomerPrivateService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.service.CustomerReturnVisitService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequiredArgsConstructor |
| | | public class CustomerPrivateServiceImpl extends ServiceImpl<CustomerPrivateMapper, CustomerPrivate> implements CustomerPrivateService { |
| | | |
| | | |
| | | @Autowired |
| | | private CustomerPrivatePoolMapper customerPrivatePoolMapper; |
| | | private final CustomerPrivatePoolMapper customerPrivatePoolMapper; |
| | | |
| | | @Autowired |
| | | private CustomerFollowUpService customerFollowUpService; |
| | | private final CustomerFollowUpService customerFollowUpService; |
| | | |
| | | @Autowired |
| | | private CustomerReturnVisitService customerReturnVisitService; |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | private final CustomerReturnVisitService customerReturnVisitService; |
| | | private final SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | @Autowired |
| | | private CustomerPrivateMapper customerPrivateMapper; |
| | | @Autowired |
| | | private CustomerPrivateService customerPrivateService; |
| | | private final CustomerPrivateMapper customerPrivateMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public R importData(MultipartFile file) { |
| | | try { |
| | | List<CustomerPrivate> existingList = customerPrivateService.list(); |
| | | List<CustomerPrivate> existingList = customerPrivateMapper.selectList(null); |
| | | java.util.Set<String> existingCustomerNames = existingList.stream() |
| | | .map(CustomerPrivate::getCustomerName) |
| | | .collect(Collectors.toSet()); |