diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml
index 50d0253cd..59f3b1b27 100644
--- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml
+++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml
@@ -29,7 +29,7 @@
and lbsb.brand_id = t.brand_id and t.effective_time now() and t.expiry_time >= now()
left join logpm_basicdata_brand ldb on ldb.id = lbsb.brand_id
left join logpm_basicdata_price_template lbpt on t.template_id = lbpt.id
- where lbsb.is_deleted = 0
+ where lbsb.is_deleted = 0 and cli.is_deleted = 0
and cli.client_name like concat('%',#{basicdataPrice.clientName},'%')
diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java
index 0425b45ac..b593b718c 100644
--- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java
+++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java
@@ -26,10 +26,26 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.logpm.basicdata.entity.*;
+import com.logpm.basicdata.entity.BasicdataBrandEntity;
+import com.logpm.basicdata.entity.BasicdataClientEntity;
+import com.logpm.basicdata.entity.BasicdataHistoricalContractEntity;
+import com.logpm.basicdata.entity.BasicdataStorageServicesEntity;
+import com.logpm.basicdata.entity.BasicdataStoreBrandEntity;
+import com.logpm.basicdata.entity.BasicdataStoreBusinessEntity;
+import com.logpm.basicdata.entity.BasicdataStoreContactEntity;
+import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity;
+import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.excel.BasicdataClientExcel;
import com.logpm.basicdata.mapper.BasicdataClientMapper;
-import com.logpm.basicdata.service.*;
+import com.logpm.basicdata.service.IBasicdataBrandService;
+import com.logpm.basicdata.service.IBasicdataClientService;
+import com.logpm.basicdata.service.IBasicdataHistoricalContractService;
+import com.logpm.basicdata.service.IBasicdataStorageServicesService;
+import com.logpm.basicdata.service.IBasicdataStoreBrandService;
+import com.logpm.basicdata.service.IBasicdataStoreBusinessService;
+import com.logpm.basicdata.service.IBasicdataStoreContactService;
+import com.logpm.basicdata.service.IBasicdataTripartiteMallService;
+import com.logpm.basicdata.service.IBasicdataWarehouseService;
import com.logpm.basicdata.vo.BasicdataClientVO;
import com.logpm.basicdata.vo.ClientInfoVO;
import lombok.extern.slf4j.Slf4j;
@@ -49,7 +65,13 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.security.NoSuchAlgorithmException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Optional;
+import java.util.Set;
import java.util.stream.Collectors;
import static org.springblade.common.constant.DictBizConstant.OPEN_ORDER_PAY_WAY;
@@ -242,15 +264,22 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl toLongList) {
+ List clientIds = new ArrayList<>();
toLongList.forEach(i -> {
List basicdataClientEntities = baseMapper.selectList(Wrappers.query().lambda()
.eq(BasicdataClientEntity::getPid, i)
);
if (!basicdataClientEntities.isEmpty()) {
baseMapper.deleteBatchIds(basicdataClientEntities);
+ clientIds.addAll(basicdataClientEntities.stream().map(BasicdataClientEntity::getId).collect(Collectors.toList()));
}
-
+ clientIds.add(i);
});
+ // 删除客户品牌关系
+ if(CollUtil.isNotEmpty(clientIds)){
+ basicdataStoreBrandService.remove(Wrappers.query().lambda()
+ .in(BasicdataStoreBrandEntity::getClientId, clientIds));
+ }
return this.deleteLogic(toLongList);
}
diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java
index 0aff8b488..395ccf6d5 100644
--- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java
+++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java
@@ -2492,7 +2492,11 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl generalExcels, Map clientEntityMap, Map priceEntityMap, Map provinceMap, Map provinceCityMap, Map provinceCityAearMap, StringBuilder message, String sheet5, Map clientBrandMap, Map templateMap) {
+ private void checkGeneralExcelsV2(List generalExcels, Map clientEntityMap,
+ Map priceEntityMap, Map provinceMap,
+ Map provinceCityMap, Map provinceCityAearMap, StringBuilder message,
+ String sheet5, Map clientBrandMap, Map templateMap) {
if (CollUtil.isNotEmpty(generalExcels)) {
for (int i = 0; i < generalExcels.size(); i++) {
BasicdataPriceGeneralV2Excel excel = generalExcels.get(i);
@@ -3461,7 +3465,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl