To solve this optimization problem, we need to define the decision variables, objective function, and constraints. 

Let's denote:
- $x$ as the number of batches of chocolate chip cookies.
- $y$ as the number of batches of oatmeal cookies.

The profit per batch of chocolate chip cookies is $12, and the profit per batch of oatmeal cookies is $15. Therefore, the total profit can be represented by the objective function: $12x + 15y$.

The constraints are based on the time available for each activity:
- Gathering ingredients: $10x + 8y \leq 1000$
- Mixing: $20x + 15y \leq 1200$
- Baking: $50x + 30y \leq 3000$

All variables should be non-negative since the number of batches cannot be negative.

Now, let's translate this into Gurobi code in Python:

```python
from gurobipy import *

# Create a model
m = Model("Cookie_Production")

# Define decision variables
x = m.addVar(name="chocolate_chip_batches", vtype=GRB.INTEGER, lb=0)
y = m.addVar(name="oatmeal_batches", vtype=GRB.INTEGER, lb=0)

# Set objective function
m.setObjective(12*x + 15*y, GRB.MAXIMIZE)

# Add constraints
m.addConstr(10*x + 8*y <= 1000, name="gather_ingredients")
m.addConstr(20*x + 15*y <= 1200, name="mixing")
m.addConstr(50*x + 30*y <= 3000, name="baking")

# Optimize model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print(f"Optimal solution: {x.varName} = {x.x}, {y.varName} = {y.x}")
    print(f"Maximum profit: ${12*x.x + 15*y.x:.2f}")
else:
    print("No optimal solution found")
```