Subversion Repositories SmartDukaan

Rev

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

Rev 37771 Rev 37848
Line 12... Line 12...
12
import com.spice.profitmandi.service.integrations.icicilombard.IciciLombardService;
12
import com.spice.profitmandi.service.integrations.icicilombard.IciciLombardService;
13
import com.spice.profitmandi.service.integrations.icicilombard.model.LastTransactionsResponseModel;
13
import com.spice.profitmandi.service.integrations.icicilombard.model.LastTransactionsResponseModel;
14
import org.apache.logging.log4j.LogManager;
14
import org.apache.logging.log4j.LogManager;
15
import org.apache.logging.log4j.Logger;
15
import org.apache.logging.log4j.Logger;
16
import org.springframework.beans.factory.annotation.Autowired;
16
import org.springframework.beans.factory.annotation.Autowired;
-
 
17
import org.springframework.beans.factory.annotation.Value;
-
 
18
import com.spice.profitmandi.service.warehouse.SuspendedWarehouseStockAlertService;
17
import org.springframework.scheduling.annotation.Scheduled;
19
import org.springframework.scheduling.annotation.Scheduled;
18
import org.springframework.stereotype.Component;
20
import org.springframework.stereotype.Component;
19
 
21
 
20
import java.time.LocalDate;
22
import java.time.LocalDate;
21
import java.time.LocalDateTime;
23
import java.time.LocalDateTime;
Line 846... Line 848...
846
    @Scheduled(cron = "0 0 0 * * *")
848
    @Scheduled(cron = "0 0 0 * * *")
847
    public void fetchOffersByItem() {
849
    public void fetchOffersByItem() {
848
        scheduledTasks.cachePinelabsOffers();
850
        scheduledTasks.cachePinelabsOffers();
849
    }
851
    }
850
 
852
 
-
 
853
    // Billing warehouse whose stock is listed on the Shopify store.
-
 
854
    @Value("${shopify.warehouseId:13372}")
-
 
855
    private int shopifyWarehouseId;
-
 
856
 
851
    @Scheduled(cron = "0 0 0 * * *")
857
    @Scheduled(cron = "0 0 0 * * *")
852
    public void syncProductsToShopify() throws Exception {
858
    public void syncProductsToShopify() throws Exception {
853
        scheduledTasks.syncProductsToShopifyByWarehouseId(ProfitMandiConstants.WAREHOUSE_NAME_MAP.get("UP-WEST/NOIDA"));
859
        scheduledTasks.syncProductsToShopifyByWarehouseId(shopifyWarehouseId);
854
    }
860
    }
855
 
861
 
856
    @Scheduled(cron = "0 0 6,18 * * *")
862
    @Scheduled(cron = "0 0 6,18 * * *")
857
    public void syncInventoryToShopify() throws Exception {
863
    public void syncInventoryToShopify() throws Exception {
858
        scheduledTasks.syncInventoryToShopifyByWarehouseId(ProfitMandiConstants.WAREHOUSE_NAME_MAP.get("UP-WEST/NOIDA"));
864
        scheduledTasks.syncInventoryToShopifyByWarehouseId(shopifyWarehouseId);
-
 
865
    }
-
 
866
 
-
 
867
    @Autowired
-
 
868
    private SuspendedWarehouseStockAlertService suspendedWarehouseStockAlertService;
-
 
869
 
-
 
870
    // Stock left in suspended or closed warehouses no longer shows on any dashboard.
-
 
871
    @Scheduled(cron = "0 0 10 * * *")
-
 
872
    public void sendSuspendedWarehouseStockAlert() throws Exception {
-
 
873
        suspendedWarehouseStockAlertService.sendAlert();
859
    }
874
    }
860
 
875
 
861
    @Autowired
876
    @Autowired
862
    private WarehouseStockReconciliation warehouseStockReconciliation;
877
    private WarehouseStockReconciliation warehouseStockReconciliation;
863
 
878