Browse Source

客户导入修改

v1.0
15989082884@163.com 2 years ago
parent
commit
ecf5bf21df
  1. 16
      src/main/java/com/qs/serve/modules/bms/controller/BmsSupplierController.java

16
src/main/java/com/qs/serve/modules/bms/controller/BmsSupplierController.java

@ -951,22 +951,22 @@ public class BmsSupplierController {
List<String> userCodes = new ArrayList<>(); List<String> userCodes = new ArrayList<>();
userCodes.addAll( userCodes.addAll(
saveList.stream().filter(a->StringUtils.hasText(a.getMainHeadCode())) saveList.stream().filter(a->StringUtils.hasText(a.getMainHeadCode()))
.map(a->Arrays.asList(a.getMainHeadCode().split(","))) .map(a->Arrays.asList(a.getMainHeadCode().split(";")))
.flatMap(List::stream).collect(Collectors.toList()) .flatMap(List::stream).collect(Collectors.toList())
); );
userCodes.addAll( userCodes.addAll(
saveList.stream().filter(a->StringUtils.hasText(a.getMinorHeadCodes())) saveList.stream().filter(a->StringUtils.hasText(a.getMinorHeadCodes()))
.map(a->Arrays.asList(a.getMinorHeadCodes().split(","))) .map(a->Arrays.asList(a.getMinorHeadCodes().split(";")))
.flatMap(List::stream).collect(Collectors.toList()) .flatMap(List::stream).collect(Collectors.toList())
); );
userCodes.addAll( userCodes.addAll(
updateList.stream().filter(a->StringUtils.hasText(a.getMainHeadCode())) updateList.stream().filter(a->StringUtils.hasText(a.getMainHeadCode()))
.map(a->Arrays.asList(a.getMainHeadCode().split(","))) .map(a->Arrays.asList(a.getMainHeadCode().split(";")))
.flatMap(List::stream).collect(Collectors.toList()) .flatMap(List::stream).collect(Collectors.toList())
); );
userCodes.addAll( userCodes.addAll(
updateList.stream().filter(a->StringUtils.hasText(a.getMinorHeadCodes())) updateList.stream().filter(a->StringUtils.hasText(a.getMinorHeadCodes()))
.map(a->Arrays.asList(a.getMinorHeadCodes().split(","))) .map(a->Arrays.asList(a.getMinorHeadCodes().split(";")))
.flatMap(List::stream).collect(Collectors.toList()) .flatMap(List::stream).collect(Collectors.toList())
); );
userCodes = userCodes.stream().distinct().collect(Collectors.toList()); userCodes = userCodes.stream().distinct().collect(Collectors.toList());
@ -986,10 +986,10 @@ public class BmsSupplierController {
} }
List<String> userCodeTemp = new ArrayList<>(); List<String> userCodeTemp = new ArrayList<>();
if(StringUtils.hasText(a.getMainHeadCode())){ if(StringUtils.hasText(a.getMainHeadCode())){
userCodeTemp.addAll(Arrays.asList(a.getMainHeadCode().split(","))); userCodeTemp.addAll(Arrays.asList(a.getMainHeadCode().split(";")));
} }
if(StringUtils.hasText(a.getMinorHeadCodes())){ if(StringUtils.hasText(a.getMinorHeadCodes())){
userCodeTemp.addAll(Arrays.asList(a.getMinorHeadCodes().split(","))); userCodeTemp.addAll(Arrays.asList(a.getMinorHeadCodes().split(";")));
} }
List<String> noExistUserCode = userCodeTemp.stream().filter(b->!exsitUserCodes.contains(b)).collect(Collectors.toList()); List<String> noExistUserCode = userCodeTemp.stream().filter(b->!exsitUserCodes.contains(b)).collect(Collectors.toList());
if(noExistUserCode.size()>0){ if(noExistUserCode.size()>0){
@ -1105,7 +1105,7 @@ public class BmsSupplierController {
} }
if(StringUtils.hasText(a.getMinorHeadCodes())){ if(StringUtils.hasText(a.getMinorHeadCodes())){
List<String> otherUserCodes = Arrays.asList(a.getMinorHeadCodes().split(",")); List<String> otherUserCodes = Arrays.asList(a.getMinorHeadCodes().split(";"));
List<String> otherUserNames = new ArrayList<>(); List<String> otherUserNames = new ArrayList<>();
List<String> otherUserIds = new ArrayList<>(); List<String> otherUserIds = new ArrayList<>();
otherUserCodes.forEach(b->{ otherUserCodes.forEach(b->{
@ -1168,7 +1168,7 @@ public class BmsSupplierController {
} }
if(StringUtils.hasText(a.getMinorHeadCodes())){ if(StringUtils.hasText(a.getMinorHeadCodes())){
List<String> otherUserCodes = Arrays.asList(a.getMinorHeadCodes().split(",")); List<String> otherUserCodes = Arrays.asList(a.getMinorHeadCodes().split(";"));
List<String> otherUserNames = new ArrayList<>(); List<String> otherUserNames = new ArrayList<>();
List<String> otherUserIds = new ArrayList<>(); List<String> otherUserIds = new ArrayList<>();
otherUserCodes.forEach(b->{ otherUserCodes.forEach(b->{

Loading…
Cancel
Save