To crush organized overt military opposition might take a couple of months to a couple of years.
To ferret out the remaining military opposition that has fallen back into the countryside or "gone underground" might take several more years. During this time, you can probably run most of the production facilities at reduced output due to spotty supply of resources, occasional sabotage, work stoppages or slowdowns, security issues, and other problems.
To re-establish a government and institutions that the majority of the population is reasonably content to live with and "familiar with" might take decades or a lifetime. During the early stages of this period, productivity would gradually ramp up back to normal, but "voluntary" military support may be somewhat lacking or unenthusiastic at best.
To make that planet consider itself an integral part of your empire could take a century or significantly longer. Note, as an example, that the repercussions of reintegrating the South after the American Civil War are not completely healed over after 150+ years, and that wasn't even a separate country for more than a couple of years.
In cases where the borders shift constantly, there's probably little loyalty to any single faction, and it might not present as difficult of a problem to overcome those existing loyalties, but establishing any lasting loyalty to the new faction may still take decades or centuries.
From a "productivity" angle, it will require several months or a couple of years until the planet is pacified sufficiently to resume "useful" production; until then you may need to subsidize it for basic services. After that, figure on a few percent increase in productivity per month, until it gradually returns to something approaching full output. That percentage will depend to some degree on the amount of damage and on the inherent stability and viability of the planetary economy to begin with, and how much difference there is between the previous government and social structures and the new ones.