TECHNOLOGY FOCUS - MECHANICAL ENGINEERING - Preferred System: The system comprises at least one CO2 gas distributor installed in the photobioreactor, and is connected with the CO2 gas supply device in the outside of the photobioreactor through pipeline. The CO2 gas distributor is annular CO2 gas distributor. The ratio of the diameter of the CO2 gas distributor and the length or width of the photobioreactor is 0.2-0.6, the distance from the bottom of the photobioreactor is 10-50 cm, and the diameter of the hole in the CO2 gas distributor is 0.2-2.0 mm. The system further comprises stirring apparatus, the stirring apparatus comprises drive parts and agitator blade of same number as the CO2 gas distributor, the agitator blade is installed above the CO2 gas distributor, the drive parts are in the outside of the photobioreactor and partly cross the photobioreactor to connect the agitator blade. The volume of the photobioreactor is 100-1000 cubic meter. The photobioreactor is enclosed groove photobioreactor, and the grove is formed by at least two U shapes and of twists and turns. The enclosed groove photobioreactor is transparent enclosed groove photobioreactor, the first light source device is sun light source and/or LED three colors cold light source. The oil collecting tank is transparent, the second light source device is sun light source and/or LED three colors cold light source. The system further comprises temperature control device comprising multilevel temperature control jacket or pipe, the multilevel temperature control jacket or pipe is on the ektexine of the enclosed groove photobioreactor. The system further comprises an oxygen segregator placed inside of gas collecting pipeline on the top of the photobioreactor. The system further comprises at least one photosensitive probe, thermometer, pH electrode and dissolved oxygen electrode, the photosensitive probe, thermometer, pH electrode and dissolved oxygen electrode cross the wall of the photobioreactor respectively and the probe is in the photobioreactor. The CO2 gas supply device comprises industrial CO2 waste tank, air compressor and gas mixing tank, the industrial CO2 waste tank and air compressor are connected with the gas mixing tank through gas circuit, the gas mixing tank respectively connect the photobioreactor and the oil connecting tank through gas circuit. The first algal liquid separation device is installed the first water outlet, the second algal liquid separation device is installed the second water outlet. The system further comprises clarifier, the photobioreactor connects the first algal liquid separation device by the clarifier through pipeline, where the clarifier is installed the third water outlet. The system further comprises gathering tank, the second algal liquid separation connects the gathering tank through pipeline. The system is used for inoculating microalgae in the photobioreactor, the CO2 gas supply device provides 15.0-30.0% (v/v) CO2, the sewage sedimentation basin holds municipal sewage and/or secondary effluent of industrial sewage processed by sewage treatment plant, feeding the secondary effluent and CO2 into the photobioreactor to cultivate microalgae, effluent of the photobioreactor gain enrichment algal liquid by the first algal liquid separation device, one part of the enrichment algal liquid enters into the photobioreactor after mixing with the secondary effluent from the sewage sedimentation basin, feeding the secondary effluent and CO2 into the oil gathering tank, the other part of the enrichment algal liquid enters into the oil gathering tank to cultivate, effluent of the oil gathering tank gain frond used for extracting algal oil by the second algal liquid separation device. The total nitrogen in the secondary effluent is 30.0-50.0 mg/L, ammonia nitrogen is 10.0-16.0 mg/L, and concentration of the total phosphorus is 2.0-4.0 mg/L. The microalgae is selected from one or multiple types of Chlorella autotropic, Nannochloropsis salina, brown grape alga, fine angle MaoZao, scarlet pimpernel Chlorella