Subversion Repositories SmartDukaan

Rev

Rev 35726 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35726 Rev 35957
Line 8... Line 8...
8
import com.spice.profitmandi.common.util.ExcelUtils;
8
import com.spice.profitmandi.common.util.ExcelUtils;
9
import com.spice.profitmandi.common.util.PdfUtils;
9
import com.spice.profitmandi.common.util.PdfUtils;
10
import com.spice.profitmandi.common.util.Utils;
10
import com.spice.profitmandi.common.util.Utils;
11
import com.spice.profitmandi.common.util.Utils.Attachment;
11
import com.spice.profitmandi.common.util.Utils.Attachment;
12
import com.spice.profitmandi.common.web.client.RestClient;
12
import com.spice.profitmandi.common.web.client.RestClient;
-
 
13
import com.spice.profitmandi.service.mail.MailOutboxService;
13
import com.spice.profitmandi.dao.entity.auth.AuthUser;
14
import com.spice.profitmandi.dao.entity.auth.AuthUser;
14
import com.spice.profitmandi.dao.entity.catalog.*;
15
import com.spice.profitmandi.dao.entity.catalog.*;
15
import com.spice.profitmandi.dao.entity.cs.Position;
16
import com.spice.profitmandi.dao.entity.cs.Position;
16
import com.spice.profitmandi.dao.entity.dtr.WebOffer;
17
import com.spice.profitmandi.dao.entity.dtr.WebOffer;
17
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
18
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
Line 182... Line 183...
182
 
183
 
183
    @Autowired
184
    @Autowired
184
    JavaMailSender mailSender;
185
    JavaMailSender mailSender;
185
 
186
 
186
    @Autowired
187
    @Autowired
-
 
188
    MailOutboxService mailOutboxService;
-
 
189
 
-
 
190
    @Autowired
187
    private NotifyCancelOrderRepository notifyCancelOrderRepository;
191
    private NotifyCancelOrderRepository notifyCancelOrderRepository;
188
 
192
 
189
    @Autowired
193
    @Autowired
190
    private WarehousePurchaseOrderRepository warehousePurchaseOrderRepository;
194
    private WarehousePurchaseOrderRepository warehousePurchaseOrderRepository;
191
 
195
 
Line 587... Line 591...
587
                }
591
                }
588
            }
592
            }
589
            attachments.add(new Attachment("invoice-" + serialNumber + ".pdf", new ByteArrayResource(bytes)));
593
            attachments.add(new Attachment("invoice-" + serialNumber + ".pdf", new ByteArrayResource(bytes)));
590
        }
594
        }
591
 
595
 
592
        Utils.sendMailWithAttachments(mailSender, new String[]{"kuldeep.kumar@smartdukaan.com"}, null, "Invoices List", "PFA", attachments.toArray(new Attachment[attachments.size()]));
596
        mailOutboxService.queueMailWithAttachments(new String[]{"kuldeep.kumar@smartdukaan.com"}, null, "Invoices List", "PFA", "InventoryController.downloadInvoicesBulk", attachments.toArray(new Attachment[attachments.size()]));
593
        return new ResponseEntity<Boolean>(true, HttpStatus.OK);
597
        return new ResponseEntity<Boolean>(true, HttpStatus.OK);
594
    }
598
    }
595
 
599
 
596
    @RequestMapping(value = "/getInventoryItemAgingByInterval", method = RequestMethod.POST)
600
    @RequestMapping(value = "/getInventoryItemAgingByInterval", method = RequestMethod.POST)
597
    public String getInventoryItemAgingByInterval(HttpServletRequest request, @RequestBody List<Integer> intervals, Model model, @RequestParam(name = "searchContent", defaultValue = "") String searchContent, @RequestParam(name = "offset", defaultValue = "0") int offset, @RequestParam(name = "limit", defaultValue = "1000") int limit) throws ProfitMandiBusinessException {
601
    public String getInventoryItemAgingByInterval(HttpServletRequest request, @RequestBody List<Integer> intervals, Model model, @RequestParam(name = "searchContent", defaultValue = "") String searchContent, @RequestParam(name = "offset", defaultValue = "0") int offset, @RequestParam(name = "limit", defaultValue = "1000") int limit) throws ProfitMandiBusinessException {