This study considers an integrated model of economic production quantity and preventive maintenance to incorporate possibilities of minimal repair, inspection time and preventive maintenance error. We determine the optimal inspection interval, inspection frequency and economic production quantity. It assumes the process will shift to the out-of-control state with a general deterioration distribution. If the process is in the in-control state, preventive maintenance is performed. The correctly preventive maintenance will decrease the failure rate. But, incorrectly preventive maintenance will cause the process to the out-of-control state. If the process is in the out-of-control state, there are two types. One is a relatively mild production process shift, where a minimal repair can remove the out-of-control state to the in-control state. The other is a more serious shift, the process needs to replacement. When the process is in the out-of-control state, an amount of defective goods will be produced. In this study, numerical analysis is used to analyze the influence of minimal repair, inspection time and preventive maintenance error on cost.