CEI notification body added.

master-Api2.0
Sikander Saleem 10 months ago
parent e20d6eca3f
commit 9362859013

@ -143,7 +143,7 @@ class MyAttendanceApiClient {
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.submitEITTransactionList!; //ESERVICESDV.fromJson(responseData.getDefaultValueList!.toJson());
return responseData.submitCEITransactionList!; //ESERVICESDV.fromJson(responseData.getDefaultValueList!.toJson());
}, url, postParams);
}

@ -534,6 +534,20 @@ class WorkListApiClient {
}, url, postParams);
}
Future<List<GetEitCollectionNotificationBodyList>?> GetCeiNotificationBody(int? notificationId) async {
String url = "${ApiConsts.erpRest}GET_CEI_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": notificationId,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getCEICollectionNotificationBodyList;
}, url, postParams);
}
Future<List<GetPhonesNotificationBodyList>?> getPhonesNotificationBodyList(int? notificationId) async {
String url = "${ApiConsts.erpRest}GET_PHONES_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {

@ -184,7 +184,7 @@ class GenericResponseModel {
List<GetBasicDetColsStructureList>? getBasicDetColsStructureList;
List<GetBasicDetDffStructureList>? getBasicDetDffStructureList;
List<GetBasicDetNtfBodyList>? getBasicDetNtfBodyList;
List<String>? getCEICollectionNotificationBodyList;
List<GetEitCollectionNotificationBodyList>? getCEICollectionNotificationBodyList;
List<GetEITDFFStructureList>? getCEIDFFStructureList;
List<GetCEITransactionList>? getCEITransactionList;
List<String>? getCcpTransactionsList;
@ -356,7 +356,7 @@ class GenericResponseModel {
StartTermApprovalProcessList? startTermApprovalProcessList;
SubmitAddressTransaction? submitAddressTransactionList;
SubmitBasicDetailsTransactionList? submitBasicDetTransactionList;
String? submitCEITransactionList;
SubmitEITTransactionList? submitCEITransactionList;
SubmitCcpTransactionList? submitCcpTransactionList;
SubmitContactTransactionList? submitContactTransactionList;
SubmitEITTransactionList? submitEITTransactionList;
@ -845,7 +845,9 @@ class GenericResponseModel {
});
}
getCEICollectionNotificationBodyList = json['GetCEICollectionNotificationBodyList'];
getCEICollectionNotificationBodyList = json["GetCEICollectionNotificationBodyList"] == null
? null
: List<GetEitCollectionNotificationBodyList>.from(json["GetCEICollectionNotificationBodyList"].map((x) => GetEitCollectionNotificationBodyList.fromJson(x)));
if (json['GetCEIDFFStructureList'] != null) {
getCEIDFFStructureList = <GetEITDFFStructureList>[];
@ -1378,7 +1380,7 @@ class GenericResponseModel {
submitAddressTransactionList = json['SubmitAddressTransactionList'] != null ? SubmitAddressTransaction.fromJson(json['SubmitAddressTransactionList']) : null;
submitBasicDetTransactionList = json['SubmitBasicDetTransactionList'] != null ? SubmitBasicDetailsTransactionList.fromJson(json['SubmitBasicDetTransactionList']) : null;
submitCEITransactionList = json['SubmitCEITransactionList'];
submitCEITransactionList = json['SubmitCEITransactionList'] != null ? SubmitEITTransactionList.fromJson(json['SubmitCEITransactionList']) : null;
submitCcpTransactionList = json['SubmitCcpTransactionList'] != null ? new SubmitCcpTransactionList.fromJson(json['SubmitCcpTransactionList']) : null;
submitContactTransactionList = json['SubmitContactTransactionList'] != null ? SubmitContactTransactionList.fromJson(json['SubmitContactTransactionList']) : null;
submitEITTransactionList = json['SubmitEITTransactionList'] != null ? SubmitEITTransactionList.fromJson(json['SubmitEITTransactionList']) : null;
@ -1553,10 +1555,8 @@ class GenericResponseModel {
if (this.getBasicDetNtfBodyList != null) {
data['GetBasicDetNtfBodyList'] = this.getBasicDetNtfBodyList!.map((v) => v.toJson()).toList();
}
data['GetCEICollectionNotificationBodyList'] = this.getCEICollectionNotificationBodyList;
if (this.getCEIDFFStructureList != null) {
data['GetCEIDFFStructureList'] = this.getCEIDFFStructureList!.map((v) => v.toJson()).toList();
}
@ -1855,6 +1855,10 @@ class GenericResponseModel {
}
data['SubmitCEITransactionList'] = this.submitCEITransactionList;
if (this.submitCEITransactionList != null) {
data['SubmitCEITransactionList'] = this.submitCEITransactionList!.toJson();
}
if (this.submitCcpTransactionList != null) {
data['SubmitCcpTransactionList'] = this.submitCcpTransactionList!.toJson();
}

@ -142,7 +142,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (workListData!.iTEMTYPE == "HRSSA") {
if (workListData!.rEQUESTTYPE == "EIT") {
getEitNotificationBody();
} else if (workListData!.rEQUESTTYPE == "PHONE_NUMBERS") {
} else if (workListData!.rEQUESTTYPE == "CEI") {
getCEINotificationBody();
}else if (workListData!.rEQUESTTYPE == "PHONE_NUMBERS") {
getPhonesNotificationBody();
} else if (workListData!.rEQUESTTYPE == "BASIC_DETAILS") {
getBasicDetNtfBody();
@ -760,6 +762,24 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
}
}
void getCEINotificationBody() async {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getEitCollectionNotificationBodyList!.clear();
getEitCollectionNotificationBodyList = await WorkListApiClient().GetCeiNotificationBody(workListData!.nOTIFICATIONID);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
setState(() {});
}
} catch (ex) {
apiCallCount--;
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
void getEitNotificationBody() async {
try {
if (apiCallCount == 0) Utils.showLoading(context);

Loading…
Cancel
Save