Subversion Repositories SmartDukaan

Rev

Rev 28709 | Rev 28769 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28709 Rev 28712
Line 1099... Line 1099...
1099
	public void checkPartnerActiveStore() throws Exception {
1099
	public void checkPartnerActiveStore() throws Exception {
1100
 
1100
 
1101
		List<FofoStore> fofoStores = fofoStoreRepository.selectByStatus(true);
1101
		List<FofoStore> fofoStores = fofoStoreRepository.selectByStatus(true);
1102
 
1102
 
1103
		LocalDateTime currentDate = LocalDate.now().atStartOfDay();
1103
		LocalDateTime currentDate = LocalDate.now().atStartOfDay();
-
 
1104
		if (!fofoStores.isEmpty()) {
-
 
1105
			for (FofoStore fofoStore : fofoStores) {
1104
 
1106
 
1105
		for (FofoStore fofoStore : fofoStores) {
1107
				if (currentDate.isBefore(fofoStore.getActiveTimeStamp())) {
1106
 
1108
 
-
 
1109
					fofoStore.setActive(true);
-
 
1110
					fofoStoreRepository.persist(fofoStore);
-
 
1111
					LOGGER.info("inserted into InActiveFofoStore successfully");
-
 
1112
 
-
 
1113
				}
-
 
1114
 
-
 
1115
				else {
-
 
1116
					fofoStore.setActive(false);
1107
			if (currentDate.isBefore(fofoStore.getActiveTimeStamp())) {
1117
					fofoStore.setActiveTimeStamp(null);
-
 
1118
					fofoStoreRepository.persist(fofoStore);
-
 
1119
					LOGGER.info("inserted into InActiveFofoStore successfully");
-
 
1120
				}
1108
 
1121
 
1109
				fofoStore.setActive(true);
-
 
1110
				fofoStoreRepository.persist(fofoStore);
-
 
1111
				LOGGER.info("inserted into InActiveFofoStore successfully");
-
 
1112
 
-
 
1113
			}
-
 
1114
 
-
 
1115
			else {
-
 
1116
				fofoStore.setActive(false);
-
 
1117
				fofoStore.setActiveTimeStamp(null);
-
 
1118
				fofoStoreRepository.persist(fofoStore);
-
 
1119
				LOGGER.info("inserted into InActiveFofoStore successfully");
-
 
1120
			}
1122
			}
1121
 
-
 
1122
		}
1123
		}
1123
 
1124
 
1124
	}
1125
	}
1125
 
1126
 
1126
	public void sendAgeingReport() throws Exception {
1127
	public void sendAgeingReport() throws Exception {