FINERACT-1087: Fixing date issues with bulk import templates
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
563d294938
commit
e06b3447b9
+2
-2
@@ -66,9 +66,9 @@ public abstract class AbstractWorkbookPopulator implements WorkbookPopulator {
|
|||||||
try {
|
try {
|
||||||
SimpleDateFormat formatinDB = null;
|
SimpleDateFormat formatinDB = null;
|
||||||
if (value.matches("\\d{4}-\\d{1,2}-\\d{1,2}")) {
|
if (value.matches("\\d{4}-\\d{1,2}-\\d{1,2}")) {
|
||||||
formatinDB = new SimpleDateFormat("yyyy-mm-dd");
|
formatinDB = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
} else if (value.matches("\\d{1,2}/\\d{1,2}/\\d{4}")) {
|
} else if (value.matches("\\d{1,2}/\\d{1,2}/\\d{4}")) {
|
||||||
formatinDB = new SimpleDateFormat("dd/mm/yyyy");
|
formatinDB = new SimpleDateFormat("dd/MM/yyyy");
|
||||||
} else if (value.matches("\\d{1,2} \\w{3,12} \\d{4}")) {
|
} else if (value.matches("\\d{1,2} \\w{3,12} \\d{4}")) {
|
||||||
formatinDB = new SimpleDateFormat("dd MMMM yyyy");
|
formatinDB = new SimpleDateFormat("dd MMMM yyyy");
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -478,12 +478,13 @@ public class BulkImportWorkbookPopulatorServiceImpl implements BulkImportWorkboo
|
|||||||
|
|
||||||
private List<SavingsAccountData> fetchSavingsAccounts(Long officeId) {
|
private List<SavingsAccountData> fetchSavingsAccounts(Long officeId) {
|
||||||
List<SavingsAccountData> savingsAccounts = null;
|
List<SavingsAccountData> savingsAccounts = null;
|
||||||
|
String activeAccounts = "sa.status_enum = 300";
|
||||||
if (officeId != null) {
|
if (officeId != null) {
|
||||||
String activeAccounts = "sa.status_enum = 300";
|
|
||||||
SearchParameters searchParameters = SearchParameters.from(activeAccounts, officeId, null, null, null);
|
SearchParameters searchParameters = SearchParameters.from(activeAccounts, officeId, null, null, null);
|
||||||
savingsAccounts = savingsAccountReadPlatformService.retrieveAll(searchParameters).getPageItems();
|
savingsAccounts = savingsAccountReadPlatformService.retrieveAll(searchParameters).getPageItems();
|
||||||
} else {
|
} else {
|
||||||
savingsAccounts = savingsAccountReadPlatformService.retrieveAll(null).getPageItems();
|
SearchParameters searchParameters = SearchParameters.from(activeAccounts, null, null, null, null);
|
||||||
|
savingsAccounts = savingsAccountReadPlatformService.retrieveAll(searchParameters).getPageItems();
|
||||||
}
|
}
|
||||||
return savingsAccounts;
|
return savingsAccounts;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user