We consider a way to generate operational inequalities to test nonclassicality (or quantumness) of multimode bosonic fields (or multiparty bosonic systems) that unifies the derivation of many known inequalities and allows to propose new ones. The nonclassicality criteria are based on Vogel's criterion corresponding to analyzing the positivity of multimode P functions or, equivalently, the positivity of matrices of expectation values of, e.g., creation and annihilation operators. We analyze not only monomials but also polynomial functions of such moments, which can sometimes enable simpler derivations of physically relevant inequalities. As an example, we derive various classical inequalities which can be violated only by nonclassical fields. In particular, we show how the criteria introduced here easily reduce to the well-known inequalities describing (a) multimode quadrature squeezing and its generalizations, including sum, difference, and principal squeezing; (b) two-mode one-time photon-number correlations, including sub-Poisson photon-number correlations and effects corresponding to violations of the Cauchy-Schwarz and Muirhead inequalities; (c) two-time single-mode photon-number correlations, including photon antibunching and hyperbunching; and (d) two-and three-mode quantum entanglement. Other simple inequalities for testing nonclassicality are also proposed. We have found some general relations between the nonclassicality and entanglement criteria, in particular those resulting from the Cauchy-Schwarz inequality. It is shown that some known entanglement inequalities can be derived as nonclassicality inequalities within our formalism, while some other known entanglement inequalities can be seen as sums of more than one inequality derived from the nonclassicality criterion. This approach enables a deeper analysis of the entanglement for a given nonclassicality.