diff --git a/health-services/muster-roll/src/main/java/org/egov/config/MusterRollServiceConfiguration.java b/health-services/muster-roll/src/main/java/org/egov/config/MusterRollServiceConfiguration.java index 1c84630a17..0982253acb 100644 --- a/health-services/muster-roll/src/main/java/org/egov/config/MusterRollServiceConfiguration.java +++ b/health-services/muster-roll/src/main/java/org/egov/config/MusterRollServiceConfiguration.java @@ -127,6 +127,9 @@ public class MusterRollServiceConfiguration { @Value("${works.contract.service.code}") private String contractServiceCode; + @Value("${musterroll.update.recompute.attendance.enabled:false}") + private boolean recomputeAttendanceEnabled; + @PostConstruct public void initialize() { TimeZone.setDefault(TimeZone.getTimeZone(timeZone)); diff --git a/health-services/muster-roll/src/main/java/org/egov/service/MusterRollService.java b/health-services/muster-roll/src/main/java/org/egov/service/MusterRollService.java index 34ff246e74..9147b09295 100644 --- a/health-services/muster-roll/src/main/java/org/egov/service/MusterRollService.java +++ b/health-services/muster-roll/src/main/java/org/egov/service/MusterRollService.java @@ -270,7 +270,7 @@ private MusterRoll fetchExistingMusterRoll(MusterRoll musterRoll) { * @return */ private boolean isComputeAttendance (MusterRoll musterRoll) { - if (musterRoll.getAdditionalDetails() != null) { + if (config.isRecomputeAttendanceEnabled() && musterRoll.getAdditionalDetails() != null) { try { JsonNode node = mapper.readTree(mapper.writeValueAsString(musterRoll.getAdditionalDetails())); if (node.findValue(COMPUTE_ATTENDENSE) != null && StringUtils.isNotBlank(node.findValue(COMPUTE_ATTENDENSE).textValue())) { diff --git a/health-services/muster-roll/src/main/resources/application.properties b/health-services/muster-roll/src/main/resources/application.properties index 5d8bbfe492..ffe7b1c138 100644 --- a/health-services/muster-roll/src/main/resources/application.properties +++ b/health-services/muster-roll/src/main/resources/application.properties @@ -116,3 +116,6 @@ works.bankaccounts.search.endpoint=/bankaccount-service/bankaccount/v1/_search #-----------Contract service code------------# works.contract.service.code=WORKS-CONTRACT + +#-----------Muster roll update api config------------# +musterroll.update.recompute.attendance.enabled=false