This commit is contained in:
parent
53ac7d0a0c
commit
c960291849
1 changed files with 6 additions and 1 deletions
|
|
@ -193,13 +193,18 @@ public class MultiCompanyService
|
|||
}
|
||||
|
||||
for (ClearingMemberCategoryNewRequest partRequest : req.getCategories()) {
|
||||
boolean isCategoryForDeletion = Arrays.asList("CLOS", "SSPD").contains(partRequest.getWorkflowStatus());
|
||||
ClearingMemberCategory existCategory = findCategory(partRequest);
|
||||
if (isCategoryForDeletion && existCategory == null) {
|
||||
log.debug("There is no category for deletion; do nothing...");
|
||||
continue;
|
||||
}
|
||||
if (existCategory == null) {
|
||||
log.trace("For company[{}] do new category", companyId);
|
||||
replyI = clearingMemberCategoryService.clearingMemberCategoryNew(wrapRequest(baseRequest, partRequest, ActionType.NEW));
|
||||
validateReply(companyId, "contactNew", replyI);
|
||||
} else {
|
||||
if (Arrays.asList("CLOS", "SSPD").contains(partRequest.getWorkflowStatus())) {
|
||||
if (isCategoryForDeletion) {
|
||||
log.trace("For company[{}] do delete category[{}]", companyId, existCategory.getId());
|
||||
CommonDeleteRequest commonDeleteRequest = createDeleteRequest(existCategory);
|
||||
clearingMemberCategoryService.clearingMemberCategoryDelete(wrapRequest(baseRequest, commonDeleteRequest, ActionType.DELETE));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue