Browse Source

feat(all): 修改用户价格体系导入校验失败问题

dist.1.3.0
zhaoqiaobo 8 months ago
parent
commit
99626fbbfe
  1. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java

@ -3351,6 +3351,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
Map<String, BasicdataBrandEntity> brandEntityMap, Map<String, BasicdataPriceEntity> priceEntityMap,
Map<String, BasicdataStoreBrandEntity> clientBrandMap, Map<String, List<BasicdataPriceEntity>> checkPriceEntityMap) {
if (CollUtil.isNotEmpty(priceExcels)) {
Map<String,String> checkRepeatMap = new HashMap<>();
for (int i = 0; i < priceExcels.size(); i++) {
StringBuilder rowMessage = new StringBuilder();
int rowNum = i + 2;
@ -3377,6 +3378,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
brandFlag = Boolean.TRUE;
}
}
checkRepeatMap.put(priceExcel.getClient() + priceExcel.getBrand(),priceExcel.getClient() + priceExcel.getBrand());
Boolean templateFlag = Boolean.FALSE;
if (StrUtil.isEmpty(priceExcel.getTemplateName())) {
rowMessage.append("模板名称不能为空;");
@ -3465,7 +3467,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
buildErrorMessageExcel(message, rowMessage, firstMessage);
}
if (StrUtil.isEmpty(message.toString())) {
if (CollUtil.isNotEmpty(priceEntityMap) && !ObjectUtil.equal(priceExcels.size(), clientBrandMap.size())) {
if (CollUtil.isNotEmpty(checkRepeatMap) && !ObjectUtil.equal(priceExcels.size(), checkRepeatMap.size())) {
message.append(sheet1).append("中存在 客户名称+品牌 重复的数据,请检查;");
}
}

Loading…
Cancel
Save