Location>code7788 >text

Multi-Year Customer Gold Calculation Error Resolution Process

Popularity:441 ℃/2024-11-20 11:14:01

Company SaaS system has a customer's employees to issue gold coins, the final calculation of gold coins is always the flow and the total amount of water can not be, previously responsible for this piece of people have made changes or not, and then this person in charge of the departure, after taking over the big data things, the customer is really using gold coins in this piece of business, and the financial use of this settlement reconciliations, at the end of 2023 the customer is forced to completely solve the problem.

       

And responsible for this piece of product manager to communicate this piece of content, said that this gold coin calculation has a history of reasons leading to the flow and the total amount is not right, not sure who is not right, the program also has a bug, but now to recalculate the right, because do not understand this piece of business, the product manager to determine the principle of the final:

1, the current total number of gold coins will be retained in each gold log stream, use this December 31, 2022 total as the basis, change the incorrect total to the total of the current stream

2, after recalculating by the total amount of the day + the flow behind to get the end and beginning of each day (gold balance)

   How many years has it lasted, it has never been solved, it gives me a headache when I hear about it, and it's not a small pit to take on such a difficult task:

Later query the calculation logic of the gold report, while doing the above ideas found that you can't do it by 2, because after the batch calculation by December 31, 2022, and the total amount of the report there are some parts still can't match. Later, I found the product manager, he said he just provides a solution idea, how to do it yourself to figure out how to do it!

The overall solution is as follows:

1, SQL looks up the most recent number of a gold record as of December 31, 2022 (before 2023-01-01)

2, compare the gold data, inconsistent change to the above total consistent

3, recalculate the daily breakdown of gold coins from 2023-01-01 to 2023-12-25 through the stored procedure of calculating the gold coins flow.

4, compare the total amount of water flow of gold coins in 2023-12-25, inconsistent view inconsistent reasons

5, found that there are dozens of accounts of the gold or inconsistent, the beginning of the period is consistent, by calculating the flow of water to 2023-12-25 is not the same, had to be an account to check the reasons and then calculations

Among them, I found that there is a program bug: the data in the 2 gold coin detail tables have the same duplicate data, modifying one of them to have 0 gold coins, and there is also the calculation of the number of gold coins less than 0.

Through such a stupid way, one by one to look at the data, and then correct the data to the same, repair the eyes are looking at the eyes, the program's bugs lead to the submission, there are 2 is the same data, so that the R & D students to change the program.

Unexpectedly 2 weeks later, the customer found that there are accounts of the gold again and not right, their own manual recalculation, comparison found that there is only 1 account is not right, the correction is good, coupled with the correction of the program, to the present November 18, 2024, the customer never said that the gold is not the right problem.

   

Summary:

Is it really hard to think about why the problem has not been completely solved for so many years? Now it seems that it is just a matter of careful data checking and correction and program bug modification, and then it is OK.lit. nothing is difficult on this earth, if your mind is set