Direct construction method for conservation laws of partial differential equations Part II: General treatment