| Line 35... |
Line 35... |
| 35 |
import com.spice.profitmandi.dao.repository.fofo.PaymentOptionRepository;
|
35 |
import com.spice.profitmandi.dao.repository.fofo.PaymentOptionRepository;
|
| 36 |
import com.spice.profitmandi.dao.repository.inventory.PartnerOnboardingService;
|
36 |
import com.spice.profitmandi.dao.repository.inventory.PartnerOnboardingService;
|
| 37 |
import com.spice.profitmandi.dao.repository.inventory.StateRepository;
|
37 |
import com.spice.profitmandi.dao.repository.inventory.StateRepository;
|
| 38 |
import com.spice.profitmandi.dao.repository.onboarding.*;
|
38 |
import com.spice.profitmandi.dao.repository.onboarding.*;
|
| 39 |
import com.spice.profitmandi.dao.repository.transaction.OrderRepository;
|
39 |
import com.spice.profitmandi.dao.repository.transaction.OrderRepository;
|
| 40 |
import com.spice.profitmandi.dao.repository.user.AgreementEsignRepository;
|
- |
|
| 41 |
import com.spice.profitmandi.dao.repository.user.BillingAddressRepository;
|
- |
|
| 42 |
import com.spice.profitmandi.dao.repository.user.LoiFormRepository;
|
40 |
import com.spice.profitmandi.dao.repository.user.*;
|
| 43 |
import com.spice.profitmandi.dao.repository.user.StoreTimelinetbRepository;
|
- |
|
| 44 |
import com.spice.profitmandi.dao.service.LoiDocModel;
|
41 |
import com.spice.profitmandi.dao.service.LoiDocModel;
|
| 45 |
import com.spice.profitmandi.dao.service.OTPResponse;
|
42 |
import com.spice.profitmandi.dao.service.OTPResponse;
|
| 46 |
import com.spice.profitmandi.dao.service.OtpProcessor;
|
43 |
import com.spice.profitmandi.dao.service.OtpProcessor;
|
| 47 |
import com.spice.profitmandi.dao.service.loiForm.LoiFormService;
|
44 |
import com.spice.profitmandi.dao.service.loiForm.LoiFormService;
|
| 48 |
import com.spice.profitmandi.service.integrations.gstpro.GstProService;
|
45 |
import com.spice.profitmandi.service.integrations.gstpro.GstProService;
|
| Line 144... |
Line 141... |
| 144 |
|
141 |
|
| 145 |
@Autowired
|
142 |
@Autowired
|
| 146 |
AgreementEsignRepository agreementEsignRepository;
|
143 |
AgreementEsignRepository agreementEsignRepository;
|
| 147 |
|
144 |
|
| 148 |
@Autowired
|
145 |
@Autowired
|
| - |
|
146 |
RbmAssignmentRepository rbmAssignmentRepository;
|
| - |
|
147 |
|
| - |
|
148 |
@Autowired
|
| 149 |
PartnerDashboardTrainingRepository partnerDashboardTrainingRepository;
|
149 |
PartnerDashboardTrainingRepository partnerDashboardTrainingRepository;
|
| 150 |
|
150 |
|
| 151 |
@Autowired
|
151 |
@Autowired
|
| 152 |
ResponseSender responseSender;
|
152 |
ResponseSender responseSender;
|
| 153 |
|
153 |
|
| Line 744... |
Line 744... |
| 744 |
for (StoreTimeline ev : revivalClearEvents) {
|
744 |
for (StoreTimeline ev : revivalClearEvents) {
|
| 745 |
storeTimelinetbRepository.deleteByOnboardingIdAndEvent(onboardingId, ev);
|
745 |
storeTimelinetbRepository.deleteByOnboardingIdAndEvent(onboardingId, ev);
|
| 746 |
}
|
746 |
}
|
| 747 |
agreementEsignRepository.deleteByOnboardingId(onboardingId);
|
747 |
agreementEsignRepository.deleteByOnboardingId(onboardingId);
|
| 748 |
|
748 |
|
| - |
|
749 |
// Reset the RBM Assignment gating row to PENDING. The timeline event
|
| - |
|
750 |
// above is deleted so the admin needs to re-mark; but STORE_CODE_CREATED
|
| - |
|
751 |
// isn't cleared on revival (same store code reused), so the PENDING-row
|
| - |
|
752 |
// seeder in StoreTimelineTatServiceImpl.onStoreCodeCreated won't re-run.
|
| - |
|
753 |
// Without this reset the row stays ASSIGNED from the previous lifecycle,
|
| - |
|
754 |
// /rbmAssignmentPanel (filters status='PENDING') hides the partner, and
|
| - |
|
755 |
// PO_CREATION stays gated forever.
|
| - |
|
756 |
com.spice.profitmandi.dao.entity.user.RbmAssignment rbmRow =
|
| - |
|
757 |
rbmAssignmentRepository.selectByOnboardingId(onboardingId);
|
| - |
|
758 |
if (rbmRow != null) {
|
| - |
|
759 |
rbmRow.setStatus("PENDING");
|
| - |
|
760 |
rbmRow.setMarkedBy(null);
|
| - |
|
761 |
rbmRow.setMarkedAt(null);
|
| - |
|
762 |
rbmAssignmentRepository.persist(rbmRow);
|
| - |
|
763 |
} else {
|
| - |
|
764 |
com.spice.profitmandi.dao.entity.user.RbmAssignment seed =
|
| - |
|
765 |
new com.spice.profitmandi.dao.entity.user.RbmAssignment();
|
| - |
|
766 |
seed.setOnboardingId(onboardingId);
|
| - |
|
767 |
seed.setStatus("PENDING");
|
| - |
|
768 |
seed.setCreatedAt(LocalDateTime.now());
|
| - |
|
769 |
rbmAssignmentRepository.persist(seed);
|
| - |
|
770 |
}
|
| - |
|
771 |
|
| 749 |
PartnerOnBoardingPanel panel = partnerOnBoardingPanelRepository.selectById(onboardingId);
|
772 |
PartnerOnBoardingPanel panel = partnerOnBoardingPanelRepository.selectById(onboardingId);
|
| 750 |
if (panel != null) {
|
773 |
if (panel != null) {
|
| 751 |
panel.setBillingStatus(0);
|
774 |
panel.setBillingStatus(0);
|
| 752 |
panel.setInaugrationDate(null);
|
775 |
panel.setInaugrationDate(null);
|
| 753 |
panel.setDeploymentDate(null);
|
776 |
panel.setDeploymentDate(null);
|