Subversion Repositories SmartDukaan

Rev

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

Rev 24174 Rev 24188
Line 7... Line 7...
7
 
7
 
8
import javax.mail.MessagingException;
8
import javax.mail.MessagingException;
9
 
9
 
10
import org.apache.logging.log4j.LogManager;
10
import org.apache.logging.log4j.LogManager;
11
import org.apache.logging.log4j.Logger;
11
import org.apache.logging.log4j.Logger;
-
 
12
import org.apache.poi.EncryptedDocumentException;
-
 
13
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
12
import org.springframework.beans.factory.annotation.Autowired;
14
import org.springframework.beans.factory.annotation.Autowired;
13
import org.springframework.scheduling.annotation.Scheduled;
15
import org.springframework.scheduling.annotation.Scheduled;
14
import org.springframework.stereotype.Component;
16
import org.springframework.stereotype.Component;
15
 
17
 
16
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
18
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
Line 26... Line 28...
26
	@Autowired
28
	@Autowired
27
	ScheduledTasks scheduledTasks;
29
	ScheduledTasks scheduledTasks;
28
 
30
 
29
	@Autowired
31
	@Autowired
30
	NagiosMonitorTasks nagiosMonitorTasks;
32
	NagiosMonitorTasks nagiosMonitorTasks;
31
	
33
 
32
	@Autowired
34
	@Autowired
33
	private FofoStoreRepository fofoStoreRepository;
35
	private FofoStoreRepository fofoStoreRepository;
34
 
36
 
35
	@Scheduled(cron = "0 15 0 * * *")
37
	@Scheduled(cron = "0 15 0 * * *")
36
	public void reconcileRecharge() throws Exception {
38
	public void reconcileRecharge() throws Exception {
Line 54... Line 56...
54
	}
56
	}
55
 
57
 
56
	@Scheduled(cron = " 0 0 23 ? * *")
58
	@Scheduled(cron = " 0 0 23 ? * *")
57
	public void sendMail() throws MessagingException, ProfitMandiBusinessException, IOException {
59
	public void sendMail() throws MessagingException, ProfitMandiBusinessException, IOException {
58
		log.info("sending mail");
60
		log.info("sending mail");
59
		
61
 
60
		List<SaleHeadDetails> saleHeadDetails=fofoStoreRepository.selectAllSalesHeadDetails();
62
		List<SaleHeadDetails> saleHeadDetails = fofoStoreRepository.selectAllSalesHeadDetails();
61
		for(SaleHeadDetails saleHeadDetail:saleHeadDetails)
63
		for (SaleHeadDetails saleHeadDetail : saleHeadDetails) {
62
		{
-
 
63
			scheduledTasks.sendMailToSalesHeadAboutTargetAndSales(saleHeadDetail);
64
			scheduledTasks.sendMailToSalesHeadAboutTargetAndSales(saleHeadDetail);
64
		}
65
		}
-
 
66
 
65
		
67
	}
-
 
68
 
-
 
69
	@Scheduled(cron = "0 30 23 ? * *")
-
 
70
	public void sendMailToPartner() throws MessagingException, ProfitMandiBusinessException, IOException,
-
 
71
			EncryptedDocumentException, InvalidFormatException {
-
 
72
		log.info("sending mail To Partner");
-
 
73
 
-
 
74
		scheduledTasks.sendMailToPartnerAboutTargetAndSales();
-
 
75
 
66
	}
76
	}
67
}
77
}