|
@ -271,7 +271,11 @@ public class BmsChannelPointController { |
|
|
@PreAuthorize("hasRole('bms:channelPoint:insert')") |
|
|
@PreAuthorize("hasRole('bms:channelPoint:insert')") |
|
|
public R<?> importExcel(@RequestBody @Valid List<BmsChannelPoint4ExcelBo> param){ |
|
|
public R<?> importExcel(@RequestBody @Valid List<BmsChannelPoint4ExcelBo> param){ |
|
|
param.forEach(a->{ |
|
|
param.forEach(a->{ |
|
|
|
|
|
|
|
|
a.setErrorInfo(""); |
|
|
a.setErrorInfo(""); |
|
|
|
|
|
if(a.getType().equals("4")){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
if(!StringUtils.hasText(a.getChannelCode())){ |
|
|
if(!StringUtils.hasText(a.getChannelCode())){ |
|
|
a.setErrorInfo(a.getErrorInfo()+"渠道编码不能为空;"); |
|
|
a.setErrorInfo(a.getErrorInfo()+"渠道编码不能为空;"); |
|
|
} |
|
|
} |
|
@ -318,6 +322,9 @@ public class BmsChannelPointController { |
|
|
List<String> existChannelCode = channelList.stream().map(a -> a.getChannelCode()).collect(Collectors.toList()); |
|
|
List<String> existChannelCode = channelList.stream().map(a -> a.getChannelCode()).collect(Collectors.toList()); |
|
|
if(channelList.size()<channelCodes.size()) { |
|
|
if(channelList.size()<channelCodes.size()) { |
|
|
param.forEach(a -> { |
|
|
param.forEach(a -> { |
|
|
|
|
|
if(a.getType().equals("4")){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
if(!existChannelCode.contains(a.getChannelCode())){ |
|
|
if(!existChannelCode.contains(a.getChannelCode())){ |
|
|
a.setErrorInfo(a.getErrorInfo()+"不存在该渠道编码;"); |
|
|
a.setErrorInfo(a.getErrorInfo()+"不存在该渠道编码;"); |
|
|
} |
|
|
} |
|
@ -339,6 +346,9 @@ public class BmsChannelPointController { |
|
|
List<String> existRegion2Code = region2List.stream().map(a -> a.getCode()).collect(Collectors.toList()); |
|
|
List<String> existRegion2Code = region2List.stream().map(a -> a.getCode()).collect(Collectors.toList()); |
|
|
if(region2List.size()<bizRegionCodes.size()) { |
|
|
if(region2List.size()<bizRegionCodes.size()) { |
|
|
param.forEach(a -> { |
|
|
param.forEach(a -> { |
|
|
|
|
|
if(a.getType().equals("4")){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
if(!existRegion2Code.contains(a.getBizRegionCode())){ |
|
|
if(!existRegion2Code.contains(a.getBizRegionCode())){ |
|
|
a.setErrorInfo(a.getErrorInfo()+"不存在该行政区域编码;"); |
|
|
a.setErrorInfo(a.getErrorInfo()+"不存在该行政区域编码;"); |
|
|
} |
|
|
} |
|
|