Skip to content

Commit

Permalink
Hlm health hrms changes (#650)
Browse files Browse the repository at this point in the history
* HLM-4496: Added attendance module in HCM

* HLM-4496: updated attendance directory, removed target folder and imi file

* buil config added for hlm-4496 in feature branch

* HLM-4207: offline enablement in attendance log

* HLM-4207: added db migration script

* HLM-4207: updated db migration script

* HLM-4207: updated incorrect statements

* HLM-4207: bulk api support, without redis cache

* HLM-4207: updated Attendancelog consumer for bulk api

* HLM-4207: consumer fix

* HLM-4207: cache support added for attendance log create and update

* HLM-4207: added health-individual endpoint

* HLM-4207: added radis host

* HLM-4207: updated qualified for objectmapper in attendance module

* HLM-4496,HLM-4207: updated application.properties for redis config

* HLM-4207: updated kafka listener topics

* HLM-4207: changed kafka config

* HLM-4207, HLM-4986, HLM-4987 : bug fix

* HLM-4207: added clientreferenceid search, null check for document id

* HLM-4894 moving hrms code from DIGIT-Dev branc health-moz-dev

* HLM-4894 moving hrms code from DIGIT-Dev branc health-moz-dev

* HLM-4894 updating build config for health-hrms

* HLM-4894 adding clientreferenceID while creating individuals

* HLM-4894 adding clientreferenceID while creating individuals

* HLM-4894 adding clientreferenceID while creating individuals

* HLM-4894 adding clientAuditDetails while creating individuals

* Adding mdmsLegacyHost

* Adding mdmsLegacyHost

---------

Co-authored-by: kanishq-egov <kanishq.bhatnagar@egovernments.org>
Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 4, 2024
1 parent 8391530 commit db786ac
Show file tree
Hide file tree
Showing 119 changed files with 21,321 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,8 @@ public class PropertiesManager {

@Value("${egov.hrms.auto.generate.password}")
private boolean autoGeneratePassword;

@Value("${egov.mdmsLegacy.search.endpoint}")
public String mdmsLegacySearchEndpoint;

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.egov.hrms.service;


import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Collections;
Expand All @@ -15,18 +16,9 @@
import lombok.extern.slf4j.Slf4j;
import org.egov.common.contract.request.RequestInfo;
import org.egov.common.models.core.Role;
import org.egov.common.models.individual.Address;
import org.egov.common.models.individual.AddressType;
import org.egov.common.models.individual.Gender;
import org.egov.common.models.individual.Identifier;
import org.egov.common.models.individual.Individual;
import org.egov.common.models.individual.IndividualBulkResponse;
import org.egov.common.models.individual.IndividualRequest;
import org.egov.common.models.individual.IndividualResponse;
import org.egov.common.models.individual.IndividualSearch;
import org.egov.common.models.individual.IndividualSearchRequest;
import org.egov.common.models.individual.Name;
import org.egov.common.models.individual.UserDetails;

import org.egov.common.models.individual.*;

import org.egov.hrms.config.PropertiesManager;
import org.egov.hrms.repository.RestCallRepository;
import org.egov.hrms.utils.HRMSConstants;
Expand All @@ -35,6 +27,12 @@
import org.egov.hrms.web.contract.UserResponse;
import org.springframework.beans.factory.annotation.Autowired;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;


import static org.egov.hrms.utils.HRMSConstants.SYSTEM_GENERATED;

@Slf4j
Expand Down Expand Up @@ -161,19 +159,15 @@ private static IndividualRequest mapToIndividualRequest(UserRequest userRequest)
/*
* FIXME (HCM specific change) clientReferenceId is the primary key in the individual table of the FrontEnd Worker Application's local database.
*/
// Generating a unique client reference ID using UUID
.clientReferenceId(String.valueOf(UUID.randomUUID()))
// Creating a list of identifiers
.identifiers(Collections.singletonList(
// Building a unique identifier
Identifier.builder()
// Generating a unique client reference ID using UUID for the identifier
.clientReferenceId(String.valueOf(UUID.randomUUID()))
// Generating a unique identifier ID using UUID
.identifierId(String.valueOf(UUID.randomUUID()))
// Specifying the type of identifier as SYSTEM_GENERATED
.identifierType(SYSTEM_GENERATED)
.build()))

.userDetails(UserDetails.builder()
.username(userRequest.getUser().getUserName())
.password(userRequest.getUser().getPassword())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,18 @@ public class MDMSService {

@Autowired
private RestTemplate restTemplate;


@Value("${egov.mdmslegacy.host}")
private String mdmsLegacyHost;

@Value("${egov.mdms.host}")
private String mdmsHost;

@Value("${egov.mdms.search.endpoint}")
private String mdmsEndpoint;

@Value("${egov.mdmslegacy.search.endpoint}")
private String mdmsLegacyEndpoint;


/**
Expand Down Expand Up @@ -180,7 +186,8 @@ public MdmsCriteriaReq prepareMDMSRequestLoc(StringBuilder uri, RequestInfo requ
moduleDetail.setMasterDetails(masterDetails);
moduleDetails.add(moduleDetail);
}
uri.append(mdmsHost).append(mdmsEndpoint);

uri.append(mdmsLegacyHost).append(mdmsLegacyEndpoint);
MdmsCriteria mdmsCriteria = MdmsCriteria.builder().tenantId(tenantId).moduleDetails(moduleDetails).build();
return MdmsCriteriaReq.builder().requestInfo(requestInfo).mdmsCriteria(mdmsCriteria).build();

Expand Down
Loading

0 comments on commit db786ac

Please sign in to comment.