Hi and
to the forum.
Unfortunately it is not as simple as just matching the wire colours and soldering them together, therefore I have modified your original image to try and show where the wires must connect:
(Click on image to view it full size, or right click on it and "Open image in new tab" if you're using Google Chrome)The coloured wires on the 5 and 10 pin connectors will need to be checked using a multimeter set to Ohms or continuity
(diode test) to confirm which colour wires are connected to each of the used pins.
You can then allocate the pin function with the wire to see which wire coming from the controller it will need to be connected to.
I use a small piece of wire insulation on the end of the meter probe to ensure I only touch one pin at a time as shown above, but wrapping some insulation or masking tape around the end to form a small tube should work just as well.
I have queried the grey
(Data Tx) wire on your controller because this wire is orange on this controller:
All the other wires from your controller appear to be exactly the same as the one above, but the only way to be 100% sure would be to remove your controller and check the colour of your wires.
There should be sufficient information here to allow you to reconnect all of the original wires, apart from the 2 unused wires coming from the 10 pin connector.
Please make a careful note of your continuity results and let us know which colour wires were connected to the pins on the 5 and 10 pin connectors
(including the 2 unused wires if possible) as this information could be very useful for assisting others with similar problems.
Hopefully your repair will be successful and your bike will soon be back up and running again.
Alan