Commit ff305ad4 authored by Enriko Käsper's avatar Enriko Käsper

TEIS-79: implement official user name update and delete logic.

parent dfaddd99
......@@ -105,7 +105,7 @@ class OfficialsGroupGwListenerTest extends OfficialsAppTestBase {
assertThat(responseDto.getOfficialsGroupManager().getObjectStatus()).isEqualTo(CURRENT);
assertThat(responseDto.getOfficialsGroupManager().getFirstName()).isEqualTo("Neljas");
assertThat(responseDto.getOfficialsGroupManager().getIdCode()).isEqualTo("38802170149");
assertThat(responseDto.getOfficialsGroupManager().getLastName()).isEqualTo("Kasutaja");
assertThat(responseDto.getOfficialsGroupManager().getLastName()).isEqualTo("Test-Kasutaja");
}
@Test
......
package ee.sm.ti.teis.officials.group.service;
import ee.sm.ti.teis.OfficialsAppTestBase;
import ee.sm.ti.teis.officials.group.OfficialsGroupEntity;
import ee.sm.ti.teis.officials.group.OfficialsGroupRepository;
import ee.sm.ti.teis.officials.group.OfficialsGroupUpdatedMessage;
import ee.sm.ti.teis.officials.official.OfficialUserEntity;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import java.util.UUID;
import static ee.sm.ti.teis.servicerequest.UserType.OFFICIAL_USER;
import static java.util.Collections.emptyList;
import static java.util.UUID.randomUUID;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.*;
public class OfficialsGroupManagerServiceTest extends OfficialsAppTestBase {
private static final UUID USER_ID = UUID.fromString("50d9b9a6-93d9-469b-9d53-7063a7467d7f");
@Autowired
OfficialsGroupRepository groupRepo;
@Autowired
OfficialsGroupManagerService service;
@Autowired
RabbitTemplate msRabbitTemplate;
@Captor
ArgumentCaptor<OfficialsGroupUpdatedMessage> notifyUpdateMessage;
private RequestMetaDTO requestMetaDTO;
@BeforeEach
void setUp() {
requestMetaDTO = createRequestMeta(randomUUID().toString(), OFFICIAL_USER, randomUUID().toString(),
emptyList());
clearInvocations(msRabbitTemplate);
}
@Test
void manager_is_removed_from_group_and_domain_object_notified() {
List<OfficialsGroupEntity> groupEntityListBefore = groupRepo.findByOfficialsGroupManagerId(USER_ID);
assertThat(groupEntityListBefore).isNotEmpty();
OfficialUserEntity user = new OfficialUserEntity();
user.setId(USER_ID);
service.removeManagerFromGroups(user, requestMetaDTO);
List<OfficialsGroupEntity> groupEntityListAfter = groupRepo.findByOfficialsGroupManagerId(USER_ID);
assertThat(groupEntityListAfter).isEmpty();
OfficialsGroupUpdatedMessage event = new OfficialsGroupUpdatedMessage();
verify(msRabbitTemplate, times(1)).convertAndSend(eq(event.routingKey()), notifyUpdateMessage.capture());
assertThat(notifyUpdateMessage.getValue().getPayload().getOfficialsGroupManagerId()).isNull();
}
}
package ee.sm.ti.teis.officials.official;
import ee.sm.ti.teis.domain.officials.OfficialUser;
import ee.sm.ti.teis.OfficialsAppTestBase;
import ee.sm.ti.teis.domain.officials.OfficialUser;
import ee.sm.ti.teis.officials.config.QueueConfig;
import ee.sm.ti.teis.officials.group.OfficialsGroupEntity;
import ee.sm.ti.teis.officials.group.OfficialsGroupRepository;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import ee.sm.ti.teis.types.enums.ObjectStatus;
import org.jetbrains.annotations.NotNull;
......@@ -27,9 +29,11 @@ class OfficialsMsListenerTest extends OfficialsAppTestBase {
@Autowired
OfficialMsListener officialListener;
@Autowired
OfficialsGroupRepository officialsGroupRepository;
@Test
void createOfficialUser_test() {
void createOfficialUser_test() {
Random random = new Random();
String idCode = random.nextInt((92354 - 8945) + 1) + "";
OfficialUser newUser = OfficialUser.builder().firstName("First").lastName("Last").idCode(idCode).build();
......@@ -42,7 +46,7 @@ class OfficialsMsListenerTest extends OfficialsAppTestBase {
}
@Test
void createOfficialUser_should_activate_existing_deleted_user() {
void createOfficialUser_should_activate_existing_deleted_user() {
OfficialMsListener.OfficialUserMsResponse response = officialListener.findOfficialUser(composeOfficialUserRequest(DELETED_USER_ID));
assertThat(response.getPayload().getIdCode()).isEqualTo(DELETED_USER_IDCODE);
......@@ -57,21 +61,21 @@ class OfficialsMsListenerTest extends OfficialsAppTestBase {
}
@Test
void findOfficialUser() {
void findOfficialUser() {
OfficialMsListener.OfficialUserMsResponse response = officialListener.findOfficialUser(composeOfficialUserRequest(USER_ID));
assertThat(response.getPayload().getId()).isEqualTo(UUID.fromString(USER_ID));
}
@Test
void findDeletedOfficialUser() {
void findDeletedOfficialUser() {
OfficialMsListener.OfficialUserMsResponse response = officialListener.findOfficialUser(composeOfficialUserRequest(DELETED_USER_ID));
assertThat(response.getPayload().getId()).isEqualTo(UUID.fromString(DELETED_USER_ID));
}
@Test
void findOfficialUsers_by_idCode() {
void findOfficialUsers_by_idCode() {
OfficialMsListener.OfficialUsersMsResponse response = officialListener.findOfficialUsers(composeOfficialUsersRequest(ACTIVE_USER_IDCODE));
assertThat(response.getPayload()).isNotEmpty();
......@@ -79,15 +83,42 @@ class OfficialsMsListenerTest extends OfficialsAppTestBase {
}
@Test
void deleteOfficialUser_test() {
String userId = "c5d7ab7d-182c-47d3-828a-5b7447b3584f";
void deleteOfficialUser_test() {
UUID userId = UUID.fromString("e24fa6e8-777e-4262-bd9e-fca35252122d");
UUID groupId = UUID.fromString("0503dab2-46c3-4d75-9b70-20296736bf3a");
OfficialMsListener.OfficialUserMsResponse officialUser = officialListener.findOfficialUser(composeOfficialUserRequest(userId));
// user exists before
OfficialMsListener.OfficialUserMsResponse officialUser = officialListener.findOfficialUser(composeOfficialUserRequest(userId.toString()));
assertThat(officialUser.getPayload().getObjectStatus()).isEqualTo(ObjectStatus.CURRENT);
OfficialMsListener.DeleteOfficialUserMsResponse response = officialListener.deleteOfficialUser(composeDeleteRequest(userId));
// user is group manager before
OfficialsGroupEntity groupBefore = officialsGroupRepository.findById(groupId).orElse(null);
assertThat(groupBefore.getOfficialsGroupManagerId()).isEqualTo(userId);
OfficialMsListener.DeleteOfficialUserMsResponse response = officialListener.deleteOfficialUser(composeDeleteRequest(userId.toString()));
// user is deleted
assertThat(response.getPayload().getObjectStatus()).isEqualTo(ObjectStatus.DELETED);
assertThat(response.getPayload().getOfficialsGroupId()).isNull();
// group manager is removed after
OfficialsGroupEntity groupAfter = officialsGroupRepository.findById(groupId).orElse(null);
assertThat(groupAfter.getOfficialsGroupManagerId()).isNull();
}
@Test
void updateOfficialUser_should_update_first_and_last_name() {
OfficialUser existingUser = officialListener.findOfficialUser(composeOfficialUserRequest(USER_ID)).getPayload();
existingUser.setFirstName("UpdatedFirst");
existingUser.setLastName("UpdatedLast");
officialListener.updateOfficialUser(composeUpdateRequest(existingUser));
OfficialUser updatedUser = officialListener.findOfficialUser(composeOfficialUserRequest(USER_ID)).getPayload();
assertThat(updatedUser.getFirstName()).isEqualTo(existingUser.getFirstName());
assertThat(updatedUser.getLastName()).isEqualTo(existingUser.getLastName());
assertThat(updatedUser.getObjectStatus()).isEqualTo(ObjectStatus.CURRENT);
}
@NotNull
......@@ -97,6 +128,13 @@ class OfficialsMsListenerTest extends OfficialsAppTestBase {
return request;
}
@NotNull
private QueueConfig.UpdateOfficialUserDomainRequest composeUpdateRequest(OfficialUser user) {
QueueConfig.UpdateOfficialUserDomainRequest request = new QueueConfig.UpdateOfficialUserDomainRequest();
request.setPayload(user, REQUEST_META_DTO);
return request;
}
@NotNull
private QueueConfig.OfficialUserDomainRequest composeOfficialUserRequest(String uuid) {
QueueConfig.OfficialUserDomainRequest request = new QueueConfig.OfficialUserDomainRequest();
......
......@@ -6,3 +6,13 @@ VALUES
('EMTAK__0113','0113',true,'Köögivilja- ja melonikasvatus, juurvilja- ja mugulviljakasvatus','CURRENT',NULL,'011',DATE '2019-09-11',NULL,'EMTAK'),
('EMTAK__0321','0321',true,'Mere-vesiviljelus','CURRENT',NULL,'032',DATE '2019-09-11',NULL,'EMTAK'),
('EMTAK__0115','0115',true,'Tubakakasvatus','CURRENT',NULL,'011',DATE '2019-09-11',NULL,'EMTAK');
insert into officials_group (id, name, object_status, officials_group_manager_id)
VALUES
('88b1aa9c-5326-4683-bdd5-020fd1cd2148', 'Manageri test', 'CURRENT', '50d9b9a6-93d9-469b-9d53-7063a7467d7f'),
('0503dab2-46c3-4d75-9b70-20296736bf3a', 'Manageri test', 'CURRENT', 'e24fa6e8-777e-4262-bd9e-fca35252122d');
insert into official_user (id, id_code, first_name, last_name, officials_group_id, object_status)
VALUES
('50d9b9a6-93d9-469b-9d53-7063a7467d7f', '38909120274', 'Esimene', 'Test-manager-1', '88b1aa9c-5326-4683-bdd5-020fd1cd2148', 'CURRENT'),
('e24fa6e8-777e-4262-bd9e-fca35252122d', '38909120282', 'Teine', 'Test-manager-2', '0503dab2-46c3-4d75-9b70-20296736bf3a', 'CURRENT');
......@@ -13,6 +13,7 @@ import ee.sm.ti.teis.domainrequest.DomainCreateDTO;
import ee.sm.ti.teis.domainrequest.DomainDeleteDTO;
import ee.sm.ti.teis.domainrequest.DomainQueryDTO;
import ee.sm.ti.teis.domainrequest.DomainRequestDTO;
import ee.sm.ti.teis.domainrequest.DomainUpdateDTO;
import ee.sm.ti.teis.officegateway.official.request.*;
import ee.sm.ti.teis.servicecommon.util.TestDataImportService;
import org.springframework.context.annotation.Configuration;
......@@ -41,6 +42,7 @@ public class QueueConfig implements QueueList {
public static final String MS_OFFICIAL_USER_QUEUE = "officials-service.ms.findUserRequest";
public static final String MS_OFFICIAL_USERS_QUEUE = "officials-service.ms.findUsersRequest";
public static final String MS_CREATE_OFFICIAL_USER_QUEUE = "officials-service.ms.createUserRequest";
public static final String MS_UPDATE_OFFICIAL_USER_QUEUE = "officials-service.ms.updateUserRequest";
public static final String MS_OFFICIALS_GROUPS_QUEUE = "officials-service.ms.getOfficialGroup";
public static final String MS_DELETE_OFFICIAL_USER_QUEUE = "officials-service.ms.deleteUserRequest";
......@@ -76,6 +78,7 @@ public class QueueConfig implements QueueList {
addMsQueue(queues, "msFindUserQueue", new OfficialUserDomainRequest().routingKey(), MS_OFFICIAL_USER_QUEUE);
addMsQueue(queues, "msFindUsersQueue", new OfficialUsersDomainRequest().routingKey(), MS_OFFICIAL_USERS_QUEUE);
addMsQueue(queues, "msCreateUserQueue", new CreateOfficialUserDomainRequest().routingKey(), MS_CREATE_OFFICIAL_USER_QUEUE);
addMsQueue(queues, "msUpdateUserQueue", new UpdateOfficialUserDomainRequest().routingKey(), MS_UPDATE_OFFICIAL_USER_QUEUE);
addMsQueue(queues, "msGetOfficialGroupQueue", new OfficialUserGroupDomainRequest().routingKey(), MS_OFFICIALS_GROUPS_QUEUE);
addMsQueue(queues, "msDeleteUserQueue", new DeleteOfficialUserDomainRequest().routingKey(), MS_DELETE_OFFICIAL_USER_QUEUE);
addMsQueue(queues, "msFindOfficesQueue", new OfficesDomainRequest().routingKey(), MS_OFFICES_QUEUE);
......@@ -103,6 +106,9 @@ public class QueueConfig implements QueueList {
public static class CreateOfficialUserDomainRequest extends DomainCreateDTO<OfficialUser, ErrorDTO> {
}
public static class UpdateOfficialUserDomainRequest extends DomainUpdateDTO<OfficialUser, ErrorDTO> {
}
public static class OfficialUserGroupDomainRequest extends DomainRequestDTO<OfficialsGroup, ErrorDTO> {
}
......
package ee.sm.ti.teis.officials.group.service;
import ee.sm.ti.teis.officials.group.OfficialsGroupEntity;
import ee.sm.ti.teis.officials.group.OfficialsGroupMapper;
import ee.sm.ti.teis.officials.group.OfficialsGroupRepository;
import ee.sm.ti.teis.officials.official.OfficialUserEntity;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import javax.transaction.Transactional;
import java.util.List;
@Service
@Slf4j
@Validated
public class OfficialsGroupManagerService {
private final OfficialsGroupMapper mapper;
private final OfficialsGroupRepository repository;
private final OfficialsGroupNotifyService officialsGroupNotifyService;
public OfficialsGroupManagerService(OfficialsGroupMapper mapper,
OfficialsGroupRepository repository,
OfficialsGroupNotifyService officialsGroupNotifyService) {
this.mapper = mapper;
this.repository = repository;
this.officialsGroupNotifyService = officialsGroupNotifyService;
}
@Transactional
public void removeManagerFromGroups(OfficialUserEntity user, RequestMetaDTO requestMetaDTO) {
List<OfficialsGroupEntity> groups = repository.findByOfficialsGroupManagerId(user.getId());
groups.stream().forEach(group -> {
group.setOfficialsGroupManagerId(null);
repository.save(group);
officialsGroupNotifyService.notifyUpdate(mapper.toDomainDto(group), requestMetaDTO);
});
}
}
......@@ -22,7 +22,8 @@ public class OfficialMsListener {
@RabbitListener(queues = {QueueConfig.MS_OFFICIAL_USERS_QUEUE})
public OfficialUsersMsResponse findOfficialUsers(QueueConfig.OfficialUsersDomainRequest request) {
OfficialUser officialUser = request.getPayload();
List<OfficialUserEntity> entityList = service.findUsers(officialUser.getIdCode(), officialUser.getOfficialsGroupId(), "X");
String status = request.getPayload().getObjectStatus() == null ? "X" : request.getPayload().getObjectStatus().name();
List<OfficialUserEntity> entityList = service.findUsers(officialUser.getIdCode(), officialUser.getOfficialsGroupId(), status);
OfficialUsersMsResponse response = new OfficialUsersMsResponse();
response.setPayload(service.composeDomainDtoFromEntityList(entityList), request.getRequestMetaDTO());
return response;
......@@ -46,6 +47,15 @@ public class OfficialMsListener {
return response;
}
@RabbitListener(queues = {QueueConfig.MS_UPDATE_OFFICIAL_USER_QUEUE})
public UpdateOfficialUserMsResponse updateOfficialUser(QueueConfig.UpdateOfficialUserDomainRequest request) {
OfficialUserEntity entity = service.composeEntityFromDomainDto(request.getPayload());
entity = service.updateOfficialUser(entity, request.getRequestMetaDTO());
UpdateOfficialUserMsResponse response = new UpdateOfficialUserMsResponse();
response.setPayload(service.composeDomainDtoFromEntity(entity), request.getRequestMetaDTO());
return response;
}
@RabbitListener(queues = {QueueConfig.MS_DELETE_OFFICIAL_USER_QUEUE})
public DeleteOfficialUserMsResponse deleteOfficialUser(QueueConfig.DeleteOfficialUserDomainRequest request) {
OfficialUserEntity entity = service.delete(request.getPayload().getId(), request.getRequestMetaDTO());
......@@ -60,9 +70,11 @@ public class OfficialMsListener {
public static class CreateOfficialUserMsResponse extends DomainResponseDTO<OfficialUser, ErrorDTO> {
}
public static class OfficialUserMsResponse extends DomainResponseDTO<OfficialUser, ErrorDTO> {
public static class UpdateOfficialUserMsResponse extends DomainResponseDTO<OfficialUser, ErrorDTO> {
}
public static class OfficialUserMsResponse extends DomainResponseDTO<OfficialUser, ErrorDTO> {
}
public static class DeleteOfficialUserMsResponse extends DomainResponseDTO<OfficialUser, ErrorDTO> {
}
......
......@@ -7,6 +7,7 @@ import ee.sm.ti.teis.exceptions.TeisResourceNotFoundException;
import ee.sm.ti.teis.officegateway.official.dto.OfficialUserDto;
import ee.sm.ti.teis.officials.group.OfficialsGroupEntity;
import ee.sm.ti.teis.officials.group.OfficialsGroupRepository;
import ee.sm.ti.teis.officials.group.service.OfficialsGroupManagerService;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
import ee.sm.ti.teis.types.enums.ObjectStatus;
import lombok.extern.slf4j.Slf4j;
......@@ -28,19 +29,24 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
@Validated
public class OfficialService {
private static final String OFFICIAL_USER_NOT_FOUND_MESSAGE = "Official user not found.";
private final OfficalUserMapper mapper;
private final OfficialUserRepository repository;
private final OfficialsGroupRepository groupRepository;
private final OfficialNotifyService officialNotifyService;
private final OfficialsGroupManagerService officialsGroupManagerService;
public OfficialService(OfficalUserMapper mapper,
OfficialUserRepository repository,
OfficialsGroupRepository groupRepository,
OfficialNotifyService officialNotifyService) {
OfficialNotifyService officialNotifyService,
OfficialsGroupManagerService officialsGroupManagerService) {
this.mapper = mapper;
this.repository = repository;
this.groupRepository = groupRepository;
this.officialNotifyService = officialNotifyService;
this.officialsGroupManagerService = officialsGroupManagerService;
}
OfficialUserEntity composeEntityFromDto(OfficialUserDto dto) {
......@@ -92,12 +98,12 @@ public class OfficialService {
}
public OfficialUserEntity findUserById(UUID id) {
return repository.findById(id).orElseThrow(() -> new TeisResourceNotFoundException("Official user not found.", List.of(id)));
return repository.findById(id).orElseThrow(() -> new TeisResourceNotFoundException(OFFICIAL_USER_NOT_FOUND_MESSAGE, List.of(id)));
}
public OfficialUserEntity findCurrentUserById(UUID id) {
return repository.findByIdAndObjectStatus(id, ObjectStatus.CURRENT)
.orElseThrow(() -> new TeisResourceNotFoundException("Official user not found.", List.of(id)));
.orElseThrow(() -> new TeisResourceNotFoundException(OFFICIAL_USER_NOT_FOUND_MESSAGE, List.of(id)));
}
List<OfficialUserEntity> findUsers(String idCode, UUID groupId, String objectStatus) {
......@@ -131,16 +137,28 @@ public class OfficialService {
@Transactional
public OfficialUserEntity delete(UUID id, RequestMetaDTO requestMetaDTO) {
OfficialUserEntity user = findUserById(id);
user.setOfficialsGroup(null);
user.setObjectStatus(ObjectStatus.DELETED);
user = repository.save(user);
officialsGroupManagerService.removeManagerFromGroups(user, requestMetaDTO);
officialNotifyService.notifyDelete(mapper.toDomainDto(user), requestMetaDTO);
return user;
}
@Transactional
public OfficialUserEntity updateOfficialUser(OfficialUserEntity updateUser, RequestMetaDTO requestMetaDTO) {
OfficialUserEntity user = findCurrentUserById(updateUser.getId());
user.setFirstName(updateUser.getFirstName());
user.setLastName(updateUser.getLastName());
user = repository.save(user);
officialNotifyService.notifyUpdate(mapper.toDomainDto(user), requestMetaDTO);
return user;
}
@Transactional
public OfficialUserEntity updateUserGroupData(UUID userId, UUID groupId, RequestMetaDTO requestMetaDTO) {
OfficialUserEntity currentUser = repository.findByIdAndObjectStatus(userId, ObjectStatus.CURRENT)
.orElseThrow(() -> new TeisResourceNotFoundException("Official user not found.", List.of(userId)));
.orElseThrow(() -> new TeisResourceNotFoundException(OFFICIAL_USER_NOT_FOUND_MESSAGE, List.of(userId)));
if (currentUser.getOfficialsGroup() != null && currentUser.getOfficialsGroup().getId().equals(groupId)) {
return currentUser;
}
......@@ -171,5 +189,4 @@ public class OfficialService {
}
throw new TeisIllegalArgumentException("objectStatus can only be CURRENT or X");
}
}
......@@ -17,25 +17,25 @@ VALUES
insert into official_user (id, id_code, first_name, last_name, officials_group_id, object_status)
VALUES
('3dac227f-a8af-4771-8d8b-01409ac7fef0', '38909120274', 'Esimene', 'Kasutaja', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('e0ee766d-4332-450a-9d9c-9835ae663d96', '49206110158', 'Teine', 'Kasutaja', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('620437e0-3b57-48fc-bc40-5adcfd994638', '37802170149', 'Kolmas', 'Kasutaja', null, 'CURRENT'),
('b429d838-758b-4ddd-b843-b6242675986f', '38802170149', 'Neljas', 'Kasutaja', '706bc212-ac68-4160-9c4b-7497a2de3430', 'CURRENT'),
('b5d59f3b-57af-4971-8110-51019e5e827d', '49206111928', 'Admin', 'Kasutaja', '68b5b265-9427-457f-8f16-0bd5cf608714', 'CURRENT'),
('5d74e9ca-c0f4-40b5-85dd-6fbe5eb6a1a2', '47501020304', 'Kustutatud gruppi', 'Kasutaja', 'c6bbd0d0-a614-408e-b22b-c60eed1a0dc9', 'CURRENT'),
('2d2aa827-d92a-4f77-af3c-a9537ba31d7b', '48506111928', 'Kustutatud', 'Kasutaja', 'c6bbd0d0-a614-408e-b22b-c60eed1a0dc9', 'DELETED'),
('ebfffc90-72d0-4c0b-ab5e-1955e996fd28', '48506111922', 'Kustutatud Grupi', 'Kustutatud Manager', 'c6bbd0d0-a614-408e-b22b-c60eed1a0dc9', 'DELETED'),
('be01b415-86a5-4f4c-b1f2-2c065715b221', '48606111928', 'Kustutatud Teine', 'Kasutaja', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'DELETED'),
('3dac227f-a8af-4771-8d8b-01409ac7fef0', '38909120274', 'Esimene', 'Test-Kasutaja', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('e0ee766d-4332-450a-9d9c-9835ae663d96', '49206110158', 'Teine', 'Test-Kasutaja', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('620437e0-3b57-48fc-bc40-5adcfd994638', '37802170149', 'Kolmas', 'Test-Kasutaja', null, 'CURRENT'),
('b429d838-758b-4ddd-b843-b6242675986f', '38802170149', 'Neljas', 'Test-Kasutaja', '706bc212-ac68-4160-9c4b-7497a2de3430', 'CURRENT'),
('b5d59f3b-57af-4971-8110-51019e5e827d', '49206111928', 'Admin', 'Test-Kasutaja', '68b5b265-9427-457f-8f16-0bd5cf608714', 'CURRENT'),
('5d74e9ca-c0f4-40b5-85dd-6fbe5eb6a1a2', '47501020304', 'Kustutatud gruppi', 'Test-Kasutaja', 'c6bbd0d0-a614-408e-b22b-c60eed1a0dc9', 'CURRENT'),
('2d2aa827-d92a-4f77-af3c-a9537ba31d7b', '48506111928', 'Kustutatud', 'Test-Kasutaja', 'c6bbd0d0-a614-408e-b22b-c60eed1a0dc9', 'DELETED'),
('ebfffc90-72d0-4c0b-ab5e-1955e996fd28', '48506111922', 'Kustutatud Grupi', 'Test-Kustutatud Manager', 'c6bbd0d0-a614-408e-b22b-c60eed1a0dc9', 'DELETED'),
('be01b415-86a5-4f4c-b1f2-2c065715b221', '48606111928', 'Kustutatud Teine', 'Test-Kasutaja', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'DELETED'),
('06fe678a-90a8-49a7-8362-1041d244ef90', '60001018800', 'TeIS', 'Test1', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('f0cafdc3-ff43-4c73-8319-93f07a7d5a3c', '50001018865', 'TeIS', 'Test2', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('cb75bfe0-e543-4332-97d5-e21ac92debe8', '48501019907', 'Automaattestide', 'Kasutaja', null, 'CURRENT'),
('cb75bfe0-e543-4332-97d5-e21ac92debe8', '48501019907', 'Automaattestide', 'Test-Kasutaja', null, 'CURRENT'),
('c5d7ab7d-182c-47d3-828a-5b7447b3584f', '60001019906', 'TeIS', 'Test3', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('a6e007a3-564d-40ed-b48b-a03a92be18af', '48201019101', 'Marina', 'Ivanova', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('eb13c9af-3445-4bb3-9304-105112525b5c', '48301019202', 'Kätlin', 'Košmõžäköüina', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('7948cf23-e9a8-45fd-a3c8-03ba38694948', '38101019303', 'Александр', 'Мороз', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('45365695-90fa-41af-96c9-449cb4c1fcaf', '38001019404', 'Peeter', 'Tubli', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('6d497ad4-91cf-43f3-95b9-06b777ce7c44', '48501019505', 'Maris-Liis', 'Zorro', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('109a3a67-c02d-4836-adff-cb73915fd110', '48601019606', 'Märt', 'Lindpere', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT');
('a6e007a3-564d-40ed-b48b-a03a92be18af', '48201019101', 'Marina', 'Test-Ivanova', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('eb13c9af-3445-4bb3-9304-105112525b5c', '48301019202', 'Kätlin', 'Test-Košmõžäköüina', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('7948cf23-e9a8-45fd-a3c8-03ba38694948', '38101019303', 'Александр', 'Test-Мороз', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('45365695-90fa-41af-96c9-449cb4c1fcaf', '38001019404', 'Peeter', 'Test-Tubli', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('6d497ad4-91cf-43f3-95b9-06b777ce7c44', '48501019505', 'Maris-Liis', 'Test-Zorro', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT'),
('109a3a67-c02d-4836-adff-cb73915fd110', '48601019606', 'Märt', 'Test-Lindpere', 'ffb124d3-ce51-45e2-b8e5-343d11066998', 'CURRENT');
insert into officials_group_emtak (id, officials_group_id, emtak, object_status)
VALUES
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment