|
@@ -298,6 +298,26 @@ class EquipmentInfoService:
|
|
|
equipment_info_18 = EquipmentInfo18.objects.filter(**kwargs).annotate(tab_val=Value('28', output_field=CharField()))
|
|
|
equipment_info_19 = EquipmentInfo19.objects.filter(**kwargs).annotate(tab_val=Value('29', output_field=CharField()))
|
|
|
equipment_info_20 = EquipmentInfo20.objects.filter(**kwargs).annotate(tab_val=Value('30', output_field=CharField()))
|
|
|
+ equipment_info_21 = EquipmentInfo21.objects.filter(**kwargs).annotate(tab_val=Value('31', output_field=CharField()))
|
|
|
+ equipment_info_22 = EquipmentInfo22.objects.filter(**kwargs).annotate(tab_val=Value('32', output_field=CharField()))
|
|
|
+ equipment_info_23 = EquipmentInfo23.objects.filter(**kwargs).annotate(tab_val=Value('33', output_field=CharField()))
|
|
|
+ equipment_info_24 = EquipmentInfo24.objects.filter(**kwargs).annotate(tab_val=Value('34', output_field=CharField()))
|
|
|
+ equipment_info_25 = EquipmentInfo25.objects.filter(**kwargs).annotate(tab_val=Value('35', output_field=CharField()))
|
|
|
+ equipment_info_26 = EquipmentInfo26.objects.filter(**kwargs).annotate(tab_val=Value('36', output_field=CharField()))
|
|
|
+ equipment_info_27 = EquipmentInfo27.objects.filter(**kwargs).annotate(tab_val=Value('37', output_field=CharField()))
|
|
|
+ equipment_info_28 = EquipmentInfo28.objects.filter(**kwargs).annotate(tab_val=Value('38', output_field=CharField()))
|
|
|
+ equipment_info_29 = EquipmentInfo29.objects.filter(**kwargs).annotate(tab_val=Value('39', output_field=CharField()))
|
|
|
+ equipment_info_30 = EquipmentInfo30.objects.filter(**kwargs).annotate(tab_val=Value('40', output_field=CharField()))
|
|
|
+ equipment_info_31 = EquipmentInfo31.objects.filter(**kwargs).annotate(tab_val=Value('41', output_field=CharField()))
|
|
|
+ equipment_info_32 = EquipmentInfo32.objects.filter(**kwargs).annotate(tab_val=Value('42', output_field=CharField()))
|
|
|
+ equipment_info_33 = EquipmentInfo33.objects.filter(**kwargs).annotate(tab_val=Value('43', output_field=CharField()))
|
|
|
+ equipment_info_34 = EquipmentInfo34.objects.filter(**kwargs).annotate(tab_val=Value('44', output_field=CharField()))
|
|
|
+ equipment_info_35 = EquipmentInfo35.objects.filter(**kwargs).annotate(tab_val=Value('45', output_field=CharField()))
|
|
|
+ equipment_info_36 = EquipmentInfo36.objects.filter(**kwargs).annotate(tab_val=Value('46', output_field=CharField()))
|
|
|
+ equipment_info_37 = EquipmentInfo37.objects.filter(**kwargs).annotate(tab_val=Value('47', output_field=CharField()))
|
|
|
+ equipment_info_38 = EquipmentInfo38.objects.filter(**kwargs).annotate(tab_val=Value('48', output_field=CharField()))
|
|
|
+ equipment_info_39 = EquipmentInfo39.objects.filter(**kwargs).annotate(tab_val=Value('49', output_field=CharField()))
|
|
|
+ equipment_info_40 = EquipmentInfo40.objects.filter(**kwargs).annotate(tab_val=Value('50', output_field=CharField()))
|
|
|
else:
|
|
|
equipment_info_1 = EquipmentInfo1.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('11', output_field=CharField()))
|
|
|
equipment_info_2 = EquipmentInfo2.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('12', output_field=CharField()))
|
|
@@ -319,12 +339,37 @@ class EquipmentInfoService:
|
|
|
equipment_info_18 = EquipmentInfo18.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('28', output_field=CharField()))
|
|
|
equipment_info_19 = EquipmentInfo19.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('29', output_field=CharField()))
|
|
|
equipment_info_20 = EquipmentInfo20.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('30', output_field=CharField()))
|
|
|
+ equipment_info_21 = EquipmentInfo21.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('31', output_field=CharField()))
|
|
|
+ equipment_info_22 = EquipmentInfo22.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('32', output_field=CharField()))
|
|
|
+ equipment_info_23 = EquipmentInfo23.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('33', output_field=CharField()))
|
|
|
+ equipment_info_24 = EquipmentInfo24.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('34', output_field=CharField()))
|
|
|
+ equipment_info_25 = EquipmentInfo25.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('35', output_field=CharField()))
|
|
|
+ equipment_info_26 = EquipmentInfo26.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('36', output_field=CharField()))
|
|
|
+ equipment_info_27 = EquipmentInfo27.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('37', output_field=CharField()))
|
|
|
+ equipment_info_28 = EquipmentInfo28.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('38', output_field=CharField()))
|
|
|
+ equipment_info_29 = EquipmentInfo29.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('39', output_field=CharField()))
|
|
|
+ equipment_info_30 = EquipmentInfo30.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('40', output_field=CharField()))
|
|
|
+ equipment_info_31 = EquipmentInfo31.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('41', output_field=CharField()))
|
|
|
+ equipment_info_32 = EquipmentInfo32.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('42', output_field=CharField()))
|
|
|
+ equipment_info_33 = EquipmentInfo33.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('43', output_field=CharField()))
|
|
|
+ equipment_info_34 = EquipmentInfo34.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('44', output_field=CharField()))
|
|
|
+ equipment_info_35 = EquipmentInfo35.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('45', output_field=CharField()))
|
|
|
+ equipment_info_36 = EquipmentInfo36.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('46', output_field=CharField()))
|
|
|
+ equipment_info_37 = EquipmentInfo37.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('47', output_field=CharField()))
|
|
|
+ equipment_info_38 = EquipmentInfo38.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('48', output_field=CharField()))
|
|
|
+ equipment_info_39 = EquipmentInfo39.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('49', output_field=CharField()))
|
|
|
+ equipment_info_40 = EquipmentInfo40.objects.filter(Q(**kwargs) | Q(**event_type_kwargs)).annotate(tab_val=Value('50', output_field=CharField()))
|
|
|
|
|
|
equipment_info_union = equipment_info_1.union(
|
|
|
- equipment_info_2, equipment_info_3, equipment_info_4, equipment_info_5, equipment_info_6, equipment_info_7,
|
|
|
- equipment_info_8, equipment_info_9, equipment_info_10,
|
|
|
+ equipment_info_2, equipment_info_3, equipment_info_4, equipment_info_5, equipment_info_6,
|
|
|
+ equipment_info_7, equipment_info_8, equipment_info_9, equipment_info_10,
|
|
|
equipment_info_11, equipment_info_12, equipment_info_13, equipment_info_14, equipment_info_15,
|
|
|
- equipment_info_16, equipment_info_17, equipment_info_18, equipment_info_19, equipment_info_20)
|
|
|
+ equipment_info_16, equipment_info_17, equipment_info_18, equipment_info_19, equipment_info_20,
|
|
|
+ equipment_info_21, equipment_info_22, equipment_info_23, equipment_info_24, equipment_info_25,
|
|
|
+ equipment_info_26, equipment_info_27, equipment_info_28, equipment_info_29, equipment_info_30,
|
|
|
+ equipment_info_31, equipment_info_32, equipment_info_33, equipment_info_34, equipment_info_35,
|
|
|
+ equipment_info_36, equipment_info_37, equipment_info_38, equipment_info_39, equipment_info_40
|
|
|
+ )
|
|
|
|
|
|
count = equipment_info_union.count()
|
|
|
if count == 0:
|