diff --git a/arex-web-api/src/main/java/com/arextest/web/api/service/controller/FileSystemController.java b/arex-web-api/src/main/java/com/arextest/web/api/service/controller/FileSystemController.java index 4f2458ab..4540e5e5 100644 --- a/arex-web-api/src/main/java/com/arextest/web/api/service/controller/FileSystemController.java +++ b/arex-web-api/src/main/java/com/arextest/web/api/service/controller/FileSystemController.java @@ -335,6 +335,7 @@ public Response validInvitation(@Valid @RequestBody ValidInvitationRequestType r return ResponseUtils.successResponse(responseType); } + @Deprecated @PostMapping("/addItemFromRecord") @ResponseBody public Response addItemFromRecord(@Valid @RequestBody FSAddItemFromRecordRequestType request) { diff --git a/arex-web-core/src/main/java/com/arextest/web/core/business/filesystem/FileSystemService.java b/arex-web-core/src/main/java/com/arextest/web/core/business/filesystem/FileSystemService.java index 1149a729..7a389ae4 100644 --- a/arex-web-core/src/main/java/com/arextest/web/core/business/filesystem/FileSystemService.java +++ b/arex-web-core/src/main/java/com/arextest/web/core/business/filesystem/FileSystemService.java @@ -735,6 +735,7 @@ public MutablePair addItemFromRecordByDefault( fsAddItemFromRecordRequest.setPlanId(request.getPlanId()); fsAddItemFromRecordRequest.setRecordId(request.getRecordId()); fsAddItemFromRecordRequest.setOperationId(request.getOperationId()); + fsAddItemFromRecordRequest.setLabelIds(request.getLabelIds()); FSTreeDto treeDto = fsTreeRepository.queryFSTreeById(request.getWorkspaceId()); if (treeDto == null) { @@ -835,6 +836,9 @@ public MutablePair addItemFromRecord(FSAddItemFromRecordRequestT String newRecordId = storageCase.getNewRecordId(request.getRecordId()); caseDto.setRecordId(newRecordId); + // set labels + caseDto.setLabelIds(request.getLabelIds()); + KeyValuePairDto recordHeader = new KeyValuePairDto(); recordHeader.setKey(AREX_RECORD_ID); recordHeader.setValue(newRecordId); diff --git a/arex-web-model-contract/src/main/java/com/arextest/web/model/contract/contracts/filesystem/FSAddItemFromRecordRequestType.java b/arex-web-model-contract/src/main/java/com/arextest/web/model/contract/contracts/filesystem/FSAddItemFromRecordRequestType.java index a682659f..9977d812 100644 --- a/arex-web-model-contract/src/main/java/com/arextest/web/model/contract/contracts/filesystem/FSAddItemFromRecordRequestType.java +++ b/arex-web-model-contract/src/main/java/com/arextest/web/model/contract/contracts/filesystem/FSAddItemFromRecordRequestType.java @@ -1,5 +1,6 @@ package com.arextest.web.model.contract.contracts.filesystem; +import java.util.Set; import javax.validation.constraints.NotBlank; import lombok.Data; @@ -16,4 +17,6 @@ public class FSAddItemFromRecordRequestType { private String recordId; @NotBlank(message = "operationId cannot be empty") private String operationId; + + private Set labelIds; } diff --git a/arex-web-model-contract/src/main/java/com/arextest/web/model/contract/contracts/filesystem/FsAddItemFromRecordByDefaultRequestType.java b/arex-web-model-contract/src/main/java/com/arextest/web/model/contract/contracts/filesystem/FsAddItemFromRecordByDefaultRequestType.java index 59dc73a2..e780f4fa 100644 --- a/arex-web-model-contract/src/main/java/com/arextest/web/model/contract/contracts/filesystem/FsAddItemFromRecordByDefaultRequestType.java +++ b/arex-web-model-contract/src/main/java/com/arextest/web/model/contract/contracts/filesystem/FsAddItemFromRecordByDefaultRequestType.java @@ -1,5 +1,6 @@ package com.arextest.web.model.contract.contracts.filesystem; +import java.util.Set; import javax.validation.constraints.NotBlank; import lombok.Data; @@ -21,4 +22,6 @@ public class FsAddItemFromRecordByDefaultRequestType { private String recordId; @NotBlank(message = "operationId cannot be empty") private String operationId; + + private Set labelIds; }