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 all 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.

28 changes: 26 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
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
2 changes: 1 addition & 1 deletion frontend/mgramseva/lib/services/urls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Url {
static const String MDMS = 'egov-mdms-service/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';
static const String URL_SHORTNER = 'eus/shortener';
static const String FETCH_FILESTORE_ID_PDF_SERVICE = 'pdf-service/v1/_create';

/// Expenses
Expand Down
53 changes: 1 addition & 52 deletions frontend/mgramseva/lib/utils/common_methods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -166,58 +166,7 @@ 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;
}

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,31 @@ 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());
BigDecimal demandAmount= demandDetails.stream()
.map(DemandDetail::getTaxAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal arrears=totalamount.subtract(demandAmount);
if(arrears.compareTo(BigDecimal.ZERO)>0)
{
messageString = messageString.replace("{billamount}", totalamount.toString()+"(includes Rs."+ arrears.toString()+ " arrears)");
}
else
{
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();
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
Loading