Implementation of the Stock Take Command

After finishing up the logic of the update command and doing the unit testing as well, I moved on to the accept command. The accept command involve a few logic where the accept command will take the list of item in stock take and compare it to the existing item location and update the stock quantity. To ensure that the process of updating the stock quantity of the item location is not executed properly, the entire logic is put inside of transaction so that any error that occurred will roll back any changes made.

Next, in order to compare the item in stock take and existing item location, an algorithm was needed. After doing some research online, I found LINQ to be somewhat suitable for the job. Then, I tried to implement the LINQ and tested it out and it worked. During the testing of the accept command, I encounter an error where another transaction was being created while the first transaction was still going on. After discussing with Mr. Peter, I was able to fix the error.

Lastly, after some discussion with Mr. Peter regarding the logic of the accept command, I needed change it so that the update process can be done much more faster. I also needed to stress test the LINQ algorithm to see how long it will take for the algorithm process a large amount of data.

Leave a Reply