| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.date.LocalDateTimeUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.aop.framework.AopContext; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | |
| | | |
| | | if (followUp != null) { |
| | | c.setFollowUpLevel(followUp.getFollowUpLevel()); |
| | | c.setFollowUpTime(followUp.getFollowUpTime()); |
| | | c.setFollowUpTime( |
| | | Date.from( |
| | | followUp.getFollowUpTime().atZone(ZoneId.systemDefault()).toInstant() |
| | | ) |
| | | ); |
| | | } |
| | | }) |
| | | .collect(Collectors.toList()); |
| | |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | Long tenantId = loginUser.getTenantId(); |
| | | customer.setTenantId(tenantId); |
| | | customer.setTaxpayerIdentificationNumber(""); |
| | | customer.setCompanyAddress(""); |
| | | customer.setCompanyPhone(""); |
| | | customer.setMaintainer(""); |
| | | customer.setMaintenanceTime(new Date()); |
| | | return customerMapper.insert(customer); |
| | | } |
| | | |
| | |
| | | if (CollectionUtils.isEmpty(userList)) { |
| | | return AjaxResult.warn("模板错误或导入数据为空"); |
| | | } |
| | | this.saveOrUpdateBatch(userList); |
| | | ICustomerService proxy = (ICustomerService) AopContext.currentProxy(); |
| | | for (Customer customer : userList) { |
| | | proxy.insertCustomer(customer); |
| | | } |
| | | // this.saveOrUpdateBatch(userList); |
| | | return AjaxResult.success(true); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |