Restrict user access when user approval on workflow

I have a workflow system on a doctype. ‘stock user’ will approve initial state. In the default system when a doc is created all stock user can access that doc. But I need to restrict in this time like only department wise user will get access for that doc and he/she will approve it.

Create another role(per department) and assign your required users to the new role.

I think you did not get my point.
let me explain :
doctype name is ‘Material Request’
when user create a material request he/she must input ‘department’ field.
after submit that doc it will follow the workflow system.
Suppose I created multiple role based on department.
user A- HR-Mechanic
user B- HR-Accessories
user C- EX-Mechanic
user D- EX-Accessories
when material request created with ‘Accessories’ department it should go to user-B(HR-Accessories). See my screenshot. Right now It allows workflow action for user-B(HR-Accessories). But others role based user can see that doc. But don’t allow any action. But I want to restrict it like only user-B(HR-Accessories) can see that file.

i think you can apply a permission query on that doctype to list down who can see what

will you please explain it how to apply permission query.

You should deal with Role and conditions.
Create individual roles for all the departments and assign users respectively.
Add conditions in the transition state.
something like below. This will ensure the workflow is valid for the respective agent alone.
You can validate the same in the workflow Actions. Filter the action by user. If you get all users then your condition did not work properly