Subversion Repositories SmartDukaan

Rev

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

Rev 33842 Rev 33859
Line 46... Line 46...
46
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
46
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
47
import com.spice.profitmandi.dao.enumuration.fofo.PaymentStatus;
47
import com.spice.profitmandi.dao.enumuration.fofo.PaymentStatus;
48
import com.spice.profitmandi.dao.enumuration.fofo.ReturnType;
48
import com.spice.profitmandi.dao.enumuration.fofo.ReturnType;
49
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
49
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
50
import com.spice.profitmandi.dao.enumuration.inventory.VendorCatalogPricingStatus;
50
import com.spice.profitmandi.dao.enumuration.inventory.VendorCatalogPricingStatus;
51
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
51
import com.spice.profitmandi.dao.enumuration.transaction.*;
52
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
-
 
53
import com.spice.profitmandi.dao.enumuration.transaction.PriceDropImeiStatus;
-
 
54
import com.spice.profitmandi.dao.enumuration.transaction.SchemePayoutStatus;
-
 
55
import com.spice.profitmandi.dao.model.*;
52
import com.spice.profitmandi.dao.model.*;
56
import com.spice.profitmandi.dao.repository.GenericRepository;
53
import com.spice.profitmandi.dao.repository.GenericRepository;
57
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
54
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
58
import com.spice.profitmandi.dao.repository.auth.NonSdBuyingRepository;
55
import com.spice.profitmandi.dao.repository.auth.NonSdBuyingRepository;
59
import com.spice.profitmandi.dao.repository.auth.PartnerCollectionRemarkRepository;
56
import com.spice.profitmandi.dao.repository.auth.PartnerCollectionRemarkRepository;
60
import com.spice.profitmandi.dao.repository.catalog.*;
57
import com.spice.profitmandi.dao.repository.catalog.*;
61
import com.spice.profitmandi.dao.repository.cs.CsService;
58
import com.spice.profitmandi.dao.repository.cs.*;
62
import com.spice.profitmandi.dao.repository.cs.PartnerRegionRepository;
-
 
63
import com.spice.profitmandi.dao.repository.cs.PositionRepository;
-
 
64
import com.spice.profitmandi.dao.repository.cs.TicketRepository;
-
 
65
import com.spice.profitmandi.dao.repository.dtr.*;
59
import com.spice.profitmandi.dao.repository.dtr.*;
66
import com.spice.profitmandi.dao.repository.fofo.*;
60
import com.spice.profitmandi.dao.repository.fofo.*;
67
import com.spice.profitmandi.dao.repository.inventory.*;
61
import com.spice.profitmandi.dao.repository.inventory.*;
68
import com.spice.profitmandi.dao.repository.logistics.WarehouseProviderRepository;
62
import com.spice.profitmandi.dao.repository.logistics.WarehouseProviderRepository;
69
import com.spice.profitmandi.dao.repository.transaction.*;
63
import com.spice.profitmandi.dao.repository.transaction.*;
70
import com.spice.profitmandi.dao.repository.user.AddressRepository;
64
import com.spice.profitmandi.dao.repository.user.AddressRepository;
-
 
65
import com.spice.profitmandi.dao.repository.user.LoiFormRepository;
71
import com.spice.profitmandi.dao.repository.user.UserRepository;
66
import com.spice.profitmandi.dao.repository.user.UserRepository;
72
import com.spice.profitmandi.dao.repository.warehouse.*;
67
import com.spice.profitmandi.dao.repository.warehouse.*;
73
import com.spice.profitmandi.dao.service.SidbiService;
68
import com.spice.profitmandi.dao.service.SidbiService;
74
import com.spice.profitmandi.dao.service.biuedart.BluedartAuthService;
69
import com.spice.profitmandi.dao.service.biuedart.BluedartAuthService;
75
import com.spice.profitmandi.dao.service.biuedart.BluedartService;
70
import com.spice.profitmandi.dao.service.biuedart.BluedartService;
-
 
71
import com.spice.profitmandi.dao.service.loiForm.LoiFormService;
76
import com.spice.profitmandi.dao.service.solr.FofoSolr;
72
import com.spice.profitmandi.dao.service.solr.FofoSolr;
77
import com.spice.profitmandi.service.*;
73
import com.spice.profitmandi.service.*;
78
import com.spice.profitmandi.service.integrations.CCAvenuePaymentService;
74
import com.spice.profitmandi.service.integrations.CCAvenuePaymentService;
79
import com.spice.profitmandi.service.integrations.RazorpayPaymentService;
75
import com.spice.profitmandi.service.integrations.RazorpayPaymentService;
80
import com.spice.profitmandi.service.integrations.bharti.model.BAGInsuranceModel;
76
import com.spice.profitmandi.service.integrations.bharti.model.BAGInsuranceModel;
Line 139... Line 135...
139
import java.math.RoundingMode;
135
import java.math.RoundingMode;
140
import java.nio.file.Files;
136
import java.nio.file.Files;
141
import java.nio.file.Paths;
137
import java.nio.file.Paths;
142
import java.sql.Timestamp;
138
import java.sql.Timestamp;
143
import java.text.DecimalFormat;
139
import java.text.DecimalFormat;
-
 
140
import java.text.NumberFormat;
144
import java.time.*;
141
import java.time.*;
145
import java.time.format.DateTimeFormatter;
142
import java.time.format.DateTimeFormatter;
146
import java.time.temporal.ChronoField;
143
import java.time.temporal.ChronoField;
147
import java.time.temporal.ChronoUnit;
144
import java.time.temporal.ChronoUnit;
148
import java.util.*;
145
import java.util.*;
Line 1041... Line 1038...
1041
    @Autowired
1038
    @Autowired
1042
    RedisCacheManager redisFortnightlyCacheManage;
1039
    RedisCacheManager redisFortnightlyCacheManage;
1043
 
1040
 
1044
    @Autowired
1041
    @Autowired
1045
    GstProAuthService gstProAuthService;
1042
    GstProAuthService gstProAuthService;
-
 
1043
    @Autowired
-
 
1044
    private MonthlyTargetRepository monthlyTargetRepository;
1046
 
1045
 
1047
    @Autowired
1046
    @Autowired
1048
    GstProService gstProService;
1047
    GstProService gstProService;
1049
 
1048
 
1050
    @Autowired
1049
    @Autowired
1051
    WarehouseProviderRepository warehouseProviderRepository;
1050
    WarehouseProviderRepository warehouseProviderRepository;
1052
    public void test() throws Exception {
1051
    public void test() throws Exception {
1053
        //sdCreditService.createLoan(175139262,76000,0,"Amount added for loan adjustment");
-
 
1054
        //this.checkfocusedModelInPartnerStock();
1052
        System.out.println("---test start----");
1055
       // List<SDCreditRequirement> sdCreditRequirements = sdCreditRequirementRepository.selectAll();
-
 
1056
        /*for (SDCreditRequirement sdCreditRequirement : sdCreditRequirements) {
-
 
1057
            long utilizationAmount = sdCreditService.getUtilizationAmount(sdCreditRequirement.getFofoId());
-
 
1058
            if (Math.abs(sdCreditRequirement.getUtilizedAmount().doubleValue() - utilizationAmount) > 5) {
-
 
1059
                sdCreditRequirement.setUtilizedAmount(BigDecimal.valueOf(utilizationAmount));
-
 
1060
            }
-
 
1061
 
1053
 
1062
        }*/
-
 
1063
        //warehouseProviderRepository.selectAllByWarehouseId(1);
-
 
1064
        /*String sellerGstin = GstProService.SANDBOX_GST_NUMBER;
-
 
1065
        E_InvoiceCommon.RespAuthPl respAuthPl = gstProAuthService.getAuthToken(sellerGstin);
-
 
1066
        if (LocalDateTime.now().isAfter(respAuthPl.getData().TokenExpiry)) {
-
 
1067
            redisFortnightlyCacheManage.getCache("gstAuthToken").evict(sellerGstin);
-
 
1068
            respAuthPl = gstProAuthService.getAuthToken(sellerGstin);
-
 
1069
        }
-
 
1070
        Map<String, String> authMap = gstProAuthService.getAuthHeaders(sellerGstin);
-
 
1071
        String authToken = respAuthPl.getData().getAuthToken();
-
 
1072
        authMap.put("AuthToken", authToken);
-
 
1073
        authMap.put("QrCodeSize", "250");
1054
        System.out.println("---test end ----");
1074
        authMap.put("ParseIrnResp", "1");
-
 
1075
        authMap.put("Content-Type", "application/json; charset=utf-8");
-
 
1076
        authMap.put("AuthToken", authToken);
-
 
1077
        authMap.put("QrCodeSize", "250");
-
 
1078
        authMap.put("ParseIrnResp", "1");
-
 
1079
        authMap.put("Content-Type", "application/json; charset=utf-8");
-
 
1080
 
-
 
1081
        System.out.println(gstProService.getEInvoiceByIrn(authMap, "5d95f5759fdfe48aeb86a7605727f37fc472d779a0f7bfbff98669e06dfd5ab2"));*/
-
 
1082
 
-
 
1083
        //List<Loan> loans = loanRepository.selectAllLoan();
-
 
1084
 
-
 
1085
        /*System.out.println(ageingService.getAllAgeingForWarehouseBilling(8718, Arrays.asList(34354)));
-
 
1086
        System.out.println(ageingService.getAllAgeingForWarehouseBilling(8646, Arrays.asList(36323)));
-
 
1087
        System.out.println(ageingService.getAllAgeingForWarehouseBilling(8954, Arrays.asList(34358)));*/
-
 
1088
        //System.out.println(ageingService.getAgeingForWarehouseBilling(8718, Arrays.asList(new ItemIdQuantity(34354,10))));
-
 
1089
    }
1055
    }
1090
 
1056
 
1091
    public void test4() throws Exception {
1057
    public void test4() throws Exception {
1092
        List<Integer> offerIds = Arrays.asList(2882, 2881, 2880, 2879, 2878, 2877, 2876, 2875, 2874, 2873, 2872, 2871, 2870, 2869, 2868, 2867, 2866, 2865, 2864, 2863, 2862, 2861, 2860, 2859, 2858, 2857, 2856, 2855, 2854, 2853, 2852, 2851, 2850, 2849, 2847, 2846, 2845, 2844, 2843, 2842, 2841, 2840, 2839, 2838, 2837, 2836, 2835, 2834, 2833, 2832, 2831, 2830, 2829, 2828, 2827, 2826, 2825, 2824, 2823, 2822, 2821, 2820, 2819, 2818, 2817, 2816, 2815, 2814, 2813, 2812, 2811, 2810, 2809, 2808, 2807, 2806, 2805, 2804, 2803, 2802, 2801, 2800, 2799, 2798, 2797, 2796, 2795, 2794, 2793, 2792, 2791, 2790, 2789, 2788, 2787, 2786, 2785, 2784, 2783, 2782, 2781, 2780, 2777, 2776, 2775, 2774, 2773, 2772, 2771, 2770, 2769, 2768, 2767, 2766, 2765, 2764, 2763, 2762, 2761, 2760, 2759, 2758, 2757, 2756, 2755, 2754, 2753, 2752, 2751, 2750, 2749, 2748, 2747, 2746, 2745, 2744, 2723, 2722, 2721, 2720, 2719, 2718, 2717, 2716, 2715, 2714, 2713, 2712, 2711, 2710, 2709, 2708, 2707, 2706, 2705, 2704, 2703, 2702, 2701, 2700, 2699, 2698, 2697, 2696, 2695, 2694, 2693, 2692, 2691, 2690, 2494, 2493, 2492, 2491, 2490, 2489, 2488, 2487, 2486, 2485, 2484, 2483, 2482, 2481, 2480, 2479, 2478, 2477, 2476, 2475, 2474, 2473, 2472, 2471, 2470, 2469, 2466, 2465, 2464, 2463, 2462, 2461, 2460, 2459, 2458, 2457, 2456, 2455, 2454, 2453, 2452, 2451, 2450, 2449, 2448, 2447, 2446, 2445, 2444, 2443, 2442, 2441, 2440, 2439, 2407, 2406, 2405, 2404, 2403, 2402, 2401, 2400, 2399, 2398, 2397, 2396, 2395, 2394, 2393, 2392, 2391, 2390, 2389, 2388, 2387, 2386, 2385, 2384, 2383, 2382, 2381, 2117, 2116, 2115, 2114, 2113, 2112, 2111, 2110, 2109, 2108, 2107, 2106, 2105, 2104, 2103, 2102, 2101, 2100, 2099, 2098, 2077);
1058
        List<Integer> offerIds = Arrays.asList(2882, 2881, 2880, 2879, 2878, 2877, 2876, 2875, 2874, 2873, 2872, 2871, 2870, 2869, 2868, 2867, 2866, 2865, 2864, 2863, 2862, 2861, 2860, 2859, 2858, 2857, 2856, 2855, 2854, 2853, 2852, 2851, 2850, 2849, 2847, 2846, 2845, 2844, 2843, 2842, 2841, 2840, 2839, 2838, 2837, 2836, 2835, 2834, 2833, 2832, 2831, 2830, 2829, 2828, 2827, 2826, 2825, 2824, 2823, 2822, 2821, 2820, 2819, 2818, 2817, 2816, 2815, 2814, 2813, 2812, 2811, 2810, 2809, 2808, 2807, 2806, 2805, 2804, 2803, 2802, 2801, 2800, 2799, 2798, 2797, 2796, 2795, 2794, 2793, 2792, 2791, 2790, 2789, 2788, 2787, 2786, 2785, 2784, 2783, 2782, 2781, 2780, 2777, 2776, 2775, 2774, 2773, 2772, 2771, 2770, 2769, 2768, 2767, 2766, 2765, 2764, 2763, 2762, 2761, 2760, 2759, 2758, 2757, 2756, 2755, 2754, 2753, 2752, 2751, 2750, 2749, 2748, 2747, 2746, 2745, 2744, 2723, 2722, 2721, 2720, 2719, 2718, 2717, 2716, 2715, 2714, 2713, 2712, 2711, 2710, 2709, 2708, 2707, 2706, 2705, 2704, 2703, 2702, 2701, 2700, 2699, 2698, 2697, 2696, 2695, 2694, 2693, 2692, 2691, 2690, 2494, 2493, 2492, 2491, 2490, 2489, 2488, 2487, 2486, 2485, 2484, 2483, 2482, 2481, 2480, 2479, 2478, 2477, 2476, 2475, 2474, 2473, 2472, 2471, 2470, 2469, 2466, 2465, 2464, 2463, 2462, 2461, 2460, 2459, 2458, 2457, 2456, 2455, 2454, 2453, 2452, 2451, 2450, 2449, 2448, 2447, 2446, 2445, 2444, 2443, 2442, 2441, 2440, 2439, 2407, 2406, 2405, 2404, 2403, 2402, 2401, 2400, 2399, 2398, 2397, 2396, 2395, 2394, 2393, 2392, 2391, 2390, 2389, 2388, 2387, 2386, 2385, 2384, 2383, 2382, 2381, 2117, 2116, 2115, 2114, 2113, 2112, 2111, 2110, 2109, 2108, 2107, 2106, 2105, 2104, 2103, 2102, 2101, 2100, 2099, 2098, 2077);
1093
        for (Integer offerId : offerIds) {
1059
        for (Integer offerId : offerIds) {
Line 2839... Line 2805...
2839
 
2805
 
2840
                focusedModelShortageList.add(fm);
2806
                focusedModelShortageList.add(fm);
2841
            }
2807
            }
2842
 
2808
 
2843
        }
2809
        }
2844
        LOGGER.info("focusedModelShortageReportMap {}",focusedModelShortageReportMap);
-
 
2845
        if (!focusedModelShortageReportMap.isEmpty()) {
2810
        if (!focusedModelShortageReportMap.isEmpty()) {
2846
            String fileName = "Stock Alert-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv";
2811
            String fileName = "Stock Alert-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv";
2847
            Map<String, Set<Integer>> storeGuyMap = csService.getAuthUserPartnerIdMapping();
2812
            Map<String, Set<Integer>> storeGuyMap = csService.getAuthUserPartnerIdMapping();
2848
            Map<String, List<List<?>>> emailRowsMap = new HashMap<>();
2813
            Map<String, List<List<?>>> emailRowsMap = new HashMap<>();
2849
 
2814
 
Line 2872... Line 2837...
2872
                } catch (Exception e2) {
2837
                } catch (Exception e2) {
2873
                    e2.printStackTrace();
2838
                    e2.printStackTrace();
2874
                }
2839
                }
2875
                String[] sendToArray = new String[]{
2840
                String[] sendToArray = new String[]{
2876
 
2841
 
2877
                        entry.getKey(), "alok.divedi@smartdukaan.com","ranu.rajput@smartdukaan.com"
2842
                        entry.getKey(), "apurve.shrivastava@smartdukaan.com", "puneet.bisht@smartdukaan.com"
2878
 
2843
 
2879
                };
2844
                };
2880
 
2845
 
2881
 
2846
 
2882
                try {
2847
                try {
Line 3713... Line 3678...
3713
 
3678
 
3714
    public void loanSettlement() throws Exception {
3679
    public void loanSettlement() throws Exception {
3715
        List<Loan> blockedLoans = loanRepository.selectAllActiveLoan().stream().filter(x -> x.getFreeDays() >= 365).collect(toList());
3680
        List<Loan> blockedLoans = loanRepository.selectAllActiveLoan().stream().filter(x -> x.getFreeDays() >= 365).collect(toList());
3716
        List<Loan> loans = loanRepository.selectAllActiveLoan().stream().filter(x -> x.getFreeDays() < 365).collect(toList());
3681
        List<Loan> loans = loanRepository.selectAllActiveLoan().stream().filter(x -> x.getFreeDays() < 365).collect(toList());
3717
        //Settle blocked loans only when normal loans are settled
3682
        //Settle blocked loans only when normal loans are settled
3718
            loans.addAll(blockedLoans);
3683
        loans.addAll(blockedLoans);
3719
            //TODO:Remove this code
3684
        //TODO:Remove this code
3720
            Loan specificLoan = loanRepository.selectByLoanId(20073);
3685
        Loan specificLoan = loanRepository.selectByLoanId(20073);
3721
            loans.add(0, specificLoan);
3686
        loans.add(0, specificLoan);
3722
            //TODO:Upto here
3687
        //TODO:Upto here
3723
            if (!loans.isEmpty()) {
3688
        if (!loans.isEmpty()) {
3724
 
-
 
3725
                for (Loan loan : loans) {
-
 
3726
                    double settledAmount = sdCreditService.settleLoan(loan);
-
 
3727
 
-
 
3728
                    List<SanctionRequest> sanctionRequests = sanctionRequestRepository.selectHoldSanctionByFofoId(loan.getFofoId());
-
 
3729
                    for (SanctionRequest sanctionRequest : sanctionRequests) {
-
 
3730
 
-
 
3731
                        List<Order> orders = orderRepository.selectAllByTransactionId(sanctionRequest.getTransactionId());
-
 
3732
                        if (orders.size() == 0) {
-
 
3733
                            LOGGER.info("Could not find orders - for Sanction Request {}", sanctionRequest);
-
 
3734
                            continue;
-
 
3735
                        }
-
 
3736
 
3689
 
3737
                        if (settledAmount >= sanctionRequest.getPendingAmount().doubleValue()) {
-
 
3738
                            settledAmount -= sanctionRequest.getPendingAmount().doubleValue();
-
 
3739
                            sanctionRequest.setPendingAmount(BigDecimal.valueOf(0));
-
 
3740
                            this.sendUnholdEmail(orders);
-
 
3741
                        } else {
3690
            for (Loan loan : loans) {
3742
                            double pendinAmount = sanctionRequest.getPendingAmount().doubleValue() - settledAmount;
-
 
3743
                            System.out.println("Pending Amount - " + pendinAmount);
3691
                double settledAmount = sdCreditService.settleLoan(loan);
3744
                            sanctionRequest.setPendingAmount(BigDecimal.valueOf(pendinAmount));
-
 
3745
                            break;
-
 
3746
 
3692
 
-
 
3693
                List<SanctionRequest> sanctionRequests = sanctionRequestRepository.selectHoldSanctionByFofoId(loan.getFofoId());
3747
                        }
3694
                for (SanctionRequest sanctionRequest : sanctionRequests) {
3748
 
3695
 
-
 
3696
                    List<Order> orders = orderRepository.selectAllByTransactionId(sanctionRequest.getTransactionId());
-
 
3697
                    if (orders.size() == 0) {
-
 
3698
                        LOGGER.info("Could not find orders - for Sanction Request {}", sanctionRequest);
-
 
3699
                        continue;
3749
                    }
3700
                    }
3750
                }
-
 
3751
 
3701
 
-
 
3702
                    if (settledAmount >= sanctionRequest.getPendingAmount().doubleValue()) {
-
 
3703
                        settledAmount -= sanctionRequest.getPendingAmount().doubleValue();
-
 
3704
                        sanctionRequest.setPendingAmount(BigDecimal.valueOf(0));
-
 
3705
                        this.sendUnholdEmail(orders);
-
 
3706
                    } else {
-
 
3707
                        double pendinAmount = sanctionRequest.getPendingAmount().doubleValue() - settledAmount;
-
 
3708
                        System.out.println("Pending Amount - " + pendinAmount);
-
 
3709
                        sanctionRequest.setPendingAmount(BigDecimal.valueOf(pendinAmount));
-
 
3710
                        break;
-
 
3711
 
-
 
3712
                    }
-
 
3713
 
-
 
3714
                }
3752
            }
3715
            }
3753
 
3716
 
-
 
3717
        }
3754
 
3718
 
3755
 
3719
 
3756
    }
3720
    }
3757
 
3721
 
3758
 
3722
 
Line 3872... Line 3836...
3872
 
3836
 
3873
            CreditRisk creditRisk = sdCreditService.getCurrentRisk(sdCreditRequirement, firstBillingDate);
3837
            CreditRisk creditRisk = sdCreditService.getCurrentRisk(sdCreditRequirement, firstBillingDate);
3874
 
3838
 
3875
            sdCreditRequirement.setRisk(creditRisk);
3839
            sdCreditRequirement.setRisk(creditRisk);
3876
 
3840
 
-
 
3841
            if (!sdCreditRequirement.isHardLimit()) {
3877
            sdCreditRequirement.setSuggestedLimit(suggestedAmount);
3842
                sdCreditRequirement.setSuggestedLimit(suggestedAmount);
3878
            sdCreditRequirement.setLimit(suggestedAmount);
3843
                sdCreditRequirement.setLimit(suggestedAmount);
-
 
3844
            }
3879
            BigDecimal utilizedLimit = new BigDecimal(sdCreditService.getUtilizationAmount(fofoId));
3845
            BigDecimal utilizedLimit = new BigDecimal(sdCreditService.getUtilizationAmount(fofoId));
3880
 
3846
 
3881
            BigDecimal availableLimit = sdCreditRequirement.getLimit().subtract(utilizedLimit);
3847
            BigDecimal availableLimit = sdCreditRequirement.getLimit().subtract(utilizedLimit);
3882
 
3848
 
3883
            LOGGER.info("utilizedLimit {} ", utilizedLimit);
3849
            LOGGER.info("utilizedLimit {} ", utilizedLimit);
Line 4522... Line 4488...
4522
        sb.append("</tbody></table></body></html>");
4488
        sb.append("</tbody></table></body></html>");
4523
 
4489
 
4524
        return sb.toString();
4490
        return sb.toString();
4525
    }
4491
    }
4526
 
4492
 
4527
    @Autowired
-
 
4528
    private MonthlyTargetRepository monthlyTargetRepository;
-
 
4529
 
4493
 
4530
    public void monthlyTargetForPartner() throws MessagingException, ProfitMandiBusinessException, IOException {
4494
    public void monthlyTargetForPartner() throws MessagingException, ProfitMandiBusinessException, IOException {
4531
 
4495
 
4532
        LocalDateTime curDate = LocalDateTime.now();
4496
        LocalDateTime curDate = LocalDateTime.now();
4533
        List<MonthlyTarget> monthlyTargets = monthlyTargetRepository.selectByDate(YearMonth.now());
4497
        List<MonthlyTarget> monthlyTargets = monthlyTargetRepository.selectByDate(YearMonth.now());