With the increasing energy requirement and decreasing onshore reserves, offshore oil production has attracted increasing attention. A major challenge in offshore oil production is to minimize both the operational costs and risks; one of the major risks is anomalies in the flows. However, optimization methods to simultaneously consider well operation and flow assurance in operation planning have not been explored. In this paper, an integrated planning problem both considering well operation and flow assurance is reported. In particular, a multi-period mixed integer nonlinear programming (MINLP) model was proposed to minimize the total operation cost, taking into account of well production state, polymer flooding, energy consumption, platform inventory and flow assurance. By solving this integrated model, each well's working state, flow rates and chemicals injection rates can be optimally determined. The proposed model was applied to a case originated from a real-world offshore oil site and the results illustrate the effectiveness.