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 61 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
5 changes: 5 additions & 0 deletions build/build-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,8 @@ config:
dockerfile: "build/maven/Dockerfile"
- work-dir: "business-services/egov-apportion-service/src/main/resources/db"
image-name: "egov-apportion-service-db"
- name: "builds/mGramSeva/utilities/egov-penalty-schedular"
build:
- work-dir: "utilities/egov-penalty-schedular"
image-name: "egov-penalty-schedular"
dockerfile: "build/maven/Dockerfile"
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ class ConsumerBillPaymentsState extends State<ConsumerBillPayments> {
.toString()) +
' only')),
getPrinterLabel(
i18.consumerReciepts.CONSUMER_PENDING_AMOUNT,
(item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)>0?i18.consumerReciepts.CONSUMER_PENDING_AMOUNT:i18.common.CORE_ADVANCE,
('₹' +
((item.totalDue ?? 0) - (item.totalAmountPaid ?? 0))
((item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)).abs()
.toString())),
SizedBox(
height: 8,
Expand Down
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.

Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,9 @@ class CollectPaymentProvider with ChangeNotifier {
.toString()) +
' only')),
getPrinterLabel(
i18.consumerReciepts.CONSUMER_PENDING_AMOUNT,
(item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)>0?i18.consumerReciepts.CONSUMER_PENDING_AMOUNT:i18.common.CORE_ADVANCE,
('₹' +
((item.totalDue ?? 0) - (item.totalAmountPaid ?? 0))
((item.totalDue ?? 0) - (item.totalAmountPaid ?? 0)).abs()
.toString())),
SizedBox(
height: 8,
Expand Down
74 changes: 71 additions & 3 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.getPastMonthUntilFinancialYTD(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>>[];
}

incrementIndex(index, consumerGenderKey) async {
if (boundaryList.length > 1) {
Expand Down Expand Up @@ -667,7 +724,18 @@ class ConsumerProvider with ChangeNotifier {
}
return <TaxPeriod>[];
}

List<TaxPeriod> getLastFinancialYearList(int count) {
return getFinancialYearList().length>count?getFinancialYearList().sublist(0,count):getFinancialYearList();
}
List<Map<String,dynamic>> newBillingCycleFunction({int pastMonthCount = 2}){
List<TaxPeriod> financialYears = getFinancialYearList();
var dates = <Map<String,dynamic>>[];
financialYears.forEach((year) {
dates.addAll(getBillingCycleMonthCountCurrent(year));
});
dates.sort((a, b) => b['code'].compareTo(a['code']));
return dates.toList().length>2?dates.toList().sublist(0,2):dates.toList();
}
void onChangeOfAmountType(value) {
waterconnection.paymentType = value;

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 @@ -438,7 +438,7 @@ class _ConsumerDetailsState extends State<ConsumerDetails> {
.waterconnection
.previousReadingDateCtrl,
firstDate:
DateTime.fromMillisecondsSinceEpoch(consumerProvider.languageList?.mdmsRes?.billingService?.taxPeriodList!.first.fromDate??0),
DateTime.fromMillisecondsSinceEpoch(consumerProvider.getLastFinancialYearList(2).reversed.first.fromDate??0),
lastDate:
DateTime.now(),
onChangeOfDate:
Expand Down Expand Up @@ -503,25 +503,25 @@ class _ConsumerDetailsState extends State<ConsumerDetails> {
false
? Wrap(
children: [
SelectFieldBuilder(
i18.demandGenerate
.BILLING_YEAR_LABEL,
consumerProvider
.billYear,
'',
'',
consumerProvider
.onChangeOfBillYear,
consumerProvider
.getFinancialYearList(),
true,
itemAsString: (i) =>'${ApplicationLocalizations.of(context).translate(i.financialYear)}',
controller: consumerProvider
.waterconnection
.billingCycleYearCtrl,
key: Keys.bulkDemand
.BULK_DEMAND_BILLING_YEAR,
),
// SelectFieldBuilder(
// i18.demandGenerate
// .BILLING_YEAR_LABEL,
// consumerProvider
// .billYear,
// '',
// '',
// consumerProvider
// .onChangeOfBillYear,
// consumerProvider
// .getFinancialYearList(),
// true,
// itemAsString: (i) =>'${ApplicationLocalizations.of(context).translate(i.financialYear)}',
// controller: consumerProvider
// .waterconnection
// .billingCycleYearCtrl,
// key: Keys.bulkDemand
// .BULK_DEMAND_BILLING_YEAR,
// ),
SelectFieldBuilder(
i18.consumer
.CONSUMER_BILLING_CYCLE,
Expand All @@ -532,7 +532,7 @@ class _ConsumerDetailsState extends State<ConsumerDetails> {
consumerProvider
.onChangeBillingCycle,
consumerProvider
.getBillingCycle(),
.newBillingCycleFunction(),
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 @@ -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
60 changes: 58 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,6 @@ class CommonMethods {
.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
Loading
Loading