You can create a microflow to achieve this, that does something like this:
To create the 0001 code you can use the java action ‘StringLeftPad’ from the community commons module to add the leading zero's.
In order for the number to be in sequence you probably need to store the number in an entity.You can then do a db retrieve of the heighest number. You can either use an autonumber or do a +1 on the integer.
Then to create the string code you can create a variable that combines the above code with a formatdateTime(CurrentdateTime, ‘yyyy')