Django Queryset 合并排序.

a = aa.objects.filter(shifttype=upemptype,attdate=upattdate,tagtime__gte=20).values('attdate','shifttype','tagtime').annotate(attsum=Sum('atten'),postsum=Sum('post')).order_by('attdate','shifttype','tagtime')


b= aa.objects.filter(shifttype=upemptype,attdate=upattdate,tagtime__lt=8).values('attdate','shifttype','tagtime').annotate(attsum=Sum('atten'),postsum=Sum('post')).order_by('attdate','shifttype','tagtime')

c = a | b

其中a 的 tagtime 排序是 21 22 23

b 的 tagtime 排序是 0 1 2 3 4 5 6 7 8

c 的 tagtime 排序是 0 1 2 3 4 5 6 7 8 21 22 23

我想要 c 的 tagtime 排序是 21 22 23 0 1 2 3 4 5 6 7 8 要如何做?



始终有你
浏览 1179回答 0
0回答

慕斯4360584

ZMCPTADAAJGVUJKAQEEOPVSOUYUYSFSUXGMLTQGXDXAPAKAAXKORUYHBRLBIVRRGDAFIOBVLSSPFVXZMQXANHEHNVBHHVIJTOBVXEKSVVYPZDZTFPXKOEAKAUDUNRUHNTQNQNQCQMJNTKNGNRBUKQKBBOVIBURBHSLLYOJGVRHVVYSYCSFFSSFFCSWKAAUBKOKHADKSIOVVTTTMANJPOVPSPREHAOSSHXDJJTGQEDTQGKKBDAAEDTQGDQDGKDIJQXXQUBVOOFIUVFYMCCJPAJDQZZQXUJZWYIWJPKLLPLCWVSMCZOXBUJVVCDUXXHUUSSILHDXHBOADVKJIHUVLOROHDSRFPZJAFQTSFCJTWWPCWJYVNKIPSNQEYOESWDDNRLCJSFFDMBLFSSTTQNAKKDKAACLCPCZZVBNYYXRXNAXJQZMWSPFPLSYIGYAJYEBVIYZQVOIOCCPNSHTKWWMJKQBBLHMOELBHOEERRYHAFFYEYRFRIUQNYIHYPDGXWZMGQLLFSSJWZGIFOFCPVNGCCPVBLOKULNTWPVMFYOEXWPPPVSMJPSYWCIIYURVSLHJWWCSFLBYEINNMCSLEEUBOKAXCWDZGTAVMOYEEAYUKRBHMSLEERAYVXAKQEMCCMSYBLEHHXDAWWJOSMEA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