问题
I am facing an interesting problem and I wanted to see if anyone else tackled this situation before I spend days theorizing.
I have 2 systems. The first system maintains a sorted list of data. Lets say it has a list of named activities. The user of this system can manually order them at any time.
System 2 instantiates this list into itself when a new project is created. It also synchronizes with the original list. The user in system 2 can create custom activities. These do not synchronize back to the original. System 2 keeps the list of system 1 and the customs ones in a table. The user of system 2 can resequence/manually sort this list.
Now, comes the difficult part. If the users of System 1 reorders some of the activities, we want them to reorder in System 2. We only want those specific items to reorder but not reorder the items that the user of System 2 reordered already.
i.e. System 2 users reorders a few activities. System 1 user reorders those and other activities. Only the ones that the system 2 user didn't reorder would be affected.
I might be making this more complicated in my head than it actually is. It definitely sounds like an interesting conundrum.
来源:https://stackoverflow.com/questions/15932601/sequence-merging-between-two-semi-synchronized-lists