diff --git a/backend/attendance/pom.xml b/backend/attendance/pom.xml
index 4d39ba210f..1110668e8b 100644
--- a/backend/attendance/pom.xml
+++ b/backend/attendance/pom.xml
@@ -77,7 +77,7 @@
org.egov.common
health-services-models
- 1.0.6-SNAPSHOT
+ 1.0.19-SNAPSHOT
compile
@@ -114,17 +114,23 @@
javax.validation
validation-api
+
+ org.egov.common
+ health-services-common
+ 1.0.15-SNAPSHOT
+ compile
+
- repo.digit.org
- eGov ERP Releases Repository
- https://nexus-repo.digit.org/nexus/content/repositories/releases/
+ repo.digit.org.snapshots
+ eGov ERP SNAPSHOT Repository
+ https://nexus-repo.digit.org/nexus/content/repositories/snapshots/
- repo.digit.org.snapshots
+ repo.digit.org
eGov ERP Releases Repository
- https://nexus-repo.digit.org/nexus/content/repositories/snapshots/
+ https://nexus-repo.digit.org/nexus/content/repositories/releases/
repo.digit.org.public
diff --git a/backend/attendance/src/main/java/org/egov/config/AttendanceLogConfiguration.java b/backend/attendance/src/main/java/org/egov/config/AttendanceLogConfiguration.java
new file mode 100644
index 0000000000..5c392dec8f
--- /dev/null
+++ b/backend/attendance/src/main/java/org/egov/config/AttendanceLogConfiguration.java
@@ -0,0 +1,28 @@
+package org.egov.config;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.egov.tracer.config.TracerConfiguration;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Import;
+import org.springframework.stereotype.Component;
+
+@Import({TracerConfiguration.class})
+@Getter
+@Setter
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Component
+public class AttendanceLogConfiguration {
+
+ @Value("${attendance.log.kafka.consumer.bulk.create.topic}")
+ private String createAttendanceLogBulkTopic;
+
+ @Value("${attendance.log.kafka.consumer.bulk.update.topic}")
+ private String updateAttendanceLogBulkTopic;
+
+}
diff --git a/backend/attendance/src/main/java/org/egov/config/AttendanceServiceConfiguration.java b/backend/attendance/src/main/java/org/egov/config/AttendanceServiceConfiguration.java
index ede3010f45..85b5043d5c 100644
--- a/backend/attendance/src/main/java/org/egov/config/AttendanceServiceConfiguration.java
+++ b/backend/attendance/src/main/java/org/egov/config/AttendanceServiceConfiguration.java
@@ -1,5 +1,8 @@
package org.egov.config;
+import java.util.TimeZone;
+import javax.annotation.PostConstruct;
+
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -8,8 +11,7 @@
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Component;
-import javax.annotation.PostConstruct;
-import java.util.TimeZone;
+import java.util.List;
@Component
@Data
@@ -102,6 +104,35 @@ public void initialize() {
@Value("${works.individual.search.endpoint}")
private String individualSearchEndpoint;
+ @Value("${attendance.register.first.staff.insert.enabled:true}")
+ private Boolean registerFirstStaffInsertEnabled;
+
+ //HRMS Service
+ @Value("${egov.hrms.host}")
+ private String hrmsHost;
+
+ @Value("${egov.hrms.search.endpoint}")
+ private String hrmsEndPoint;
+
+ //Project Service
+ @Value("${egov.project.host}")
+ private String projectHost;
+
+ @Value("${egov.project.staff.search.endpoint}")
+ private String projectStaffSearchEndpoint;
+
+ @Value("${egov.project.search.endpoint}")
+ private String projectSearchEndpoint;
+
+ @Value("${project.supervisor.roles}")
+ private List projectSupervisorRoles;
+
+ @Value("${project.attendee.roles}")
+ private List projectAttendeeRoles;
+
+ @Value("${project.staff.attendance.topic}")
+ private String projectStaffAttendanceTopic;
+
}
diff --git a/backend/attendance/src/main/java/org/egov/config/MainConfiguration.java b/backend/attendance/src/main/java/org/egov/config/MainConfiguration.java
index e4d1cb86e3..9e1c5cb638 100644
--- a/backend/attendance/src/main/java/org/egov/config/MainConfiguration.java
+++ b/backend/attendance/src/main/java/org/egov/config/MainConfiguration.java
@@ -1,19 +1,35 @@
package org.egov.config;
+import java.util.TimeZone;
+import javax.annotation.PostConstruct;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.egov.tracer.config.TracerConfiguration;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
+import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
-import javax.annotation.PostConstruct;
-import java.util.TimeZone;
-
@Import({TracerConfiguration.class})
+@Configuration
+@ComponentScan(basePackages = {"org.egov"})
public class MainConfiguration {
@Value("${app.timezone}")
@@ -24,9 +40,14 @@ public void initialize() {
TimeZone.setDefault(TimeZone.getTimeZone(timeZone));
}
- @Bean
- public ObjectMapper objectMapper() {
- return new ObjectMapper().disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES).setTimeZone(TimeZone.getTimeZone(timeZone));
+ @Value("${spring.redis.host}")
+ private String redisHost;
+ @Bean(name = "objectMapper")
+ public ObjectMapper objectMapper(){
+ ObjectMapper objectMapper = new ObjectMapper();
+ objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES).setTimeZone(TimeZone.getTimeZone(timeZone));
+ objectMapper.registerModule(new JavaTimeModule());
+ return objectMapper;
}
@Bean
@@ -36,4 +57,37 @@ public MappingJackson2HttpMessageConverter jacksonConverter(ObjectMapper objectM
converter.setObjectMapper(objectMapper);
return converter;
}
+ @Bean
+ @Qualifier("redisObjectMapper")
+ public ObjectMapper redisObjectMapper() {
+ ObjectMapper objectMapper = new ObjectMapper();
+ objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+ objectMapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance,
+ ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.WRAPPER_ARRAY);
+ objectMapper.registerModule(new JavaTimeModule());
+ return objectMapper;
+ }
+
+ @Bean
+ public RedisConnectionFactory redisConnectionFactory() {
+ RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration();
+ redisStandaloneConfiguration.setHostName(redisHost);
+ return new JedisConnectionFactory(redisStandaloneConfiguration);
+ }
+
+
+ @Bean
+ public RedisTemplate redisTemplate(@Qualifier("redisObjectMapper") ObjectMapper redisObjectMapper,
+ RedisConnectionFactory redisConnectionFactory) {
+ Jackson2JsonRedisSerializer