Przeglądaj źródła

Merge branch 'fix/formv2look_error' into 'wrdp'

[流程平台]修复编译错误问题

See merge request o2oa/o2oa!2144
胡起 5 lat temu
rodzic
commit
a01f11e7a1

+ 3 - 3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2LookupWorkOrWorkCompleted.java

@@ -109,7 +109,7 @@ class V2LookupWorkOrWorkCompleted extends BaseAction {
 		if (optional.isPresent()) {
 			return (Wo) optional.get();
 		} else {
-			List<String> list = new CopyOnWriteArrayList<>();
+			final List<String> list = new CopyOnWriteArrayList<>();
 			CompletableFuture<Void> _relatedForm = CompletableFuture.runAsync(() -> {
 				if (ListTools.isNotEmpty(form.getProperties().getRelatedFormList())) {
 					try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
@@ -164,11 +164,11 @@ class V2LookupWorkOrWorkCompleted extends BaseAction {
 			_relatedForm.get();
 			_relatedScript.get();
 			list.add(form.getId() + form.getUpdateTime().getTime());
-			list = list.stream().sorted().collect(Collectors.toList());
+			List<String> sortList = list.stream().sorted().collect(Collectors.toList());
 			Wo wo = new Wo();
 			wo.setId(form.getId());
 			CRC32 crc = new CRC32();
-			crc.update(StringUtils.join(list, "#").getBytes());
+			crc.update(StringUtils.join(sortList, "#").getBytes());
 			wo.setCacheTag(crc.getValue() + "");
 			return wo;
 		}

+ 3 - 3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2LookupWorkOrWorkCompletedMobile.java

@@ -109,7 +109,7 @@ class V2LookupWorkOrWorkCompletedMobile extends BaseAction {
 		if (optional.isPresent()) {
 			return (Wo) optional.get();
 		} else {
-			List<String> list = new CopyOnWriteArrayList<>();
+			final List<String> list = new CopyOnWriteArrayList<>();
 			CompletableFuture<Void> _relatedForm = CompletableFuture.runAsync(() -> {
 				if (ListTools.isNotEmpty(form.getProperties().getMobileRelatedFormList())) {
 					try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
@@ -165,11 +165,11 @@ class V2LookupWorkOrWorkCompletedMobile extends BaseAction {
 			_relatedForm.get();
 			_relatedScript.get();
 			list.add(form.getId() + form.getUpdateTime().getTime());
-			list = list.stream().sorted().collect(Collectors.toList());
+			List<String> sortList = list.stream().sorted().collect(Collectors.toList());
 			Wo wo = new Wo();
 			wo.setId(form.getId());
 			CRC32 crc = new CRC32();
-			crc.update(StringUtils.join(list, "#").getBytes());
+			crc.update(StringUtils.join(sortList, "#").getBytes());
 			wo.setCacheTag(crc.getValue() + "");
 			return wo;
 		}