Deck Posts Were Covered With Dirt, Dealing With Rot
That first post is looking pretty bad. Most deck lumber is not meant to have contact with ground/dirt. The concrete filled holes should have been higher than the existing grade and sloped away from the posts. Filling in the area you dug out will not solve the problem as water will still accumulate. Your best bet would be to get some concrete deck supports and place them over the concrete after cutting off a portion the posts. The remainder part of the posts would go into the concrete supports. 



As far as the wood running along the ground, clean it off, reseal it and dig out the area so there's no further contact. 
As always, it never hurts to check with local authorities on what to do.