Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Develop #723

Merged
merged 62 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
9fccab3
PFM-4855
Saloni-eGov Jan 29, 2024
fe8e3eb
PFM-4855
Saloni-eGov Jan 30, 2024
661bdd1
PFM-4855
Saloni-eGov Jan 31, 2024
0abfa5f
PFM-4855
Saloni-eGov Feb 1, 2024
bf2a595
PFM-4855 added loggers
Saloni-eGov Feb 5, 2024
0c0c245
PFM-4855 added loggers
Saloni-eGov Feb 5, 2024
19b6338
PFM-4855
Saloni-eGov Feb 5, 2024
a62d382
PFM-4855
Saloni-eGov Feb 5, 2024
b035dfc
PFM-4855
Saloni-eGov Feb 6, 2024
f7481ab
PFM-4855 uncommented producer.push
Saloni-eGov Feb 6, 2024
96d10b0
PFM-4855 added max-poll in application.properties
Saloni-eGov Feb 6, 2024
d26e47f
PFM-4855
Saloni-eGov Feb 6, 2024
47365d2
PFM-4855
Saloni-eGov Feb 6, 2024
b505ad3
PFM-4855
Saloni-eGov Feb 6, 2024
c3f4eb4
PFM-4855
Saloni-eGov Feb 7, 2024
5f82710
PFM-4855
Saloni-eGov Feb 7, 2024
2fdd4cc
PFM-4855
Saloni-eGov Feb 7, 2024
34895a1
PFM-4855
Saloni-eGov Feb 7, 2024
e559f5c
PFM-4855
Saloni-eGov Feb 7, 2024
c725190
PFM-4855
Saloni-eGov Feb 8, 2024
a8fa9ca
Merge remote-tracking branch 'origin/PFM-4855' into PFM-4855
Saloni-eGov Feb 8, 2024
2a7ef07
Merge pull request #721 from egovernments/PFM-4855
pradeepkumarcm-egov Feb 8, 2024
925aca8
PFM-5564
Saloni-eGov Feb 12, 2024
b05c681
PFM-5564
Saloni-eGov Feb 12, 2024
6deccde
PFM-5564
Saloni-eGov Feb 13, 2024
e18dfbf
PFM-5564
Saloni-eGov Feb 13, 2024
4c70d67
PFM-5564
Saloni-eGov Feb 14, 2024
1d89129
PFM-5564
Saloni-eGov Feb 14, 2024
c28c489
PFM-5564
Saloni-eGov Feb 14, 2024
61f18a4
PFM-5564
Saloni-eGov Feb 14, 2024
5cd2bf7
PFM-5564
Saloni-eGov Feb 14, 2024
19f0691
PFM-5564
Saloni-eGov Feb 14, 2024
0660b5d
Merge pull request #731 from egovernments/PFM-5564
pradeepkumarcm-egov Feb 14, 2024
fbdcdf7
PFM-5671
Saloni-eGov Feb 19, 2024
dcb27c2
PFM-5671
Saloni-eGov Feb 19, 2024
79e982d
Merge pull request #732 from egovernments/PFM-5671
pradeepkumarcm-egov Feb 21, 2024
007b764
mdms v2 and location changes
rahuldevgarg Feb 21, 2024
3d63324
made lat and long dynamic in tenants.dart
rahuldevgarg Feb 21, 2024
0fde276
Merge pull request #734 from egovernments/tenant_dynamic_lat_long
pradeepkumarcm-egov Feb 21, 2024
6365201
PFM-5655: Chnaged the logic to check buildingType with propertyType r…
Feb 22, 2024
18bdefc
Merge pull request #737 from egovernments/PFM-5655-fix
pradeepkumarcm-egov Feb 22, 2024
45822c3
PFM-5064 Restrict to show path two months only
rahuldevgarg Mar 5, 2024
7f6db5b
PFM-5064 fix daysToSub
rahuldevgarg Mar 5, 2024
afd1d20
PFM-5064 fix daysToSubtract
rahuldevgarg Mar 5, 2024
a893b59
Merge remote-tracking branch 'origin/develop' into develop
rahuldevgarg Mar 5, 2024
d1de16c
Update build-config.yml
debasishchakraborty-egovt Mar 6, 2024
ed7239b
Merge pull request #742 from egovernments/debasishchakraborty-egovt-p…
pradeepkumarcm-egov Mar 6, 2024
3ca6518
PFM-5564
Saloni-eGov Mar 7, 2024
f046b45
PFM-5564
Saloni-eGov Mar 7, 2024
fdd4ec9
Merge pull request #743 from egovernments/PFM-5564
pradeepkumarcm-egov Mar 7, 2024
9fdf83c
Merge remote-tracking branch 'origin/develop' into develop
rahuldevgarg Mar 7, 2024
18293e9
Thermal Printer Advance Fix
rahuldevgarg Mar 11, 2024
36dc83a
reverted mdms V2
rahuldevgarg Mar 11, 2024
3540e03
PFM-5692
rahuldevgarg Mar 12, 2024
0199429
revert PFM-5692
rahuldevgarg Mar 12, 2024
d75aa6f
PFM-5692 changes url shorting endpoint
rahuldevgarg Mar 12, 2024
1ecd146
Merge pull request #749 from egovernments/PFM-5692
pradeepkumarcm-egov Mar 12, 2024
6698791
Merge branch 'master' into develop
rahuldevgarg Mar 13, 2024
26372ee
PFM-5064 fix daysToSubtract
rahuldevgarg Apr 7, 2024
4a9022a
PFM-5064 fix daysToSubtract
rahuldevgarg Apr 7, 2024
c930a71
Merge remote-tracking branch 'origin/develop' into develop
rahuldevgarg Apr 7, 2024
e5506d5
PFM-5064 fix daysToSubtract
rahuldevgarg Mar 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/mgramseva/lib/model/mdms/tenants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ class City {
@JsonKey(name: "ulbGrade")
String? ulbGrade;
@JsonKey(name: "longitude")
double? longitude;
dynamic? longitude;
@JsonKey(name: "latitude")
double? latitude;
dynamic? latitude;
gargrahuldev marked this conversation as resolved.
Show resolved Hide resolved
@JsonKey(name: "code")
String? code;
@JsonKey(name: "ddrName")
Expand Down
4 changes: 2 additions & 2 deletions frontend/mgramseva/lib/model/mdms/tenants.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 59 additions & 2 deletions frontend/mgramseva/lib/providers/consumer_details_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,35 @@ class ConsumerProvider with ChangeNotifier {
"tenantId": commonProvider.userDetails!.selectedtenant!.code
});
boundaryList = [];
boundaryList.addAll(
TenantBoundary.fromJson(result['TenantBoundary'][0]).boundary!);
result['TenantBoundary']!=null && result['TenantBoundary'].length>0?boundaryList.addAll(
TenantBoundary.fromJson(result['TenantBoundary'][0]).boundary!):{};
if (boundaryList.length == 1) {
property.address.localityCtrl = boundaryList.first;
onChangeOfLocality(property.address.localityCtrl);
}else{
boundaryList.add(Boundary.fromJson({
"code": "WARD1",
"name": commonProvider.userDetails!.selectedtenant!.name,
"label": "Locality",
"latitude": null,
"longitude": null,
"area": null,
"pincode": null,
"boundaryNum": 1,
"children": []
}));
property.address.localityCtrl = Locality.fromJson({
"code": "WARD1",
"name": commonProvider.userDetails!.selectedtenant!.name,
"label": "Locality",
"latitude": null,
"longitude": null,
"area": null,
"pincode": null,
"boundaryNum": 1,
"children": []
});
onChangeOfLocality(property.address.localityCtrl);
gargrahuldev marked this conversation as resolved.
Show resolved Hide resolved
}
// notifyListeners();
} catch (e) {
gargrahuldev marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -625,6 +649,39 @@ class ConsumerProvider with ChangeNotifier {
}
return <Map<String,dynamic>>[];
}
//Displaying Billing Cycle Vaule (EX- JAN-2021,,)
List<Map<String,dynamic>> getBillingCycleMonthCountCurrent(TaxPeriod? billYear) {
var dates = <Map<String,dynamic>>[];
if (billYear!=null) {
DatePeriod ytd;
var fromDate = DateFormats.getFormattedDateToDateTime(
DateFormats.timeStampToDate(billYear?.fromDate)) as DateTime;

var toDate = DateFormats.getFormattedDateToDateTime(
DateFormats.timeStampToDate(billYear?.toDate)) as DateTime;

ytd = DatePeriod(fromDate,toDate,DateType.YTD);

/// Get months based on selected billing year
var months = CommonMethods.getPastMonthUntilFinancialYTDMonthCount(ytd);

/// if selected year is future year means all the months will be removed
if(fromDate.year > ytd.endDate.year) months.clear();

for (var i = 0; i < months.length; i++) {
var prevMonth = months[i].startDate;
var r = {"code": prevMonth, "name": '${ApplicationLocalizations.of(navigatorKey.currentContext!)
.translate((Constants.MONTHS[prevMonth.month - 1])) +
" - " +
prevMonth.year.toString()}'};
dates.add(r);
}
}
if (dates.length > 0 && waterconnection.connectionType == 'Non_Metered') {
return dates;
}
return <Map<String,dynamic>>[];
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The addition of getBillingCycleMonthCountCurrent method is a good approach to encapsulate the logic for calculating billing cycle months. However, consider the following points for improvement:

  • Code Clarity: The method involves complex date manipulations and conditions. Adding comments to explain the logic, especially around the calculation of months and the condition for clearing months, would improve readability and maintainability.
  • Error Handling: There's no explicit error handling for potential issues with date parsing or invalid billYear values. Consider adding checks or try-catch blocks to handle unexpected inputs gracefully.
  • Consistency: Ensure that the method's approach to handling dates and billing cycles is consistent with other parts of the application. Inconsistencies in date handling can lead to subtle bugs that are difficult to track down.

Enhance code clarity with comments explaining complex logic and consider adding error handling for more robustness. Ensure consistency in date handling across the application.


incrementIndex(index, consumerGenderKey) async {
if (boundaryList.length > 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class ExpensesDetailsProvider with ChangeNotifier {
if (boundaryList.length > 0) {
code = boundaryList.first.code;
} else {
code = commonProvider.userDetails?.selectedtenant?.city?.code;
code = "WARD1";
gargrahuldev marked this conversation as resolved.
Show resolved Hide resolved
}

var body = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@ class _ConsumerDetailsState extends State<ConsumerDetails> {
'',
consumerProvider
.onChangeOfBillYear,
consumerProvider
.getFinancialYearList(),
[consumerProvider
.getFinancialYearList().first],
true,
itemAsString: (i) =>'${ApplicationLocalizations.of(context).translate(i.financialYear)}',
controller: consumerProvider
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [92-94]

There's an issue in the dispose method where it adds the _numberFocus listener instead of removing it. This can lead to memory leaks and unintended behavior. The correct approach is to remove the listener when the widget is disposed of.

- _numberFocus.addListener(_onFocusChange);
+ _numberFocus.removeListener(_onFocusChange);

Expand All @@ -532,7 +532,8 @@ class _ConsumerDetailsState extends State<ConsumerDetails> {
consumerProvider
.onChangeBillingCycle,
consumerProvider
.getBillingCycle(),
.getBillingCycleMonthCountCurrent(consumerProvider
.billYear),
true,
itemAsString: (i) =>"${ApplicationLocalizations.of(context).translate(i['name'])}",
controller: consumerProvider
Expand Down
2 changes: 1 addition & 1 deletion frontend/mgramseva/lib/services/urls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Url {

static const String LOCALIZATION = 'localization/messages/v1/_search';

static const String MDMS = 'egov-mdms-service/v1/_search';
static const String MDMS = 'mdms-v2/v1/_search';
static const String FILE_UPLOAD = 'filestore/v1/files';
static const String FILE_FETCH = 'filestore/v1/files/url';
static const String URL_SHORTNER = 'egov-url-shortening/shortener';
Expand Down
112 changes: 110 additions & 2 deletions frontend/mgramseva/lib/utils/common_methods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,64 @@ class CommonMethods {
* [email protected]
*
* */

static var daysInMonthLeap = [
31,
29,
31,
30,
31,
30,
31,
31,
30,
31,
30,
31
];
gargrahuldev marked this conversation as resolved.
Show resolved Hide resolved
static var daysInMonth = [
31,
28,
31,
30,
31,
30,
31,
31,
30,
31,
30,
31
];
gargrahuldev marked this conversation as resolved.
Show resolved Hide resolved
static bool isLeapYear(int year) {
if (year % 4 == 0) {
if (year % 100 == 0) {
if (year % 400 == 0) {
return true;
} else {
return false;
}
} else {
return true;
}
} else {
return false;
}
}
static int daysToSubtract(int monthCount, int year,int currentMonth) {
int days = 0;
for (int i = 0; i < monthCount; i++) {
if (currentMonth - i < 0) {
days += isLeapYear(year - 1)
? daysInMonthLeap[12 - (currentMonth - i).abs()]
: daysInMonth[12 - (currentMonth - i).abs()];
} else {
days += isLeapYear(year)
? daysInMonthLeap[currentMonth - i]
: daysInMonth[currentMonth - i];
}
}
return days;
}
static List<DatePeriod> getPastMonthUntilFinancialYTD(DatePeriod ytd,
{bool showCurrentMonth = false}) {
var monthList = <DateTime>[];
Expand Down Expand Up @@ -109,7 +166,58 @@ class CommonMethods {
.toList();
return list;
}

static List<DatePeriod> getPastMonthUntilFinancialYTDMonthCount(DatePeriod ytd,
{int monthCount=2,bool showCurrentMonth = false}) {
var monthList = <DateTime>[];
final currentTime = DateTime.now();
DatePeriod newDT = DatePeriod(ytd.endDate.subtract(Duration(days: daysToSubtract(monthCount,currentTime.year,currentTime.month))), ytd.endDate, DateType.MONTH);
if (currentTime.year < newDT.startDate.year) {
return <DatePeriod>[];
}
if (currentTime.year == newDT.startDate.year) {
//when current year is same as start year of financial year
for (int i = newDT.startDate.month;
i <= (showCurrentMonth ? currentTime.month : currentTime.month - 1);
i++) {
monthList.add(DateTime(currentTime.year, i));
}
} else if (currentTime.year == newDT.endDate.year) {
//when current year is same as end year of financial year
for (int i = newDT.startDate.month; i <= 12; i++) {
monthList.add(DateTime(newDT.startDate.year, i));
}
for (int i = 1;
i <=
(currentTime.month <= newDT.endDate.month
? showCurrentMonth
? currentTime.month
: currentTime.month - 1
: newDT.endDate.month);
/*
* if current month is less than or equal to end month of financial year
* we are using months less than current month and if it is more than
* end month of financial year we are using till end month of financial
* year
*/
i++) {
monthList.add(DateTime(newDT.endDate.year, i));
}
} else {
for (int i = newDT.startDate.month; i <= 12; i++) {
monthList.add(DateTime(newDT.startDate.year, i));
}
for (int i = 1; i <= newDT.endDate.month; i++) {
monthList.add(DateTime(newDT.endDate.year, i));
}
}
var list = monthList
.map((e) => DatePeriod(DateTime(e.year, e.month, 1),
DateTime(e.year, e.month + 1, 0, 23, 59, 59, 999), DateType.MONTH))
.toList()
.reversed
.toList();
return list;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The getPastMonthUntilFinancialYTDMonthCount method correctly calculates the list of DatePeriod objects for months considering a specific month count. Consider adding comments to explain the logic, especially for complex parts, to improve maintainability.

}
static List<DatePeriod> getPastMonthIncludingCurrentMonthUntilFinancialYTD(
DatePeriod ytd) {
var monthList = <DateTime>[];
Expand Down
2 changes: 1 addition & 1 deletion frontend/mgramseva/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "mgramseva",
"version": "1.2.20",
"version": "1.2.21",
"license": "egov"
}
2 changes: 1 addition & 1 deletion frontend/mgramseva/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

version: 1.2.20+36
version: 1.2.21+37

environment:
sdk: ">=2.12.0 <4.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class BoundaryService {
*/
public void getAreaType(Property property, RequestInfo requestInfo, String hierarchyTypeCode) {

//EnrichmentService 202 line was calling this method previously
if (ObjectUtils.isEmpty(property))
return;
String tenantId = property.getTenantId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public PropertyCriteria getPropertyCriteriaFromPropertyIds(List<Property> proper
*/
public void enrichBoundary(Property property, RequestInfo requestInfo){

boundaryService.getAreaType(property, requestInfo, PTConstants.BOUNDARY_HEIRARCHY_CODE);
// boundaryService.getAreaType(property, requestInfo, PTConstants.BOUNDARY_HEIRARCHY_CODE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in MDMS V2 we are not using location-service to get location

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public BoundaryService(ServiceRequestRepository serviceRequestRepository, Object
}

public void getAreaType(VendorRequest request, String hierarchyTypeCode) {
//EnrichmentService 102 , VendorValidator 113 line was calling this method
if (request.getVendor() == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void enrichVendorSearch(List<Vendor> vendorList, RequestInfo requestInfo,

addDrivers(requestInfo, vendor, tenantId);
addVehicles(requestInfo, vendor, tenantId);
boundaryService.getAreaType(VendorRequest.builder().vendor(vendor).build(), config.getHierarchyTypeCode());
// boundaryService.getAreaType(VendorRequest.builder().vendor(vendor).build(), config.getHierarchyTypeCode());
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void validateCreate(VendorRequest vendorRequest) {
RequestInfo requestInfo = vendorRequest.getRequestInfo();
Vendor vendor = vendorRequest.getVendor();

boundaryService.getAreaType(vendorRequest, config.getHierarchyTypeCode());
// boundaryService.getAreaType(vendorRequest, config.getHierarchyTypeCode());
vehicleService.manageVehicle(vendorRequest);
ownerService.manageOwner(vendorRequest);
ownerService.manageDrivers(vendorRequest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,10 @@ private List<Demand> createDemand(RequestInfo requestInfo, List<Calculation> cal
//sendPaymentAndBillSMSNotification(requestInfo,tenantId,owner,waterConnectionRequest,property,demandDetails,consumerCode,demands,isForConnectionNO,businessService,billCycle,billNumbers,paymentDueDate);
}
}
sendDownloadBillSMSNotification(requestInfo,tenantId,owner,waterConnectionRequest,property,demandDetails,consumerCode,demands,isForConnectionNO,businessService,billCycle,billNumbers,paymentDueDate);
BigDecimal totalAmount=fetchTotalBillAmount(demands,requestInfo);
//log.info("Total Amount from fetch Bill"+String.valueOf(totalAmount));
if(totalAmount!=null && totalAmount.signum()> 0)
sendDownloadBillSMSNotification(requestInfo,tenantId,owner,waterConnectionRequest,property,demandDetails,consumerCode,demands,isForConnectionNO,businessService,billCycle,billNumbers,paymentDueDate,totalAmount);
}
}
log.info("Demand Object" + demands.toString());
Expand Down Expand Up @@ -348,7 +351,7 @@ private void sendPaymentSMSNotification(RequestInfo requestInfo, String tenantId
}
}
}
private void sendDownloadBillSMSNotification(RequestInfo requestInfo, String tenantId, User owner, WaterConnectionRequest waterConnectionRequest, Property property, List<DemandDetail> demandDetails, String consumerCode, List<Demand> demands, Boolean isForConnectionNO, String businessService, String billCycle,List<String> billNumbers, String paymentDueDate) {
private void sendDownloadBillSMSNotification(RequestInfo requestInfo, String tenantId, User owner, WaterConnectionRequest waterConnectionRequest, Property property, List<DemandDetail> demandDetails, String consumerCode, List<Demand> demands, Boolean isForConnectionNO, String businessService, String billCycle,List<String> billNumbers, String paymentDueDate,BigDecimal totalamount) {
HashMap<String, String> localizationMessage = util.getLocalizationMessage(requestInfo,
WSCalculationConstant.mGram_Consumer_NewBill, tenantId);
String actionLink = config.getNotificationUrl()
Expand All @@ -364,22 +367,21 @@ private void sendDownloadBillSMSNotification(RequestInfo requestInfo, String ten
}
String messageString = localizationMessage.get(WSCalculationConstant.MSG_KEY);

System.out.println("Localization message get bill::" + messageString);
System.out.println("isForConnectionNO:" + isForConnectionNO);
//System.out.println("Localization message get bill::" + messageString);
//System.out.println("isForConnectionNO:" + isForConnectionNO);
if (!StringUtils.isEmpty(messageString) && isForConnectionNO) {
log.info("Demand Object get bill" + demands.toString());
log.info("requestInfo get Bill" + requestInfo);
log.info("bill number get bill size :" + billNumbers.size());
if (billNumbers.size() > 0) {
if (totalamount!=null && billNumbers.size() > 0 && totalamount.signum()>0) {
actionLink = actionLink.replace("$billNumber", billNumbers.get(0));
messageString = messageString.replace("{ownername}", owner.getName());
messageString = messageString.replace("{Period}", billCycle);
messageString = messageString.replace("{consumerno}", consumerCode);
messageString = messageString.replace("{billamount}", demandDetails.stream()
.map(DemandDetail::getTaxAmount).reduce(BigDecimal.ZERO, BigDecimal::add).toString());
messageString = messageString.replace("{billamount}", totalamount.toString());
messageString = messageString.replace("{BILL_LINK}", getShortenedUrl(actionLink));

System.out.println("Demand genaration Message get bill::" + messageString);
// System.out.println("Demand genaration Message get bill::" + messageString);

SMSRequest sms = SMSRequest.builder().mobileNumber(owner.getMobileNumber()).message(messageString).tenantid(tenantId)
.category(Category.TRANSACTION).build();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [354-384]

The method sendDownloadBillSMSNotification has been updated to include a new parameter totalamount, which is used to conditionally send SMS notifications based on the bill amount. This is a logical improvement for user experience, ensuring that notifications are meaningful. However, ensure that:

  1. The totalamount parameter is accurately calculated and represents the total bill amount correctly.
  2. The method's documentation is updated to reflect the new parameter and its usage.
  3. Any upstream method calls to sendDownloadBillSMSNotification are updated to pass the totalamount parameter.

Additionally, consider handling potential exceptions or errors that might occur during the SMS sending process to ensure the application's robustness.

// Suggestion to handle potential exceptions in SMS sending logic
try {
    // Existing logic to send SMS
} catch (Exception e) {
    log.error("Error sending SMS notification", e);
    // Handle exception appropriately
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,9 @@ private List<BillingSlab> getSlabsFiltered(WaterConnection waterConnection, List
WaterConnectionRequest.builder().waterConnection(waterConnection).requestInfo(requestInfo).build());
// get billing Slab
log.debug(" the slabs count : " + billingSlabs.size());
final String buildingType = (property.getUsageCategory() != null) ? property.getUsageCategory().split("\\.")[0]
: "";
//final String buildingType = (property.getUsageCategory() != null) ? property.getUsageCategory().split("\\.")[0]: "";
//TODO:FIX ME : here before we passing buildingtype as UsageCategory from proerty response . but while creating property usagecategoty is residentialeven when we are creating commercial connection. Hennce we have change this to proertytype
debasishchakraborty-egovt marked this conversation as resolved.
Show resolved Hide resolved
final String buildingType = (property.getPropertyType() != null) ? property.getPropertyType().split("\\.")[0]: "";
// final String buildingType = "Domestic";
final String connectionType = waterConnection.getConnectionType();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ spring.kafka.consumer.group-id=egov-ws-calc-services
spring.kafka.consumer.properties.spring.json.use.type.headers=false
spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer=org.springframework.kafka.support.serializer.JsonSerializer
spring.kafka.consumer.properties.max.poll.interval.ms=600000

$KAFKA TOPIC DETAILS
egov.watercalculatorservice.createdemand.topic=ws-generate-demand
Expand Down
Loading