| Line 4... |
Line 4... |
| 4 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
4 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 5 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
5 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
| 6 |
import com.spice.profitmandi.common.model.SendNotificationModel;
|
6 |
import com.spice.profitmandi.common.model.SendNotificationModel;
|
| 7 |
import com.spice.profitmandi.common.util.Utils;
|
7 |
import com.spice.profitmandi.common.util.Utils;
|
| 8 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
8 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
| - |
|
9 |
import com.spice.profitmandi.service.mail.MailOutboxService;
|
| 9 |
import com.spice.profitmandi.dao.entity.dtr.CreditAccount;
|
10 |
import com.spice.profitmandi.dao.entity.dtr.CreditAccount;
|
| 10 |
import com.spice.profitmandi.dao.entity.dtr.CreditStatus;
|
11 |
import com.spice.profitmandi.dao.entity.dtr.CreditStatus;
|
| 11 |
import com.spice.profitmandi.dao.entity.fofo.CurrentPartnerDailyInvestment;
|
12 |
import com.spice.profitmandi.dao.entity.fofo.CurrentPartnerDailyInvestment;
|
| 12 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
13 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
| 13 |
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
|
14 |
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
|
| Line 124... |
Line 125... |
| 124 |
|
125 |
|
| 125 |
@Autowired
|
126 |
@Autowired
|
| 126 |
private JavaMailSender mailSender;
|
127 |
private JavaMailSender mailSender;
|
| 127 |
|
128 |
|
| 128 |
@Autowired
|
129 |
@Autowired
|
| - |
|
130 |
private MailOutboxService mailOutboxService;
|
| - |
|
131 |
|
| - |
|
132 |
@Autowired
|
| 129 |
private MVCResponseSender mvcResponseSender;
|
133 |
private MVCResponseSender mvcResponseSender;
|
| 130 |
|
134 |
|
| 131 |
@Autowired
|
135 |
@Autowired
|
| 132 |
private FofoOrderItemRepository fofoOrderItemRepository;
|
136 |
private FofoOrderItemRepository fofoOrderItemRepository;
|
| 133 |
|
137 |
|
| Line 834... |
Line 838... |
| 834 |
String subject = "Dispatched " + (orders.get(0).getRetailerName());
|
838 |
String subject = "Dispatched " + (orders.get(0).getRetailerName());
|
| 835 |
String message = String.format("Dear Team, \n" + "Kindly note the meterial for the " + orders.get(0).getRetailerName() + "of Rs." + totalAmount + " is dispatched.");
|
839 |
String message = String.format("Dear Team, \n" + "Kindly note the meterial for the " + orders.get(0).getRetailerName() + "of Rs." + totalAmount + " is dispatched.");
|
| 836 |
|
840 |
|
| 837 |
LOGGER.info("message" + message);
|
841 |
LOGGER.info("message" + message);
|
| 838 |
|
842 |
|
| 839 |
Utils.sendMailWithAttachments(mailSender, emailTo, ccTo, subject, message);
|
843 |
mailOutboxService.queueMail(emailTo, ccTo, subject, message, "SDCreditController.unholdOrder");
|
| 840 |
} catch (Exception e) {
|
844 |
} catch (Exception e) {
|
| 841 |
|
845 |
|
| 842 |
e.printStackTrace();
|
846 |
e.printStackTrace();
|
| 843 |
|
847 |
|
| 844 |
}
|
848 |
}
|
| Line 896... |
Line 900... |
| 896 |
|
900 |
|
| 897 |
String[] ccTo = {"tarun.verma@smartdukaan.com", "kamini.sharma@smartdukaan.com"};
|
901 |
String[] ccTo = {"tarun.verma@smartdukaan.com", "kamini.sharma@smartdukaan.com"};
|
| 898 |
|
902 |
|
| 899 |
String subject = "Dispatch held orders of - " + (orders.get(0).getRetailerName());
|
903 |
String subject = "Dispatch held orders of - " + (orders.get(0).getRetailerName());
|
| 900 |
String message = String.format("Dear Team, \n" + "kindly note the material for the " + orders.get(0).getRetailerName() + "of Rs." + totalAmount + "is unhold now and needs to be dispatched.");
|
904 |
String message = String.format("Dear Team, \n" + "kindly note the material for the " + orders.get(0).getRetailerName() + "of Rs." + totalAmount + "is unhold now and needs to be dispatched.");
|
| 901 |
Utils.sendMailWithAttachments(mailSender, emailTo, ccTo, subject, message);
|
905 |
mailOutboxService.queueMail(emailTo, ccTo, subject, message, "SDCreditController.sendUnholdEmail");
|
| 902 |
}
|
906 |
}
|
| 903 |
|
907 |
|
| 904 |
|
908 |
|
| 905 |
}
|
909 |
}
|
| 906 |
|
910 |
|