|
@@ -463,7 +463,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
Integer companyId = user.getCompanyId();
|
|
Integer companyId = user.getCompanyId();
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
|
|
List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getCompanyId, companyId));
|
|
List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getCompanyId, companyId));
|
|
- List<Stage> stage = stageMapper.selectList(null);
|
|
|
|
|
|
+ List<Stage> stage = stageMapper.selectList(new LambdaQueryWrapper<Stage>().eq(Stage::getCompanyId,companyId));
|
|
List<Contacts> contacts = contactsMapper.selectList(new LambdaQueryWrapper<Contacts>().eq(Contacts::getCompanyId, user.getCompanyId()).eq(Contacts::getIsDelete, 0).orderByDesc(Contacts::getId));
|
|
List<Contacts> contacts = contactsMapper.selectList(new LambdaQueryWrapper<Contacts>().eq(Contacts::getCompanyId, user.getCompanyId()).eq(Contacts::getIsDelete, 0).orderByDesc(Contacts::getId));
|
|
List<Custom> customs = customMapper.selectList(new LambdaQueryWrapper<Custom>().eq(Custom::getCompanyId, user.getCompanyId()).eq(Custom::getIsDelete, 0).orderByDesc(Custom::getId));
|
|
List<Custom> customs = customMapper.selectList(new LambdaQueryWrapper<Custom>().eq(Custom::getCompanyId, user.getCompanyId()).eq(Custom::getIsDelete, 0).orderByDesc(Custom::getId));
|
|
|
|
|
|
@@ -660,7 +660,9 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
|
|
if(importProductList.size()>0){
|
|
if(importProductList.size()>0){
|
|
List<Integer> stageIds = importProductList.stream().map(BusinessOpportunity::getStageId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
|
List<Integer> stageIds = importProductList.stream().map(BusinessOpportunity::getStageId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
|
for (Integer stageId : stageIds) {
|
|
for (Integer stageId : stageIds) {
|
|
- List<BusinessOpportunity> list = bOMapper.selectList(new QueryWrapper<BusinessOpportunity>().eq("stage_id", stageId).eq("is_delete", 0).orderByDesc("seq").last(" limit 1"));
|
|
|
|
|
|
+ List<BusinessOpportunity> list = bOMapper.selectList(new QueryWrapper<BusinessOpportunity>().eq("stage_id", stageId).eq("is_delete", 0)
|
|
|
|
+ .eq("company_id",companyId)
|
|
|
|
+ .orderByDesc("seq").last(" limit 1"));
|
|
AtomicInteger seq = new AtomicInteger(0); // 使用 AtomicInteger
|
|
AtomicInteger seq = new AtomicInteger(0); // 使用 AtomicInteger
|
|
if (!list.isEmpty()){
|
|
if (!list.isEmpty()){
|
|
seq.set(list.get(0).getSeq());
|
|
seq.set(list.get(0).getSeq());
|