Browse Source

批量多公司确认共享失败问题优化

liyuan 8 months ago
parent
commit
89479d8c61

+ 2 - 2
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/service/impl/SharePutOnShelvesServiceImpl.java

@@ -269,10 +269,10 @@ public class SharePutOnShelvesServiceImpl extends ServiceImpl<SharePutOnShelvesM
 				}
 				item.setShareStatus("已共享");
 				if (ObjectUtils.isNotNull(item.getSharedCompanyId()) && ObjectUtils.isNotNull(item.getSharedCompany())) {
-					List<String> sharedCompanyId = Arrays.asList(item.getSharedCompanyId().split(","));
+					List<String> sharedCompanyId = new ArrayList<>(Arrays.asList(item.getSharedCompanyId().split(",")));
 					sharedCompanyId.add(deptItem.getId() + "");
 					item.setSharedCompanyId(sharedCompanyId.stream().distinct().collect(Collectors.joining(",")));
-					List<String> sharedCompanyName = Arrays.asList(item.getSharedCompany().split(","));
+					List<String> sharedCompanyName = new ArrayList<>(Arrays.asList(item.getSharedCompany().split(",")));
 					sharedCompanyName.add(deptItem.getDeptName());
 					item.setSharedCompany(sharedCompanyName.stream().distinct().collect(Collectors.joining(",")));
 				} else {